UNPKG

@gorbchain-xyz/chaindecode

Version:

GorbchainSDK V1.3+ - Complete Solana development toolkit with advanced cryptography, messaging, and collaboration features. Build secure applications with blockchain, DeFi, and end-to-end encryption.

55 lines (54 loc) 1.38 kB
import type { DecodedInstruction } from './registry.js'; interface SPLTokenInstructionData { programId: string; data: Uint8Array; accounts: string[]; } export declare enum SPLTokenInstruction { InitializeMint = 0, InitializeAccount = 1, InitializeMultisig = 2, Transfer = 3, Approve = 4, Revoke = 5, SetAuthority = 6, MintTo = 7, Burn = 8, CloseAccount = 9, FreezeAccount = 10, ThawAccount = 11, TransferChecked = 12, ApproveChecked = 13, MintToChecked = 14, BurnChecked = 15, InitializeAccount2 = 16, SyncNative = 17, InitializeAccount3 = 18, InitializeMultisig2 = 19, InitializeMint2 = 20 } export declare enum AuthorityType { MintTokens = 0, FreezeAccount = 1, AccountOwner = 2, CloseAccount = 3 } /** * Main SPL Token decoder function */ export declare function decodeSPLTokenInstruction(instruction: SPLTokenInstructionData): DecodedInstruction; /** * Enhanced SPL Token instruction decoder with amount extraction */ export declare function decodeSPLTokenInstructionWithDetails(data: Uint8Array): { type: string; instruction: string; amount?: bigint; decimals?: number; accounts: unknown[]; }; /** * Decode base58 instruction data to Uint8Array */ export declare function decodeInstructionData(base58Data: string): Uint8Array; export {};