@solana/kit 7.1.0 → 7.1.1-canary-20260814145310

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.
@@ -9202,6 +9202,135 @@ ${lastLines.map((line) => ` > ${line}
9202
9202
  return typeof code === "undefined" || error.context.code === code;
9203
9203
  }
9204
9204
 
9205
+ // ../rpc-spec-types/dist/index.browser.mjs
9206
+ var NODEJS_CUSTOM_INSPECT_SYMBOL = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
9207
+ var JAVASCRIPT_PROTOCOL_PROPERTY_NAMES = /* @__PURE__ */ new Set(
9208
+ [
9209
+ "then",
9210
+ "toJSON",
9211
+ NODEJS_CUSTOM_INSPECT_SYMBOL,
9212
+ Symbol.asyncIterator,
9213
+ Symbol.iterator,
9214
+ Symbol.toPrimitive,
9215
+ Symbol.toStringTag,
9216
+ Symbol.asyncDispose,
9217
+ Symbol.dispose
9218
+ ].filter((propertyName) => propertyName != null)
9219
+ );
9220
+ var OBJECT_PROTOTYPE_PROPERTY_NAMES = /* @__PURE__ */ new Set([
9221
+ "__defineGetter__",
9222
+ "__defineSetter__",
9223
+ "__lookupGetter__",
9224
+ "__lookupSetter__",
9225
+ "__proto__",
9226
+ "constructor",
9227
+ "hasOwnProperty",
9228
+ "isPrototypeOf",
9229
+ "propertyIsEnumerable",
9230
+ "toLocaleString",
9231
+ "toString",
9232
+ "valueOf"
9233
+ ]);
9234
+ function getNonRpcPropertyValue(propertyName, receiver) {
9235
+ if (JAVASCRIPT_PROTOCOL_PROPERTY_NAMES.has(propertyName)) {
9236
+ return void 0;
9237
+ }
9238
+ return Reflect.get(Object.prototype, propertyName, receiver);
9239
+ }
9240
+ function isNonRpcPropertyName(propertyName) {
9241
+ return JAVASCRIPT_PROTOCOL_PROPERTY_NAMES.has(propertyName) || OBJECT_PROTOTYPE_PROPERTY_NAMES.has(propertyName);
9242
+ }
9243
+ var BIGINT_VALUE_OBJECT_PATTERN = /^(-?)(\d+)(?:[eE]\+?(\d+))?$/;
9244
+ var MAX_BIGINT_DIGITS = 1e3;
9245
+ function parseJsonWithBigInts(json) {
9246
+ return JSON.parse(wrapIntegersInBigIntValueObject(json), (_, value) => {
9247
+ return isBigIntValueObject(value) ? unwrapBigIntValueObject(value) : value;
9248
+ });
9249
+ }
9250
+ function wrapIntegersInBigIntValueObject(json) {
9251
+ const out = [];
9252
+ let inQuote = false;
9253
+ for (let ii = 0; ii < json.length; ii++) {
9254
+ let isEscaped = false;
9255
+ if (json[ii] === "\\") {
9256
+ out.push(json[ii++]);
9257
+ isEscaped = !isEscaped;
9258
+ }
9259
+ if (json[ii] === '"') {
9260
+ out.push(json[ii]);
9261
+ if (!isEscaped) {
9262
+ inQuote = !inQuote;
9263
+ }
9264
+ continue;
9265
+ }
9266
+ if (!inQuote) {
9267
+ const consumedNumber = consumeNumber(json, ii);
9268
+ if (consumedNumber == null ? void 0 : consumedNumber.length) {
9269
+ ii += consumedNumber.length - 1;
9270
+ if (consumedNumber.match(/\.|[eE]-/)) {
9271
+ out.push(consumedNumber);
9272
+ } else {
9273
+ out.push(wrapBigIntValueObject(consumedNumber));
9274
+ }
9275
+ continue;
9276
+ }
9277
+ }
9278
+ out.push(json[ii]);
9279
+ }
9280
+ return out.join("");
9281
+ }
9282
+ function consumeNumber(json, ii) {
9283
+ var _a;
9284
+ const JSON_NUMBER_REGEX = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/;
9285
+ if (!((_a = json[ii]) == null ? void 0 : _a.match(/[-\d]/))) {
9286
+ return null;
9287
+ }
9288
+ const numberMatch = json.slice(ii).match(JSON_NUMBER_REGEX);
9289
+ return numberMatch ? numberMatch[0] : null;
9290
+ }
9291
+ function wrapBigIntValueObject(value) {
9292
+ return `{"$n":"${value}"}`;
9293
+ }
9294
+ function unwrapBigIntValueObject({ $n }) {
9295
+ const match = $n.match(BIGINT_VALUE_OBJECT_PATTERN);
9296
+ if (match) {
9297
+ const [, sign, mantissa, exponent] = match;
9298
+ const digitCount = mantissa.length + (exponent ? Number(exponent) : 0);
9299
+ if (digitCount <= MAX_BIGINT_DIGITS) {
9300
+ return exponent ? BigInt(`${sign}${mantissa}`) * 10n ** BigInt(exponent) : BigInt($n);
9301
+ }
9302
+ }
9303
+ throw new SolanaError(SOLANA_ERROR__MALFORMED_BIGINT_STRING, { value: $n });
9304
+ }
9305
+ function isBigIntValueObject(value) {
9306
+ return !!value && typeof value === "object" && "$n" in value && typeof value.$n === "string";
9307
+ }
9308
+ var _nextMessageId = 0n;
9309
+ function getNextMessageId() {
9310
+ const id = _nextMessageId;
9311
+ _nextMessageId++;
9312
+ return id.toString();
9313
+ }
9314
+ function createRpcMessage(request) {
9315
+ return {
9316
+ id: getNextMessageId(),
9317
+ jsonrpc: "2.0",
9318
+ method: request.methodName,
9319
+ params: request.params
9320
+ };
9321
+ }
9322
+ function stringifyJsonWithBigInts(value, space) {
9323
+ return unwrapBigIntValueObject2(
9324
+ JSON.stringify(value, (_, v) => typeof v === "bigint" ? wrapBigIntValueObject2(v) : v, space)
9325
+ );
9326
+ }
9327
+ function wrapBigIntValueObject2(value) {
9328
+ return { $n: `${value}` };
9329
+ }
9330
+ function unwrapBigIntValueObject2(value) {
9331
+ return value.replace(/\{\s*"\$n"\s*:\s*"(-?\d+)"\s*\}/g, "$1");
9332
+ }
9333
+
9205
9334
  // ../subscribable/dist/index.browser.mjs
9206
9335
  var o2 = globalThis.AbortController;
9207
9336
  var t = globalThis.EventTarget;
@@ -9607,98 +9736,6 @@ ${lastLines.map((line) => ` > ${line}
9607
9736
  };
9608
9737
  }
