Attestations

Single Attestation

POST / graphql;

Retrieve the data of an attestation by querying with an attestation ID.

Body Parameters:

query getAttestation {
  attestation(id: "onchain_evm_80001_0x1") {
    # Write your query or mutation here
    attestationId
    attester
    attestTimestamp
    linkedAttestation
    chainId
    chainType
    data
    dataLocation
    transactionHash
    revokeTransactionHash
    id
    indexingValue
    mode
    recipients
    revoked
    revokeReason
    revokeTimestamp
    schema {
      id
      name
      registrant
    }
    validUntil
  }
}

Response:

{
  "data": {
    "attestation": {
      "attestationId": "0x1",
      "attester": "0x9854E76134e6D729A633CED51042fF653f04f4C5",
      "attestTimestamp": 1705455448,
      "linkedAttestation": "",
      "chainId": "80001",
      "chainType": "evm",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033232320000000000000000000000000000000000000000000000000000000000",
      "dataLocation": "ONCHAIN",
      "transactionHash": "0x00ecb7e8c6d3ae6d0fab2432c1e7ccc3f1128716839c04b5b4a51457e9ce6eff",
      "revokeTransactionHash": "",
      "id": "onchain_evm_80001_0x1",
      "indexingValue": "",
      "mode": "onchain",
      "recipients": [],
      "revoked": false,
      "revokeReason": null,
      "revokeTimestamp": null,
      "schema": {
        "id": "onchain_evm_80001_0x1",
        "name": "xxx",
        "registrant": "0x9854E76134e6D729A633CED51042fF653f04f4C5"
      },
      "validUntil": 0
    }
  }
}

Filtered Attestations

POST / graphql;

Query for a list of attestations. Results can be filtered, paginated, ordered, etc. according to GraphQL standards.

Body Parameters:

query queryAttestations {
  pagedAttestations(page: 1) {
    total
    attestations {
      attestationId
      attester
      attestTimestamp
      linkedAttestation
      chainId
      chainType
      data
      dataLocation
      transactionHash
      revokeTransactionHash
      id
      indexingValue
      mode
      recipients
      revoked
      revokeReason
      revokeTimestamp
      schema {
        id
        schemaId
        name
        registrant
        data
      }
      validUntil
    }
  }
}

Response:

{
    "data": {
        "pagedAttestations": {
            "total": 52,
            "attestations": [
                {
                    "attestationId": "0x21",
                    "attester": "0x9854E76134e6D729A633CED51042fF653f04f4C5",
                    "attestTimestamp": 1706065910,
                    "linkedAttestation": "",
                    "chainId": "80001",
                    "chainType": "evm",
                    "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033232320000000000000000000000000000000000000000000000000000000000",
                    "dataLocation": "ONCHAIN",
                    "transactionHash": "0x0f0fb01c520add97a74d6125729053559c7cffb96a5f5871118b766e9a3ddbb7",
                    "revokeTransactionHash": "0x2e0cda7c6222190c5065df8c8164ee26aec6132c98320733b2775c923fcca634",
                    "id": "onchain_evm_80001_0x21",
                    "indexingValue": "0x059e6B8008d34aC26581fD3ED8378AA93c7941EE",
                    "mode": "onchain",
                    "recipients": [],
                    "revoked": true,
                    "revokeReason": "test revoke",
                    "revokeTimestamp": 1706065942,
                    "schema": {
                        "id": "onchain_evm_80001_0x1",
                        "schemaId": "0x1",
                        "name": "xxx",
                        "registrant": "0x9854E76134e6D729A633CED51042fF653f04f4C5",
                        "data": "[{\"name\":\"name\",\"type\":\"string\"}]"
                    },
                    "validUntil": 0
                },
                ...
            ]
        }
    }
}

Last updated

Logo

Copyright Sign 2021-2024