Socket
Socket
Sign inDemoInstall

@solana/errors

Package Overview
Dependencies
Maintainers
15
Versions
850
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/errors - npm Package Compare versions

Comparing version 2.0.0-experimental.c32f08b to 2.0.0-experimental.c9b2705

dist/types/instruction-error.d.ts

184

dist/cli.js

@@ -16,2 +16,94 @@ // src/cli.ts

var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN = 4615e3;
var SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR = 4615001;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT = 4615002;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA = 4615003;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA = 4615004;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL = 4615005;
var SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS = 4615006;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID = 4615007;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE = 4615008;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED = 4615009;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT = 4615010;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION = 4615011;
var SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID = 4615012;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE = 4615015;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED = 4615016;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX = 4615017;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED = 4615018;
var SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED = 4615019;
var SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED = 4615021;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE = 4615022;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED = 4615023;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 4615024;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
var SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM = 4615026;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR = 4615027;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED = 4615028;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE = 4615029;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID = 4615031;
var SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH = 4615032;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT = 4615033;
var SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED = 4615034;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED = 4615035;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS = 4615036;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC = 4615037;
var SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
var SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION = 4615039;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE = 4615041;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE = 4615042;
var SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE = 4615043;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY = 4615044;
var SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR = 4615045;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT = 4615046;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER = 4615047;
var SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW = 4615048;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR = 4615049;
var SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER = 4615050;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED = 4615052;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
var SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
var SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN = 705e4;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE = 7050001;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE = 7050002;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND = 7050003;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND = 7050004;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE = 7050005;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE = 7050006;
var SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED = 7050007;
var SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND = 7050008;
var SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP = 7050009;
var SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE = 7050010;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX = 7050011;
var SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE = 7050012;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION = 7050013;
var SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE = 7050014;
var SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE = 7050015;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 7050016;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;
var SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION = 7050018;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT = 7050019;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;
var SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS = 7050022;
var SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT = 7050027;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;
var SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION = 7050030;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT = 7050031;
var SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;
var SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED = 7050034;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;
var SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION = 7050036;

@@ -21,2 +113,57 @@ // src/messages.ts

[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
[SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
[SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH]: "Cross-program invocation call depth too deep",
[SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: "custom program error: #$code",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR]: "generic instruction error",
[SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER]: "Provided owner is not allowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE]: "Account is immutable",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY]: "Incorrect authority provided",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER]: "Invalid account owner",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT]: "invalid program argument",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR]: "program returned invalid error code",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA]: "invalid instruction data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC]: "Failed to reallocate account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS]: "Provided seeds do not result in a valid address",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT]: "An account required by the instruction is missing",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: "",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",

@@ -26,2 +173,39 @@ [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",

[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE]: "Account in use",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE]: "Account loaded twice",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND]: "Attempt to debit an account but found no record of a prior credit.",
[SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND]: "Transaction loads an address table account that doesn't exist",
[SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED]: "This transaction has already been processed",
[SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND]: "Blockhash not found",
[SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP]: "Loader call chain is too deep",
[SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE]: "Transactions are currently disabled due to cluster maintenance",
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: "Transaction contains a duplicate instruction ($index) that is not allowed",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE]: "Insufficient funds for fee",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE]: "This account may not be used to pay transaction fees",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX]: "Transaction contains an invalid account reference",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA]: "Transaction loads an address table account with invalid data",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: "Transaction address table lookup uses an invalid index",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: "Transaction loads an address table account with an invalid owner",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION]: "This program may not be used for executing instructions",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT]: "Transaction loads a writable account that cannot be written",
[SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: "Transaction exceeded max loaded accounts data size cap",
[SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE]: "Transaction requires a fee but has no signature present",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND]: "Attempt to load a program that does not exist",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
[SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED]: "ResanitizationNeeded",
[SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE]: "Transaction failed to sanitize accounts offsets correctly",
[SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE]: "Transaction did not pass signature verification",
[SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS]: "Transaction locked too many accounts",
[SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION]: "Sum of account balances before and after transaction do not match",
[SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN]: "The transaction failed with the error `$errorName`",
[SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION]: "Transaction version is unsupported",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: "Transaction would exceed account data limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: "Transaction would exceed total account data limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

