Function: buildBridgeOutPayload()
GalaChain core SDK 1.0.0-rc.8 / bridge / buildBridgeOutPayload
Function: buildBridgeOutPayload()
buildBridgeOutPayload(
dto,config):Promise<SignedBridgeOutPayload>
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2556
Build an EIP-712 signed bridge out payload.
The payload is signed using EIP-712 typed data signing and includes:
- The message to be signed
- The EIP-712 signature
- The typed data types and domain for verification
- An Ethereum signed message
prefixover the deterministic JSON of the typed data (its number is the UTF-16 length of that string, as launchpad-sdk always sent it; the typed-data hash does not cover it)
Parameters
dto
Bridge request (a uniqueKey is generated when it has none)
config
The signer
Returns
Promise<SignedBridgeOutPayload>
The payload for GalaConnectClient.requestBridgeOut
Throws
GalaSDKError INVALID_BRIDGE_OPTION (destinationChainId) for a chain id that is not a
positive integer; CSPRNG_UNAVAILABLE when a key must be generated and the platform has no
crypto.getRandomValues; SIGNING_FAILED when the signer fails (see signBridgeOut)