@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.esm.js
CHANGED
|
@@ -3262,85 +3262,79 @@ class BpfLoader {
|
|
|
3262
3262
|
}
|
|
3263
3263
|
}
|
|
3264
3264
|
|
|
3265
|
-
|
|
3266
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3265
|
+
// src/index.ts
|
|
3269
3266
|
var objToString = Object.prototype.toString;
|
|
3270
|
-
var objKeys = Object.keys || function(obj) {
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3267
|
+
var objKeys = Object.keys || function (obj) {
|
|
3268
|
+
const keys = [];
|
|
3269
|
+
for (const name in obj) {
|
|
3270
|
+
keys.push(name);
|
|
3271
|
+
}
|
|
3272
|
+
return keys;
|
|
3273
|
+
};
|
|
3278
3274
|
function stringify(val, isArrayProp) {
|
|
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
|
-
|
|
3333
|
-
|
|
3275
|
+
let i, max, str, keys, key, propVal, toStr;
|
|
3276
|
+
if (val === true) {
|
|
3277
|
+
return "true";
|
|
3278
|
+
}
|
|
3279
|
+
if (val === false) {
|
|
3280
|
+
return "false";
|
|
3281
|
+
}
|
|
3282
|
+
switch (typeof val) {
|
|
3283
|
+
case "object":
|
|
3284
|
+
if (val === null) {
|
|
3285
|
+
return null;
|
|
3286
|
+
} else if ("toJSON" in val && typeof val.toJSON === "function") {
|
|
3287
|
+
return stringify(val.toJSON(), isArrayProp);
|
|
3288
|
+
} else {
|
|
3289
|
+
toStr = objToString.call(val);
|
|
3290
|
+
if (toStr === "[object Array]") {
|
|
3291
|
+
str = "[";
|
|
3292
|
+
max = val.length - 1;
|
|
3293
|
+
for (i = 0; i < max; i++) {
|
|
3294
|
+
str += stringify(val[i], true) + ",";
|
|
3295
|
+
}
|
|
3296
|
+
if (max > -1) {
|
|
3297
|
+
str += stringify(val[i], true);
|
|
3298
|
+
}
|
|
3299
|
+
return str + "]";
|
|
3300
|
+
} else if (toStr === "[object Object]") {
|
|
3301
|
+
keys = objKeys(val).sort();
|
|
3302
|
+
max = keys.length;
|
|
3303
|
+
str = "";
|
|
3304
|
+
i = 0;
|
|
3305
|
+
while (i < max) {
|
|
3306
|
+
key = keys[i];
|
|
3307
|
+
propVal = stringify(val[key], false);
|
|
3308
|
+
if (propVal !== void 0) {
|
|
3309
|
+
if (str) {
|
|
3310
|
+
str += ",";
|
|
3311
|
+
}
|
|
3312
|
+
str += JSON.stringify(key) + ":" + propVal;
|
|
3313
|
+
}
|
|
3314
|
+
i++;
|
|
3315
|
+
}
|
|
3316
|
+
return "{" + str + "}";
|
|
3317
|
+
} else {
|
|
3318
|
+
return JSON.stringify(val);
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
case "function":
|
|
3322
|
+
case "undefined":
|
|
3323
|
+
return isArrayProp ? null : void 0;
|
|
3324
|
+
case "bigint":
|
|
3325
|
+
return JSON.stringify(val.toString() + "n");
|
|
3326
|
+
case "string":
|
|
3327
|
+
return JSON.stringify(val);
|
|
3328
|
+
default:
|
|
3329
|
+
return isFinite(val) ? val : null;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
function src_default(val) {
|
|
3333
|
+
const returnVal = stringify(val, false);
|
|
3334
|
+
if (returnVal !== void 0) {
|
|
3335
|
+
return "" + returnVal;
|
|
3336
|
+
}
|
|
3334
3337
|
}
|
|
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
3338
|
|
|
3345
3339
|
const MINIMUM_SLOT_PER_EPOCH = 32;
|
|
3346
3340
|
|
|
@@ -5211,7 +5205,7 @@ class Connection {
|
|
|
5211
5205
|
config
|
|
5212
5206
|
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
5213
5207
|
const args = this._buildArgs([], commitment, undefined /* encoding */, config);
|
|
5214
|
-
const requestHash =
|
|
5208
|
+
const requestHash = src_default(args);
|
|
5215
5209
|
requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {
|
|
5216
5210
|
try {
|
|
5217
5211
|
const unsafeRes = await this._rpcRequest('getBlockHeight', args);
|
|
@@ -7302,7 +7296,8 @@ class Connection {
|
|
|
7302
7296
|
encoding: 'base64'
|
|
7303
7297
|
};
|
|
7304
7298
|
const skipPreflight = options && options.skipPreflight;
|
|
7305
|
-
const preflightCommitment =
|
|
7299
|
+
const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.
|
|
7300
|
+
: options && options.preflightCommitment || this.commitment;
|
|
7306
7301
|
if (options && options.maxRetries != null) {
|
|
7307
7302
|
config.maxRetries = options.maxRetries;
|
|
7308
7303
|
}
|
|
@@ -7646,7 +7641,7 @@ class Connection {
|
|
|
7646
7641
|
*/
|
|
7647
7642
|
args) {
|
|
7648
7643
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7649
|
-
const hash =
|
|
7644
|
+
const hash = src_default([subscriptionConfig.method, args]);
|
|
7650
7645
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7651
7646
|
if (existingSubscription === undefined) {
|
|
7652
7647
|
this._subscriptionsByHash[hash] = {
|