@aptos-labs/ts-sdk 1.29.1 → 1.31.0
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/README.md +2 -2
- package/dist/common/{accountAddress-DUCC2ffJ.d.ts → accountAddress-DnSqjhSl.d.ts} +700 -245
- package/dist/common/{chunk-HBPH2AD3.js → chunk-7IYTZDXV.js} +1 -1
- package/dist/common/chunk-7IYTZDXV.js.map +1 -0
- package/dist/common/cli/index.d.ts +123 -126
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +5919 -1627
- package/dist/common/index.js +11 -9
- package/dist/common/index.js.map +1 -1
- package/dist/esm/Ed25519Account-DpH9qAcg.d.mts +470 -0
- package/dist/esm/account/AbstractKeylessAccount.d.mts +5 -5
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +49 -14
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +37 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +54 -34
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -2
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +448 -161
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +369 -122
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +40 -7
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +102 -14
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +52 -15
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +710 -300
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +129 -26
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +44 -7
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +152 -49
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +171 -55
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +2 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +86 -14
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +51 -7
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +86 -17
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +118 -38
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +440 -109
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +99 -13
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/helpers.d.mts +79 -0
- package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +111 -12
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +97 -3
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +140 -15
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +104 -13
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +26 -3
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +82 -32
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +25 -6
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +51 -21
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +79 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +119 -32
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +111 -76
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/chunk-22ZSW5EN.mjs +2 -0
- package/dist/esm/chunk-22ZSW5EN.mjs.map +1 -0
- package/dist/esm/{chunk-7V6DEA7G.mjs → chunk-2652SPOM.mjs} +2 -2
- package/dist/esm/chunk-2652SPOM.mjs.map +1 -0
- package/dist/esm/chunk-2CGJLPHP.mjs +2 -0
- package/dist/esm/{chunk-555I4YHP.mjs.map → chunk-2CGJLPHP.mjs.map} +1 -1
- package/dist/esm/{chunk-U6Z4FNB7.mjs → chunk-2CJC43CV.mjs} +1 -1
- package/dist/esm/chunk-2CJC43CV.mjs.map +1 -0
- package/dist/esm/{chunk-PUZ25PTD.mjs → chunk-2GEIHUHT.mjs} +2 -2
- package/dist/esm/chunk-2GEIHUHT.mjs.map +1 -0
- package/dist/esm/{chunk-FRGXKOU5.mjs → chunk-3H5DGQKX.mjs} +2 -2
- package/dist/esm/chunk-3H5DGQKX.mjs.map +1 -0
- package/dist/esm/chunk-4CDDWSKZ.mjs +2 -0
- package/dist/esm/chunk-4CDDWSKZ.mjs.map +1 -0
- package/dist/esm/{chunk-L5NY7TMI.mjs → chunk-4JXB6V5O.mjs} +2 -2
- package/dist/esm/chunk-4JXB6V5O.mjs.map +1 -0
- package/dist/esm/{chunk-5655UVIK.mjs → chunk-4LKLOUMG.mjs} +2 -2
- package/dist/esm/chunk-4LKLOUMG.mjs.map +1 -0
- package/dist/esm/chunk-4OV7QU2U.mjs +2 -0
- package/dist/esm/chunk-4OV7QU2U.mjs.map +1 -0
- package/dist/esm/chunk-4VU2ABLU.mjs +2 -0
- package/dist/esm/chunk-4VU2ABLU.mjs.map +1 -0
- package/dist/esm/{chunk-25NSCK4Q.mjs → chunk-4ZK3JNQT.mjs} +2 -2
- package/dist/esm/chunk-4ZK3JNQT.mjs.map +1 -0
- package/dist/esm/{chunk-SWHLSREF.mjs → chunk-5N6KJ7KS.mjs} +2 -2
- package/dist/esm/chunk-5N6KJ7KS.mjs.map +1 -0
- package/dist/esm/{chunk-WWZ3METZ.mjs → chunk-5S3Z7MT4.mjs} +2 -2
- package/dist/esm/chunk-5S3Z7MT4.mjs.map +1 -0
- package/dist/esm/{chunk-46D5QX3G.mjs → chunk-5SGSPCOY.mjs} +2 -2
- package/dist/esm/chunk-5SGSPCOY.mjs.map +1 -0
- package/dist/esm/chunk-6DMDYBV6.mjs +2 -0
- package/dist/esm/chunk-6DMDYBV6.mjs.map +1 -0
- package/dist/esm/chunk-6FLHGOKP.mjs +2 -0
- package/dist/esm/chunk-6FLHGOKP.mjs.map +1 -0
- package/dist/esm/{chunk-LG7RJQ57.mjs → chunk-6Q2O5G3J.mjs} +1 -1
- package/dist/esm/chunk-6Q2O5G3J.mjs.map +1 -0
- package/dist/esm/{chunk-BRFHAO2Y.mjs → chunk-73GCGRFW.mjs} +2 -2
- package/dist/esm/chunk-73GCGRFW.mjs.map +1 -0
- package/dist/esm/{chunk-XK3JFCP3.mjs → chunk-7JK7UG4E.mjs} +2 -2
- package/dist/esm/chunk-7JK7UG4E.mjs.map +1 -0
- package/dist/esm/{chunk-44GYWUSH.mjs → chunk-7XS45O6M.mjs} +1 -1
- package/dist/esm/chunk-7XS45O6M.mjs.map +1 -0
- package/dist/esm/{chunk-RNTXQYJQ.mjs → chunk-A2AEFKXS.mjs} +2 -2
- package/dist/esm/chunk-A2AEFKXS.mjs.map +1 -0
- package/dist/esm/{chunk-E37YRKWK.mjs → chunk-AGBA3Y7A.mjs} +2 -2
- package/dist/esm/chunk-AGBA3Y7A.mjs.map +1 -0
- package/dist/esm/chunk-AITN3DO4.mjs +2 -0
- package/dist/esm/chunk-AITN3DO4.mjs.map +1 -0
- package/dist/esm/{chunk-OY2IX7HW.mjs → chunk-AT2ZGTXQ.mjs} +2 -2
- package/dist/esm/chunk-AT2ZGTXQ.mjs.map +1 -0
- package/dist/esm/{chunk-TVFIUUVY.mjs → chunk-AZ6LVQEG.mjs} +2 -2
- package/dist/esm/chunk-AZ6LVQEG.mjs.map +1 -0
- package/dist/esm/chunk-BAGUHYFD.mjs +2 -0
- package/dist/esm/chunk-BAGUHYFD.mjs.map +1 -0
- package/dist/esm/{chunk-EWZ2M5BW.mjs → chunk-BG2TZI3H.mjs} +2 -2
- package/dist/esm/chunk-BG2TZI3H.mjs.map +1 -0
- package/dist/esm/chunk-BOWPP6YG.mjs +2 -0
- package/dist/esm/chunk-BOWPP6YG.mjs.map +1 -0
- package/dist/esm/{chunk-GFGX3QDP.mjs → chunk-BVVHGSWC.mjs} +2 -2
- package/dist/esm/chunk-BVVHGSWC.mjs.map +1 -0
- package/dist/esm/{chunk-BD6BJETG.mjs → chunk-CC7VOPYH.mjs} +2 -2
- package/dist/esm/chunk-CC7VOPYH.mjs.map +1 -0
- package/dist/esm/{chunk-K2O24YLZ.mjs → chunk-CDQGPCHU.mjs} +2 -2
- package/dist/esm/chunk-CDQGPCHU.mjs.map +1 -0
- package/dist/esm/{chunk-HSPBA2TZ.mjs → chunk-CL6EEMSL.mjs} +2 -2
- package/dist/esm/chunk-CL6EEMSL.mjs.map +1 -0
- package/dist/esm/{chunk-SCHZ67F3.mjs → chunk-D3OEQLUE.mjs} +1 -1
- package/dist/esm/{chunk-SCHZ67F3.mjs.map → chunk-D3OEQLUE.mjs.map} +1 -1
- package/dist/esm/{chunk-NNRAQP36.mjs → chunk-DMSHPWA5.mjs} +2 -2
- package/dist/esm/chunk-DMSHPWA5.mjs.map +1 -0
- package/dist/esm/{chunk-STGYDB5E.mjs → chunk-EE7GDBA5.mjs} +2 -2
- package/dist/esm/chunk-EE7GDBA5.mjs.map +1 -0
- package/dist/esm/{chunk-CPPBQDHB.mjs → chunk-EUGLLGYW.mjs} +2 -2
- package/dist/esm/chunk-EUGLLGYW.mjs.map +1 -0
- package/dist/esm/{chunk-CVDR5SJR.mjs → chunk-F2RY4YQ7.mjs} +2 -2
- package/dist/esm/chunk-F2RY4YQ7.mjs.map +1 -0
- package/dist/esm/chunk-FTZGP6XW.mjs +2 -0
- package/dist/esm/chunk-FTZGP6XW.mjs.map +1 -0
- package/dist/esm/{chunk-6RZZIOGH.mjs → chunk-GLATLXF6.mjs} +2 -2
- package/dist/esm/chunk-GLATLXF6.mjs.map +1 -0
- package/dist/esm/{chunk-SRPI2FFA.mjs → chunk-GMKKHGXK.mjs} +1 -1
- package/dist/esm/chunk-GMKKHGXK.mjs.map +1 -0
- package/dist/esm/{chunk-TDGQGILY.mjs → chunk-GQABU3RQ.mjs} +1 -1
- package/dist/esm/chunk-GQABU3RQ.mjs.map +1 -0
- package/dist/esm/{chunk-AH44UPM4.mjs → chunk-HBIDHQ2M.mjs} +1 -1
- package/dist/esm/chunk-HBIDHQ2M.mjs.map +1 -0
- package/dist/esm/chunk-HM5HITUC.mjs +4 -0
- package/dist/esm/chunk-HM5HITUC.mjs.map +1 -0
- package/dist/esm/{chunk-6EMN3BOV.mjs → chunk-I2NMCLNW.mjs} +1 -1
- package/dist/esm/chunk-I2NMCLNW.mjs.map +1 -0
- package/dist/esm/{chunk-NH2S6SB2.mjs → chunk-IAVI3H4V.mjs} +2 -2
- package/dist/esm/chunk-IAVI3H4V.mjs.map +1 -0
- package/dist/esm/chunk-IBLZ6MZU.mjs +2 -0
- package/dist/esm/chunk-IBLZ6MZU.mjs.map +1 -0
- package/dist/esm/chunk-IECDO22V.mjs +2 -0
- package/dist/esm/chunk-IECDO22V.mjs.map +1 -0
- package/dist/esm/{chunk-3YKAGVHZ.mjs → chunk-IFXUWUP2.mjs} +2 -2
- package/dist/esm/chunk-IFXUWUP2.mjs.map +1 -0
- package/dist/esm/{chunk-EXP5STXZ.mjs → chunk-J245N3XF.mjs} +1 -1
- package/dist/esm/chunk-J245N3XF.mjs.map +1 -0
- package/dist/esm/{chunk-MS4MRLGA.mjs → chunk-JGNMNCQB.mjs} +2 -2
- package/dist/esm/chunk-JGNMNCQB.mjs.map +1 -0
- package/dist/esm/{chunk-SR24OGHJ.mjs → chunk-JN36BNWA.mjs} +2 -2
- package/dist/esm/chunk-JN36BNWA.mjs.map +1 -0
- package/dist/esm/{chunk-DAXKRXRK.mjs → chunk-JNRMHDRA.mjs} +2 -2
- package/dist/esm/chunk-JNRMHDRA.mjs.map +1 -0
- package/dist/esm/{chunk-SAPUZZEU.mjs → chunk-JVTDP4KV.mjs} +2 -2
- package/dist/esm/chunk-JVTDP4KV.mjs.map +1 -0
- package/dist/esm/{chunk-FVA2OPG4.mjs → chunk-KDMSOCZY.mjs} +1 -1
- package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-KFNDDPOW.mjs} +2 -2
- package/dist/esm/chunk-KFNDDPOW.mjs.map +1 -0
- package/dist/esm/chunk-KIW54KWR.mjs +2 -0
- package/dist/esm/{chunk-QPP6BX53.mjs → chunk-KM6UXNC7.mjs} +2 -2
- package/dist/esm/chunk-KM6UXNC7.mjs.map +1 -0
- package/dist/esm/{chunk-PKXEB7XP.mjs → chunk-KRVLR3L4.mjs} +2 -2
- package/dist/esm/chunk-KRVLR3L4.mjs.map +1 -0
- package/dist/esm/{chunk-XH7YKEYR.mjs → chunk-KW4FVBDD.mjs} +2 -2
- package/dist/esm/chunk-KW4FVBDD.mjs.map +1 -0
- package/dist/esm/{chunk-AFOPNDOJ.mjs → chunk-KYJU5PWF.mjs} +2 -2
- package/dist/esm/chunk-KYJU5PWF.mjs.map +1 -0
- package/dist/esm/{chunk-X4KEZTUQ.mjs → chunk-L5J3V3HW.mjs} +2 -2
- package/dist/esm/chunk-L5J3V3HW.mjs.map +1 -0
- package/dist/esm/{chunk-LDFTE4MM.mjs → chunk-LDZPO76C.mjs} +2 -2
- package/dist/esm/chunk-LDZPO76C.mjs.map +1 -0
- package/dist/esm/{chunk-UAL27G6B.mjs → chunk-LEKBJ2EG.mjs} +1 -1
- package/dist/esm/chunk-LEKBJ2EG.mjs.map +1 -0
- package/dist/esm/{chunk-YHAPZP5A.mjs → chunk-M22UGFQ5.mjs} +2 -2
- package/dist/esm/chunk-M22UGFQ5.mjs.map +1 -0
- package/dist/esm/{chunk-TMW2HIXC.mjs → chunk-MK2QAHXC.mjs} +2 -2
- package/dist/esm/chunk-MK2QAHXC.mjs.map +1 -0
- package/dist/esm/{chunk-QCUFTD7K.mjs → chunk-MSHZ4FWB.mjs} +2 -2
- package/dist/esm/chunk-MSHZ4FWB.mjs.map +1 -0
- package/dist/esm/{chunk-KEYAPEAX.mjs → chunk-N47FTRYO.mjs} +1 -1
- package/dist/esm/chunk-N47FTRYO.mjs.map +1 -0
- package/dist/esm/{chunk-QIW56MUH.mjs → chunk-NODYW7DM.mjs} +2 -2
- package/dist/esm/chunk-NODYW7DM.mjs.map +1 -0
- package/dist/esm/chunk-OAEDFM7T.mjs +2 -0
- package/dist/esm/chunk-OAEDFM7T.mjs.map +1 -0
- package/dist/esm/chunk-ONBFUPEC.mjs +2 -0
- package/dist/esm/chunk-ONBFUPEC.mjs.map +1 -0
- package/dist/esm/chunk-OTY3NO7Q.mjs +2 -0
- package/dist/esm/chunk-OTY3NO7Q.mjs.map +1 -0
- package/dist/esm/{chunk-ZGO2SK6F.mjs → chunk-OXM4BVAY.mjs} +2 -2
- package/dist/esm/chunk-OXM4BVAY.mjs.map +1 -0
- package/dist/esm/{chunk-YJCZU6PR.mjs → chunk-OZN3OOJV.mjs} +2 -2
- package/dist/esm/chunk-OZN3OOJV.mjs.map +1 -0
- package/dist/esm/{chunk-DAJOX4PL.mjs → chunk-P3J54CQG.mjs} +2 -2
- package/dist/esm/chunk-P3J54CQG.mjs.map +1 -0
- package/dist/esm/{chunk-WP7WF54Q.mjs → chunk-PCLU4KLY.mjs} +2 -2
- package/dist/esm/chunk-PCLU4KLY.mjs.map +1 -0
- package/dist/esm/{chunk-LR65XHSF.mjs → chunk-PHP47DI4.mjs} +2 -2
- package/dist/esm/chunk-PHP47DI4.mjs.map +1 -0
- package/dist/esm/chunk-PRZ7AIGA.mjs +2 -0
- package/dist/esm/chunk-PRZ7AIGA.mjs.map +1 -0
- package/dist/esm/chunk-QQIVWB6G.mjs +2 -0
- package/dist/esm/chunk-QQIVWB6G.mjs.map +1 -0
- package/dist/esm/{chunk-TS3PYRAT.mjs → chunk-RAJTNQNL.mjs} +2 -2
- package/dist/esm/chunk-RAJTNQNL.mjs.map +1 -0
- package/dist/esm/{chunk-XONG5JZ4.mjs → chunk-RBJNSUSU.mjs} +2 -2
- package/dist/esm/chunk-RBJNSUSU.mjs.map +1 -0
- package/dist/esm/{chunk-EV2USF7B.mjs → chunk-RNJHULIT.mjs} +2 -2
- package/dist/esm/chunk-RNJHULIT.mjs.map +1 -0
- package/dist/esm/{chunk-IYQISVDX.mjs → chunk-RNRNGJDA.mjs} +2 -2
- package/dist/esm/chunk-RNRNGJDA.mjs.map +1 -0
- package/dist/esm/{chunk-N5JNKD5F.mjs → chunk-SGQFWWLQ.mjs} +2 -2
- package/dist/esm/chunk-SGQFWWLQ.mjs.map +1 -0
- package/dist/esm/{chunk-7ZLBJUVZ.mjs → chunk-SOLWFAUY.mjs} +2 -2
- package/dist/esm/chunk-SOLWFAUY.mjs.map +1 -0
- package/dist/esm/{chunk-MO4IZXLK.mjs → chunk-T5BCTWGK.mjs} +2 -2
- package/dist/esm/chunk-T5BCTWGK.mjs.map +1 -0
- package/dist/esm/{chunk-U67PFBTL.mjs → chunk-TPJLAYW6.mjs} +2 -2
- package/dist/esm/chunk-TPJLAYW6.mjs.map +1 -0
- package/dist/esm/{chunk-XXHW3ZT3.mjs → chunk-UCRROMZN.mjs} +2 -2
- package/dist/esm/chunk-UCRROMZN.mjs.map +1 -0
- package/dist/esm/{chunk-QLN2URFX.mjs → chunk-UGL2GPGK.mjs} +2 -2
- package/dist/esm/chunk-UGL2GPGK.mjs.map +1 -0
- package/dist/esm/{chunk-NMD45OTM.mjs → chunk-V5NDNR36.mjs} +2 -2
- package/dist/esm/chunk-V5NDNR36.mjs.map +1 -0
- package/dist/esm/{chunk-KYSDF3CA.mjs → chunk-VYMRIKUV.mjs} +2 -2
- package/dist/esm/chunk-VYMRIKUV.mjs.map +1 -0
- package/dist/esm/{chunk-KXBIA4KR.mjs → chunk-WSZCPSV4.mjs} +2 -2
- package/dist/esm/chunk-WSZCPSV4.mjs.map +1 -0
- package/dist/esm/{chunk-B2CXRZL5.mjs → chunk-WV2VJQDS.mjs} +2 -2
- package/dist/esm/chunk-WV2VJQDS.mjs.map +1 -0
- package/dist/esm/{chunk-B6M7QBUO.mjs → chunk-WZCKSN2U.mjs} +2 -2
- package/dist/esm/chunk-WZCKSN2U.mjs.map +1 -0
- package/dist/esm/{chunk-25TIHDS6.mjs → chunk-XFJD6QIP.mjs} +2 -2
- package/dist/esm/chunk-XFJD6QIP.mjs.map +1 -0
- package/dist/esm/{chunk-ECWOLU5T.mjs → chunk-XFY4O2S3.mjs} +2 -2
- package/dist/esm/chunk-XFY4O2S3.mjs.map +1 -0
- package/dist/esm/chunk-XOCRDV2V.mjs +2 -0
- package/dist/esm/chunk-XOCRDV2V.mjs.map +1 -0
- package/dist/esm/{chunk-TL7DR54X.mjs → chunk-XQ7ONNII.mjs} +2 -2
- package/dist/esm/chunk-XQ7ONNII.mjs.map +1 -0
- package/dist/esm/chunk-Y267I7DC.mjs +2 -0
- package/dist/esm/chunk-Y267I7DC.mjs.map +1 -0
- package/dist/esm/{chunk-G7MWTE2J.mjs → chunk-YZ5BCOGI.mjs} +2 -2
- package/dist/esm/{chunk-LXLISEQ4.mjs → chunk-ZINOJTLU.mjs} +2 -2
- package/dist/esm/chunk-ZINOJTLU.mjs.map +1 -0
- package/dist/esm/{chunk-2TQIU7CG.mjs → chunk-ZPIMARUG.mjs} +2 -2
- package/dist/esm/chunk-ZPIMARUG.mjs.map +1 -0
- package/dist/esm/chunk-ZPQUCT22.mjs +2 -0
- package/dist/esm/chunk-ZPQUCT22.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +26 -10
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +104 -123
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.d.mts +21 -6
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +34 -6
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +63 -6
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.d.mts +21 -8
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +63 -48
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.d.mts +6 -0
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +77 -26
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +36 -14
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -14
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.d.mts +9 -6
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +126 -45
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +45 -6
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +58 -7
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +35 -5
- package/dist/esm/core/crypto/poseidon.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +10 -6
- package/dist/esm/core/crypto/proof.d.mts +2 -6
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +72 -27
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +5 -4
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +63 -5
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.d.mts +27 -28
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +191 -12
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +206 -14
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +13 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +330 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +39 -0
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +14 -0
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +48 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +46 -0
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +41 -4
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +21 -0
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +26 -0
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +33 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +107 -5
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +72 -29
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/publicKey-_tPa99ea.d.mts +151 -0
- package/dist/esm/transactions/authenticator/account.d.mts +66 -17
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +53 -20
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +20 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +21 -3
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +22 -8
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +24 -8
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +31 -4
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +25 -3
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +29 -7
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +23 -8
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +23 -0
- package/dist/esm/transactions/instances/transactionPayload.d.mts +72 -26
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +37 -11
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/asyncQueue.d.mts +22 -19
- package/dist/esm/transactions/management/asyncQueue.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +67 -36
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +74 -4
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +45 -23
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +20 -15
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +101 -30
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +244 -3
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +31 -2
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +82 -34
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/index.d.mts +320 -59
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +65 -2
- package/dist/esm/types/keyless.d.mts +18 -0
- package/dist/esm/utils/apiEndpoints.d.mts +3 -0
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +2 -4
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +25 -10
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/memoize.d.mts +12 -10
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +11 -5
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +3 -2
- package/src/account/AbstractKeylessAccount.ts +4 -3
- package/src/account/Account.ts +88 -54
- package/src/account/Ed25519Account.ts +56 -21
- package/src/account/EphemeralKeyPair.ts +50 -15
- package/src/account/FederatedKeylessAccount.ts +1 -1
- package/src/account/KeylessAccount.ts +37 -1
- package/src/account/MultiKeyAccount.ts +56 -35
- package/src/account/SingleKeyAccount.ts +60 -28
- package/src/api/account.ts +454 -160
- package/src/api/ans.ts +367 -120
- package/src/api/aptos.ts +38 -5
- package/src/api/aptosConfig.ts +102 -14
- package/src/api/coin.ts +49 -12
- package/src/api/digitalAsset.ts +707 -296
- package/src/api/event.ts +128 -25
- package/src/api/faucet.ts +44 -7
- package/src/api/fungibleAsset.ts +149 -46
- package/src/api/general.ts +168 -52
- package/src/api/keyless.ts +119 -22
- package/src/api/object.ts +49 -5
- package/src/api/staking.ts +84 -15
- package/src/api/table.ts +117 -37
- package/src/api/transaction.ts +438 -107
- package/src/api/transactionSubmission/build.ts +98 -12
- package/src/api/transactionSubmission/helpers.ts +79 -0
- package/src/api/transactionSubmission/management.ts +110 -10
- package/src/api/transactionSubmission/sign.ts +96 -2
- package/src/api/transactionSubmission/simulate.ts +139 -14
- package/src/api/transactionSubmission/submit.ts +103 -12
- package/src/api/utils.ts +26 -3
- package/src/bcs/deserializer.ts +82 -32
- package/src/bcs/serializable/entryFunctionBytes.ts +27 -6
- package/src/bcs/serializable/fixedBytes.ts +55 -25
- package/src/bcs/serializable/movePrimitives.ts +91 -0
- package/src/bcs/serializable/moveStructs.ts +123 -35
- package/src/bcs/serializer.ts +131 -84
- package/src/cli/localNode.ts +46 -17
- package/src/cli/move.ts +135 -137
- package/src/client/core.ts +22 -7
- package/src/client/get.ts +34 -6
- package/src/client/post.ts +63 -6
- package/src/client/types.ts +40 -13
- package/src/core/account/utils/address.ts +1 -1
- package/src/core/accountAddress.ts +63 -50
- package/src/core/authenticationKey.ts +47 -20
- package/src/core/common.ts +6 -0
- package/src/core/crypto/ed25519.ts +76 -25
- package/src/core/crypto/ephemeral.ts +37 -21
- package/src/core/crypto/federatedKeyless.ts +1 -20
- package/src/core/crypto/hdKey.ts +10 -7
- package/src/core/crypto/keyless.ts +140 -63
- package/src/core/crypto/multiEd25519.ts +44 -5
- package/src/core/crypto/multiKey.ts +66 -19
- package/src/core/crypto/poseidon.ts +72 -5
- package/src/core/crypto/privateKey.ts +9 -5
- package/src/core/crypto/proof.ts +3 -12
- package/src/core/crypto/publicKey.ts +15 -5
- package/src/core/crypto/secp256k1.ts +76 -26
- package/src/core/crypto/signature.ts +7 -4
- package/src/core/crypto/singleKey.ts +62 -5
- package/src/core/hex.ts +27 -28
- package/src/internal/account.ts +248 -12
- package/src/internal/ans.ts +219 -15
- package/src/internal/coin.ts +12 -0
- package/src/internal/digitalAsset.ts +344 -3
- package/src/internal/event.ts +51 -0
- package/src/internal/faucet.ts +14 -0
- package/src/internal/fungibleAsset.ts +46 -0
- package/src/internal/general.ts +46 -0
- package/src/internal/keyless.ts +41 -3
- package/src/internal/object.ts +21 -0
- package/src/internal/queries/getTableItemsData.graphql +1 -1
- package/src/internal/queries/getTableItemsMetadata.graphql +1 -1
- package/src/internal/staking.ts +27 -1
- package/src/internal/table.ts +32 -0
- package/src/internal/transaction.ts +120 -7
- package/src/internal/transactionSubmission.ts +86 -30
- package/src/transactions/authenticator/account.ts +65 -16
- package/src/transactions/authenticator/transaction.ts +52 -19
- package/src/transactions/instances/chainId.ts +20 -1
- package/src/transactions/instances/identifier.ts +21 -3
- package/src/transactions/instances/moduleId.ts +22 -8
- package/src/transactions/instances/multiAgentTransaction.ts +26 -10
- package/src/transactions/instances/rawTransaction.ts +31 -4
- package/src/transactions/instances/rotationProofChallenge.ts +24 -2
- package/src/transactions/instances/signedTransaction.ts +28 -6
- package/src/transactions/instances/simpleTransaction.ts +26 -11
- package/src/transactions/instances/transactionArgument.ts +26 -0
- package/src/transactions/instances/transactionPayload.ts +73 -26
- package/src/transactions/management/accountSequenceNumber.ts +38 -11
- package/src/transactions/management/asyncQueue.ts +22 -19
- package/src/transactions/management/transactionWorker.ts +66 -40
- package/src/transactions/transactionBuilder/helpers.ts +130 -3
- package/src/transactions/transactionBuilder/remoteAbi.ts +71 -30
- package/src/transactions/transactionBuilder/signingMessage.ts +19 -14
- package/src/transactions/transactionBuilder/transactionBuilder.ts +153 -40
- package/src/transactions/typeTag/index.ts +264 -3
- package/src/transactions/typeTag/parser.ts +54 -20
- package/src/transactions/types.ts +81 -33
- package/src/types/index.ts +338 -61
- package/src/types/indexer.ts +82 -2
- package/src/types/keyless.ts +21 -0
- package/src/utils/apiEndpoints.ts +3 -0
- package/src/utils/const.ts +2 -4
- package/src/utils/helpers.ts +25 -10
- package/src/utils/memoize.ts +12 -10
- package/src/utils/normalizeBundle.ts +11 -5
- package/src/version.ts +1 -1
- package/dist/common/chunk-HBPH2AD3.js.map +0 -1
- package/dist/esm/Ed25519Account-B1VMJOY2.d.mts +0 -361
- package/dist/esm/chunk-25NSCK4Q.mjs.map +0 -1
- package/dist/esm/chunk-25TIHDS6.mjs.map +0 -1
- package/dist/esm/chunk-2TQIU7CG.mjs.map +0 -1
- package/dist/esm/chunk-3MCYLML2.mjs +0 -2
- package/dist/esm/chunk-3MCYLML2.mjs.map +0 -1
- package/dist/esm/chunk-3YKAGVHZ.mjs.map +0 -1
- package/dist/esm/chunk-44GYWUSH.mjs.map +0 -1
- package/dist/esm/chunk-46D5QX3G.mjs.map +0 -1
- package/dist/esm/chunk-555I4YHP.mjs +0 -2
- package/dist/esm/chunk-5655UVIK.mjs.map +0 -1
- package/dist/esm/chunk-6EMN3BOV.mjs.map +0 -1
- package/dist/esm/chunk-6QGVRNV6.mjs +0 -2
- package/dist/esm/chunk-6QGVRNV6.mjs.map +0 -1
- package/dist/esm/chunk-6RZZIOGH.mjs.map +0 -1
- package/dist/esm/chunk-7V6DEA7G.mjs.map +0 -1
- package/dist/esm/chunk-7ZLBJUVZ.mjs.map +0 -1
- package/dist/esm/chunk-AFOPNDOJ.mjs.map +0 -1
- package/dist/esm/chunk-AH44UPM4.mjs.map +0 -1
- package/dist/esm/chunk-B2CXRZL5.mjs.map +0 -1
- package/dist/esm/chunk-B5NYEWNM.mjs +0 -2
- package/dist/esm/chunk-B5NYEWNM.mjs.map +0 -1
- package/dist/esm/chunk-B6M7QBUO.mjs.map +0 -1
- package/dist/esm/chunk-BCUSI3N6.mjs.map +0 -1
- package/dist/esm/chunk-BD6BJETG.mjs.map +0 -1
- package/dist/esm/chunk-BF4ZE37Q.mjs +0 -2
- package/dist/esm/chunk-BF4ZE37Q.mjs.map +0 -1
- package/dist/esm/chunk-BKEJMQQ6.mjs +0 -2
- package/dist/esm/chunk-BKEJMQQ6.mjs.map +0 -1
- package/dist/esm/chunk-BRFHAO2Y.mjs.map +0 -1
- package/dist/esm/chunk-BSUYPXRD.mjs +0 -2
- package/dist/esm/chunk-BSUYPXRD.mjs.map +0 -1
- package/dist/esm/chunk-CCMHWJ3Q.mjs +0 -2
- package/dist/esm/chunk-CCMHWJ3Q.mjs.map +0 -1
- package/dist/esm/chunk-CPPBQDHB.mjs.map +0 -1
- package/dist/esm/chunk-CVDR5SJR.mjs.map +0 -1
- package/dist/esm/chunk-DAJOX4PL.mjs.map +0 -1
- package/dist/esm/chunk-DAXKRXRK.mjs.map +0 -1
- package/dist/esm/chunk-DF4WKSTK.mjs +0 -2
- package/dist/esm/chunk-DF4WKSTK.mjs.map +0 -1
- package/dist/esm/chunk-E37YRKWK.mjs.map +0 -1
- package/dist/esm/chunk-ECWOLU5T.mjs.map +0 -1
- package/dist/esm/chunk-EV2USF7B.mjs.map +0 -1
- package/dist/esm/chunk-EWZ2M5BW.mjs.map +0 -1
- package/dist/esm/chunk-EXP5STXZ.mjs.map +0 -1
- package/dist/esm/chunk-FRGXKOU5.mjs.map +0 -1
- package/dist/esm/chunk-GFGX3QDP.mjs.map +0 -1
- package/dist/esm/chunk-GGR3P2TG.mjs +0 -2
- package/dist/esm/chunk-GGR3P2TG.mjs.map +0 -1
- package/dist/esm/chunk-HAT5S2XX.mjs +0 -2
- package/dist/esm/chunk-HAT5S2XX.mjs.map +0 -1
- package/dist/esm/chunk-HPZ2S4FE.mjs +0 -2
- package/dist/esm/chunk-HPZ2S4FE.mjs.map +0 -1
- package/dist/esm/chunk-HSPBA2TZ.mjs.map +0 -1
- package/dist/esm/chunk-IMGLHDIA.mjs +0 -2
- package/dist/esm/chunk-IMGLHDIA.mjs.map +0 -1
- package/dist/esm/chunk-IYQISVDX.mjs.map +0 -1
- package/dist/esm/chunk-K2O24YLZ.mjs.map +0 -1
- package/dist/esm/chunk-KA6FZNWP.mjs +0 -2
- package/dist/esm/chunk-KA6FZNWP.mjs.map +0 -1
- package/dist/esm/chunk-KEYAPEAX.mjs.map +0 -1
- package/dist/esm/chunk-KXBIA4KR.mjs.map +0 -1
- package/dist/esm/chunk-KYSDF3CA.mjs.map +0 -1
- package/dist/esm/chunk-L5NY7TMI.mjs.map +0 -1
- package/dist/esm/chunk-LDFTE4MM.mjs.map +0 -1
- package/dist/esm/chunk-LG3DAAPD.mjs +0 -2
- package/dist/esm/chunk-LG3DAAPD.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs.map +0 -1
- package/dist/esm/chunk-LGD5KU56.mjs +0 -2
- package/dist/esm/chunk-LGD5KU56.mjs.map +0 -1
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-LXLISEQ4.mjs.map +0 -1
- package/dist/esm/chunk-M2QV232A.mjs +0 -2
- package/dist/esm/chunk-M2QV232A.mjs.map +0 -1
- package/dist/esm/chunk-MEWFJJJN.mjs +0 -2
- package/dist/esm/chunk-MEWFJJJN.mjs.map +0 -1
- package/dist/esm/chunk-MO4IZXLK.mjs.map +0 -1
- package/dist/esm/chunk-MS4MRLGA.mjs.map +0 -1
- package/dist/esm/chunk-N5JNKD5F.mjs.map +0 -1
- package/dist/esm/chunk-NH2S6SB2.mjs.map +0 -1
- package/dist/esm/chunk-NMD45OTM.mjs.map +0 -1
- package/dist/esm/chunk-NNRAQP36.mjs.map +0 -1
- package/dist/esm/chunk-OY2IX7HW.mjs.map +0 -1
- package/dist/esm/chunk-PKXEB7XP.mjs.map +0 -1
- package/dist/esm/chunk-PNXUYOYI.mjs +0 -2
- package/dist/esm/chunk-PNXUYOYI.mjs.map +0 -1
- package/dist/esm/chunk-PUZ25PTD.mjs.map +0 -1
- package/dist/esm/chunk-Q4XR6QOZ.mjs +0 -2
- package/dist/esm/chunk-QCUFTD7K.mjs.map +0 -1
- package/dist/esm/chunk-QDIKOQRK.mjs +0 -2
- package/dist/esm/chunk-QDIKOQRK.mjs.map +0 -1
- package/dist/esm/chunk-QIW56MUH.mjs.map +0 -1
- package/dist/esm/chunk-QLN2URFX.mjs.map +0 -1
- package/dist/esm/chunk-QPP6BX53.mjs.map +0 -1
- package/dist/esm/chunk-RNTXQYJQ.mjs.map +0 -1
- package/dist/esm/chunk-SAPUZZEU.mjs.map +0 -1
- package/dist/esm/chunk-SR24OGHJ.mjs.map +0 -1
- package/dist/esm/chunk-SRPI2FFA.mjs.map +0 -1
- package/dist/esm/chunk-STGYDB5E.mjs.map +0 -1
- package/dist/esm/chunk-SWHLSREF.mjs.map +0 -1
- package/dist/esm/chunk-TDGQGILY.mjs.map +0 -1
- package/dist/esm/chunk-TL7DR54X.mjs.map +0 -1
- package/dist/esm/chunk-TMW2HIXC.mjs.map +0 -1
- package/dist/esm/chunk-TS3PYRAT.mjs.map +0 -1
- package/dist/esm/chunk-TVFIUUVY.mjs.map +0 -1
- package/dist/esm/chunk-U67PFBTL.mjs.map +0 -1
- package/dist/esm/chunk-U6Z4FNB7.mjs.map +0 -1
- package/dist/esm/chunk-UAL27G6B.mjs.map +0 -1
- package/dist/esm/chunk-WP7WF54Q.mjs.map +0 -1
- package/dist/esm/chunk-WS4RPKL6.mjs +0 -2
- package/dist/esm/chunk-WS4RPKL6.mjs.map +0 -1
- package/dist/esm/chunk-WWZ3METZ.mjs.map +0 -1
- package/dist/esm/chunk-X4KEZTUQ.mjs.map +0 -1
- package/dist/esm/chunk-XH7YKEYR.mjs.map +0 -1
- package/dist/esm/chunk-XK3JFCP3.mjs.map +0 -1
- package/dist/esm/chunk-XONG5JZ4.mjs.map +0 -1
- package/dist/esm/chunk-XXHW3ZT3.mjs.map +0 -1
- package/dist/esm/chunk-Y7F2V3R6.mjs +0 -2
- package/dist/esm/chunk-Y7F2V3R6.mjs.map +0 -1
- package/dist/esm/chunk-YHAPZP5A.mjs.map +0 -1
- package/dist/esm/chunk-YJCZU6PR.mjs.map +0 -1
- package/dist/esm/chunk-ZGO2SK6F.mjs.map +0 -1
- package/dist/esm/publicKey-B3XRNhHO.d.mts +0 -113
- /package/dist/esm/{chunk-FVA2OPG4.mjs.map → chunk-KDMSOCZY.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q4XR6QOZ.mjs.map → chunk-KIW54KWR.mjs.map} +0 -0
- /package/dist/esm/{chunk-G7MWTE2J.mjs.map → chunk-YZ5BCOGI.mjs.map} +0 -0
package/src/types/indexer.ts
CHANGED
|
@@ -46,31 +46,107 @@ import {
|
|
|
46
46
|
*/
|
|
47
47
|
export type GetObjectDataQueryResponse = GetObjectDataQuery["current_objects"];
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* The response structure for querying tokens owned by an account.
|
|
51
|
+
*/
|
|
49
52
|
export type GetAccountOwnedTokensQueryResponse = GetAccountOwnedTokensQuery["current_token_ownerships_v2"];
|
|
50
53
|
|
|
54
|
+
/**
|
|
55
|
+
* The response containing the current token ownerships for an account from a specific collection.
|
|
56
|
+
*/
|
|
51
57
|
export type GetAccountOwnedTokensFromCollectionResponse =
|
|
52
58
|
GetAccountOwnedTokensFromCollectionQuery["current_token_ownerships_v2"];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The response structure for retrieving account collections associated with owned tokens.
|
|
62
|
+
*/
|
|
53
63
|
export type GetAccountCollectionsWithOwnedTokenResponse =
|
|
54
64
|
GetAccountCollectionsWithOwnedTokensQuery["current_collection_ownership_v2_view"];
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The current balances of fungible assets for an account.
|
|
68
|
+
*/
|
|
55
69
|
export type GetAccountCoinsDataResponse = GetAccountCoinsDataQuery["current_fungible_asset_balances"];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The response structure for retrieving user transactions from the top of the blockchain.
|
|
73
|
+
*/
|
|
56
74
|
export type GetChainTopUserTransactionsResponse = GetChainTopUserTransactionsQuery["user_transactions"];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The response containing the events from the GetEventsQuery.
|
|
78
|
+
*/
|
|
57
79
|
export type GetEventsResponse = GetEventsQuery["events"];
|
|
58
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The number of active delegators per pool in response to a query.
|
|
83
|
+
*/
|
|
59
84
|
export type GetNumberOfDelegatorsResponse = GetNumberOfDelegatorsQuery["num_active_delegator_per_pool"];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The response containing the delegated staking activities from the query.
|
|
88
|
+
*/
|
|
60
89
|
export type GetDelegatedStakingActivitiesResponse = GetDelegatedStakingActivitiesQuery["delegated_staking_activities"];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The response structure for retrieving data from the current collections.
|
|
93
|
+
*/
|
|
61
94
|
export type GetCollectionDataResponse = GetCollectionDataQuery["current_collections_v2"][0];
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The response structure for retrieving token data, containing the current token information.
|
|
98
|
+
*/
|
|
62
99
|
export type GetTokenDataResponse = GetTokenDataQuery["current_token_datas_v2"][0];
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The status of the processor as returned by the GetProcessorStatusQuery.
|
|
103
|
+
*/
|
|
63
104
|
export type GetProcessorStatusResponse = GetProcessorStatusQuery["processor_status"];
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The response containing metadata for a fungible asset.
|
|
108
|
+
*/
|
|
64
109
|
export type GetFungibleAssetMetadataResponse = GetFungibleAssetMetadataQuery["fungible_asset_metadata"];
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The response containing the activities related to fungible assets.
|
|
113
|
+
*/
|
|
65
114
|
export type GetFungibleAssetActivitiesResponse = GetFungibleAssetActivitiesQuery["fungible_asset_activities"];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The current balances of fungible assets for a specific query.
|
|
118
|
+
*/
|
|
66
119
|
export type GetCurrentFungibleAssetBalancesResponse =
|
|
67
120
|
GetCurrentFungibleAssetBalancesQuery["current_fungible_asset_balances"];
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The response structure for retrieving token activity data.
|
|
124
|
+
*/
|
|
68
125
|
export type GetTokenActivityResponse = GetTokenActivityQuery["token_activities_v2"];
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The response structure for retrieving the current token ownership details.
|
|
129
|
+
*/
|
|
69
130
|
export type GetCurrentTokenOwnershipResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"][0];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The response containing the current token ownerships for a user.
|
|
134
|
+
*/
|
|
70
135
|
export type GetOwnedTokensResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The response structure for retrieving items from a table.
|
|
139
|
+
*/
|
|
71
140
|
export type GetTableItemsDataResponse = GetTableItemsDataQuery["table_items"];
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The metadata for table items retrieved from a query.
|
|
144
|
+
*/
|
|
72
145
|
export type GetTableItemsMetadataResponse = GetTableItemsMetadataQuery["table_metadatas"];
|
|
73
146
|
|
|
147
|
+
/**
|
|
148
|
+
* The response containing the current Aptos names from the GetNamesQuery.
|
|
149
|
+
*/
|
|
74
150
|
export type GetANSNameResponse = GetNamesQuery["current_aptos_names"];
|
|
75
151
|
|
|
76
152
|
/**
|
|
@@ -78,6 +154,10 @@ export type GetANSNameResponse = GetNamesQuery["current_aptos_names"];
|
|
|
78
154
|
* array of properties we can sort the query by
|
|
79
155
|
*/
|
|
80
156
|
export type OrderBy<T> = Array<{ [K in keyof T]?: OrderByValue }>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Specifies the order direction for sorting, including options for handling null values.
|
|
160
|
+
*/
|
|
81
161
|
export type OrderByValue =
|
|
82
162
|
| "asc"
|
|
83
163
|
| "asc_nulls_first"
|
|
@@ -87,12 +167,12 @@ export type OrderByValue =
|
|
|
87
167
|
| "desc_nulls_last";
|
|
88
168
|
|
|
89
169
|
/**
|
|
90
|
-
*
|
|
170
|
+
* The token standard to query for, which can be either version "v1" or "v2".
|
|
91
171
|
*/
|
|
92
172
|
export type TokenStandard = "v1" | "v2";
|
|
93
173
|
|
|
94
174
|
/**
|
|
95
|
-
* The
|
|
175
|
+
* The GraphQL query to pass into the `queryIndexer` function.
|
|
96
176
|
*/
|
|
97
177
|
export type GraphqlQuery = {
|
|
98
178
|
query: string;
|
package/src/types/keyless.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The payload for a prover request, containing a Base64-encoded JWT.
|
|
3
|
+
*/
|
|
1
4
|
export type ProverRequest = {
|
|
2
5
|
jwt_b64: string;
|
|
3
6
|
epk: string;
|
|
@@ -7,11 +10,19 @@ export type ProverRequest = {
|
|
|
7
10
|
uid_key: string;
|
|
8
11
|
pepper: string;
|
|
9
12
|
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The response from the prover containing the proof data.
|
|
16
|
+
*/
|
|
10
17
|
export type ProverResponse = {
|
|
11
18
|
proof: { a: string; b: string; c: string };
|
|
12
19
|
public_inputs_hash: string;
|
|
13
20
|
training_wheels_signature: string;
|
|
14
21
|
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The request payload for fetching data, containing a base64 encoded JWT.
|
|
25
|
+
*/
|
|
15
26
|
export type PepperFetchRequest = {
|
|
16
27
|
jwt_b64: number;
|
|
17
28
|
epk: string;
|
|
@@ -20,8 +31,15 @@ export type PepperFetchRequest = {
|
|
|
20
31
|
uid_key: string;
|
|
21
32
|
derivation_path: string;
|
|
22
33
|
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The response object containing the fetched pepper string.
|
|
37
|
+
*/
|
|
23
38
|
export type PepperFetchResponse = { pepper: string; address: string };
|
|
24
39
|
|
|
40
|
+
/**
|
|
41
|
+
* The response for keyless configuration containing the maximum committed EPK bytes.
|
|
42
|
+
*/
|
|
25
43
|
export type KeylessConfigurationResponse = {
|
|
26
44
|
max_commited_epk_bytes: number;
|
|
27
45
|
max_exp_horizon_secs: string;
|
|
@@ -33,6 +51,9 @@ export type KeylessConfigurationResponse = {
|
|
|
33
51
|
training_wheels_pubkey: { vec: string[] };
|
|
34
52
|
};
|
|
35
53
|
|
|
54
|
+
/**
|
|
55
|
+
* The response containing the Groth16 verification key, including the alpha_g1 component.
|
|
56
|
+
*/
|
|
36
57
|
export type Groth16VerificationKeyResponse = {
|
|
37
58
|
alpha_g1: string;
|
|
38
59
|
beta_g2: string;
|
|
@@ -38,6 +38,9 @@ export const NetworkToProverAPI: Record<string, string> = {
|
|
|
38
38
|
local: "https://api.devnet.aptoslabs.com/keyless/prover/v0",
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Different network environments for connecting to services, ranging from production to development setups.
|
|
43
|
+
*/
|
|
41
44
|
export enum Network {
|
|
42
45
|
MAINNET = "mainnet",
|
|
43
46
|
TESTNET = "testnet",
|
package/src/utils/const.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Types of API endpoints used for routing requests in the Aptos network.
|
|
6
6
|
*/
|
|
7
7
|
export enum AptosApiType {
|
|
8
8
|
FULLNODE = "Fullnode",
|
|
@@ -50,9 +50,7 @@ export const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
|
|
|
50
50
|
export const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* These can be found from the processor_status table in the indexer database.
|
|
53
|
+
* Supported processor types for the indexer API, sourced from the processor_status table in the indexer database.
|
|
56
54
|
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
57
55
|
*/
|
|
58
56
|
export enum ProcessorType {
|
package/src/utils/helpers.ts
CHANGED
|
@@ -5,8 +5,10 @@ import { decode } from "js-base64";
|
|
|
5
5
|
import { MoveStructId } from "../types";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Sleep
|
|
9
|
-
*
|
|
8
|
+
* Sleep for the specified amount of time in milliseconds.
|
|
9
|
+
* This function can be used to introduce delays in asynchronous operations.
|
|
10
|
+
*
|
|
11
|
+
* @param timeMs - The time in milliseconds to sleep.
|
|
10
12
|
*/
|
|
11
13
|
export async function sleep(timeMs: number): Promise<null> {
|
|
12
14
|
return new Promise((resolve) => {
|
|
@@ -16,6 +18,12 @@ export async function sleep(timeMs: number): Promise<null> {
|
|
|
16
18
|
|
|
17
19
|
export const nowInSeconds = () => Math.floor(Date.now() / 1000);
|
|
18
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Floors the given timestamp to the nearest whole hour.
|
|
23
|
+
* This function is useful for normalizing timestamps to hourly intervals.
|
|
24
|
+
*
|
|
25
|
+
* @param timestampInSeconds - The timestamp in seconds to be floored.
|
|
26
|
+
*/
|
|
19
27
|
export function floorToWholeHour(timestampInSeconds: number): number {
|
|
20
28
|
const date = new Date(timestampInSeconds * 1000);
|
|
21
29
|
// Reset minutes and seconds to zero
|
|
@@ -25,6 +33,13 @@ export function floorToWholeHour(timestampInSeconds: number): number {
|
|
|
25
33
|
return Math.floor(date.getTime() / 1000);
|
|
26
34
|
}
|
|
27
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Decodes a base64 URL-encoded string into its original form.
|
|
38
|
+
* This function is useful for converting base64 URL-encoded data back to a readable format.
|
|
39
|
+
*
|
|
40
|
+
* @param base64Url - The base64 URL-encoded string to decode.
|
|
41
|
+
* @returns The decoded string.
|
|
42
|
+
*/
|
|
28
43
|
export function base64UrlDecode(base64Url: string): string {
|
|
29
44
|
// Replace base64url-specific characters
|
|
30
45
|
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
@@ -36,27 +51,27 @@ export function base64UrlDecode(base64Url: string): string {
|
|
|
36
51
|
|
|
37
52
|
/**
|
|
38
53
|
* Amount is represented in the smallest unit format on chain, this function converts
|
|
39
|
-
* a human
|
|
54
|
+
* a human-readable amount format to the smallest unit format
|
|
40
55
|
* @example
|
|
41
|
-
* human
|
|
56
|
+
* human-readable amount format: 500
|
|
42
57
|
* on chain amount format when decimal is 8: 50000000000
|
|
43
58
|
*
|
|
44
|
-
* @param value The value in human
|
|
59
|
+
* @param value The value in human-readable format
|
|
45
60
|
* @param decimal The token decimal
|
|
46
|
-
* @returns The value
|
|
61
|
+
* @returns The value in the smallest units
|
|
47
62
|
*/
|
|
48
63
|
export const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;
|
|
49
64
|
|
|
50
65
|
/**
|
|
51
66
|
* Amount is represented in the smallest unit format on chain, this function converts
|
|
52
|
-
* the smallest unit format to a human
|
|
67
|
+
* the smallest unit format to a human-readable amount format
|
|
53
68
|
* @example
|
|
54
|
-
* human
|
|
69
|
+
* human-readable amount format: 500
|
|
55
70
|
* on chain amount format when decimal is 8: 50000000000
|
|
56
71
|
*
|
|
57
|
-
* @param value The value in human
|
|
72
|
+
* @param value The value in human-readable format
|
|
58
73
|
* @param decimal The token decimal
|
|
59
|
-
* @returns The value
|
|
74
|
+
* @returns The value in the smallest units
|
|
60
75
|
*/
|
|
61
76
|
export const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;
|
|
62
77
|
|
package/src/utils/memoize.ts
CHANGED
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
const cache = new Map<string, { value: any; timestamp: number }>();
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* A memoize
|
|
11
|
+
* A memoize higher-order function to cache the response of an async function.
|
|
12
|
+
* This function helps to improve performance by avoiding repeated calls to the same async function with the same arguments
|
|
13
|
+
* within a specified time-to-live (TTL).
|
|
12
14
|
*
|
|
13
|
-
* @param func
|
|
14
|
-
* @param key The
|
|
15
|
-
* @param ttlMs time-to-live in milliseconds for cached data
|
|
16
|
-
* @returns
|
|
15
|
+
* @param func The async function to cache the result of.
|
|
16
|
+
* @param key The cache key used to store the result.
|
|
17
|
+
* @param ttlMs The time-to-live in milliseconds for cached data.
|
|
18
|
+
* @returns The cached or latest result.
|
|
17
19
|
*/
|
|
18
20
|
export function memoizeAsync<T>(
|
|
19
21
|
func: (...args: any[]) => Promise<T>,
|
|
@@ -40,12 +42,12 @@ export function memoizeAsync<T>(
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* Caches the result of a function call to improve performance on subsequent calls with the same arguments.
|
|
44
46
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param ttlMs time-to-live in milliseconds for cached data
|
|
48
|
-
* @returns the cached
|
|
47
|
+
* @param key - The key to cache on, all accesses by this key will return the cached value.
|
|
48
|
+
* @param func - The function whose result will be cached.
|
|
49
|
+
* @param ttlMs - The time-to-live in milliseconds for cached data.
|
|
50
|
+
* @returns A memoized version of the provided function that returns the cached result if available and within TTL.
|
|
49
51
|
*/
|
|
50
52
|
export function memoize<T>(func: (...args: any[]) => T, key: string, ttlMs?: number): (...args: any[]) => T {
|
|
51
53
|
return (...args: any[]) => {
|
|
@@ -4,15 +4,21 @@
|
|
|
4
4
|
import { Deserializer, Serializable } from "../bcs";
|
|
5
5
|
|
|
6
6
|
export type DeserializableClass<T extends Serializable> = {
|
|
7
|
+
/**
|
|
8
|
+
* Deserializes a serialized object using the provided deserializer.
|
|
9
|
+
* This function allows you to reconstruct an object from its serialized form.
|
|
10
|
+
*
|
|
11
|
+
* @param deserializer - An instance of the Deserializer used to read the serialized data.
|
|
12
|
+
*/
|
|
7
13
|
deserialize(deserializer: Deserializer): T;
|
|
8
14
|
};
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
12
|
-
* This
|
|
13
|
-
*
|
|
14
|
-
* @param cls The class of the object to normalize
|
|
15
|
-
* @param value
|
|
17
|
+
* Normalizes an instance of a class by deserializing it from its byte representation.
|
|
18
|
+
* This function allows the `instanceof` operator to work correctly when the input objects originate from a different bundle.
|
|
19
|
+
*
|
|
20
|
+
* @param cls - The class of the object to normalize.
|
|
21
|
+
* @param value - The instance to normalize.
|
|
16
22
|
*/
|
|
17
23
|
export function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T) {
|
|
18
24
|
const serializedBytes = value.bcsToBytes();
|
package/src/version.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/helpers.ts"],"names":["decode","sleep","timeMs","resolve","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64","convertAmountFromHumanReadableToOnChain","value","decimal","convertAmountFromOnChainToHumanReadable","hexToAscii","hex","str","n","parseEncodedStruct","structObj","account_address","module_name","struct_name","moduleName","structName","isEncodedStruct"],"mappings":"wMAGA,OAAS,UAAAA,MAAc,YAOvB,eAAsBC,EAAMC,EAA+B,CACzD,OAAO,IAAI,QAASC,GAAY,CAC9B,WAAWA,EAASD,CAAM,CAC5B,CAAC,CACH,CAEO,IAAME,EAAe,IAAM,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAEvD,SAASC,EAAiBC,EAAoC,CACnE,IAAMC,EAAO,IAAI,KAAKD,EAAqB,GAAI,EAE/C,OAAAC,EAAK,WAAW,CAAC,EACjBA,EAAK,WAAW,CAAC,EACjBA,EAAK,gBAAgB,CAAC,EACf,KAAK,MAAMA,EAAK,QAAQ,EAAI,GAAI,CACzC,CAEO,SAASC,EAAgBC,EAA2B,CAEzD,IAAMC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAEvDE,EAAeD,EAAS,KAAK,UAAU,GAAI,EAAKA,EAAO,OAAS,GAAM,CAAC,EAE7E,OADsBV,EAAOW,CAAY,CAE3C,CAaO,IAAMC,EAA0C,CAACC,EAAeC,IAAoBD,EAAQ,IAAMC,EAa5FC,EAA0C,CAACF,EAAeC,IAAoBD,EAAQ,IAAMC,EAUnGE,EAAcC,GAAgB,CAClC,IAAIC,EAAM,GACV,QAASC,EAAI,EAAGA,EAAIF,EAAI,OAAQE,GAAK,EACnCD,GAAO,OAAO,aAAa,SAASD,EAAI,UAAUE,EAAGA,EAAI,CAAC,EAAG,EAAE,CAAC,EAElE,OAAOD,CACT,EAiBaE,EAAsBC,GAIf,CAElB,GAAM,CAAE,gBAAAC,EAAiB,YAAAC,EAAa,YAAAC,CAAY,EAAIH,EAChDI,EAAaT,EAAWO,CAAW,EACnCG,EAAaV,EAAWQ,CAAW,EACzC,MAAO,GAAGF,CAAe,KAAKG,CAAU,KAAKC,CAAU,EACzD,EAWaC,EACXN,GAMA,OAAOA,GAAc,UACrB,CAAC,MAAM,QAAQA,CAAS,GACxBA,IAAc,MACd,oBAAqBA,GACrB,gBAAiBA,GACjB,gBAAiBA,GACjB,OAAOA,EAAU,iBAAoB,UACrC,OAAOA,EAAU,aAAgB,UACjC,OAAOA,EAAU,aAAgB","sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\nimport { MoveStructId } from \"../types\";\n\n/**\n * Sleep the current thread for the given amount of time\n * @param timeMs time in milliseconds to sleep\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * a human readable amount format to the smallest unit format\n * @example\n * human readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human readable format\n * @param decimal The token decimal\n * @returns The value is smallest units\n */\nexport const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * the smallest unit format to a human readable amount format\n * @example\n * human readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human readable format\n * @param decimal The token decimal\n * @returns The value is smallest units\n */\nexport const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;\n\n/**\n * Convert a hex string to an ascii string with the `0x` prefix.\n *\n * `0x6170746f735f636f696e` --> `aptos_coin`\n *\n * @param hex The hex string to convert (e.g. `0x6170746f735f636f696e`)\n * @returns The ascii string\n */\nconst hexToAscii = (hex: string) => {\n let str = \"\";\n for (let n = 2; n < hex.length; n += 2) {\n str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));\n }\n return str;\n};\n\n/**\n * Convert an encoded struct to a MoveStructId.\n *\n * @example\n * const structObj = {\n * account_address: \"0x1\",\n * module_name: \"0x6170746f735f636f696e\",\n * struct_name: \"0x4170746f73436f696e\",\n * };\n * // structId is \"0x1::aptos_coin::AptosCoin\"\n * const structId = parseEncodedStruct(structObj);\n *\n * @param structObj The struct with account_address, module_name, and struct_name properties\n * @returns The MoveStructId\n */\nexport const parseEncodedStruct = (structObj: {\n account_address: string;\n module_name: string;\n struct_name: string;\n}): MoveStructId => {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { account_address, module_name, struct_name } = structObj;\n const moduleName = hexToAscii(module_name);\n const structName = hexToAscii(struct_name);\n return `${account_address}::${moduleName}::${structName}`;\n};\n\n/**\n * Determines whether the given object is an encoded struct type with the following properties:\n * - account_address: string\n * - module_name: string\n * - struct_name: string\n *\n * @param structObj The object to check\n * @returns Whether the object is an encoded struct type\n */\nexport const isEncodedStruct = (\n structObj: any,\n): structObj is {\n account_address: string;\n module_name: string;\n struct_name: string;\n} =>\n typeof structObj === \"object\" &&\n !Array.isArray(structObj) &&\n structObj !== null &&\n \"account_address\" in structObj &&\n \"module_name\" in structObj &&\n \"struct_name\" in structObj &&\n typeof structObj.account_address === \"string\" &&\n typeof structObj.module_name === \"string\" &&\n typeof structObj.struct_name === \"string\";\n"]}
|