@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.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import { sha256 } from '@noble/hashes/sha256';
|
|
|
6
6
|
import { serialize, deserialize, deserializeUnchecked } from 'borsh';
|
|
7
7
|
import * as BufferLayout from '@solana/buffer-layout';
|
|
8
8
|
import { blob } from '@solana/buffer-layout';
|
|
9
|
-
import {
|
|
9
|
+
import { getU64Codec, getU64Encoder } from '@solana/codecs-numbers';
|
|
10
10
|
import require$$0 from 'util';
|
|
11
11
|
import require$$0$1 from 'http';
|
|
12
12
|
import require$$0$2, { Agent } from 'https';
|
|
@@ -2377,32 +2377,22 @@ class NonceAccount {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
2379
|
|
|
2380
|
-
|
|
2380
|
+
function u64(property) {
|
|
2381
|
+
const layout = blob(8 /* bytes */, property);
|
|
2381
2382
|
const decode = layout.decode.bind(layout);
|
|
2382
2383
|
const encode = layout.encode.bind(layout);
|
|
2383
|
-
return {
|
|
2384
|
-
decode,
|
|
2385
|
-
encode
|
|
2386
|
-
};
|
|
2387
|
-
};
|
|
2388
|
-
const bigInt = length => property => {
|
|
2389
|
-
const layout = blob(length, property);
|
|
2390
|
-
const {
|
|
2391
|
-
encode,
|
|
2392
|
-
decode
|
|
2393
|
-
} = encodeDecode(layout);
|
|
2394
2384
|
const bigIntLayout = layout;
|
|
2385
|
+
const codec = getU64Codec();
|
|
2395
2386
|
bigIntLayout.decode = (buffer, offset) => {
|
|
2396
2387
|
const src = decode(buffer, offset);
|
|
2397
|
-
return
|
|
2388
|
+
return codec.decode(src);
|
|
2398
2389
|
};
|
|
2399
2390
|
bigIntLayout.encode = (bigInt, buffer, offset) => {
|
|
2400
|
-
const src =
|
|
2391
|
+
const src = codec.encode(bigInt);
|
|
2401
2392
|
return encode(src, buffer, offset);
|
|
2402
2393
|
};
|
|
2403
2394
|
return bigIntLayout;
|
|
2404
|
-
}
|
|
2405
|
-
const u64 = bigInt(8);
|
|
2395
|
+
}
|
|
2406
2396
|
|
|
2407
2397
|
/**
|
|
2408
2398
|
* Create account system transaction params
|
|
@@ -9142,7 +9132,7 @@ class AddressLookupTableProgram {
|
|
|
9142
9132
|
*/
|
|
9143
9133
|
constructor() {}
|
|
9144
9134
|
static createLookupTable(params) {
|
|
9145
|
-
const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(),
|
|
9135
|
+
const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);
|
|
9146
9136
|
const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;
|
|
9147
9137
|
const data = encodeData(type, {
|
|
9148
9138
|
recentSlot: BigInt(params.recentSlot),
|