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.
signed dto signing failed user rejected gala sdk error
Type Parameters
| Type Parameter |
|---|
T extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
signer | GalaChainSigner |
method | string |
dto | T |
gala chain signer
Returns
Promise<SignedDto<T>>
signed dto
Throws
GalaSDKError SIGNING_FAILED, or the SDK error the signer itself threw.