@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.cjs.js
CHANGED
|
@@ -3290,80 +3290,86 @@ class BpfLoader {
|
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
3292
|
|
|
3293
|
-
|
|
3293
|
+
function getDefaultExportFromCjs (x) {
|
|
3294
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3294
3297
|
var objToString = Object.prototype.toString;
|
|
3295
|
-
var objKeys = Object.keys || function
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
};
|
|
3298
|
+
var objKeys = Object.keys || function(obj) {
|
|
3299
|
+
var keys = [];
|
|
3300
|
+
for (var name in obj) {
|
|
3301
|
+
keys.push(name);
|
|
3302
|
+
}
|
|
3303
|
+
return keys;
|
|
3304
|
+
};
|
|
3305
|
+
|
|
3302
3306
|
function stringify(val, isArrayProp) {
|
|
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
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
}
|
|
3359
|
-
}
|
|
3360
|
-
function src_default(val) {
|
|
3361
|
-
const returnVal = stringify(val, false);
|
|
3362
|
-
if (returnVal !== void 0) {
|
|
3363
|
-
return "" + returnVal;
|
|
3364
|
-
}
|
|
3307
|
+
var i, max, str, keys, key, propVal, toStr;
|
|
3308
|
+
if (val === true) {
|
|
3309
|
+
return "true";
|
|
3310
|
+
}
|
|
3311
|
+
if (val === false) {
|
|
3312
|
+
return "false";
|
|
3313
|
+
}
|
|
3314
|
+
switch (typeof val) {
|
|
3315
|
+
case "object":
|
|
3316
|
+
if (val === null) {
|
|
3317
|
+
return null;
|
|
3318
|
+
} else if (val.toJSON && typeof val.toJSON === "function") {
|
|
3319
|
+
return stringify(val.toJSON(), isArrayProp);
|
|
3320
|
+
} else {
|
|
3321
|
+
toStr = objToString.call(val);
|
|
3322
|
+
if (toStr === "[object Array]") {
|
|
3323
|
+
str = '[';
|
|
3324
|
+
max = val.length - 1;
|
|
3325
|
+
for(i = 0; i < max; i++) {
|
|
3326
|
+
str += stringify(val[i], true) + ',';
|
|
3327
|
+
}
|
|
3328
|
+
if (max > -1) {
|
|
3329
|
+
str += stringify(val[i], true);
|
|
3330
|
+
}
|
|
3331
|
+
return str + ']';
|
|
3332
|
+
} else if (toStr === "[object Object]") {
|
|
3333
|
+
// only object is left
|
|
3334
|
+
keys = objKeys(val).sort();
|
|
3335
|
+
max = keys.length;
|
|
3336
|
+
str = "";
|
|
3337
|
+
i = 0;
|
|
3338
|
+
while (i < max) {
|
|
3339
|
+
key = keys[i];
|
|
3340
|
+
propVal = stringify(val[key], false);
|
|
3341
|
+
if (propVal !== undefined) {
|
|
3342
|
+
if (str) {
|
|
3343
|
+
str += ',';
|
|
3344
|
+
}
|
|
3345
|
+
str += JSON.stringify(key) + ':' + propVal;
|
|
3346
|
+
}
|
|
3347
|
+
i++;
|
|
3348
|
+
}
|
|
3349
|
+
return '{' + str + '}';
|
|
3350
|
+
} else {
|
|
3351
|
+
return JSON.stringify(val);
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
case "function":
|
|
3355
|
+
case "undefined":
|
|
3356
|
+
return isArrayProp ? null : undefined;
|
|
3357
|
+
case "string":
|
|
3358
|
+
return JSON.stringify(val);
|
|
3359
|
+
default:
|
|
3360
|
+
return isFinite(val) ? val : null;
|
|
3361
|
+
}
|
|
3365
3362
|
}
|
|
3366
3363
|
|
|
3364
|
+
var fastStableStringify = function(val) {
|
|
3365
|
+
var returnVal = stringify(val, false);
|
|
3366
|
+
if (returnVal !== undefined) {
|
|
3367
|
+
return ''+ returnVal;
|
|
3368
|
+
}
|
|
3369
|
+
};
|
|
3370
|
+
|
|
3371
|
+
var fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);
|
|
3372
|
+
|
|
3367
3373
|
const MINIMUM_SLOT_PER_EPOCH = 32;
|
|
3368
3374
|
|
|
3369
3375
|
// Returns the number of trailing zeros in the binary representation of self.
|
|
@@ -5233,7 +5239,7 @@ class Connection {
|
|
|
5233
5239
|
config
|
|
5234
5240
|
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
5235
5241
|
const args = this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
5236
|
-
const requestHash =
|
|
5242
|
+
const requestHash = fastStableStringify$1(args);
|
|
5237
5243
|
requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
|
|
5238
5244
|
try {
|
|
5239
5245
|
const unsafeRes = await this._rpcRequest('getBlockHeight', args);
|
|
@@ -7669,7 +7675,7 @@ class Connection {
|
|
|
7669
7675
|
*/
|
|
7670
7676
|
args) {
|
|
7671
7677
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7672
|
-
const hash =
|
|
7678
|
+
const hash = fastStableStringify$1([subscriptionConfig.method, args]);
|
|
7673
7679
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7674
7680
|
if (existingSubscription === undefined) {
|
|
7675
7681
|
this._subscriptionsByHash[hash] = {
|