@@ -28,0 +212,0 @@ [SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer."

374

dist/index.browser.js

@@ -12,2 +12,94 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN = 4615e3;
var SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR = 4615001;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT = 4615002;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA = 4615003;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA = 4615004;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL = 4615005;
var SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS = 4615006;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID = 4615007;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE = 4615008;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED = 4615009;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT = 4615010;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION = 4615011;
var SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID = 4615012;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE = 4615015;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED = 4615016;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX = 4615017;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED = 4615018;
var SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED = 4615019;
var SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED = 4615021;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE = 4615022;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED = 4615023;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 4615024;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
var SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM = 4615026;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR = 4615027;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED = 4615028;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE = 4615029;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID = 4615031;
var SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH = 4615032;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT = 4615033;
var SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED = 4615034;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED = 4615035;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS = 4615036;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC = 4615037;
var SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
var SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION = 4615039;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE = 4615041;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE = 4615042;
var SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE = 4615043;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY = 4615044;
var SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR = 4615045;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT = 4615046;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER = 4615047;
var SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW = 4615048;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR = 4615049;
var SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER = 4615050;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED = 4615052;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
var SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
var SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN = 705e4;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE = 7050001;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE = 7050002;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND = 7050003;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND = 7050004;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE = 7050005;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE = 7050006;
var SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED = 7050007;
var SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND = 7050008;
var SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP = 7050009;
var SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE = 7050010;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX = 7050011;
var SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE = 7050012;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION = 7050013;
var SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE = 7050014;
var SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE = 7050015;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 7050016;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;
var SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION = 7050018;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT = 7050019;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;
var SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS = 7050022;
var SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT = 7050027;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;
var SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION = 7050030;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT = 7050031;
var SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;
var SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED = 7050034;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;
var SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION = 7050036;

@@ -17,2 +109,57 @@ // src/messages.ts

[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
[SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
[SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH]: "Cross-program invocation call depth too deep",
[SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: "custom program error: #$code",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR]: "generic instruction error",
[SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER]: "Provided owner is not allowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE]: "Account is immutable",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY]: "Incorrect authority provided",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER]: "Invalid account owner",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT]: "invalid program argument",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR]: "program returned invalid error code",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA]: "invalid instruction data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC]: "Failed to reallocate account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS]: "Provided seeds do not result in a valid address",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT]: "An account required by the instruction is missing",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: "",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",

@@ -22,2 +169,39 @@ [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",

[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE]: "Account in use",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE]: "Account loaded twice",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND]: "Attempt to debit an account but found no record of a prior credit.",
[SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND]: "Transaction loads an address table account that doesn't exist",
[SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED]: "This transaction has already been processed",
[SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND]: "Blockhash not found",
[SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP]: "Loader call chain is too deep",
[SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE]: "Transactions are currently disabled due to cluster maintenance",
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: "Transaction contains a duplicate instruction ($index) that is not allowed",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE]: "Insufficient funds for fee",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE]: "This account may not be used to pay transaction fees",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX]: "Transaction contains an invalid account reference",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA]: "Transaction loads an address table account with invalid data",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: "Transaction address table lookup uses an invalid index",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: "Transaction loads an address table account with an invalid owner",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION]: "This program may not be used for executing instructions",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT]: "Transaction loads a writable account that cannot be written",
[SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: "Transaction exceeded max loaded accounts data size cap",
[SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE]: "Transaction requires a fee but has no signature present",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND]: "Attempt to load a program that does not exist",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
[SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED]: "ResanitizationNeeded",
[SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE]: "Transaction failed to sanitize accounts offsets correctly",
[SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE]: "Transaction did not pass signature verification",
[SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS]: "Transaction locked too many accounts",
[SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION]: "Sum of account balances before and after transaction do not match",
[SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN]: "The transaction failed with the error `$errorName`",
[SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION]: "Transaction version is unsupported",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: "Transaction would exceed account data limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: "Transaction would exceed total account data limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

