bitoftrade docs
  • 👋Welcome to the bitoftrade docs!
  • 🤖bitoftrade intro
  • 📨Contact Us
  • For traders
    • ✅Cross-Chain Swaps
      • How it works
        • Liquidity providers & validators
        • Security
      • User Guide
    • 🔄Trading platform
      • Features
        • Leverage trading
        • Token swaps
        • Buy crypto with fiat
        • Market screener
      • Quick start
        • How do I swap tokens on bitoftrade?
        • How to buy crypto with fiat?
        • How to trade with leverage on bitoftrade?
        • How to use the Markets page?
        • How to place limit order?
      • Fees
      • FAQ
  • For businesses
    • 🛒AllPay Widget
      • Use cases
        • Token Owners
        • Personal Exchange
        • Creators
        • GameFi, Metaverse
        • Crypto Payments (soon)
      • Quick start
        • Customization Panel
        • Swap and Sale Integration
        • NFT Widget Integration
          • NFT Listing
          • Code Integration
      • FAQ
  • For developers
    • 🔀Cross-Chain Messaging Protocol
      • How it works
        • Signer Service
          • Event Hash
          • Signer interface
        • Signers Registry Contract
      • Quick start
        • Emit event
        • Verify event
        • Receive event
      • Smart contracts
      • Advanced
        • Threshold Signature
        • Hosted TSS signer
      • Security
      • FAQ
  • Guides
    • 📚General
      • How to download and connect MetaMask for desktop?
      • How do I download and connect MetaMask for mobile?
      • How do I import ERC20 tokens to MetaMask?
      • How do I manage my funds in a volatile market?
      • How to invest in cryptocurrency
    • ⛓️Polygon
      • How to swap on the Polygon network
      • How to bridge my Polygon tokens
      • How to add Polygon to my MetaMask
    • ⛓️Binance Smart Chain
      • How to bridge my BSC tokens
      • How to swap on the BSC network
      • How to add BSC to my MetaMask
    • ⛓️Fantom
      • How to bridge my Fantom tokens
      • How to swap on the Fantom network
      • How to add Fantom to my MetaMask
    • ⛓️Avalanche
      • How to bridge my Avalanche tokens
      • How to swap on the Avalanche network
      • How to add Avalanche to my MetaMask
Powered by GitBook
On this page
  1. For developers
  2. Cross-Chain Messaging Protocol
  3. Quick start

Verify event

PreviousEmit eventNextReceive event

Last updated 2 years ago

After the event was emitted, the next step is to receive proof of the event. Signer is responsible to create a signature as proof of the event.

Create POST /sign-event to the Signer.

For our example, the request body would be:

{
  "chainId": 1,
  "txHash": "0x9f89aae86d1b69cf63065bfc9f30478b6dc613b4655a857bc115a1275604b88c",
  "abi": {
    "anonymous": false,
    "inputs": [
        {
            "indexed": false,
            "name": "message",
            "type": "string"
        }
    ],
    "name": "MyMessage",
    "type": "event"
  }
}

As a result of the request, we receive the following object:

{
  "chainId": 1,
  "txHash": "0x9f89aae86d1b69cf63065bfc9f30478b6dc613b4655a857bc115a1275604b88c",
  "eventHash": "0x32b5aaa307499c5f926182bcb425d152e9d17e0c38ad46aecfc8b3007005221d",
  "signature": "0xc7067dbae67fe37d68945b4d32d636c02590d4e0da3dcd87616356178afc3d6b048ea054954bce2e5d2d853e379bc4f8fc16f6c0cb68de50cee844407806e09a1b",
  "signer": "0x86f3b7f305f9d02e243a28445a15ecb6eeb12288",
  "params": [
    "MyMessage",
    1,
    "0x1170490264E8c604E0D0861B76768A9e9a300b02",
    "0x9f89aae86d1b69cf63065bfc9f30478b6dc613b4655a857bc115a1275604b88c",
    "Hello World"
  ]
}

The signature is created, therefore we can move to the last step.

🔀
request