Wallet
@coinbase/waas-sdk-web • API
Interface: Wallet
Properties
addresses
addresses:
Addresses
Get all of the addresses associated with this wallet.
Methods
changePasscode()
changePasscode(
currentPasscode
,newPasscode
):Promise
<PasscodePrompt
>
Changes the passcode associated with the wallet.
Parameters
• currentPasscode: string
The current passcode associated with the wallet.
• newPasscode: string
The new passcode to associate with the wallet.
Returns
Promise
<PasscodePrompt
>
A promise of the PasscodePrompt with the status and remaining attempts.
createAddress()
createAddress(
protocolSpecifier
):Promise
<Address
<string
>>
Derive a new address on this wallet for a particular protocol family.
Parameters
• protocolSpecifier: EVM
A ProtocolFamily or Network that contains the protocol family to derive the address for.
Returns
Promise
<Address
<string
>>
A promise of the created Address.
exportKeys()
exportKeys(
backup
,passcode
?,format
?):Promise
<ExtendedPrivateKey
[] |RawPrivateKey
[]>
Exports the BIP32 extended private keys associated with the wallet.
Parameters
• backup: string
The backup associated with the wallet.
• passcode?: string
The optional passcode associated with the wallet.
• format?: PrivateKeyFormat
The optional format of private key to export, defaults to RAW.
Returns
Promise
<ExtendedPrivateKey
[] | RawPrivateKey
[]>
A promise of a list of exported private keys for the wallet.
Throws
An error if the passcode is invalid.
exportKeysFromHostedBackup()
exportKeysFromHostedBackup(
passcode
?,format
?,protocolFamily
?):Promise
<ExtendedPrivateKey
[] |RawPrivateKey
[]>
Exports the BIP32 extended private keys associated with the wallet using CB hosted backup.
Parameters
• passcode?: string
The optional passcode associated with the wallet.
• format?: PrivateKeyFormat
The optional format of private key to export, defaults to RAW.
• protocolFamily?: EVM
Returns
Promise
<ExtendedPrivateKey
[] | RawPrivateKey
[]>
A promise of a list of exported private keys for the wallet.
Throws
An error if the passcode is invalid.
validatePasscode()
validatePasscode(
passcode
):Promise
<PasscodePrompt
>
Validates the passcode associated with the wallet.
Parameters
• passcode: string
The passcode to validate.
Returns
Promise
<PasscodePrompt
>
A promise of the PasscodePrompt with the status and remaining attempts.