@solana/errors 2.0.0-experimental.7712fc3 → 2.0.0-experimental.8541c2e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,108 +2,13 @@
2
2
  var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")();
3
3
 
4
4
  // src/codes.ts
5
+ var SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES = 1;
6
+ var SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE = 2;
5
7
  var SOLANA_ERROR__RPC_INTEGER_OVERFLOW = 3;
6
8
  var SOLANA_ERROR__INVALID_KEYPAIR_BYTES = 4;
7
9
  var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 5;
8
10
  var SOLANA_ERROR__NONCE_INVALID = 6;
9
11
  var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
10
- var SOLANA_ERROR__ACCOUNT_NOT_FOUND = 8;
11
- var SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND = 9;
12
- var SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT = 10;
13
- var SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT = 11;
14
- var SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED = 12;
15
- var SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_LENGTH = 13;
16
- var SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_BYTE_LENGTH = 14;
17
- var SOLANA_ERROR__NOT_A_BASE58_ENCODED_ADDRESS = 15;
18
- var SOLANA_ERROR__NOT_AN_ED25519_PUBLIC_KEY = 16;
19
- var SOLANA_ERROR__MALFORMED_PROGRAM_DERIVED_ADDRESS = 17;
20
- var SOLANA_ERROR__PROGRAM_DERIVED_ADDRESS_BUMP_SEED_OUT_OF_RANGE = 18;
21
- var SOLANA_ERROR__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 19;
22
- var SOLANA_ERROR__MAX_PDA_SEED_LENGTH_EXCEEDED = 20;
23
- var SOLANA_ERROR__INVALID_SEEDS_POINT_ON_CURVE = 21;
24
- var SOLANA_ERROR__COULD_NOT_FIND_VIABLE_PDA_BUMP_SEED = 22;
25
- var SOLANA_ERROR__PROGRAM_ADDRESS_ENDS_WITH_PDA_MARKER = 23;
26
- var SOLANA_ERROR__SUBTLE_CRYPTO_MISSING = 24;
27
- var SOLANA_ERROR__SUBTLE_CRYPTO_DIGEST_MISSING = 25;
28
- var SOLANA_ERROR__SUBTLE_CRYPTO_ED25519_ALGORITHM_MISSING = 26;
29
- var SOLANA_ERROR__SUBTLE_CRYPTO_EXPORT_FUNCTION_MISSING = 27;
30
- var SOLANA_ERROR__SUBTLE_CRYPTO_GENERATE_FUNCTION_MISSING = 28;
31
- var SOLANA_ERROR__SUBTLE_CRYPTO_SIGN_FUNCTION_MISSING = 29;
32
- var SOLANA_ERROR__SUBTLE_CRYPTO_VERIFY_FUNCTION_MISSING = 30;
33
- var SOLANA_ERROR__CODECS_CANNOT_DECODE_EMPTY_BYTE_ARRAY = 31;
34
- var SOLANA_ERROR__CODECS_WRONG_NUMBER_OF_BYTES = 32;
35
- var SOLANA_ERROR__CODECS_EXPECTED_FIXED_LENGTH_GOT_VARIABLE_LENGTH = 33;
36
- var SOLANA_ERROR__CODECS_EXPECTED_VARIABLE_LENGTH_GOT_FIXED_LENGTH = 34;
37
- var SOLANA_ERROR__CODECS_ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 35;
38
- var SOLANA_ERROR__CODECS_FIXED_SIZE_ENCODER_DECODER_SIZE_MISMATCH = 36;
39
- var SOLANA_ERROR__CODECS_VARIABLE_SIZE_ENCODER_DECODER_MAX_SIZE_MISMATCH = 37;
40
- var SOLANA_ERROR__CODECS_CANNOT_REVERSE_CODEC_OF_VARIABLE_SIZE = 38;
41
- var SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN = 4615e3;
42
- var SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR = 4615001;
43
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT = 4615002;
44
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA = 4615003;
45
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA = 4615004;
46
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL = 4615005;
47
- var SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS = 4615006;
48
- var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID = 4615007;
49
- var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE = 4615008;
50
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED = 4615009;
51
- var SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT = 4615010;
52
- var SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION = 4615011;
53
- var SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID = 4615012;
54
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;
55
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;
56
- var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE = 4615015;
57
- var SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED = 4615016;
58
- var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX = 4615017;
59
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED = 4615018;
60
- var SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED = 4615019;
61
- var SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS = 4615020;
62
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED = 4615021;
63
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE = 4615022;
64
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED = 4615023;
65
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING = 4615024;
66
- var SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;
67
- var SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM = 4615026;
68
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR = 4615027;
69
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED = 4615028;
70
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE = 4615029;
71
- var SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;
72
- var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID = 4615031;
73
- var SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH = 4615032;
74
- var SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT = 4615033;
75
- var SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED = 4615034;
76
- var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED = 4615035;
77
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS = 4615036;
78
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC = 4615037;
79
- var SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;
80
- var SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION = 4615039;
81
- var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;
82
- var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE = 4615041;
83
- var SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE = 4615042;
84
- var SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE = 4615043;
85
- var SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY = 4615044;
86
- var SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR = 4615045;
87
- var SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT = 4615046;
88
- var SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER = 4615047;
89
- var SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW = 4615048;
90
- var SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR = 4615049;
91
- var SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER = 4615050;
92
- var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;
93
- var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED = 4615052;
94
- var SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;
95
- var SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;
96
- var SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663001;
97
- var SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663002;
98
- var SOLANA_ERROR__TRANSACTION_EXPECTED_BLOCKHASH_LIFETIME = 5663003;
99
- var SOLANA_ERROR__TRANSACTION_EXPECTED_NONCE_LIFETIME = 5663004;
100
- var SOLANA_ERROR__TRANSACTION_VERSION_NUMBER_OUT_OF_RANGE = 5663005;
101
- var SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663006;
102
- var SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663007;
103
- var SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663008;
104
- var SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663009;
105
- var SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES = 5663010;
106
- var SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE = 5663011;
107
12
  var SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN = 705e4;
