SDK & Integration

JavaScript SDK

The Soltag SDK provides convenience wrappers around program calls and read APIs. It handles PDA derivation and transaction instruction building.

bash
npm install @soltag/sdk
typescript
import { SoltagClient } from "@soltag/sdk";

const client = new SoltagClient({
  connection: myConnection,
  wallet: myWallet
});

// Fetch all tags for BONK
const tags = await client.getTags("DezXAZ8z7Pnrn9kvJdVJJ6uA4ri3SkDPMcq67axK5rF");
console.log(tags);

Key methods:

  • getTags(assetAddress): Fetch all tags for a given asset.
  • createTag(assetAddress, data): Build a transaction to tag an asset.
  • verifyTag(tagId): Sign a verification instruction (requires authority).

API Reference

For use cases that require aggregation or historical data, we provide a REST API.

GET /api/tags?asset=ADDRESS

json
{
  "asset": "So11111111111111111111111111111111111111112",
  "tags": [
    {
      "label": "Token",
      "verified": true,
      "category": "Defi"
    }
  ]
}

Rate limits apply to public endpoints.