@toon-protocol/client 5.1.0 → 5.2.0

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.
@@ -1,24 +1,32 @@
1
+ import {
2
+ ClientChannelFacade,
3
+ ClientWalletFacade,
4
+ DEFAULT_DEPOSIT,
5
+ DEFAULT_TIMEOUT_MS,
6
+ ToonClient,
7
+ addressFor,
8
+ resolveConfig,
9
+ send,
10
+ toEnvelopeRequest
11
+ } from "./chunk-KGT4XOBZ.js";
12
+ import "./chunk-6O5OXJVR.js";
1
13
  import {
2
14
  BeforePayRefusedError,
3
15
  ChainUnavailableError,
4
16
  ChannelFundingError,
5
17
  ChannelNotOpenError,
6
18
  ChannelResumeError,
7
- ClientChannelFacade,
8
- ClientWalletFacade,
9
19
  ConfigError,
10
20
  ConnectorError,
11
- DEFAULT_DEPOSIT,
12
- DEFAULT_TIMEOUT_MS,
13
21
  FacilitatorError,
14
22
  InsufficientBalanceError,
15
23
  InvalidAddressError,
16
24
  NetworkError,
17
25
  PaymentRequiredError,
26
+ ProxyBypassError,
18
27
  RouteNotPricedError,
19
28
  SponsorRefusedError,
20
29
  StaleRpcReadError,
21
- ToonClient,
22
30
  ToonClientError,
23
31
  TransactionOutcomeError,
24
32
  TransferNotDeliveredError,
@@ -26,14 +34,10 @@ import {
26
34
  TransportRequiredError,
27
35
  UnknownChainError,
28
36
  ValidationError,
29
- addressFor,
30
37
  chainUnavailableMessage,
31
- isInsufficientGasError,
32
- resolveConfig,
33
- send,
34
- toEnvelopeRequest
35
- } from "./chunk-BHGJXLS7.js";
36
- import "./chunk-6O5OXJVR.js";
38
+ describeEndpoint,
39
+ isInsufficientGasError
40
+ } from "./chunk-ABOW5ZCE.js";
37
41
  import "./chunk-32MD3CXE.js";
38
42
  export {
39
43
  BeforePayRefusedError,
@@ -52,6 +56,7 @@ export {
52
56
  InvalidAddressError,
53
57
  NetworkError,
54
58
  PaymentRequiredError,
59
+ ProxyBypassError,
55
60
  RouteNotPricedError,
56
61
  SponsorRefusedError,
57
62
  StaleRpcReadError,
@@ -65,9 +70,10 @@ export {
65
70
  ValidationError,
66
71
  addressFor,
67
72
  chainUnavailableMessage,
73
+ describeEndpoint,
68
74
  isInsufficientGasError,
69
75
  resolveConfig,
70
76
  send,
71
77
  toEnvelopeRequest
72
78
  };
73
- //# sourceMappingURL=client-DF3LZVLC.js.map
79
+ //# sourceMappingURL=client-3KOPQDZG.js.map
@@ -33,9 +33,9 @@ declare function validateSocks5hUrl(socksProxy: string): {
33
33
  * Node is undici and takes a **dispatcher**. It does not take an `http.Agent`,
34
34
  * which is why the `socks-proxy-agent` this package used to depend on cannot
35
35
  * serve this path at all.
36
- * - **Chain RPC** goes through viem, which calls the *global* `fetch` and accepts
37
- * no injected one. Its only opening is `http(url, { fetchOptions })`, so it
38
- * needs the same dispatcher handed to it as a fetch option (ADR 0002).
36
+ * - **Chain RPC** goes through viem, which takes an injected `fetchFn`
37
+ * (`http(url, { fetchFn })`), so it is handed this transport's proxied `fetch`
38
+ * (ADR 0002, ADR 0005).
39
39
  * - **The BTP carriage** goes through `ws`, which is `node:http` underneath and
40
40
  * therefore takes an `http.Agent` and nothing else.
41
41
  *
@@ -145,10 +145,15 @@ interface HiddenServiceTransport {
145
145
  createWebSocket: (url: string) => unknown;
146
146
  /**
147
147
  * The undici dispatcher behind `fetch`, for handing to something that insists
148
- * on calling the global `fetch` itself — viem's HTTP transport, in practice
149
- * (`http(url, { fetchOptions: { dispatcher } })`).
148
+ * on calling the global `fetch` itself. The client's own paths, viem's
149
+ * included (`http(url, { fetchFn })`), use `fetch` instead.
150
150
  */
151
151
  dispatcher: unknown;
152
+ /**
153
+ * How many canary dials this transport's proxy hooks (the dispatcher's
154
+ * `connect`, the websocket agents' `createConnection`) have seen and refused.
155
+ */
156
+ canaryHits(): number;
152
157
  /** Close the dispatcher's pool and the websocket agents' sockets. */
153
158
  close(): Promise<void>;
154
159
  }