@solana/kit 4.0.0-canary-20250930051855 → 4.0.0-canary-20250930084738

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.
@@ -163,6 +163,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
163
163
  var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;
164
164
  var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;
165
165
  var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;
166
+ var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED = 5663021;
166
167
  var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;
167
168
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;
168
169
  var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;
@@ -479,7 +480,8 @@ this.globalThis.solanaWeb3 = (function (exports) {
479
480
  [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",
480
481
  [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: "The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",
481
482
  [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: "Transaction is missing signatures for addresses: $addresses.",
482
- [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: "Transaction version must be in the range [0, 127]. `$actualVersion` given"
483
+ [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: "Transaction version must be in the range [0, 127]. `$actualVersion` given",
484
+ [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED]: "This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 0."
483
485
  };
484
486
  var START_INDEX = "i";
485
487
  var TYPE = "t";
@@ -3500,6 +3502,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
3500
3502
  }
3501
3503
  return memoizedGetInstructionDecoder;
3502
3504
  }
3505
+ var MAX_SUPPORTED_TRANSACTION_VERSION = 0;
3503
3506
  var VERSION_FLAG_MASK = 128;
3504
3507
  function getTransactionVersionEncoder() {
3505
3508
  return createEncoder({
@@ -3514,6 +3517,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
3514
3517
  actualVersion: value
3515
3518
  });
3516
3519
  }
3520
+ if (value > MAX_SUPPORTED_TRANSACTION_VERSION) {
3521
+ throw new SolanaError(SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED, {
3522
+ unsupportedVersion: value
3523
+ });
3524
+ }
3517
3525
  bytes.set([value | VERSION_FLAG_MASK], offset);
3518
3526
  return offset + 1;
3519
3527
  }
@@ -3528,6 +3536,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
3528
3536
  return ["legacy", offset];
3529
3537
  } else {
3530
3538
  const version = firstByte ^ VERSION_FLAG_MASK;
3539
+ if (version > MAX_SUPPORTED_TRANSACTION_VERSION) {
3540
+ throw new SolanaError(SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED, {
3541
+ unsupportedVersion: version
3542
+ });
3543
+ }
3531
3544
  return [version, offset + 1];
3532
3545
  }
3533
3546
  }
@@ -6127,7 +6140,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
6127
6140
  ...config.headers ? normalizeHeaders2(config.headers) : void 0,
6128
6141
  ...{
6129
6142
  // Keep these headers lowercase so they will override any user-supplied headers above.
6130
- "solana-client": `js/${"4.0.0-canary-20250930051855"}`
6143
+ "solana-client": `js/${"4.0.0-canary-20250930084738"}`
6131
6144
  }
6132
6145
  }
6133
6146
  }),
@@ -8039,6 +8052,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
8039
8052
  exports.DEFAULT_RPC_CONFIG = DEFAULT_RPC_CONFIG;
8040
8053
  exports.DEFAULT_RPC_SUBSCRIPTIONS_CONFIG = DEFAULT_RPC_SUBSCRIPTIONS_CONFIG;
8041
8054
  exports.Endian = Endian;
8055
+ exports.MAX_SUPPORTED_TRANSACTION_VERSION = MAX_SUPPORTED_TRANSACTION_VERSION;
8042
8056
  exports.SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND;
8043
8057
  exports.SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED;
8044
8058
  exports.SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT;
@@ -8274,6 +8288,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
8274
8288
  exports.SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE;
8275
8289
  exports.SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH;
8276
8290
  exports.SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING;
8291
+ exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED;
8277
8292
  exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE;
8278
8293
  exports.SolanaError = SolanaError;
8279
8294
  exports.TRANSACTION_PACKET_HEADER = TRANSACTION_PACKET_HEADER;