@dvmkit/dvm-cli 0.0.0 → 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/LICENSE +67 -0
- package/NOTICE +2 -0
- package/README.md +28 -3
- package/dist/_esm-MN4BUYV6.js +885 -0
- package/dist/_esm-NRGECLJ7.js +35 -0
- package/dist/accounts-2WZE4N5F.js +73 -0
- package/dist/actions-LR65XILR.js +244 -0
- package/dist/ccip-JXYJSXTW.js +18 -0
- package/dist/chains-LJ7XK6H3.js +1460 -0
- package/dist/chunk-2VVVWBQA.js +15436 -0
- package/dist/chunk-3SWX5BQP.js +66 -0
- package/dist/chunk-3W2M46WM.js +61142 -0
- package/dist/chunk-4JXFXP4Y.js +757 -0
- package/dist/chunk-4NWEJTAW.js +16616 -0
- package/dist/chunk-65EY7CT4.js +2691 -0
- package/dist/chunk-6CC6JGEU.js +1815 -0
- package/dist/chunk-6O27TEXD.js +1181 -0
- package/dist/chunk-7OK7MBT6.js +258 -0
- package/dist/chunk-BECPI5H5.js +30063 -0
- package/dist/chunk-CJTE5TS3.js +1298 -0
- package/dist/chunk-ECEM3ZAS.js +339 -0
- package/dist/chunk-ECK465AY.js +5614 -0
- package/dist/chunk-EGY4KDBW.js +5149 -0
- package/dist/chunk-EVQERRCP.js +21369 -0
- package/dist/chunk-EZHT2RLJ.js +1447 -0
- package/dist/chunk-F55NNH2F.js +6484 -0
- package/dist/chunk-G5C6E6PJ.js +9063 -0
- package/dist/chunk-GZWKCIYN.js +3319 -0
- package/dist/chunk-IYHTITNZ.js +45 -0
- package/dist/chunk-LH3QPVN6.js +9869 -0
- package/dist/chunk-MLDUKBU3.js +2426 -0
- package/dist/chunk-N3UJT2NJ.js +3 -0
- package/dist/chunk-OWJZYYMG.js +185 -0
- package/dist/chunk-RA24J4QM.js +3717 -0
- package/dist/chunk-ZJYO7OLO.js +514 -0
- package/dist/client-OWIOFBKS.js +54 -0
- package/dist/dist-2G3QBGID.js +47 -0
- package/dist/dvm.js +56008 -0
- package/dist/esm-RQLHAH2K.js +5183 -0
- package/dist/internal-QFQ7MJ5V.js +1228 -0
- package/dist/mine.wasm-DNBKYCTQ.js +12 -0
- package/dist/payout-reporter-3UB5WRCV-XTVZFIAO.js +17 -0
- package/dist/pocket-refill-PQ5ZVSBY.js +129 -0
- package/dist/revenue-reporter-JIKUPXOK-TYUBTF4P.js +11 -0
- package/dist/secp256k1-JLZEQ2H7.js +19 -0
- package/dist/tempo-lifecycle-SQL3KLEZ-AATA2SKI.js +28 -0
- package/dist/tempo-wallet-QOLEIPCV-SWCXRBDS.js +33 -0
- package/dist/x402-FTG2GRAQ-UGAUMUL6.js +80 -0
- package/package.json +63 -6
- package/skills/dvm/SKILL.md +71 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
Assets_exports,
|
|
6
|
+
Assets_exports2,
|
|
7
|
+
AuthorizationConfigSchema,
|
|
8
|
+
AuthorizationPayloadSchema,
|
|
9
|
+
Chains_exports,
|
|
10
|
+
ChargePayloadSchema,
|
|
11
|
+
ChargeRequestInputSchema,
|
|
12
|
+
ChargeRequestSchema,
|
|
13
|
+
ExactEip3009PayloadSchema,
|
|
14
|
+
ExactPayloadSchema,
|
|
15
|
+
ExactPermit2PayloadSchema,
|
|
16
|
+
ExactTransferSchema,
|
|
17
|
+
ExtensionSchema,
|
|
18
|
+
ExtensionsSchema,
|
|
19
|
+
Header_exports,
|
|
20
|
+
Headers,
|
|
21
|
+
MethodDetailsSchema,
|
|
22
|
+
Methods_exports,
|
|
23
|
+
PaymentPayloadSchema,
|
|
24
|
+
PaymentRequiredSchema,
|
|
25
|
+
PaymentRequirementsSchema,
|
|
26
|
+
ResourceInfoSchema,
|
|
27
|
+
SettleResponseSchema,
|
|
28
|
+
Types_exports,
|
|
29
|
+
Types_exports2,
|
|
30
|
+
VerifyResponseSchema,
|
|
31
|
+
assetTransferMethods,
|
|
32
|
+
authorizationDomain,
|
|
33
|
+
authorizationTypes,
|
|
34
|
+
challengeHash,
|
|
35
|
+
charge,
|
|
36
|
+
chargeIntent,
|
|
37
|
+
constantTimeEqual,
|
|
38
|
+
credentialTypes,
|
|
39
|
+
datetime,
|
|
40
|
+
eip3009,
|
|
41
|
+
evmNetworkPrefix,
|
|
42
|
+
evmNetworkPrefix2,
|
|
43
|
+
exactIntent,
|
|
44
|
+
literal,
|
|
45
|
+
looseObject,
|
|
46
|
+
networkOf,
|
|
47
|
+
object,
|
|
48
|
+
optional,
|
|
49
|
+
paymentMethod,
|
|
50
|
+
paymentMethod2,
|
|
51
|
+
paymentRequiredHeader,
|
|
52
|
+
paymentResponseHeader,
|
|
53
|
+
paymentSignatureHeader,
|
|
54
|
+
schemes,
|
|
55
|
+
string,
|
|
56
|
+
syntheticChallengeIdPrefix,
|
|
57
|
+
toPaymentRequirements,
|
|
58
|
+
toSource,
|
|
59
|
+
versions
|
|
60
|
+
} from "./chunk-2VVVWBQA.js";
|
|
61
|
+
import {
|
|
62
|
+
Base64_exports
|
|
63
|
+
} from "./chunk-EZHT2RLJ.js";
|
|
64
|
+
import {
|
|
65
|
+
Hash_exports
|
|
66
|
+
} from "./chunk-LH3QPVN6.js";
|
|
67
|
+
import {
|
|
68
|
+
Bytes_exports,
|
|
69
|
+
Json_exports
|
|
70
|
+
} from "./chunk-F55NNH2F.js";
|
|
71
|
+
import {
|
|
72
|
+
__export
|
|
73
|
+
} from "./chunk-IYHTITNZ.js";
|
|
74
|
+
|
|
75
|
+
// node_modules/mppx/dist/BodyDigest.js
|
|
76
|
+
var BodyDigest_exports = {};
|
|
77
|
+
__export(BodyDigest_exports, {
|
|
78
|
+
compute: () => compute,
|
|
79
|
+
verify: () => verify
|
|
80
|
+
});
|
|
81
|
+
function compute(body) {
|
|
82
|
+
const str = typeof body === "object" ? JSON.stringify(body) : body;
|
|
83
|
+
const bytes = Bytes_exports.fromString(str);
|
|
84
|
+
const hash = Hash_exports.sha256(bytes, { as: "Bytes" });
|
|
85
|
+
const base64 = Base64_exports.fromBytes(hash);
|
|
86
|
+
return `sha-256=${base64}`;
|
|
87
|
+
}
|
|
88
|
+
function verify(digest, body) {
|
|
89
|
+
return constantTimeEqual(compute(body), digest);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// node_modules/mppx/dist/evm/index.js
|
|
93
|
+
var evm_exports = {};
|
|
94
|
+
__export(evm_exports, {
|
|
95
|
+
Assets: () => Assets_exports2,
|
|
96
|
+
AuthorizationConfigSchema: () => AuthorizationConfigSchema,
|
|
97
|
+
AuthorizationPayloadSchema: () => AuthorizationPayloadSchema,
|
|
98
|
+
Chains: () => Chains_exports,
|
|
99
|
+
ChargePayloadSchema: () => ChargePayloadSchema,
|
|
100
|
+
ChargeRequestInputSchema: () => ChargeRequestInputSchema,
|
|
101
|
+
ChargeRequestSchema: () => ChargeRequestSchema,
|
|
102
|
+
MethodDetailsSchema: () => MethodDetailsSchema,
|
|
103
|
+
Methods: () => Methods_exports,
|
|
104
|
+
Types: () => Types_exports2,
|
|
105
|
+
assets: () => Assets_exports2,
|
|
106
|
+
authorizationDomain: () => authorizationDomain,
|
|
107
|
+
authorizationTypes: () => authorizationTypes,
|
|
108
|
+
chains: () => Chains_exports,
|
|
109
|
+
challengeHash: () => challengeHash,
|
|
110
|
+
charge: () => charge,
|
|
111
|
+
chargeIntent: () => chargeIntent,
|
|
112
|
+
credentialTypes: () => credentialTypes,
|
|
113
|
+
eip3009: () => eip3009,
|
|
114
|
+
evmNetworkPrefix: () => evmNetworkPrefix2,
|
|
115
|
+
networkOf: () => networkOf,
|
|
116
|
+
paymentMethod: () => paymentMethod2,
|
|
117
|
+
toSource: () => toSource
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// node_modules/mppx/dist/Receipt.js
|
|
121
|
+
var Receipt_exports = {};
|
|
122
|
+
__export(Receipt_exports, {
|
|
123
|
+
Schema: () => Schema,
|
|
124
|
+
deserialize: () => deserialize,
|
|
125
|
+
from: () => from,
|
|
126
|
+
fromResponse: () => fromResponse,
|
|
127
|
+
serialize: () => serialize
|
|
128
|
+
});
|
|
129
|
+
var shape = {
|
|
130
|
+
/** Payment method used (e.g., "tempo", "stripe"). */
|
|
131
|
+
method: string(),
|
|
132
|
+
/** Method-specific reference (e.g., transaction hash). */
|
|
133
|
+
reference: string(),
|
|
134
|
+
/** Optional external reference ID echoed from the credential payload. */
|
|
135
|
+
externalId: optional(string()),
|
|
136
|
+
/** Optional server-issued subscription identifier for recurring payments. */
|
|
137
|
+
subscriptionId: optional(string()),
|
|
138
|
+
/** Payment status. Always "success" — failures use 402 + Problem Details. */
|
|
139
|
+
status: literal("success"),
|
|
140
|
+
/** RFC 3339 settlement timestamp. */
|
|
141
|
+
timestamp: datetime()
|
|
142
|
+
};
|
|
143
|
+
var BaseSchema = object(shape);
|
|
144
|
+
var Schema = looseObject(shape);
|
|
145
|
+
function deserialize(encoded) {
|
|
146
|
+
const json = Base64_exports.toString(encoded);
|
|
147
|
+
return from(JSON.parse(json));
|
|
148
|
+
}
|
|
149
|
+
function from(parameters) {
|
|
150
|
+
return Schema.parse(parameters);
|
|
151
|
+
}
|
|
152
|
+
function serialize(receipt) {
|
|
153
|
+
const json = JSON.stringify(receipt);
|
|
154
|
+
return Base64_exports.fromString(json, { pad: false, url: true });
|
|
155
|
+
}
|
|
156
|
+
function fromResponse(response) {
|
|
157
|
+
const header = response.headers.get(Headers.paymentReceipt);
|
|
158
|
+
if (!header)
|
|
159
|
+
throw new Error(`Missing ${Headers.paymentReceipt} header.`);
|
|
160
|
+
return deserialize(header);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// node_modules/mppx/dist/Store.js
|
|
164
|
+
var Store_exports = {};
|
|
165
|
+
__export(Store_exports, {
|
|
166
|
+
cloudflare: () => cloudflare,
|
|
167
|
+
from: () => from2,
|
|
168
|
+
memory: () => memory,
|
|
169
|
+
redis: () => redis,
|
|
170
|
+
upstash: () => upstash
|
|
171
|
+
});
|
|
172
|
+
var keyPrefixCache = /* @__PURE__ */ new WeakMap();
|
|
173
|
+
function from2(store, options) {
|
|
174
|
+
return withKeyPrefix(store, options?.keyPrefix);
|
|
175
|
+
}
|
|
176
|
+
function withKeyPrefix(store, keyPrefix = "") {
|
|
177
|
+
if (!keyPrefix)
|
|
178
|
+
return store;
|
|
179
|
+
const cached = keyPrefixCache.get(store)?.get(keyPrefix);
|
|
180
|
+
if (cached)
|
|
181
|
+
return cached;
|
|
182
|
+
const backing = store;
|
|
183
|
+
const prefixedKey = (key) => `${keyPrefix}${key}`;
|
|
184
|
+
const prefixed = from2({
|
|
185
|
+
async get(key) {
|
|
186
|
+
return backing.get(prefixedKey(key));
|
|
187
|
+
},
|
|
188
|
+
async put(key, value) {
|
|
189
|
+
await backing.put(prefixedKey(key), value);
|
|
190
|
+
},
|
|
191
|
+
async delete(key) {
|
|
192
|
+
await backing.delete(prefixedKey(key));
|
|
193
|
+
},
|
|
194
|
+
..."update" in store ? {
|
|
195
|
+
async update(key, fn) {
|
|
196
|
+
return store.update(prefixedKey(key), fn);
|
|
197
|
+
}
|
|
198
|
+
} : {}
|
|
199
|
+
});
|
|
200
|
+
const cachedByPrefix = keyPrefixCache.get(store) ?? /* @__PURE__ */ new Map();
|
|
201
|
+
cachedByPrefix.set(keyPrefix, prefixed);
|
|
202
|
+
keyPrefixCache.set(store, cachedByPrefix);
|
|
203
|
+
return prefixed;
|
|
204
|
+
}
|
|
205
|
+
function wrapJsonUpdate(update) {
|
|
206
|
+
if (!update)
|
|
207
|
+
return {};
|
|
208
|
+
return {
|
|
209
|
+
async update(key, fn) {
|
|
210
|
+
return update(key, (current) => {
|
|
211
|
+
const parsed = current == null ? null : Json_exports.parse(current);
|
|
212
|
+
const change = fn(parsed);
|
|
213
|
+
if (change.op !== "set")
|
|
214
|
+
return change;
|
|
215
|
+
return { ...change, value: Json_exports.stringify(change.value) };
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function cloudflare(kv, options) {
|
|
221
|
+
return from2({
|
|
222
|
+
async get(key) {
|
|
223
|
+
const raw = await kv.get(key);
|
|
224
|
+
if (raw == null)
|
|
225
|
+
return null;
|
|
226
|
+
return Json_exports.parse(raw);
|
|
227
|
+
},
|
|
228
|
+
async put(key, value) {
|
|
229
|
+
await kv.put(key, Json_exports.stringify(value));
|
|
230
|
+
},
|
|
231
|
+
async delete(key) {
|
|
232
|
+
await kv.delete(key);
|
|
233
|
+
},
|
|
234
|
+
...wrapJsonUpdate(kv.update)
|
|
235
|
+
}, options);
|
|
236
|
+
}
|
|
237
|
+
function memory(options) {
|
|
238
|
+
const store = /* @__PURE__ */ new Map();
|
|
239
|
+
return from2({
|
|
240
|
+
async get(key) {
|
|
241
|
+
const raw = store.get(key);
|
|
242
|
+
if (raw === void 0)
|
|
243
|
+
return null;
|
|
244
|
+
return Json_exports.parse(raw);
|
|
245
|
+
},
|
|
246
|
+
async put(key, value) {
|
|
247
|
+
store.set(key, Json_exports.stringify(value));
|
|
248
|
+
},
|
|
249
|
+
async delete(key) {
|
|
250
|
+
store.delete(key);
|
|
251
|
+
},
|
|
252
|
+
async update(key, fn) {
|
|
253
|
+
const current = store.has(key) ? Json_exports.parse(store.get(key)) : null;
|
|
254
|
+
const change = fn(current);
|
|
255
|
+
if (change.op === "set")
|
|
256
|
+
store.set(key, Json_exports.stringify(change.value));
|
|
257
|
+
if (change.op === "delete")
|
|
258
|
+
store.delete(key);
|
|
259
|
+
return change.result;
|
|
260
|
+
}
|
|
261
|
+
}, options);
|
|
262
|
+
}
|
|
263
|
+
function redis(client, options) {
|
|
264
|
+
return from2({
|
|
265
|
+
async get(key) {
|
|
266
|
+
const raw = await client.get(key);
|
|
267
|
+
if (raw == null)
|
|
268
|
+
return null;
|
|
269
|
+
return Json_exports.parse(raw);
|
|
270
|
+
},
|
|
271
|
+
async put(key, value) {
|
|
272
|
+
await client.set(key, Json_exports.stringify(value));
|
|
273
|
+
},
|
|
274
|
+
async delete(key) {
|
|
275
|
+
await client.del(key);
|
|
276
|
+
},
|
|
277
|
+
...wrapJsonUpdate(client.update)
|
|
278
|
+
}, options);
|
|
279
|
+
}
|
|
280
|
+
function upstash(redis2, options) {
|
|
281
|
+
return from2({
|
|
282
|
+
async get(key) {
|
|
283
|
+
return await redis2.get(key);
|
|
284
|
+
},
|
|
285
|
+
async put(key, value) {
|
|
286
|
+
await redis2.set(key, value);
|
|
287
|
+
},
|
|
288
|
+
async delete(key) {
|
|
289
|
+
await redis2.del(key);
|
|
290
|
+
},
|
|
291
|
+
...redis2.update ? {
|
|
292
|
+
update: redis2.update
|
|
293
|
+
} : {}
|
|
294
|
+
}, options);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// node_modules/mppx/dist/x402/index.js
|
|
298
|
+
var x402_exports = {};
|
|
299
|
+
__export(x402_exports, {
|
|
300
|
+
Assets: () => Assets_exports,
|
|
301
|
+
ExactEip3009PayloadSchema: () => ExactEip3009PayloadSchema,
|
|
302
|
+
ExactPayloadSchema: () => ExactPayloadSchema,
|
|
303
|
+
ExactPermit2PayloadSchema: () => ExactPermit2PayloadSchema,
|
|
304
|
+
ExactTransferSchema: () => ExactTransferSchema,
|
|
305
|
+
ExtensionSchema: () => ExtensionSchema,
|
|
306
|
+
ExtensionsSchema: () => ExtensionsSchema,
|
|
307
|
+
Header: () => Header_exports,
|
|
308
|
+
PaymentPayloadSchema: () => PaymentPayloadSchema,
|
|
309
|
+
PaymentRequiredSchema: () => PaymentRequiredSchema,
|
|
310
|
+
PaymentRequirementsSchema: () => PaymentRequirementsSchema,
|
|
311
|
+
ResourceInfoSchema: () => ResourceInfoSchema,
|
|
312
|
+
SettleResponseSchema: () => SettleResponseSchema,
|
|
313
|
+
Types: () => Types_exports,
|
|
314
|
+
VerifyResponseSchema: () => VerifyResponseSchema,
|
|
315
|
+
assetTransferMethods: () => assetTransferMethods,
|
|
316
|
+
assets: () => Assets_exports,
|
|
317
|
+
evmNetworkPrefix: () => evmNetworkPrefix,
|
|
318
|
+
exactIntent: () => exactIntent,
|
|
319
|
+
paymentMethod: () => paymentMethod,
|
|
320
|
+
paymentRequiredHeader: () => paymentRequiredHeader,
|
|
321
|
+
paymentResponseHeader: () => paymentResponseHeader,
|
|
322
|
+
paymentSignatureHeader: () => paymentSignatureHeader,
|
|
323
|
+
schemes: () => schemes,
|
|
324
|
+
syntheticChallengeIdPrefix: () => syntheticChallengeIdPrefix,
|
|
325
|
+
toPaymentRequirements: () => toPaymentRequirements,
|
|
326
|
+
versions: () => versions
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
export {
|
|
330
|
+
from2 as from,
|
|
331
|
+
memory,
|
|
332
|
+
Store_exports,
|
|
333
|
+
from as from2,
|
|
334
|
+
serialize,
|
|
335
|
+
Receipt_exports,
|
|
336
|
+
BodyDigest_exports,
|
|
337
|
+
evm_exports,
|
|
338
|
+
x402_exports
|
|
339
|
+
};
|