KmdApi
Defined in: packages/kmd_client/src/apis/api-service.ts:89
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new KmdApi(
httpRequest):KmdApi
Defined in: packages/kmd_client/src/apis/api-service.ts:90
Parameters
Section titled “Parameters”httpRequest
Section titled “httpRequest”Returns
Section titled “Returns”KmdApi
Properties
Section titled “Properties”httpRequest
Section titled “httpRequest”
readonlyhttpRequest:BaseHttpRequest
Defined in: packages/kmd_client/src/apis/api-service.ts:90
Methods
Section titled “Methods”createWallet()
Section titled “createWallet()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<CreateWalletResponse>
deleteKey()
Section titled “deleteKey()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
deleteMultisig()
Section titled “deleteMultisig()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
exportKey()
Section titled “exportKey()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ExportKeyResponse>
exportMasterKey()
Section titled “exportMasterKey()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ExportMasterKeyResponse>
exportMultisig()
Section titled “exportMultisig()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ExportMultisigResponse>
generateKey()
Section titled “generateKey()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<GenerateKeyResponse>
importKey()
Section titled “importKey()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ImportKeyResponse>
importMultisig()
Section titled “importMultisig()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ImportMultisigResponse>
initWalletHandle()
Section titled “initWalletHandle()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<InitWalletHandleTokenResponse>
listKeysInWallet()
Section titled “listKeysInWallet()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ListKeysResponse>
listMultisig()
Section titled “listMultisig()”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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ListMultisigResponse>
listWallets()
Section titled “listWallets()”listWallets():
Promise<ListWalletsResponse>
Defined in: packages/kmd_client/src/apis/api-service.ts:395
Lists all of the wallets that kmd is aware of.
Returns
Section titled “Returns”Promise<ListWalletsResponse>
releaseWalletHandleToken()
Section titled “releaseWalletHandleToken()”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.
Parameters
Section titled “Parameters”ReleaseWalletHandleTokenRequest
Returns
Section titled “Returns”Promise<void>
renameWallet()
Section titled “renameWallet()”renameWallet(
body):Promise<RenameWalletResponse>
Defined in: packages/kmd_client/src/apis/api-service.ts:438
Rename the underlying wallet to something else
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<RenameWalletResponse>
renewWalletHandleToken()
Section titled “renewWalletHandleToken()”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
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<RenewWalletHandleTokenResponse>
signMultisigProgram()
Section titled “signMultisigProgram()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<SignProgramMultisigResponse>
signMultisigTransaction()
Section titled “signMultisigTransaction()”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.
Parameters
Section titled “Parameters”partialMultisig?
Section titled “partialMultisig?”publicKey
Section titled “publicKey”Uint8Array
signer?
Section titled “signer?”Uint8Array<ArrayBufferLike>
transaction
Section titled “transaction”walletHandleToken
Section titled “walletHandleToken”string
walletPassword?
Section titled “walletPassword?”string
Returns
Section titled “Returns”Promise<SignMultisigResponse>
A multisig signature or partial signature, which can be used to form a signed transaction.
signProgram()
Section titled “signProgram()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<SignProgramResponse>
signTransaction()
Section titled “signTransaction()”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.
Parameters
Section titled “Parameters”publicKey?
Section titled “publicKey?”Uint8Array<ArrayBufferLike>
transaction
Section titled “transaction”walletHandleToken
Section titled “walletHandleToken”string
walletPassword?
Section titled “walletPassword?”string
Returns
Section titled “Returns”Promise<SignTransactionResponse>
An encoded, signed transaction.
version()
Section titled “version()”version():
Promise<VersionsResponse>
Defined in: packages/kmd_client/src/apis/api-service.ts:585
Returns
Section titled “Returns”Promise<VersionsResponse>
walletInfo()
Section titled “walletInfo()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<WalletInfoResponse>