Skip to content

sign

Signs data using the Chain Signatures contract.

Usage

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

Parameters

ParameterTypeDescription
argsSignArgsArguments for signing data
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 to use for signing
options.sign.dest?stringOptional destination for the signature
options.sign.params?stringOptional parameters for the signing process
options.retry.delay?numberDelay between retries in milliseconds (default: 5000)
options.retry.retryCount?numberNumber of retries to attempt (default: 12)

Returns

TypeDescription
Promise<RSVSignature>The signature in RSV format