@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.d.ts CHANGED
@@ -338,14 +338,6 @@ declare module '@solana/web3.js' {
338
338
  * Transaction signature as base-58 encoded string
339
339
  */
340
340
  export type TransactionSignature = string;
341
- /**
342
- * Maximum over-the-wire size of a Transaction
343
- *
344
- * 1280 is IPv6 minimum MTU
345
- * 40 bytes is the size of the IPv6 header
346
- * 8 bytes is the size of the fragment header
347
- */
348
- export const PACKET_DATA_SIZE: number;
349
341
  /**
350
342
  * Account metadata used to define instructions
351
343
  */
package/lib/index.esm.js CHANGED
@@ -2085,6 +2085,16 @@ class Account {
2085
2085
 
2086
2086
  const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');
2087
2087
 
2088
+ /**
2089
+ * Maximum over-the-wire size of a Transaction
2090
+ *
2091
+ * 1280 is IPv6 minimum MTU
2092
+ * 40 bytes is the size of the IPv6 header
2093
+ * 8 bytes is the size of the fragment header
2094
+ */
2095
+ const PACKET_DATA_SIZE = 1280 - 40 - 8;
2096
+ const SIGNATURE_LENGTH_IN_BYTES = 64;
2097
+
2088
2098
  /**
2089
2099
  * Layout for a public key
2090
2100
  */
@@ -2344,20 +2354,8 @@ function assert (condition, message) {
2344
2354
 
2345
2355
  /**
2346
2356
  * Default (empty) signature
2347
- *
2348
- * Signatures are 64 bytes in length
2349
2357
  */
2350
- const DEFAULT_SIGNATURE = Buffer.alloc(64).fill(0);
2351
- /**
2352
- * Maximum over-the-wire size of a Transaction
2353
- *
2354
- * 1280 is IPv6 minimum MTU
2355
- * 40 bytes is the size of the IPv6 header
2356
- * 8 bytes is the size of the fragment header
2357
- */
2358
-
2359
- const PACKET_DATA_SIZE = 1280 - 40 - 8;
2360
- const SIGNATURE_LENGTH = 64;
2358
+ const DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
2361
2359
  /**
2362
2360
  * Account metadata used to define instructions
2363
2361
  */
@@ -2987,8 +2985,8 @@ class Transaction {
2987
2985
  let signatures = [];
2988
2986
 
2989
2987
  for (let i = 0; i < signatureCount; i++) {
2990
- const signature = byteArray.slice(0, SIGNATURE_LENGTH);
2991
- byteArray = byteArray.slice(SIGNATURE_LENGTH);
2988
+ const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
2989
+ byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
2992
2990
  signatures.push(bs58.encode(Buffer.from(signature)));
2993
2991
  }
2994
2992
 
@@ -3877,11 +3875,11 @@ class SystemProgram {
3877
3875
  }
3878
3876
  SystemProgram.programId = new PublicKey('11111111111111111111111111111111');
3879
3877
 
3880
- // Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
3881
3878
  // rest of the Transaction fields
3882
3879
  //
3883
3880
  // TODO: replace 300 with a proper constant for the size of the other
3884
3881
  // Transaction fields
3882
+
3885
3883
  const CHUNK_SIZE = PACKET_DATA_SIZE - 300;
3886
3884
  /**
3887
3885
  * Program loader interface
@@ -9502,5 +9500,5 @@ function clusterApiUrl(cluster, tls) {
9502
9500
 
9503
9501
  const LAMPORTS_PER_SOL = 1000000000;
9504
9502
 
9505
- export { Account, Authorized, BLOCKHASH_CACHE_TIMEOUT_MS, BPF_LOADER_DEPRECATED_PROGRAM_ID, BPF_LOADER_PROGRAM_ID, BpfLoader, COMPUTE_BUDGET_INSTRUCTION_LAYOUTS, ComputeBudgetInstruction, ComputeBudgetProgram, Connection, Ed25519Program, Enum, EpochSchedule, FeeCalculatorLayout, Keypair, LAMPORTS_PER_SOL, Loader, Lockup, MAX_SEED_LENGTH, Message, NONCE_ACCOUNT_LENGTH, NonceAccount, PACKET_DATA_SIZE, PublicKey, SOLANA_SCHEMA, STAKE_CONFIG_ID, STAKE_INSTRUCTION_LAYOUTS, SYSTEM_INSTRUCTION_LAYOUTS, SYSVAR_CLOCK_PUBKEY, SYSVAR_EPOCH_SCHEDULE_PUBKEY, SYSVAR_INSTRUCTIONS_PUBKEY, SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY, SYSVAR_REWARDS_PUBKEY, SYSVAR_SLOT_HASHES_PUBKEY, SYSVAR_SLOT_HISTORY_PUBKEY, SYSVAR_STAKE_HISTORY_PUBKEY, Secp256k1Program, SendTransactionError, StakeAuthorizationLayout, StakeInstruction, StakeProgram, Struct, SystemInstruction, SystemProgram, Transaction, TransactionInstruction, VALIDATOR_INFO_KEY, VOTE_PROGRAM_ID, ValidatorInfo, VoteAccount, VoteAuthorizationLayout, VoteInit, VoteInstruction, VoteProgram, clusterApiUrl, sendAndConfirmRawTransaction, sendAndConfirmTransaction };
9503
+ export { Account, Authorized, BLOCKHASH_CACHE_TIMEOUT_MS, BPF_LOADER_DEPRECATED_PROGRAM_ID, BPF_LOADER_PROGRAM_ID, BpfLoader, COMPUTE_BUDGET_INSTRUCTION_LAYOUTS, ComputeBudgetInstruction, ComputeBudgetProgram, Connection, Ed25519Program, Enum, EpochSchedule, FeeCalculatorLayout, Keypair, LAMPORTS_PER_SOL, Loader, Lockup, MAX_SEED_LENGTH, Message, NONCE_ACCOUNT_LENGTH, NonceAccount, PublicKey, SOLANA_SCHEMA, STAKE_CONFIG_ID, STAKE_INSTRUCTION_LAYOUTS, SYSTEM_INSTRUCTION_LAYOUTS, SYSVAR_CLOCK_PUBKEY, SYSVAR_EPOCH_SCHEDULE_PUBKEY, SYSVAR_INSTRUCTIONS_PUBKEY, SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY, SYSVAR_REWARDS_PUBKEY, SYSVAR_SLOT_HASHES_PUBKEY, SYSVAR_SLOT_HISTORY_PUBKEY, SYSVAR_STAKE_HISTORY_PUBKEY, Secp256k1Program, SendTransactionError, StakeAuthorizationLayout, StakeInstruction, StakeProgram, Struct, SystemInstruction, SystemProgram, Transaction, TransactionInstruction, VALIDATOR_INFO_KEY, VOTE_PROGRAM_ID, ValidatorInfo, VoteAccount, VoteAuthorizationLayout, VoteInit, VoteInstruction, VoteProgram, clusterApiUrl, sendAndConfirmRawTransaction, sendAndConfirmTransaction };
9506
9504
  //# sourceMappingURL=index.esm.js.map