9609
9738
 
9610
- // ../rpc-spec-types/dist/index.browser.mjs
9611
- var BIGINT_VALUE_OBJECT_PATTERN = /^(-?)(\d+)(?:[eE]\+?(\d+))?$/;
9612
- var MAX_BIGINT_DIGITS = 1e3;
9613
- function parseJsonWithBigInts(json) {
9614
- return JSON.parse(wrapIntegersInBigIntValueObject(json), (_, value) => {
9615
- return isBigIntValueObject(value) ? unwrapBigIntValueObject(value) : value;
9616
- });
9617
- }
9618
- function wrapIntegersInBigIntValueObject(json) {
9619
- const out = [];
9620
- let inQuote = false;
9621
- for (let ii = 0; ii < json.length; ii++) {
9622
- let isEscaped = false;
9623
- if (json[ii] === "\\") {
9624
- out.push(json[ii++]);
9625
- isEscaped = !isEscaped;
9626
- }
9627
- if (json[ii] === '"') {
9628
- out.push(json[ii]);
9629
- if (!isEscaped) {
9630
- inQuote = !inQuote;
9631
- }
9632
- continue;
9633
- }
9634
- if (!inQuote) {
9635
- const consumedNumber = consumeNumber(json, ii);
9636
- if (consumedNumber == null ? void 0 : consumedNumber.length) {
9637
- ii += consumedNumber.length - 1;
9638
- if (consumedNumber.match(/\.|[eE]-/)) {
9639
- out.push(consumedNumber);
9640
- } else {
9641
- out.push(wrapBigIntValueObject(consumedNumber));
9642
- }
9643
- continue;
9644
- }
9645
- }
9646
- out.push(json[ii]);
9647
- }
9648
- return out.join("");
9649
- }
9650
- function consumeNumber(json, ii) {
9651
- var _a;
9652
- const JSON_NUMBER_REGEX = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/;
9653
- if (!((_a = json[ii]) == null ? void 0 : _a.match(/[-\d]/))) {
9654
- return null;
9655
- }
9656
- const numberMatch = json.slice(ii).match(JSON_NUMBER_REGEX);
9657
- return numberMatch ? numberMatch[0] : null;
9658
- }
9659
- function wrapBigIntValueObject(value) {
9660
- return `{"$n":"${value}"}`;
9661
- }
9662
- function unwrapBigIntValueObject({ $n }) {
9663
- const match = $n.match(BIGINT_VALUE_OBJECT_PATTERN);
9664
- if (match) {
9665
- const [, sign, mantissa, exponent] = match;
9666
- const digitCount = mantissa.length + (exponent ? Number(exponent) : 0);
9667
- if (digitCount <= MAX_BIGINT_DIGITS) {
9668
- return exponent ? BigInt(`${sign}${mantissa}`) * 10n ** BigInt(exponent) : BigInt($n);
9669
- }
9670
- }
9671
- throw new SolanaError(SOLANA_ERROR__MALFORMED_BIGINT_STRING, { value: $n });
9672
- }
9673
- function isBigIntValueObject(value) {
9674
- return !!value && typeof value === "object" && "$n" in value && typeof value.$n === "string";
9675
- }
9676
- var _nextMessageId = 0n;
9677
- function getNextMessageId() {
9678
- const id = _nextMessageId;
9679
- _nextMessageId++;
9680
- return id.toString();
9681
- }
9682
- function createRpcMessage(request) {
9683
- return {
9684
- id: getNextMessageId(),
9685
- jsonrpc: "2.0",
9686
- method: request.methodName,
9687
- params: request.params
9688
- };
9689
- }
9690
- function stringifyJsonWithBigInts(value, space) {
9691
- return unwrapBigIntValueObject2(
9692
- JSON.stringify(value, (_, v) => typeof v === "bigint" ? wrapBigIntValueObject2(v) : v, space)
9693
- );
9694
- }
9695
- function wrapBigIntValueObject2(value) {
9696
- return { $n: `${value}` };
9697
- }
9698
- function unwrapBigIntValueObject2(value) {
9699
- return value.replace(/\{\s*"\$n"\s*:\s*"(-?\d+)"\s*\}/g, "$1");
9700
- }
9701
-
9702
9739
  // ../rpc-spec/dist/index.browser.mjs
