Client: wallets
Import an EVM keystore file
Decrypt Ethereum JSON keystore V3 into an EVM private-key wallet.
Overview
Decrypts an Ethereum JSON keystore V3 file and imports it as an EVM private_key wallet (all EVM chains on the allowlist). Duplicate check is address-based—same as importPrivateKey.
Signature
js
await client.wallets.importEvmKeystore(options)Parameters
ImportEvmKeystoreOptions
| Field | Required | Description |
|---|---|---|
| json | Yes | `string | object` — Ethereum JSON keystore V3. |
| password | Yes | `string` — decrypts the JSON file (MetaMask / export PIN). |
| storagePassword | No | `string` — Gray3 keystore PIN when storage is encrypted. Defaults to `password` if omitted. |
| label | No | `string` — UI name. |
Response
Promise<Wallet> — kind: "private_key", EVM only
ts
{
id: string;
label: string;
kind: "private_key";
enabledChains: GrayChainId[]; // enabled EVM chains
}Usage
js
await client.wallets.importEvmKeystore({
json: keystoreJson,
password: "file-pin",
storagePassword: pin,
label: "From MetaMask",
});Throws
| Field | Required | Description |
|---|---|---|
| conflict | No | Derived EVM address already imported / watched. |
| unauthorized | No | Wrong file password, or wrong Gray3 storage PIN. |
| invalid_argument | No | Malformed keystore JSON. |