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