@solana/rpc
Advanced tools
Comparing version 2.0.0-experimental.9f08044 to 2.0.0-experimental.a1dad11
@@ -10,3 +10,4 @@ import { createSolanaRpcApi } from '@solana/rpc-api'; | ||
// src/index.ts | ||
// ../build-scripts/env-shim.ts | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
function createSolanaJsonRpcIntegerOverflowError(methodName, keyPath, value) { | ||
@@ -60,2 +61,5 @@ let argumentLabel = ""; | ||
// src/rpc-request-coalescer.ts | ||
var EXPLICIT_ABORT_TOKEN = Symbol( | ||
__DEV__ ? "This symbol is thrown from the request that underlies a series of coalesced requests when the last request in that series aborts" : void 0 | ||
); | ||
function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) { | ||
@@ -84,3 +88,3 @@ let coalescedRequestsByDeduplicationKey; | ||
} catch (e) { | ||
if (e && typeof e === "object" && "name" in e && e.name === "AbortError") { | ||
if (e === EXPLICIT_ABORT_TOKEN) { | ||
return; | ||
@@ -107,6 +111,5 @@ } | ||
const abortController = coalescedRequest.abortController; | ||
abortController.abort(); | ||
abortController.abort(EXPLICIT_ABORT_TOKEN); | ||
} | ||
const abortError = new DOMException(e.target.reason, "AbortError"); | ||
reject(abortError); | ||
reject(e.target.reason); | ||
}; | ||
@@ -113,0 +116,0 @@ signal.addEventListener("abort", handleAbort); |
@@ -10,3 +10,4 @@ import { createSolanaRpcApi } from '@solana/rpc-api'; | ||
// src/index.ts | ||
// ../build-scripts/env-shim.ts | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
function createSolanaJsonRpcIntegerOverflowError(methodName, keyPath, value) { | ||
@@ -60,2 +61,5 @@ let argumentLabel = ""; | ||
// src/rpc-request-coalescer.ts | ||
var EXPLICIT_ABORT_TOKEN = Symbol( | ||
__DEV__ ? "This symbol is thrown from the request that underlies a series of coalesced requests when the last request in that series aborts" : void 0 | ||
); | ||
function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) { | ||
@@ -84,3 +88,3 @@ let coalescedRequestsByDeduplicationKey; | ||
} catch (e) { | ||
if (e && typeof e === "object" && "name" in e && e.name === "AbortError") { | ||
if (e === EXPLICIT_ABORT_TOKEN) { | ||
return; | ||
@@ -107,6 +111,5 @@ } | ||
const abortController = coalescedRequest.abortController; | ||
abortController.abort(); | ||
abortController.abort(EXPLICIT_ABORT_TOKEN); | ||
} | ||
const abortError = new DOMException(e.target.reason, "AbortError"); | ||
reject(abortError); | ||
reject(e.target.reason); | ||
}; | ||
@@ -113,0 +116,0 @@ signal.addEventListener("abort", handleAbort); |
@@ -10,3 +10,4 @@ import { createSolanaRpcApi } from '@solana/rpc-api'; | ||
// src/index.ts | ||
// ../build-scripts/env-shim.ts | ||
var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
function createSolanaJsonRpcIntegerOverflowError(methodName, keyPath, value) { | ||
@@ -60,2 +61,5 @@ let argumentLabel = ""; | ||
// src/rpc-request-coalescer.ts | ||
var EXPLICIT_ABORT_TOKEN = Symbol( | ||
__DEV__ ? "This symbol is thrown from the request that underlies a series of coalesced requests when the last request in that series aborts" : void 0 | ||
); | ||
function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) { | ||
@@ -84,3 +88,3 @@ let coalescedRequestsByDeduplicationKey; | ||
} catch (e) { | ||
if (e && typeof e === "object" && "name" in e && e.name === "AbortError") { | ||
if (e === EXPLICIT_ABORT_TOKEN) { | ||
return; | ||
@@ -107,6 +111,5 @@ } | ||
const abortController = coalescedRequest.abortController; | ||
abortController.abort(); | ||
abortController.abort(EXPLICIT_ABORT_TOKEN); | ||
} | ||
const abortError = new DOMException(e.target.reason, "AbortError"); | ||
reject(abortError); | ||
reject(e.target.reason); | ||
}; | ||
@@ -113,0 +116,0 @@ signal.addEventListener("abort", handleAbort); |
import { createHttpTransport } from '@solana/rpc-transport-http'; | ||
import type { ClusterUrl } from '@solana/rpc-types'; | ||
import { RpcTransportFromClusterUrl } from './rpc-clusters.js'; | ||
type Config<TClusterUrl extends ClusterUrl> = Readonly<{ | ||
headers?: Parameters<typeof createHttpTransport>[0]['headers']; | ||
type RpcTransportConfig = Parameters<typeof createHttpTransport>[0]; | ||
interface Config<TClusterUrl extends ClusterUrl> extends RpcTransportConfig { | ||
url: TClusterUrl; | ||
}>; | ||
} | ||
export declare function createDefaultRpcTransport<TClusterUrl extends ClusterUrl>(config: Config<TClusterUrl>): RpcTransportFromClusterUrl<TClusterUrl>; | ||
export {}; | ||
//# sourceMappingURL=rpc-transport.d.ts.map |
{ | ||
"name": "@solana/rpc", | ||
"version": "2.0.0-experimental.9f08044", | ||
"version": "2.0.0-experimental.a1dad11", | ||
"description": "A library for sending JSON RPC requests to Solana RPCs", | ||
@@ -50,9 +50,9 @@ "exports": { | ||
"fast-stable-stringify": "^1.0.0", | ||
"@solana/errors": "2.0.0-experimental.9f08044", | ||
"@solana/functional": "2.0.0-experimental.9f08044", | ||
"@solana/rpc-api": "2.0.0-experimental.9f08044", | ||
"@solana/rpc-spec": "2.0.0-experimental.9f08044", | ||
"@solana/rpc-transformers": "2.0.0-experimental.9f08044", | ||
"@solana/rpc-transport-http": "2.0.0-experimental.9f08044", | ||
"@solana/rpc-types": "2.0.0-experimental.9f08044" | ||
"@solana/functional": "2.0.0-experimental.a1dad11", | ||
"@solana/errors": "2.0.0-experimental.a1dad11", | ||
"@solana/rpc-api": "2.0.0-experimental.a1dad11", | ||
"@solana/rpc-transformers": "2.0.0-experimental.a1dad11", | ||
"@solana/rpc-spec": "2.0.0-experimental.a1dad11", | ||
"@solana/rpc-transport-http": "2.0.0-experimental.a1dad11", | ||
"@solana/rpc-types": "2.0.0-experimental.a1dad11" | ||
}, | ||
@@ -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
114115
1005
+ Added@solana/addresses@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/assertions@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/codecs-core@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/codecs-data-structures@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/codecs-numbers@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/codecs-strings@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/errors@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/functional@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/keys@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-api@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-parsed-types@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-spec@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-spec-types@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-subscriptions-spec@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-transformers@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-transport-http@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/rpc-types@2.0.0-experimental.a1dad11(transitive)
+ Added@solana/transactions@2.0.0-experimental.a1dad11(transitive)
+ Addedundici@6.21.1(transitive)
- Removed@solana/addresses@2.0.0-experimental.9f08044(transitive)
- Removed@solana/assertions@2.0.0-experimental.9f08044(transitive)
- Removed@solana/codecs-core@2.0.0-experimental.9f08044(transitive)
- Removed@solana/codecs-data-structures@2.0.0-experimental.9f08044(transitive)
- Removed@solana/codecs-numbers@2.0.0-experimental.9f08044(transitive)
- Removed@solana/codecs-strings@2.0.0-experimental.9f08044(transitive)
- Removed@solana/errors@2.0.0-experimental.9f08044(transitive)
- Removed@solana/functional@2.0.0-experimental.9f08044(transitive)
- Removed@solana/keys@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-api@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-parsed-types@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-spec@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-spec-types@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-subscriptions-spec@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-transformers@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-transport-http@2.0.0-experimental.9f08044(transitive)
- Removed@solana/rpc-types@2.0.0-experimental.9f08044(transitive)
- Removed@solana/transactions@2.0.0-experimental.9f08044(transitive)
Updated@solana/rpc-transport-http@2.0.0-experimental.a1dad11