Cross Chain Messaging Protocol consists of 3 steps:
- Emit event on the SRC chain
- Verify the event and get proof from the Signer
- Receive the event on the DEST chain
Signer Service is responsible for producing proofs, whereas Signers Registry smart contract is responsible for validation if proof was made by the correct Signer.
Signer service is used to verify specific events. By request the service produces the proof for events. Proof of the event is a signature created by the signer's address.
Under the hood, Signer could implement any protocol to sign messages.
After the signature was generated, it could be used on your smart contract to verify the event. After successful verification, you could trust this event and do your dApp logic.
You could also interact with our public Signer.
eventHashis calculated from the
eventIdis the event params combined together to create a unique id.
EventName- the name of the event
EventChainId- chainId of the transaction with invoked event
EventContract- a contract that invoked the event
EventTransactionHash- hash of the transaction with invoked event
EventArgsis the event's arguments. All event arguments will be combined in the same order as they were in the event.
For example, for this
Each Signer implements an interface.
GET /metadatathe endpoint returns an object with the following type:
nameis the human-recognizable name of the signer
availableChainsis the list of supported chains
signeris the address which is used to sign messages
POST /sign-eventthe endpoint which is used to get proof of the event.
This endpoint requires a request body with the following type:
txHashare from the transaction that has the
eventLogIndex(optional) - parameter that specifies the log index for the event. By default, the first event-matched ABI will be selected.
The response body will have the following type:
signature- is signed eventHash by the
params- list of the params,
Signers Registry Contract
Signers Registry contract is used by other smart contracts to verify if the signature was created by the whitelisted signer. This smart contract has to be deployed on each supported chain.
Signers Registry implements this interface:
The signer could be
Anyone can use the
publicsigner for supported chains.
Privatesigner could be used for specific dApps, chains, etc. Such signers are restricted and closed for the community. Contact us if you want to implement a private signer.