bridge/functions/buildBridgeOutPayload.md
buildBridgeOutPayload(
dto,config):Promise<SignedBridgeOutPayload>
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)
signed bridge out payload
Parameters
| Parameter | Type | Description |
|---|---|---|
dto | BridgeRequestDto | Bridge request (a uniqueKey is generated when it has none) |
config | BuildBridgeOutPayloadConfig | The signer |
bridge request dto unique key build out payload config
Returns
Promise<SignedBridgeOutPayload>
The payload for GalaConnectClient.requestBridgeOut
signed bridge out payload gala connect client request
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)
invalid bridge option destination chain id csprng unavailable get random values signing failed sign out