@@ -45,3 +229,3 @@ [SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer."

String(
Object.getPrototypeOf(value) === null ? (
value != null && Object.getPrototypeOf(value) === null ? (
// Plain objects with no protoype don't have a `toString` method.

@@ -105,4 +289,190 @@ // Convert them before stringifying them.

export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
// src/rpc-enum-errors.ts
function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {
let rpcErrorName;
let rpcErrorContext;
if (typeof rpcEnumError === "string") {
rpcErrorName = rpcEnumError;
} else {
rpcErrorName = Object.keys(rpcEnumError)[0];
rpcErrorContext = rpcEnumError[rpcErrorName];
}
const codeOffset = orderedErrorNames.indexOf(rpcErrorName);
const errorCode = errorCodeBaseOffset + codeOffset;
const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);
const err = new SolanaError(errorCode, errorContext);
if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(err, constructorOpt);
}
return err;
}
// src/instruction-error.ts
var ORDERED_ERROR_NAMES = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"GenericError",
"InvalidArgument",
"InvalidInstructionData",
"InvalidAccountData",
"AccountDataTooSmall",
"InsufficientFunds",
"IncorrectProgramId",
"MissingRequiredSignature",
"AccountAlreadyInitialized",
"UninitializedAccount",
"UnbalancedInstruction",
"ModifiedProgramId",
"ExternalAccountLamportSpend",
"ExternalAccountDataModified",
"ReadonlyLamportChange",
"ReadonlyDataModified",
"DuplicateAccountIndex",
"ExecutableModified",
"RentEpochModified",
"NotEnoughAccountKeys",
"AccountDataSizeChanged",
"AccountNotExecutable",
"AccountBorrowFailed",
"AccountBorrowOutstanding",
"DuplicateAccountOutOfSync",
"Custom",
"InvalidError",
"ExecutableDataModified",
"ExecutableLamportChange",
"ExecutableAccountNotRentExempt",
"UnsupportedProgramId",
"CallDepth",
"MissingAccount",
"ReentrancyNotAllowed",
"MaxSeedLengthExceeded",
"InvalidSeeds",
"InvalidRealloc",
"ComputationalBudgetExceeded",
"PrivilegeEscalation",
"ProgramEnvironmentSetupFailure",
"ProgramFailedToComplete",
"ProgramFailedToCompile",
"Immutable",
"IncorrectAuthority",
"BorshIoError",
"AccountNotRentExempt",
"InvalidAccountOwner",
"ArithmeticOverflow",
"UnsupportedSysvar",
"IllegalOwner",
"MaxAccountsDataAllocationsExceeded",
"MaxAccountsExceeded",
"MaxInstructionTraceLengthExceeded",
"BuiltinProgramsMustConsumeComputeUnits"
];
function getSolanaErrorFromInstructionError(index, instructionError) {
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 4615001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
index,
...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM) {
return {
code: rpcErrorContext,
index
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR) {
return {
encodedData: rpcErrorContext,
index
};
}
return { index };
},
orderedErrorNames: ORDERED_ERROR_NAMES,
rpcEnumError: instructionError
},
getSolanaErrorFromInstructionError
);
}
// src/transaction-error.ts
var ORDERED_ERROR_NAMES2 = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"AccountInUse",
"AccountLoadedTwice",
"AccountNotFound",
"ProgramAccountNotFound",
"InsufficientFundsForFee",
"InvalidAccountForFee",
"AlreadyProcessed",
"BlockhashNotFound",
// `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`
"CallChainTooDeep",
"MissingSignatureForFee",
"InvalidAccountIndex",
"SignatureFailure",
"InvalidProgramForExecution",
"SanitizeFailure",
"ClusterMaintenance",
"AccountBorrowOutstanding",
"WouldExceedMaxBlockCostLimit",
"UnsupportedVersion",
"InvalidWritableAccount",
"WouldExceedMaxAccountCostLimit",
"WouldExceedAccountDataBlockLimit",
"TooManyAccountLocks",
"AddressLookupTableNotFound",
"InvalidAddressLookupTableOwner",
"InvalidAddressLookupTableData",
"InvalidAddressLookupTableIndex",
"InvalidRentPayingAccount",
"WouldExceedMaxVoteCostLimit",
"WouldExceedAccountDataTotalLimit",
"DuplicateInstruction",
"InsufficientFundsForRent",
"MaxLoadedAccountsDataSizeExceeded",
"InvalidLoadedAccountsDataSizeLimit",
"ResanitizationNeeded",
"ProgramExecutionTemporarilyRestricted",
"UnbalancedTransaction"
];
function getSolanaErrorFromTransactionError(transactionError) {
if (typeof transactionError === "object" && "InstructionError" in transactionError) {
return getSolanaErrorFromInstructionError(
...transactionError.InstructionError
);
}
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 7050001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION) {
return {
index: rpcErrorContext
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {
return {
accountIndex: rpcErrorContext.account_index
};
}
},
orderedErrorNames: ORDERED_ERROR_NAMES2,
rpcEnumError: transactionError
},
getSolanaErrorFromTransactionError
);
}
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW, SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS, SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH, SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND, SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE, SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS, SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED, SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION, SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED, SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP, SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE, SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED, SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED, SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED, SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS, SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION, SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN, SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, getSolanaErrorFromInstructionError, getSolanaErrorFromTransactionError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

@@ -12,2 +12,94 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN = 4615e3;
var SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR = 4615001;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT = 4615002;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA = 4615003;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA = 4615004;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL = 4615005;
var SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS = 4615006;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID = 4615007;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE = 4615008;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED = 4615009;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT = 4615010;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION = 4615011;
var SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID = 4615012;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE = 4615015;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED = 4615016;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX = 4615017;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED = 4615018;
var SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED = 4615019;
var SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED = 4615021;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE = 4615022;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED = 4615023;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 4615024;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
var SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM = 4615026;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR = 4615027;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED = 4615028;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE = 4615029;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID = 4615031;
var SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH = 4615032;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT = 4615033;
var SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED = 4615034;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED = 4615035;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS = 4615036;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC = 4615037;
var SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
var SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION = 4615039;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE = 4615041;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE = 4615042;
var SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE = 4615043;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY = 4615044;
var SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR = 4615045;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT = 4615046;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER = 4615047;
var SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW = 4615048;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR = 4615049;
var SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER = 4615050;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED = 4615052;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
var SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
var SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN = 705e4;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE = 7050001;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE = 7050002;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND = 7050003;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND = 7050004;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE = 7050005;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE = 7050006;
var SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED = 7050007;
var SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND = 7050008;
var SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP = 7050009;
var SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE = 7050010;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX = 7050011;
var SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE = 7050012;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION = 7050013;
var SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE = 7050014;
var SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE = 7050015;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 7050016;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;
var SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION = 7050018;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT = 7050019;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;
var SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS = 7050022;
var SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT = 7050027;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;
var SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION = 7050030;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT = 7050031;
var SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;
var SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED = 7050034;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;
var SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION = 7050036;

@@ -17,2 +109,57 @@ // src/messages.ts

[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
[SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
[SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH]: "Cross-program invocation call depth too deep",
[SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: "custom program error: #$code",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR]: "generic instruction error",
[SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER]: "Provided owner is not allowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE]: "Account is immutable",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY]: "Incorrect authority provided",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER]: "Invalid account owner",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT]: "invalid program argument",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR]: "program returned invalid error code",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA]: "invalid instruction data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC]: "Failed to reallocate account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS]: "Provided seeds do not result in a valid address",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT]: "An account required by the instruction is missing",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: "",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",

@@ -22,2 +169,39 @@ [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",

[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE]: "Account in use",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE]: "Account loaded twice",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND]: "Attempt to debit an account but found no record of a prior credit.",
[SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND]: "Transaction loads an address table account that doesn't exist",
[SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED]: "This transaction has already been processed",
[SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND]: "Blockhash not found",
[SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP]: "Loader call chain is too deep",
[SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE]: "Transactions are currently disabled due to cluster maintenance",
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: "Transaction contains a duplicate instruction ($index) that is not allowed",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE]: "Insufficient funds for fee",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE]: "This account may not be used to pay transaction fees",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX]: "Transaction contains an invalid account reference",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA]: "Transaction loads an address table account with invalid data",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: "Transaction address table lookup uses an invalid index",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: "Transaction loads an address table account with an invalid owner",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION]: "This program may not be used for executing instructions",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT]: "Transaction loads a writable account that cannot be written",
[SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: "Transaction exceeded max loaded accounts data size cap",
[SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE]: "Transaction requires a fee but has no signature present",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND]: "Attempt to load a program that does not exist",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
[SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED]: "ResanitizationNeeded",
[SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE]: "Transaction failed to sanitize accounts offsets correctly",
[SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE]: "Transaction did not pass signature verification",
[SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS]: "Transaction locked too many accounts",
[SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION]: "Sum of account balances before and after transaction do not match",
[SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN]: "The transaction failed with the error `$errorName`",
[SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION]: "Transaction version is unsupported",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: "Transaction would exceed account data limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: "Transaction would exceed total account data limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

@@ -45,3 +229,3 @@ [SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer."

String(
Object.getPrototypeOf(value) === null ? (
value != null && Object.getPrototypeOf(value) === null ? (
// Plain objects with no protoype don't have a `toString` method.

@@ -105,4 +289,190 @@ // Convert them before stringifying them.

export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
// src/rpc-enum-errors.ts
function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {
let rpcErrorName;
let rpcErrorContext;
if (typeof rpcEnumError === "string") {
rpcErrorName = rpcEnumError;
} else {
rpcErrorName = Object.keys(rpcEnumError)[0];
rpcErrorContext = rpcEnumError[rpcErrorName];
}
const codeOffset = orderedErrorNames.indexOf(rpcErrorName);
const errorCode = errorCodeBaseOffset + codeOffset;
const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);
const err = new SolanaError(errorCode, errorContext);
if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(err, constructorOpt);
}
return err;
}
// src/instruction-error.ts
var ORDERED_ERROR_NAMES = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"GenericError",
"InvalidArgument",
"InvalidInstructionData",
"InvalidAccountData",
"AccountDataTooSmall",
"InsufficientFunds",
"IncorrectProgramId",
"MissingRequiredSignature",
"AccountAlreadyInitialized",
"UninitializedAccount",
"UnbalancedInstruction",
"ModifiedProgramId",
"ExternalAccountLamportSpend",
"ExternalAccountDataModified",
"ReadonlyLamportChange",
"ReadonlyDataModified",
"DuplicateAccountIndex",
"ExecutableModified",
"RentEpochModified",
"NotEnoughAccountKeys",
"AccountDataSizeChanged",
"AccountNotExecutable",
"AccountBorrowFailed",
"AccountBorrowOutstanding",
"DuplicateAccountOutOfSync",
"Custom",
"InvalidError",
"ExecutableDataModified",
"ExecutableLamportChange",
"ExecutableAccountNotRentExempt",
"UnsupportedProgramId",
"CallDepth",
"MissingAccount",
"ReentrancyNotAllowed",
"MaxSeedLengthExceeded",
"InvalidSeeds",
"InvalidRealloc",
"ComputationalBudgetExceeded",
"PrivilegeEscalation",
"ProgramEnvironmentSetupFailure",
"ProgramFailedToComplete",
"ProgramFailedToCompile",
"Immutable",
"IncorrectAuthority",
"BorshIoError",
"AccountNotRentExempt",
"InvalidAccountOwner",
"ArithmeticOverflow",
"UnsupportedSysvar",
"IllegalOwner",
"MaxAccountsDataAllocationsExceeded",
"MaxAccountsExceeded",
"MaxInstructionTraceLengthExceeded",
"BuiltinProgramsMustConsumeComputeUnits"
];
function getSolanaErrorFromInstructionError(index, instructionError) {
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 4615001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
index,
...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM) {
return {
code: rpcErrorContext,
index
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR) {
return {
encodedData: rpcErrorContext,
index
};
}
return { index };
},
orderedErrorNames: ORDERED_ERROR_NAMES,
rpcEnumError: instructionError
},
getSolanaErrorFromInstructionError
);
}
// src/transaction-error.ts
var ORDERED_ERROR_NAMES2 = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"AccountInUse",
"AccountLoadedTwice",
"AccountNotFound",
"ProgramAccountNotFound",
"InsufficientFundsForFee",
"InvalidAccountForFee",
"AlreadyProcessed",
"BlockhashNotFound",
// `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`
"CallChainTooDeep",
"MissingSignatureForFee",
"InvalidAccountIndex",
"SignatureFailure",
"InvalidProgramForExecution",
"SanitizeFailure",
"ClusterMaintenance",
"AccountBorrowOutstanding",
"WouldExceedMaxBlockCostLimit",
"UnsupportedVersion",
"InvalidWritableAccount",
"WouldExceedMaxAccountCostLimit",
"WouldExceedAccountDataBlockLimit",
"TooManyAccountLocks",
"AddressLookupTableNotFound",
"InvalidAddressLookupTableOwner",
"InvalidAddressLookupTableData",
"InvalidAddressLookupTableIndex",
"InvalidRentPayingAccount",
"WouldExceedMaxVoteCostLimit",
"WouldExceedAccountDataTotalLimit",
"DuplicateInstruction",
"InsufficientFundsForRent",
"MaxLoadedAccountsDataSizeExceeded",
"InvalidLoadedAccountsDataSizeLimit",
"ResanitizationNeeded",
"ProgramExecutionTemporarilyRestricted",
"UnbalancedTransaction"
];
function getSolanaErrorFromTransactionError(transactionError) {
if (typeof transactionError === "object" && "InstructionError" in transactionError) {
return getSolanaErrorFromInstructionError(
...transactionError.InstructionError
);
}
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 7050001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION) {
return {
index: rpcErrorContext
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {
return {
accountIndex: rpcErrorContext.account_index
};
}
},
orderedErrorNames: ORDERED_ERROR_NAMES2,
rpcEnumError: transactionError
},
getSolanaErrorFromTransactionError
);
}
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW, SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS, SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH, SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND, SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE, SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS, SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED, SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION, SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED, SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP, SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE, SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED, SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED, SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED, SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS, SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION, SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN, SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, getSolanaErrorFromInstructionError, getSolanaErrorFromTransactionError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

@@ -12,2 +12,94 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN = 4615e3;
var SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR = 4615001;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT = 4615002;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA = 4615003;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA = 4615004;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL = 4615005;
var SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS = 4615006;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID = 4615007;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE = 4615008;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED = 4615009;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT = 4615010;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION = 4615011;
var SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID = 4615012;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE = 4615015;
var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED = 4615016;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX = 4615017;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED = 4615018;
var SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED = 4615019;
var SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED = 4615021;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE = 4615022;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED = 4615023;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 4615024;
var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
var SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM = 4615026;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR = 4615027;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED = 4615028;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE = 4615029;
var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID = 4615031;
var SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH = 4615032;
var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT = 4615033;
var SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED = 4615034;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED = 4615035;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS = 4615036;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC = 4615037;
var SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
var SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION = 4615039;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE = 4615041;
var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE = 4615042;
var SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE = 4615043;
var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY = 4615044;
var SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR = 4615045;
var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT = 4615046;
var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER = 4615047;
var SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW = 4615048;
var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR = 4615049;
var SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER = 4615050;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED = 4615052;
var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
var SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
var SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN = 705e4;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE = 7050001;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE = 7050002;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND = 7050003;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND = 7050004;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE = 7050005;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE = 7050006;
var SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED = 7050007;
var SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND = 7050008;
var SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP = 7050009;
var SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE = 7050010;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX = 7050011;
var SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE = 7050012;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION = 7050013;
var SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE = 7050014;
var SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE = 7050015;
var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 7050016;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;
var SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION = 7050018;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT = 7050019;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;
var SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS = 7050022;
var SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT = 7050027;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;
var SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;
var SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION = 7050030;
var SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT = 7050031;
var SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;
var SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;
var SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED = 7050034;
var SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;
var SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION = 7050036;

@@ -17,2 +109,57 @@ // src/messages.ts

[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
[SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
[SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH]: "Cross-program invocation call depth too deep",
[SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: "custom program error: #$code",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
[SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
[SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR]: "generic instruction error",
[SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER]: "Provided owner is not allowed",
[SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE]: "Account is immutable",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY]: "Incorrect authority provided",
[SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER]: "Invalid account owner",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT]: "invalid program argument",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR]: "program returned invalid error code",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA]: "invalid instruction data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC]: "Failed to reallocate account data",
[SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS]: "Provided seeds do not result in a valid address",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
[SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT]: "An account required by the instruction is missing",
[SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
[SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
[SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
[SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: "",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
[SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",

@@ -22,2 +169,39 @@ [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",

[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE]: "Account in use",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE]: "Account loaded twice",
[SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND]: "Attempt to debit an account but found no record of a prior credit.",
[SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND]: "Transaction loads an address table account that doesn't exist",
[SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED]: "This transaction has already been processed",
[SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND]: "Blockhash not found",
[SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP]: "Loader call chain is too deep",
[SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE]: "Transactions are currently disabled due to cluster maintenance",
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: "Transaction contains a duplicate instruction ($index) that is not allowed",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE]: "Insufficient funds for fee",
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE]: "This account may not be used to pay transaction fees",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX]: "Transaction contains an invalid account reference",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA]: "Transaction loads an address table account with invalid data",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: "Transaction address table lookup uses an invalid index",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: "Transaction loads an address table account with an invalid owner",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION]: "This program may not be used for executing instructions",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
[SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT]: "Transaction loads a writable account that cannot be written",
[SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: "Transaction exceeded max loaded accounts data size cap",
[SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE]: "Transaction requires a fee but has no signature present",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND]: "Attempt to load a program that does not exist",
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
[SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED]: "ResanitizationNeeded",
[SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE]: "Transaction failed to sanitize accounts offsets correctly",
[SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE]: "Transaction did not pass signature verification",
[SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS]: "Transaction locked too many accounts",
[SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION]: "Sum of account balances before and after transaction do not match",
[SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN]: "The transaction failed with the error `$errorName`",
[SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION]: "Transaction version is unsupported",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: "Transaction would exceed account data limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: "Transaction would exceed total account data limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
[SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

@@ -45,3 +229,3 @@ [SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer."

String(
Object.getPrototypeOf(value) === null ? (
value != null && Object.getPrototypeOf(value) === null ? (
// Plain objects with no protoype don't have a `toString` method.

@@ -105,4 +289,190 @@ // Convert them before stringifying them.

export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
// src/rpc-enum-errors.ts
function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {
let rpcErrorName;
let rpcErrorContext;
if (typeof rpcEnumError === "string") {
rpcErrorName = rpcEnumError;
} else {
rpcErrorName = Object.keys(rpcEnumError)[0];
rpcErrorContext = rpcEnumError[rpcErrorName];
}
const codeOffset = orderedErrorNames.indexOf(rpcErrorName);
const errorCode = errorCodeBaseOffset + codeOffset;
const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);
const err = new SolanaError(errorCode, errorContext);
if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(err, constructorOpt);
}
return err;
}
// src/instruction-error.ts
var ORDERED_ERROR_NAMES = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"GenericError",
"InvalidArgument",
"InvalidInstructionData",
"InvalidAccountData",
"AccountDataTooSmall",
"InsufficientFunds",
"IncorrectProgramId",
"MissingRequiredSignature",
"AccountAlreadyInitialized",
"UninitializedAccount",
"UnbalancedInstruction",
"ModifiedProgramId",
"ExternalAccountLamportSpend",
"ExternalAccountDataModified",
"ReadonlyLamportChange",
"ReadonlyDataModified",
"DuplicateAccountIndex",
"ExecutableModified",
"RentEpochModified",
"NotEnoughAccountKeys",
"AccountDataSizeChanged",
"AccountNotExecutable",
"AccountBorrowFailed",
"AccountBorrowOutstanding",
"DuplicateAccountOutOfSync",
"Custom",
"InvalidError",
"ExecutableDataModified",
"ExecutableLamportChange",
"ExecutableAccountNotRentExempt",
"UnsupportedProgramId",
"CallDepth",
"MissingAccount",
"ReentrancyNotAllowed",
"MaxSeedLengthExceeded",
"InvalidSeeds",
"InvalidRealloc",
"ComputationalBudgetExceeded",
"PrivilegeEscalation",
"ProgramEnvironmentSetupFailure",
"ProgramFailedToComplete",
"ProgramFailedToCompile",
"Immutable",
"IncorrectAuthority",
"BorshIoError",
"AccountNotRentExempt",
"InvalidAccountOwner",
"ArithmeticOverflow",
"UnsupportedSysvar",
"IllegalOwner",
"MaxAccountsDataAllocationsExceeded",
"MaxAccountsExceeded",
"MaxInstructionTraceLengthExceeded",
"BuiltinProgramsMustConsumeComputeUnits"
];
function getSolanaErrorFromInstructionError(index, instructionError) {
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 4615001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
index,
...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM) {
return {
code: rpcErrorContext,
index
};
} else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR) {
return {
encodedData: rpcErrorContext,
index
};
}
return { index };
},
orderedErrorNames: ORDERED_ERROR_NAMES,
rpcEnumError: instructionError
},
getSolanaErrorFromInstructionError
);
}
// src/transaction-error.ts
var ORDERED_ERROR_NAMES2 = [
// Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs
// If this list ever gets too large, consider implementing a compression strategy like this:
// https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
"AccountInUse",
"AccountLoadedTwice",
"AccountNotFound",
"ProgramAccountNotFound",
"InsufficientFundsForFee",
"InvalidAccountForFee",
"AlreadyProcessed",
"BlockhashNotFound",
// `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`
"CallChainTooDeep",
"MissingSignatureForFee",
"InvalidAccountIndex",
"SignatureFailure",
"InvalidProgramForExecution",
"SanitizeFailure",
"ClusterMaintenance",
"AccountBorrowOutstanding",
"WouldExceedMaxBlockCostLimit",
"UnsupportedVersion",
"InvalidWritableAccount",
"WouldExceedMaxAccountCostLimit",
"WouldExceedAccountDataBlockLimit",
"TooManyAccountLocks",
"AddressLookupTableNotFound",
"InvalidAddressLookupTableOwner",
"InvalidAddressLookupTableData",
"InvalidAddressLookupTableIndex",
"InvalidRentPayingAccount",
"WouldExceedMaxVoteCostLimit",
"WouldExceedAccountDataTotalLimit",
"DuplicateInstruction",
"InsufficientFundsForRent",
"MaxLoadedAccountsDataSizeExceeded",
"InvalidLoadedAccountsDataSizeLimit",
"ResanitizationNeeded",
"ProgramExecutionTemporarilyRestricted",
"UnbalancedTransaction"
];
function getSolanaErrorFromTransactionError(transactionError) {
if (typeof transactionError === "object" && "InstructionError" in transactionError) {
return getSolanaErrorFromInstructionError(
...transactionError.InstructionError
);
}
return getSolanaErrorFromRpcError(
{
errorCodeBaseOffset: 7050001,
getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN) {
return {
errorName: rpcErrorName,
...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION) {
return {
index: rpcErrorContext
};
} else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {
return {
accountIndex: rpcErrorContext.account_index
};
}
},
orderedErrorNames: ORDERED_ERROR_NAMES2,
rpcEnumError: transactionError
},
getSolanaErrorFromTransactionError
);
}
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW, SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS, SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH, SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND, SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE, SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS, SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED, SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION, SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE, SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED, SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP, SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE, SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED, SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED, SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED, SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS, SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION, SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN, SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, getSolanaErrorFromInstructionError, getSolanaErrorFromTransactionError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

