Skip to main content

Function: loadKeypair()

function loadKeypair(key): Keypair;

Defined in: solana-client/src/chain-signer.ts:99

Parse a Solana keypair from inlined key material (no filesystem access, so the package stays browser-bundlable). Accepts a raw secret-key byte array, the contents of a Solana CLI id.json (a JSON byte-array string), or a base58-encoded secret key. Resolving a file path is the caller's job.

Parameters

ParameterType
keystring | number[]

Returns

Keypair