TYPESCRIPT SDK · SPECIFICATION REFERENCE
SDK API Reference
Detailed technical documentation for the @pumpsui/token-creator-sdk client library.
Package Installation
NPM v2.4+npm install @pumpsui/token-creator-sdk @mysten/sui @mysten/dapp-kitClass: PumpSuiTokenCreatorSDK
Main client singleton instance managing endpoint requests, gas budgets, and Move PTB generation.
constructor(apiKey, config)
Instantiatornew PumpSuiTokenCreatorSDK(
apiKey: string,
config: {
developerWallet: string;
developerFee: number;
network?: 'mainnet' | 'testnet';
apiEndpoint?: string;
}
)createNativeToken(params): Promise<TokenCreationResult>
Async MethodCompiles and publishes Move bytecode for a new Coin<T> standard token:
interface TokenCreationParams {
name: string; // e.g. "Alpha Protocol"
symbol: string; // e.g. "ALPHA"
decimals: number; // Standard: 9 or 6
totalSupply: number; // e.g. 1_000_000_000
description: string; // Metadata summary
userAddress: string; // Connected wallet receiving TreasuryCap & supply
icon?: string; // Walrus / IPFS URL
}
interface TokenCreationResult {
packageId: string; // Move package object ID
treasuryCap: string; // Owned TreasuryCap<T> object ID
coinMetadata: string; // Shared CoinMetadata<T> object ID
digest: string; // PTB execution transaction digest
totalFee: number; // Total SUI deducted
}estimateFees(): FeeEstimate
HelperReturns the live breakdown of platform, developer, and validator gas fees:
interface FeeEstimate {
platformFee: number; // 2.0 SUI
developerFee: number; // Your configured DEV_FEE
networkFee: number; // ~0.015 SUI
total: number; // Sum in SUI
}Exported Utility Functions
Precision unit conversion and validation helpers.
suiToMist(sui: number): bigint
Converts whole SUI to 10^9 MIST precision units.
mistToSui(mist: bigint): number
Converts MIST integers to human-readable SUI decimals.
validateAPIKey(key: string): boolean
Verifies cryptographic prefix and character length.
uploadToWalrus(file: File): Promise<string>
Pins decentralized image blobs directly to Walrus Epoch 42+.
Inspect Complete Code Examples
Ready to review production snippets? Check our full React and Node.js examples.