Links
Comment on page

Off-chain SDK

Introduction

The Clique Attestations SDK allows developers to interact with the Clique protocol for verifying and validating various types of attestations, such as social media accounts, addresses, and more. This documentation provides an overview of how to integrate the SDK into your applications and utilize its functionalities effectively.

Getting Started

To get started with the Clique Attestations SDK, follow the steps below:

Installation

Install the SDK using the following command:
yarn add @cliqueofficial/clique-attestations-sdk

Initialization

Initialize the SDK with your API key and secret:
import {
CliqueAttestationsClient,
Environment,
} from '@cliqueofficial/clique-attestations-sdk';
const apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
const client = new CliqueAttestationsClient({
apiKey,
apiSecret,
env: Environment.Test,
});

Usage

Utilize the SDK to interact with the Clique issuers for various attestations:

Search Attestations

Use the search method to retrieve attestations based on specific parameters:
const result = await client.attestations.search({
address: '0xabb6f465a1931025c74b092d165968639dcd05c2',
network: 'Optimism',
platform: 'Twitter',
issuer: '0xd34a8775d06d41b36054d59ef2d09a79b7aa1fa2',
pagination: { pageIndex: 1, pageSize: 3 },
});

Conclusion

The Clique Attestations SDK provides a powerful set of tools for managing attestations issued by Clique on protocols from various networks. Explore the full capabilities of the SDK to enhance the verification process for various types of attestations.