@hiveio/beekeeper / IBeekeeperSession
Interface: IBeekeeperSession
Methods
close()
close():
IBeekeeperInstance
Locks all of the unlocked wallets, closes them, closes this session and makes it unusable
Returns
Beekeeper instance owning the closed session
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Defined in
src/detailed/interfaces.ts:288
createWallet()
Call Signature
createWallet(
name
,password
?):Promise
<IWalletCreated
>
Creates a new Beekeeper wallet object owned by this session
Parameters
name
string
name of wallet
password?
string
password used for creation of a wallet. Not required and in this case a password is automatically generated and returned
Returns
Promise
<IWalletCreated
>
the created unlocked Beekeeper wallet object
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.) or when trying to create a persistent wallet with inMemory option Enabled
Defined in
src/detailed/interfaces.ts:246
Call Signature
createWallet(
name
,password
,isTemporary
):Promise
<IWalletCreated
>
Creates a new Beekeeper wallet object owned by this session
Parameters
name
string
name of wallet
password
string
password used for creation of a wallet. Not required and in this case a password is automatically generated and returned
isTemporary
boolean
If true
the wallet exists only in memory otherwise is saved into a file. (defaults to false
)
Returns
Promise
<IWalletCreated
>
the created unlocked Beekeeper wallet object
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.) or when trying to create a persistent wallet with inMemory option Enabled
Defined in
src/detailed/interfaces.ts:259
getInfo()
getInfo():
IBeekeeperInfo
Retrieves the current session info
Returns
Current session information
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Defined in
src/detailed/interfaces.ts:214
hasWallet()
hasWallet(
name
):boolean
Checks if wallet with given name exists
Parameters
name
string
name of the wallet
Returns
boolean
true
if a wallet exists otherwise false
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Defined in
src/detailed/interfaces.ts:225
listWallets()
listWallets():
IBeekeeperWallet
[]
Lists all of the opened wallets
Returns
array of opened Beekeeper wallets (either unlocked or locked)
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)
Defined in
src/detailed/interfaces.ts:234
lockAll()
lockAll():
IBeekeeperWallet
[]
Locks all of the unlocked wallets owned by this session
Returns
array of the locked Beekeeper 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:279
openWallet()
openWallet(
name
):IBeekeeperWallet
Opens Beekeeper wallet object owned by this session
Parameters
name
string
name of wallet
Returns
the opened Beekeeper wallet object (may be unlocked if it has been previously unlocked)
Throws
on any beekeeper API-related error (error parsing response, invalid input, timeout error, fs sync error etc.)