Steps to integrate CXID:

Generic integrations are the fastest. We can go live with your integration in 2 weeks.

Before integration:

Integration process:

These rules only apply to the generic integration

Endpoint Specification:

Refer to SLIP-44 for more information.

Request Specification

HTTP GET /endpoint?{params}
CXID-TIMESTAMP: Timestamp (seconds)
CXID-NONCE: random 32 chars (regex: [a-zA-Z0-9-_]{32})
CXID-SIGNATURE: signature (see signature generation section below)

params definition:
  id: username on exchange or other unique user id
  network (optional defaults to Ethereum): slip44 index of the native coin of the network

signature generation pseudocode:
  data type: {timestamp: int64, nonce: string, queryString: string}
  data = timestamp + ':' nonce + ':' queryString
  signature = hmacSha256(data, hs256Key).toHexString()

Response Specification

Success response:

HTTP/1.1 200 OK
Content-Type: application/json
CXID-TIMESTAMP: Timestamp (seconds)
CXID-NONCE: random 32 chars (regex: a-zA-Z0-9-_)
CXID-SIGNATURE: signature (see signature generation section below)

{
  "id": "id from request",
  "network": "network from request" | 60 (if no network in request), ETH MUST be resolved by default
  "validityGuaranty": timestamp (number) 0 for no guaranty (request each time),
  "address": "address"
}

signature generation pseudocode:
  data type: {timestamp: int64, nonce: string, body: string}
  data = timestamp + ':' nonce + ':' queryString
  signature = hmacSha256(data, hs256Key).toHexString()

Any response with a status code that is not equal to 200, or with an invalid signature, or invalid response data will be treated as a failed resolution.

Notice that the response is signed with the ecdsa key. The CXID gateway must be able to validate the response, otherwise the resolution fails.

To test your integration, you can use the resolver client by installing the ens-cli and running it on any name in your namespace.