Update generated documentation authored by Bartek Wrona's avatar Bartek Wrona
[@hiveio/beekeeper v1.27.6-rc1-stable.240626220315](../globals) / IBeekeeperUnlockedWallet
# Interface: IBeekeeperUnlockedWallet
## Extends
- [`IWallet`](./IWallet)
## Properties
### name
> `readonly` **name**: `string`
Name of this wallet
#### Inherited from
[`IWallet`](./IWallet).[`name`](./IWallet#name)
#### Source
[src/interfaces.ts:23](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L23)
## Methods
### close()
> **close**(): [`IBeekeeperSession`](./IBeekeeperSession)
Ensures that this wallet is locked, then closes it
#### Returns
[`IBeekeeperSession`](./IBeekeeperSession)
Beekeeper session owning the closed wallet
#### Inherited from
[`IWallet`](./IWallet).[`close`](./IWallet#close)
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:15](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L15)
***
### decryptData()
> **decryptData**(`content`, `key`, `anotherKey`?): `string`
Decrypts given data from a specific entity and returns the decrypted message
#### Parameters
**content**: `string`
Base58 content to be decrypted
**key**: `string`
public key to find the private key in the wallet and decrypt the data
**anotherKey?**: `string`
other public key to find the private key in the wallet and decrypt the data (optional - use if the message was encrypted for somebody else)
#### Returns
`string`
decrypted buffer
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:140](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L140)
***
### encryptData()
> **encryptData**(`content`, `key`, `anotherKey`?, `nonce`?): `string`
Encrypts given data for a specific entity and returns the encrypted message
#### Parameters
**content**: `string`
Content to be encrypted
**key**: `string`
public key to find the private key in the wallet and encrypt the data
**anotherKey?**: `string`
other public key to find the private key in the wallet and encrypt the data (optional - use if the message is to encrypt for somebody else)
**nonce?**: `number`
optional nonce to be explicitly specified for encryption
#### Returns
`string`
base58 encrypted buffer
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:127](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L127)
***
### getPublicKeys()
> **getPublicKeys**(): `string`[]
Lists all of the public keys
#### Returns
`string`[]
a set of all keys for all unlocked wallets
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:149](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L149)
***
### importKey()
> **importKey**(`wifKey`): `Promise`\<`string`\>
Imports given private key to this wallet
#### Parameters
**wifKey**: `string`
private key in WIF format to import
#### Returns
`Promise`\<`string`\>
Public key generated from the imported private key
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:93](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L93)
***
### lock()
> **lock**(): [`IBeekeeperWallet`](./IBeekeeperWallet)
Locks the current wallet
#### Returns
[`IBeekeeperWallet`](./IBeekeeperWallet)
Locked beekeeper wallet
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:82](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L82)
***
### removeKey()
> **removeKey**(`publicKey`): `Promise`\<`void`\>
Removes given key from this wallet
#### Parameters
**publicKey**: `string`
public key in WIF format to match the private key in the wallet to remove
#### Returns
`Promise`\<`void`\>
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:102](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L102)
***
### signDigest()
> **signDigest**(`publicKey`, `sigDigest`): `string`
Signs a transaction by signing a digest of the transaction
#### Parameters
**publicKey**: `string`
public key in WIF format to match the private key in the wallet. It will be used to sign the provided data
**sigDigest**: `string`
digest of a transaction in hex format
#### Returns
`string`
signed data in hex format
#### Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
#### Source
[src/interfaces.ts:114](https://gitlab.syncad.com/hive/hive/programs/beekeeper/beekeeper_wasm/-/blob/838166b567c1d62715351c14be1f8e327570995c/programs/beekeeper/beekeeper_wasm/src/interfaces.ts#L114)