@hiveio/beekeeper / IBeekeeperUnlockedWallet
Interface: IBeekeeperUnlockedWallet
Extends
Properties
isTemporary
readonly
isTemporary:boolean
Indicates if wallet exists only in memory or is saved into a file.
Inherited from
Defined in
name
readonly
name:string
Name of this wallet
Inherited from
Defined in
Methods
close()
close():
IBeekeeperSession
Ensures that this wallet is locked, then closes it
Returns
Beekeeper session owning the closed wallet
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Inherited from
Defined in
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.)
Defined in
src/detailed/interfaces.ts:157
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.)
Defined in
src/detailed/interfaces.ts:144
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.)
Defined in
src/detailed/interfaces.ts:166
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.)
Defined in
src/detailed/interfaces.ts:110
lock()
lock():
IBeekeeperWallet
Locks the current wallet
Returns
Locked beekeeper wallet
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Defined in
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.)
Defined in
src/detailed/interfaces.ts:119
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.)