listenForSignatureEvents
Listens for signature events matching a given request ID. Should be called when invoking the sign
method on the contract without using this class's sign
method (e.g. for cross contract invocations).
Usage
const promise = solanaChainSigContract.listenForSignatureEvents({
requestId: req.requestId,
payload: req.payload,
path: req.path,
options: {
delay: 5000,
retryCount: 12,
},
})
// call sign manually
const signature = (await promise) as RSVSignature
Note: The requestId and payload parameters are essential for identifying and verifying incoming signatures against the original request.
Parameters
Parameter | Type | Description |
---|---|---|
requestId | string | Unique identifier for the signature request |
payload | number[] | Data payload used in the signature request |
path | string | Derivation path used in the signature request |
options? | object | Optional retry configuration |
options.delay? | number | Delay between retries in milliseconds (default: 5000) |
options.retryCount? | number | Number of retries (default: 12) |
Returns
Type | Description |
---|---|
Promise<RSVSignature> | The signature result as RSV format or error data if failed |