@solana/web3.js 1.98.0 → 1.98.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/README.md +4 -4
- package/lib/index.browser.cjs.js +10 -20
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +8 -18
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +10 -20
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +8 -18
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +208 -87
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +10 -20
- package/lib/index.native.js.map +1 -1
- package/package.json +5 -5
- package/src/programs/address-lookup-table/index.ts +5 -2
- package/src/utils/bigint.ts +14 -33
package/lib/index.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var bs58 = require('bs58');
|
|
|
7
7
|
var sha256 = require('@noble/hashes/sha256');
|
|
8
8
|
var borsh = require('borsh');
|
|
9
9
|
var BufferLayout = require('@solana/buffer-layout');
|
|
10
|
-
var
|
|
10
|
+
var codecsNumbers = require('@solana/codecs-numbers');
|
|
11
11
|
var require$$0 = require('util');
|
|
12
12
|
var require$$0$1 = require('http');
|
|
13
13
|
var require$$0$2 = require('https');
|
|
@@ -2407,32 +2407,22 @@ class NonceAccount {
|
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
|
|
2410
|
-
|
|
2410
|
+
function u64(property) {
|
|
2411
|
+
const layout = BufferLayout.blob(8 /* bytes */, property);
|
|
2411
2412
|
const decode = layout.decode.bind(layout);
|
|
2412
2413
|
const encode = layout.encode.bind(layout);
|
|
2413
|
-
return {
|
|
2414
|
-
decode,
|
|
2415
|
-
encode
|
|
2416
|
-
};
|
|
2417
|
-
};
|
|
2418
|
-
const bigInt = length => property => {
|
|
2419
|
-
const layout = BufferLayout.blob(length, property);
|
|
2420
|
-
const {
|
|
2421
|
-
encode,
|
|
2422
|
-
decode
|
|
2423
|
-
} = encodeDecode(layout);
|
|
2424
2414
|
const bigIntLayout = layout;
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2415
|
+
const codec = codecsNumbers.getU64Codec();
|
|
2416
|
+
bigIntLayout.decode = (buffer, offset) => {
|
|
2417
|
+
const src = decode(buffer, offset);
|
|
2418
|
+
return codec.decode(src);
|
|
2428
2419
|
};
|
|
2429
2420
|
bigIntLayout.encode = (bigInt, buffer, offset) => {
|
|
2430
|
-
const src =
|
|
2421
|
+
const src = codec.encode(bigInt);
|
|
2431
2422
|
return encode(src, buffer, offset);
|
|
2432
2423
|
};
|
|
2433
2424
|
return bigIntLayout;
|
|
2434
|
-
}
|
|
2435
|
-
const u64 = bigInt(8);
|
|
2425
|
+
}
|
|
2436
2426
|
|
|
2437
2427
|
/**
|
|
2438
2428
|
* Create account system transaction params
|
|
@@ -9172,7 +9162,7 @@ class AddressLookupTableProgram {
|
|
|
9172
9162
|
*/
|
|
9173
9163
|
constructor() {}
|
|
9174
9164
|
static createLookupTable(params) {
|
|
9175
|
-
const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(),
|
|
9165
|
+
const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), codecsNumbers.getU64Encoder().encode(params.recentSlot)], this.programId);
|
|
9176
9166
|
const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;
|
|
9177
9167
|
const data = encodeData(type, {
|
|
9178
9168
|
recentSlot: BigInt(params.recentSlot),
|