Socket
Socket
Sign inDemoInstall

@solana/rpc-subscriptions

Package Overview
Dependencies
Maintainers
15
Versions
753
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/rpc-subscriptions - npm Package Compare versions

Comparing version 2.0.0-experimental.27479b3 to 2.0.0-experimental.28775df

13

dist/index.browser.js

@@ -7,3 +7,3 @@ import { createSolanaRpcSubscriptionsApi } from '@solana/rpc-subscriptions-api';

import fastStableStringify from 'fast-stable-stringify';
import { SolanaError, SOLANA_ERROR__RPC_INTEGER_OVERFLOW } from '@solana/errors';
import { SolanaError, SOLANA_ERROR__RPC__INTEGER_OVERFLOW, SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING } from '@solana/errors';
import { createWebSocketTransport } from '@solana/rpc-subscriptions-transport-websocket';

@@ -32,3 +32,3 @@

const path = keyPath.length > 1 ? keyPath.slice(1).map((pathPart) => typeof pathPart === "number" ? `[${pathPart}]` : pathPart).join(".") : void 0;
const error = new SolanaError(SOLANA_ERROR__RPC_INTEGER_OVERFLOW, {
const error = new SolanaError(SOLANA_ERROR__RPC__INTEGER_OVERFLOW, {
argumentLabel,

@@ -54,4 +54,2 @@ keyPath,

};
// src/cached-abortable-iterable.ts
function registerIterableCleanup(iterable, cleanupFn) {

@@ -70,3 +68,2 @@ (async () => {

getAbortSignalFromInputArgs,
getCacheEntryMissingErrorMessage,
getCacheKeyFromInputArgs,

@@ -80,3 +77,5 @@ onCacheHit,

if (!currentCacheEntry) {
throw new Error(getCacheEntryMissingErrorMessage ? getCacheEntryMissingErrorMessage(cacheKey) : void 0);
throw new SolanaError(SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING, {
cacheKey: cacheKey.toString()
});
}

@@ -182,3 +181,2 @@ return currentCacheEntry;

getAbortSignalFromInputArgs: ({ abortSignal }) => abortSignal,
getCacheEntryMissingErrorMessage: __DEV__ ? (deduplicationKey2) => `Invariant: Found no cache entry for subscription with deduplication key \`${deduplicationKey2?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: () => deduplicationKey,

@@ -318,3 +316,2 @@ async onCacheHit(_iterable, _config) {

getAbortSignalFromInputArgs: ({ signal }) => signal,
getCacheEntryMissingErrorMessage: __DEV__ ? (shardKey) => `Invariant: Found no cache entry for connection with shard key \`${shardKey?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: ({ payload }) => getShard ? getShard(payload) : NULL_SHARD_CACHE_KEY,

@@ -321,0 +318,0 @@ onCacheHit: (connection, { payload }) => connection.send_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(payload),

@@ -7,3 +7,3 @@ import { createSolanaRpcSubscriptionsApi } from '@solana/rpc-subscriptions-api';

import fastStableStringify from 'fast-stable-stringify';
import { SolanaError, SOLANA_ERROR__RPC_INTEGER_OVERFLOW } from '@solana/errors';
import { SolanaError, SOLANA_ERROR__RPC__INTEGER_OVERFLOW, SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING } from '@solana/errors';
import { createWebSocketTransport } from '@solana/rpc-subscriptions-transport-websocket';

@@ -32,3 +32,3 @@

const path = keyPath.length > 1 ? keyPath.slice(1).map((pathPart) => typeof pathPart === "number" ? `[${pathPart}]` : pathPart).join(".") : void 0;
const error = new SolanaError(SOLANA_ERROR__RPC_INTEGER_OVERFLOW, {
const error = new SolanaError(SOLANA_ERROR__RPC__INTEGER_OVERFLOW, {
argumentLabel,

@@ -54,4 +54,2 @@ keyPath,

};
// src/cached-abortable-iterable.ts
function registerIterableCleanup(iterable, cleanupFn) {

@@ -70,3 +68,2 @@ (async () => {

getAbortSignalFromInputArgs,
getCacheEntryMissingErrorMessage,
getCacheKeyFromInputArgs,

@@ -80,3 +77,5 @@ onCacheHit,

if (!currentCacheEntry) {
throw new Error(getCacheEntryMissingErrorMessage ? getCacheEntryMissingErrorMessage(cacheKey) : void 0);
throw new SolanaError(SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING, {
cacheKey: cacheKey.toString()
});
}

@@ -182,3 +181,2 @@ return currentCacheEntry;

getAbortSignalFromInputArgs: ({ abortSignal }) => abortSignal,
getCacheEntryMissingErrorMessage: __DEV__ ? (deduplicationKey2) => `Invariant: Found no cache entry for subscription with deduplication key \`${deduplicationKey2?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: () => deduplicationKey,

@@ -307,3 +305,2 @@ async onCacheHit(_iterable, _config) {

getAbortSignalFromInputArgs: ({ signal }) => signal,
getCacheEntryMissingErrorMessage: __DEV__ ? (shardKey) => `Invariant: Found no cache entry for connection with shard key \`${shardKey?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: ({ payload }) => getShard ? getShard(payload) : NULL_SHARD_CACHE_KEY,

@@ -310,0 +307,0 @@ onCacheHit: (connection, { payload }) => connection.send_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(payload),

@@ -7,3 +7,3 @@ import { createSolanaRpcSubscriptionsApi } from '@solana/rpc-subscriptions-api';

import fastStableStringify from 'fast-stable-stringify';
import { SolanaError, SOLANA_ERROR__RPC_INTEGER_OVERFLOW } from '@solana/errors';
import { SolanaError, SOLANA_ERROR__RPC__INTEGER_OVERFLOW, SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING } from '@solana/errors';
import { createWebSocketTransport } from '@solana/rpc-subscriptions-transport-websocket';

@@ -32,3 +32,3 @@

const path = keyPath.length > 1 ? keyPath.slice(1).map((pathPart) => typeof pathPart === "number" ? `[${pathPart}]` : pathPart).join(".") : void 0;
const error = new SolanaError(SOLANA_ERROR__RPC_INTEGER_OVERFLOW, {
const error = new SolanaError(SOLANA_ERROR__RPC__INTEGER_OVERFLOW, {
argumentLabel,

@@ -54,4 +54,2 @@ keyPath,

};
// src/cached-abortable-iterable.ts
function registerIterableCleanup(iterable, cleanupFn) {

@@ -70,3 +68,2 @@ (async () => {

getAbortSignalFromInputArgs,
getCacheEntryMissingErrorMessage,
getCacheKeyFromInputArgs,

@@ -80,3 +77,5 @@ onCacheHit,

if (!currentCacheEntry) {
throw new Error(getCacheEntryMissingErrorMessage ? getCacheEntryMissingErrorMessage(cacheKey) : void 0);
throw new SolanaError(SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING, {
cacheKey: cacheKey.toString()
});
}

@@ -182,3 +181,2 @@ return currentCacheEntry;

getAbortSignalFromInputArgs: ({ abortSignal }) => abortSignal,
getCacheEntryMissingErrorMessage: __DEV__ ? (deduplicationKey2) => `Invariant: Found no cache entry for subscription with deduplication key \`${deduplicationKey2?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: () => deduplicationKey,

@@ -307,3 +305,2 @@ async onCacheHit(_iterable, _config) {

getAbortSignalFromInputArgs: ({ signal }) => signal,
getCacheEntryMissingErrorMessage: __DEV__ ? (shardKey) => `Invariant: Found no cache entry for connection with shard key \`${shardKey?.toString()}\`` : void 0,
getCacheKeyFromInputArgs: ({ payload }) => getShard ? getShard(payload) : NULL_SHARD_CACHE_KEY,

@@ -310,0 +307,0 @@ onCacheHit: (connection, { payload }) => connection.send_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(payload),

type CacheKey = string | symbol;
type Config<TInput extends unknown[], TIterable extends AsyncIterable<unknown>> = Readonly<{
getAbortSignalFromInputArgs: (...args: TInput) => AbortSignal;
getCacheEntryMissingErrorMessage?: (cacheKey: CacheKey) => string;
getCacheKeyFromInputArgs: (...args: TInput) => CacheKey | undefined;

@@ -9,4 +8,4 @@ onCacheHit: (iterable: TIterable, ...args: TInput) => Promise<void>;

}>;
export declare function getCachedAbortableIterableFactory<TInput extends unknown[], TIterable extends AsyncIterable<unknown>>({ getAbortSignalFromInputArgs, getCacheEntryMissingErrorMessage, getCacheKeyFromInputArgs, onCacheHit, onCreateIterable, }: Config<TInput, TIterable>): (...args: TInput) => Promise<TIterable>;
export declare function getCachedAbortableIterableFactory<TInput extends unknown[], TIterable extends AsyncIterable<unknown>>({ getAbortSignalFromInputArgs, getCacheKeyFromInputArgs, onCacheHit, onCreateIterable, }: Config<TInput, TIterable>): (...args: TInput) => Promise<TIterable>;
export {};
//# sourceMappingURL=cached-abortable-iterable.d.ts.map

@@ -1,4 +0,4 @@

import { SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SolanaError } from '@solana/errors';
import { SOLANA_ERROR__RPC__INTEGER_OVERFLOW, SolanaError } from '@solana/errors';
import type { KeyPath } from '@solana/rpc-transformers';
export declare function createSolanaJsonRpcIntegerOverflowError(methodName: string, keyPath: KeyPath, value: bigint): SolanaError<typeof SOLANA_ERROR__RPC_INTEGER_OVERFLOW>;
export declare function createSolanaJsonRpcIntegerOverflowError(methodName: string, keyPath: KeyPath, value: bigint): SolanaError<typeof SOLANA_ERROR__RPC__INTEGER_OVERFLOW>;
//# sourceMappingURL=rpc-integer-overflow-error.d.ts.map
{
"name": "@solana/rpc-subscriptions",
"version": "2.0.0-experimental.27479b3",
"version": "2.0.0-experimental.28775df",
"description": "A library for subscribing to Solana RPC notifications",

@@ -50,9 +50,9 @@ "exports": {

"fast-stable-stringify": "^1.0.0",
"@solana/errors": "2.0.0-experimental.27479b3",
"@solana/functional": "2.0.0-experimental.27479b3",
"@solana/rpc-subscriptions-api": "2.0.0-experimental.27479b3",
"@solana/rpc-subscriptions-spec": "2.0.0-experimental.27479b3",
"@solana/rpc-subscriptions-transport-websocket": "2.0.0-experimental.27479b3",
"@solana/rpc-transformers": "2.0.0-experimental.27479b3",
"@solana/rpc-types": "2.0.0-experimental.27479b3"
"@solana/errors": "2.0.0-experimental.28775df",
"@solana/rpc-subscriptions-api": "2.0.0-experimental.28775df",
"@solana/rpc-subscriptions-spec": "2.0.0-experimental.28775df",
"@solana/rpc-subscriptions-transport-websocket": "2.0.0-experimental.28775df",
"@solana/functional": "2.0.0-experimental.28775df",
"@solana/rpc-transformers": "2.0.0-experimental.28775df",
"@solana/rpc-types": "2.0.0-experimental.28775df"
},

@@ -59,0 +59,0 @@ "bundlewatch": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc