@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.
- package/dist/canary-FYKD66CX.js +67 -0
- package/dist/canary-FYKD66CX.js.map +1 -0
- package/dist/chunk-ABOW5ZCE.js +299 -0
- package/dist/chunk-ABOW5ZCE.js.map +1 -0
- package/dist/{chunk-BHGJXLS7.js → chunk-KGT4XOBZ.js} +245 -359
- package/dist/chunk-KGT4XOBZ.js.map +1 -0
- package/dist/{chunk-SIDK54Y5.js → chunk-KWUYZQBN.js} +30 -5
- package/dist/chunk-KWUYZQBN.js.map +1 -0
- package/dist/cli/main.js +68 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/{client-DF3LZVLC.js → client-3KOPQDZG.js} +19 -13
- package/dist/{hidden-service-BtIv3u0L.d.ts → hidden-service-D58bCgdN.d.ts} +10 -5
- package/dist/index.d.ts +237 -94
- package/dist/index.js +36 -28
- package/dist/index.js.map +1 -1
- package/dist/{socks-KNSFCLBG.js → socks-OGGKES7C.js} +6 -2
- package/dist/transport/hidden-service.d.ts +1 -1
- package/dist/transport/hidden-service.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-BHGJXLS7.js.map +0 -1
- package/dist/chunk-SIDK54Y5.js.map +0 -1
- /package/dist/{client-DF3LZVLC.js.map → client-3KOPQDZG.js.map} +0 -0
- /package/dist/{socks-KNSFCLBG.js.map → socks-OGGKES7C.js.map} +0 -0
|
@@ -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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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-
|
|
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
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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
|
|
149
|
-
* (`http(url, {
|
|
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
|
}
|