@fuel-ts/account v0.96.2 • Docs
Class: PrivateKeyVault
Implements
Vault
<PkVaultOptions
>
Constructors
new PrivateKeyVault()
new PrivateKeyVault(
options
):PrivateKeyVault
If privateKey vault is initialized with a secretKey, it creates one account with the fallowing secret
Parameters
• options: PkVaultOptions
= {}
Returns
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:23
Properties
type
readonly
static
type:"privateKey"
='privateKey'
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:15
Methods
addAccount()
addAccount():
object
Returns
object
address
address:
AbstractAddress
=wallet.address
publicKey
publicKey:
string
=wallet.publicKey
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:49
exportAccount()
exportAccount(
address
):string
Parameters
• address: string
| AbstractAddress
Returns
string
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:57
getAccounts()
getAccounts():
WalletManagerAccount
[]
Returns
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:45
getPublicAccount()
getPublicAccount(
privateKey
):object
Parameters
• privateKey: string
Returns
object
address
address:
AbstractAddress
=wallet.address
publicKey
publicKey:
string
=wallet.publicKey
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:37
getWallet()
getWallet(
address
):WalletUnlocked
Parameters
• address: string
| AbstractAddress
Returns
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:73
serialize()
serialize():
PkVaultOptions
Returns
Implementation of
Defined in
packages/account/src/wallet-manager/vaults/privatekey-vault.ts:31