zkBridge
  • Polyhedra Network
  • zkBridge: Trustless Cross-chain Bridges Made Practical
    • Introducing zkBridge protocol
    • Block header relay network
    • Updater contract
    • Proof systems of zkBridge
    • zkBridge Research Paper
  • zkLightClient Overview
    • Introduction
    • zkLightClient on LayerZero ​
  • LayerZero zkLightClient Configurations
    • LayerZero V1 zkLightClient Oracle Addresses
    • LayerZero V2 zkLightClient DVN Addresses
    • LayerZero UA Configuration
  • Proving Ethereum Full PoS Consensus in ZK
    • Overview
    • Why Proving Ethereum full consensus?
    • System design for proving Ethereum full consensus
    • Efficient proof system for proving Ethereum full consensus
    • Performance evaluation
    • Concluding remarks
  • Application Use Cases
    • NFT transfer
    • Message passing
  • Tutorial
    • Import and transfer NFTs
  • Code Examples
    • Deploying Cross-chain NFTs
      • Cross-chain ERC-721
      • Cross-chain ERC-1155
Powered by GitBook
On this page
  • Overview
  • Cross-Chain Message Passing Process
  1. Application Use Cases

Message passing

PreviousNFT transferNextImport and transfer NFTs

Last updated 1 year ago

zkBridge enables secure and efficient cross-chain message passing between different blockchain networks, leveraging zero-knowledge proof (ZKP) technology and a set of APIs designed to facilitate interoperable communication. This document provides an overview of the cross-chain message passing process using zkBridge. You can try out our function on zkBridge.

Overview

To pass messages across different chains, zkBridge uses the SendAPI and ReceiveAPI interfaces, along with the block header relay network. These components ensure secure and efficient cross-chain communication.

Cross-Chain Message Passing Process

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

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 zkBridge entrypoint

Utilize the zkBridge 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 zkBridge receiver API

On the destination chain, use the zkBridge receiver interface to receive and process the message. Call thezkReceive 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.

cross-chain messaging