AksumKit
Main entry point for the Sinai Standard SDK — token creation and management
Import
Constructor
| Parameter | Type | Description |
|---|---|---|
config.connection | Connection | Solana RPC connection |
config.payer | Keypair | Keypair that signs and pays for transactions |
config.programIds | Partial<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:
- Creates mint account with MetadataPointer, TransferHook, and PermanentDelegate extensions
- Creates issuer ATA and mints initial supply
Parameters:
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.
| Parameter | Type | Description |
|---|---|---|
mint | PublicKey | Keypair | The token mint |
hookProgramId | PublicKey | Optional hook program ID |
Returns: TokenHandle
TokenHandle
Handle for operating on a specific token. Returned by createToken() and getToken().
Properties
| Property | Type | Description |
|---|---|---|
mint | PublicKey | The token mint address |
hookProgramId | PublicKey | null | The 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.
| Parameter | Type | Description |
|---|---|---|
source | PublicKey | Source token account |
destination | PublicKey | Destination token account |
owner | Keypair | Source account owner (signer) |
amount | bigint | number | Amount in base units |
decimals | number | Token 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