@solana/web3.js 1.91.3 → 1.91.5
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 +74 -79
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +74 -79
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +6 -79
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +5 -79
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +98 -100
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +74 -79
- package/lib/index.native.js.map +1 -1
- package/package.json +2 -2
- package/src/connection.ts +5 -7
package/lib/index.browser.cjs.js
CHANGED
|
@@ -3290,85 +3290,79 @@ class BpfLoader {
|
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
3292
|
|
|
3293
|
-
|
|
3294
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3293
|
+
// src/index.ts
|
|
3297
3294
|
var objToString = Object.prototype.toString;
|
|
3298
|
-
var objKeys = Object.keys || function(obj) {
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3295
|
+
var objKeys = Object.keys || function (obj) {
|
|
3296
|
+
const keys = [];
|
|
3297
|
+
for (const name in obj) {
|
|
3298
|
+
keys.push(name);
|
|
3299
|
+
}
|
|
3300
|
+
return keys;
|
|
3301
|
+
};
|
|
3306
3302
|
function stringify(val, isArrayProp) {
|
|
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
|
-
|
|
3361
|
-
|
|
3303
|
+
let i, max, str, keys, key, propVal, toStr;
|
|
3304
|
+
if (val === true) {
|
|
3305
|
+
return "true";
|
|
3306
|
+
}
|
|
3307
|
+
if (val === false) {
|
|
3308
|
+
return "false";
|
|
3309
|
+
}
|
|
3310
|
+
switch (typeof val) {
|
|
3311
|
+
case "object":
|
|
3312
|
+
if (val === null) {
|
|
3313
|
+
return null;
|
|
3314
|
+
} else if ("toJSON" in val && typeof val.toJSON === "function") {
|
|
3315
|
+
return stringify(val.toJSON(), isArrayProp);
|
|
3316
|
+
} else {
|
|
3317
|
+
toStr = objToString.call(val);
|
|
3318
|
+
if (toStr === "[object Array]") {
|
|
3319
|
+
str = "[";
|
|
3320
|
+
max = val.length - 1;
|
|
3321
|
+
for (i = 0; i < max; i++) {
|
|
3322
|
+
str += stringify(val[i], true) + ",";
|
|
3323
|
+
}
|
|
3324
|
+
if (max > -1) {
|
|
3325
|
+
str += stringify(val[i], true);
|
|
3326
|
+
}
|
|
3327
|
+
return str + "]";
|
|
3328
|
+
} else if (toStr === "[object Object]") {
|
|
3329
|
+
keys = objKeys(val).sort();
|
|
3330
|
+
max = keys.length;
|
|
3331
|
+
str = "";
|
|
3332
|
+
i = 0;
|
|
3333
|
+
while (i < max) {
|
|
3334
|
+
key = keys[i];
|
|
3335
|
+
propVal = stringify(val[key], false);
|
|
3336
|
+
if (propVal !== void 0) {
|
|
3337
|
+
if (str) {
|
|
3338
|
+
str += ",";
|
|
3339
|
+
}
|
|
3340
|
+
str += JSON.stringify(key) + ":" + propVal;
|
|
3341
|
+
}
|
|
3342
|
+
i++;
|
|
3343
|
+
}
|
|
3344
|
+
return "{" + str + "}";
|
|
3345
|
+
} else {
|
|
3346
|
+
return JSON.stringify(val);
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
case "function":
|
|
3350
|
+
case "undefined":
|
|
3351
|
+
return isArrayProp ? null : void 0;
|
|
3352
|
+
case "bigint":
|
|
3353
|
+
return JSON.stringify(val.toString() + "n");
|
|
3354
|
+
case "string":
|
|
3355
|
+
return JSON.stringify(val);
|
|
3356
|
+
default:
|
|
3357
|
+
return isFinite(val) ? val : null;
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
function src_default(val) {
|
|
3361
|
+
const returnVal = stringify(val, false);
|
|
3362
|
+
if (returnVal !== void 0) {
|
|
3363
|
+
return "" + returnVal;
|
|
3364
|
+
}
|
|
3362
3365
|
}
|
|
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
3366
|
|
|
3373
3367
|
const MINIMUM_SLOT_PER_EPOCH = 32;
|
|
3374
3368
|
|
|
@@ -5239,7 +5233,7 @@ class Connection {
|
|
|
5239
5233
|
config
|
|
5240
5234
|
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
5241
5235
|
const args = this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
5242
|
-
const requestHash =
|
|
5236
|
+
const requestHash = src_default(args);
|
|
5243
5237
|
requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
|
|
5244
5238
|
try {
|
|
5245
5239
|
const unsafeRes = await this._rpcRequest('getBlockHeight', args);
|
|
@@ -7330,7 +7324,8 @@ class Connection {
|
|
|
7330
7324
|
encoding: 'base64'
|
|
7331
7325
|
};
|
|
7332
7326
|
const skipPreflight = options && options.skipPreflight;
|
|
7333
|
-
const preflightCommitment =
|
|
7327
|
+
const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.
|
|
7328
|
+
: options && options.preflightCommitment || this.commitment;
|
|
7334
7329
|
if (options && options.maxRetries != null) {
|
|
7335
7330
|
config.maxRetries = options.maxRetries;
|
|
7336
7331
|
}
|
|
@@ -7674,7 +7669,7 @@ class Connection {
|
|
|
7674
7669
|
*/
|
|
7675
7670
|
args) {
|
|
7676
7671
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7677
|
-
const hash =
|
|
7672
|
+
const hash = src_default([subscriptionConfig.method, args]);
|
|
7678
7673
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7679
7674
|
if (existingSubscription === undefined) {
|
|
7680
7675
|
this._subscriptionsByHash[hash] = {
|