@dvmkit/dvm-cli 0.0.0 → 0.1.4

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.
Files changed (53) hide show
  1. package/LICENSE +67 -0
  2. package/NOTICE +2 -0
  3. package/README.md +28 -3
  4. package/dist/_esm-M2HUAA3B.js +883 -0
  5. package/dist/_esm-NRGECLJ7.js +35 -0
  6. package/dist/accounts-S747UW3A.js +73 -0
  7. package/dist/ccip-XZ5F5J6R.js +18 -0
  8. package/dist/chains-PINFXYUE.js +1460 -0
  9. package/dist/channel-store-GOV7TEDN.js +62 -0
  10. package/dist/chunk-3PPOU55E.js +312 -0
  11. package/dist/chunk-3TBULV3F.js +551 -0
  12. package/dist/chunk-4AQ4G7L5.js +1447 -0
  13. package/dist/chunk-5BUV73FO.js +2351 -0
  14. package/dist/chunk-6AJ7H2VX.js +4387 -0
  15. package/dist/chunk-6UGZAFIR.js +1485 -0
  16. package/dist/chunk-7UPZZGC5.js +30063 -0
  17. package/dist/chunk-ACNNU5RY.js +5485 -0
  18. package/dist/chunk-BZNZWRBB.js +189 -0
  19. package/dist/chunk-EY5K4BM3.js +1780 -0
  20. package/dist/chunk-G3RLVJF5.js +19 -0
  21. package/dist/chunk-GIDSTROG.js +16614 -0
  22. package/dist/chunk-HPRIQEJS.js +258 -0
  23. package/dist/chunk-IC6OXFYW.js +6484 -0
  24. package/dist/chunk-IYHTITNZ.js +45 -0
  25. package/dist/chunk-KC4UPK44.js +113 -0
  26. package/dist/chunk-MMJR6N3J.js +2426 -0
  27. package/dist/chunk-MTBCEXJ6.js +4602 -0
  28. package/dist/chunk-ONQMRWY3.js +83 -0
  29. package/dist/chunk-PHZHPRQE.js +1181 -0
  30. package/dist/chunk-RA24J4QM.js +3717 -0
  31. package/dist/chunk-RWBYCM47.js +339 -0
  32. package/dist/chunk-SLDVIXCS.js +21369 -0
  33. package/dist/chunk-TO47XRK7.js +24890 -0
  34. package/dist/chunk-U5TNSUYW.js +1757 -0
  35. package/dist/chunk-UU6QMSTQ.js +171 -0
  36. package/dist/chunk-UXQCP26E.js +2691 -0
  37. package/dist/chunk-XGABM4H5.js +3339 -0
  38. package/dist/chunk-YZUBKHHA.js +15436 -0
  39. package/dist/chunk-ZELLQI7F.js +248 -0
  40. package/dist/chunk-ZGXCK43G.js +9868 -0
  41. package/dist/client-D3XFLWOK.js +52 -0
  42. package/dist/dist-7MMV3EZA.js +46 -0
  43. package/dist/dvm.js +33650 -0
  44. package/dist/lifecycle-5RLM5JMN.js +29 -0
  45. package/dist/mine.wasm-DNBKYCTQ.js +12 -0
  46. package/dist/pocket-refill-GDYSTECR.js +133 -0
  47. package/dist/secp256k1-4YWQEMGF.js +19 -0
  48. package/dist/tempo-lifecycle-DHZPQTSB.js +31 -0
  49. package/dist/tempo-wallet-5FEOI4CF.js +35 -0
  50. package/dist/wallet-G3VOUCL4.js +30 -0
  51. package/dist/x402-VNFA3DBY.js +91 -0
  52. package/package.json +71 -6
  53. package/skills/dvm/SKILL.md +71 -0