@@ -16,2 +16,94 @@ /**

export declare const SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND: 7;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN: 4615000;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR: 4615001;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT: 4615002;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA: 4615003;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA: 4615004;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL: 4615005;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS: 4615006;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID: 4615007;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE: 4615008;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED: 4615009;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT: 4615010;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION: 4615011;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID: 4615012;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND: 4615013;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED: 4615014;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE: 4615015;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED: 4615016;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX: 4615017;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED: 4615018;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED: 4615019;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS: 4615020;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED: 4615021;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE: 4615022;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED: 4615023;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING: 4615024;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC: 4615025;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM: 4615026;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR: 4615027;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED: 4615028;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE: 4615029;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT: 4615030;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID: 4615031;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH: 4615032;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT: 4615033;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED: 4615034;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED: 4615035;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS: 4615036;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC: 4615037;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED: 4615038;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION: 4615039;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE: 4615040;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE: 4615041;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE: 4615042;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE: 4615043;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY: 4615044;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR: 4615045;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT: 4615046;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER: 4615047;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW: 4615048;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR: 4615049;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER: 4615050;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED: 4615051;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED: 4615052;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED: 4615053;
export declare const SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS: 4615054;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN: 7050000;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE: 7050001;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE: 7050002;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND: 7050003;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND: 7050004;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE: 7050005;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE: 7050006;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED: 7050007;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND: 7050008;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP: 7050009;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE: 7050010;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX: 7050011;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE: 7050012;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION: 7050013;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE: 7050014;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE: 7050015;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING: 7050016;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT: 7050017;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION: 7050018;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT: 7050019;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT: 7050020;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT: 7050021;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS: 7050022;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND: 7050023;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER: 7050024;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA: 7050025;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX: 7050026;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT: 7050027;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT: 7050028;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT: 7050029;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION: 7050030;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT: 7050031;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED: 7050032;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT: 7050033;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED: 7050034;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED: 7050035;
export declare const SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION: 7050036;
/**

@@ -32,3 +124,3 @@ * A union of every Solana error code

*/
export type SolanaErrorCode = typeof SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES | typeof SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE | typeof SOLANA_ERROR__RPC_INTEGER_OVERFLOW | typeof SOLANA_ERROR__INVALID_KEYPAIR_BYTES | typeof SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED | typeof SOLANA_ERROR__NONCE_INVALID | typeof SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND;
export type SolanaErrorCode = typeof SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES | typeof SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE | typeof SOLANA_ERROR__RPC_INTEGER_OVERFLOW | typeof SOLANA_ERROR__INVALID_KEYPAIR_BYTES | typeof SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED | typeof SOLANA_ERROR__NONCE_INVALID | typeof SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN | typeof SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING | typeof SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC | typeof SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC | typeof SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY | typeof SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS | typeof SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN | typeof SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE | typeof SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE | typeof SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_NOT_FOUND | typeof SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_ACCOUNT_NOT_FOUND | typeof SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_FEE | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_FOR_FEE | typeof SOLANA_ERROR__TRANSACTION_ERROR_ALREADY_PROCESSED | typeof SOLANA_ERROR__TRANSACTION_ERROR_BLOCKHASH_NOT_FOUND | typeof SOLANA_ERROR__TRANSACTION_ERROR_CALL_CHAIN_TOO_DEEP | typeof SOLANA_ERROR__TRANSACTION_ERROR_MISSING_SIGNATURE_FOR_FEE | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ACCOUNT_INDEX | typeof SOLANA_ERROR__TRANSACTION_ERROR_SIGNATURE_FAILURE | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_PROGRAM_FOR_EXECUTION | typeof SOLANA_ERROR__TRANSACTION_ERROR_SANITIZE_FAILURE | typeof SOLANA_ERROR__TRANSACTION_ERROR_CLUSTER_MAINTENANCE | typeof SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING | typeof SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_UNSUPPORTED_VERSION | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_WRITABLE_ACCOUNT | typeof SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_TOO_MANY_ACCOUNT_LOCKS | typeof SOLANA_ERROR__TRANSACTION_ERROR_ADDRESS_LOOKUP_TABLE_NOT_FOUND | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_OWNER | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_DATA | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_ADDRESS_LOOKUP_TABLE_INDEX | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_RENT_PAYING_ACCOUNT | typeof SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION | typeof SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT | typeof SOLANA_ERROR__TRANSACTION_ERROR_MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED | typeof SOLANA_ERROR__TRANSACTION_ERROR_INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT | typeof SOLANA_ERROR__TRANSACTION_ERROR_RESANITIZATION_NEEDED | typeof SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED | typeof SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION;
//# sourceMappingURL=codes.d.ts.map

