Data Sources

Clique Attestors des use Data Sources to fetch user data as the first process of issuing attestations on chain.

Providing a data source requires setting up an API endpoint that returns user data in JSON format. The Issuer Node can then process the JSON before issuing the attestations onchain.

Providing a Data Source

  1. Begin by establishing an API endpoint that utilizes the GET method.

  2. Ensure that the endpoint includes a mandatory query parameter named "address," which is used to specify the user data to be retrieved.

  3. Add an optional query parameter, "authToken," which serves as an authentication token to provide special authorized access for cases where the data should not be publicly accessible.

With these steps, you will set up a secure and functional API endpoint to serve user-specific data.

GET METHOD
https://clique.test.api?address={userAddress}?authToken{authenticationToken
{
  "code": 200,
  "msg": "success",
  "timestamp": "2024-01-25T12:00:00Z",
  "data": [
    {
      "fieldName": "exampleField1",
      "value": 123,
      "valueType": "integer"
    },
    {
      "fieldName": "exampleField2",
      "value": true,
      "valueType": "bool"
    },
    {
      "fieldName": "exampleField3",
      "value": "exampleString",
      "valueType": "string"
    }
    // ... additional objects can be added here
  ]
}

Last updated