@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.browser.cjs.js +14 -17
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +15 -17
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +14 -17
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +0 -8
- package/lib/index.esm.js +15 -17
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +14 -17
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/package.json +4 -4
- package/src/loader.ts +2 -1
- package/src/message.ts +1 -1
- package/src/transaction-constants.ts +10 -0
- package/src/transaction.ts +7 -16
package/lib/index.browser.cjs.js
CHANGED
|
@@ -2108,6 +2108,16 @@ class Account {
|
|
|
2108
2108
|
|
|
2109
2109
|
const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');
|
|
2110
2110
|
|
|
2111
|
+
/**
|
|
2112
|
+
* Maximum over-the-wire size of a Transaction
|
|
2113
|
+
*
|
|
2114
|
+
* 1280 is IPv6 minimum MTU
|
|
2115
|
+
* 40 bytes is the size of the IPv6 header
|
|
2116
|
+
* 8 bytes is the size of the fragment header
|
|
2117
|
+
*/
|
|
2118
|
+
const PACKET_DATA_SIZE = 1280 - 40 - 8;
|
|
2119
|
+
const SIGNATURE_LENGTH_IN_BYTES = 64;
|
|
2120
|
+
|
|
2111
2121
|
/**
|
|
2112
2122
|
* Layout for a public key
|
|
2113
2123
|
*/
|
|
@@ -2367,20 +2377,8 @@ function assert (condition, message) {
|
|
|
2367
2377
|
|
|
2368
2378
|
/**
|
|
2369
2379
|
* Default (empty) signature
|
|
2370
|
-
*
|
|
2371
|
-
* Signatures are 64 bytes in length
|
|
2372
2380
|
*/
|
|
2373
|
-
const DEFAULT_SIGNATURE = buffer.Buffer.alloc(
|
|
2374
|
-
/**
|
|
2375
|
-
* Maximum over-the-wire size of a Transaction
|
|
2376
|
-
*
|
|
2377
|
-
* 1280 is IPv6 minimum MTU
|
|
2378
|
-
* 40 bytes is the size of the IPv6 header
|
|
2379
|
-
* 8 bytes is the size of the fragment header
|
|
2380
|
-
*/
|
|
2381
|
-
|
|
2382
|
-
const PACKET_DATA_SIZE = 1280 - 40 - 8;
|
|
2383
|
-
const SIGNATURE_LENGTH = 64;
|
|
2381
|
+
const DEFAULT_SIGNATURE = buffer.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);
|
|
2384
2382
|
/**
|
|
2385
2383
|
* Account metadata used to define instructions
|
|
2386
2384
|
*/
|
|
@@ -3010,8 +3008,8 @@ class Transaction {
|
|
|
3010
3008
|
let signatures = [];
|
|
3011
3009
|
|
|
3012
3010
|
for (let i = 0; i < signatureCount; i++) {
|
|
3013
|
-
const signature = byteArray.slice(0,
|
|
3014
|
-
byteArray = byteArray.slice(
|
|
3011
|
+
const signature = byteArray.slice(0, SIGNATURE_LENGTH_IN_BYTES);
|
|
3012
|
+
byteArray = byteArray.slice(SIGNATURE_LENGTH_IN_BYTES);
|
|
3015
3013
|
signatures.push(bs58__default["default"].encode(buffer.Buffer.from(signature)));
|
|
3016
3014
|
}
|
|
3017
3015
|
|
|
@@ -3900,11 +3898,11 @@ class SystemProgram {
|
|
|
3900
3898
|
}
|
|
3901
3899
|
SystemProgram.programId = new PublicKey('11111111111111111111111111111111');
|
|
3902
3900
|
|
|
3903
|
-
// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the
|
|
3904
3901
|
// rest of the Transaction fields
|
|
3905
3902
|
//
|
|
3906
3903
|
// TODO: replace 300 with a proper constant for the size of the other
|
|
3907
3904
|
// Transaction fields
|
|
3905
|
+
|
|
3908
3906
|
const CHUNK_SIZE = PACKET_DATA_SIZE - 300;
|
|
3909
3907
|
/**
|
|
3910
3908
|
* Program loader interface
|
|
@@ -10053,7 +10051,6 @@ exports.MAX_SEED_LENGTH = MAX_SEED_LENGTH;
|
|
|
10053
10051
|
exports.Message = Message;
|
|
10054
10052
|
exports.NONCE_ACCOUNT_LENGTH = NONCE_ACCOUNT_LENGTH;
|
|
10055
10053
|
exports.NonceAccount = NonceAccount;
|
|
10056
|
-
exports.PACKET_DATA_SIZE = PACKET_DATA_SIZE;
|
|
10057
10054
|
exports.PublicKey = PublicKey;
|
|
10058
10055
|
exports.SOLANA_SCHEMA = SOLANA_SCHEMA;
|
|
10059
10056
|
exports.STAKE_CONFIG_ID = STAKE_CONFIG_ID;
|