@dvmkit/dvm-cli 0.1.4 → 0.1.5
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/{_esm-M2HUAA3B.js → _esm-MN4BUYV6.js} +56 -54
- package/dist/{accounts-S747UW3A.js → accounts-2WZE4N5F.js} +5 -5
- package/dist/actions-LR65XILR.js +244 -0
- package/dist/{ccip-XZ5F5J6R.js → ccip-JXYJSXTW.js} +3 -3
- package/dist/{chains-PINFXYUE.js → chains-LJ7XK6H3.js} +8 -8
- package/dist/{chunk-YZUBKHHA.js → chunk-2VVVWBQA.js} +471 -471
- package/dist/chunk-3SWX5BQP.js +66 -0
- package/dist/chunk-3W2M46WM.js +61142 -0
- package/dist/chunk-4JXFXP4Y.js +757 -0
- package/dist/{chunk-GIDSTROG.js → chunk-4NWEJTAW.js} +160 -158
- package/dist/{chunk-UXQCP26E.js → chunk-65EY7CT4.js} +2 -2
- package/dist/{chunk-6UGZAFIR.js → chunk-6CC6JGEU.js} +348 -18
- package/dist/{chunk-PHZHPRQE.js → chunk-6O27TEXD.js} +173 -173
- package/dist/{chunk-HPRIQEJS.js → chunk-7OK7MBT6.js} +19 -19
- package/dist/{chunk-7UPZZGC5.js → chunk-BECPI5H5.js} +193 -193
- package/dist/chunk-CJTE5TS3.js +1298 -0
- package/dist/{chunk-RWBYCM47.js → chunk-ECEM3ZAS.js} +10 -10
- package/dist/{chunk-ACNNU5RY.js → chunk-ECK465AY.js} +694 -565
- package/dist/{chunk-XGABM4H5.js → chunk-EGY4KDBW.js} +3822 -2012
- package/dist/{chunk-SLDVIXCS.js → chunk-EVQERRCP.js} +12 -12
- package/dist/{chunk-4AQ4G7L5.js → chunk-EZHT2RLJ.js} +383 -383
- package/dist/{chunk-IC6OXFYW.js → chunk-F55NNH2F.js} +63 -63
- package/dist/chunk-G5C6E6PJ.js +9063 -0
- package/dist/{chunk-6AJ7H2VX.js → chunk-GZWKCIYN.js} +213 -1281
- package/dist/{chunk-ZGXCK43G.js → chunk-LH3QPVN6.js} +8499 -8498
- package/dist/{chunk-MMJR6N3J.js → chunk-MLDUKBU3.js} +1368 -1368
- package/dist/chunk-N3UJT2NJ.js +3 -0
- package/dist/{chunk-BZNZWRBB.js → chunk-OWJZYYMG.js} +11 -15
- package/dist/chunk-ZJYO7OLO.js +514 -0
- package/dist/{client-D3XFLWOK.js → client-OWIOFBKS.js} +18 -16
- package/dist/{dist-7MMV3EZA.js → dist-2G3QBGID.js} +11 -10
- package/dist/dvm.js +26781 -4423
- package/dist/esm-RQLHAH2K.js +5183 -0
- package/dist/internal-QFQ7MJ5V.js +1228 -0
- package/dist/payout-reporter-3UB5WRCV-XTVZFIAO.js +17 -0
- package/dist/{pocket-refill-GDYSTECR.js → pocket-refill-PQ5ZVSBY.js} +26 -30
- package/dist/revenue-reporter-JIKUPXOK-TYUBTF4P.js +11 -0
- package/dist/{secp256k1-4YWQEMGF.js → secp256k1-JLZEQ2H7.js} +2 -2
- package/dist/tempo-lifecycle-SQL3KLEZ-AATA2SKI.js +28 -0
- package/dist/{tempo-wallet-5FEOI4CF.js → tempo-wallet-QOLEIPCV-SWCXRBDS.js} +2 -4
- package/dist/{x402-VNFA3DBY.js → x402-FTG2GRAQ-UGAUMUL6.js} +13 -24
- package/package.json +2 -10
- package/dist/channel-store-GOV7TEDN.js +0 -62
- package/dist/chunk-3PPOU55E.js +0 -312
- package/dist/chunk-3TBULV3F.js +0 -551
- package/dist/chunk-5BUV73FO.js +0 -2351
- package/dist/chunk-EY5K4BM3.js +0 -1780
- package/dist/chunk-G3RLVJF5.js +0 -19
- package/dist/chunk-KC4UPK44.js +0 -113
- package/dist/chunk-MTBCEXJ6.js +0 -4602
- package/dist/chunk-ONQMRWY3.js +0 -83
- package/dist/chunk-TO47XRK7.js +0 -24890
- package/dist/chunk-U5TNSUYW.js +0 -1757
- package/dist/chunk-UU6QMSTQ.js +0 -171
- package/dist/chunk-ZELLQI7F.js +0 -248
- package/dist/lifecycle-5RLM5JMN.js +0 -29
- package/dist/tempo-lifecycle-DHZPQTSB.js +0 -31
- package/dist/wallet-G3VOUCL4.js +0 -30
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
3
|
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
Abis_exports,
|
|
6
|
+
Account_exports,
|
|
7
|
+
Addresses_exports,
|
|
8
|
+
Channel_exports,
|
|
9
|
+
EarnShares_exports,
|
|
10
|
+
KeyAuthorization_exports,
|
|
11
|
+
PoolId_exports,
|
|
12
|
+
SignatureEnvelope_exports,
|
|
13
|
+
TokenId_exports,
|
|
14
|
+
TokenRole_exports,
|
|
15
|
+
Transaction_exports,
|
|
16
|
+
TxEnvelopeTempo_exports,
|
|
17
|
+
VirtualAddress_exports,
|
|
18
|
+
ZoneId_exports,
|
|
19
|
+
ZoneRpcAuthentication_exports,
|
|
20
|
+
accessKey_exports,
|
|
21
|
+
accountKeychain,
|
|
22
|
+
accountRegistrar,
|
|
23
|
+
addressRegistry,
|
|
24
|
+
addressRegistry2,
|
|
25
|
+
chainConfig,
|
|
26
|
+
defineCall,
|
|
27
|
+
deserialize,
|
|
28
|
+
earnEngine,
|
|
29
|
+
earnFees,
|
|
30
|
+
earnRouter,
|
|
31
|
+
earnRouterCallbackData,
|
|
32
|
+
earnVault,
|
|
33
|
+
feeAmm,
|
|
34
|
+
feeManager,
|
|
35
|
+
feeManager2,
|
|
36
|
+
findDeclaredToken,
|
|
37
|
+
nonce,
|
|
38
|
+
nonceManager,
|
|
39
|
+
pathUsd,
|
|
40
|
+
pickWriteParameters,
|
|
41
|
+
pickWriteSyncParameters,
|
|
42
|
+
receivePolicyGuard,
|
|
43
|
+
receivePolicyGuard2,
|
|
44
|
+
resolveCallParameters,
|
|
45
|
+
resolveToken,
|
|
46
|
+
resolveTokenWithDecimals,
|
|
47
|
+
signVoucher,
|
|
48
|
+
signatureVerifier,
|
|
49
|
+
stablecoinDex,
|
|
50
|
+
stablecoinDex2,
|
|
51
|
+
tempo,
|
|
52
|
+
tempoModerato,
|
|
53
|
+
tip20,
|
|
54
|
+
tip20ChannelReserve,
|
|
55
|
+
tip20ChannelReserve2,
|
|
56
|
+
tip20Factory,
|
|
57
|
+
tip20Factory2,
|
|
58
|
+
tip403Registry,
|
|
59
|
+
tip403Registry2,
|
|
60
|
+
validator,
|
|
61
|
+
validatorConfig,
|
|
62
|
+
zoneOutbox
|
|
63
|
+
} from "./chunk-BECPI5H5.js";
|
|
4
64
|
import {
|
|
5
65
|
Assets_exports2 as Assets_exports,
|
|
6
66
|
BadRequestError,
|
|
@@ -20,7 +80,7 @@ import {
|
|
|
20
80
|
address,
|
|
21
81
|
amount,
|
|
22
82
|
array,
|
|
23
|
-
assert,
|
|
83
|
+
assert as assert2,
|
|
24
84
|
authorizationDomain,
|
|
25
85
|
authorizationTypes,
|
|
26
86
|
bigint,
|
|
@@ -29,10 +89,10 @@ import {
|
|
|
29
89
|
charge,
|
|
30
90
|
createJson,
|
|
31
91
|
credentialMetaKey,
|
|
32
|
-
custom,
|
|
92
|
+
custom as custom2,
|
|
33
93
|
datetimeInput,
|
|
34
94
|
decodePaymentRequiredEnvelope,
|
|
35
|
-
deserialize,
|
|
95
|
+
deserialize as deserialize2,
|
|
36
96
|
discriminatedUnion,
|
|
37
97
|
eip3009,
|
|
38
98
|
encodePaymentSignature,
|
|
@@ -72,13 +132,18 @@ import {
|
|
|
72
132
|
toSource,
|
|
73
133
|
transform,
|
|
74
134
|
union
|
|
75
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-2VVVWBQA.js";
|
|
136
|
+
import {
|
|
137
|
+
Base64_exports
|
|
138
|
+
} from "./chunk-EZHT2RLJ.js";
|
|
76
139
|
import {
|
|
77
140
|
createClient,
|
|
78
141
|
createTransport,
|
|
79
|
-
custom
|
|
142
|
+
custom,
|
|
143
|
+
http
|
|
144
|
+
} from "./chunk-CJTE5TS3.js";
|
|
145
|
+
import {
|
|
80
146
|
estimateContractGas,
|
|
81
|
-
http,
|
|
82
147
|
multicall,
|
|
83
148
|
resolveAmountDecimals,
|
|
84
149
|
sendCallsSync,
|
|
@@ -88,70 +153,7 @@ import {
|
|
|
88
153
|
toAmount,
|
|
89
154
|
toBaseUnits,
|
|
90
155
|
zeroAddress
|
|
91
|
-
} from "./chunk-
|
|
92
|
-
import {
|
|
93
|
-
Abis_exports,
|
|
94
|
-
Account_exports,
|
|
95
|
-
Addresses_exports,
|
|
96
|
-
Channel_exports,
|
|
97
|
-
EarnShares_exports,
|
|
98
|
-
KeyAuthorization_exports,
|
|
99
|
-
PoolId_exports,
|
|
100
|
-
SignatureEnvelope_exports,
|
|
101
|
-
TokenId_exports,
|
|
102
|
-
TokenRole_exports,
|
|
103
|
-
Transaction_exports,
|
|
104
|
-
TxEnvelopeTempo_exports,
|
|
105
|
-
VirtualAddress_exports,
|
|
106
|
-
ZoneId_exports,
|
|
107
|
-
ZoneRpcAuthentication_exports,
|
|
108
|
-
accessKey_exports,
|
|
109
|
-
accountKeychain,
|
|
110
|
-
accountRegistrar,
|
|
111
|
-
addressRegistry,
|
|
112
|
-
addressRegistry2,
|
|
113
|
-
chainConfig,
|
|
114
|
-
defineCall,
|
|
115
|
-
deserialize as deserialize2,
|
|
116
|
-
earnEngine,
|
|
117
|
-
earnFees,
|
|
118
|
-
earnRouter,
|
|
119
|
-
earnRouterCallbackData,
|
|
120
|
-
earnVault,
|
|
121
|
-
feeAmm,
|
|
122
|
-
feeManager,
|
|
123
|
-
feeManager2,
|
|
124
|
-
findDeclaredToken,
|
|
125
|
-
nonce,
|
|
126
|
-
nonceManager,
|
|
127
|
-
pathUsd,
|
|
128
|
-
pickWriteParameters,
|
|
129
|
-
pickWriteSyncParameters,
|
|
130
|
-
receivePolicyGuard,
|
|
131
|
-
receivePolicyGuard2,
|
|
132
|
-
resolveCallParameters,
|
|
133
|
-
resolveToken,
|
|
134
|
-
resolveTokenWithDecimals,
|
|
135
|
-
signVoucher,
|
|
136
|
-
signatureVerifier,
|
|
137
|
-
stablecoinDex,
|
|
138
|
-
stablecoinDex2,
|
|
139
|
-
tempo,
|
|
140
|
-
tempoModerato,
|
|
141
|
-
tip20,
|
|
142
|
-
tip20ChannelReserve,
|
|
143
|
-
tip20ChannelReserve2,
|
|
144
|
-
tip20Factory,
|
|
145
|
-
tip20Factory2,
|
|
146
|
-
tip403Registry,
|
|
147
|
-
tip403Registry2,
|
|
148
|
-
validator,
|
|
149
|
-
validatorConfig,
|
|
150
|
-
zoneOutbox
|
|
151
|
-
} from "./chunk-7UPZZGC5.js";
|
|
152
|
-
import {
|
|
153
|
-
Base64_exports
|
|
154
|
-
} from "./chunk-4AQ4G7L5.js";
|
|
156
|
+
} from "./chunk-GZWKCIYN.js";
|
|
155
157
|
import {
|
|
156
158
|
AbiItem_exports,
|
|
157
159
|
AbiParameters_exports,
|
|
@@ -159,7 +161,7 @@ import {
|
|
|
159
161
|
Hash_exports,
|
|
160
162
|
Secp256k1_exports,
|
|
161
163
|
Signature_exports,
|
|
162
|
-
assert
|
|
164
|
+
assert,
|
|
163
165
|
compress,
|
|
164
166
|
createKeyPair,
|
|
165
167
|
defineChain,
|
|
@@ -188,45 +190,45 @@ import {
|
|
|
188
190
|
writeContract,
|
|
189
191
|
writeContractSync,
|
|
190
192
|
zeroHash
|
|
191
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-LH3QPVN6.js";
|
|
194
|
+
import {
|
|
195
|
+
hashTypedData
|
|
196
|
+
} from "./chunk-6O27TEXD.js";
|
|
192
197
|
import {
|
|
193
198
|
Bytes_exports,
|
|
194
199
|
Hex_exports,
|
|
195
200
|
RawContractError,
|
|
196
201
|
assertRequest,
|
|
197
202
|
call,
|
|
198
|
-
concat,
|
|
199
|
-
concat2,
|
|
203
|
+
concat as concat2,
|
|
204
|
+
concat2 as concat3,
|
|
200
205
|
decodeFunctionData,
|
|
201
206
|
decodeFunctionResult,
|
|
202
207
|
encodeFunctionData,
|
|
203
208
|
formatTransactionRequest,
|
|
204
|
-
|
|
205
|
-
fromBytes,
|
|
209
|
+
from,
|
|
210
|
+
fromBytes2 as fromBytes,
|
|
206
211
|
fromNumber,
|
|
207
212
|
fromNumber2,
|
|
208
213
|
getAbiItem,
|
|
209
214
|
getNodeError,
|
|
210
215
|
isAddressEqual,
|
|
211
|
-
padLeft,
|
|
216
|
+
padLeft2 as padLeft,
|
|
212
217
|
random,
|
|
213
218
|
random2,
|
|
214
219
|
serializeStateOverride,
|
|
215
|
-
slice,
|
|
216
|
-
toBigInt,
|
|
220
|
+
slice2 as slice,
|
|
221
|
+
toBigInt2 as toBigInt,
|
|
217
222
|
toFunctionSelector,
|
|
218
|
-
toNumber,
|
|
223
|
+
toNumber2 as toNumber,
|
|
219
224
|
toRpc,
|
|
220
225
|
withResolvers
|
|
221
|
-
} from "./chunk-
|
|
222
|
-
import {
|
|
223
|
-
hashTypedData
|
|
224
|
-
} from "./chunk-PHZHPRQE.js";
|
|
226
|
+
} from "./chunk-F55NNH2F.js";
|
|
225
227
|
import {
|
|
226
228
|
AbiDecodingZeroDataError,
|
|
227
229
|
BaseError,
|
|
228
230
|
UnknownNodeError,
|
|
229
|
-
concat
|
|
231
|
+
concat,
|
|
230
232
|
encodeAbiParameters,
|
|
231
233
|
getAddress,
|
|
232
234
|
isAddress,
|
|
@@ -235,7 +237,7 @@ import {
|
|
|
235
237
|
parseAccount,
|
|
236
238
|
stringify,
|
|
237
239
|
toHex
|
|
238
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-MLDUKBU3.js";
|
|
239
241
|
import {
|
|
240
242
|
__export
|
|
241
243
|
} from "./chunk-IYHTITNZ.js";
|
|
@@ -767,7 +769,7 @@ function mcp() {
|
|
|
767
769
|
},
|
|
768
770
|
setCredential(request, credential) {
|
|
769
771
|
const message2 = JSON.parse(request.body);
|
|
770
|
-
const parsed =
|
|
772
|
+
const parsed = deserialize2(credential);
|
|
771
773
|
return {
|
|
772
774
|
...request,
|
|
773
775
|
body: JSON.stringify({
|
|
@@ -909,7 +911,7 @@ function mcp2() {
|
|
|
909
911
|
return challenge;
|
|
910
912
|
},
|
|
911
913
|
setCredential(request, credential) {
|
|
912
|
-
const parsed =
|
|
914
|
+
const parsed = deserialize2(credential);
|
|
913
915
|
return {
|
|
914
916
|
...request,
|
|
915
917
|
params: {
|
|
@@ -1014,7 +1016,7 @@ function from8(config) {
|
|
|
1014
1016
|
challenge = selectedChallenge;
|
|
1015
1017
|
mi = selected.method;
|
|
1016
1018
|
if (challenge.expires)
|
|
1017
|
-
|
|
1019
|
+
assert2(challenge.expires, challenge.id);
|
|
1018
1020
|
const paymentInput = resolvePaymentRetryInput(response, initialRequest.input, initialRequest.input);
|
|
1019
1021
|
const previousCredential = preparedCredential;
|
|
1020
1022
|
const key = serialize2(selectedChallenge);
|
|
@@ -1642,7 +1644,7 @@ function randomNonceSalt() {
|
|
|
1642
1644
|
function charge2(parameters) {
|
|
1643
1645
|
return toClient(charge, {
|
|
1644
1646
|
context: object({
|
|
1645
|
-
account: optional(
|
|
1647
|
+
account: optional(custom2())
|
|
1646
1648
|
}),
|
|
1647
1649
|
async createCredential({ challenge, context }) {
|
|
1648
1650
|
if (isX402Challenge(challenge))
|
|
@@ -2335,7 +2337,7 @@ async function open(client, parameters) {
|
|
|
2335
2337
|
}
|
|
2336
2338
|
open3.inner = inner;
|
|
2337
2339
|
function call2(args) {
|
|
2338
|
-
const { authorizedSigner = zeroAddress, deposit: deposit4, operator = zeroAddress, payee, salt =
|
|
2340
|
+
const { authorizedSigner = zeroAddress, deposit: deposit4, operator = zeroAddress, payee, salt = random2(32), token } = args;
|
|
2339
2341
|
return defineCall({
|
|
2340
2342
|
address: Channel_exports.address,
|
|
2341
2343
|
abi: tip20ChannelReserve,
|
|
@@ -3126,7 +3128,7 @@ async function withdrawSync2(client, parameters) {
|
|
|
3126
3128
|
return { receipt };
|
|
3127
3129
|
}
|
|
3128
3130
|
function getPairKey(base, quote) {
|
|
3129
|
-
return keccak256(
|
|
3131
|
+
return keccak256(concat3(base, quote));
|
|
3130
3132
|
}
|
|
3131
3133
|
|
|
3132
3134
|
// node_modules/viem/_esm/tempo/actions/earn.js
|
|
@@ -3944,7 +3946,7 @@ async function create2(client, parameters) {
|
|
|
3944
3946
|
create4.inner = inner;
|
|
3945
3947
|
function call2(...parameters) {
|
|
3946
3948
|
const [client, args] = resolveCallParameters(parameters);
|
|
3947
|
-
const { name, symbol, currency: currency2, logoURI, quoteToken = pathUsd, admin, salt =
|
|
3949
|
+
const { name, symbol, currency: currency2, logoURI, quoteToken = pathUsd, admin, salt = random2(32) } = args;
|
|
3948
3950
|
return defineCall({
|
|
3949
3951
|
address: tip20Factory2,
|
|
3950
3952
|
abi: tip20Factory,
|
|
@@ -5250,7 +5252,7 @@ async function getEncryptionKey(client, parameters) {
|
|
|
5250
5252
|
if (keyCount === 0n || publicKeyResult.status === "failure")
|
|
5251
5253
|
throw keyCount === 0n ? new Error("No sequencer encryption key configured.") : publicKeyResult.error;
|
|
5252
5254
|
const [x, prefix] = publicKeyResult.result;
|
|
5253
|
-
|
|
5255
|
+
assert({ prefix, x: toBigInt(x) }, { compressed: true });
|
|
5254
5256
|
return {
|
|
5255
5257
|
keyIndex: keyCount - 1n,
|
|
5256
5258
|
publicKey: { prefix, x }
|
|
@@ -5712,16 +5714,16 @@ async function encryptDepositPayload(publicKey, recipient, portalAddress, keyInd
|
|
|
5712
5714
|
name: "HKDF",
|
|
5713
5715
|
hash: "SHA-256",
|
|
5714
5716
|
salt: new TextEncoder().encode("ecies-aes-key"),
|
|
5715
|
-
info: buildDepositHkdfInfo(portalAddress, keyIndex,
|
|
5717
|
+
info: buildDepositHkdfInfo(portalAddress, keyIndex, fromNumber2(compressedEphemeral.x, { size: 32 }))
|
|
5716
5718
|
}, hkdfKey, { name: "AES-GCM", length: 256 }, false, ["encrypt"]);
|
|
5717
|
-
const nonce3 =
|
|
5719
|
+
const nonce3 = random(12);
|
|
5718
5720
|
const plaintext = buildDepositPlaintext(recipient, memo);
|
|
5719
5721
|
const ciphertextWithTag = new Uint8Array(await globalThis.crypto.subtle.encrypt({ name: "AES-GCM", iv: nonce3, tagLength: 128 }, aesKey, from(plaintext)));
|
|
5720
5722
|
const ciphertext = ciphertextWithTag.slice(0, -16);
|
|
5721
5723
|
const tag2 = ciphertextWithTag.slice(-16);
|
|
5722
5724
|
return {
|
|
5723
5725
|
ciphertext: fromBytes(ciphertext),
|
|
5724
|
-
ephemeralPubkeyX:
|
|
5726
|
+
ephemeralPubkeyX: fromNumber2(compressedEphemeral.x, { size: 32 }),
|
|
5725
5727
|
ephemeralPubkeyYParity: compressedEphemeral.prefix,
|
|
5726
5728
|
nonce: fromBytes(nonce3),
|
|
5727
5729
|
tag: fromBytes(tag2)
|
|
@@ -5731,7 +5733,7 @@ function buildDepositPlaintext(recipient, memo) {
|
|
|
5731
5733
|
return concat2(from(recipient), from(memo), new Uint8Array(12));
|
|
5732
5734
|
}
|
|
5733
5735
|
function buildDepositHkdfInfo(portalAddress, keyIndex, ephemeralPubkeyX) {
|
|
5734
|
-
return concat2(from(portalAddress),
|
|
5736
|
+
return concat2(from(portalAddress), fromNumber(keyIndex, { size: 32 }), from(ephemeralPubkeyX));
|
|
5735
5737
|
}
|
|
5736
5738
|
function ceilDiv(numerator, denominator) {
|
|
5737
5739
|
return (numerator + denominator - 1n) / denominator;
|
|
@@ -8042,7 +8044,7 @@ async function simulateBlocks(client, parameters) {
|
|
|
8042
8044
|
const request = {
|
|
8043
8045
|
...call2,
|
|
8044
8046
|
account,
|
|
8045
|
-
data: call2.dataSuffix ?
|
|
8047
|
+
data: call2.dataSuffix ? concat([data || "0x", call2.dataSuffix]) : data,
|
|
8046
8048
|
from: call2.from ?? account?.address
|
|
8047
8049
|
};
|
|
8048
8050
|
assertRequest(request);
|
|
@@ -8580,7 +8582,7 @@ function withFeePayer(defaultTransport, relayTransport, parameters) {
|
|
|
8580
8582
|
}
|
|
8581
8583
|
if (method === "eth_sendRawTransactionSync" || method === "eth_sendRawTransaction") {
|
|
8582
8584
|
const serialized = params[0];
|
|
8583
|
-
const transaction =
|
|
8585
|
+
const transaction = deserialize(serialized);
|
|
8584
8586
|
if (transaction.feePayerSignature === null) {
|
|
8585
8587
|
if (policy === "sign-and-broadcast")
|
|
8586
8588
|
return transport_relay.request({ method, params }, options);
|
|
@@ -8615,7 +8617,7 @@ function getResolver2(parameters) {
|
|
|
8615
8617
|
let resolvedClient = client;
|
|
8616
8618
|
if (feePayerUrl && client.transport.key !== "feePayer") {
|
|
8617
8619
|
const request = client.request.bind(client);
|
|
8618
|
-
const feePayerTransport = withFeePayer(
|
|
8620
|
+
const feePayerTransport = withFeePayer(custom({ request: (args) => request(args) }, { retryCount: 0 }), http(feePayerUrl, { retryCount: client.transport.retryCount }))({
|
|
8619
8621
|
account: client.account,
|
|
8620
8622
|
chain: client.chain,
|
|
8621
8623
|
pollingInterval: client.pollingInterval,
|
|
@@ -8716,7 +8718,7 @@ var subscriptionPeriodUnit = _enum(subscriptionPeriodUnits);
|
|
|
8716
8718
|
var uint64String = pipe(union([
|
|
8717
8719
|
string(),
|
|
8718
8720
|
bigint(),
|
|
8719
|
-
|
|
8721
|
+
custom2((value) => typeof value === "number" && Number.isSafeInteger(value))
|
|
8720
8722
|
]), transform((value) => value.toString())).check(_regex(/^[1-9]\d*$/, "Invalid periodCount"), refine((value) => {
|
|
8721
8723
|
try {
|
|
8722
8724
|
return BigInt(value) <= uint64Max;
|
|
@@ -8759,7 +8761,7 @@ var charge5 = from6({
|
|
|
8759
8761
|
decimals: number(),
|
|
8760
8762
|
description: optional(string()),
|
|
8761
8763
|
externalId: optional(string()),
|
|
8762
|
-
feePayer: optional(pipe(union([boolean(),
|
|
8764
|
+
feePayer: optional(pipe(union([boolean(), custom2()]), transform((v) => typeof v === "object" ? true : v))),
|
|
8763
8765
|
memo: optional(hash()),
|
|
8764
8766
|
recipient: optional(string()),
|
|
8765
8767
|
splits: optional(array(split).check(_minLength(1), _maxLength(10))),
|
|
@@ -8801,7 +8803,7 @@ var session2 = from6({
|
|
|
8801
8803
|
authorizedSigner: optional(string()),
|
|
8802
8804
|
channelId: hash(),
|
|
8803
8805
|
cumulativeAmount: amount(),
|
|
8804
|
-
descriptor: optional(
|
|
8806
|
+
descriptor: optional(custom2()),
|
|
8805
8807
|
signature: signature(),
|
|
8806
8808
|
transaction: signature(),
|
|
8807
8809
|
type: literal("transaction")
|
|
@@ -8810,7 +8812,7 @@ var session2 = from6({
|
|
|
8810
8812
|
action: literal("topUp"),
|
|
8811
8813
|
additionalDeposit: amount(),
|
|
8812
8814
|
channelId: hash(),
|
|
8813
|
-
descriptor: optional(
|
|
8815
|
+
descriptor: optional(custom2()),
|
|
8814
8816
|
transaction: signature(),
|
|
8815
8817
|
type: literal("transaction")
|
|
8816
8818
|
}),
|
|
@@ -8818,14 +8820,14 @@ var session2 = from6({
|
|
|
8818
8820
|
action: literal("voucher"),
|
|
8819
8821
|
channelId: hash(),
|
|
8820
8822
|
cumulativeAmount: amount(),
|
|
8821
|
-
descriptor: optional(
|
|
8823
|
+
descriptor: optional(custom2()),
|
|
8822
8824
|
signature: signature()
|
|
8823
8825
|
}),
|
|
8824
8826
|
object({
|
|
8825
8827
|
action: literal("close"),
|
|
8826
8828
|
channelId: hash(),
|
|
8827
8829
|
cumulativeAmount: amount(),
|
|
8828
|
-
descriptor: optional(
|
|
8830
|
+
descriptor: optional(custom2()),
|
|
8829
8831
|
signature: signature()
|
|
8830
8832
|
})
|
|
8831
8833
|
])
|
|
@@ -8837,12 +8839,12 @@ var session2 = from6({
|
|
|
8837
8839
|
currency: string(),
|
|
8838
8840
|
decimals: number(),
|
|
8839
8841
|
escrowContract: optional(string()),
|
|
8840
|
-
feePayer: optional(pipe(union([boolean(),
|
|
8842
|
+
feePayer: optional(pipe(union([boolean(), custom2()]), transform((v) => typeof v === "object" ? true : v))),
|
|
8841
8843
|
minVoucherDelta: optional(amount()),
|
|
8842
8844
|
operator: optional(address()),
|
|
8843
8845
|
recipient: optional(string()),
|
|
8844
8846
|
sessionProtocol: optional(_enum([SessionProtocols.v2, SessionProtocols.v1])),
|
|
8845
|
-
sessionSnapshot: optional(
|
|
8847
|
+
sessionSnapshot: optional(custom2()),
|
|
8846
8848
|
suggestedDeposit: optional(amount()),
|
|
8847
8849
|
unitType: string()
|
|
8848
8850
|
}).check(refine(({ amount: amount2, decimals: decimals2 }) => parseUnits(amount2, decimals2) > 0n, "Session amount must be greater than 0")), transform(({ amount: amount2, chainId: chainId2, channelId, decimals: decimals2, escrowContract: escrowContract2, feePayer, minVoucherDelta, operator, sessionProtocol, sessionSnapshot, suggestedDeposit, ...rest }) => ({
|
|
@@ -9170,8 +9172,8 @@ function normalizeSelector(value) {
|
|
|
9170
9172
|
|
|
9171
9173
|
// node_modules/mppx/dist/tempo/client/Subscription.js
|
|
9172
9174
|
var subscriptionContextSchema = object({
|
|
9173
|
-
accessKey: optional(
|
|
9174
|
-
account: optional(
|
|
9175
|
+
accessKey: optional(custom2()),
|
|
9176
|
+
account: optional(custom2())
|
|
9175
9177
|
});
|
|
9176
9178
|
function subscription2(parameters = {}) {
|
|
9177
9179
|
const getClient = getResolver2({
|
|
@@ -9471,8 +9473,8 @@ function parsePkhSource(source) {
|
|
|
9471
9473
|
|
|
9472
9474
|
// node_modules/mppx/dist/tempo/client/Charge.js
|
|
9473
9475
|
var chargeContextSchema = object({
|
|
9474
|
-
account: optional(
|
|
9475
|
-
autoSwap: optional(
|
|
9476
|
+
account: optional(custom2()),
|
|
9477
|
+
autoSwap: optional(custom2()),
|
|
9476
9478
|
mode: optional(_enum(chargeModes))
|
|
9477
9479
|
});
|
|
9478
9480
|
function getTransferCall(client, parameters) {
|
|
@@ -11190,7 +11192,7 @@ async function tryRecoverChannel(client, escrowContract2, channelId, chainId2) {
|
|
|
11190
11192
|
|
|
11191
11193
|
// node_modules/mppx/dist/tempo/legacy/client/Session.js
|
|
11192
11194
|
var sessionContextSchema = object({
|
|
11193
|
-
account: optional(
|
|
11195
|
+
account: optional(custom2()),
|
|
11194
11196
|
action: optional(_enum(["open", "topUp", "voucher", "close"])),
|
|
11195
11197
|
channelId: optional(string()),
|
|
11196
11198
|
cumulativeAmount: optional(amount()),
|
|
@@ -12041,7 +12043,7 @@ function sessionManager(parameters) {
|
|
|
12041
12043
|
activeSocketChallenge = challenge;
|
|
12042
12044
|
wsDeliveredChunks = 0n;
|
|
12043
12045
|
wsTickCost = BigInt(challenge.request.amount);
|
|
12044
|
-
const openCredential =
|
|
12046
|
+
const openCredential = deserialize2(credential);
|
|
12045
12047
|
activeSocketChannelId = openCredential.payload.channelId;
|
|
12046
12048
|
const rawSocket = new WebSocketImpl(wsUrl, protocols);
|
|
12047
12049
|
activeSocket = rawSocket;
|
|
@@ -13546,9 +13548,9 @@ __export(Runtime_exports, {
|
|
|
13546
13548
|
});
|
|
13547
13549
|
|
|
13548
13550
|
// node_modules/mppx/dist/tempo/session/Snapshot.js
|
|
13549
|
-
var addressSchema =
|
|
13550
|
-
var hashSchema =
|
|
13551
|
-
var hexSchema =
|
|
13551
|
+
var addressSchema = custom2((value) => typeof value === "string" && isAddress(value, { strict: false }));
|
|
13552
|
+
var hashSchema = custom2((value) => typeof value === "string" && /^0x[0-9a-fA-F]{64}$/.test(value));
|
|
13553
|
+
var hexSchema = custom2((value) => typeof value === "string" && /^0x[0-9a-fA-F]+$/.test(value));
|
|
13552
13554
|
var channelDescriptorSchema = object({
|
|
13553
13555
|
authorizedSigner: addressSchema,
|
|
13554
13556
|
expiringNonceHash: hashSchema,
|
|
@@ -14075,17 +14077,17 @@ async function applyCumulative(sink, key, payload) {
|
|
|
14075
14077
|
entry.opened = false;
|
|
14076
14078
|
await storeChannelEntry(sink, entry);
|
|
14077
14079
|
}
|
|
14078
|
-
var hexSchema2 =
|
|
14079
|
-
var hashSchema2 =
|
|
14080
|
+
var hexSchema2 = custom2((value) => typeof value === "string" && /^0x[0-9a-fA-F]*$/.test(value));
|
|
14081
|
+
var hashSchema2 = custom2((value) => typeof value === "string" && /^0x[0-9a-fA-F]{64}$/.test(value));
|
|
14080
14082
|
var sessionContextSchema2 = object({
|
|
14081
|
-
account: optional(
|
|
14082
|
-
autoSwap: optional(
|
|
14083
|
+
account: optional(custom2()),
|
|
14084
|
+
autoSwap: optional(custom2()),
|
|
14083
14085
|
action: optional(_enum(["open", "topUp", "voucher", "close"])),
|
|
14084
14086
|
channelId: optional(hashSchema2),
|
|
14085
14087
|
cumulativeAmount: optional(amount()),
|
|
14086
14088
|
cumulativeAmountRaw: optional(string()),
|
|
14087
14089
|
transaction: optional(hexSchema2),
|
|
14088
|
-
descriptor: optional(
|
|
14090
|
+
descriptor: optional(custom2()),
|
|
14089
14091
|
additionalDeposit: optional(amount()),
|
|
14090
14092
|
additionalDepositRaw: optional(string()),
|
|
14091
14093
|
depositRaw: optional(string())
|
|
@@ -15125,7 +15127,7 @@ function createActiveSocketSession(parameters) {
|
|
|
15125
15127
|
const { challenge, credential, socket } = parameters;
|
|
15126
15128
|
return {
|
|
15127
15129
|
challenge,
|
|
15128
|
-
channelId:
|
|
15130
|
+
channelId: deserialize2(credential).payload.channelId,
|
|
15129
15131
|
closeReadyReceipt: null,
|
|
15130
15132
|
deliveredChunks: 0n,
|
|
15131
15133
|
expectedCloseAmount: null,
|
|
@@ -15520,7 +15522,7 @@ function session4(parameters = {}) {
|
|
|
15520
15522
|
if (!isTip1034SessionChallenge(challenge))
|
|
15521
15523
|
return response;
|
|
15522
15524
|
if (!isEventStream(response)) {
|
|
15523
|
-
const credentialContext = requireSessionCredentialContext(
|
|
15525
|
+
const credentialContext = requireSessionCredentialContext(deserialize2(credential).payload);
|
|
15524
15526
|
if (credentialContext.action === "open" && headers.get("accept")?.toLowerCase().includes("text/event-stream"))
|
|
15525
15527
|
return await refetch?.() ?? response;
|
|
15526
15528
|
return response;
|
|
@@ -16427,7 +16429,7 @@ function create3(config) {
|
|
|
16427
16429
|
challenge = selectedChallenge;
|
|
16428
16430
|
mi = selected.method;
|
|
16429
16431
|
if (challenge.expires)
|
|
16430
|
-
|
|
16432
|
+
assert2(challenge.expires, challenge.id);
|
|
16431
16433
|
const createCredential2 = memoizeCreateCredential2((overrideContext) => createCredentialForMethod(selectedChallenge, mi, overrideContext ?? context));
|
|
16432
16434
|
const eventCredential = await events.emit("challenge.received", createChallengeReceivedPayload2({
|
|
16433
16435
|
challenge: selectedChallenge,
|
|
@@ -16537,41 +16539,18 @@ async function createCredentialForMethod(challenge, mi, context) {
|
|
|
16537
16539
|
}
|
|
16538
16540
|
|
|
16539
16541
|
export {
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16542
|
+
typedData,
|
|
16543
|
+
hash2 as hash,
|
|
16544
|
+
parsePkhSource,
|
|
16545
|
+
charge5 as charge,
|
|
16546
|
+
session2 as session,
|
|
16544
16547
|
actions_exports,
|
|
16545
16548
|
getResolver2 as getResolver,
|
|
16549
|
+
isEqual,
|
|
16546
16550
|
chainId,
|
|
16547
16551
|
decimals,
|
|
16548
16552
|
rpcUrl,
|
|
16549
16553
|
resolveCurrency,
|
|
16550
|
-
charge5 as charge,
|
|
16551
|
-
session2 as session,
|
|
16552
|
-
verifyServer,
|
|
16553
|
-
verifyChallengeBinding,
|
|
16554
|
-
isEqual,
|
|
16555
|
-
getTransfers,
|
|
16556
|
-
typedData,
|
|
16557
|
-
hash2 as hash,
|
|
16558
|
-
parsePkhSource,
|
|
16559
|
-
resolve5 as resolve,
|
|
16560
|
-
approve2 as approve,
|
|
16561
|
-
transfer3 as transfer,
|
|
16562
|
-
transferWithMemo,
|
|
16563
|
-
swapExactAmountOut,
|
|
16564
|
-
isTempoTransaction,
|
|
16565
|
-
defaultAllowedFeeTokens,
|
|
16566
|
-
assertAllowedFeeToken,
|
|
16567
|
-
fillHostedFeePayerTransaction,
|
|
16568
|
-
simulationTransaction,
|
|
16569
|
-
preflightSponsorship,
|
|
16570
|
-
validateCalls,
|
|
16571
|
-
assertTransactionPolicy,
|
|
16572
|
-
prepareSponsoredTransaction,
|
|
16573
|
-
resolveFeeToken,
|
|
16574
|
-
session3 as session2,
|
|
16575
16554
|
uint96,
|
|
16576
16555
|
requireSessionCredentialContext,
|
|
16577
16556
|
readSessionChallengeAmount,
|
|
@@ -16583,7 +16562,6 @@ export {
|
|
|
16583
16562
|
extractData,
|
|
16584
16563
|
tip20ChannelEscrow,
|
|
16585
16564
|
Protocol_exports,
|
|
16586
|
-
sessionManager,
|
|
16587
16565
|
computeId2 as computeId,
|
|
16588
16566
|
Channel_exports3 as Channel_exports,
|
|
16589
16567
|
escrowAbi2 as escrowAbi,
|
|
@@ -16593,6 +16571,20 @@ export {
|
|
|
16593
16571
|
entryKey,
|
|
16594
16572
|
createChannelStore,
|
|
16595
16573
|
createJsonChannelStore,
|
|
16574
|
+
approve2 as approve,
|
|
16575
|
+
transfer3 as transfer,
|
|
16576
|
+
transferWithMemo,
|
|
16577
|
+
swapExactAmountOut,
|
|
16578
|
+
isTempoTransaction,
|
|
16579
|
+
defaultAllowedFeeTokens,
|
|
16580
|
+
assertAllowedFeeToken,
|
|
16581
|
+
fillHostedFeePayerTransaction,
|
|
16582
|
+
simulationTransaction,
|
|
16583
|
+
preflightSponsorship,
|
|
16584
|
+
validateCalls,
|
|
16585
|
+
assertTransactionPolicy,
|
|
16586
|
+
prepareSponsoredTransaction,
|
|
16587
|
+
resolveFeeToken,
|
|
16596
16588
|
readSettledReceiptFields,
|
|
16597
16589
|
readChannelClosedReceiptFields,
|
|
16598
16590
|
getChannelState,
|
|
@@ -16606,8 +16598,18 @@ export {
|
|
|
16606
16598
|
serializeSnapshot,
|
|
16607
16599
|
deserializeSnapshot,
|
|
16608
16600
|
Runtime_exports,
|
|
16609
|
-
|
|
16610
|
-
|
|
16601
|
+
Transport_exports,
|
|
16602
|
+
Fetch_exports,
|
|
16603
|
+
session4 as session2,
|
|
16604
|
+
verifyServer,
|
|
16605
|
+
verifyChallengeBinding,
|
|
16606
|
+
getTransfers,
|
|
16607
|
+
sessionManager2 as sessionManager,
|
|
16608
|
+
resolve5 as resolve,
|
|
16609
|
+
session3,
|
|
16610
|
+
sessionManager as sessionManager2,
|
|
16611
|
+
evm,
|
|
16612
|
+
stripe,
|
|
16611
16613
|
sessionClient,
|
|
16612
16614
|
tempo2 as tempo,
|
|
16613
16615
|
Mppx_exports
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
shrSL,
|
|
30
30
|
split,
|
|
31
31
|
toBytes
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7OK7MBT6.js";
|
|
33
33
|
|
|
34
34
|
// node_modules/viem/node_modules/@noble/hashes/esm/_md.js
|
|
35
35
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
@@ -2668,11 +2668,11 @@ var hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();
|
|
|
2668
2668
|
var encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();
|
|
2669
2669
|
|
|
2670
2670
|
export {
|
|
2671
|
+
mod,
|
|
2671
2672
|
HashMD,
|
|
2672
2673
|
sha256,
|
|
2673
2674
|
sha512,
|
|
2674
2675
|
hmac,
|
|
2675
|
-
mod,
|
|
2676
2676
|
secp256k1,
|
|
2677
2677
|
schnorr,
|
|
2678
2678
|
secp256k1_hasher,
|