@solana/kit 6.10.0 → 6.10.1-canary-20260618143316
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/dist/index.development.js +11 -5
- package/dist/index.development.js.map +1 -1
- package/dist/index.production.min.js +364 -364
- package/package.json +26 -26
|
@@ -9374,6 +9374,8 @@ ${lastLines.map((line) => ` > ${line}
|
|
|
9374
9374
|
}
|
|
9375
9375
|
|
|
9376
9376
|
// ../rpc-spec-types/dist/index.browser.mjs
|
|
9377
|
+
var BIGINT_VALUE_OBJECT_PATTERN = /^(-?)(\d+)(?:[eE]\+?(\d+))?$/;
|
|
9378
|
+
var MAX_BIGINT_DIGITS = 1e3;
|
|
9377
9379
|
function parseJsonWithBigInts(json) {
|
|
9378
9380
|
return JSON.parse(wrapIntegersInBigIntValueObject(json), (_, value) => {
|
|
9379
9381
|
return isBigIntValueObject(value) ? unwrapBigIntValueObject(value) : value;
|
|
@@ -9424,11 +9426,15 @@ ${lastLines.map((line) => ` > ${line}
|
|
|
9424
9426
|
return `{"$n":"${value}"}`;
|
|
9425
9427
|
}
|
|
9426
9428
|
function unwrapBigIntValueObject({ $n }) {
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9429
|
+
const match = $n.match(BIGINT_VALUE_OBJECT_PATTERN);
|
|
9430
|
+
if (match) {
|
|
9431
|
+
const [, sign, mantissa, exponent] = match;
|
|
9432
|
+
const digitCount = mantissa.length + (exponent ? Number(exponent) : 0);
|
|
9433
|
+
if (digitCount <= MAX_BIGINT_DIGITS) {
|
|
9434
|
+
return exponent ? BigInt(`${sign}${mantissa}`) * 10n ** BigInt(exponent) : BigInt($n);
|
|
9435
|
+
}
|
|
9430
9436
|
}
|
|
9431
|
-
|
|
9437
|
+
throw new SolanaError(SOLANA_ERROR__MALFORMED_BIGINT_STRING, { value: $n });
|
|
9432
9438
|
}
|
|
9433
9439
|
function isBigIntValueObject(value) {
|
|
9434
9440
|
return !!value && typeof value === "object" && "$n" in value && typeof value.$n === "string";
|
|
@@ -10337,7 +10343,7 @@ ${lastLines.map((line) => ` > ${line}
|
|
|
10337
10343
|
...config.headers ? normalizeHeaders2(config.headers) : void 0,
|
|
10338
10344
|
...{
|
|
10339
10345
|
// Keep these headers lowercase so they will override any user-supplied headers above.
|
|
10340
|
-
"solana-client": `js/${"6.10.
|
|
10346
|
+
"solana-client": `js/${"6.10.1-canary-20260618143316"}`
|
|
10341
10347
|
}
|
|
10342
10348
|
}
|
|
10343
10349
|
}),
|