Skip to content

KmdApi

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

new KmdApi(httpRequest): KmdApi

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

BaseHttpRequest

KmdApi

readonly httpRequest: BaseHttpRequest

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

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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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>


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.


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>


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.


version(): Promise<VersionsResponse>

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

Promise<VersionsResponse>


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>