Skip to content

sign

Requests a signature through the Chain Signatures program.

Usage

const signature = await solanaChainSigContract.sign({
  path: 'my_derivation_path',
  payload: Array.from(new Uint8Array(32).fill(1)), // 32-byte array
  key_version: 0,
})

Parameters

ParameterTypeDescription
args.pathstringThe derivation path to use
args.payloadnumber[]The data to sign as an array of 32 bytes
args.key_versionnumberVersion of the key to use
options?SignOptionsOptional configuration for signing
options.sign.algo?stringOptional algorithm for the signature
options.sign.dest?stringOptional destination address for the signature
options.sign.params?stringAdditional parameters for signing
options.retry.delay?numberDelay between retries in milliseconds (default: 5000)
options.retry.retryCount?numberNumber of retries to attempt (default: 12)
options.remainingAccounts?AccountMeta[]Additional accounts required for the transaction
options.remainingSigners?Signer[]Additional signers required for the transaction

Returns

TypeDescription
Promise<RSVSignature>The signature in RSV format