@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.
43 lines (42 loc) • 1.05 kB
TypeScript
/**
* System program instruction types
*/
export declare enum SystemInstructionType {
CreateAccount = 0,
Assign = 1,
Transfer = 2,
CreateAccountWithSeed = 3,
AdvanceNonceAccount = 4,
WithdrawNonceAccount = 5,
InitializeNonceAccount = 6,
AuthorizeNonceAccount = 7,
Allocate = 8,
AllocateWithSeed = 9,
AssignWithSeed = 10,
TransferWithSeed = 11,
UpgradeNonceAccount = 12
}
/**
* Decoded system instruction interface
*/
export interface DecodedSystemInstruction {
type: string;
instruction: string;
lamports?: bigint;
space?: bigint;
seed?: string;
programId: string;
accounts: string[];
}
/**
* Decode system program instruction from raw data
*/
export declare function decodeSystemInstruction(data: Uint8Array): DecodedSystemInstruction;
/**
* Helper function to format lamports as SOL
*/
export declare function lamportsToSol(lamports: bigint): string;
/**
* Helper function to format bytes with units
*/
export declare function formatBytes(bytes: bigint): string;