@solana/web3.js 1.91.5 → 1.91.7
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 +78 -72
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +78 -72
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +78 -4
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +78 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +222 -181
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +5 -5
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +78 -72
- package/lib/index.native.js.map +1 -1
- package/package.json +3 -3
- package/src/connection.ts +2 -1
package/lib/index.browser.esm.js
CHANGED
|
@@ -3262,80 +3262,86 @@ class BpfLoader {
|
|
|
3262
3262
|
}
|
|
3263
3263
|
}
|
|
3264
3264
|
|
|
3265
|
-
|
|
3265
|
+
function getDefaultExportFromCjs (x) {
|
|
3266
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3266
3269
|
var objToString = Object.prototype.toString;
|
|
3267
|
-
var objKeys = Object.keys || function
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
};
|
|
3270
|
+
var objKeys = Object.keys || function(obj) {
|
|
3271
|
+
var keys = [];
|
|
3272
|
+
for (var name in obj) {
|
|
3273
|
+
keys.push(name);
|
|
3274
|
+
}
|
|
3275
|
+
return keys;
|
|
3276
|
+
};
|
|
3277
|
+
|
|
3274
3278
|
function stringify(val, isArrayProp) {
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
}
|
|
3331
|
-
}
|
|
3332
|
-
function src_default(val) {
|
|
3333
|
-
const returnVal = stringify(val, false);
|
|
3334
|
-
if (returnVal !== void 0) {
|
|
3335
|
-
return "" + returnVal;
|
|
3336
|
-
}
|
|
3279
|
+
var i, max, str, keys, key, propVal, toStr;
|
|
3280
|
+
if (val === true) {
|
|
3281
|
+
return "true";
|
|
3282
|
+
}
|
|
3283
|
+
if (val === false) {
|
|
3284
|
+
return "false";
|
|
3285
|
+
}
|
|
3286
|
+
switch (typeof val) {
|
|
3287
|
+
case "object":
|
|
3288
|
+
if (val === null) {
|
|
3289
|
+
return null;
|
|
3290
|
+
} else if (val.toJSON && typeof val.toJSON === "function") {
|
|
3291
|
+
return stringify(val.toJSON(), isArrayProp);
|
|
3292
|
+
} else {
|
|
3293
|
+
toStr = objToString.call(val);
|
|
3294
|
+
if (toStr === "[object Array]") {
|
|
3295
|
+
str = '[';
|
|
3296
|
+
max = val.length - 1;
|
|
3297
|
+
for(i = 0; i < max; i++) {
|
|
3298
|
+
str += stringify(val[i], true) + ',';
|
|
3299
|
+
}
|
|
3300
|
+
if (max > -1) {
|
|
3301
|
+
str += stringify(val[i], true);
|
|
3302
|
+
}
|
|
3303
|
+
return str + ']';
|
|
3304
|
+
} else if (toStr === "[object Object]") {
|
|
3305
|
+
// only object is left
|
|
3306
|
+
keys = objKeys(val).sort();
|
|
3307
|
+
max = keys.length;
|
|
3308
|
+
str = "";
|
|
3309
|
+
i = 0;
|
|
3310
|
+
while (i < max) {
|
|
3311
|
+
key = keys[i];
|
|
3312
|
+
propVal = stringify(val[key], false);
|
|
3313
|
+
if (propVal !== undefined) {
|
|
3314
|
+
if (str) {
|
|
3315
|
+
str += ',';
|
|
3316
|
+
}
|
|
3317
|
+
str += JSON.stringify(key) + ':' + propVal;
|
|
3318
|
+
}
|
|
3319
|
+
i++;
|
|
3320
|
+
}
|
|
3321
|
+
return '{' + str + '}';
|
|
3322
|
+
} else {
|
|
3323
|
+
return JSON.stringify(val);
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
case "function":
|
|
3327
|
+
case "undefined":
|
|
3328
|
+
return isArrayProp ? null : undefined;
|
|
3329
|
+
case "string":
|
|
3330
|
+
return JSON.stringify(val);
|
|
3331
|
+
default:
|
|
3332
|
+
return isFinite(val) ? val : null;
|
|
3333
|
+
}
|
|
3337
3334
|
}
|
|
3338
3335
|
|
|
3336
|
+
var fastStableStringify = function(val) {
|
|
3337
|
+
var returnVal = stringify(val, false);
|
|
3338
|
+
if (returnVal !== undefined) {
|
|
3339
|
+
return ''+ returnVal;
|
|
3340
|
+
}
|
|
3341
|
+
};
|
|
3342
|
+
|
|
3343
|
+
var fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);
|
|
3344
|
+
|
|
3339
3345
|
const MINIMUM_SLOT_PER_EPOCH = 32;
|
|
3340
3346
|
|
|
3341
3347
|
// Returns the number of trailing zeros in the binary representation of self.
|
|
@@ -5205,7 +5211,7 @@ class Connection {
|
|
|
5205
5211
|
config
|
|
5206
5212
|
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
5207
5213
|
const args = this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
5208
|
-
const requestHash =
|
|
5214
|
+
const requestHash = fastStableStringify$1(args);
|
|
5209
5215
|
requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
|
|
5210
5216
|
try {
|
|
5211
5217
|
const unsafeRes = await this._rpcRequest('getBlockHeight', args);
|
|
@@ -7641,7 +7647,7 @@ class Connection {
|
|
|
7641
7647
|
*/
|
|
7642
7648
|
args) {
|
|
7643
7649
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7644
|
-
const hash =
|
|
7650
|
+
const hash = fastStableStringify$1([subscriptionConfig.method, args]);
|
|
7645
7651
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7646
7652
|
if (existingSubscription === undefined) {
|
|
7647
7653
|
this._subscriptionsByHash[hash] = {
|