pub trait BridgeMessageEncoding {
// Required methods
fn as_bytes(&self) -> Vec<u8> ⓘ;
fn as_payload_bytes(&self) -> Vec<u8> ⓘ;
}
Expand description
Encoded bridge message consists of the following fields:
- Message type (1 byte)
- Message version (1 byte)
- Nonce (8 bytes in big endian)
- Chain id (1 byte)
- Payload (variable length)
Required Methods§
Sourcefn as_payload_bytes(&self) -> Vec<u8> ⓘ
fn as_payload_bytes(&self) -> Vec<u8> ⓘ
Convert the payload piece to bytes