9703
9740
  function createRpc(rpcConfig) {
9704
9741
  return makeProxy(rpcConfig);
@@ -9712,8 +9749,8 @@ ${lastLines.map((line) => ` > ${line}
9712
9749
  return false;
9713
9750
  },
9714
9751
  get(target, p, receiver) {
9715
- if (p === "then") {
9716
- return void 0;
9752
+ if (isNonRpcPropertyName(p)) {
9753
+ return getNonRpcPropertyValue(p, receiver);
9717
9754
  }
9718
9755
  return function(...rawParams) {
9719
9756
  const methodName = p.toString();
@@ -9750,6 +9787,9 @@ ${lastLines.map((line) => ` > ${line}
9750
9787
  },
9751
9788
  get(...args) {
9752
9789
  const [_, p] = args;
9790
+ if (isNonRpcPropertyName(p)) {
9791
+ return getNonRpcPropertyValue(p, args[2]);
9792
+ }
9753
9793
  const methodName = p.toString();
9754
9794
  return function(...rawParams) {
9755
9795
  const rawRequest = Object.freeze({ methodName, params: rawParams });
@@ -10581,7 +10621,7 @@ ${lastLines.map((line) => ` > ${line}
10581
10621
  ...config.headers ? normalizeHeaders2(config.headers) : void 0,
10582
10622
  ...{
10583
10623
  // Keep these headers lowercase so they will override any user-supplied headers above.
10584
- "solana-client": `js/${"7.1.0"}`
10624
+ "solana-client": `js/${"7.1.1-canary-20260814145310"}`
10585
10625
  }
10586
10626
  }
10587
10627
  }),
@@ -10608,8 +10648,8 @@ ${lastLines.map((line) => ` > ${line}
10608
10648
  return false;
10609
10649
  },
10610
10650
  get(target, p, receiver) {
10611
- if (p === "then") {
10612
- return void 0;
10651
+ if (isNonRpcPropertyName(p)) {
10652
+ return getNonRpcPropertyValue(p, receiver);
10613
10653
  }
10614
10654
  return function(...rawParams) {
10615
10655
  const notificationName = p.toString();
@@ -10660,6 +10700,9 @@ ${lastLines.map((line) => ` > ${line}
10660
10700
  },
10661
10701
  get(...args) {
10662
10702
  const [_, p] = args;
10703
+ if (isNonRpcPropertyName(p)) {
10704
+ return getNonRpcPropertyValue(p, args[2]);
10705
+ }
10663
10706
  const methodName = p.toString();
10664
10707
  return function(...params) {
10665
10708
  const rawRequest = { methodName, params };