@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.
@@ -2076,6 +2076,16 @@ class Account {
2076
2076
 
2077
2077
  const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');
2078
2078
 
2079
+ /**
2080
+ * Maximum over-the-wire size of a Transaction
2081
+ *
2082
+ * 1280 is IPv6 minimum MTU
2083
+ * 40 bytes is the size of the IPv6 header
2084
+ * 8 bytes is the size of the fragment header
2085
+ */
2086
+ const PACKET_DATA_SIZE = 1280 - 40 - 8;
2087
+ const SIGNATURE_LENGTH_IN_BYTES = 64;
2088
+
2079
2089
  /**
2080
2090
  * Layout for a public key
2081
2091
  */
@@ -2335,20 +2345,8 @@ function assert (condition, message) {
2335
2345
 
2336
2346
  /**
2337
2347
  * Default (empty) signature
2338
- *
2339
- * Signatures are 64 bytes in length
2340
2348
  */
2341
- const DEFAULT_SIGNATURE = Buffer.alloc(64).fill(0);
2342
- /**
2343
- * Maximum over-the-wire size of a Transaction
2344
- *
2345
- * 1280 is IPv6 minimum MTU
2346
- * 40 bytes is the size of the IPv6 header
2347
- * 8 bytes is the size of the fragment header
2348
- */
2349
-
2350
- const PACKET_DATA_SIZE = 1280 - 40 - 8;
2351
- const SIGNATURE_LENGTH = 64;
2349
+ const DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
2352
2350
  /**
2353
2351
  * Account metadata used to define instructions
2354
2352
  */
@@ -2978,8 +2976,8 @@ class Transaction {
2978
2976
  let signatures = [];
2979
2977
 
2980
2978
  for (let i = 0; i < signatureCount; i++) {
2981
- const signature = byteArray.slice(0, SIGNATURE_LENGTH);
2982
- byteArray = byteArray.slice(SIGNATURE_LENGTH);
2979
+ const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
2980
+ byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
2983
2981
  signatures.push(bs58.encode(Buffer.from(signature)));
2984
2982
  }
2985
2983
 
@@ -3868,11 +3866,11 @@ class SystemProgram {
3868
3866
  }
3869
3867
  SystemProgram.programId = new PublicKey('11111111111111111111111111111111');
3870
3868
 
3871
- // Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
3872
3869
  // rest of the Transaction fields
3873
3870
  //
3874
3871
  // TODO: replace 300 with a proper constant for the size of the other
3875
3872
  // Transaction fields
3873
+
3876
3874
  const CHUNK_SIZE = PACKET_DATA_SIZE - 300;
3877
3875
  /**
3878
3876
  * Program loader interface
@@ -9999,5 +9997,5 @@ function clusterApiUrl(cluster, tls) {
9999
9997
 
10000
9998
  const LAMPORTS_PER_SOL = 1000000000;
10001
9999
 
10002
- 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 };
10000
+ 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 };
10003
10001
  //# sourceMappingURL=index.browser.esm.js.map