@aptos-labs/ts-sdk 1.14.0-zeta.0 → 1.14.0-zeta.1
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/common/{accountAddress-NPQwRmxn.d.ts → accountAddress-u9wEan9p.d.ts} +32 -4
- package/dist/common/chunk-QRI7EC4T.js +24 -0
- package/dist/common/chunk-QRI7EC4T.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +245 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +290 -171
- package/dist/common/index.js +11786 -374
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/Account.mjs +55 -1
- package/dist/esm/account/Ed25519Account.mjs +53 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +38 -5
- package/dist/esm/account/EphemeralKeyPair.mjs +36 -1
- package/dist/esm/account/KeylessAccount.d.mts +75 -37
- package/dist/esm/account/KeylessAccount.mjs +56 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +4 -0
- package/dist/esm/account/MultiKeyAccount.mjs +55 -1
- package/dist/esm/account/SingleKeyAccount.mjs +53 -1
- package/dist/esm/account/index.d.mts +2 -1
- package/dist/esm/account/index.mjs +76 -1
- package/dist/esm/api/account.mjs +76 -1
- package/dist/esm/api/ans.mjs +87 -1
- package/dist/esm/api/aptos.d.mts +1 -0
- package/dist/esm/api/aptos.mjs +116 -1
- package/dist/esm/api/aptosConfig.mjs +9 -1
- package/dist/esm/api/coin.mjs +86 -1
- package/dist/esm/api/digitalAsset.mjs +87 -1
- package/dist/esm/api/event.mjs +54 -1
- package/dist/esm/api/faucet.mjs +53 -1
- package/dist/esm/api/fungibleAsset.mjs +87 -1
- package/dist/esm/api/general.mjs +84 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +120 -1
- package/dist/esm/api/keyless.d.mts +19 -5
- package/dist/esm/api/keyless.mjs +70 -1
- package/dist/esm/api/staking.mjs +54 -1
- package/dist/esm/api/transaction.mjs +94 -1
- package/dist/esm/api/transactionSubmission/build.mjs +85 -1
- package/dist/esm/api/transactionSubmission/helpers.mjs +9 -1
- package/dist/esm/api/transactionSubmission/management.mjs +89 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +109 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +86 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +86 -1
- package/dist/esm/api/utils.mjs +34 -1
- package/dist/esm/bcs/consts.mjs +17 -1
- package/dist/esm/bcs/deserializer.d.mts +26 -0
- package/dist/esm/bcs/deserializer.mjs +8 -1
- package/dist/esm/bcs/index.mjs +57 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +12 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +11 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +25 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +18 -1
- package/dist/esm/bcs/serializer.mjs +18 -1
- package/dist/esm/chunk-2JOCR2VL.mjs +32 -0
- package/dist/esm/chunk-2JOCR2VL.mjs.map +1 -0
- package/dist/esm/chunk-2OQW7BMN.mjs +129 -0
- package/dist/esm/{chunk-7WJTKYRG.mjs.map → chunk-2OQW7BMN.mjs.map} +1 -1
- package/dist/esm/chunk-2TJJWII2.mjs +23 -0
- package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-2TJJWII2.mjs.map} +1 -1
- package/dist/esm/chunk-2ZEGJU43.mjs +252 -0
- package/dist/esm/{chunk-KWNBC5MF.mjs.map → chunk-2ZEGJU43.mjs.map} +1 -1
- package/dist/esm/chunk-4OYYOYSO.mjs +336 -0
- package/dist/esm/chunk-4OYYOYSO.mjs.map +1 -0
- package/dist/esm/{chunk-S4SEFF4K.mjs → chunk-4PJ5FYGQ.mjs} +302 -27
- package/dist/esm/{chunk-S4SEFF4K.mjs.map → chunk-4PJ5FYGQ.mjs.map} +1 -1
- package/dist/esm/chunk-55NODGHC.mjs +135 -0
- package/dist/esm/{chunk-G4XSNSOT.mjs.map → chunk-55NODGHC.mjs.map} +1 -1
- package/dist/esm/chunk-6LRQSBRH.mjs +130 -0
- package/dist/esm/{chunk-C5UVSNZW.mjs.map → chunk-6LRQSBRH.mjs.map} +1 -1
- package/dist/esm/chunk-6MSZMIFW.mjs +23 -0
- package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-6MSZMIFW.mjs.map} +1 -1
- package/dist/esm/chunk-76TSTAU4.mjs +120 -0
- package/dist/esm/{chunk-FLYEALDB.mjs.map → chunk-76TSTAU4.mjs.map} +1 -1
- package/dist/esm/chunk-7FO3S6IZ.mjs +324 -0
- package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-7FO3S6IZ.mjs.map} +1 -1
- package/dist/esm/chunk-7FUHWL6A.mjs +42 -0
- package/dist/esm/{chunk-SRPTQ4VV.mjs.map → chunk-7FUHWL6A.mjs.map} +1 -1
- package/dist/esm/chunk-7IDBB4J4.mjs +33 -0
- package/dist/esm/{chunk-PINF6ZWP.mjs.map → chunk-7IDBB4J4.mjs.map} +1 -1
- package/dist/esm/chunk-7JRMOHBP.mjs +247 -0
- package/dist/esm/chunk-7JRMOHBP.mjs.map +1 -0
- package/dist/esm/chunk-7REUIYF4.mjs +63 -0
- package/dist/esm/chunk-7REUIYF4.mjs.map +1 -0
- package/dist/esm/chunk-AC3OGAL6.mjs +87 -0
- package/dist/esm/{chunk-U6Z4FNB7.mjs.map → chunk-AC3OGAL6.mjs.map} +1 -1
- package/dist/esm/chunk-AR7X6GWQ.mjs +356 -0
- package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-AR7X6GWQ.mjs.map} +1 -1
- package/dist/esm/chunk-ASF2VWOX.mjs +142 -0
- package/dist/esm/{chunk-O34EOOVF.mjs.map → chunk-ASF2VWOX.mjs.map} +1 -1
- package/dist/esm/chunk-ATVFVXR6.mjs +43 -0
- package/dist/esm/{chunk-IXYXFDJZ.mjs.map → chunk-ATVFVXR6.mjs.map} +1 -1
- package/dist/esm/chunk-B5S6DDUD.mjs +120 -0
- package/dist/esm/chunk-B5S6DDUD.mjs.map +1 -0
- package/dist/esm/chunk-BXMHDQHW.mjs +512 -0
- package/dist/esm/{chunk-DLTC6PJP.mjs.map → chunk-BXMHDQHW.mjs.map} +1 -1
- package/dist/esm/chunk-CC4DQ6NH.mjs +19 -0
- package/dist/esm/{chunk-H3TFQ7K4.mjs.map → chunk-CC4DQ6NH.mjs.map} +1 -1
- package/dist/esm/chunk-CMNJG4NN.mjs +345 -0
- package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-CMNJG4NN.mjs.map} +1 -1
- package/dist/esm/chunk-CTJSZT5V.mjs +87 -0
- package/dist/esm/{chunk-J7J7ZTBF.mjs.map → chunk-CTJSZT5V.mjs.map} +1 -1
- package/dist/esm/chunk-CX3NAVRD.mjs +205 -0
- package/dist/esm/chunk-CX3NAVRD.mjs.map +1 -0
- package/dist/esm/chunk-CXUGZXED.mjs +307 -0
- package/dist/esm/{chunk-EKABTHUZ.mjs.map → chunk-CXUGZXED.mjs.map} +1 -1
- package/dist/esm/chunk-D2BVBXWO.mjs +7 -0
- package/dist/esm/{chunk-7PSX4LCV.mjs.map → chunk-D2BVBXWO.mjs.map} +1 -1
- package/dist/esm/chunk-DGV7DYU4.mjs +413 -0
- package/dist/esm/{chunk-7Q2NVO5M.mjs.map → chunk-DGV7DYU4.mjs.map} +1 -1
- package/dist/esm/chunk-DIYZRGR6.mjs +242 -0
- package/dist/esm/{chunk-UVOU6BW2.mjs.map → chunk-DIYZRGR6.mjs.map} +1 -1
- package/dist/esm/chunk-DNPMS2OF.mjs +236 -0
- package/dist/esm/{chunk-PFFAQZHT.mjs.map → chunk-DNPMS2OF.mjs.map} +1 -1
- package/dist/esm/chunk-DVPQGCFT.mjs +74 -0
- package/dist/esm/{chunk-RBPGL6YB.mjs.map → chunk-DVPQGCFT.mjs.map} +1 -1
- package/dist/esm/chunk-EYHRMZPO.mjs +34 -0
- package/dist/esm/{chunk-AH44UPM4.mjs.map → chunk-EYHRMZPO.mjs.map} +1 -1
- package/dist/esm/chunk-F2ZWA7B7.mjs +412 -0
- package/dist/esm/{chunk-RTSEMQCK.mjs.map → chunk-F2ZWA7B7.mjs.map} +1 -1
- package/dist/esm/chunk-FDWJNY4U.mjs +22 -0
- package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-FDWJNY4U.mjs.map} +1 -1
- package/dist/esm/chunk-FF4JPDKD.mjs +315 -0
- package/dist/esm/{chunk-5DW2AJPI.mjs.map → chunk-FF4JPDKD.mjs.map} +1 -1
- package/dist/esm/chunk-FQQW55X7.mjs +288 -0
- package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-FQQW55X7.mjs.map} +1 -1
- package/dist/esm/chunk-FXKSE3ZP.mjs +25 -0
- package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-FXKSE3ZP.mjs.map} +1 -1
- package/dist/esm/chunk-GBEVD2VM.mjs +99 -0
- package/dist/esm/chunk-GBEVD2VM.mjs.map +1 -0
- package/dist/esm/chunk-GGMTQAQP.mjs +11 -0
- package/dist/esm/{chunk-3JPVQHOR.mjs.map → chunk-GGMTQAQP.mjs.map} +1 -1
- package/dist/esm/chunk-GSVQ6EUD.mjs +649 -0
- package/dist/esm/{chunk-WOLIXKOK.mjs.map → chunk-GSVQ6EUD.mjs.map} +1 -1
- package/dist/esm/chunk-HBNSRCZN.mjs +100 -0
- package/dist/esm/{chunk-FKSACFCB.mjs.map → chunk-HBNSRCZN.mjs.map} +1 -1
- package/dist/esm/chunk-IC56GQFJ.mjs +127 -0
- package/dist/esm/{chunk-XN4SQWI5.mjs.map → chunk-IC56GQFJ.mjs.map} +1 -1
- package/dist/esm/chunk-IHNPN5CQ.mjs +256 -0
- package/dist/esm/chunk-IHNPN5CQ.mjs.map +1 -0
- package/dist/esm/chunk-JHDHNGJ3.mjs +126 -0
- package/dist/esm/{chunk-JVKMQ64G.mjs.map → chunk-JHDHNGJ3.mjs.map} +1 -1
- package/dist/esm/chunk-JL2JHVS4.mjs +49 -0
- package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-JL2JHVS4.mjs.map} +1 -1
- package/dist/esm/chunk-JV3GSIJW.mjs +268 -0
- package/dist/esm/chunk-JV3GSIJW.mjs.map +1 -0
- package/dist/esm/chunk-KK2BSALW.mjs +32 -0
- package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-KK2BSALW.mjs.map} +1 -1
- package/dist/esm/chunk-KMXSRHJ6.mjs +93 -0
- package/dist/esm/{chunk-NMECYE3D.mjs.map → chunk-KMXSRHJ6.mjs.map} +1 -1
- package/dist/esm/chunk-KVSQ57HU.mjs +45 -0
- package/dist/esm/{chunk-NNW6HWIO.mjs.map → chunk-KVSQ57HU.mjs.map} +1 -1
- package/dist/esm/chunk-LI2QV6RU.mjs +129 -0
- package/dist/esm/chunk-LI2QV6RU.mjs.map +1 -0
- package/dist/esm/chunk-LLLQJWRZ.mjs +35 -0
- package/dist/esm/{chunk-QNHDS64I.mjs.map → chunk-LLLQJWRZ.mjs.map} +1 -1
- package/dist/esm/chunk-LYK4TQZO.mjs +70 -0
- package/dist/esm/{chunk-OZC3FCJP.mjs.map → chunk-LYK4TQZO.mjs.map} +1 -1
- package/dist/esm/chunk-LYMY63SO.mjs +124 -0
- package/dist/esm/{chunk-UGIJHLL3.mjs.map → chunk-LYMY63SO.mjs.map} +1 -1
- package/dist/esm/chunk-MZZLEY6O.mjs +92 -0
- package/dist/esm/{chunk-NKCZ4KGO.mjs.map → chunk-MZZLEY6O.mjs.map} +1 -1
- package/dist/esm/chunk-N4WKFNQ6.mjs +156 -0
- package/dist/esm/{chunk-LDQ6JFEF.mjs.map → chunk-N4WKFNQ6.mjs.map} +1 -1
- package/dist/esm/chunk-NFJCQRVK.mjs +37 -0
- package/dist/esm/{chunk-YE5B2S5L.mjs.map → chunk-NFJCQRVK.mjs.map} +1 -1
- package/dist/esm/chunk-NMKCJNQM.mjs +20 -0
- package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-NMKCJNQM.mjs.map} +1 -1
- package/dist/esm/chunk-NW45SCPY.mjs +36 -0
- package/dist/esm/{chunk-V7P6MLSY.mjs.map → chunk-NW45SCPY.mjs.map} +1 -1
- package/dist/esm/chunk-NXFO2W4G.mjs +84 -0
- package/dist/esm/{chunk-D22EMNIY.mjs.map → chunk-NXFO2W4G.mjs.map} +1 -1
- package/dist/esm/chunk-NYL77J4X.mjs +97 -0
- package/dist/esm/{chunk-43WARVT3.mjs.map → chunk-NYL77J4X.mjs.map} +1 -1
- package/dist/esm/chunk-O6PSHSN3.mjs +53 -0
- package/dist/esm/{chunk-6LOTZ4GY.mjs.map → chunk-O6PSHSN3.mjs.map} +1 -1
- package/dist/esm/chunk-OR7TEZ25.mjs +16 -0
- package/dist/esm/chunk-PCLNX6FS.mjs +17 -0
- package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-PCLNX6FS.mjs.map} +1 -1
- package/dist/esm/chunk-PIMQHG2J.mjs +49 -0
- package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-PIMQHG2J.mjs.map} +1 -1
- package/dist/esm/chunk-PU5AFUX3.mjs +52 -0
- package/dist/esm/chunk-PU5AFUX3.mjs.map +1 -0
- package/dist/esm/chunk-PYLOAMR2.mjs +29 -0
- package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-PYLOAMR2.mjs.map} +1 -1
- package/dist/esm/chunk-QBBTUC66.mjs +15 -0
- package/dist/esm/{chunk-ROXFCLDT.mjs.map → chunk-QBBTUC66.mjs.map} +1 -1
- package/dist/esm/chunk-QFOG4LIN.mjs +319 -0
- package/dist/esm/{chunk-RJ4PSGZ4.mjs.map → chunk-QFOG4LIN.mjs.map} +1 -1
- package/dist/esm/chunk-QMM2KL6C.mjs +12 -0
- package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-QMM2KL6C.mjs.map} +1 -1
- package/dist/esm/chunk-RCQMWXEW.mjs +35 -0
- package/dist/esm/{chunk-TXMPXZBG.mjs.map → chunk-RCQMWXEW.mjs.map} +1 -1
- package/dist/esm/chunk-RX4VG2AT.mjs +314 -0
- package/dist/esm/chunk-RX4VG2AT.mjs.map +1 -0
- package/dist/esm/chunk-SBB4YEPT.mjs +17 -0
- package/dist/esm/{chunk-56CNRT2K.mjs.map → chunk-SBB4YEPT.mjs.map} +1 -1
- package/dist/esm/chunk-SIJELMDP.mjs +29 -0
- package/dist/esm/{chunk-6EMN3BOV.mjs.map → chunk-SIJELMDP.mjs.map} +1 -1
- package/dist/esm/chunk-SS3NUM5L.mjs +94 -0
- package/dist/esm/{chunk-L54P6EGN.mjs.map → chunk-SS3NUM5L.mjs.map} +1 -1
- package/dist/esm/chunk-ST4QXIMI.mjs +37 -0
- package/dist/esm/{chunk-XMFPKHB5.mjs.map → chunk-ST4QXIMI.mjs.map} +1 -1
- package/dist/esm/chunk-TBHU6ZW6.mjs +215 -0
- package/dist/esm/{chunk-QHVZL3LZ.mjs.map → chunk-TBHU6ZW6.mjs.map} +1 -1
- package/dist/esm/chunk-TLNHRJB2.mjs +155 -0
- package/dist/esm/{chunk-H6LYW7HG.mjs.map → chunk-TLNHRJB2.mjs.map} +1 -1
- package/dist/esm/chunk-U3IUCR2G.mjs +54 -0
- package/dist/esm/{chunk-52ECIIIH.mjs.map → chunk-U3IUCR2G.mjs.map} +1 -1
- package/dist/esm/chunk-U7QBZ6PP.mjs +400 -0
- package/dist/esm/{chunk-ZM436N3W.mjs.map → chunk-U7QBZ6PP.mjs.map} +1 -1
- package/dist/esm/chunk-UEBBLQJ5.mjs +94 -0
- package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-UEBBLQJ5.mjs.map} +1 -1
- package/dist/esm/chunk-UKU6A2W2.mjs +232 -0
- package/dist/esm/{chunk-HXSW6X7K.mjs.map → chunk-UKU6A2W2.mjs.map} +1 -1
- package/dist/esm/chunk-UX5NSZEN.mjs +134 -0
- package/dist/esm/{chunk-WVIPPU2C.mjs.map → chunk-UX5NSZEN.mjs.map} +1 -1
- package/dist/esm/chunk-VDJBDX3A.mjs +79 -0
- package/dist/esm/{chunk-25N7RLBW.mjs.map → chunk-VDJBDX3A.mjs.map} +1 -1
- package/dist/esm/chunk-VJP2VWMF.mjs +58 -0
- package/dist/esm/{chunk-56NB52W6.mjs.map → chunk-VJP2VWMF.mjs.map} +1 -1
- package/dist/esm/chunk-VKJQORON.mjs +93 -0
- package/dist/esm/{chunk-3OELNIC6.mjs.map → chunk-VKJQORON.mjs.map} +1 -1
- package/dist/esm/chunk-VPWUODU4.mjs +51 -0
- package/dist/esm/{chunk-NNIHTVLA.mjs.map → chunk-VPWUODU4.mjs.map} +1 -1
- package/dist/esm/chunk-VZQXLVEP.mjs +197 -0
- package/dist/esm/{chunk-VJJN3GFD.mjs.map → chunk-VZQXLVEP.mjs.map} +1 -1
- package/dist/esm/chunk-W76MGKZB.mjs +33 -0
- package/dist/esm/{chunk-CLVAGDXO.mjs.map → chunk-W76MGKZB.mjs.map} +1 -1
- package/dist/esm/chunk-WDRH2URB.mjs +91 -0
- package/dist/esm/{chunk-65UZZNN2.mjs.map → chunk-WDRH2URB.mjs.map} +1 -1
- package/dist/esm/chunk-WHBWEN6N.mjs +206 -0
- package/dist/esm/{chunk-NGNETNK2.mjs.map → chunk-WHBWEN6N.mjs.map} +1 -1
- package/dist/esm/chunk-WK5ZSNE2.mjs +173 -0
- package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-WK5ZSNE2.mjs.map} +1 -1
- package/dist/esm/chunk-WLTBF4DF.mjs +22 -0
- package/dist/esm/chunk-WLTBF4DF.mjs.map +1 -0
- package/dist/esm/chunk-WVGO4D7K.mjs +254 -0
- package/dist/esm/{chunk-OLGSIKFB.mjs.map → chunk-WVGO4D7K.mjs.map} +1 -1
- package/dist/esm/chunk-XANFAUBD.mjs +44 -0
- package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-XANFAUBD.mjs.map} +1 -1
- package/dist/esm/chunk-Y2LV3S5W.mjs +410 -0
- package/dist/esm/{chunk-6SHLLRJA.mjs.map → chunk-Y2LV3S5W.mjs.map} +1 -1
- package/dist/esm/chunk-YV7M4CFP.mjs +137 -0
- package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-YV7M4CFP.mjs.map} +1 -1
- package/dist/esm/chunk-YYOPNUX5.mjs +41 -0
- package/dist/esm/chunk-YYOPNUX5.mjs.map +1 -0
- package/dist/esm/chunk-ZAHJ7KXB.mjs +81 -0
- package/dist/esm/{chunk-Z5KKUXYI.mjs.map → chunk-ZAHJ7KXB.mjs.map} +1 -1
- package/dist/esm/chunk-ZMFKQUHL.mjs +117 -0
- package/dist/esm/{chunk-TICM455H.mjs.map → chunk-ZMFKQUHL.mjs.map} +1 -1
- package/dist/esm/cli/index.mjs +12 -1
- package/dist/esm/cli/localNode.mjs +8 -1
- package/dist/esm/cli/move.mjs +7 -1
- package/dist/esm/client/core.mjs +27 -1
- package/dist/esm/client/get.mjs +32 -1
- package/dist/esm/client/index.mjs +55 -1
- package/dist/esm/client/post.mjs +36 -1
- package/dist/esm/client/types.d.mts +5 -1
- package/dist/esm/client/types.mjs +7 -1
- package/dist/esm/core/account/index.mjs +19 -1
- package/dist/esm/core/account/utils/address.mjs +18 -1
- package/dist/esm/core/account/utils/index.mjs +19 -1
- package/dist/esm/core/accountAddress.mjs +15 -1
- package/dist/esm/core/authenticationKey.mjs +14 -1
- package/dist/esm/core/common.mjs +7 -1
- package/dist/esm/core/crypto/ed25519.d.mts +10 -0
- package/dist/esm/core/crypto/ed25519.mjs +29 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +16 -20
- package/dist/esm/core/crypto/ephemeral.mjs +28 -1
- package/dist/esm/core/crypto/hdKey.d.mts +1 -15
- package/dist/esm/core/crypto/hdKey.mjs +25 -1
- package/dist/esm/core/crypto/index.d.mts +3 -2
- package/dist/esm/core/crypto/index.mjs +124 -1
- package/dist/esm/core/crypto/keyless.d.mts +121 -106
- package/dist/esm/core/crypto/keyless.mjs +55 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +28 -1
- package/dist/esm/core/crypto/multiKey.mjs +34 -1
- package/dist/esm/core/crypto/poseidon.mjs +15 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +21 -0
- package/dist/esm/core/crypto/proof.mjs +20 -0
- package/dist/esm/core/crypto/proof.mjs.map +1 -0
- package/dist/esm/core/crypto/publicKey.mjs +21 -1
- package/dist/esm/core/crypto/secp256k1.mjs +27 -1
- package/dist/esm/core/crypto/signature.mjs +19 -1
- package/dist/esm/core/crypto/singleKey.mjs +33 -1
- package/dist/esm/core/crypto/utils.mjs +9 -1
- package/dist/esm/core/hex.mjs +10 -1
- package/dist/esm/core/index.d.mts +3 -2
- package/dist/esm/core/index.mjs +141 -1
- package/dist/esm/index.d.mts +5 -4
- package/dist/esm/index.mjs +635 -1
- package/dist/esm/internal/account.mjs +106 -1
- package/dist/esm/internal/ans.mjs +120 -1
- package/dist/esm/internal/coin.mjs +85 -1
- package/dist/esm/internal/digitalAsset.mjs +127 -1
- package/dist/esm/internal/event.mjs +55 -1
- package/dist/esm/internal/faucet.mjs +52 -1
- package/dist/esm/internal/fungibleAsset.mjs +91 -1
- package/dist/esm/internal/general.mjs +46 -1
- package/dist/esm/internal/keyless.d.mts +4 -3
- package/dist/esm/internal/keyless.mjs +73 -1
- package/dist/esm/internal/staking.mjs +53 -1
- package/dist/esm/internal/transaction.mjs +51 -1
- package/dist/esm/internal/transactionSubmission.mjs +102 -1
- package/dist/esm/internal/view.mjs +83 -1
- package/dist/esm/transactions/authenticator/account.mjs +44 -1
- package/dist/esm/transactions/authenticator/index.mjs +60 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +48 -1
- package/dist/esm/transactions/index.mjs +284 -1
- package/dist/esm/transactions/instances/chainId.mjs +11 -1
- package/dist/esm/transactions/instances/identifier.mjs +11 -1
- package/dist/esm/transactions/instances/index.mjs +96 -1
- package/dist/esm/transactions/instances/moduleId.mjs +38 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +43 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +48 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +20 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +45 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +43 -1
- package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +56 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +74 -1
- package/dist/esm/transactions/management/asyncQueue.mjs +9 -1
- package/dist/esm/transactions/management/index.mjs +95 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +91 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +75 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +162 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +85 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +58 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +98 -1
- package/dist/esm/transactions/typeTag/index.mjs +74 -1
- package/dist/esm/transactions/typeTag/parser.mjs +43 -1
- package/dist/esm/transactions/types.mjs +1 -1
- package/dist/esm/types/generated/queries.mjs +57 -1
- package/dist/esm/types/generated/types.mjs +809 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +6 -4
- package/dist/esm/types/index.mjs +68 -1
- package/dist/esm/types/indexer.mjs +1 -1
- package/dist/esm/types/keyless.d.mts +54 -1
- package/dist/esm/types/keyless.mjs +9 -0
- package/dist/esm/utils/apiEndpoints.mjs +21 -1
- package/dist/esm/utils/const.mjs +21 -1
- package/dist/esm/utils/helpers.mjs +7 -1
- package/dist/esm/utils/index.mjs +56 -1
- package/dist/esm/utils/memoize.mjs +9 -1
- package/dist/esm/utils/normalizeBundle.mjs +19 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +7 -1
- package/package.json +5 -2
- package/src/account/EphemeralKeyPair.ts +45 -7
- package/src/account/KeylessAccount.ts +152 -113
- package/src/account/MultiKeyAccount.ts +4 -0
- package/src/api/keyless.ts +17 -4
- package/src/bcs/deserializer.ts +40 -0
- package/src/client/core.ts +1 -1
- package/src/client/types.ts +1 -1
- package/src/core/account/index.ts +0 -1
- package/src/core/crypto/ed25519.ts +24 -4
- package/src/core/crypto/ephemeral.ts +17 -28
- package/src/core/crypto/hdKey.ts +0 -31
- package/src/core/crypto/keyless.ts +231 -286
- package/src/core/crypto/proof.ts +16 -0
- package/src/internal/keyless.ts +16 -15
- package/src/internal/transactionSubmission.ts +16 -6
- package/src/transactions/management/transactionWorker.ts +1 -7
- package/src/types/index.ts +5 -2
- package/src/types/keyless.ts +31 -0
- package/src/utils/apiEndpoints.ts +6 -6
- package/src/version.ts +1 -1
- package/dist/common/chunk-KSEUZTKY.js +0 -2
- package/dist/common/chunk-KSEUZTKY.js.map +0 -1
- package/dist/esm/chunk-25N7RLBW.mjs +0 -2
- package/dist/esm/chunk-32355KGV.mjs +0 -2
- package/dist/esm/chunk-32355KGV.mjs.map +0 -1
- package/dist/esm/chunk-3FVRXELT.mjs +0 -2
- package/dist/esm/chunk-3JPVQHOR.mjs +0 -2
- package/dist/esm/chunk-3OELNIC6.mjs +0 -2
- package/dist/esm/chunk-3U5VRZLS.mjs +0 -2
- package/dist/esm/chunk-3U5VRZLS.mjs.map +0 -1
- package/dist/esm/chunk-3VGX3TXH.mjs +0 -2
- package/dist/esm/chunk-43WARVT3.mjs +0 -2
- package/dist/esm/chunk-52ECIIIH.mjs +0 -2
- package/dist/esm/chunk-56CNRT2K.mjs +0 -2
- package/dist/esm/chunk-56NB52W6.mjs +0 -2
- package/dist/esm/chunk-5DW2AJPI.mjs +0 -2
- package/dist/esm/chunk-5QWUIVAQ.mjs +0 -2
- package/dist/esm/chunk-5QWUIVAQ.mjs.map +0 -1
- package/dist/esm/chunk-6456EI2E.mjs +0 -2
- package/dist/esm/chunk-6456EI2E.mjs.map +0 -1
- package/dist/esm/chunk-65UZZNN2.mjs +0 -2
- package/dist/esm/chunk-6EMN3BOV.mjs +0 -2
- package/dist/esm/chunk-6FBKUTGF.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs +0 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs.map +0 -1
- package/dist/esm/chunk-6LOTZ4GY.mjs +0 -2
- package/dist/esm/chunk-6RBUXB5I.mjs +0 -2
- package/dist/esm/chunk-6SHLLRJA.mjs +0 -2
- package/dist/esm/chunk-73Y4NTDU.mjs +0 -2
- package/dist/esm/chunk-73Y4NTDU.mjs.map +0 -1
- package/dist/esm/chunk-7PSX4LCV.mjs +0 -2
- package/dist/esm/chunk-7Q2NVO5M.mjs +0 -2
- package/dist/esm/chunk-7STYQ5ZE.mjs +0 -2
- package/dist/esm/chunk-7WJTKYRG.mjs +0 -2
- package/dist/esm/chunk-AH44UPM4.mjs +0 -2
- package/dist/esm/chunk-AOCNYMMX.mjs +0 -2
- package/dist/esm/chunk-C3L4ETUF.mjs +0 -2
- package/dist/esm/chunk-C5UVSNZW.mjs +0 -2
- package/dist/esm/chunk-CLVAGDXO.mjs +0 -2
- package/dist/esm/chunk-COW5IGYC.mjs +0 -2
- package/dist/esm/chunk-D22EMNIY.mjs +0 -2
- package/dist/esm/chunk-DLTC6PJP.mjs +0 -2
- package/dist/esm/chunk-EB7AI4B4.mjs +0 -2
- package/dist/esm/chunk-EKABTHUZ.mjs +0 -2
- package/dist/esm/chunk-EOMDZYSJ.mjs +0 -2
- package/dist/esm/chunk-EOMDZYSJ.mjs.map +0 -1
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-FKSACFCB.mjs +0 -2
- package/dist/esm/chunk-FLYEALDB.mjs +0 -2
- package/dist/esm/chunk-FVA2OPG4.mjs +0 -2
- package/dist/esm/chunk-G4XSNSOT.mjs +0 -2
- package/dist/esm/chunk-H3TFQ7K4.mjs +0 -2
- package/dist/esm/chunk-H6LYW7HG.mjs +0 -2
- package/dist/esm/chunk-HCGWCB5E.mjs +0 -2
- package/dist/esm/chunk-HCGWCB5E.mjs.map +0 -1
- package/dist/esm/chunk-HGZGTBA4.mjs +0 -2
- package/dist/esm/chunk-HXSW6X7K.mjs +0 -2
- package/dist/esm/chunk-IXYXFDJZ.mjs +0 -2
- package/dist/esm/chunk-J7J7ZTBF.mjs +0 -2
- package/dist/esm/chunk-JVKMQ64G.mjs +0 -2
- package/dist/esm/chunk-KWNBC5MF.mjs +0 -2
- package/dist/esm/chunk-L54P6EGN.mjs +0 -2
- package/dist/esm/chunk-LDQ6JFEF.mjs +0 -2
- package/dist/esm/chunk-MGOHPDX4.mjs +0 -2
- package/dist/esm/chunk-MWUJCP27.mjs +0 -2
- package/dist/esm/chunk-NC5HHEEM.mjs +0 -2
- package/dist/esm/chunk-NGNETNK2.mjs +0 -2
- package/dist/esm/chunk-NKCZ4KGO.mjs +0 -2
- package/dist/esm/chunk-NMECYE3D.mjs +0 -2
- package/dist/esm/chunk-NNIHTVLA.mjs +0 -2
- package/dist/esm/chunk-NNW6HWIO.mjs +0 -2
- package/dist/esm/chunk-O34EOOVF.mjs +0 -2
- package/dist/esm/chunk-OBEVVLF7.mjs +0 -2
- package/dist/esm/chunk-OBEVVLF7.mjs.map +0 -1
- package/dist/esm/chunk-OKRUEVF3.mjs +0 -2
- package/dist/esm/chunk-OKRUEVF3.mjs.map +0 -1
- package/dist/esm/chunk-OLGSIKFB.mjs +0 -2
- package/dist/esm/chunk-OZC3FCJP.mjs +0 -2
- package/dist/esm/chunk-PFFAQZHT.mjs +0 -2
- package/dist/esm/chunk-PINF6ZWP.mjs +0 -2
- package/dist/esm/chunk-PJXRQBF6.mjs +0 -2
- package/dist/esm/chunk-PJXRQBF6.mjs.map +0 -1
- package/dist/esm/chunk-QHVZL3LZ.mjs +0 -2
- package/dist/esm/chunk-QNHDS64I.mjs +0 -2
- package/dist/esm/chunk-RBPGL6YB.mjs +0 -2
- package/dist/esm/chunk-RJ4PSGZ4.mjs +0 -2
- package/dist/esm/chunk-ROXFCLDT.mjs +0 -2
- package/dist/esm/chunk-RTSEMQCK.mjs +0 -2
- package/dist/esm/chunk-SRPTQ4VV.mjs +0 -2
- package/dist/esm/chunk-STYDBDYL.mjs +0 -2
- package/dist/esm/chunk-T23OVRNF.mjs +0 -2
- package/dist/esm/chunk-TICM455H.mjs +0 -2
- package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
- package/dist/esm/chunk-TVRJ3M7B.mjs +0 -2
- package/dist/esm/chunk-TXMPXZBG.mjs +0 -2
- package/dist/esm/chunk-U6Z4FNB7.mjs +0 -2
- package/dist/esm/chunk-UGIJHLL3.mjs +0 -2
- package/dist/esm/chunk-UVOU6BW2.mjs +0 -2
- package/dist/esm/chunk-V7P6MLSY.mjs +0 -2
- package/dist/esm/chunk-VJJN3GFD.mjs +0 -2
- package/dist/esm/chunk-WOLIXKOK.mjs +0 -2
- package/dist/esm/chunk-WVIPPU2C.mjs +0 -2
- package/dist/esm/chunk-XCR3YNHW.mjs +0 -2
- package/dist/esm/chunk-XCR3YNHW.mjs.map +0 -1
- package/dist/esm/chunk-XMFPKHB5.mjs +0 -2
- package/dist/esm/chunk-XN4SQWI5.mjs +0 -2
- package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
- package/dist/esm/chunk-Z5KKUXYI.mjs +0 -2
- package/dist/esm/chunk-ZM436N3W.mjs +0 -2
- package/dist/esm/chunk-ZNEBMSNC.mjs +0 -2
- /package/dist/esm/{chunk-FVA2OPG4.mjs.map → chunk-OR7TEZ25.mjs.map} +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ParsingError
|
|
3
|
+
} from "./chunk-QMM2KL6C.mjs";
|
|
4
|
+
|
|
5
|
+
// src/core/hex.ts
|
|
6
|
+
import { bytesToHex, hexToBytes } from "@noble/hashes/utils";
|
|
7
|
+
var HexInvalidReason = /* @__PURE__ */ ((HexInvalidReason2) => {
|
|
8
|
+
HexInvalidReason2["TOO_SHORT"] = "too_short";
|
|
9
|
+
HexInvalidReason2["INVALID_LENGTH"] = "invalid_length";
|
|
10
|
+
HexInvalidReason2["INVALID_HEX_CHARS"] = "invalid_hex_chars";
|
|
11
|
+
return HexInvalidReason2;
|
|
12
|
+
})(HexInvalidReason || {});
|
|
13
|
+
var Hex = class _Hex {
|
|
14
|
+
/**
|
|
15
|
+
* Create a new Hex instance from a Uint8Array.
|
|
16
|
+
*
|
|
17
|
+
* @param data Uint8Array
|
|
18
|
+
*/
|
|
19
|
+
constructor(data) {
|
|
20
|
+
this.data = data;
|
|
21
|
+
}
|
|
22
|
+
// ===
|
|
23
|
+
// Methods for representing an instance of Hex as other types.
|
|
24
|
+
// ===
|
|
25
|
+
/**
|
|
26
|
+
* Get the inner hex data. The inner data is already a Uint8Array so no conversion
|
|
27
|
+
* is taking place here, it just returns the inner data.
|
|
28
|
+
*
|
|
29
|
+
* @returns Hex data as Uint8Array
|
|
30
|
+
*/
|
|
31
|
+
toUint8Array() {
|
|
32
|
+
return this.data;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the hex data as a string without the 0x prefix.
|
|
36
|
+
*
|
|
37
|
+
* @returns Hex string without 0x prefix
|
|
38
|
+
*/
|
|
39
|
+
toStringWithoutPrefix() {
|
|
40
|
+
return bytesToHex(this.data);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the hex data as a string with the 0x prefix.
|
|
44
|
+
*
|
|
45
|
+
* @returns Hex string with 0x prefix
|
|
46
|
+
*/
|
|
47
|
+
toString() {
|
|
48
|
+
return `0x${this.toStringWithoutPrefix()}`;
|
|
49
|
+
}
|
|
50
|
+
// ===
|
|
51
|
+
// Methods for creating an instance of Hex from other types.
|
|
52
|
+
// ===
|
|
53
|
+
/**
|
|
54
|
+
* Static method to convert a hex string to Hex
|
|
55
|
+
*
|
|
56
|
+
* @param str A hex string, with or without the 0x prefix
|
|
57
|
+
*
|
|
58
|
+
* @returns Hex
|
|
59
|
+
*/
|
|
60
|
+
static fromHexString(str) {
|
|
61
|
+
let input = str;
|
|
62
|
+
if (input.startsWith("0x")) {
|
|
63
|
+
input = input.slice(2);
|
|
64
|
+
}
|
|
65
|
+
if (input.length === 0) {
|
|
66
|
+
throw new ParsingError(
|
|
67
|
+
"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.",
|
|
68
|
+
"too_short" /* TOO_SHORT */
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
if (input.length % 2 !== 0) {
|
|
72
|
+
throw new ParsingError("Hex string must be an even number of hex characters.", "invalid_length" /* INVALID_LENGTH */);
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
return new _Hex(hexToBytes(input));
|
|
76
|
+
} catch (error) {
|
|
77
|
+
throw new ParsingError(
|
|
78
|
+
`Hex string contains invalid hex characters: ${error?.message}`,
|
|
79
|
+
"invalid_hex_chars" /* INVALID_HEX_CHARS */
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Static method to convert an instance of HexInput to Hex
|
|
85
|
+
*
|
|
86
|
+
* @param hexInput A HexInput (string or Uint8Array)
|
|
87
|
+
*
|
|
88
|
+
* @returns Hex
|
|
89
|
+
*/
|
|
90
|
+
static fromHexInput(hexInput) {
|
|
91
|
+
if (hexInput instanceof Uint8Array)
|
|
92
|
+
return new _Hex(hexInput);
|
|
93
|
+
return _Hex.fromHexString(hexInput);
|
|
94
|
+
}
|
|
95
|
+
// ===
|
|
96
|
+
// Methods for checking validity.
|
|
97
|
+
// ===
|
|
98
|
+
/**
|
|
99
|
+
* Check if the string is valid hex.
|
|
100
|
+
*
|
|
101
|
+
* @param str A hex string representing byte data.
|
|
102
|
+
*
|
|
103
|
+
* @returns valid = true if the string is valid, false if not. If the string is not
|
|
104
|
+
* valid, invalidReason and invalidReasonMessage will be set explaining why it is
|
|
105
|
+
* invalid.
|
|
106
|
+
*/
|
|
107
|
+
static isValid(str) {
|
|
108
|
+
try {
|
|
109
|
+
_Hex.fromHexString(str);
|
|
110
|
+
return { valid: true };
|
|
111
|
+
} catch (error) {
|
|
112
|
+
return {
|
|
113
|
+
valid: false,
|
|
114
|
+
invalidReason: error?.invalidReason,
|
|
115
|
+
invalidReasonMessage: error?.message
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Return whether Hex instances are equal. Hex instances are considered equal if
|
|
121
|
+
* their underlying byte data is identical.
|
|
122
|
+
*
|
|
123
|
+
* @param other The Hex instance to compare to.
|
|
124
|
+
* @returns true if the Hex instances are equal, false if not.
|
|
125
|
+
*/
|
|
126
|
+
equals(other) {
|
|
127
|
+
if (this.data.length !== other.data.length)
|
|
128
|
+
return false;
|
|
129
|
+
return this.data.every((value, index) => value === other.data[index]);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export {
|
|
134
|
+
HexInvalidReason,
|
|
135
|
+
Hex
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=chunk-YV7M4CFP.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/hex.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * This enum is used to explain why parsing might have failed.\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses, use AccountAddress.\n *\n * NOTE: When accepting hex data as input to a function, prefer to accept HexInput and\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Hex is a helper class for working with hex data. Hex data, when represented as a\n * string, generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * You might use this class like this:\n *\n * ```ts\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n *\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * These are some other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data Uint8Array\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data. The inner data is already a Uint8Array so no conversion\n * is taking place here, it just returns the inner data.\n *\n * @returns Hex data as Uint8Array\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Static method to convert a hex string to Hex\n *\n * @param str A hex string, with or without the 0x prefix\n *\n * @returns Hex\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Static method to convert an instance of HexInput to Hex\n *\n * @param hexInput A HexInput (string or Uint8Array)\n *\n * @returns Hex\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the string is valid hex.\n *\n * @param str A hex string representing byte data.\n *\n * @returns valid = true if the string is valid, false if not. If the string is not\n * valid, invalidReason and invalidReasonMessage will be set explaining why it is\n * invalid.\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Return whether Hex instances are equal. Hex instances are considered equal if\n * their underlying byte data is identical.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/core/hex.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * This enum is used to explain why parsing might have failed.\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses, use AccountAddress.\n *\n * NOTE: When accepting hex data as input to a function, prefer to accept HexInput and\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Hex is a helper class for working with hex data. Hex data, when represented as a\n * string, generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * You might use this class like this:\n *\n * ```ts\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n *\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * These are some other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data Uint8Array\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data. The inner data is already a Uint8Array so no conversion\n * is taking place here, it just returns the inner data.\n *\n * @returns Hex data as Uint8Array\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Static method to convert a hex string to Hex\n *\n * @param str A hex string, with or without the 0x prefix\n *\n * @returns Hex\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Static method to convert an instance of HexInput to Hex\n *\n * @param hexInput A HexInput (string or Uint8Array)\n *\n * @returns Hex\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the string is valid hex.\n *\n * @param str A hex string representing byte data.\n *\n * @returns valid = true if the string is valid, false if not. If the string is not\n * valid, invalidReason and invalidReasonMessage will be set explaining why it is\n * invalid.\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Return whether Hex instances are equal. Hex instances are considered equal if\n * their underlying byte data is identical.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"],"mappings":";;;;;AAGA,SAAS,YAAY,kBAAkB;AAOhC,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,oBAAiB;AACjB,EAAAA,kBAAA,uBAAoB;AAHV,SAAAA;AAAA,GAAA;AAgCL,IAAM,MAAN,MAAM,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQf,YAAY,MAAkB;AAC5B,SAAK,OAAO;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,eAA2B;AACzB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,wBAAgC;AAC9B,WAAO,WAAW,KAAK,IAAI;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAmB;AACjB,WAAO,KAAK,KAAK,sBAAsB,CAAC;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,OAAO,cAAc,KAAkB;AACrC,QAAI,QAAQ;AAEZ,QAAI,MAAM,WAAW,IAAI,GAAG;AAC1B,cAAQ,MAAM,MAAM,CAAC;AAAA,IACvB;AAEA,QAAI,MAAM,WAAW,GAAG;AACtB,YAAM,IAAI;AAAA,QACR;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,QAAI,MAAM,SAAS,MAAM,GAAG;AAC1B,YAAM,IAAI,aAAa,wDAAwD,qCAA+B;AAAA,IAChH;AAEA,QAAI;AACF,aAAO,IAAI,KAAI,WAAW,KAAK,CAAC;AAAA,IAClC,SAAS,OAAY;AACnB,YAAM,IAAI;AAAA,QACR,+CAA+C,OAAO,OAAO;AAAA,QAC7D;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,OAAO,aAAa,UAAyB;AAC3C,QAAI,oBAAoB;AAAY,aAAO,IAAI,KAAI,QAAQ;AAC3D,WAAO,KAAI,cAAc,QAAQ;AAAA,EACnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,OAAO,QAAQ,KAA8C;AAC3D,QAAI;AACF,WAAI,cAAc,GAAG;AACrB,aAAO,EAAE,OAAO,KAAK;AAAA,IACvB,SAAS,OAAY;AACnB,aAAO;AAAA,QACL,OAAO;AAAA,QACP,eAAe,OAAO;AAAA,QACtB,sBAAsB,OAAO;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,OAAO,OAAqB;AAC1B,QAAI,KAAK,KAAK,WAAW,MAAM,KAAK;AAAQ,aAAO;AACnD,WAAO,KAAK,KAAK,MAAM,CAAC,OAAO,UAAU,UAAU,MAAM,KAAK,KAAK,CAAC;AAAA,EACtE;AACF;","names":["HexInvalidReason"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deriveKeylessAccount,
|
|
3
|
+
getPepper
|
|
4
|
+
} from "./chunk-GBEVD2VM.mjs";
|
|
5
|
+
|
|
6
|
+
// src/api/keyless.ts
|
|
7
|
+
var Keyless = class {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.config = config;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetches the pepper from the Aptos pepper service API.
|
|
13
|
+
*
|
|
14
|
+
* @param args.jwt JWT token
|
|
15
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
16
|
+
* @returns The pepper which is a Uint8Array of length 31.
|
|
17
|
+
*/
|
|
18
|
+
async getPepper(args) {
|
|
19
|
+
return getPepper({ aptosConfig: this.config, ...args });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Fetches the pepper from the Aptos pepper service API.
|
|
23
|
+
*
|
|
24
|
+
* @param args.jwt JWT token
|
|
25
|
+
* @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
|
|
26
|
+
* @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
|
|
27
|
+
* @param args.pepper the pepper
|
|
28
|
+
* @param args.extraFieldKey a key in the JWT token used to reveal a value on chain
|
|
29
|
+
* @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done asyncronously. Once
|
|
30
|
+
* if finishes the callback function will be called.
|
|
31
|
+
* @returns A KeylessAccount that can be used to sign transactions
|
|
32
|
+
*/
|
|
33
|
+
async deriveKeylessAccount(args) {
|
|
34
|
+
return deriveKeylessAccount({ aptosConfig: this.config, ...args });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
Keyless
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-YYOPNUX5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { deriveKeylessAccount, getPepper } from \"../internal/keyless\";\nimport { HexInput } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to query all `Keyless` related queries on Aptos.\n */\nexport class Keyless {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Fetches the pepper from the Aptos pepper service API.\n *\n * @param args.jwt JWT token\n * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token\n * @returns The pepper which is a Uint8Array of length 31.\n */\n async getPepper(args: { jwt: string; ephemeralKeyPair: EphemeralKeyPair }): Promise<Uint8Array> {\n return getPepper({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches the pepper from the Aptos pepper service API.\n *\n * @param args.jwt JWT token\n * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token\n * @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment\n * @param args.pepper the pepper\n * @param args.extraFieldKey a key in the JWT token used to reveal a value on chain\n * @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done asyncronously. Once\n * if finishes the callback function will be called.\n * @returns A KeylessAccount that can be used to sign transactions\n */\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n extraFieldKey?: string;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount> {\n return deriveKeylessAccount({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":";;;;;;AAWO,IAAM,UAAN,MAAc;AAAA,EACnB,YAAqB,QAAqB;AAArB;AAAA,EAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS3C,MAAM,UAAU,MAAgF;AAC9F,WAAO,UAAU,EAAE,aAAa,KAAK,QAAQ,GAAG,KAAK,CAAC;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,qBAAqB,MAOC;AAC1B,WAAO,qBAAqB,EAAE,aAAa,KAAK,QAAQ,GAAG,KAAK,CAAC;AAAA,EACnE;AACF;","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Keyless
|
|
3
|
+
} from "./chunk-YYOPNUX5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Staking
|
|
6
|
+
} from "./chunk-DVPQGCFT.mjs";
|
|
7
|
+
import {
|
|
8
|
+
Transaction
|
|
9
|
+
} from "./chunk-FF4JPDKD.mjs";
|
|
10
|
+
import {
|
|
11
|
+
AptosConfig
|
|
12
|
+
} from "./chunk-MZZLEY6O.mjs";
|
|
13
|
+
import {
|
|
14
|
+
Coin
|
|
15
|
+
} from "./chunk-LLLQJWRZ.mjs";
|
|
16
|
+
import {
|
|
17
|
+
DigitalAsset
|
|
18
|
+
} from "./chunk-BXMHDQHW.mjs";
|
|
19
|
+
import {
|
|
20
|
+
Event
|
|
21
|
+
} from "./chunk-HBNSRCZN.mjs";
|
|
22
|
+
import {
|
|
23
|
+
Faucet
|
|
24
|
+
} from "./chunk-ST4QXIMI.mjs";
|
|
25
|
+
import {
|
|
26
|
+
FungibleAsset
|
|
27
|
+
} from "./chunk-UX5NSZEN.mjs";
|
|
28
|
+
import {
|
|
29
|
+
General
|
|
30
|
+
} from "./chunk-VZQXLVEP.mjs";
|
|
31
|
+
import {
|
|
32
|
+
Account
|
|
33
|
+
} from "./chunk-F2ZWA7B7.mjs";
|
|
34
|
+
import {
|
|
35
|
+
ANS
|
|
36
|
+
} from "./chunk-2ZEGJU43.mjs";
|
|
37
|
+
|
|
38
|
+
// src/api/aptos.ts
|
|
39
|
+
var Aptos = class {
|
|
40
|
+
constructor(settings) {
|
|
41
|
+
this.config = new AptosConfig(settings);
|
|
42
|
+
this.account = new Account(this.config);
|
|
43
|
+
this.ans = new ANS(this.config);
|
|
44
|
+
this.coin = new Coin(this.config);
|
|
45
|
+
this.digitalAsset = new DigitalAsset(this.config);
|
|
46
|
+
this.event = new Event(this.config);
|
|
47
|
+
this.faucet = new Faucet(this.config);
|
|
48
|
+
this.fungibleAsset = new FungibleAsset(this.config);
|
|
49
|
+
this.general = new General(this.config);
|
|
50
|
+
this.staking = new Staking(this.config);
|
|
51
|
+
this.transaction = new Transaction(this.config);
|
|
52
|
+
this.keyless = new Keyless(this.config);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function applyMixin(targetClass, baseClass, baseClassProp) {
|
|
56
|
+
Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {
|
|
57
|
+
const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);
|
|
58
|
+
if (!propertyDescriptor)
|
|
59
|
+
return;
|
|
60
|
+
propertyDescriptor.value = function(...args) {
|
|
61
|
+
return this[baseClassProp][propertyName](...args);
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
applyMixin(Aptos, Account, "account");
|
|
67
|
+
applyMixin(Aptos, ANS, "ans");
|
|
68
|
+
applyMixin(Aptos, Coin, "coin");
|
|
69
|
+
applyMixin(Aptos, DigitalAsset, "digitalAsset");
|
|
70
|
+
applyMixin(Aptos, Event, "event");
|
|
71
|
+
applyMixin(Aptos, Faucet, "faucet");
|
|
72
|
+
applyMixin(Aptos, FungibleAsset, "fungibleAsset");
|
|
73
|
+
applyMixin(Aptos, General, "general");
|
|
74
|
+
applyMixin(Aptos, Staking, "staking");
|
|
75
|
+
applyMixin(Aptos, Transaction, "transaction");
|
|
76
|
+
applyMixin(Aptos, Keyless, "keyless");
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
Aptos
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=chunk-ZAHJ7KXB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/aptos.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"./account\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { Coin } from \"./coin\";\nimport { DigitalAsset } from \"./digitalAsset\";\nimport { Event } from \"./event\";\nimport { Faucet } from \"./faucet\";\nimport { FungibleAsset } from \"./fungibleAsset\";\nimport { General } from \"./general\";\nimport { ANS } from \"./ans\";\nimport { Staking } from \"./staking\";\nimport { Transaction } from \"./transaction\";\nimport { Keyless } from \"./keyless\";\n\n/**\n * This class is the main entry point into Aptos's\n * APIs and separates functionality into different namespaces.\n *\n * To use the SDK, create a new Aptos instance to get access\n * to all the sdk functionality.\n *\n * @example\n *\n * const aptos = new Aptos();\n */\nexport class Aptos {\n readonly config: AptosConfig;\n\n readonly account: Account;\n\n readonly ans: ANS;\n\n readonly coin: Coin;\n\n readonly digitalAsset: DigitalAsset;\n\n readonly event: Event;\n\n readonly faucet: Faucet;\n\n readonly fungibleAsset: FungibleAsset;\n\n readonly general: General;\n\n readonly staking: Staking;\n\n readonly transaction: Transaction;\n\n readonly keyless: Keyless;\n\n constructor(settings?: AptosConfig) {\n this.config = new AptosConfig(settings);\n this.account = new Account(this.config);\n this.ans = new ANS(this.config);\n this.coin = new Coin(this.config);\n this.digitalAsset = new DigitalAsset(this.config);\n this.event = new Event(this.config);\n this.faucet = new Faucet(this.config);\n this.fungibleAsset = new FungibleAsset(this.config);\n this.general = new General(this.config);\n this.staking = new Staking(this.config);\n this.transaction = new Transaction(this.config);\n this.keyless = new Keyless(this.config);\n }\n}\n\n// extends Aptos interface so all the methods and properties\n// from the other classes will be recognized by typescript.\nexport interface Aptos\n extends Account,\n ANS,\n Coin,\n DigitalAsset,\n Event,\n Faucet,\n FungibleAsset,\n General,\n Keyless,\n Staking,\n Omit<Transaction, \"build\" | \"simulate\" | \"submit\" | \"batch\"> {}\n\n/**\nIn TypeScript, we can’t inherit or extend from more than one class,\nMixins helps us to get around that by creating a partial classes\nthat we can combine to form a single class that contains all the methods and properties from the partial classes.\n{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}\n\nHere, we combine any subclass and the Aptos class.\n*/\nfunction applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {\n // Mixin instance methods\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor) return;\n // eslint-disable-next-line func-names\n propertyDescriptor.value = function (...args: any) {\n return (this as any)[baseClassProp][propertyName](...args);\n };\n Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);\n });\n}\n\napplyMixin(Aptos, Account, \"account\");\napplyMixin(Aptos, ANS, \"ans\");\napplyMixin(Aptos, Coin, \"coin\");\napplyMixin(Aptos, DigitalAsset, \"digitalAsset\");\napplyMixin(Aptos, Event, \"event\");\napplyMixin(Aptos, Faucet, \"faucet\");\napplyMixin(Aptos, FungibleAsset, \"fungibleAsset\");\napplyMixin(Aptos, General, \"general\");\napplyMixin(Aptos, Staking, \"staking\");\napplyMixin(Aptos, Transaction, \"transaction\");\napplyMixin(Aptos, Keyless, \"keyless\");\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/api/aptos.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"./account\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { Coin } from \"./coin\";\nimport { DigitalAsset } from \"./digitalAsset\";\nimport { Event } from \"./event\";\nimport { Faucet } from \"./faucet\";\nimport { FungibleAsset } from \"./fungibleAsset\";\nimport { General } from \"./general\";\nimport { ANS } from \"./ans\";\nimport { Staking } from \"./staking\";\nimport { Transaction } from \"./transaction\";\nimport { Keyless } from \"./keyless\";\n\n/**\n * This class is the main entry point into Aptos's\n * APIs and separates functionality into different namespaces.\n *\n * To use the SDK, create a new Aptos instance to get access\n * to all the sdk functionality.\n *\n * @example\n *\n * const aptos = new Aptos();\n */\nexport class Aptos {\n readonly config: AptosConfig;\n\n readonly account: Account;\n\n readonly ans: ANS;\n\n readonly coin: Coin;\n\n readonly digitalAsset: DigitalAsset;\n\n readonly event: Event;\n\n readonly faucet: Faucet;\n\n readonly fungibleAsset: FungibleAsset;\n\n readonly general: General;\n\n readonly staking: Staking;\n\n readonly transaction: Transaction;\n\n readonly keyless: Keyless;\n\n constructor(settings?: AptosConfig) {\n this.config = new AptosConfig(settings);\n this.account = new Account(this.config);\n this.ans = new ANS(this.config);\n this.coin = new Coin(this.config);\n this.digitalAsset = new DigitalAsset(this.config);\n this.event = new Event(this.config);\n this.faucet = new Faucet(this.config);\n this.fungibleAsset = new FungibleAsset(this.config);\n this.general = new General(this.config);\n this.staking = new Staking(this.config);\n this.transaction = new Transaction(this.config);\n this.keyless = new Keyless(this.config);\n }\n}\n\n// extends Aptos interface so all the methods and properties\n// from the other classes will be recognized by typescript.\nexport interface Aptos\n extends Account,\n ANS,\n Coin,\n DigitalAsset,\n Event,\n Faucet,\n FungibleAsset,\n General,\n Keyless,\n Staking,\n Omit<Transaction, \"build\" | \"simulate\" | \"submit\" | \"batch\"> {}\n\n/**\nIn TypeScript, we can’t inherit or extend from more than one class,\nMixins helps us to get around that by creating a partial classes\nthat we can combine to form a single class that contains all the methods and properties from the partial classes.\n{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}\n\nHere, we combine any subclass and the Aptos class.\n*/\nfunction applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {\n // Mixin instance methods\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor) return;\n // eslint-disable-next-line func-names\n propertyDescriptor.value = function (...args: any) {\n return (this as any)[baseClassProp][propertyName](...args);\n };\n Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);\n });\n}\n\napplyMixin(Aptos, Account, \"account\");\napplyMixin(Aptos, ANS, \"ans\");\napplyMixin(Aptos, Coin, \"coin\");\napplyMixin(Aptos, DigitalAsset, \"digitalAsset\");\napplyMixin(Aptos, Event, \"event\");\napplyMixin(Aptos, Faucet, \"faucet\");\napplyMixin(Aptos, FungibleAsset, \"fungibleAsset\");\napplyMixin(Aptos, General, \"general\");\napplyMixin(Aptos, Staking, \"staking\");\napplyMixin(Aptos, Transaction, \"transaction\");\napplyMixin(Aptos, Keyless, \"keyless\");\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BO,IAAM,QAAN,MAAY;AAAA,EAyBjB,YAAY,UAAwB;AAClC,SAAK,SAAS,IAAI,YAAY,QAAQ;AACtC,SAAK,UAAU,IAAI,QAAQ,KAAK,MAAM;AACtC,SAAK,MAAM,IAAI,IAAI,KAAK,MAAM;AAC9B,SAAK,OAAO,IAAI,KAAK,KAAK,MAAM;AAChC,SAAK,eAAe,IAAI,aAAa,KAAK,MAAM;AAChD,SAAK,QAAQ,IAAI,MAAM,KAAK,MAAM;AAClC,SAAK,SAAS,IAAI,OAAO,KAAK,MAAM;AACpC,SAAK,gBAAgB,IAAI,cAAc,KAAK,MAAM;AAClD,SAAK,UAAU,IAAI,QAAQ,KAAK,MAAM;AACtC,SAAK,UAAU,IAAI,QAAQ,KAAK,MAAM;AACtC,SAAK,cAAc,IAAI,YAAY,KAAK,MAAM;AAC9C,SAAK,UAAU,IAAI,QAAQ,KAAK,MAAM;AAAA,EACxC;AACF;AAyBA,SAAS,WAAW,aAAkB,WAAgB,eAAuB;AAE3E,SAAO,oBAAoB,UAAU,SAAS,EAAE,QAAQ,CAAC,iBAAiB;AACxE,UAAM,qBAAqB,OAAO,yBAAyB,UAAU,WAAW,YAAY;AAC5F,QAAI,CAAC;AAAoB;AAEzB,uBAAmB,QAAQ,YAAa,MAAW;AACjD,aAAQ,KAAa,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;AAAA,IAC3D;AACA,WAAO,eAAe,YAAY,WAAW,cAAc,kBAAkB;AAAA,EAC/E,CAAC;AACH;AAEA,WAAW,OAAO,SAAS,SAAS;AACpC,WAAW,OAAO,KAAK,KAAK;AAC5B,WAAW,OAAO,MAAM,MAAM;AAC9B,WAAW,OAAO,cAAc,cAAc;AAC9C,WAAW,OAAO,OAAO,OAAO;AAChC,WAAW,OAAO,QAAQ,QAAQ;AAClC,WAAW,OAAO,eAAe,eAAe;AAChD,WAAW,OAAO,SAAS,SAAS;AACpC,WAAW,OAAO,SAAS,SAAS;AACpC,WAAW,OAAO,aAAa,aAAa;AAC5C,WAAW,OAAO,SAAS,SAAS;","names":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AccountAddress
|
|
3
|
+
} from "./chunk-CMNJG4NN.mjs";
|
|
4
|
+
import {
|
|
5
|
+
FixedBytes
|
|
6
|
+
} from "./chunk-KK2BSALW.mjs";
|
|
7
|
+
import {
|
|
8
|
+
MoveOption,
|
|
9
|
+
MoveString,
|
|
10
|
+
MoveVector
|
|
11
|
+
} from "./chunk-AR7X6GWQ.mjs";
|
|
12
|
+
import {
|
|
13
|
+
Bool,
|
|
14
|
+
U128,
|
|
15
|
+
U16,
|
|
16
|
+
U256,
|
|
17
|
+
U32,
|
|
18
|
+
U64,
|
|
19
|
+
U8
|
|
20
|
+
} from "./chunk-WK5ZSNE2.mjs";
|
|
21
|
+
|
|
22
|
+
// src/transactions/transactionBuilder/helpers.ts
|
|
23
|
+
function isBool(arg) {
|
|
24
|
+
return typeof arg === "boolean";
|
|
25
|
+
}
|
|
26
|
+
function isString(arg) {
|
|
27
|
+
return typeof arg === "string";
|
|
28
|
+
}
|
|
29
|
+
function isNumber(arg) {
|
|
30
|
+
return typeof arg === "number";
|
|
31
|
+
}
|
|
32
|
+
function isLargeNumber(arg) {
|
|
33
|
+
return typeof arg === "number" || typeof arg === "bigint" || typeof arg === "string";
|
|
34
|
+
}
|
|
35
|
+
function isNull(arg) {
|
|
36
|
+
return arg === null || arg === void 0;
|
|
37
|
+
}
|
|
38
|
+
function isEncodedEntryFunctionArgument(arg) {
|
|
39
|
+
return isBcsBool(arg) || isBcsU8(arg) || isBcsU16(arg) || isBcsU32(arg) || isBcsU64(arg) || isBcsU128(arg) || isBcsU256(arg) || isBcsAddress(arg) || isBcsString(arg) || isBcsFixedBytes(arg) || arg instanceof MoveVector || arg instanceof MoveOption;
|
|
40
|
+
}
|
|
41
|
+
function isBcsBool(arg) {
|
|
42
|
+
return arg instanceof Bool;
|
|
43
|
+
}
|
|
44
|
+
function isBcsAddress(arg) {
|
|
45
|
+
return arg instanceof AccountAddress;
|
|
46
|
+
}
|
|
47
|
+
function isBcsString(arg) {
|
|
48
|
+
return arg instanceof MoveString;
|
|
49
|
+
}
|
|
50
|
+
function isBcsFixedBytes(arg) {
|
|
51
|
+
return arg instanceof FixedBytes;
|
|
52
|
+
}
|
|
53
|
+
function isBcsU8(arg) {
|
|
54
|
+
return arg instanceof U8;
|
|
55
|
+
}
|
|
56
|
+
function isBcsU16(arg) {
|
|
57
|
+
return arg instanceof U16;
|
|
58
|
+
}
|
|
59
|
+
function isBcsU32(arg) {
|
|
60
|
+
return arg instanceof U32;
|
|
61
|
+
}
|
|
62
|
+
function isBcsU64(arg) {
|
|
63
|
+
return arg instanceof U64;
|
|
64
|
+
}
|
|
65
|
+
function isBcsU128(arg) {
|
|
66
|
+
return arg instanceof U128;
|
|
67
|
+
}
|
|
68
|
+
function isBcsU256(arg) {
|
|
69
|
+
return arg instanceof U256;
|
|
70
|
+
}
|
|
71
|
+
function isScriptDataInput(arg) {
|
|
72
|
+
return "bytecode" in arg;
|
|
73
|
+
}
|
|
74
|
+
function throwTypeMismatch(expectedType, position) {
|
|
75
|
+
throw new Error(`Type mismatch for argument ${position}, expected '${expectedType}'`);
|
|
76
|
+
}
|
|
77
|
+
function findFirstNonSignerArg(functionAbi) {
|
|
78
|
+
const index = functionAbi.params.findIndex((param) => param !== "signer" && param !== "&signer");
|
|
79
|
+
if (index < 0) {
|
|
80
|
+
return functionAbi.params.length;
|
|
81
|
+
}
|
|
82
|
+
return index;
|
|
83
|
+
}
|
|
84
|
+
function getFunctionParts(functionArg) {
|
|
85
|
+
const funcNameParts = functionArg.split("::");
|
|
86
|
+
if (funcNameParts.length !== 3) {
|
|
87
|
+
throw new Error(`Invalid function ${functionArg}`);
|
|
88
|
+
}
|
|
89
|
+
const moduleAddress = funcNameParts[0];
|
|
90
|
+
const moduleName = funcNameParts[1];
|
|
91
|
+
const functionName = funcNameParts[2];
|
|
92
|
+
return { moduleAddress, moduleName, functionName };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
isBool,
|
|
97
|
+
isString,
|
|
98
|
+
isNumber,
|
|
99
|
+
isLargeNumber,
|
|
100
|
+
isNull,
|
|
101
|
+
isEncodedEntryFunctionArgument,
|
|
102
|
+
isBcsBool,
|
|
103
|
+
isBcsAddress,
|
|
104
|
+
isBcsString,
|
|
105
|
+
isBcsFixedBytes,
|
|
106
|
+
isBcsU8,
|
|
107
|
+
isBcsU16,
|
|
108
|
+
isBcsU32,
|
|
109
|
+
isBcsU64,
|
|
110
|
+
isBcsU128,
|
|
111
|
+
isBcsU256,
|
|
112
|
+
isScriptDataInput,
|
|
113
|
+
throwTypeMismatch,
|
|
114
|
+
findFirstNonSignerArg,
|
|
115
|
+
getFunctionParts
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=chunk-ZMFKQUHL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/transactions/transactionBuilder/helpers.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n EntryFunctionArgumentTypes,\n InputGenerateTransactionPayloadData,\n InputGenerateTransactionPayloadDataWithRemoteABI,\n InputScriptData,\n SimpleEntryFunctionArgumentTypes,\n} from \"../types\";\nimport { Bool, FixedBytes, MoveOption, MoveString, MoveVector, U128, U16, U256, U32, U64, U8 } from \"../../bcs\";\nimport { AccountAddress } from \"../../core\";\nimport { MoveFunction, MoveFunctionId } from \"../../types\";\n\nexport function isBool(arg: SimpleEntryFunctionArgumentTypes): arg is boolean {\n return typeof arg === \"boolean\";\n}\n\nexport function isString(arg: any): arg is string {\n return typeof arg === \"string\";\n}\n\nexport function isNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number {\n return typeof arg === \"number\";\n}\n\nexport function isLargeNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number | bigint | string {\n return typeof arg === \"number\" || typeof arg === \"bigint\" || typeof arg === \"string\";\n}\n\nexport function isNull(arg: SimpleEntryFunctionArgumentTypes): arg is null | undefined {\n return arg === null || arg === undefined;\n}\n\nexport function isEncodedEntryFunctionArgument(\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n): arg is EntryFunctionArgumentTypes {\n return (\n isBcsBool(arg) ||\n isBcsU8(arg) ||\n isBcsU16(arg) ||\n isBcsU32(arg) ||\n isBcsU64(arg) ||\n isBcsU128(arg) ||\n isBcsU256(arg) ||\n isBcsAddress(arg) ||\n isBcsString(arg) ||\n isBcsFixedBytes(arg) ||\n arg instanceof MoveVector ||\n arg instanceof MoveOption\n );\n}\n\nexport function isBcsBool(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is Bool {\n return arg instanceof Bool;\n}\n\nexport function isBcsAddress(\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n): arg is AccountAddress {\n return arg instanceof AccountAddress;\n}\n\nexport function isBcsString(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is MoveString {\n return arg instanceof MoveString;\n}\n\nexport function isBcsFixedBytes(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is FixedBytes {\n return arg instanceof FixedBytes;\n}\n\nexport function isBcsU8(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U8 {\n return arg instanceof U8;\n}\n\nexport function isBcsU16(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U16 {\n return arg instanceof U16;\n}\n\nexport function isBcsU32(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U32 {\n return arg instanceof U32;\n}\n\nexport function isBcsU64(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U64 {\n return arg instanceof U64;\n}\n\nexport function isBcsU128(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U128 {\n return arg instanceof U128;\n}\n\nexport function isBcsU256(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U256 {\n return arg instanceof U256;\n}\n\nexport function isScriptDataInput(\n arg: InputGenerateTransactionPayloadDataWithRemoteABI | InputGenerateTransactionPayloadData,\n): arg is InputScriptData {\n return \"bytecode\" in arg;\n}\n\nexport function throwTypeMismatch(expectedType: string, position: number) {\n throw new Error(`Type mismatch for argument ${position}, expected '${expectedType}'`);\n}\n\n/**\n * Finds first non-signer arg.\n *\n * A function is often defined with a `signer` or `&signer` arguments at the start, which are filled in\n * by signatures, and not by the caller.\n * @param functionAbi\n */\nexport function findFirstNonSignerArg(functionAbi: MoveFunction): number {\n const index = functionAbi.params.findIndex((param) => param !== \"signer\" && param !== \"&signer\");\n if (index < 0) {\n return functionAbi.params.length;\n }\n return index;\n}\n\nexport function getFunctionParts(functionArg: MoveFunctionId) {\n const funcNameParts = functionArg.split(\"::\");\n if (funcNameParts.length !== 3) {\n throw new Error(`Invalid function ${functionArg}`);\n }\n const moduleAddress = funcNameParts[0];\n const moduleName = funcNameParts[1];\n const functionName = funcNameParts[2];\n return { moduleAddress, moduleName, functionName };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/transactions/transactionBuilder/helpers.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n EntryFunctionArgumentTypes,\n InputGenerateTransactionPayloadData,\n InputGenerateTransactionPayloadDataWithRemoteABI,\n InputScriptData,\n SimpleEntryFunctionArgumentTypes,\n} from \"../types\";\nimport { Bool, FixedBytes, MoveOption, MoveString, MoveVector, U128, U16, U256, U32, U64, U8 } from \"../../bcs\";\nimport { AccountAddress } from \"../../core\";\nimport { MoveFunction, MoveFunctionId } from \"../../types\";\n\nexport function isBool(arg: SimpleEntryFunctionArgumentTypes): arg is boolean {\n return typeof arg === \"boolean\";\n}\n\nexport function isString(arg: any): arg is string {\n return typeof arg === \"string\";\n}\n\nexport function isNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number {\n return typeof arg === \"number\";\n}\n\nexport function isLargeNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number | bigint | string {\n return typeof arg === \"number\" || typeof arg === \"bigint\" || typeof arg === \"string\";\n}\n\nexport function isNull(arg: SimpleEntryFunctionArgumentTypes): arg is null | undefined {\n return arg === null || arg === undefined;\n}\n\nexport function isEncodedEntryFunctionArgument(\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n): arg is EntryFunctionArgumentTypes {\n return (\n isBcsBool(arg) ||\n isBcsU8(arg) ||\n isBcsU16(arg) ||\n isBcsU32(arg) ||\n isBcsU64(arg) ||\n isBcsU128(arg) ||\n isBcsU256(arg) ||\n isBcsAddress(arg) ||\n isBcsString(arg) ||\n isBcsFixedBytes(arg) ||\n arg instanceof MoveVector ||\n arg instanceof MoveOption\n );\n}\n\nexport function isBcsBool(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is Bool {\n return arg instanceof Bool;\n}\n\nexport function isBcsAddress(\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n): arg is AccountAddress {\n return arg instanceof AccountAddress;\n}\n\nexport function isBcsString(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is MoveString {\n return arg instanceof MoveString;\n}\n\nexport function isBcsFixedBytes(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is FixedBytes {\n return arg instanceof FixedBytes;\n}\n\nexport function isBcsU8(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U8 {\n return arg instanceof U8;\n}\n\nexport function isBcsU16(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U16 {\n return arg instanceof U16;\n}\n\nexport function isBcsU32(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U32 {\n return arg instanceof U32;\n}\n\nexport function isBcsU64(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U64 {\n return arg instanceof U64;\n}\n\nexport function isBcsU128(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U128 {\n return arg instanceof U128;\n}\n\nexport function isBcsU256(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is U256 {\n return arg instanceof U256;\n}\n\nexport function isScriptDataInput(\n arg: InputGenerateTransactionPayloadDataWithRemoteABI | InputGenerateTransactionPayloadData,\n): arg is InputScriptData {\n return \"bytecode\" in arg;\n}\n\nexport function throwTypeMismatch(expectedType: string, position: number) {\n throw new Error(`Type mismatch for argument ${position}, expected '${expectedType}'`);\n}\n\n/**\n * Finds first non-signer arg.\n *\n * A function is often defined with a `signer` or `&signer` arguments at the start, which are filled in\n * by signatures, and not by the caller.\n * @param functionAbi\n */\nexport function findFirstNonSignerArg(functionAbi: MoveFunction): number {\n const index = functionAbi.params.findIndex((param) => param !== \"signer\" && param !== \"&signer\");\n if (index < 0) {\n return functionAbi.params.length;\n }\n return index;\n}\n\nexport function getFunctionParts(functionArg: MoveFunctionId) {\n const funcNameParts = functionArg.split(\"::\");\n if (funcNameParts.length !== 3) {\n throw new Error(`Invalid function ${functionArg}`);\n }\n const moduleAddress = funcNameParts[0];\n const moduleName = funcNameParts[1];\n const functionName = funcNameParts[2];\n return { moduleAddress, moduleName, functionName };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcO,SAAS,OAAO,KAAuD;AAC5E,SAAO,OAAO,QAAQ;AACxB;AAEO,SAAS,SAAS,KAAyB;AAChD,SAAO,OAAO,QAAQ;AACxB;AAEO,SAAS,SAAS,KAAsD;AAC7E,SAAO,OAAO,QAAQ;AACxB;AAEO,SAAS,cAAc,KAAwE;AACpG,SAAO,OAAO,QAAQ,YAAY,OAAO,QAAQ,YAAY,OAAO,QAAQ;AAC9E;AAEO,SAAS,OAAO,KAAgE;AACrF,SAAO,QAAQ,QAAQ,QAAQ;AACjC;AAEO,SAAS,+BACd,KACmC;AACnC,SACE,UAAU,GAAG,KACb,QAAQ,GAAG,KACX,SAAS,GAAG,KACZ,SAAS,GAAG,KACZ,SAAS,GAAG,KACZ,UAAU,GAAG,KACb,UAAU,GAAG,KACb,aAAa,GAAG,KAChB,YAAY,GAAG,KACf,gBAAgB,GAAG,KACnB,eAAe,cACf,eAAe;AAEnB;AAEO,SAAS,UAAU,KAAiF;AACzG,SAAO,eAAe;AACxB;AAEO,SAAS,aACd,KACuB;AACvB,SAAO,eAAe;AACxB;AAEO,SAAS,YAAY,KAAuF;AACjH,SAAO,eAAe;AACxB;AAEO,SAAS,gBAAgB,KAAuF;AACrH,SAAO,eAAe;AACxB;AAEO,SAAS,QAAQ,KAA+E;AACrG,SAAO,eAAe;AACxB;AAEO,SAAS,SAAS,KAAgF;AACvG,SAAO,eAAe;AACxB;AAEO,SAAS,SAAS,KAAgF;AACvG,SAAO,eAAe;AACxB;AAEO,SAAS,SAAS,KAAgF;AACvG,SAAO,eAAe;AACxB;AAEO,SAAS,UAAU,KAAiF;AACzG,SAAO,eAAe;AACxB;AAEO,SAAS,UAAU,KAAiF;AACzG,SAAO,eAAe;AACxB;AAEO,SAAS,kBACd,KACwB;AACxB,SAAO,cAAc;AACvB;AAEO,SAAS,kBAAkB,cAAsB,UAAkB;AACxE,QAAM,IAAI,MAAM,8BAA8B,QAAQ,eAAe,YAAY,GAAG;AACtF;AASO,SAAS,sBAAsB,aAAmC;AACvE,QAAM,QAAQ,YAAY,OAAO,UAAU,CAAC,UAAU,UAAU,YAAY,UAAU,SAAS;AAC/F,MAAI,QAAQ,GAAG;AACb,WAAO,YAAY,OAAO;AAAA,EAC5B;AACA,SAAO;AACT;AAEO,SAAS,iBAAiB,aAA6B;AAC5D,QAAM,gBAAgB,YAAY,MAAM,IAAI;AAC5C,MAAI,cAAc,WAAW,GAAG;AAC9B,UAAM,IAAI,MAAM,oBAAoB,WAAW,EAAE;AAAA,EACnD;AACA,QAAM,gBAAgB,cAAc,CAAC;AACrC,QAAM,aAAa,cAAc,CAAC;AAClC,QAAM,eAAe,cAAc,CAAC;AACpC,SAAO,EAAE,eAAe,YAAY,aAAa;AACnD;","names":[]}
|
package/dist/esm/cli/index.mjs
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
LocalNode
|
|
3
|
+
} from "../chunk-SS3NUM5L.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Move
|
|
6
|
+
} from "../chunk-N4WKFNQ6.mjs";
|
|
7
|
+
import "../chunk-GGMTQAQP.mjs";
|
|
8
|
+
import "../chunk-OR7TEZ25.mjs";
|
|
9
|
+
export {
|
|
10
|
+
LocalNode,
|
|
11
|
+
Move
|
|
12
|
+
};
|
|
2
13
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
LocalNode
|
|
3
|
+
} from "../chunk-SS3NUM5L.mjs";
|
|
4
|
+
import "../chunk-GGMTQAQP.mjs";
|
|
5
|
+
import "../chunk-OR7TEZ25.mjs";
|
|
6
|
+
export {
|
|
7
|
+
LocalNode
|
|
8
|
+
};
|
|
2
9
|
//# sourceMappingURL=localNode.mjs.map
|
package/dist/esm/cli/move.mjs
CHANGED
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
aptosRequest,
|
|
3
|
+
request
|
|
4
|
+
} from "../chunk-VKJQORON.mjs";
|
|
5
|
+
import "../chunk-GED6IT3S.mjs";
|
|
6
|
+
import "../chunk-QBBTUC66.mjs";
|
|
7
|
+
import "../chunk-PCLNX6FS.mjs";
|
|
8
|
+
import "../chunk-7REUIYF4.mjs";
|
|
9
|
+
import "../chunk-D2BVBXWO.mjs";
|
|
10
|
+
import "../chunk-NFJCQRVK.mjs";
|
|
11
|
+
import "../chunk-FZY4PMEE.mjs";
|
|
12
|
+
import "../chunk-PIMQHG2J.mjs";
|
|
13
|
+
import "../chunk-KK2BSALW.mjs";
|
|
14
|
+
import "../chunk-AR7X6GWQ.mjs";
|
|
15
|
+
import "../chunk-WK5ZSNE2.mjs";
|
|
16
|
+
import "../chunk-CX3NAVRD.mjs";
|
|
17
|
+
import "../chunk-4WPQQPUF.mjs";
|
|
18
|
+
import "../chunk-7JRMOHBP.mjs";
|
|
19
|
+
import "../chunk-FQQW55X7.mjs";
|
|
20
|
+
import "../chunk-YV7M4CFP.mjs";
|
|
21
|
+
import "../chunk-QMM2KL6C.mjs";
|
|
22
|
+
import "../chunk-SBB4YEPT.mjs";
|
|
23
|
+
import "../chunk-OR7TEZ25.mjs";
|
|
24
|
+
export {
|
|
25
|
+
aptosRequest,
|
|
26
|
+
request
|
|
27
|
+
};
|
|
2
28
|
//# sourceMappingURL=core.mjs.map
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
get,
|
|
3
|
+
getAptosFullNode,
|
|
4
|
+
getAptosPepperService,
|
|
5
|
+
paginateWithCursor
|
|
6
|
+
} from "../chunk-LYK4TQZO.mjs";
|
|
7
|
+
import "../chunk-VKJQORON.mjs";
|
|
8
|
+
import "../chunk-GED6IT3S.mjs";
|
|
9
|
+
import "../chunk-QBBTUC66.mjs";
|
|
10
|
+
import "../chunk-PCLNX6FS.mjs";
|
|
11
|
+
import "../chunk-7REUIYF4.mjs";
|
|
12
|
+
import "../chunk-D2BVBXWO.mjs";
|
|
13
|
+
import "../chunk-NFJCQRVK.mjs";
|
|
14
|
+
import "../chunk-FZY4PMEE.mjs";
|
|
15
|
+
import "../chunk-PIMQHG2J.mjs";
|
|
16
|
+
import "../chunk-KK2BSALW.mjs";
|
|
17
|
+
import "../chunk-AR7X6GWQ.mjs";
|
|
18
|
+
import "../chunk-WK5ZSNE2.mjs";
|
|
19
|
+
import "../chunk-CX3NAVRD.mjs";
|
|
20
|
+
import "../chunk-4WPQQPUF.mjs";
|
|
21
|
+
import "../chunk-7JRMOHBP.mjs";
|
|
22
|
+
import "../chunk-FQQW55X7.mjs";
|
|
23
|
+
import "../chunk-YV7M4CFP.mjs";
|
|
24
|
+
import "../chunk-QMM2KL6C.mjs";
|
|
25
|
+
import "../chunk-SBB4YEPT.mjs";
|
|
26
|
+
import "../chunk-OR7TEZ25.mjs";
|
|
27
|
+
export {
|
|
28
|
+
get,
|
|
29
|
+
getAptosFullNode,
|
|
30
|
+
getAptosPepperService,
|
|
31
|
+
paginateWithCursor
|
|
32
|
+
};
|
|
2
33
|
//# sourceMappingURL=get.mjs.map
|