@toon-protocol/client 3.2.0 → 4.0.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/{chunk-4I3JQ7KA.js → chunk-2DGVNDKA.js} +2 -2
- package/dist/{chunk-ZHWYFPOP.js → chunk-CG3OXV74.js} +4719 -5057
- package/dist/chunk-CG3OXV74.js.map +1 -0
- package/dist/{chunk-GOLBDUNV.js → chunk-LJSOTVUT.js} +36 -3
- package/dist/chunk-LJSOTVUT.js.map +1 -0
- package/dist/{chunk-7MPONJW5.js → chunk-WJKJ6Y4N.js} +19 -10
- package/dist/{chunk-7MPONJW5.js.map → chunk-WJKJ6Y4N.js.map} +1 -1
- package/dist/cli/main.js +134 -118
- package/dist/cli/main.js.map +1 -1
- package/dist/{client-SCEP67S5.js → client-7YIJOR5K.js} +9 -7
- package/dist/hidden-service-BtIv3u0L.d.ts +180 -0
- package/dist/index.d.ts +2651 -2899
- package/dist/index.js +131 -188
- package/dist/index.js.map +1 -1
- package/dist/socks-K6QOOWJ5.js +23 -0
- package/dist/transport/hidden-service.d.ts +1 -116
- package/dist/transport/hidden-service.js +9 -1
- package/package.json +2 -1
- package/dist/chunk-GOLBDUNV.js.map +0 -1
- package/dist/chunk-ZHWYFPOP.js.map +0 -1
- package/dist/socks-CCMHMB35.js +0 -15
- /package/dist/{chunk-4I3JQ7KA.js.map → chunk-2DGVNDKA.js.map} +0 -0
- /package/dist/{client-SCEP67S5.js.map → client-7YIJOR5K.js.map} +0 -0
- /package/dist/{socks-CCMHMB35.js.map → socks-K6QOOWJ5.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -8,23 +8,25 @@ import {
|
|
|
8
8
|
loadKeystore,
|
|
9
9
|
openKeystore,
|
|
10
10
|
writeKeystoreFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2DGVNDKA.js";
|
|
12
12
|
import {
|
|
13
13
|
ACCUMULATED_COST_HEADER,
|
|
14
14
|
ACCUMULATED_COST_PROTOCOL,
|
|
15
15
|
BTPMessageType,
|
|
16
|
+
BatchChannelManager,
|
|
17
|
+
BatchSettlementPayer,
|
|
16
18
|
BeforePayRefusedError,
|
|
17
19
|
BtpAuthError,
|
|
18
20
|
BtpConnectionError,
|
|
19
21
|
BtpPaidWriteTransport,
|
|
20
22
|
BtpRuntimeClient,
|
|
23
|
+
CHANNEL_CHALLENGE_MAX_LIFETIME_SECONDS,
|
|
21
24
|
CLAIM_ACK_HEADER,
|
|
22
25
|
CLAIM_ACK_PROTOCOL,
|
|
23
|
-
CLAIM_REJECT_CODE,
|
|
24
26
|
CLAIM_REJECT_REASONS,
|
|
27
|
+
CONNECTOR_MAX_TIMEOUT_SECONDS,
|
|
25
28
|
ChainUnavailableError,
|
|
26
29
|
ChannelFundingError,
|
|
27
|
-
ChannelManager,
|
|
28
30
|
ChannelNotOpenError,
|
|
29
31
|
ChannelResumeError,
|
|
30
32
|
ClientChannelFacade,
|
|
@@ -34,14 +36,14 @@ import {
|
|
|
34
36
|
ConnectorEdgeError,
|
|
35
37
|
ConnectorError,
|
|
36
38
|
DEFAULT_DEPOSIT,
|
|
37
|
-
DEFAULT_SETTLEMENT_TIMEOUT,
|
|
38
39
|
DEFAULT_TIMEOUT_MS,
|
|
39
|
-
|
|
40
|
+
ERC3009_DEPOSIT_COLLECTOR_ADDRESS,
|
|
40
41
|
EnvelopeError,
|
|
41
42
|
EnvelopeErrorKind,
|
|
42
43
|
EvmSigner,
|
|
43
44
|
FULFILLMENT_MISMATCH_CODE,
|
|
44
45
|
FULFILLMENT_MISMATCH_MESSAGE,
|
|
46
|
+
FacilitatorError,
|
|
45
47
|
GIFTWRAP_NONCE_LENGTH,
|
|
46
48
|
GIFTWRAP_PUBLIC_KEY_LENGTH,
|
|
47
49
|
GIFTWRAP_SECRET_LENGTH,
|
|
@@ -58,35 +60,55 @@ import {
|
|
|
58
60
|
InvalidAddressError,
|
|
59
61
|
IsomorphicBtpClient,
|
|
60
62
|
JsonFileChannelStore,
|
|
61
|
-
|
|
63
|
+
MAX_GRACE_PERIOD_SECONDS,
|
|
64
|
+
MAX_WITHDRAW_DELAY_SECONDS,
|
|
65
|
+
MIN_GRACE_PERIOD_SECONDS,
|
|
66
|
+
MIN_WITHDRAW_DELAY_SECONDS,
|
|
62
67
|
NetworkError,
|
|
63
68
|
OerError,
|
|
64
69
|
OerErrorKind,
|
|
65
|
-
OnChainChannelClient,
|
|
66
70
|
PACKET_EXPIRY_HEADROOM_MS,
|
|
71
|
+
PAYMENT_CHANNELS_PROGRAM_ID,
|
|
67
72
|
PAYMENT_REQUIRED_HEADER,
|
|
68
73
|
PAYMENT_REQUIRED_PROTOCOL,
|
|
74
|
+
PERMIT2_ADDRESS,
|
|
75
|
+
PERMIT2_DEPOSIT_COLLECTOR_ADDRESS,
|
|
76
|
+
PROXIED_RPC_DEFAULTS,
|
|
69
77
|
PaymentRequiredError,
|
|
70
78
|
RouteNotPricedError,
|
|
71
79
|
SealedResponseError,
|
|
72
|
-
|
|
80
|
+
SolanaRpcTransportError,
|
|
81
|
+
SponsorRefusedError,
|
|
73
82
|
StaleRpcReadError,
|
|
74
|
-
TOKEN_NETWORK_ABI,
|
|
75
|
-
TOKEN_NETWORK_REGISTRY_ABI,
|
|
76
|
-
TokenNetworkClient,
|
|
77
83
|
ToonClient,
|
|
78
84
|
ToonClientError,
|
|
85
|
+
TransactionOutcomeError,
|
|
79
86
|
TransferNotDeliveredError,
|
|
80
87
|
TransferUnsupportedError,
|
|
81
88
|
TransportRequiredError,
|
|
82
89
|
UnknownChainError,
|
|
83
90
|
ValidationError,
|
|
91
|
+
X402_BATCH_SETTLEMENT_ADDRESS,
|
|
92
|
+
X402_BATCH_SETTLEMENT_EXIT_ABI,
|
|
93
|
+
X402_BATCH_SETTLEMENT_READ_ABI,
|
|
84
94
|
addressFor,
|
|
95
|
+
batchChannelId,
|
|
96
|
+
batchVoucherDigest,
|
|
97
|
+
buildBatchChannelConfig,
|
|
98
|
+
buildEip3009Deposit,
|
|
99
|
+
buildPermit2Deposit,
|
|
85
100
|
buildResponseMeta,
|
|
101
|
+
buildSponsoredOpen,
|
|
102
|
+
buildSvmBatchChannelConfig,
|
|
103
|
+
buildSvmRequestCloseInstruction,
|
|
104
|
+
buildSvmSealInstruction,
|
|
105
|
+
buildSvmTopUpInstruction,
|
|
106
|
+
buildSvmVoucherMessage,
|
|
107
|
+
buildSvmWithdrawPayerInstruction,
|
|
86
108
|
chainUnavailableMessage,
|
|
87
109
|
chargeFor,
|
|
110
|
+
chooseBatchSettlement,
|
|
88
111
|
connectorEdgeBaseUrl,
|
|
89
|
-
counterpartyMatch,
|
|
90
112
|
decodeAccumulatedCost,
|
|
91
113
|
decodeBase64Text,
|
|
92
114
|
decodeClaimAck,
|
|
@@ -94,12 +116,12 @@ import {
|
|
|
94
116
|
decodeEnvelopeRequest,
|
|
95
117
|
decodeEnvelopeResponse,
|
|
96
118
|
decodePaymentRequired,
|
|
119
|
+
decodeSvmBatchChannel,
|
|
97
120
|
decodeUtf8,
|
|
98
121
|
decodeVarOctetString,
|
|
99
122
|
decodeVarUint,
|
|
100
123
|
defaultDestinationFor,
|
|
101
124
|
defaultFaucetTimeout,
|
|
102
|
-
deriveEvmChannelId,
|
|
103
125
|
deriveFulfillment,
|
|
104
126
|
deserializeIlpPacket,
|
|
105
127
|
deserializeIlpPrepare,
|
|
@@ -110,25 +132,37 @@ import {
|
|
|
110
132
|
encodeVarOctetString,
|
|
111
133
|
encodeVarUint,
|
|
112
134
|
envelopeHeader,
|
|
135
|
+
evmChainIdOf,
|
|
136
|
+
evmChallengeDigest,
|
|
137
|
+
evmVoucherClaim,
|
|
138
|
+
finalizeEvmBatchWithdraw,
|
|
113
139
|
fromBase64,
|
|
114
140
|
fundWallet,
|
|
141
|
+
generateSolanaKeypair,
|
|
142
|
+
getSvmBatchChannel,
|
|
115
143
|
giftWrapPublicKey,
|
|
116
144
|
httpEndpointToBtpUrl,
|
|
145
|
+
initiateEvmBatchWithdraw,
|
|
117
146
|
isInsufficientGasError,
|
|
118
|
-
isUnknownChannelReject,
|
|
119
147
|
localGiftWrapEcdh,
|
|
120
148
|
looksLikeSealedResponse,
|
|
121
149
|
mapIlpResponse,
|
|
150
|
+
nextVoucherAmount,
|
|
151
|
+
offerFromTerms,
|
|
122
152
|
openRequest,
|
|
123
153
|
openResponse,
|
|
154
|
+
parseBatchSettlementOffer,
|
|
155
|
+
parseBatchSettlementTerms,
|
|
124
156
|
parseBtpMessage,
|
|
125
|
-
parseEvmChainId,
|
|
126
157
|
parsePaymentTerms,
|
|
127
158
|
parseSelfDescription,
|
|
128
|
-
|
|
159
|
+
parseSolanaWireTransaction,
|
|
129
160
|
parseX402Body,
|
|
130
161
|
parseX402Challenge,
|
|
162
|
+
patchSolanaRecentBlockhash,
|
|
163
|
+
paymentChannelsEventAuthority,
|
|
131
164
|
readBaseUnits,
|
|
165
|
+
readEvmBatchChannel,
|
|
132
166
|
readEvmNativeBalance,
|
|
133
167
|
readEvmTokenBalance,
|
|
134
168
|
readExchangeOutcome,
|
|
@@ -136,8 +170,10 @@ import {
|
|
|
136
170
|
readResponseMeta2,
|
|
137
171
|
readSolanaNativeBalance,
|
|
138
172
|
readSolanaTokenBalance,
|
|
173
|
+
readVoucherRefusal,
|
|
139
174
|
readWalletBalances,
|
|
140
|
-
|
|
175
|
+
requestSponsoredOpen,
|
|
176
|
+
requestSvmBatchClose,
|
|
141
177
|
resolveConfig,
|
|
142
178
|
resolveExpectedFulfillment,
|
|
143
179
|
resolveExpiresAt,
|
|
@@ -145,7 +181,6 @@ import {
|
|
|
145
181
|
routePriceFor,
|
|
146
182
|
rpcFetch,
|
|
147
183
|
rpcTransport,
|
|
148
|
-
sameSettlementAddress,
|
|
149
184
|
sealExchange,
|
|
150
185
|
sealRequest,
|
|
151
186
|
sealRequestWithRandomness,
|
|
@@ -158,21 +193,30 @@ import {
|
|
|
158
193
|
serializeIlpFulfill,
|
|
159
194
|
serializeIlpPrepare,
|
|
160
195
|
serializeIlpReject,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
196
|
+
settleDeposit,
|
|
197
|
+
signBatchVoucher,
|
|
198
|
+
signEvmChallenge,
|
|
199
|
+
signSolanaChallenge,
|
|
200
|
+
signSolanaWireTransaction,
|
|
201
|
+
signSvmVoucher,
|
|
202
|
+
singleRecipientDistributionHash,
|
|
203
|
+
solanaChallengeMessage,
|
|
204
|
+
solanaKeypair,
|
|
205
|
+
solanaVoucherClaim,
|
|
206
|
+
svmBatchChannelAddress,
|
|
164
207
|
toEnvelopeRequest,
|
|
165
208
|
toHex,
|
|
166
209
|
trimTrailingSlashes,
|
|
167
|
-
withRetry
|
|
168
|
-
|
|
210
|
+
withRetry,
|
|
211
|
+
withdrawSvmBatchChannel
|
|
212
|
+
} from "./chunk-CG3OXV74.js";
|
|
169
213
|
import {
|
|
170
214
|
DEVNET,
|
|
171
215
|
HS_HOSTNAME_MAX_LENGTH,
|
|
172
216
|
HS_HOSTNAME_REGEX,
|
|
173
217
|
assertRoutableHsHostname,
|
|
174
|
-
base58Decode,
|
|
175
218
|
base58Encode,
|
|
219
|
+
defaultFacilitatorFor,
|
|
176
220
|
defaultRpcUrl,
|
|
177
221
|
deriveFullIdentity,
|
|
178
222
|
evmDerivationPath,
|
|
@@ -182,157 +226,15 @@ import {
|
|
|
182
226
|
isHiddenServiceUrl,
|
|
183
227
|
isRoutableHsHostname,
|
|
184
228
|
validateMnemonic
|
|
185
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-WJKJ6Y4N.js";
|
|
186
230
|
import {
|
|
187
231
|
validateSocks5hUrl
|
|
188
232
|
} from "./chunk-32MD3CXE.js";
|
|
189
233
|
|
|
190
|
-
// src/channel/solana/wire-transaction.ts
|
|
191
|
-
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
192
|
-
import { randomBytes } from "@noble/hashes/utils.js";
|
|
193
|
-
var SIGNATURE_LENGTH = 64;
|
|
194
|
-
var PUBKEY_LENGTH = 32;
|
|
195
|
-
var SEED_LENGTH = 32;
|
|
196
|
-
var SECRET_KEY_LENGTH = 64;
|
|
197
|
-
var VERSION_PREFIX_MASK = 128;
|
|
198
|
-
function readCompactU16(bytes, offset) {
|
|
199
|
-
let value = 0;
|
|
200
|
-
for (let shift = 0; shift < 3; shift++) {
|
|
201
|
-
const byte = bytes[offset + shift];
|
|
202
|
-
if (byte === void 0) {
|
|
203
|
-
throw new Error("malformed Solana transaction: truncated compact-u16");
|
|
204
|
-
}
|
|
205
|
-
value |= (byte & 127) << shift * 7;
|
|
206
|
-
if ((byte & 128) === 0) return { value, offset: offset + shift + 1 };
|
|
207
|
-
}
|
|
208
|
-
throw new Error("malformed Solana transaction: compact-u16 exceeds three bytes");
|
|
209
|
-
}
|
|
210
|
-
function toWireBytes(wire) {
|
|
211
|
-
return typeof wire === "string" ? fromBase64(wire) : wire;
|
|
212
|
-
}
|
|
213
|
-
function likeInput(wire, bytes) {
|
|
214
|
-
return typeof wire === "string" ? toBase64(bytes) : bytes;
|
|
215
|
-
}
|
|
216
|
-
function parseSolanaWireTransaction(wire) {
|
|
217
|
-
const bytes = toWireBytes(wire);
|
|
218
|
-
const count = readCompactU16(bytes, 0);
|
|
219
|
-
const signaturesOffset = count.offset;
|
|
220
|
-
const messageOffset = signaturesOffset + count.value * SIGNATURE_LENGTH;
|
|
221
|
-
if (messageOffset > bytes.length) {
|
|
222
|
-
throw new Error(
|
|
223
|
-
`malformed Solana transaction: ${count.value} signature slots do not fit in ${bytes.length} bytes`
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
const prefix = bytes[messageOffset];
|
|
227
|
-
if (prefix === void 0) {
|
|
228
|
-
throw new Error("malformed Solana transaction: no message after the signatures");
|
|
229
|
-
}
|
|
230
|
-
const versioned = (prefix & VERSION_PREFIX_MASK) !== 0;
|
|
231
|
-
const version = versioned ? prefix & ~VERSION_PREFIX_MASK : "legacy";
|
|
232
|
-
const headerOffset = messageOffset + (versioned ? 1 : 0);
|
|
233
|
-
const numRequiredSignatures = bytes[headerOffset];
|
|
234
|
-
if (numRequiredSignatures === void 0) {
|
|
235
|
-
throw new Error("malformed Solana transaction: truncated message header");
|
|
236
|
-
}
|
|
237
|
-
if (numRequiredSignatures !== count.value) {
|
|
238
|
-
throw new Error(
|
|
239
|
-
`malformed Solana transaction: ${count.value} signature slots but the header requires ${numRequiredSignatures}`
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
const accountCount = readCompactU16(bytes, headerOffset + 3);
|
|
243
|
-
const keysOffset = accountCount.offset;
|
|
244
|
-
const recentBlockhashOffset = keysOffset + accountCount.value * PUBKEY_LENGTH;
|
|
245
|
-
if (recentBlockhashOffset + PUBKEY_LENGTH > bytes.length) {
|
|
246
|
-
throw new Error(
|
|
247
|
-
`malformed Solana transaction: ${accountCount.value} account keys and a blockhash do not fit in ${bytes.length} bytes`
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
if (numRequiredSignatures > accountCount.value) {
|
|
251
|
-
throw new Error(
|
|
252
|
-
`malformed Solana transaction: header requires ${numRequiredSignatures} signatures but the message names only ${accountCount.value} accounts`
|
|
253
|
-
);
|
|
254
|
-
}
|
|
255
|
-
const staticAccounts = [];
|
|
256
|
-
for (let i = 0; i < accountCount.value; i++) {
|
|
257
|
-
const start = keysOffset + i * PUBKEY_LENGTH;
|
|
258
|
-
staticAccounts.push(base58Encode(bytes.slice(start, start + PUBKEY_LENGTH)));
|
|
259
|
-
}
|
|
260
|
-
const signers = staticAccounts.slice(0, numRequiredSignatures);
|
|
261
|
-
const unsigned = signers.filter((_signer, slot) => {
|
|
262
|
-
const start = signaturesOffset + slot * SIGNATURE_LENGTH;
|
|
263
|
-
return bytes.subarray(start, start + SIGNATURE_LENGTH).every((byte) => byte === 0);
|
|
264
|
-
});
|
|
265
|
-
return {
|
|
266
|
-
bytes,
|
|
267
|
-
version,
|
|
268
|
-
signers,
|
|
269
|
-
unsigned,
|
|
270
|
-
staticAccounts,
|
|
271
|
-
recentBlockhash: base58Encode(
|
|
272
|
-
bytes.slice(recentBlockhashOffset, recentBlockhashOffset + PUBKEY_LENGTH)
|
|
273
|
-
),
|
|
274
|
-
signaturesOffset,
|
|
275
|
-
messageOffset,
|
|
276
|
-
recentBlockhashOffset
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
function patchSolanaRecentBlockhash(wire, recentBlockhash) {
|
|
280
|
-
const blockhash = base58Decode(recentBlockhash);
|
|
281
|
-
if (blockhash.length !== PUBKEY_LENGTH) {
|
|
282
|
-
throw new Error(
|
|
283
|
-
`recentBlockhash must decode to ${PUBKEY_LENGTH} bytes, got ${blockhash.length} from ${JSON.stringify(recentBlockhash)}`
|
|
284
|
-
);
|
|
285
|
-
}
|
|
286
|
-
const parsed = parseSolanaWireTransaction(wire);
|
|
287
|
-
const patched = new Uint8Array(parsed.bytes);
|
|
288
|
-
patched.set(blockhash, parsed.recentBlockhashOffset);
|
|
289
|
-
patched.fill(
|
|
290
|
-
0,
|
|
291
|
-
parsed.signaturesOffset,
|
|
292
|
-
parsed.signaturesOffset + parsed.signers.length * SIGNATURE_LENGTH
|
|
293
|
-
);
|
|
294
|
-
return likeInput(wire, patched);
|
|
295
|
-
}
|
|
296
|
-
function signSolanaWireTransaction(wire, signers) {
|
|
297
|
-
const parsed = parseSolanaWireTransaction(wire);
|
|
298
|
-
const signed = new Uint8Array(parsed.bytes);
|
|
299
|
-
const message = signed.subarray(parsed.messageOffset);
|
|
300
|
-
for (const signer of signers) {
|
|
301
|
-
const address = base58Encode(signer.publicKey);
|
|
302
|
-
const slot = parsed.signers.indexOf(address);
|
|
303
|
-
if (slot === -1) {
|
|
304
|
-
throw new Error(
|
|
305
|
-
`${address} is not a required signer of this transaction (slots: ${parsed.signers.join(", ")})`
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
signed.set(
|
|
309
|
-
ed25519.sign(message, signer.privateKey),
|
|
310
|
-
parsed.signaturesOffset + slot * SIGNATURE_LENGTH
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
return likeInput(wire, signed);
|
|
314
|
-
}
|
|
315
|
-
function generateSolanaKeypair() {
|
|
316
|
-
return keypairFromSeed(randomBytes(SEED_LENGTH));
|
|
317
|
-
}
|
|
318
|
-
function solanaKeypair(key) {
|
|
319
|
-
const bytes = typeof key === "string" ? base58Decode(key.trim()) : key;
|
|
320
|
-
if (bytes.length !== SEED_LENGTH && bytes.length !== SECRET_KEY_LENGTH) {
|
|
321
|
-
throw new Error(
|
|
322
|
-
`a Solana secret must be a ${SEED_LENGTH}-byte seed or a ${SECRET_KEY_LENGTH}-byte secret key; got ${bytes.length} bytes`
|
|
323
|
-
);
|
|
324
|
-
}
|
|
325
|
-
return keypairFromSeed(bytes.slice(0, SEED_LENGTH));
|
|
326
|
-
}
|
|
327
|
-
function keypairFromSeed(seed) {
|
|
328
|
-
const publicKey = new Uint8Array(ed25519.getPublicKey(seed));
|
|
329
|
-
return { privateKey: seed, publicKey, address: base58Encode(publicKey) };
|
|
330
|
-
}
|
|
331
|
-
|
|
332
234
|
// src/jobs/job-event.ts
|
|
333
235
|
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
334
236
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
335
|
-
import { randomBytes
|
|
237
|
+
import { randomBytes } from "@noble/hashes/utils.js";
|
|
336
238
|
function serializeForId(event) {
|
|
337
239
|
return JSON.stringify([
|
|
338
240
|
0,
|
|
@@ -344,7 +246,7 @@ function serializeForId(event) {
|
|
|
344
246
|
]);
|
|
345
247
|
}
|
|
346
248
|
function buildJobEvent(params) {
|
|
347
|
-
const secretKey = params.secretKey ??
|
|
249
|
+
const secretKey = params.secretKey ?? randomBytes(32);
|
|
348
250
|
const pubkey = toHex(new Uint8Array(schnorr.getPublicKey(secretKey)));
|
|
349
251
|
const tags = [];
|
|
350
252
|
for (const [key, value] of Object.entries(params.params)) {
|
|
@@ -680,18 +582,20 @@ export {
|
|
|
680
582
|
ACCUMULATED_COST_PROTOCOL,
|
|
681
583
|
ARNS_KIND,
|
|
682
584
|
BTPMessageType,
|
|
585
|
+
BatchChannelManager,
|
|
586
|
+
BatchSettlementPayer,
|
|
683
587
|
BeforePayRefusedError,
|
|
684
588
|
BtpAuthError,
|
|
685
589
|
BtpConnectionError,
|
|
686
590
|
BtpPaidWriteTransport,
|
|
687
591
|
BtpRuntimeClient,
|
|
592
|
+
CHANNEL_CHALLENGE_MAX_LIFETIME_SECONDS,
|
|
688
593
|
CLAIM_ACK_HEADER,
|
|
689
594
|
CLAIM_ACK_PROTOCOL,
|
|
690
|
-
CLAIM_REJECT_CODE,
|
|
691
595
|
CLAIM_REJECT_REASONS,
|
|
596
|
+
CONNECTOR_MAX_TIMEOUT_SECONDS,
|
|
692
597
|
ChainUnavailableError,
|
|
693
598
|
ChannelFundingError,
|
|
694
|
-
ChannelManager,
|
|
695
599
|
ChannelNotOpenError,
|
|
696
600
|
ChannelResumeError,
|
|
697
601
|
ClientChannelFacade,
|
|
@@ -701,15 +605,15 @@ export {
|
|
|
701
605
|
ConnectorEdgeError,
|
|
702
606
|
ConnectorError,
|
|
703
607
|
DEFAULT_DEPOSIT,
|
|
704
|
-
DEFAULT_SETTLEMENT_TIMEOUT,
|
|
705
608
|
DEFAULT_TIMEOUT_MS,
|
|
706
609
|
DEVNET,
|
|
707
|
-
|
|
610
|
+
ERC3009_DEPOSIT_COLLECTOR_ADDRESS,
|
|
708
611
|
EnvelopeError,
|
|
709
612
|
EnvelopeErrorKind,
|
|
710
613
|
EvmSigner,
|
|
711
614
|
FULFILLMENT_MISMATCH_CODE,
|
|
712
615
|
FULFILLMENT_MISMATCH_MESSAGE,
|
|
616
|
+
FacilitatorError,
|
|
713
617
|
GIFTWRAP_NONCE_LENGTH,
|
|
714
618
|
GIFTWRAP_PUBLIC_KEY_LENGTH,
|
|
715
619
|
GIFTWRAP_SECRET_LENGTH,
|
|
@@ -729,40 +633,60 @@ export {
|
|
|
729
633
|
IsomorphicBtpClient,
|
|
730
634
|
JsonFileChannelStore,
|
|
731
635
|
KEYSTORE_VERSION,
|
|
732
|
-
|
|
636
|
+
MAX_GRACE_PERIOD_SECONDS,
|
|
637
|
+
MAX_WITHDRAW_DELAY_SECONDS,
|
|
638
|
+
MIN_GRACE_PERIOD_SECONDS,
|
|
639
|
+
MIN_WITHDRAW_DELAY_SECONDS,
|
|
733
640
|
NetworkError,
|
|
734
641
|
OerError,
|
|
735
642
|
OerErrorKind,
|
|
736
|
-
OnChainChannelClient,
|
|
737
643
|
PACKET_EXPIRY_HEADROOM_MS,
|
|
644
|
+
PAYMENT_CHANNELS_PROGRAM_ID,
|
|
738
645
|
PAYMENT_REQUIRED_HEADER,
|
|
739
646
|
PAYMENT_REQUIRED_PROTOCOL,
|
|
647
|
+
PERMIT2_ADDRESS,
|
|
648
|
+
PERMIT2_DEPOSIT_COLLECTOR_ADDRESS,
|
|
649
|
+
PROXIED_RPC_DEFAULTS,
|
|
740
650
|
PaymentRequiredError,
|
|
741
651
|
RouteNotPricedError,
|
|
742
652
|
SOLANA_GAS_KIND,
|
|
743
653
|
SealedResponseError,
|
|
744
|
-
|
|
654
|
+
SolanaRpcTransportError,
|
|
655
|
+
SponsorRefusedError,
|
|
745
656
|
StaleRpcReadError,
|
|
746
|
-
TOKEN_NETWORK_ABI,
|
|
747
|
-
TOKEN_NETWORK_REGISTRY_ABI,
|
|
748
|
-
TokenNetworkClient,
|
|
749
657
|
ToonClient,
|
|
750
658
|
ToonClientError,
|
|
659
|
+
TransactionOutcomeError,
|
|
751
660
|
TransferNotDeliveredError,
|
|
752
661
|
TransferUnsupportedError,
|
|
753
662
|
TransportRequiredError,
|
|
754
663
|
UnknownChainError,
|
|
755
664
|
ValidationError,
|
|
665
|
+
X402_BATCH_SETTLEMENT_ADDRESS,
|
|
666
|
+
X402_BATCH_SETTLEMENT_EXIT_ABI,
|
|
667
|
+
X402_BATCH_SETTLEMENT_READ_ABI,
|
|
756
668
|
addressFor,
|
|
757
669
|
assertRoutableHsHostname,
|
|
670
|
+
batchChannelId,
|
|
671
|
+
batchVoucherDigest,
|
|
672
|
+
buildBatchChannelConfig,
|
|
673
|
+
buildEip3009Deposit,
|
|
758
674
|
buildJobEvent,
|
|
675
|
+
buildPermit2Deposit,
|
|
759
676
|
buildResponseMeta,
|
|
677
|
+
buildSponsoredOpen,
|
|
678
|
+
buildSvmBatchChannelConfig,
|
|
679
|
+
buildSvmRequestCloseInstruction,
|
|
680
|
+
buildSvmSealInstruction,
|
|
681
|
+
buildSvmTopUpInstruction,
|
|
682
|
+
buildSvmVoucherMessage,
|
|
683
|
+
buildSvmWithdrawPayerInstruction,
|
|
760
684
|
buyArnsName,
|
|
761
685
|
buyArnsNameWithNewAnt,
|
|
762
686
|
chainUnavailableMessage,
|
|
763
687
|
chargeFor,
|
|
688
|
+
chooseBatchSettlement,
|
|
764
689
|
connectorEdgeBaseUrl,
|
|
765
|
-
counterpartyMatch,
|
|
766
690
|
decodeAccumulatedCost,
|
|
767
691
|
decodeBase64Text,
|
|
768
692
|
decodeClaimAck,
|
|
@@ -770,13 +694,14 @@ export {
|
|
|
770
694
|
decodeEnvelopeRequest,
|
|
771
695
|
decodeEnvelopeResponse,
|
|
772
696
|
decodePaymentRequired,
|
|
697
|
+
decodeSvmBatchChannel,
|
|
773
698
|
decodeVarOctetString,
|
|
774
699
|
decodeVarUint,
|
|
775
700
|
decryptMnemonic,
|
|
776
701
|
defaultDestinationFor,
|
|
702
|
+
defaultFacilitatorFor,
|
|
777
703
|
defaultFaucetTimeout,
|
|
778
704
|
defaultRpcUrl,
|
|
779
|
-
deriveEvmChannelId,
|
|
780
705
|
deriveFulfillment,
|
|
781
706
|
deriveFullIdentity,
|
|
782
707
|
deserializeIlpPacket,
|
|
@@ -788,49 +713,60 @@ export {
|
|
|
788
713
|
encodeVarUint,
|
|
789
714
|
encryptMnemonic,
|
|
790
715
|
envelopeHeader,
|
|
716
|
+
evmChainIdOf,
|
|
717
|
+
evmChallengeDigest,
|
|
791
718
|
evmDerivationPath,
|
|
792
719
|
evmIdentityFromKey,
|
|
720
|
+
evmVoucherClaim,
|
|
721
|
+
finalizeEvmBatchWithdraw,
|
|
793
722
|
fundWallet,
|
|
794
723
|
generateKeystore,
|
|
795
724
|
generateMnemonic,
|
|
796
725
|
generateRandomIdentity,
|
|
797
726
|
generateSolanaKeypair,
|
|
727
|
+
getSvmBatchChannel,
|
|
798
728
|
giftWrapPublicKey,
|
|
799
729
|
httpEndpointToBtpUrl,
|
|
800
730
|
importKeystore,
|
|
731
|
+
initiateEvmBatchWithdraw,
|
|
801
732
|
isGasStationFailure,
|
|
802
733
|
isHiddenServiceUrl,
|
|
803
734
|
isInsufficientGasError,
|
|
804
735
|
isRoutableHsHostname,
|
|
805
|
-
isUnknownChannelReject,
|
|
806
736
|
jobEventParam,
|
|
807
737
|
keystoreDerivation,
|
|
808
738
|
loadKeystore,
|
|
809
739
|
localGiftWrapEcdh,
|
|
810
740
|
looksLikeSealedResponse,
|
|
811
741
|
mapIlpResponse,
|
|
742
|
+
nextVoucherAmount,
|
|
743
|
+
offerFromTerms,
|
|
812
744
|
openKeystore,
|
|
813
745
|
openRequest,
|
|
814
746
|
openResponse,
|
|
747
|
+
parseBatchSettlementOffer,
|
|
748
|
+
parseBatchSettlementTerms,
|
|
815
749
|
parseBtpMessage,
|
|
816
|
-
parseEvmChainId,
|
|
817
750
|
parsePaymentTerms,
|
|
818
751
|
parseSelfDescription,
|
|
819
|
-
parseSettlementEntry,
|
|
820
752
|
parseSolanaWireTransaction,
|
|
821
753
|
parseX402Body,
|
|
822
754
|
parseX402Challenge,
|
|
823
755
|
patchSolanaRecentBlockhash,
|
|
756
|
+
paymentChannelsEventAuthority,
|
|
824
757
|
readBaseUnits,
|
|
825
758
|
readResponseMeta as readBtpResponseMeta,
|
|
759
|
+
readEvmBatchChannel,
|
|
826
760
|
readEvmNativeBalance,
|
|
827
761
|
readEvmTokenBalance,
|
|
828
762
|
readExchangeOutcome,
|
|
829
763
|
readResponseMeta2 as readResponseMeta,
|
|
830
764
|
readSolanaNativeBalance,
|
|
831
765
|
readSolanaTokenBalance,
|
|
766
|
+
readVoucherRefusal,
|
|
832
767
|
readWalletBalances,
|
|
833
|
-
|
|
768
|
+
requestSponsoredOpen,
|
|
769
|
+
requestSvmBatchClose,
|
|
834
770
|
resolveConfig,
|
|
835
771
|
resolveExpectedFulfillment,
|
|
836
772
|
resolveExpiresAt,
|
|
@@ -838,7 +774,6 @@ export {
|
|
|
838
774
|
routePriceFor,
|
|
839
775
|
rpcFetch,
|
|
840
776
|
rpcTransport,
|
|
841
|
-
sameSettlementAddress,
|
|
842
777
|
sealExchange,
|
|
843
778
|
sealRequest,
|
|
844
779
|
sealRequestWithRandomness,
|
|
@@ -852,16 +787,24 @@ export {
|
|
|
852
787
|
serializeIlpFulfill,
|
|
853
788
|
serializeIlpPrepare,
|
|
854
789
|
serializeIlpReject,
|
|
855
|
-
|
|
790
|
+
settleDeposit,
|
|
791
|
+
signBatchVoucher,
|
|
792
|
+
signEvmChallenge,
|
|
793
|
+
signSolanaChallenge,
|
|
856
794
|
signSolanaWireTransaction,
|
|
795
|
+
signSvmVoucher,
|
|
796
|
+
singleRecipientDistributionHash,
|
|
797
|
+
solanaChallengeMessage,
|
|
857
798
|
solanaKeypair,
|
|
858
|
-
|
|
799
|
+
solanaVoucherClaim,
|
|
859
800
|
spawnAnt,
|
|
801
|
+
svmBatchChannelAddress,
|
|
860
802
|
toEnvelopeRequest,
|
|
861
803
|
trimTrailingSlashes,
|
|
862
804
|
validateMnemonic,
|
|
863
805
|
validateSocks5hUrl,
|
|
864
806
|
withRetry,
|
|
807
|
+
withdrawSvmBatchChannel,
|
|
865
808
|
writeKeystoreFile
|
|
866
809
|
};
|
|
867
810
|
//# sourceMappingURL=index.js.map
|