@@ -1,2 +0,7 @@

import { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SolanaErrorCode } from './codes.js';
import { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW, SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS, SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH, SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX, SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND, SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY, SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC, SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE, SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS, SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE, SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED, SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION, SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION, SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT, SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED, SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SolanaErrorCode } from './codes.js';
type BasicInstructionErrorContext<T extends SolanaErrorCode> = Readonly<{
[P in T]: {
index: number;
};
}>;
export type DefaultUnspecifiedErrorContextToUndefined<T> = {

@@ -12,3 +17,3 @@ [P in SolanaErrorCode]: P extends keyof T ? T[P] : undefined;

*/
export type SolanaErrorContext = DefaultUnspecifiedErrorContextToUndefined<{
export type SolanaErrorContext = DefaultUnspecifiedErrorContextToUndefined<BasicInstructionErrorContext<typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN | typeof SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING | typeof SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC | typeof SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID | typeof SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC | typeof SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY | typeof SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT | typeof SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW | typeof SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR | typeof SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED | typeof SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS> & {
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: {

@@ -39,3 +44,39 @@ currentBlockHeight: bigint;

};
[SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN]: {
errorName: string;
transactionErrorContext?: unknown;
};
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: {
index: number;
};
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: {
accountIndex: number;
};
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: {
accountIndex: number;
};
[SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION]: {
index: number;
};
[SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT]: {
accountIndex: number;
};
[SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: {
accountIndex: number;
};
[SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: {
errorName: string;
index: number;
instructionErrorContext?: unknown;
};
[SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: {
encodedData: string;
index: number;
};
[SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: {
code: number;
index: number;
};
}>;
export {};
//# sourceMappingURL=context.d.ts.map
export * from './codes.js';
export * from './error.js';
export * from './instruction-error.js';
export * from './transaction-error.js';
//# sourceMappingURL=index.d.ts.map

4

package.json
{
"name": "@solana/errors",
"version": "2.0.0-experimental.c32f08b",
"version": "2.0.0-experimental.c9b2705",
"description": "Throw, identify, and decode Solana JavaScript errors",

@@ -54,3 +54,3 @@ "exports": {

"chalk": "^5.3.0",
"commander": "^11.1.0"
"commander": "^12.0.0"
},

@@ -57,0 +57,0 @@ "bundlewatch": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc