Skip to main content
Version: 1.10.3

Function: encodeMessageV1()

encodeMessageV1(message: MessageV1): string

Defined in: evm/messageCodec.ts:121

Encode a MessageV1 candidate to its wire bytes, byte-for-byte matching MessageV1Codec._encodeMessageV1: a 69-byte static header (uint8 version 1, uint64 selectors and message number, uint32 gas limits, bytes4 finality, bytes32 ccvAndExecutorHash) followed by the variable fields, each prefixed by its byte length (uint8 for the four address fields, uint16 for destBlob/tokenTransfer/data). The token transfer is present iff its encoded length is non-zero.

Parameters

ParameterType
messageMessageV1

Returns

string