@solana/kit 6.7.0 → 6.8.0-canary-20260408131515

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.
@@ -288,6 +288,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
288
288
  var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL = 8500004;
289
289
  var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE = 8500005;
290
290
  var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT = 8500006;
291
+ var SOLANA_ERROR__WALLET__NOT_CONNECTED = 89e5;
291
292
  var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;
292
293
  var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;
293
294
  var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;
@@ -313,7 +314,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
313
314
  [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
314
315
  [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: "Program address cannot end with PDA marker.",
315
316
  [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
316
- [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",
317
+ [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: "Expected base58-encoded blockhash string of length in the range [32, 44]. Actual length: $actualLength.",
317
318
  [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
318
319
  [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: "Codec [$codecDescription] cannot decode empty byte arrays.",
319
320
  [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
@@ -506,10 +507,10 @@ this.globalThis.solanaWeb3 = (function (exports) {
506
507
  [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: "No digest implementation could be found.",
507
508
  [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
508
509
  [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: "This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",
509
- [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: "No signature verification implementation could be found.",
510
+ [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: "No key export implementation could be found.",
510
511
  [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: "No key generation implementation could be found.",
511
512
  [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: "No signing implementation could be found.",
512
- [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: "No key export implementation could be found.",
513
+ [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: "No signature verification implementation could be found.",
513
514
  [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
514
515
  [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: "Transaction processing left an account with an outstanding borrowed reference",
515
516
  [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: "Account in use",
@@ -583,7 +584,8 @@ this.globalThis.solanaWeb3 = (function (exports) {
583
584
  [SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES]: "Transaction has $actualCount unique signer addresses but the maximum allowed is $maxAllowed",
584
585
  [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES]: "Transaction has $actualCount unique account addresses but the maximum allowed is $maxAllowed",
585
586
  [SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS]: "Transaction has $actualCount instructions but the maximum allowed is $maxAllowed",
586
- [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION]: "The instruction at index $instructionIndex has $actualCount account references but the maximum allowed is $maxAllowed"
587
+ [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION]: "The instruction at index $instructionIndex has $actualCount account references but the maximum allowed is $maxAllowed",
588
+ [SOLANA_ERROR__WALLET__NOT_CONNECTED]: "Cannot $operation: no wallet connected"
587
589
  };
588
590
  var INSTRUCTION_ERROR_RANGE_SIZE = 1e3;
589
591
  var START_INDEX = "i";
@@ -8941,7 +8943,7 @@ ${lastLines.map((line) => ` > ${line}
8941
8943
  ...config.headers ? normalizeHeaders2(config.headers) : void 0,
8942
8944
  ...{
8943
8945
  // Keep these headers lowercase so they will override any user-supplied headers above.
8944
- "solana-client": `js/${"6.7.0"}`
8946
+ "solana-client": `js/${"6.8.0-canary-20260408131515"}`
8945
8947
  }
8946
8948
  }
8947
8949
  }),
@@ -9143,6 +9145,50 @@ ${lastLines.map((line) => ` > ${line}
9143
9145
  }
9144
9146
  };
9145
9147
  }
9148
+ function createReactiveStoreFromDataPublisher({
9149
+ abortSignal,
9150
+ dataChannelName,
9151
+ dataPublisher,
9152
+ errorChannelName
9153
+ }) {
9154
+ let currentState;
9155
+ let currentError;
9156
+ const subscribers = /* @__PURE__ */ new Set();
9157
+ const abortController = new o3();
9158
+ abortSignal.addEventListener("abort", () => abortController.abort(abortSignal.reason));
9159
+ dataPublisher.on(
9160
+ dataChannelName,
9161
+ (data) => {
9162
+ currentState = data;
9163
+ subscribers.forEach((cb) => cb());
9164
+ },
9165
+ { signal: abortController.signal }
9166
+ );
9167
+ dataPublisher.on(
9168
+ errorChannelName,
9169
+ (err) => {
9170
+ if (currentError !== void 0) return;
9171
+ currentError = err;
9172
+ abortController.abort(err);
9173
+ subscribers.forEach((cb) => cb());
9174
+ },
9175
+ { signal: abortController.signal }
9176
+ );
9177
+ return {
9178
+ getError() {
9179
+ return currentError;
9180
+ },
9181
+ getState() {
9182
+ return currentState;
9183
+ },
9184
+ subscribe(callback) {
9185
+ subscribers.add(callback);
9186
+ return () => {
9187
+ subscribers.delete(callback);
9188
+ };
9189
+ }
9190
+ };
9191
+ }
9146
9192
 
9147
9193
  // ../rpc-subscriptions-spec/dist/index.browser.mjs
9148
9194
  function createSubscriptionRpc(rpcConfig) {
@@ -9173,6 +9219,18 @@ ${lastLines.map((line) => ` > ${line}
9173
9219
  }
9174
9220
  function createPendingRpcSubscription(transport, subscriptionsPlan) {
9175
9221
  return {
9222
+ async reactive({ abortSignal }) {
9223
+ const notificationsDataPublisher = await transport({
9224
+ signal: abortSignal,
9225
+ ...subscriptionsPlan
9226
+ });
9227
+ return createReactiveStoreFromDataPublisher({
9228
+ abortSignal,
9229
+ dataChannelName: "notification",
9230
+ dataPublisher: notificationsDataPublisher,
9231
+ errorChannelName: "error"
9232
+ });
9233
+ },
9176
9234
  async subscribe({ abortSignal }) {
9177
9235
  const notificationsDataPublisher = await transport({
9178
9236
  signal: abortSignal,
@@ -11331,6 +11389,7 @@ ${lastLines.map((line) => ` > ${line}
11331
11389
  exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED;
11332
11390
  exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE;
11333
11391
  exports.SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST = SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST;
11392
+ exports.SOLANA_ERROR__WALLET__NOT_CONNECTED = SOLANA_ERROR__WALLET__NOT_CONNECTED;
11334
11393
  exports.SolanaError = SolanaError;
11335
11394
  exports.TRANSACTION_PACKET_HEADER = TRANSACTION_PACKET_HEADER;
11336
11395
  exports.TRANSACTION_PACKET_SIZE = TRANSACTION_PACKET_SIZE;