Message passing

Zether Bridge facilitates secure and efficient cross-chain communication between diverse blockchain networks, utilizing zero-knowledge proof (ZKP) technology and a suite of APIs tailored for interoperability. This guide offers an insight into the process of cross-chain message passing with Zether Bridge. Experience our cross-chain messaging functionality firsthand on Zether Bridge.

Overview

For transmitting messages across distinct chains, Zether Bridge leverages the SendAPI and ReceiveAPI interfaces in conjunction with the block header relay network. These elements collectively guarantee the security and effectiveness of cross-chain communication.

Cross-Chain Message Passing Process

The following steps outline the process of passing messages across chains using Zether Bridge:

1. Prepare the message payload

On the sender chain, prepare the message payload, which typically contains information such as the destination address, destination chain, and any other custom data that needs to be transmitted.

2. Send the message using Zether Bridge entrypoint

Utilize the Zether Bridge entrypoint interface to send the message to the destination chain. Call the send function, providing the necessary parameters such as the destination chain ID, destination address, and message payload.

3. Generate and verify zkProof

The block header relay network generates a zkProof for the sender chain's block header, which is then verified by the updater contract on the receiver chain. This process ensures the integrity and security of the cross-chain communication.

4. Receive and process the message using Zether Bridge receiver API

On the destination chain, use the Zether Bridge receiver interface to receive and process the message. Call theReceive function, providing the source chain ID, source block hash, and zkProof. These functions return the decoded payload, allowing you to process the cross-chain message according to your application's requirements.

Last updated