108
13
  var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE = 7050001;
109
14
  var SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE = 7050002;
@@ -144,97 +49,11 @@ var SOLANA_ERROR__TRANSACTION_ERROR_UNBALANCED_TRANSACTION = 7050036;
144
49
 
145
50
  // src/messages.ts
146
51
  var SolanaErrorMessages = {
147
- [SOLANA_ERROR__ACCOUNT_NOT_FOUND]: "Account not found at address: $address",
148
52
  [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
149
- [SOLANA_ERROR__CODECS_CANNOT_DECODE_EMPTY_BYTE_ARRAY]: "Codec [$codecDescription] cannot decode empty byte arrays.",
150
- [SOLANA_ERROR__CODECS_CANNOT_REVERSE_CODEC_OF_VARIABLE_SIZE]: "Cannot reverse a codec of variable size.",
151
- [SOLANA_ERROR__CODECS_ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: "Encoder and decoder must either both be fixed-size or variable-size.",
152
- [SOLANA_ERROR__CODECS_EXPECTED_FIXED_LENGTH_GOT_VARIABLE_LENGTH]: "Expected a fixed-size codec, got a variable-size one.",
153
- [SOLANA_ERROR__CODECS_EXPECTED_VARIABLE_LENGTH_GOT_FIXED_LENGTH]: "Expected a variable-size codec, got a fixed-size one.",
154
- [SOLANA_ERROR__CODECS_FIXED_SIZE_ENCODER_DECODER_SIZE_MISMATCH]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
155
- [SOLANA_ERROR__CODECS_VARIABLE_SIZE_ENCODER_DECODER_MAX_SIZE_MISMATCH]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
156
- [SOLANA_ERROR__CODECS_WRONG_NUMBER_OF_BYTES]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
157
- [SOLANA_ERROR__COULD_NOT_FIND_VIABLE_PDA_BUMP_SEED]: "Unable to find a viable program address bump seed.",
158
- [SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT]: "Expected decoded account at address: $address",
159
- [SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT]: "Failed to decode account data at address: $address",
160
- [SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_BYTE_LENGTH]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
161
- [SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_LENGTH]: "Expected base58-encoded string of length between 32 and 44, got $actualLength.",
162
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_ALREADY_INITIALIZED]: "instruction requires an uninitialized account",
163
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_FAILED]: "instruction tries to borrow reference for an account which is already borrowed",
164
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "instruction left account with an outstanding borrowed reference",
165
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_SIZE_CHANGED]: "program other than the account's owner changed the size of the account data",
166
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_DATA_TOO_SMALL]: "account data too small for instruction",
167
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_EXECUTABLE]: "instruction expected an executable account",
168
- [SOLANA_ERROR__INSTRUCTION_ERROR_ACCOUNT_NOT_RENT_EXEMPT]: "An account does not have enough lamports to be rent-exempt",
169
- [SOLANA_ERROR__INSTRUCTION_ERROR_ARITHMETIC_OVERFLOW]: "Program arithmetic overflowed",
170
- [SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR]: "Failed to serialize or deserialize account data: $encodedData",
171
- [SOLANA_ERROR__INSTRUCTION_ERROR_BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: "Builtin programs must consume compute units",
172
- [SOLANA_ERROR__INSTRUCTION_ERROR_CALL_DEPTH]: "Cross-program invocation call depth too deep",
173
- [SOLANA_ERROR__INSTRUCTION_ERROR_COMPUTATIONAL_BUDGET_EXCEEDED]: "Computational budget exceeded",
174
- [SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM]: "custom program error: #$code",
175
- [SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_INDEX]: "instruction contains duplicate accounts",
176
- [SOLANA_ERROR__INSTRUCTION_ERROR_DUPLICATE_ACCOUNT_OUT_OF_SYNC]: "instruction modifications of multiply-passed account differ",
177
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: "executable accounts must be rent exempt",
178
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_DATA_MODIFIED]: "instruction changed executable accounts data",
179
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_LAMPORT_CHANGE]: "instruction changed the balance of an executable account",
180
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXECUTABLE_MODIFIED]: "instruction changed executable bit of an account",
181
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_DATA_MODIFIED]: "instruction modified data of an account it does not own",
182
- [SOLANA_ERROR__INSTRUCTION_ERROR_EXTERNAL_ACCOUNT_LAMPORT_SPEND]: "instruction spent from the balance of an account it does not own",
183
- [SOLANA_ERROR__INSTRUCTION_ERROR_GENERIC_ERROR]: "generic instruction error",
184
- [SOLANA_ERROR__INSTRUCTION_ERROR_ILLEGAL_OWNER]: "Provided owner is not allowed",
185
- [SOLANA_ERROR__INSTRUCTION_ERROR_IMMUTABLE]: "Account is immutable",
186
- [SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_AUTHORITY]: "Incorrect authority provided",
187
- [SOLANA_ERROR__INSTRUCTION_ERROR_INCORRECT_PROGRAM_ID]: "incorrect program id for instruction",
188
- [SOLANA_ERROR__INSTRUCTION_ERROR_INSUFFICIENT_FUNDS]: "insufficient funds for instruction",
189
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_DATA]: "invalid account data for instruction",
190
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ACCOUNT_OWNER]: "Invalid account owner",
191
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ARGUMENT]: "invalid program argument",
192
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_ERROR]: "program returned invalid error code",
193
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_INSTRUCTION_DATA]: "invalid instruction data",
194
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_REALLOC]: "Failed to reallocate account data",
195
- [SOLANA_ERROR__INSTRUCTION_ERROR_INVALID_SEEDS]: "Provided seeds do not result in a valid address",
196
- [SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: "Accounts data allocations exceeded the maximum allowed per transaction",
197
- [SOLANA_ERROR__INSTRUCTION_ERROR_MAX_ACCOUNTS_EXCEEDED]: "Max accounts exceeded",
198
- [SOLANA_ERROR__INSTRUCTION_ERROR_MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: "Max instruction trace length exceeded",
199
- [SOLANA_ERROR__INSTRUCTION_ERROR_MAX_SEED_LENGTH_EXCEEDED]: "Length of the seed is too long for address generation",
200
- [SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_ACCOUNT]: "An account required by the instruction is missing",
201
- [SOLANA_ERROR__INSTRUCTION_ERROR_MISSING_REQUIRED_SIGNATURE]: "missing required signature for instruction",
202
- [SOLANA_ERROR__INSTRUCTION_ERROR_MODIFIED_PROGRAM_ID]: "instruction illegally modified the program id of an account",
203
- [SOLANA_ERROR__INSTRUCTION_ERROR_NOT_ENOUGH_ACCOUNT_KEYS]: "insufficient account keys for instruction",
204
- [SOLANA_ERROR__INSTRUCTION_ERROR_PRIVILEGE_ESCALATION]: "Cross-program invocation with unauthorized signer or writable account",
205
- [SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_ENVIRONMENT_SETUP_FAILURE]: "Failed to create program execution environment",
206
- [SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPILE]: "Program failed to compile",
207
- [SOLANA_ERROR__INSTRUCTION_ERROR_PROGRAM_FAILED_TO_COMPLETE]: "Program failed to complete",
208
- [SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_DATA_MODIFIED]: "instruction modified data of a read-only account",
209
- [SOLANA_ERROR__INSTRUCTION_ERROR_READONLY_LAMPORT_CHANGE]: "instruction changed the balance of a read-only account",
210
- [SOLANA_ERROR__INSTRUCTION_ERROR_REENTRANCY_NOT_ALLOWED]: "Cross-program invocation reentrancy not allowed for this instruction",
211
- [SOLANA_ERROR__INSTRUCTION_ERROR_RENT_EPOCH_MODIFIED]: "instruction modified rent epoch of an account",
212
- [SOLANA_ERROR__INSTRUCTION_ERROR_UNBALANCED_INSTRUCTION]: "sum of account balances before and after instruction do not match",
213
- [SOLANA_ERROR__INSTRUCTION_ERROR_UNINITIALIZED_ACCOUNT]: "instruction requires an initialized account",
214
- [SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN]: "",
215
- [SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_PROGRAM_ID]: "Unsupported program id",
216
- [SOLANA_ERROR__INSTRUCTION_ERROR_UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
217
53
  [SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",
218
- [SOLANA_ERROR__INVALID_SEEDS_POINT_ON_CURVE]: "Invalid seeds; point must fall off the Ed25519 curve.",
219
- [SOLANA_ERROR__MALFORMED_PROGRAM_DERIVED_ADDRESS]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
220
- [SOLANA_ERROR__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: "A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",
221
- [SOLANA_ERROR__MAX_PDA_SEED_LENGTH_EXCEEDED]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
222
- [SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND]: "Accounts not found at addresses: $addresses",
223
54
  [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
224
55
  [SOLANA_ERROR__NONCE_INVALID]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
225
- [SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
226
- [SOLANA_ERROR__NOT_AN_ED25519_PUBLIC_KEY]: "The `CryptoKey` must be an `Ed25519` public key.",
227
- [SOLANA_ERROR__NOT_A_BASE58_ENCODED_ADDRESS]: "$putativeAddress is not a base58-encoded address.",
228
- [SOLANA_ERROR__PROGRAM_ADDRESS_ENDS_WITH_PDA_MARKER]: "Program address cannot end with PDA marker.",
229
- [SOLANA_ERROR__PROGRAM_DERIVED_ADDRESS_BUMP_SEED_OUT_OF_RANGE]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
230
56
  [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`.",
231
- [SOLANA_ERROR__SUBTLE_CRYPTO_DIGEST_MISSING]: "No digest implementation could be found.",
232
- [SOLANA_ERROR__SUBTLE_CRYPTO_ED25519_ALGORITHM_MISSING]: "This runtime does not support the generation of Ed25519 key pairs.\n\nInstall and import `@solana/webcrypto-ed25519-polyfill` before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",
233
- [SOLANA_ERROR__SUBTLE_CRYPTO_EXPORT_FUNCTION_MISSING]: "No signature verification implementation could be found.",
234
- [SOLANA_ERROR__SUBTLE_CRYPTO_GENERATE_FUNCTION_MISSING]: "No key generation implementation could be found.",
235
- [SOLANA_ERROR__SUBTLE_CRYPTO_MISSING]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
236
- [SOLANA_ERROR__SUBTLE_CRYPTO_SIGN_FUNCTION_MISSING]: "No signing implementation could be found.",
237
- [SOLANA_ERROR__SUBTLE_CRYPTO_VERIFY_FUNCTION_MISSING]: "No key export implementation could be found.",
238
57
  [SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
239
58
  [SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_IN_USE]: "Account in use",
240
59
  [SOLANA_ERROR__TRANSACTION_ERROR_ACCOUNT_LOADED_TWICE]: "Account loaded twice",
@@ -272,17 +91,8 @@ var SolanaErrorMessages = {
272
91
  [SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: "Transaction would exceed max account limit within the block",
273
92
  [SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: "Transaction would exceed max Block Cost Limit",
274
93
  [SOLANA_ERROR__TRANSACTION_ERROR_WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: "Transaction would exceed max Vote Cost Limit",
275
- [SOLANA_ERROR__TRANSACTION_EXPECTED_BLOCKHASH_LIFETIME]: "Transaction does not have a blockhash lifetime",
276
- [SOLANA_ERROR__TRANSACTION_EXPECTED_NONCE_LIFETIME]: "Transaction is not a durable nonce transaction",
277
- [SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
278
- [SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: "Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",
279
- [SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: "No fee payer set in CompiledTransaction",
280
- [SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: "Could not find program address at index $index",
281
- [SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_CANNOT_PAY_FEES]: "This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",
282
- [SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: "This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",
283
94
  [SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",
284
- [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.",
285
- [SOLANA_ERROR__TRANSACTION_VERSION_NUMBER_OUT_OF_RANGE]: "Transaction version must be in the range [0, 127]. `$actualVersion` given"
95
+ [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."
286
96
  };
287
97
 
288
98
  // src/message-formatter.ts
@@ -362,119 +172,8 @@ var SolanaError = class extends Error {
362
172
  }
363
173
  };
364
174
 
365
- // src/rpc-enum-errors.ts
366
- function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {
367
- let rpcErrorName;
368
- let rpcErrorContext;
369
- if (typeof rpcEnumError === "string") {
370
- rpcErrorName = rpcEnumError;
371
- } else {
372
- rpcErrorName = Object.keys(rpcEnumError)[0];
373
- rpcErrorContext = rpcEnumError[rpcErrorName];
374
- }
375
- const codeOffset = orderedErrorNames.indexOf(rpcErrorName);
376
- const errorCode = errorCodeBaseOffset + codeOffset;
377
- const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);
378
- const err = new SolanaError(errorCode, errorContext);
379
- if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
380
- Error.captureStackTrace(err, constructorOpt);
381
- }
382
- return err;
383
- }
384
-
385
- // src/instruction-error.ts
386
- var ORDERED_ERROR_NAMES = [
387
- // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs
388
- // If this list ever gets too large, consider implementing a compression strategy like this:
389
- // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
390
- "GenericError",
391
- "InvalidArgument",
392
- "InvalidInstructionData",
393
- "InvalidAccountData",
394
- "AccountDataTooSmall",
395
- "InsufficientFunds",
396
- "IncorrectProgramId",
397
- "MissingRequiredSignature",
398
- "AccountAlreadyInitialized",
399
- "UninitializedAccount",
400
- "UnbalancedInstruction",
401
- "ModifiedProgramId",
402
- "ExternalAccountLamportSpend",
403
- "ExternalAccountDataModified",
404
- "ReadonlyLamportChange",
405
- "ReadonlyDataModified",
406
- "DuplicateAccountIndex",
407
- "ExecutableModified",
408
- "RentEpochModified",
409
- "NotEnoughAccountKeys",
410
- "AccountDataSizeChanged",
411
- "AccountNotExecutable",
412
- "AccountBorrowFailed",
413
- "AccountBorrowOutstanding",
414
- "DuplicateAccountOutOfSync",
415
- "Custom",
416
- "InvalidError",
417
- "ExecutableDataModified",
418
- "ExecutableLamportChange",
419
- "ExecutableAccountNotRentExempt",
420
- "UnsupportedProgramId",
421
- "CallDepth",
422
- "MissingAccount",
423
- "ReentrancyNotAllowed",
424
- "MaxSeedLengthExceeded",
425
- "InvalidSeeds",
426
- "InvalidRealloc",
427
- "ComputationalBudgetExceeded",
428
- "PrivilegeEscalation",
429
- "ProgramEnvironmentSetupFailure",
430
- "ProgramFailedToComplete",
431
- "ProgramFailedToCompile",
432
- "Immutable",
433
- "IncorrectAuthority",
434
- "BorshIoError",
435
- "AccountNotRentExempt",
436
- "InvalidAccountOwner",
437
- "ArithmeticOverflow",
438
- "UnsupportedSysvar",
439
- "IllegalOwner",
440
- "MaxAccountsDataAllocationsExceeded",
441
- "MaxAccountsExceeded",
442
- "MaxInstructionTraceLengthExceeded",
443
- "BuiltinProgramsMustConsumeComputeUnits"
444
- ];
445
- function getSolanaErrorFromInstructionError(index, instructionError) {
446
- return getSolanaErrorFromRpcError(
447
- {
448
- errorCodeBaseOffset: 4615001,
449
- getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
450
- if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_UNKNOWN) {
451
- return {
452
- errorName: rpcErrorName,
453
- index,
454
- ...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null
455
- };
456
- } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_CUSTOM) {
457
- return {
458
- code: rpcErrorContext,
459
- index
460
- };
461
- } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR_BORSH_IO_ERROR) {
462
- return {
463
- encodedData: rpcErrorContext,
464
- index
465
- };
466
- }
467
- return { index };
468
- },
469
- orderedErrorNames: ORDERED_ERROR_NAMES,
470
- rpcEnumError: instructionError
471
- },
472
- getSolanaErrorFromInstructionError
473
- );
474
- }
475
-
476
175
  // src/transaction-error.ts
477
- var ORDERED_ERROR_NAMES2 = [
176
+ var ORDERED_ERROR_NAMES = [
478
177
  // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs
479
178
  // If this list ever gets too large, consider implementing a compression strategy like this:
480
179
  // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47
@@ -486,7 +185,7 @@ var ORDERED_ERROR_NAMES2 = [
486
185
  "InvalidAccountForFee",
487
186
  "AlreadyProcessed",
488
187
  "BlockhashNotFound",
489
- // `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`
188
+ // `InstructionError` intentionally omitted
490
189
  "CallChainTooDeep",
491
190
  "MissingSignatureForFee",
492
191
  "InvalidAccountIndex",
@@ -517,37 +216,57 @@ var ORDERED_ERROR_NAMES2 = [
517
216
  "UnbalancedTransaction"
518
217
  ];
519
218
  function getSolanaErrorFromTransactionError(transactionError) {
520
- if (typeof transactionError === "object" && "InstructionError" in transactionError) {
521
- return getSolanaErrorFromInstructionError(
522
- ...transactionError.InstructionError
523
- );
219
+ let errorName;
220
+ let transactionErrorContext;
221
+ if (typeof transactionError === "string") {
222
+ errorName = transactionError;
223
+ } else {
224
+ errorName = Object.keys(transactionError)[0];
225
+ transactionErrorContext = transactionError[errorName];
524
226
  }
525
- return getSolanaErrorFromRpcError(
526
- {
527
- errorCodeBaseOffset: 7050001,
528
- getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {
529
- if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_UNKNOWN) {
530
- return {
531
- errorName: rpcErrorName,
532
- ...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null
533
- };
534
- } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_DUPLICATE_INSTRUCTION) {
535
- return {
536
- index: rpcErrorContext
537
- };
538
- } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR_INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR_PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {
539
- return {
540
- accountIndex: rpcErrorContext.account_index
541
- };
542
- }
543
- },
544
- orderedErrorNames: ORDERED_ERROR_NAMES2,
545
- rpcEnumError: transactionError
546
- },
547
- getSolanaErrorFromTransactionError
227
+ const codeOffset = ORDERED_ERROR_NAMES.indexOf(errorName);
228
+ const errorCode = (
229
+ /**
230
+ * Oh, hello. You might wonder what in tarnation is going on here. Allow us to explain.
231
+ *
232
+ * One of the goals of `@solana/errors` is to allow errors that are not interesting to your
233
+ * application to shake out of your app bundle in production. This means that we must never
234
+ * export large hardcoded maps of error codes/messages.
235
+ *
236
+ * Unfortunately, where transaction errors from the RPC are concerned, we have no choice but
237
+ * to keep a map between the RPC `TransactionError` enum name and its corresponding
238
+ * `SolanaError` code. In the interest of implementing that map in as few bytes of source
239
+ * code as possible, we do the following:
240
+ *
241
+ * 1. Reserve sequential error codes for `TransactionError` in the range [7050000-7050999]
242
+ * 2. Hardcode the list of `TransactionError` enum names in that same order
243
+ * 3. Match the transaction error name from the RPC with its index in that list, and
244
+ * reconstruct the `SolanaError` code by adding 7050001 to that index
245
+ */
246
+ 7050001 + codeOffset
548
247
  );
248
+ let errorContext;
249
+ if (codeOffset === -1) {
250
+ errorContext = {
251
+ errorName,
252
+ ...transactionErrorContext !== void 0 ? { transactionErrorContext } : null
253
+ };
254
+ } else if (codeOffset === 29) {
255
+ errorContext = {
256
+ index: transactionErrorContext
257
+ };
258
+ } else if (codeOffset === 30 || codeOffset === 34) {
259
+ errorContext = {
260
+ accountIndex: transactionErrorContext.account_index
261
+ };
262
+ }
263
+ const err = new SolanaError(errorCode, errorContext);
264
+ if ("captureStackTrace" in Error && typeof Error.captureStackTrace === "function") {
265
+ Error.captureStackTrace(err, getSolanaErrorFromTransactionError);
266
+ }
267
+ return err;
549
268
  }
550
269
 
551
- export { SOLANA_ERROR__ACCOUNT_NOT_FOUND, SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__CODECS_CANNOT_DECODE_EMPTY_BYTE_ARRAY, SOLANA_ERROR__CODECS_CANNOT_REVERSE_CODEC_OF_VARIABLE_SIZE, SOLANA_ERROR__CODECS_ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH, SOLANA_ERROR__CODECS_EXPECTED_FIXED_LENGTH_GOT_VARIABLE_LENGTH, SOLANA_ERROR__CODECS_EXPECTED_VARIABLE_LENGTH_GOT_FIXED_LENGTH, SOLANA_ERROR__CODECS_FIXED_SIZE_ENCODER_DECODER_SIZE_MISMATCH, SOLANA_ERROR__CODECS_VARIABLE_SIZE_ENCODER_DECODER_MAX_SIZE_MISMATCH, SOLANA_ERROR__CODECS_WRONG_NUMBER_OF_BYTES, SOLANA_ERROR__COULD_NOT_FIND_VIABLE_PDA_BUMP_SEED, SOLANA_ERROR__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_BYTE_LENGTH, SOLANA_ERROR__INCORRECT_BASE58_ADDRESS_LENGTH, 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__INVALID_SEEDS_POINT_ON_CURVE, SOLANA_ERROR__MALFORMED_PROGRAM_DERIVED_ADDRESS, SOLANA_ERROR__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED, SOLANA_ERROR__MAX_PDA_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__MULTIPLE_ACCOUNTS_NOT_FOUND, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__NOT_ALL_ACCOUNTS_DECODED, SOLANA_ERROR__NOT_AN_ED25519_PUBLIC_KEY, SOLANA_ERROR__NOT_A_BASE58_ENCODED_ADDRESS, SOLANA_ERROR__PROGRAM_ADDRESS_ENDS_WITH_PDA_MARKER, SOLANA_ERROR__PROGRAM_DERIVED_ADDRESS_BUMP_SEED_OUT_OF_RANGE, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__SUBTLE_CRYPTO_DIGEST_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_ED25519_ALGORITHM_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_EXPORT_FUNCTION_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_GENERATE_FUNCTION_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_SIGN_FUNCTION_MISSING, SOLANA_ERROR__SUBTLE_CRYPTO_VERIFY_FUNCTION_MISSING, 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_EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION_EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING, SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_FEE_PAYER_MISSING, SOLANA_ERROR__TRANSACTION_FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND, SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_CANNOT_PAY_FEES, SOLANA_ERROR__TRANSACTION_INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SOLANA_ERROR__TRANSACTION_VERSION_NUMBER_OUT_OF_RANGE, SolanaError, getSolanaErrorFromInstructionError, getSolanaErrorFromTransactionError, isSolanaError };
270
+ 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_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, getSolanaErrorFromTransactionError, isSolanaError };
552
271
  //# sourceMappingURL=out.js.map
553
272
  //# sourceMappingURL=index.browser.js.map