wallet/exportAccount
Exports the keys of the default account, or the named account if account
is specified.
The spendingKey
will be null in the response if viewOnly = true
or if exporting a view-only account.
Request
{
account?: string
viewOnly?: boolean
format?: AccountFormat
language?: LanguageKey
}
Supported AccountFormats
- Base64Json: The full account and all keys as a JSON string then encoded in base64.
- JSON: The full account and all keys as a JSON string
- Mnemonic: The private key encoded as 24 word BIP39 mnemonic phrase in the specified language
- SpendingKey: The private key as a hex-encoded string.
Response
The RPC will serialize the account into a string of the desired format.
{
account: string | null
}