Skip to content

KmdClient

Defined in: packages/kmd_client/src/client.ts:5

new KmdClient(config): KmdClient

Defined in: packages/kmd_client/src/client.ts:6

ClientConfig

KmdClient

KmdApi.constructor

readonly httpRequest: BaseHttpRequest

Defined in: packages/kmd_client/src/apis/api-service.ts:90

KmdApi.httpRequest

createWallet(body): Promise<CreateWalletResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:630

Create a new wallet (collection of keys) with the given parameters.

CreateWalletRequest

Promise<CreateWalletResponse>

KmdApi.createWallet


deleteKey(body): Promise<void>

Defined in: packages/kmd_client/src/apis/api-service.ts:124

Deletes the key with the passed public key from the wallet.

DeleteKeyRequest

Promise<void>

KmdApi.deleteKey


deleteMultisig(body): Promise<void>

Defined in: packages/kmd_client/src/apis/api-service.ts:147

Deletes multisig preimage information for the passed address from the wallet.

DeleteMultisigRequest

Promise<void>

KmdApi.deleteMultisig


exportKey(body): Promise<ExportKeyResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:170

Export the secret key associated with the passed public key.

ExportKeyRequest

Promise<ExportKeyResponse>

KmdApi.exportKey


exportMasterKey(body): Promise<ExportMasterKeyResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:195

Export the master derivation key from the wallet. This key is a master “backup” key for the underlying wallet. With it, you can regenerate all of the wallets that have been generated with this wallet’s POST /v1/key endpoint. This key will not allow you to recover keys imported from other wallets, however.

ExportMasterKeyRequest

Promise<ExportMasterKeyResponse>

KmdApi.exportMasterKey


exportMultisig(body): Promise<ExportMultisigResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:220

Given a multisig address whose preimage this wallet stores, returns the information used to generate the address, including public keys, threshold, and multisig version.

ExportMultisigRequest

Promise<ExportMultisigResponse>

KmdApi.exportMultisig


generateKey(body): Promise<GenerateKeyResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:245

Generates the next key in the deterministic key sequence (as determined by the master derivation key) and adds it to the wallet, returning the public key.

GenerateKeyRequest

Promise<GenerateKeyResponse>

KmdApi.generateKey


importKey(body): Promise<ImportKeyResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:270

Import an externally generated key into the wallet. Note that if you wish to back up the imported key, you must do so by backing up the entire wallet database, because imported keys were not derived from the wallet’s master derivation key.

ImportKeyRequest

Promise<ImportKeyResponse>

KmdApi.importKey


importMultisig(body): Promise<ImportMultisigResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:295

Generates a multisig account from the passed public keys array and multisig metadata, and stores all of this in the wallet.

ImportMultisigRequest

Promise<ImportMultisigResponse>

KmdApi.importMultisig


initWalletHandle(body): Promise<InitWalletHandleTokenResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:320

Unlock the wallet and return a wallet handle token that can be used for subsequent operations. These tokens expire periodically and must be renewed. You can POST the token to /v1/wallet/info to see how much time remains until expiration, and renew it with /v1/wallet/renew. When you’re done, you can invalidate the token with /v1/wallet/release.

InitWalletHandleTokenRequest

Promise<InitWalletHandleTokenResponse>

KmdApi.initWalletHandle


listKeysInWallet(body): Promise<ListKeysResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:345

Lists all of the public keys in this wallet. All of them have a stored private key.

ListKeysRequest

Promise<ListKeysResponse>

KmdApi.listKeysInWallet


listMultisig(body): Promise<ListMultisigResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:370

Lists all of the multisig accounts whose preimages this wallet stores

ListMultisigRequest

Promise<ListMultisigResponse>

KmdApi.listMultisig


listWallets(): Promise<ListWalletsResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:395

Lists all of the wallets that kmd is aware of.

Promise<ListWalletsResponse>

KmdApi.listWallets


releaseWalletHandleToken(body): Promise<void>

Defined in: packages/kmd_client/src/apis/api-service.ts:415

Invalidate the passed wallet handle token, making it invalid for use in subsequent requests.

ReleaseWalletHandleTokenRequest

Promise<void>

KmdApi.releaseWalletHandleToken


renameWallet(body): Promise<RenameWalletResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:438

Rename the underlying wallet to something else

RenameWalletRequest

Promise<RenameWalletResponse>

KmdApi.renameWallet


renewWalletHandleToken(body): Promise<RenewWalletHandleTokenResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:463

Renew a wallet handle token, increasing its expiration duration to its initial value

RenewWalletHandleTokenRequest

Promise<RenewWalletHandleTokenResponse>

KmdApi.renewWalletHandleToken


signMultisigProgram(body): Promise<SignProgramMultisigResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:488

Start a multisig signature, or add a signature to a partially completed multisig signature object.

SignProgramMultisigRequest

Promise<SignProgramMultisigResponse>

KmdApi.signMultisigProgram


signMultisigTransaction(body): Promise<SignMultisigResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:644

Enables the signing of a transaction using the provided wallet and multisig info. The public key is used to identify which multisig account key to use for signing. When a signer is provided it is used to resolve the private key and sign the transaction, enabling rekeyed account signing.

MultisigSig

Uint8Array

Uint8Array<ArrayBufferLike>

Transaction

string

string

Promise<SignMultisigResponse>

A multisig signature or partial signature, which can be used to form a signed transaction.

KmdApi.signMultisigTransaction


signProgram(body): Promise<SignProgramResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:538

Signs the passed program with a key from the wallet, determined by the account named in the request.

SignProgramRequest

Promise<SignProgramResponse>

KmdApi.signProgram


signTransaction(body): Promise<SignTransactionResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:657

Enables the signing of a transaction using the provided wallet info. When a public key is provided it is used to resolve the private key and sign the transaction, enabling rekeyed account signing.

Uint8Array<ArrayBufferLike>

Transaction

string

string

Promise<SignTransactionResponse>

An encoded, signed transaction.

KmdApi.signTransaction


version(): Promise<VersionsResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:585

Promise<VersionsResponse>

KmdApi.version


walletInfo(body): Promise<WalletInfoResponse>

Defined in: packages/kmd_client/src/apis/api-service.ts:605

Returns information about the wallet associated with the passed wallet handle token. Additionally returns expiration information about the token itself.

WalletInfoRequest

Promise<WalletInfoResponse>

KmdApi.walletInfo