@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
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
HashMD,
|
|
6
6
|
secp256k1,
|
|
7
7
|
sha256
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-65EY7CT4.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseError,
|
|
11
11
|
BytesSizeMismatchError,
|
|
@@ -41,12 +41,115 @@ import {
|
|
|
41
41
|
toBytes,
|
|
42
42
|
toHex,
|
|
43
43
|
trim
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MLDUKBU3.js";
|
|
45
45
|
import {
|
|
46
46
|
clean,
|
|
47
47
|
createHasher,
|
|
48
48
|
rotl
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7OK7MBT6.js";
|
|
50
|
+
|
|
51
|
+
// node_modules/viem/_esm/actions/public/getTransactionCount.js
|
|
52
|
+
async function getTransactionCount(client, { address, blockHash, blockNumber, blockTag = "latest", requireCanonical }) {
|
|
53
|
+
const block = formatBlockParameter({
|
|
54
|
+
blockHash,
|
|
55
|
+
blockNumber,
|
|
56
|
+
blockTag,
|
|
57
|
+
requireCanonical
|
|
58
|
+
});
|
|
59
|
+
const count = await client.request({
|
|
60
|
+
method: "eth_getTransactionCount",
|
|
61
|
+
params: [address, block]
|
|
62
|
+
}, {
|
|
63
|
+
dedupe: typeof blockNumber === "bigint" || blockHash !== void 0
|
|
64
|
+
});
|
|
65
|
+
return hexToNumber(count);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// node_modules/viem/_esm/utils/nonceManager.js
|
|
69
|
+
function createNonceManager(parameters) {
|
|
70
|
+
const { source } = parameters;
|
|
71
|
+
const deltaMap = /* @__PURE__ */ new Map();
|
|
72
|
+
const nonceMap = new LruMap(8192);
|
|
73
|
+
const promiseMap = /* @__PURE__ */ new Map();
|
|
74
|
+
const getKey = ({ address, chainId }) => `${address}.${chainId}`;
|
|
75
|
+
const resetCache = (key) => {
|
|
76
|
+
deltaMap.delete(key);
|
|
77
|
+
promiseMap.delete(key);
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
async consume({ address, chainId, client }) {
|
|
81
|
+
const key = getKey({ address, chainId });
|
|
82
|
+
const promise = this.get({ address, chainId, client });
|
|
83
|
+
this.increment({ address, chainId });
|
|
84
|
+
const nonce = await promise;
|
|
85
|
+
await source.set({ address, chainId }, nonce);
|
|
86
|
+
nonceMap.set(key, nonce);
|
|
87
|
+
return nonce;
|
|
88
|
+
},
|
|
89
|
+
async increment({ address, chainId }) {
|
|
90
|
+
const key = getKey({ address, chainId });
|
|
91
|
+
const delta = deltaMap.get(key) ?? 0;
|
|
92
|
+
deltaMap.set(key, delta + 1);
|
|
93
|
+
},
|
|
94
|
+
async get({ address, chainId, client }) {
|
|
95
|
+
const key = getKey({ address, chainId });
|
|
96
|
+
let promise = promiseMap.get(key);
|
|
97
|
+
if (!promise) {
|
|
98
|
+
promise = (async () => {
|
|
99
|
+
try {
|
|
100
|
+
const nonce = await source.get({ address, chainId, client });
|
|
101
|
+
const previousNonce = nonceMap.get(key) ?? 0;
|
|
102
|
+
if (previousNonce > 0 && nonce <= previousNonce)
|
|
103
|
+
return previousNonce + 1;
|
|
104
|
+
nonceMap.delete(key);
|
|
105
|
+
return nonce;
|
|
106
|
+
} finally {
|
|
107
|
+
resetCache(key);
|
|
108
|
+
}
|
|
109
|
+
})();
|
|
110
|
+
promiseMap.set(key, promise);
|
|
111
|
+
}
|
|
112
|
+
const delta = deltaMap.get(key) ?? 0;
|
|
113
|
+
return delta + await promise;
|
|
114
|
+
},
|
|
115
|
+
reset({ address, chainId }) {
|
|
116
|
+
const key = getKey({ address, chainId });
|
|
117
|
+
nonceMap.delete(key);
|
|
118
|
+
resetCache(key);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function jsonRpc() {
|
|
123
|
+
return {
|
|
124
|
+
async get(parameters) {
|
|
125
|
+
const { address, client } = parameters;
|
|
126
|
+
return getTransactionCount(client, {
|
|
127
|
+
address,
|
|
128
|
+
blockTag: "pending"
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
set() {
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
var nonceManager = /* @__PURE__ */ createNonceManager({
|
|
136
|
+
source: jsonRpc()
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// node_modules/viem/_esm/utils/signature/serializeSignature.js
|
|
140
|
+
function serializeSignature({ r, s, to = "hex", v, yParity }) {
|
|
141
|
+
const yParity_ = (() => {
|
|
142
|
+
if (yParity === 0 || yParity === 1)
|
|
143
|
+
return yParity;
|
|
144
|
+
if (v && (v === 27n || v === 28n || v >= 35n))
|
|
145
|
+
return v % 2n === 0n ? 1 : 0;
|
|
146
|
+
throw new Error("Invalid `v` or `yParity` value");
|
|
147
|
+
})();
|
|
148
|
+
const signature = `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${yParity_ === 0 ? "1b" : "1c"}`;
|
|
149
|
+
if (to === "hex")
|
|
150
|
+
return signature;
|
|
151
|
+
return hexToBytes(signature);
|
|
152
|
+
}
|
|
50
153
|
|
|
51
154
|
// node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
|
|
52
155
|
function publicKeyToAddress(publicKey) {
|
|
@@ -149,6 +252,27 @@ function getSizeOfLength(length) {
|
|
|
149
252
|
throw new BaseError("Length is too large.");
|
|
150
253
|
}
|
|
151
254
|
|
|
255
|
+
// node_modules/viem/_esm/constants/strings.js
|
|
256
|
+
var presignMessagePrefix = "Ethereum Signed Message:\n";
|
|
257
|
+
|
|
258
|
+
// node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
|
|
259
|
+
function toPrefixedMessage(message_) {
|
|
260
|
+
const message = (() => {
|
|
261
|
+
if (typeof message_ === "string")
|
|
262
|
+
return stringToHex(message_);
|
|
263
|
+
if (typeof message_.raw === "string")
|
|
264
|
+
return message_.raw;
|
|
265
|
+
return bytesToHex(message_.raw);
|
|
266
|
+
})();
|
|
267
|
+
const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);
|
|
268
|
+
return concat([prefix, message]);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// node_modules/viem/_esm/utils/signature/hashMessage.js
|
|
272
|
+
function hashMessage(message, to_) {
|
|
273
|
+
return keccak256(toPrefixedMessage(message), to_);
|
|
274
|
+
}
|
|
275
|
+
|
|
152
276
|
// node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
|
153
277
|
function blobsToCommitments(parameters) {
|
|
154
278
|
const { kzg } = parameters;
|
|
@@ -308,25 +432,6 @@ function toBlobSidecars(parameters) {
|
|
|
308
432
|
return sidecars;
|
|
309
433
|
}
|
|
310
434
|
|
|
311
|
-
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
|
312
|
-
function getTransactionType(transaction) {
|
|
313
|
-
if (transaction.type)
|
|
314
|
-
return transaction.type;
|
|
315
|
-
if (typeof transaction.authorizationList !== "undefined")
|
|
316
|
-
return "eip7702";
|
|
317
|
-
if (typeof transaction.blobs !== "undefined" || typeof transaction.blobVersionedHashes !== "undefined" || typeof transaction.maxFeePerBlobGas !== "undefined" || typeof transaction.sidecars !== "undefined")
|
|
318
|
-
return "eip4844";
|
|
319
|
-
if (typeof transaction.maxFeePerGas !== "undefined" || typeof transaction.maxPriorityFeePerGas !== "undefined") {
|
|
320
|
-
return "eip1559";
|
|
321
|
-
}
|
|
322
|
-
if (typeof transaction.gasPrice !== "undefined") {
|
|
323
|
-
if (typeof transaction.accessList !== "undefined")
|
|
324
|
-
return "eip2930";
|
|
325
|
-
return "legacy";
|
|
326
|
-
}
|
|
327
|
-
throw new InvalidSerializableTransactionError({ transaction });
|
|
328
|
-
}
|
|
329
|
-
|
|
330
435
|
// node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
|
331
436
|
function assertTransactionEIP7702(transaction) {
|
|
332
437
|
const { authorizationList } = transaction;
|
|
@@ -395,6 +500,25 @@ function assertTransactionLegacy(transaction) {
|
|
|
395
500
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
|
396
501
|
}
|
|
397
502
|
|
|
503
|
+
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
|
504
|
+
function getTransactionType(transaction) {
|
|
505
|
+
if (transaction.type)
|
|
506
|
+
return transaction.type;
|
|
507
|
+
if (typeof transaction.authorizationList !== "undefined")
|
|
508
|
+
return "eip7702";
|
|
509
|
+
if (typeof transaction.blobs !== "undefined" || typeof transaction.blobVersionedHashes !== "undefined" || typeof transaction.maxFeePerBlobGas !== "undefined" || typeof transaction.sidecars !== "undefined")
|
|
510
|
+
return "eip4844";
|
|
511
|
+
if (typeof transaction.maxFeePerGas !== "undefined" || typeof transaction.maxPriorityFeePerGas !== "undefined") {
|
|
512
|
+
return "eip1559";
|
|
513
|
+
}
|
|
514
|
+
if (typeof transaction.gasPrice !== "undefined") {
|
|
515
|
+
if (typeof transaction.accessList !== "undefined")
|
|
516
|
+
return "eip2930";
|
|
517
|
+
return "legacy";
|
|
518
|
+
}
|
|
519
|
+
throw new InvalidSerializableTransactionError({ transaction });
|
|
520
|
+
}
|
|
521
|
+
|
|
398
522
|
// node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
|
399
523
|
function serializeAccessList(accessList) {
|
|
400
524
|
if (!accessList || accessList.length === 0)
|
|
@@ -633,115 +757,6 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
|
633
757
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
|
634
758
|
}
|
|
635
759
|
|
|
636
|
-
// node_modules/viem/_esm/actions/public/getTransactionCount.js
|
|
637
|
-
async function getTransactionCount(client, { address, blockHash, blockNumber, blockTag = "latest", requireCanonical }) {
|
|
638
|
-
const block = formatBlockParameter({
|
|
639
|
-
blockHash,
|
|
640
|
-
blockNumber,
|
|
641
|
-
blockTag,
|
|
642
|
-
requireCanonical
|
|
643
|
-
});
|
|
644
|
-
const count = await client.request({
|
|
645
|
-
method: "eth_getTransactionCount",
|
|
646
|
-
params: [address, block]
|
|
647
|
-
}, {
|
|
648
|
-
dedupe: typeof blockNumber === "bigint" || blockHash !== void 0
|
|
649
|
-
});
|
|
650
|
-
return hexToNumber(count);
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// node_modules/viem/_esm/utils/nonceManager.js
|
|
654
|
-
function createNonceManager(parameters) {
|
|
655
|
-
const { source } = parameters;
|
|
656
|
-
const deltaMap = /* @__PURE__ */ new Map();
|
|
657
|
-
const nonceMap = new LruMap(8192);
|
|
658
|
-
const promiseMap = /* @__PURE__ */ new Map();
|
|
659
|
-
const getKey = ({ address, chainId }) => `${address}.${chainId}`;
|
|
660
|
-
const resetCache = (key) => {
|
|
661
|
-
deltaMap.delete(key);
|
|
662
|
-
promiseMap.delete(key);
|
|
663
|
-
};
|
|
664
|
-
return {
|
|
665
|
-
async consume({ address, chainId, client }) {
|
|
666
|
-
const key = getKey({ address, chainId });
|
|
667
|
-
const promise = this.get({ address, chainId, client });
|
|
668
|
-
this.increment({ address, chainId });
|
|
669
|
-
const nonce = await promise;
|
|
670
|
-
await source.set({ address, chainId }, nonce);
|
|
671
|
-
nonceMap.set(key, nonce);
|
|
672
|
-
return nonce;
|
|
673
|
-
},
|
|
674
|
-
async increment({ address, chainId }) {
|
|
675
|
-
const key = getKey({ address, chainId });
|
|
676
|
-
const delta = deltaMap.get(key) ?? 0;
|
|
677
|
-
deltaMap.set(key, delta + 1);
|
|
678
|
-
},
|
|
679
|
-
async get({ address, chainId, client }) {
|
|
680
|
-
const key = getKey({ address, chainId });
|
|
681
|
-
let promise = promiseMap.get(key);
|
|
682
|
-
if (!promise) {
|
|
683
|
-
promise = (async () => {
|
|
684
|
-
try {
|
|
685
|
-
const nonce = await source.get({ address, chainId, client });
|
|
686
|
-
const previousNonce = nonceMap.get(key) ?? 0;
|
|
687
|
-
if (previousNonce > 0 && nonce <= previousNonce)
|
|
688
|
-
return previousNonce + 1;
|
|
689
|
-
nonceMap.delete(key);
|
|
690
|
-
return nonce;
|
|
691
|
-
} finally {
|
|
692
|
-
resetCache(key);
|
|
693
|
-
}
|
|
694
|
-
})();
|
|
695
|
-
promiseMap.set(key, promise);
|
|
696
|
-
}
|
|
697
|
-
const delta = deltaMap.get(key) ?? 0;
|
|
698
|
-
return delta + await promise;
|
|
699
|
-
},
|
|
700
|
-
reset({ address, chainId }) {
|
|
701
|
-
const key = getKey({ address, chainId });
|
|
702
|
-
nonceMap.delete(key);
|
|
703
|
-
resetCache(key);
|
|
704
|
-
}
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
function jsonRpc() {
|
|
708
|
-
return {
|
|
709
|
-
async get(parameters) {
|
|
710
|
-
const { address, client } = parameters;
|
|
711
|
-
return getTransactionCount(client, {
|
|
712
|
-
address,
|
|
713
|
-
blockTag: "pending"
|
|
714
|
-
});
|
|
715
|
-
},
|
|
716
|
-
set() {
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
var nonceManager = /* @__PURE__ */ createNonceManager({
|
|
721
|
-
source: jsonRpc()
|
|
722
|
-
});
|
|
723
|
-
|
|
724
|
-
// node_modules/viem/_esm/constants/strings.js
|
|
725
|
-
var presignMessagePrefix = "Ethereum Signed Message:\n";
|
|
726
|
-
|
|
727
|
-
// node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
|
|
728
|
-
function toPrefixedMessage(message_) {
|
|
729
|
-
const message = (() => {
|
|
730
|
-
if (typeof message_ === "string")
|
|
731
|
-
return stringToHex(message_);
|
|
732
|
-
if (typeof message_.raw === "string")
|
|
733
|
-
return message_.raw;
|
|
734
|
-
return bytesToHex(message_.raw);
|
|
735
|
-
})();
|
|
736
|
-
const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);
|
|
737
|
-
return concat([prefix, message]);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// node_modules/viem/_esm/utils/signature/hashMessage.js
|
|
741
|
-
function hashMessage(message, to_) {
|
|
742
|
-
return keccak256(toPrefixedMessage(message), to_);
|
|
743
|
-
}
|
|
744
|
-
|
|
745
760
|
// node_modules/viem/_esm/errors/typedData.js
|
|
746
761
|
var InvalidDomainError = class extends BaseError {
|
|
747
762
|
constructor({ domain }) {
|
|
@@ -987,38 +1002,6 @@ function validateReference(type) {
|
|
|
987
1002
|
throw new InvalidStructTypeError({ type });
|
|
988
1003
|
}
|
|
989
1004
|
|
|
990
|
-
// node_modules/viem/_esm/utils/signature/serializeSignature.js
|
|
991
|
-
function serializeSignature({ r, s, to = "hex", v, yParity }) {
|
|
992
|
-
const yParity_ = (() => {
|
|
993
|
-
if (yParity === 0 || yParity === 1)
|
|
994
|
-
return yParity;
|
|
995
|
-
if (v && (v === 27n || v === 28n || v >= 35n))
|
|
996
|
-
return v % 2n === 0n ? 1 : 0;
|
|
997
|
-
throw new Error("Invalid `v` or `yParity` value");
|
|
998
|
-
})();
|
|
999
|
-
const signature = `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${yParity_ === 0 ? "1b" : "1c"}`;
|
|
1000
|
-
if (to === "hex")
|
|
1001
|
-
return signature;
|
|
1002
|
-
return hexToBytes(signature);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
// node_modules/viem/_esm/utils/authorization/hashAuthorization.js
|
|
1006
|
-
function hashAuthorization(parameters) {
|
|
1007
|
-
const { chainId, nonce, to } = parameters;
|
|
1008
|
-
const address = parameters.contractAddress ?? parameters.address;
|
|
1009
|
-
const hash = keccak256(concatHex([
|
|
1010
|
-
"0x05",
|
|
1011
|
-
toRlp([
|
|
1012
|
-
chainId ? numberToHex(chainId) : "0x",
|
|
1013
|
-
address,
|
|
1014
|
-
nonce ? numberToHex(nonce) : "0x"
|
|
1015
|
-
])
|
|
1016
|
-
]));
|
|
1017
|
-
if (to === "bytes")
|
|
1018
|
-
return hexToBytes(hash);
|
|
1019
|
-
return hash;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
1005
|
// node_modules/viem/node_modules/@noble/hashes/esm/legacy.js
|
|
1023
1006
|
var Rho160 = /* @__PURE__ */ Uint8Array.from([
|
|
1024
1007
|
7,
|
|
@@ -1137,13 +1120,37 @@ var RIPEMD160 = class extends HashMD {
|
|
|
1137
1120
|
};
|
|
1138
1121
|
var ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());
|
|
1139
1122
|
|
|
1123
|
+
// node_modules/viem/_esm/utils/authorization/hashAuthorization.js
|
|
1124
|
+
function hashAuthorization(parameters) {
|
|
1125
|
+
const { chainId, nonce, to } = parameters;
|
|
1126
|
+
const address = parameters.contractAddress ?? parameters.address;
|
|
1127
|
+
const hash = keccak256(concatHex([
|
|
1128
|
+
"0x05",
|
|
1129
|
+
toRlp([
|
|
1130
|
+
chainId ? numberToHex(chainId) : "0x",
|
|
1131
|
+
address,
|
|
1132
|
+
nonce ? numberToHex(nonce) : "0x"
|
|
1133
|
+
])
|
|
1134
|
+
]));
|
|
1135
|
+
if (to === "bytes")
|
|
1136
|
+
return hexToBytes(hash);
|
|
1137
|
+
return hash;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
1140
|
export {
|
|
1141
|
+
ripemd160,
|
|
1142
|
+
getTransactionCount,
|
|
1143
|
+
createNonceManager,
|
|
1144
|
+
nonceManager,
|
|
1145
|
+
serializeSignature,
|
|
1141
1146
|
publicKeyToAddress,
|
|
1142
1147
|
toRlp,
|
|
1143
1148
|
bytesToRlp,
|
|
1144
1149
|
hexToRlp,
|
|
1145
1150
|
hashAuthorization,
|
|
1146
|
-
|
|
1151
|
+
presignMessagePrefix,
|
|
1152
|
+
toPrefixedMessage,
|
|
1153
|
+
hashMessage,
|
|
1147
1154
|
blobsToCommitments,
|
|
1148
1155
|
blobsToProofs,
|
|
1149
1156
|
sha2563 as sha256,
|
|
@@ -1151,21 +1158,15 @@ export {
|
|
|
1151
1158
|
commitmentsToVersionedHashes,
|
|
1152
1159
|
toBlobs,
|
|
1153
1160
|
toBlobSidecars,
|
|
1154
|
-
getTransactionType,
|
|
1155
1161
|
assertTransactionEIP7702,
|
|
1156
1162
|
assertTransactionEIP4844,
|
|
1157
1163
|
assertTransactionEIP1559,
|
|
1158
1164
|
assertTransactionEIP2930,
|
|
1159
1165
|
assertTransactionLegacy,
|
|
1166
|
+
getTransactionType,
|
|
1160
1167
|
serializeAccessList,
|
|
1161
1168
|
serializeTransaction,
|
|
1162
1169
|
toYParitySignatureArray,
|
|
1163
|
-
ripemd160,
|
|
1164
|
-
createNonceManager,
|
|
1165
|
-
nonceManager,
|
|
1166
|
-
presignMessagePrefix,
|
|
1167
|
-
toPrefixedMessage,
|
|
1168
|
-
hashMessage,
|
|
1169
1170
|
InvalidDomainError,
|
|
1170
1171
|
InvalidPrimaryTypeError,
|
|
1171
1172
|
InvalidStructTypeError,
|
|
@@ -1176,6 +1177,5 @@ export {
|
|
|
1176
1177
|
domainSeparator,
|
|
1177
1178
|
hashTypedData,
|
|
1178
1179
|
hashDomain,
|
|
1179
|
-
hashStruct
|
|
1180
|
-
serializeSignature
|
|
1180
|
+
hashStruct
|
|
1181
1181
|
};
|
|
@@ -211,24 +211,6 @@ var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >
|
|
|
211
211
|
var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
212
212
|
|
|
213
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
214
|
anumber,
|
|
233
215
|
abytes,
|
|
234
216
|
ahash,
|
|
@@ -249,7 +231,25 @@ export {
|
|
|
249
231
|
checkOpts,
|
|
250
232
|
Hash,
|
|
251
233
|
createHasher,
|
|
252
|
-
randomBytes
|
|
234
|
+
randomBytes,
|
|
235
|
+
split,
|
|
236
|
+
shrSH,
|
|
237
|
+
shrSL,
|
|
238
|
+
rotrSH,
|
|
239
|
+
rotrSL,
|
|
240
|
+
rotrBH,
|
|
241
|
+
rotrBL,
|
|
242
|
+
rotlSH,
|
|
243
|
+
rotlSL,
|
|
244
|
+
rotlBH,
|
|
245
|
+
rotlBL,
|
|
246
|
+
add,
|
|
247
|
+
add3L,
|
|
248
|
+
add3H,
|
|
249
|
+
add4L,
|
|
250
|
+
add4H,
|
|
251
|
+
add5L,
|
|
252
|
+
add5H
|
|
253
253
|
};
|
|
254
254
|
/*! Bundled license information:
|
|
255
255
|
|