@@ -0,0 +1,258 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __dvmCreateRequire } from "node:module";
3
+ const require = __dvmCreateRequire(import.meta.url);
4
+
5
+ // node_modules/viem/node_modules/@noble/hashes/esm/cryptoNode.js
6
+ import * as nc from "crypto";
7
+ var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
8
+
9
+ // node_modules/viem/node_modules/@noble/hashes/esm/utils.js
10
+ function isBytes(a) {
11
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
12
+ }
13
+ function anumber(n) {
14
+ if (!Number.isSafeInteger(n) || n < 0)
15
+ throw new Error("positive integer expected, got " + n);
16
+ }
17
+ function abytes(b, ...lengths) {
18
+ if (!isBytes(b))
19
+ throw new Error("Uint8Array expected");
20
+ if (lengths.length > 0 && !lengths.includes(b.length))
21
+ throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
22
+ }
23
+ function ahash(h) {
24
+ if (typeof h !== "function" || typeof h.create !== "function")
25
+ throw new Error("Hash should be wrapped by utils.createHasher");
26
+ anumber(h.outputLen);
27
+ anumber(h.blockLen);
28
+ }
29
+ function aexists(instance, checkFinished = true) {
30
+ if (instance.destroyed)
31
+ throw new Error("Hash instance has been destroyed");
32
+ if (checkFinished && instance.finished)
33
+ throw new Error("Hash#digest() has already been called");
34
+ }
35
+ function aoutput(out, instance) {
36
+ abytes(out);
37
+ const min = instance.outputLen;
38
+ if (out.length < min) {
39
+ throw new Error("digestInto() expects output buffer of length at least " + min);
40
+ }
41
+ }
42
+ function u32(arr) {
43
+ return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
44
+ }
45
+ function clean(...arrays) {
46
+ for (let i = 0; i < arrays.length; i++) {
47
+ arrays[i].fill(0);
48
+ }
49
+ }
50
+ function createView(arr) {
51
+ return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
52
+ }
53
+ function rotr(word, shift) {
54
+ return word << 32 - shift | word >>> shift;
55
+ }
56
+ function rotl(word, shift) {
57
+ return word << shift | word >>> 32 - shift >>> 0;
58
+ }
59
+ var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
60
+ function byteSwap(word) {
61
+ return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
62
+ }
63
+ function byteSwap32(arr) {
64
+ for (let i = 0; i < arr.length; i++) {
65
+ arr[i] = byteSwap(arr[i]);
66
+ }
67
+ return arr;
68
+ }
69
+ var swap32IfBE = isLE ? (u) => u : byteSwap32;
70
+ var hasHexBuiltin = /* @__PURE__ */ (() => (
71
+ // @ts-ignore
72
+ typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function"
73
+ ))();
74
+ var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
75
+ function bytesToHex(bytes) {
76
+ abytes(bytes);
77
+ if (hasHexBuiltin)
78
+ return bytes.toHex();
79
+ let hex = "";
80
+ for (let i = 0; i < bytes.length; i++) {
81
+ hex += hexes[bytes[i]];
82
+ }
83
+ return hex;
84
+ }
85
+ var asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
86
+ function asciiToBase16(ch) {
87
+ if (ch >= asciis._0 && ch <= asciis._9)
88
+ return ch - asciis._0;
89
+ if (ch >= asciis.A && ch <= asciis.F)
90
+ return ch - (asciis.A - 10);
91
+ if (ch >= asciis.a && ch <= asciis.f)
92
+ return ch - (asciis.a - 10);
93
+ return;
94
+ }
95
+ function hexToBytes(hex) {
96
+ if (typeof hex !== "string")
97
+ throw new Error("hex string expected, got " + typeof hex);
98
+ if (hasHexBuiltin)
99
+ return Uint8Array.fromHex(hex);
100
+ const hl = hex.length;
101
+ const al = hl / 2;
102
+ if (hl % 2)
103
+ throw new Error("hex string expected, got unpadded hex of length " + hl);
104
+ const array = new Uint8Array(al);
105
+ for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
106
+ const n1 = asciiToBase16(hex.charCodeAt(hi));
107
+ const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
108
+ if (n1 === void 0 || n2 === void 0) {
109
+ const char = hex[hi] + hex[hi + 1];
110
+ throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
111
+ }
112
+ array[ai] = n1 * 16 + n2;
113
+ }
114
+ return array;
115
+ }
116
+ function utf8ToBytes(str) {
117
+ if (typeof str !== "string")
118
+ throw new Error("string expected");
119
+ return new Uint8Array(new TextEncoder().encode(str));
120
+ }
121
+ function toBytes(data) {
122
+ if (typeof data === "string")
123
+ data = utf8ToBytes(data);
124
+ abytes(data);
125
+ return data;
126
+ }
127
+ function kdfInputToBytes(data) {
128
+ if (typeof data === "string")
129
+ data = utf8ToBytes(data);
130
+ abytes(data);
131
+ return data;
132
+ }
133
+ function concatBytes(...arrays) {
134
+ let sum = 0;
135
+ for (let i = 0; i < arrays.length; i++) {
136
+ const a = arrays[i];
137
+ abytes(a);
138
+ sum += a.length;
139
+ }
140
+ const res = new Uint8Array(sum);
141
+ for (let i = 0, pad = 0; i < arrays.length; i++) {
142
+ const a = arrays[i];
143
+ res.set(a, pad);
144
+ pad += a.length;
145
+ }
146
+ return res;
147
+ }
148
+ function checkOpts(defaults, opts) {
149
+ if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]")
150
+ throw new Error("options should be object or undefined");
151
+ const merged = Object.assign(defaults, opts);
152
+ return merged;
153
+ }
154
+ var Hash = class {
155
+ };
156
+ function createHasher(hashCons) {
157
+ const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
158
+ const tmp = hashCons();
159
+ hashC.outputLen = tmp.outputLen;
160
+ hashC.blockLen = tmp.blockLen;
161
+ hashC.create = () => hashCons();
162
+ return hashC;
163
+ }
164
+ function randomBytes(bytesLength = 32) {
165
+ if (crypto && typeof crypto.getRandomValues === "function") {
166
+ return crypto.getRandomValues(new Uint8Array(bytesLength));
167
+ }
168
+ if (crypto && typeof crypto.randomBytes === "function") {
169
+ return Uint8Array.from(crypto.randomBytes(bytesLength));
170
+ }
171
+ throw new Error("crypto.getRandomValues must be defined");
172
+ }
173
+
174
+ // node_modules/viem/node_modules/@noble/hashes/esm/_u64.js
175
+ var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
176
+ var _32n = /* @__PURE__ */ BigInt(32);
177
+ function fromBig(n, le = false) {
178
+ if (le)
179
+ return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
180
+ return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
181
+ }
182
+ function split(lst, le = false) {
183
+ const len = lst.length;
184
+ let Ah = new Uint32Array(len);
185
+ let Al = new Uint32Array(len);
186
+ for (let i = 0; i < len; i++) {
187
+ const { h, l } = fromBig(lst[i], le);
188
+ [Ah[i], Al[i]] = [h, l];
189
+ }
190
+ return [Ah, Al];
191
+ }
192
+ var shrSH = (h, _l, s) => h >>> s;
193
+ var shrSL = (h, l, s) => h << 32 - s | l >>> s;
194
+ var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
195
+ var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
196
+ var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
197
+ var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
198
+ var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
199
+ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
200
+ var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
201
+ var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
202
+ function add(Ah, Al, Bh, Bl) {
203
+ const l = (Al >>> 0) + (Bl >>> 0);
204
+ return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
205
+ }
206
+ var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
207
+ var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
208
+ var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
209
+ var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
210
+ var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
211
+ var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
212
+
213
+ export {
214
+ split,
215
+ shrSH,
216
+ shrSL,
217
+ rotrSH,
218
+ rotrSL,
219
+ rotrBH,
220
+ rotrBL,
221
+ rotlSH,
222
+ rotlSL,
223
+ rotlBH,
224
+ rotlBL,
225
+ add,
226
+ add3L,
227
+ add3H,
228
+ add4L,
229
+ add4H,
230
+ add5L,
231
+ add5H,
232
+ anumber,
233
+ abytes,
234
+ ahash,
235
+ aexists,
236
+ aoutput,
237
+ u32,
238
+ clean,
239
+ createView,
240
+ rotr,
241
+ rotl,
242
+ swap32IfBE,
243
+ bytesToHex,
244
+ hexToBytes,
245
+ utf8ToBytes,
246
+ toBytes,
247
+ kdfInputToBytes,
248
+ concatBytes,
249
+ checkOpts,
250
+ Hash,
251
+ createHasher,
252
+ randomBytes
253
+ };
254
+ /*! Bundled license information:
255
+
256
+ @noble/hashes/esm/utils.js:
257
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
258
+ */