Skip to main content
⚠️ Note: This function is not yet implemented.
Will retrieve information about a token using its ID.
async function getToken(tokenId: string): Promise<any>

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `tokenId` | `string` | Token's unique identifier |

Returns

Promise<any>; // Most probably a call to Electrs to get information about the announcement transaction

Planned Usage

import { getToken } from "@buildonspark/issuer-sdk";

// Get token information
const tokenInfo = await getToken("token_id");

// Expected return format (tentative)
{
  name: string;
  ticker: string;
  maxSupply: bigint;
  currentSupply: bigint;
  decimals: number;
  isFreezeable: boolean;
  issuer: string;
  announcementTx: string;
  createdAt: Date;
}

Implementation Status

This function is currently a placeholder and will throw Error("Not implemented").

Planned Features

  • Retrieve token metadata from announcement
  • Get current circulating supply