@solana/web3.js 1.43.0 → 1.43.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 +36 -4
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +34 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +36 -4
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +34 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +11848 -12238
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +4 -2
- package/lib/index.iife.min.js.map +1 -1
- package/package.json +3 -3
- package/src/compute-budget.ts +1 -1
- package/src/system-program.ts +1 -1
- package/src/util/bigint.ts +43 -0
package/lib/index.browser.esm.js
CHANGED
|
@@ -4,7 +4,8 @@ import BN from 'bn.js';
|
|
|
4
4
|
import bs58 from 'bs58';
|
|
5
5
|
import { serialize, deserialize, deserializeUnchecked } from 'borsh';
|
|
6
6
|
import * as BufferLayout from '@solana/buffer-layout';
|
|
7
|
-
import {
|
|
7
|
+
import { blob } from '@solana/buffer-layout';
|
|
8
|
+
import { toBigIntLE, toBufferLE } from 'bigint-buffer';
|
|
8
9
|
import { coerce, instance, string, tuple, literal, unknown, union, type, optional, any, number, array, nullable, create, boolean, record, assert as assert$7 } from 'superstruct';
|
|
9
10
|
import { Client } from 'rpc-websockets';
|
|
10
11
|
import RpcClient from 'jayson/lib/client/browser';
|
|
@@ -3175,6 +3176,38 @@ class NonceAccount {
|
|
|
3175
3176
|
|
|
3176
3177
|
}
|
|
3177
3178
|
|
|
3179
|
+
const encodeDecode = layout => {
|
|
3180
|
+
const decode = layout.decode.bind(layout);
|
|
3181
|
+
const encode = layout.encode.bind(layout);
|
|
3182
|
+
return {
|
|
3183
|
+
decode,
|
|
3184
|
+
encode
|
|
3185
|
+
};
|
|
3186
|
+
};
|
|
3187
|
+
|
|
3188
|
+
const bigInt = length => property => {
|
|
3189
|
+
const layout = blob(length, property);
|
|
3190
|
+
const {
|
|
3191
|
+
encode,
|
|
3192
|
+
decode
|
|
3193
|
+
} = encodeDecode(layout);
|
|
3194
|
+
const bigIntLayout = layout;
|
|
3195
|
+
|
|
3196
|
+
bigIntLayout.decode = (buffer, offset) => {
|
|
3197
|
+
const src = decode(buffer, offset);
|
|
3198
|
+
return toBigIntLE(Buffer.from(src));
|
|
3199
|
+
};
|
|
3200
|
+
|
|
3201
|
+
bigIntLayout.encode = (bigInt, buffer, offset) => {
|
|
3202
|
+
const src = toBufferLE(bigInt, length);
|
|
3203
|
+
return encode(src, buffer, offset);
|
|
3204
|
+
};
|
|
3205
|
+
|
|
3206
|
+
return bigIntLayout;
|
|
3207
|
+
};
|
|
3208
|
+
|
|
3209
|
+
const u64 = bigInt(8);
|
|
3210
|
+
|
|
3178
3211
|
/**
|
|
3179
3212
|
* Create account system transaction params
|
|
3180
3213
|
*/
|