TagwiseTagwiseDevnet

Quickstart

Install @tagwise/tip-sdk and resolve your first tag in under 5 minutes.

Get up and running with the Tagwise Identity Protocol (TIP) SDK in TypeScript/JavaScript.


1. Installation

Install @tagwise/tip-sdk using your preferred package manager:

pnpm add @tagwise/tip-sdk

2. Initialize TipClient

Create a client instance. No API keys or mandatory arguments are required for read operations:

import { TipClient } from "@tagwise/tip-sdk";

// Zero-config: defaults to public API (https://tip.tagwise.me)
const client = new TipClient();

3. Resolve a Tag to a Wallet

Resolve a handle (e.g. @alice) to its active destination payment wallet address and off-chain profile:

import { TipClient, TagNotFoundError } from "@tagwise/tip-sdk";

const client = new TipClient();

try {
  const result = await client.resolve("alice");

  console.log("Tag:", result.tag);                 // "@alice"
  console.log("Payment Wallet:", result.wallet);  // "8L2Z3nSXbwoFhK9x9BEs6b1qhF6xEcNJ7T4NqmiWaeuf"
  console.log("Display Name:", result.displayName); // "Alice Smith"
  console.log("Payment Link:", result.paymentLink); // "https://tagwise.me/pay/@alice"
} catch (error) {
  if (error instanceof TagNotFoundError) {
    console.log("Tag @alice has not been registered yet.");
  } else {
    console.error("Failed to resolve tag:", error);
  }
}

4. Check Tag Availability

Check if a handle is available for registration:

const status = await client.availability("my_awesome_tag");

if (status.available) {
  console.log(`@${status.tag} is available to register!`);
} else {
  console.log(`Unavailable. Reason: ${status.reason}`); // "taken" | "invalid" | "reserved"
}

5. Direct On-Chain Fallback (No API Required)

For maximum resilience, pass an rpcUrl to resolve tags straight from Solana RPC accounts without touching centralized API services:

const client = new TipClient({
  rpcUrl: "https://api.devnet.solana.com",
});

// Queries Solana account data directly
const onChainData = await client.resolveOnChain("alice");

if (onChainData) {
  console.log("On-Chain Owner:", onChainData.owner);
  console.log("On-Chain Payment Wallet:", onChainData.wallet);
}

Next Steps

  • Explore Integration Guides for tag registration, profile management, and wallet authentication.
  • Browse the complete SDK Reference for detailed API method signatures and types.

On this page