@solana/web3.js 1.41.0 → 1.41.1

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.
package/lib/index.cjs.js CHANGED
@@ -2120,6 +2120,16 @@ class Account {
2120
2120
 
2121
2121
  const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');
2122
2122
 
2123
+ /**
2124
+ * Maximum over-the-wire size of a Transaction
2125
+ *
2126
+ * 1280 is IPv6 minimum MTU
2127
+ * 40 bytes is the size of the IPv6 header
2128
+ * 8 bytes is the size of the fragment header
2129
+ */
2130
+ const PACKET_DATA_SIZE = 1280 - 40 - 8;
2131
+ const SIGNATURE_LENGTH_IN_BYTES = 64;
2132
+
2123
2133
  /**
2124
2134
  * Layout for a public key
2125
2135
  */
@@ -2379,20 +2389,8 @@ function assert (condition, message) {
2379
2389
 
2380
2390
  /**
2381
2391
  * Default (empty) signature
2382
- *
2383
- * Signatures are 64 bytes in length
2384
2392
  */
2385
- const DEFAULT_SIGNATURE = buffer.Buffer.alloc(64).fill(0);
2386
- /**
2387
- * Maximum over-the-wire size of a Transaction
2388
- *
2389
- * 1280 is IPv6 minimum MTU
2390
- * 40 bytes is the size of the IPv6 header
2391
- * 8 bytes is the size of the fragment header
2392
- */
2393
-
2394
- const PACKET_DATA_SIZE = 1280 - 40 - 8;
2395
- const SIGNATURE_LENGTH = 64;
2393
+ const DEFAULT_SIGNATURE = buffer.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
2396
2394
  /**
2397
2395
  * Account metadata used to define instructions
2398
2396
  */
@@ -3022,8 +3020,8 @@ class Transaction {
3022
3020
  let signatures = [];
3023
3021
 
3024
3022
  for (let i = 0; i < signatureCount; i++) {
3025
- const signature = byteArray.slice(0, SIGNATURE_LENGTH);
3026
- byteArray = byteArray.slice(SIGNATURE_LENGTH);
3023
+ const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
3024
+ byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
3027
3025
  signatures.push(bs58__default["default"].encode(buffer.Buffer.from(signature)));
3028
3026
  }
3029
3027
 
@@ -3912,11 +3910,11 @@ class SystemProgram {
3912
3910
  }
3913
3911
  SystemProgram.programId = new PublicKey('11111111111111111111111111111111');
3914
3912
 
3915
- // Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
3916
3913
  // rest of the Transaction fields
3917
3914
  //
3918
3915
  // TODO: replace 300 with a proper constant for the size of the other
3919
3916
  // Transaction fields
3917
+
3920
3918
  const CHUNK_SIZE = PACKET_DATA_SIZE - 300;
3921
3919
  /**
3922
3920
  * Program loader interface
@@ -9559,7 +9557,6 @@ exports.MAX_SEED_LENGTH = MAX_SEED_LENGTH;
9559
9557
  exports.Message = Message;
9560
9558
  exports.NONCE_ACCOUNT_LENGTH = NONCE_ACCOUNT_LENGTH;
9561
9559
  exports.NonceAccount = NonceAccount;
9562
- exports.PACKET_DATA_SIZE = PACKET_DATA_SIZE;
9563
9560
  exports.PublicKey = PublicKey;
9564
9561
  exports.SOLANA_SCHEMA = SOLANA_SCHEMA;
9565
9562
  exports.STAKE_CONFIG_ID = STAKE_CONFIG_ID;