SINAI STANDARD

AksumKit

Main entry point for the Sinai Standard SDK — token creation and management

Import

import { AksumKit } from "@sinai-standard/sdk";

Constructor

new AksumKit(config: AksumKitConfig)
ParameterTypeDescription
config.connectionConnectionSolana RPC connection
config.payerKeypairKeypair that signs and pays for transactions
config.programIdsPartial<typeof PROGRAM_IDS>Optional overrides for program IDs

Methods

createToken(params)

Creates a Token-2022 mint with compliance extensions. Handles the multi-transaction flow automatically:

  1. Creates mint account with MetadataPointer, TransferHook, and PermanentDelegate extensions
  2. Creates issuer ATA and mints initial supply
const token = await kit.createToken({
  name: "Dubai Real Estate Fund I",
  symbol: "DREF1",
  decimals: 6,
  supply: 10_000_000,
  hooks: {
    allowlist: { mode: "allowlist" },
    tax: { bps: 150, maxBps: 500, vault: taxWalletPubkey },
  },
});

Parameters:

interface TokenCreateParams {
  name: string;           // Token name
  symbol: string;         // Token symbol
  uri?: string;           // Metadata URI
  decimals: number;       // Decimal places (typically 6)
  supply: bigint | number; // Initial supply (0 to skip minting)
  hooks?: {
    allowlist?: { mode: AllowlistMode };          // "allowlist" | "denylist"
    tax?: { bps: number; maxBps: number; vault: PublicKey };
    holdPeriod?: { seconds: number };
  };
}

Hook selection logic:

  • 0 hooks: No TransferHook extension
  • 1 hook: Points directly to that hook program
  • 2+ hooks: Points to the Router Hook program

Returns: Promise<TokenHandle>

getToken(mint, hookProgramId?)

Returns a TokenHandle for an existing token.

ParameterTypeDescription
mintPublicKey | KeypairThe token mint
hookProgramIdPublicKeyOptional hook program ID

Returns: TokenHandle

TokenHandle

Handle for operating on a specific token. Returned by createToken() and getToken().

Properties

PropertyTypeDescription
mintPublicKeyThe token mint address
hookProgramIdPublicKey | nullThe attached hook program, if any

Methods

getIssuerATA()

Returns the issuer's associated token account address.

getATA(owner)

Returns the ATA address for any wallet.

createATA(owner)

Creates an ATA for a wallet. Returns the ATA address.

transfer(source, destination, owner, amount, decimals)

Transfers tokens with automatic hook account resolution via createTransferCheckedWithTransferHookInstruction.

ParameterTypeDescription
sourcePublicKeySource token account
destinationPublicKeyDestination token account
ownerKeypairSource account owner (signer)
amountbigint | numberAmount in base units
decimalsnumberToken decimals

Returns: Promise<string> — transaction signature

mintTo(destination, amount)

Mints additional tokens to a destination token account. Caller must be the mint authority.

Returns: Promise<string> — transaction signature

On this page