Function: signPreSend()
GalaChain core SDK 1.0.0-rc.8 / index / signPreSend
Function: signPreSend()
signPreSend<
T>(signer,method,dto):Promise<SignedDto<T>>
Defined in: packages/gala-core-sdk/dist/index.d.ts:1784
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
T
T extends Record<string, unknown>
Parameters
signer
method
string
dto
T
Returns
Promise<SignedDto<T>>
Throws
GalaSDKError SIGNING_FAILED, or the SDK error the signer itself threw.