Skip to main content

index/functions/signPreSend.md

signPreSend<T>(signer, method, dto): Promise<SignedDto<T>>

Signs a DTO with the app's signer. Whatever the signer throws that is not already an SDK error (a locked wallet, an unreachable extension, a wallet that declined) is SIGNING_FAILED (reason user_rejected or failed, the original as cause), and a signer that returns something other than an object is SIGNING_FAILED too: both are pre-send, so a retry is safe. An SDK error of ANY product (every one is a GalaSDKError) passes through as it is.

Type Parameters​

Type Parameter
T extends Record<string, unknown>

Parameters​

ParameterType
signerGalaChainSigner
methodstring
dtoT

Returns​

Promise<SignedDto<T>>

Throws​

GalaSDKError SIGNING_FAILED, or the SDK error the signer itself threw.