wallet/importAccount
Imports an encoded account and it's keys into the wallet.
The string is typically generated by the exportAccount
RPC, although the string can be manually generated with the sdk.
The optional createdAt
field can be used to set the block sequence to start scanning from for the imported account. Note that, if the account received any transactions on a block before this sequence, then those transactions will not appear in the account's balance.
Request
{
account: string
name?: string
rescan?: boolean
createdAt?: number
format?: AccountFormat
}
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
{
name: string;
isDefaultAccount: boolean;
}