Signer interface

Each Signer implements an interface.

Metadata

Get Signer metadata

GET https://api-ccmp.bitoftrade.com/metadata

{
  "name": "signer_name",
  "availableChains": [1, 56, 137],
  "signer": "0x86f3b7f305f9d02e243a28445a15ecb6eeb12288"
}

GET /metadata the endpoint returns an object with the following type:

{
  "name": "signer_name",
  "availableChains": [1, 56, 137],
  "signer": "0x86f3b7f305f9d02e243a28445a15ecb6eeb12288"
}

Where:

  • name is the human-recognizable name of the signer

  • availableChains is the list of supported chains

  • signer is the address which is used to sign messages

Sign event

Get proof of the event

POST https://api-ccmp.bitoftrade.com/sign-event

Request Body

Name
Type
Description

chainId*

Number

Chain id of the event

txHash*

String

Transaction hash of the event

abi*

Object

ABI of the event

POST /sign-event the endpoint which is used to get proof of the event.

This endpoint requires a request body with the following type:

Where:

  • chainId and txHash are from the transaction that has the event,

  • abi is the ABI of the event

  • 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:

Where:

  • eventHash - hash of the event

  • signature - is signed eventHash by the signer

  • params - list of the params, eventId and eventArgs

Last updated