tenjin-cli 0.1.0-alpha.15 → 0.1.0-alpha.16
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/NOTICE.md +54 -7
- package/README.md +41 -310
- package/dist/{_esm-N4KAVXQR.js → _esm-CE7KNONL.js} +9 -10
- package/dist/{ccip-ZGGWQN4X.js → ccip-7RMRLAGV.js} +4 -4
- package/dist/{ccip-RPPPKTJR.js → ccip-NLCSCHKI.js} +5 -5
- package/dist/chunk-25TJPVBF.js +353 -0
- package/dist/chunk-25TJPVBF.js.map +1 -0
- package/dist/chunk-2BKS2FVE.js +93 -0
- package/dist/chunk-2BKS2FVE.js.map +1 -0
- package/dist/chunk-2QYORQBF.js +55 -0
- package/dist/chunk-2QYORQBF.js.map +1 -0
- package/dist/{chunk-NIKXHWOL.js → chunk-2U5ZVEV3.js} +16 -16
- package/dist/chunk-2U5ZVEV3.js.map +1 -0
- package/dist/{chunk-HPJGOLTN.js → chunk-3AJS6LLN.js} +13 -8
- package/dist/chunk-3AJS6LLN.js.map +1 -0
- package/dist/{chunk-KINZ23CV.js → chunk-3AUDA53C.js} +4740 -23
- package/dist/chunk-3AUDA53C.js.map +1 -0
- package/dist/{chunk-MJZZTKCC.js → chunk-56MOAIP5.js} +5 -10
- package/dist/chunk-56MOAIP5.js.map +1 -0
- package/dist/{chunk-U5S527PP.js → chunk-5IEP5EGE.js} +3 -3
- package/dist/chunk-5X4SZ5BF.js +227 -0
- package/dist/chunk-5X4SZ5BF.js.map +1 -0
- package/dist/chunk-7WEQQJLG.js +68 -0
- package/dist/chunk-7WEQQJLG.js.map +1 -0
- package/dist/{chunk-7FK2UN2T.js → chunk-AWQPGIR6.js} +65 -67
- package/dist/{chunk-7FK2UN2T.js.map → chunk-AWQPGIR6.js.map} +1 -1
- package/dist/{chunk-ZFJJ3EXC.js → chunk-BBVUVBUO.js} +516 -185
- package/dist/chunk-BBVUVBUO.js.map +1 -0
- package/dist/{chunk-JBIKAAT3.js → chunk-BFFM2WFK.js} +8 -8
- package/dist/chunk-BFFM2WFK.js.map +1 -0
- package/dist/{chunk-KYQVEKP5.js → chunk-BPMWXTFX.js} +8 -8
- package/dist/chunk-DMZZLPZN.js +205 -0
- package/dist/chunk-DMZZLPZN.js.map +1 -0
- package/dist/{chunk-47PP7TAG.js → chunk-EGELTSPU.js} +1356 -1356
- package/dist/chunk-EGELTSPU.js.map +1 -0
- package/dist/chunk-GULLJQXA.js +698 -0
- package/dist/chunk-GULLJQXA.js.map +1 -0
- package/dist/{chunk-S5RYMCV6.js → chunk-HPWO4O6S.js} +3 -3
- package/dist/chunk-HVRC33OL.js +174 -0
- package/dist/chunk-HVRC33OL.js.map +1 -0
- package/dist/{chunk-W6R3HAAG.js → chunk-JRGFKVAZ.js} +2 -2
- package/dist/{chunk-XJN5WUKL.js → chunk-KG3D7FIF.js} +2 -2
- package/dist/chunk-L3PVMIYQ.js +10328 -0
- package/dist/chunk-L3PVMIYQ.js.map +1 -0
- package/dist/{chunk-QW2Q2KAH.js → chunk-LHHMV4GU.js} +2 -2
- package/dist/{chunk-ZOBNS7CX.js → chunk-MEFB5KHA.js} +4 -18
- package/dist/chunk-MEFB5KHA.js.map +1 -0
- package/dist/{chunk-M2O56UK7.js → chunk-N35E6CM2.js} +293 -163
- package/dist/chunk-N35E6CM2.js.map +1 -0
- package/dist/chunk-OCBHUHWB.js +69 -0
- package/dist/chunk-OCBHUHWB.js.map +1 -0
- package/dist/chunk-OIM4HLN6.js +1405 -0
- package/dist/chunk-OIM4HLN6.js.map +1 -0
- package/dist/{chunk-VYOJOX4Z.js → chunk-OJLYNM4Z.js} +54 -33
- package/dist/chunk-OJLYNM4Z.js.map +1 -0
- package/dist/{chunk-POJRB2AE.js → chunk-POUWHWID.js} +2 -2
- package/dist/chunk-PZEN5PHN.js +285 -0
- package/dist/chunk-PZEN5PHN.js.map +1 -0
- package/dist/chunk-SKAHDQH7.js +1785 -0
- package/dist/chunk-SKAHDQH7.js.map +1 -0
- package/dist/{chunk-KZAAWQNP.js → chunk-TTNESUPQ.js} +3 -3
- package/dist/chunk-U5DXNFJC.js +137 -0
- package/dist/chunk-U5DXNFJC.js.map +1 -0
- package/dist/chunk-USS336NF.js +165 -0
- package/dist/chunk-USS336NF.js.map +1 -0
- package/dist/{chunk-UO22YNY4.js → chunk-WH7OWT6G.js} +49 -1
- package/dist/chunk-WH7OWT6G.js.map +1 -0
- package/dist/chunk-WXC57XGG.js +29 -0
- package/dist/chunk-WXC57XGG.js.map +1 -0
- package/dist/{chunk-YLYINX2H.js → chunk-XZKD7DIF.js} +3 -3
- package/dist/{chunk-CPCX67TI.js → chunk-YEETV6IW.js} +1079 -1039
- package/dist/chunk-YEETV6IW.js.map +1 -0
- package/dist/{chunk-OLWTRUTS.js → chunk-YJHHCWM3.js} +35 -16
- package/dist/chunk-YJHHCWM3.js.map +1 -0
- package/dist/{cli-KKRKBU5T.js → cli-M3XCSOU6.js} +289 -374
- package/dist/cli-M3XCSOU6.js.map +1 -0
- package/dist/config-MXOX7XDR.js +41 -0
- package/dist/{dist-U4M6QCKE.js → dist-3LOO6M4U.js} +10 -10
- package/dist/doctor-LU4YIZWM.js +349 -0
- package/dist/doctor-LU4YIZWM.js.map +1 -0
- package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js → ethersCompat-Df4a6QIZ-THAVUGIJ.js} +5 -5
- package/dist/{chunk-KAJZHIQ4.js → fund-A54P2QFK.js} +80 -24
- package/dist/fund-A54P2QFK.js.map +1 -0
- package/dist/hook-command-U6KWPEDQ.js +377 -0
- package/dist/hook-command-U6KWPEDQ.js.map +1 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/install-XUM2XSHW.js +53 -0
- package/dist/install-wallet-QIOFORTX.js +105 -0
- package/dist/install-wallet-QIOFORTX.js.map +1 -0
- package/dist/{run-XYTQ5TWQ.js → mcp-HJC2PLRV.js} +3727 -10670
- package/dist/mcp-HJC2PLRV.js.map +1 -0
- package/dist/paths-P2N4JTDZ.js +49 -0
- package/dist/pay-SBXZEPEP.js +37 -0
- package/dist/redact-46ZHF2NH.js +17 -0
- package/dist/{secp256k1-XRPVBC6V.js → secp256k1-ZZZT2CAX.js} +3 -3
- package/dist/{send-G746D7PQ.js → send-ASD2ZXJD.js} +28 -29
- package/dist/send-ASD2ZXJD.js.map +1 -0
- package/dist/{chunk-QZ6ROAJU.js → skill-placement-NFVHY6A3.js} +157 -11
- package/dist/skill-placement-NFVHY6A3.js.map +1 -0
- package/dist/status-T2SDB57A.js +63 -0
- package/dist/status-T2SDB57A.js.map +1 -0
- package/dist/status-line-CGPUSDMC.js +71 -0
- package/dist/status-line-CGPUSDMC.js.map +1 -0
- package/dist/status-line-wiring-BYPHTYZE.js +30 -0
- package/dist/tenjin-daemon.mjs +20060 -0
- package/dist/tenjin-shim.mjs +251 -0
- package/dist/tenjin-vitest-reporter.mjs +49 -0
- package/dist/uninstall-FKYZHAM3.js +144 -0
- package/dist/uninstall-FKYZHAM3.js.map +1 -0
- package/dist/{update-R76LHOZW.js → update-ANJ2AOTN.js} +133 -16
- package/dist/update-ANJ2AOTN.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-TUQJBMHM.js → viemAdapter-By13KInL-X2VY6CY3.js} +5 -5
- package/dist/wallet-PWAHVKWW.js +31 -0
- package/dist/wallet-kdf-worker.mjs +980 -0
- package/docs/agent-permissions.md +65 -354
- package/docs/safety-model.md +16 -6
- package/package.json +8 -7
- package/LICENSE +0 -21
- package/dist/buy-VIRNSYGN.js +0 -47
- package/dist/chunk-2MYQN7HM.js +0 -247
- package/dist/chunk-2MYQN7HM.js.map +0 -1
- package/dist/chunk-2RF2GIJQ.js +0 -1188
- package/dist/chunk-2RF2GIJQ.js.map +0 -1
- package/dist/chunk-3GL2Z5QK.js +0 -57
- package/dist/chunk-3GL2Z5QK.js.map +0 -1
- package/dist/chunk-47PP7TAG.js.map +0 -1
- package/dist/chunk-4CQIDQOT.js +0 -167
- package/dist/chunk-4CQIDQOT.js.map +0 -1
- package/dist/chunk-4KG27W2S.js +0 -614
- package/dist/chunk-4KG27W2S.js.map +0 -1
- package/dist/chunk-5QQTYWEU.js +0 -199
- package/dist/chunk-5QQTYWEU.js.map +0 -1
- package/dist/chunk-65DTCCJ7.js +0 -21
- package/dist/chunk-65DTCCJ7.js.map +0 -1
- package/dist/chunk-A5DKHMUN.js +0 -173
- package/dist/chunk-A5DKHMUN.js.map +0 -1
- package/dist/chunk-B63XPWQ4.js +0 -246
- package/dist/chunk-B63XPWQ4.js.map +0 -1
- package/dist/chunk-CAR6FHK6.js +0 -105
- package/dist/chunk-CAR6FHK6.js.map +0 -1
- package/dist/chunk-CPCX67TI.js.map +0 -1
- package/dist/chunk-CQBVCYI2.js +0 -162
- package/dist/chunk-CQBVCYI2.js.map +0 -1
- package/dist/chunk-DBU5CXBV.js +0 -4731
- package/dist/chunk-DBU5CXBV.js.map +0 -1
- package/dist/chunk-DHJD77OW.js +0 -81
- package/dist/chunk-DHJD77OW.js.map +0 -1
- package/dist/chunk-EDZSNPE5.js +0 -35
- package/dist/chunk-EDZSNPE5.js.map +0 -1
- package/dist/chunk-EFWZPUTC.js +0 -65
- package/dist/chunk-EFWZPUTC.js.map +0 -1
- package/dist/chunk-EPFL6CTE.js +0 -448
- package/dist/chunk-EPFL6CTE.js.map +0 -1
- package/dist/chunk-GHLVXVZD.js +0 -142
- package/dist/chunk-GHLVXVZD.js.map +0 -1
- package/dist/chunk-H3SOOJ2I.js +0 -580
- package/dist/chunk-H3SOOJ2I.js.map +0 -1
- package/dist/chunk-HPJGOLTN.js.map +0 -1
- package/dist/chunk-HRGBS2PA.js +0 -203
- package/dist/chunk-HRGBS2PA.js.map +0 -1
- package/dist/chunk-ITUXPJIS.js +0 -314
- package/dist/chunk-ITUXPJIS.js.map +0 -1
- package/dist/chunk-JBIKAAT3.js.map +0 -1
- package/dist/chunk-KAJZHIQ4.js.map +0 -1
- package/dist/chunk-KINZ23CV.js.map +0 -1
- package/dist/chunk-LRYV3SK7.js +0 -235
- package/dist/chunk-LRYV3SK7.js.map +0 -1
- package/dist/chunk-M2O56UK7.js.map +0 -1
- package/dist/chunk-MJZZTKCC.js.map +0 -1
- package/dist/chunk-NIKXHWOL.js.map +0 -1
- package/dist/chunk-OKDRDT74.js +0 -209
- package/dist/chunk-OKDRDT74.js.map +0 -1
- package/dist/chunk-OKYSNAS3.js +0 -2144
- package/dist/chunk-OKYSNAS3.js.map +0 -1
- package/dist/chunk-OLWTRUTS.js.map +0 -1
- package/dist/chunk-QQ6ELLSA.js +0 -143
- package/dist/chunk-QQ6ELLSA.js.map +0 -1
- package/dist/chunk-QZ6ROAJU.js.map +0 -1
- package/dist/chunk-R7RSCBI7.js +0 -794
- package/dist/chunk-R7RSCBI7.js.map +0 -1
- package/dist/chunk-SGK2B724.js +0 -67
- package/dist/chunk-SGK2B724.js.map +0 -1
- package/dist/chunk-U6VPKMGC.js +0 -390
- package/dist/chunk-U6VPKMGC.js.map +0 -1
- package/dist/chunk-UHTVXQ2O.js +0 -140
- package/dist/chunk-UHTVXQ2O.js.map +0 -1
- package/dist/chunk-UO22YNY4.js.map +0 -1
- package/dist/chunk-US456VUI.js +0 -149
- package/dist/chunk-US456VUI.js.map +0 -1
- package/dist/chunk-V44J2MXV.js +0 -400
- package/dist/chunk-V44J2MXV.js.map +0 -1
- package/dist/chunk-VJQKL3YH.js +0 -216
- package/dist/chunk-VJQKL3YH.js.map +0 -1
- package/dist/chunk-VJSQSLBM.js +0 -1442
- package/dist/chunk-VJSQSLBM.js.map +0 -1
- package/dist/chunk-VYOJOX4Z.js.map +0 -1
- package/dist/chunk-WY2K35OL.js +0 -269
- package/dist/chunk-WY2K35OL.js.map +0 -1
- package/dist/chunk-ZFJJ3EXC.js.map +0 -1
- package/dist/chunk-ZOBNS7CX.js.map +0 -1
- package/dist/cli-KKRKBU5T.js.map +0 -1
- package/dist/config-JMRUNYE6.js +0 -37
- package/dist/discover-B5HF6SHM.js +0 -102
- package/dist/discover-B5HF6SHM.js.map +0 -1
- package/dist/doctor-ZBG7X66D.js +0 -32
- package/dist/edit-PZJIILQE.js +0 -40
- package/dist/fund-EUDH5KPA.js +0 -40
- package/dist/inspect-QC6WEQPN.js +0 -37
- package/dist/install-GNK2W3PI.js +0 -972
- package/dist/install-GNK2W3PI.js.map +0 -1
- package/dist/outcome-KSGWZHUS.js +0 -24
- package/dist/pay-BC4UICPA.js +0 -361
- package/dist/pay-BC4UICPA.js.map +0 -1
- package/dist/publish-LXWFDIKF.js +0 -42
- package/dist/read-JMNUQ56P.js +0 -160
- package/dist/read-JMNUQ56P.js.map +0 -1
- package/dist/run-XYTQ5TWQ.js.map +0 -1
- package/dist/search-TSQAB45E.js +0 -25
- package/dist/secp256k1-XRPVBC6V.js.map +0 -1
- package/dist/send-G746D7PQ.js.map +0 -1
- package/dist/session-JBKWMJ24.js +0 -89
- package/dist/session-JBKWMJ24.js.map +0 -1
- package/dist/skill-heal-WKD67SLJ.js +0 -92
- package/dist/skill-heal-WKD67SLJ.js.map +0 -1
- package/dist/skill-placement-RIU4AMC2.js +0 -20
- package/dist/skill-placement-RIU4AMC2.js.map +0 -1
- package/dist/uninstall-5E263VTS.js +0 -73
- package/dist/uninstall-5E263VTS.js.map +0 -1
- package/dist/update-R76LHOZW.js.map +0 -1
- package/dist/usdc-4VCDHFWX.js +0 -38
- package/dist/usdc-4VCDHFWX.js.map +0 -1
- package/dist/viemAdapter-By13KInL-TUQJBMHM.js.map +0 -1
- package/dist/wallet-TQ7D5EQ7.js +0 -41
- package/dist/wallet-TQ7D5EQ7.js.map +0 -1
- package/dist/wallet-ZAVXWLWP.js +0 -32
- package/dist/wallet-ZAVXWLWP.js.map +0 -1
- package/docs/command-reference.md +0 -303
- package/skills/tenjin/SKILL.md +0 -373
- package/skills/tenjin-pay/SKILL.md +0 -76
- package/skills/tenjin-publish/SKILL.md +0 -227
- package/skills/tenjin-publish/references/maintain.md +0 -39
- package/skills/tenjin-search/SKILL.md +0 -154
- package/skills/tenjin-search/references/permissions.md +0 -112
- /package/dist/{_esm-N4KAVXQR.js.map → _esm-CE7KNONL.js.map} +0 -0
- /package/dist/{buy-VIRNSYGN.js.map → ccip-7RMRLAGV.js.map} +0 -0
- /package/dist/{ccip-RPPPKTJR.js.map → ccip-NLCSCHKI.js.map} +0 -0
- /package/dist/{chunk-U5S527PP.js.map → chunk-5IEP5EGE.js.map} +0 -0
- /package/dist/{chunk-KYQVEKP5.js.map → chunk-BPMWXTFX.js.map} +0 -0
- /package/dist/{chunk-S5RYMCV6.js.map → chunk-HPWO4O6S.js.map} +0 -0
- /package/dist/{chunk-W6R3HAAG.js.map → chunk-JRGFKVAZ.js.map} +0 -0
- /package/dist/{chunk-XJN5WUKL.js.map → chunk-KG3D7FIF.js.map} +0 -0
- /package/dist/{chunk-QW2Q2KAH.js.map → chunk-LHHMV4GU.js.map} +0 -0
- /package/dist/{chunk-POJRB2AE.js.map → chunk-POUWHWID.js.map} +0 -0
- /package/dist/{chunk-KZAAWQNP.js.map → chunk-TTNESUPQ.js.map} +0 -0
- /package/dist/{chunk-YLYINX2H.js.map → chunk-XZKD7DIF.js.map} +0 -0
- /package/dist/{ccip-ZGGWQN4X.js.map → config-MXOX7XDR.js.map} +0 -0
- /package/dist/{dist-U4M6QCKE.js.map → dist-3LOO6M4U.js.map} +0 -0
- /package/dist/{config-JMRUNYE6.js.map → ethersCompat-Df4a6QIZ-THAVUGIJ.js.map} +0 -0
- /package/dist/{doctor-ZBG7X66D.js.map → install-XUM2XSHW.js.map} +0 -0
- /package/dist/{edit-PZJIILQE.js.map → paths-P2N4JTDZ.js.map} +0 -0
- /package/dist/{ethersCompat-Df4a6QIZ-WHYKB6HA.js.map → pay-SBXZEPEP.js.map} +0 -0
- /package/dist/{fund-EUDH5KPA.js.map → redact-46ZHF2NH.js.map} +0 -0
- /package/dist/{inspect-QC6WEQPN.js.map → secp256k1-ZZZT2CAX.js.map} +0 -0
- /package/dist/{outcome-KSGWZHUS.js.map → status-line-wiring-BYPHTYZE.js.map} +0 -0
- /package/dist/{publish-LXWFDIKF.js.map → viemAdapter-By13KInL-X2VY6CY3.js.map} +0 -0
- /package/dist/{search-TSQAB45E.js.map → wallet-PWAHVKWW.js.map} +0 -0
|
@@ -17,19 +17,17 @@ import {
|
|
|
17
17
|
hashTypedData,
|
|
18
18
|
keccak256 as keccak2562,
|
|
19
19
|
publicKeyToAddress,
|
|
20
|
+
ripemd160,
|
|
20
21
|
serializeSignature,
|
|
21
22
|
serializeTransaction,
|
|
22
23
|
serializeTypedData,
|
|
23
24
|
toBlobSidecars,
|
|
24
25
|
toRlp,
|
|
25
26
|
validateTypedData
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import {
|
|
28
|
-
ripemd160
|
|
29
|
-
} from "./chunk-UHTVXQ2O.js";
|
|
27
|
+
} from "./chunk-N35E6CM2.js";
|
|
30
28
|
import {
|
|
31
29
|
secp256k1
|
|
32
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JRGFKVAZ.js";
|
|
33
31
|
import {
|
|
34
32
|
AtomicReadyWalletRejectedUpgradeError,
|
|
35
33
|
AtomicityNotSupportedError,
|
|
@@ -87,7 +85,7 @@ import {
|
|
|
87
85
|
erc6492SignatureValidatorAbi,
|
|
88
86
|
erc6492SignatureValidatorByteCode,
|
|
89
87
|
extract,
|
|
90
|
-
formatAbiItem,
|
|
88
|
+
formatAbiItem as formatAbiItem2,
|
|
91
89
|
formatAbiParameters,
|
|
92
90
|
formatTransactionRequest,
|
|
93
91
|
getAbiItem,
|
|
@@ -110,7 +108,7 @@ import {
|
|
|
110
108
|
universalResolverResolveAbi,
|
|
111
109
|
universalResolverReverseAbi,
|
|
112
110
|
withResolvers
|
|
113
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-5IEP5EGE.js";
|
|
114
112
|
import {
|
|
115
113
|
AbiConstructorNotFoundError,
|
|
116
114
|
AbiConstructorParamsNotFoundError,
|
|
@@ -153,17 +151,17 @@ import {
|
|
|
153
151
|
bytesToHex,
|
|
154
152
|
checksumAddress,
|
|
155
153
|
concat,
|
|
156
|
-
|
|
154
|
+
concat2,
|
|
157
155
|
concatHex,
|
|
158
156
|
createCursor,
|
|
159
157
|
encodeAbiParameters,
|
|
160
158
|
etherUnits,
|
|
161
|
-
formatAbiItem
|
|
159
|
+
formatAbiItem,
|
|
162
160
|
formatBlockParameter,
|
|
163
161
|
formatEther,
|
|
164
162
|
formatGwei,
|
|
165
163
|
formatUnits,
|
|
166
|
-
|
|
164
|
+
from,
|
|
167
165
|
fromBoolean,
|
|
168
166
|
fromBytes,
|
|
169
167
|
fromHex2 as fromHex,
|
|
@@ -210,7 +208,7 @@ import {
|
|
|
210
208
|
trimLeft2,
|
|
211
209
|
validate,
|
|
212
210
|
validate2
|
|
213
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-EGELTSPU.js";
|
|
214
212
|
import {
|
|
215
213
|
__export
|
|
216
214
|
} from "./chunk-ZXTAQYNA.js";
|
|
@@ -262,7 +260,7 @@ function encodeEventTopics(parameters) {
|
|
|
262
260
|
}
|
|
263
261
|
if (abiItem.anonymous)
|
|
264
262
|
return topics;
|
|
265
|
-
const definition =
|
|
263
|
+
const definition = formatAbiItem(abiItem);
|
|
266
264
|
const signature = toEventSelector(definition);
|
|
267
265
|
return [signature, ...topics];
|
|
268
266
|
}
|
|
@@ -350,7 +348,7 @@ function getContractError(err, { abi: abi2, address, args, docsPath: docsPath4,
|
|
|
350
348
|
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
|
|
351
349
|
async function recoverPublicKey({ hash: hash2, signature }) {
|
|
352
350
|
const hashHex = isHex(hash2) ? hash2 : toHex(hash2);
|
|
353
|
-
const { secp256k1: secp256k12 } = await import("./secp256k1-
|
|
351
|
+
const { secp256k1: secp256k12 } = await import("./secp256k1-ZZZT2CAX.js");
|
|
354
352
|
const signature_ = (() => {
|
|
355
353
|
if (typeof signature === "object" && "r" in signature && "s" in signature) {
|
|
356
354
|
const { r, s, v, yParity } = signature;
|
|
@@ -1166,7 +1164,7 @@ function decodeEventLog(parameters) {
|
|
|
1166
1164
|
const [signature, ...argTopics] = topics;
|
|
1167
1165
|
if (!signature)
|
|
1168
1166
|
throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath2 });
|
|
1169
|
-
const abiItem = abi2.find((x) => x.type === "event" && signature === toEventSelector(
|
|
1167
|
+
const abiItem = abi2.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem(x)));
|
|
1170
1168
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
1171
1169
|
throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath2 });
|
|
1172
1170
|
const { name, inputs } = abiItem;
|
|
@@ -4537,9 +4535,9 @@ function assert(publicKey, options = {}) {
|
|
|
4537
4535
|
}
|
|
4538
4536
|
function from2(value) {
|
|
4539
4537
|
const publicKey = (() => {
|
|
4540
|
-
if (validate2(value))
|
|
4541
|
-
return fromHex2(value);
|
|
4542
4538
|
if (validate(value))
|
|
4539
|
+
return fromHex2(value);
|
|
4540
|
+
if (validate2(value))
|
|
4543
4541
|
return fromBytes2(value);
|
|
4544
4542
|
const { prefix, x, y } = value;
|
|
4545
4543
|
if (typeof x === "bigint" && typeof y === "bigint")
|
|
@@ -4556,8 +4554,8 @@ function fromHex2(publicKey) {
|
|
|
4556
4554
|
if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)
|
|
4557
4555
|
throw new InvalidSerializedSizeError({ publicKey });
|
|
4558
4556
|
if (publicKey.length === 130) {
|
|
4559
|
-
const x2 = BigInt(
|
|
4560
|
-
const y = BigInt(
|
|
4557
|
+
const x2 = BigInt(slice2(publicKey, 0, 32));
|
|
4558
|
+
const y = BigInt(slice2(publicKey, 32, 64));
|
|
4561
4559
|
return {
|
|
4562
4560
|
prefix: 4,
|
|
4563
4561
|
x: x2,
|
|
@@ -4565,17 +4563,17 @@ function fromHex2(publicKey) {
|
|
|
4565
4563
|
};
|
|
4566
4564
|
}
|
|
4567
4565
|
if (publicKey.length === 132) {
|
|
4568
|
-
const prefix2 = Number(
|
|
4569
|
-
const x2 = BigInt(
|
|
4570
|
-
const y = BigInt(
|
|
4566
|
+
const prefix2 = Number(slice2(publicKey, 0, 1));
|
|
4567
|
+
const x2 = BigInt(slice2(publicKey, 1, 33));
|
|
4568
|
+
const y = BigInt(slice2(publicKey, 33, 65));
|
|
4571
4569
|
return {
|
|
4572
4570
|
prefix: prefix2,
|
|
4573
4571
|
x: x2,
|
|
4574
4572
|
y
|
|
4575
4573
|
};
|
|
4576
4574
|
}
|
|
4577
|
-
const prefix = Number(
|
|
4578
|
-
const x = BigInt(
|
|
4575
|
+
const prefix = Number(slice2(publicKey, 0, 1));
|
|
4576
|
+
const x = BigInt(slice2(publicKey, 1, 33));
|
|
4579
4577
|
return {
|
|
4580
4578
|
prefix,
|
|
4581
4579
|
x
|
|
@@ -4650,7 +4648,7 @@ var InvalidSerializedSizeError = class extends BaseError2 {
|
|
|
4650
4648
|
super(`Value \`${publicKey}\` is an invalid public key size.`, {
|
|
4651
4649
|
metaMessages: [
|
|
4652
4650
|
"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",
|
|
4653
|
-
`Received ${
|
|
4651
|
+
`Received ${size2(from(publicKey))} bytes.`
|
|
4654
4652
|
]
|
|
4655
4653
|
});
|
|
4656
4654
|
Object.defineProperty(this, "name", {
|
|
@@ -4686,7 +4684,7 @@ function checksum2(address) {
|
|
|
4686
4684
|
return checksum.get(address);
|
|
4687
4685
|
assert2(address, { strict: false });
|
|
4688
4686
|
const hexAddress = address.substring(2).toLowerCase();
|
|
4689
|
-
const hash2 = keccak2562(
|
|
4687
|
+
const hash2 = keccak2562(fromString2(hexAddress), { as: "Bytes" });
|
|
4690
4688
|
const characters = hexAddress.split("");
|
|
4691
4689
|
for (let i = 0; i < 40; i += 2) {
|
|
4692
4690
|
if (hash2[i >> 1] >> 4 >= 8 && characters[i]) {
|
|
@@ -4888,16 +4886,16 @@ function decodeAddress2(cursor, options = {}) {
|
|
|
4888
4886
|
const { checksum: checksum3 = false } = options;
|
|
4889
4887
|
const value = cursor.readBytes(32);
|
|
4890
4888
|
const wrap3 = (address) => checksum3 ? checksum2(address) : address;
|
|
4891
|
-
return [wrap3(fromBytes(
|
|
4889
|
+
return [wrap3(fromBytes(slice3(value, -20))), 32];
|
|
4892
4890
|
}
|
|
4893
4891
|
function decodeArray(cursor, param, options) {
|
|
4894
4892
|
const { checksumAddress: checksumAddress2, length, staticPosition } = options;
|
|
4895
4893
|
if (!length) {
|
|
4896
|
-
const offset =
|
|
4894
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
4897
4895
|
const start = staticPosition + offset;
|
|
4898
4896
|
const startOfData = start + sizeOfLength;
|
|
4899
4897
|
cursor.setPosition(start);
|
|
4900
|
-
const length2 =
|
|
4898
|
+
const length2 = toNumber2(cursor.readBytes(sizeOfLength));
|
|
4901
4899
|
const dynamicChild = hasDynamicChild(param);
|
|
4902
4900
|
let consumed2 = 0;
|
|
4903
4901
|
const value2 = [];
|
|
@@ -4914,7 +4912,7 @@ function decodeArray(cursor, param, options) {
|
|
|
4914
4912
|
return [value2, 32];
|
|
4915
4913
|
}
|
|
4916
4914
|
if (hasDynamicChild(param)) {
|
|
4917
|
-
const offset =
|
|
4915
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
4918
4916
|
const start = staticPosition + offset;
|
|
4919
4917
|
const value2 = [];
|
|
4920
4918
|
for (let i = 0; i < length; ++i) {
|
|
@@ -4946,9 +4944,9 @@ function decodeBool(cursor) {
|
|
|
4946
4944
|
function decodeBytes(cursor, param, { staticPosition }) {
|
|
4947
4945
|
const [_, size5] = param.type.split("bytes");
|
|
4948
4946
|
if (!size5) {
|
|
4949
|
-
const offset =
|
|
4947
|
+
const offset = toNumber2(cursor.readBytes(32));
|
|
4950
4948
|
cursor.setPosition(staticPosition + offset);
|
|
4951
|
-
const length =
|
|
4949
|
+
const length = toNumber2(cursor.readBytes(32));
|
|
4952
4950
|
if (length === 0) {
|
|
4953
4951
|
cursor.setPosition(staticPosition + 32);
|
|
4954
4952
|
return ["0x", 32];
|
|
@@ -4965,7 +4963,7 @@ function decodeNumber(cursor, param) {
|
|
|
4965
4963
|
const size5 = Number.parseInt(param.type.split("int")[1] || "256", 10);
|
|
4966
4964
|
const value = cursor.readBytes(32);
|
|
4967
4965
|
return [
|
|
4968
|
-
size5 > 48 ? toBigInt(value, { signed }) :
|
|
4966
|
+
size5 > 48 ? toBigInt(value, { signed }) : toNumber2(value, { signed }),
|
|
4969
4967
|
32
|
|
4970
4968
|
];
|
|
4971
4969
|
}
|
|
@@ -4975,7 +4973,7 @@ function decodeTuple(cursor, param, options) {
|
|
|
4975
4973
|
const value = hasUnnamedChild ? [] : {};
|
|
4976
4974
|
let consumed = 0;
|
|
4977
4975
|
if (hasDynamicChild(param)) {
|
|
4978
|
-
const offset =
|
|
4976
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
4979
4977
|
const start = staticPosition + offset;
|
|
4980
4978
|
for (let i = 0; i < param.components.length; ++i) {
|
|
4981
4979
|
const component = param.components[i];
|
|
@@ -5002,16 +5000,16 @@ function decodeTuple(cursor, param, options) {
|
|
|
5002
5000
|
return [value, consumed];
|
|
5003
5001
|
}
|
|
5004
5002
|
function decodeString(cursor, { staticPosition }) {
|
|
5005
|
-
const offset =
|
|
5003
|
+
const offset = toNumber2(cursor.readBytes(32));
|
|
5006
5004
|
const start = staticPosition + offset;
|
|
5007
5005
|
cursor.setPosition(start);
|
|
5008
|
-
const length =
|
|
5006
|
+
const length = toNumber2(cursor.readBytes(32));
|
|
5009
5007
|
if (length === 0) {
|
|
5010
5008
|
cursor.setPosition(staticPosition + 32);
|
|
5011
5009
|
return ["", 32];
|
|
5012
5010
|
}
|
|
5013
5011
|
const data = cursor.readBytes(length, 32);
|
|
5014
|
-
const value = toString(
|
|
5012
|
+
const value = toString(trimLeft2(data));
|
|
5015
5013
|
cursor.setPosition(staticPosition + 32);
|
|
5016
5014
|
return [value, 32];
|
|
5017
5015
|
}
|
|
@@ -5077,7 +5075,7 @@ function encode2(preparedParameters) {
|
|
|
5077
5075
|
if (dynamic)
|
|
5078
5076
|
staticSize += 32;
|
|
5079
5077
|
else
|
|
5080
|
-
staticSize +=
|
|
5078
|
+
staticSize += size2(encoded);
|
|
5081
5079
|
}
|
|
5082
5080
|
const staticParameters = [];
|
|
5083
5081
|
const dynamicParameters = [];
|
|
@@ -5087,7 +5085,7 @@ function encode2(preparedParameters) {
|
|
|
5087
5085
|
if (dynamic) {
|
|
5088
5086
|
staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));
|
|
5089
5087
|
dynamicParameters.push(encoded);
|
|
5090
|
-
dynamicSize +=
|
|
5088
|
+
dynamicSize += size2(encoded);
|
|
5091
5089
|
} else {
|
|
5092
5090
|
staticParameters.push(encoded);
|
|
5093
5091
|
}
|
|
@@ -5144,7 +5142,7 @@ function encodeArray(value, options) {
|
|
|
5144
5142
|
}
|
|
5145
5143
|
function encodeBytes(value, { type }) {
|
|
5146
5144
|
const [, parametersize] = type.split("bytes");
|
|
5147
|
-
const bytesSize =
|
|
5145
|
+
const bytesSize = size2(value);
|
|
5148
5146
|
if (!parametersize) {
|
|
5149
5147
|
let value_ = value;
|
|
5150
5148
|
if (bytesSize % 32 !== 0)
|
|
@@ -5188,15 +5186,15 @@ function encodeNumber(value, { signed, size: size5 }) {
|
|
|
5188
5186
|
};
|
|
5189
5187
|
}
|
|
5190
5188
|
function encodeString(value) {
|
|
5191
|
-
const hexValue =
|
|
5192
|
-
const partsLength = Math.ceil(
|
|
5189
|
+
const hexValue = fromString(value);
|
|
5190
|
+
const partsLength = Math.ceil(size2(hexValue) / 32);
|
|
5193
5191
|
const parts = [];
|
|
5194
5192
|
for (let i = 0; i < partsLength; i++) {
|
|
5195
|
-
parts.push(padRight(
|
|
5193
|
+
parts.push(padRight(slice2(hexValue, i * 32, (i + 1) * 32)));
|
|
5196
5194
|
}
|
|
5197
5195
|
return {
|
|
5198
5196
|
dynamic: true,
|
|
5199
|
-
encoded: concat2(padRight(fromNumber(
|
|
5197
|
+
encoded: concat2(padRight(fromNumber(size2(hexValue), { size: 32 })), ...parts)
|
|
5200
5198
|
};
|
|
5201
5199
|
}
|
|
5202
5200
|
function encodeTuple(value, options) {
|
|
@@ -5453,13 +5451,13 @@ function decode(parameters, data, options = {}) {
|
|
|
5453
5451
|
const { as = "Array", checksumAddress: checksumAddress2 = false } = options;
|
|
5454
5452
|
const bytes = typeof data === "string" ? fromHex(data) : data;
|
|
5455
5453
|
const cursor = create(bytes);
|
|
5456
|
-
if (
|
|
5454
|
+
if (size3(bytes) === 0 && parameters.length > 0)
|
|
5457
5455
|
throw new ZeroDataError();
|
|
5458
|
-
if (
|
|
5456
|
+
if (size3(bytes) && size3(bytes) < 32)
|
|
5459
5457
|
throw new DataSizeTooSmallError({
|
|
5460
5458
|
data: typeof data === "string" ? data : fromBytes(data),
|
|
5461
5459
|
parameters,
|
|
5462
|
-
size:
|
|
5460
|
+
size: size3(bytes)
|
|
5463
5461
|
});
|
|
5464
5462
|
let consumed = 0;
|
|
5465
5463
|
const values = as === "Array" ? [] : {};
|
|
@@ -5517,7 +5515,7 @@ function encodePacked2(types, values) {
|
|
|
5517
5515
|
return padLeft(address.toLowerCase(), isArray ? 32 : 0);
|
|
5518
5516
|
}
|
|
5519
5517
|
if (type === "string")
|
|
5520
|
-
return
|
|
5518
|
+
return fromString(value);
|
|
5521
5519
|
if (type === "bytes")
|
|
5522
5520
|
return value;
|
|
5523
5521
|
if (type === "bool")
|
|
@@ -5603,7 +5601,7 @@ var ArrayLengthMismatchError = class extends BaseError2 {
|
|
|
5603
5601
|
};
|
|
5604
5602
|
var BytesSizeMismatchError2 = class extends BaseError2 {
|
|
5605
5603
|
constructor({ expectedSize, value }) {
|
|
5606
|
-
super(`Size of bytes "${value}" (bytes${
|
|
5604
|
+
super(`Size of bytes "${value}" (bytes${size2(value)}) does not match expected size (bytes${expectedSize}).`);
|
|
5607
5605
|
Object.defineProperty(this, "name", {
|
|
5608
5606
|
enumerable: true,
|
|
5609
5607
|
configurable: true,
|
|
@@ -5766,8 +5764,8 @@ function fromBytes3(signature) {
|
|
|
5766
5764
|
function fromHex4(signature) {
|
|
5767
5765
|
if (signature.length !== 130 && signature.length !== 132)
|
|
5768
5766
|
throw new InvalidSerializedSizeError2({ signature });
|
|
5769
|
-
const r = BigInt(
|
|
5770
|
-
const s = BigInt(
|
|
5767
|
+
const r = BigInt(slice2(signature, 0, 32));
|
|
5768
|
+
const s = BigInt(slice2(signature, 32, 64));
|
|
5771
5769
|
const yParity = (() => {
|
|
5772
5770
|
const yParity2 = Number(`0x${signature.slice(130)}`);
|
|
5773
5771
|
if (Number.isNaN(yParity2))
|
|
@@ -5842,8 +5840,8 @@ function toTuple(signature) {
|
|
|
5842
5840
|
const { r, s, yParity } = signature;
|
|
5843
5841
|
return [
|
|
5844
5842
|
yParity ? "0x01" : "0x",
|
|
5845
|
-
r === 0n ? "0x" :
|
|
5846
|
-
s === 0n ? "0x" :
|
|
5843
|
+
r === 0n ? "0x" : trimLeft(fromNumber(r)),
|
|
5844
|
+
s === 0n ? "0x" : trimLeft(fromNumber(s))
|
|
5847
5845
|
];
|
|
5848
5846
|
}
|
|
5849
5847
|
function vToYParity(v) {
|
|
@@ -5860,7 +5858,7 @@ var InvalidSerializedSizeError2 = class extends BaseError2 {
|
|
|
5860
5858
|
super(`Value \`${signature}\` is an invalid signature size.`, {
|
|
5861
5859
|
metaMessages: [
|
|
5862
5860
|
"Expected: 64 bytes or 65 bytes.",
|
|
5863
|
-
`Received ${
|
|
5861
|
+
`Received ${size2(from(signature))} bytes.`
|
|
5864
5862
|
]
|
|
5865
5863
|
});
|
|
5866
5864
|
Object.defineProperty(this, "name", {
|
|
@@ -5982,7 +5980,7 @@ var magicBytes = "0x801080108010801080108010801080108010801080108010801080108010
|
|
|
5982
5980
|
var suffixParameters = from4("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
|
|
5983
5981
|
function assert4(value) {
|
|
5984
5982
|
if (typeof value === "string") {
|
|
5985
|
-
if (
|
|
5983
|
+
if (slice2(value, -32) !== magicBytes)
|
|
5986
5984
|
throw new InvalidWrappedSignatureError(value);
|
|
5987
5985
|
} else
|
|
5988
5986
|
assert3(value.authorization);
|
|
@@ -5994,9 +5992,9 @@ function from8(value) {
|
|
|
5994
5992
|
}
|
|
5995
5993
|
function unwrap(wrapped) {
|
|
5996
5994
|
assert4(wrapped);
|
|
5997
|
-
const suffixLength =
|
|
5998
|
-
const suffix =
|
|
5999
|
-
const signature =
|
|
5995
|
+
const suffixLength = toNumber(slice2(wrapped, -64, -32));
|
|
5996
|
+
const suffix = slice2(wrapped, -suffixLength - 64, -64);
|
|
5997
|
+
const signature = slice2(wrapped, 0, -suffixLength - 64);
|
|
6000
5998
|
const [auth, to, data] = decode(suffixParameters, suffix);
|
|
6001
5999
|
const authorization = from7({
|
|
6002
6000
|
address: auth.delegation,
|
|
@@ -6028,7 +6026,7 @@ function wrap(value) {
|
|
|
6028
6026
|
value.to ?? self,
|
|
6029
6027
|
data ?? "0x"
|
|
6030
6028
|
]);
|
|
6031
|
-
const suffixLength = fromNumber(
|
|
6029
|
+
const suffixLength = fromNumber(size2(suffix), { size: 32 });
|
|
6032
6030
|
return concat2(signature, suffix, suffixLength, magicBytes);
|
|
6033
6031
|
}
|
|
6034
6032
|
function validate4(value) {
|
|
@@ -7002,11 +7000,11 @@ function from9(abiItem, options = {}) {
|
|
|
7002
7000
|
}
|
|
7003
7001
|
function fromAbi(abi2, name, options) {
|
|
7004
7002
|
const { args = [], prepare = true } = options ?? {};
|
|
7005
|
-
const isSelector =
|
|
7003
|
+
const isSelector = validate(name, { strict: false });
|
|
7006
7004
|
const abiItems = abi2.filter((abiItem2) => {
|
|
7007
7005
|
if (isSelector) {
|
|
7008
7006
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
7009
|
-
return getSelector(abiItem2) ===
|
|
7007
|
+
return getSelector(abiItem2) === slice2(name, 0, 4);
|
|
7010
7008
|
if (abiItem2.type === "event")
|
|
7011
7009
|
return getSignatureHash(abiItem2) === name;
|
|
7012
7010
|
return false;
|
|
@@ -7080,7 +7078,7 @@ function getSelector(...parameters) {
|
|
|
7080
7078
|
}
|
|
7081
7079
|
return parameters[0];
|
|
7082
7080
|
})();
|
|
7083
|
-
return
|
|
7081
|
+
return slice2(getSignatureHash(abiItem), 0, 4);
|
|
7084
7082
|
}
|
|
7085
7083
|
function getSignature(...parameters) {
|
|
7086
7084
|
const abiItem = (() => {
|
|
@@ -7093,7 +7091,7 @@ function getSignature(...parameters) {
|
|
|
7093
7091
|
const signature = (() => {
|
|
7094
7092
|
if (typeof abiItem === "string")
|
|
7095
7093
|
return abiItem;
|
|
7096
|
-
return
|
|
7094
|
+
return formatAbiItem2(abiItem);
|
|
7097
7095
|
})();
|
|
7098
7096
|
return normalizeSignature(signature);
|
|
7099
7097
|
}
|
|
@@ -7107,15 +7105,15 @@ function getSignatureHash(...parameters) {
|
|
|
7107
7105
|
})();
|
|
7108
7106
|
if (typeof abiItem !== "string" && "hash" in abiItem && abiItem.hash)
|
|
7109
7107
|
return abiItem.hash;
|
|
7110
|
-
return keccak2562(
|
|
7108
|
+
return keccak2562(fromString(getSignature(abiItem)));
|
|
7111
7109
|
}
|
|
7112
7110
|
var AmbiguityError = class extends BaseError2 {
|
|
7113
7111
|
constructor(x, y) {
|
|
7114
7112
|
super("Found ambiguous types in overloaded ABI Items.", {
|
|
7115
7113
|
metaMessages: [
|
|
7116
7114
|
// TODO: abitype to add support for signature-formatted ABI items.
|
|
7117
|
-
`\`${x.type}\` in \`${normalizeSignature(
|
|
7118
|
-
`\`${y.type}\` in \`${normalizeSignature(
|
|
7115
|
+
`\`${x.type}\` in \`${normalizeSignature(formatAbiItem2(x.abiItem))}\`, and`,
|
|
7116
|
+
`\`${y.type}\` in \`${normalizeSignature(formatAbiItem2(y.abiItem))}\``,
|
|
7119
7117
|
"",
|
|
7120
7118
|
"These types encode differently and cannot be distinguished at runtime.",
|
|
7121
7119
|
"Remove one of the ambiguous items in the ABI."
|
|
@@ -7462,7 +7460,7 @@ var universalSignatureValidatorAbi = [
|
|
|
7462
7460
|
}
|
|
7463
7461
|
];
|
|
7464
7462
|
function assert5(wrapped) {
|
|
7465
|
-
if (
|
|
7463
|
+
if (slice2(wrapped, -32) !== magicBytes2)
|
|
7466
7464
|
throw new InvalidWrappedSignatureError2(wrapped);
|
|
7467
7465
|
}
|
|
7468
7466
|
function from12(wrapped) {
|
|
@@ -10302,4 +10300,4 @@ export {
|
|
|
10302
10300
|
serializeCompactSignature,
|
|
10303
10301
|
signatureToCompactSignature
|
|
10304
10302
|
};
|
|
10305
|
-
//# sourceMappingURL=chunk-
|
|
10303
|
+
//# sourceMappingURL=chunk-AWQPGIR6.js.map
|