@sinai-standard/sdk
v0.2.0
Published
Sinai Standard TypeScript SDK for compliant Token-2022 tokens
Readme
@sinai-standard/sdk
TypeScript SDK for issuing and managing regulated tokens on Solana using Token-2022 Transfer Hooks.
Install
npm install @sinai-standard/sdkQuick Start
import { AksumKit } from "@sinai-standard/sdk";
import { Connection, Keypair } from "@solana/web3.js";
import { AnchorProvider, Wallet } from "@coral-xyz/anchor";
const connection = new Connection("https://api.devnet.solana.com");
const provider = new AnchorProvider(connection, new Wallet(keypair), {});
const kit = new AksumKit(provider);
const { mint, tokenHandle } = await kit.createToken({
name: "RegToken",
symbol: "REG",
decimals: 9,
supply: 1_000_000,
hooks: {
allowlist: { mode: "allowlist" },
tax: { bps: 150, maxBps: 1000, vault: taxVault.publicKey },
holdPeriod: { seconds: 86400 },
},
});Classes
| Class | Description |
|-------|-------------|
| AksumKit | Main entry point — creates tokens with compliance hooks in a single call |
| TokenHandle | Returned from createToken(), provides access to all managers for a specific mint |
| AllowlistManager | Add/remove wallets, toggle mode, check status |
| TaxManager | Configure tax BPS, manage exempt wallets, collect tax |
| HoldPeriodManager | Set hold periods, check wallet unlock times |
| RouterManager | Initialize and configure the multi-hook router |
| MaxBalanceManager | Set per-wallet balance caps |
| ConfidentialTransferManager | ElGamal-encrypted transfers with auditor support |
PDA Helpers
import {
getAllowlistPDA,
getTaxConfigPDA,
getHoldConfigPDA,
getRouterConfigPDA,
getMaxBalanceConfigPDA,
getExtraAccountMetasPDA,
} from "@sinai-standard/sdk";On-Chain Programs
Six Anchor programs deployed on devnet:
| Program | ID |
|---------|-----|
| Allowlist Hook | Bo3Rd8qZeuxU1cmtCqKEFPRe5Uumx9tusjZ7B1hXtPgc |
| Tax Hook | ACJXvcH4uaBfBwSwcVG48zJ177ydEvtCqGRMKXv53goZ |
| Hold Hook | 8HkukxWoo27BnNwqCzCim4ueKaGEfqLW4LdSZkHkCWzS |
| Router Hook | HHnt7Hfnp2fDftFNCFPqEhebgXGizuqubXqhiEi8C1of |
| Token Factory | VXQL8u4NVUYG1zaejujwh5gr21iinmk4yYCXn1g9TXr |
| Max Balance Hook | Ctx9ZtNzPFYyjqxdZSMYLgHdqNNpAS61G6ok1dYVBHWi |
Docs
Full API reference and guides at docs.sinaistandard.org
License
ISC
