The Unified Interface for the MultiChain

Hyperbridge unifies the multichain, presenting developers with familiar yet powerful APIs for building mission-critical cross-chain protocols that are not only secure and resilient but also light on costs.

The Most Advanced MultiChain SDK

  • 1pragma solidity 0.8.17;
  • 2
  • 3function send(CrossChainMessage memory params) public payable {
  • 4 DispatchPost memory request = DispatchPost({
  • 5 body: params.message, // Serialized message
  • 6 dest: params.dest, // Destination chain
  • 7 timeout: params.timeout, // TTL for request
  • 8 to: abi.encodePacked(address(this)), // Receiving contract
  • 9 fee: params.relayerFee, // Fee offered to relayers
  • 10 payer: address(this) // Relayer fee refund address
  • 11 });
  • 12
  • 13 bytes32 commitment = IDispatcher(host()).dispatch{value: msg.value}(request);
  • 14 emit MessageDispatched(commitment);
  • 15}
  • 16

Cross-chain Messages Authenticated by Committees Proofs

Hyperbridge authenticates all cross-chain messages using a combination of finality and state proofs before dispatching them to their intended destinations.

MultiChain State,
at Your Fingertips

Hyperbridge provides developers with the neccessary APIs to easily query any account or contract storage slot from any chain, verified by state proofs

  • 1pragma solidity 0.8.17;
  • 2
  • 3contract YourContract extends BaseIsmpModule {
  • 4 function read(ReadParams memory params) public payable {
  • 5 DispatchGet memory request = DispatchGet({
  • 6 dest: params.dest, // The chain to read
  • 7 height: params.height, // The height to read
  • 8 keys: params.keys, // Keys to read
  • 9 timeout: params.timeoutTimestamp, // TTL for request
  • 10 context: params.context, // Session-specific metadata
  • 11 fee: params.fee // Fee for processing this read
  • 12 });
  • 13 bytes32 commitment = IDispatcher(host()).dispatch{value: msg.value}(request);
  • 14 emit StateRequested(commitment);
  • 15 }
  • 16
  • 17 function onGetResponse(IncomingGetResponse memory response) external onlyIsmpHost {
  • 18 // do something useful with the requested storage items
  • 19 emit GetResponseReceived(response.response.values);
  • 20 }
  • 21}
  • 1pragma solidity 0.8.17;
  • 2
  • 3 contract YourContract extends BaseIsmpModule {
  • 4 function onGetTimeout(GetRequest memory) external onlyIsmpHost {
  • 5 // Your request was unable to be processed likely as a result of
  • 6 // a liveness failure of the destination chain. Revert any state
  • 7 // changes you made prior to dispatching the request here
  • 8 }
  • 9
  • 10 function onPostRequestTimeout(PostRequest memory) external onlyIsmpHost {
  • 11 // Your request was unable to be processed, likely as a result
  • 12 // of a liveness failure of the destination chain or a revert
  • 13 // by the recipient contract. Revert any state changes you made
  • 14 // prior to dispatching the request here
  • 15 }
  • 16}

Handle Failures
Gracefully

Through its use of state proofs, Hyperbridge ensures that cross-chain messages are either successfully delivered and executed, or the sending application receives a timeout message. This gives developers more control over reverts and liveness failures.

Pay In Stablecoins

Hyperbridge fees are charged based on the size of cross-chain messages and are priced in stablecoins for predictable cross-chain costs.

Build Secure MultiChain Protocols Today

Hyperbridge enables developers to build mission-critical cross-chain applications
that were never before possible