@aptos-labs/ts-sdk 1.29.0 → 1.30.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 +5921 -1627
- package/dist/common/index.js +8 -8
- package/dist/common/index.js.map +1 -1
- package/dist/esm/Ed25519Account-DpH9qAcg.d.mts +470 -0
- package/dist/esm/account/AbstractKeylessAccount.d.mts +6 -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 +42 -4
- 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 +446 -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 +82 -11
- 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-U6Z4FNB7.mjs → chunk-2CJC43CV.mjs} +1 -1
- package/dist/esm/chunk-2CJC43CV.mjs.map +1 -0
- package/dist/esm/{chunk-P2EIZ7WL.mjs → chunk-2I56E4T2.mjs} +2 -2
- package/dist/esm/chunk-2I56E4T2.mjs.map +1 -0
- package/dist/esm/{chunk-P3TAY5PP.mjs → chunk-2QRWGJJA.mjs} +2 -2
- package/dist/esm/chunk-2QRWGJJA.mjs.map +1 -0
- package/dist/esm/chunk-37UZKMJI.mjs +2 -0
- package/dist/esm/chunk-37UZKMJI.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-4OV7QU2U.mjs +2 -0
- package/dist/esm/chunk-4OV7QU2U.mjs.map +1 -0
- package/dist/esm/{chunk-SWNFKKRE.mjs → chunk-5AAFF2PV.mjs} +2 -2
- package/dist/esm/chunk-5AAFF2PV.mjs.map +1 -0
- package/dist/esm/chunk-5CCHECTE.mjs +2 -0
- package/dist/esm/chunk-5CCHECTE.mjs.map +1 -0
- package/dist/esm/{chunk-KUOB4DDE.mjs → chunk-5XXIIWG7.mjs} +2 -2
- package/dist/esm/chunk-5XXIIWG7.mjs.map +1 -0
- package/dist/esm/chunk-5ZBHIUWG.mjs +2 -0
- package/dist/esm/chunk-5ZBHIUWG.mjs.map +1 -0
- package/dist/esm/chunk-6AGTDRNM.mjs +2 -0
- package/dist/esm/chunk-6AGTDRNM.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-7D3RY73L.mjs +2 -0
- package/dist/esm/chunk-7D3RY73L.mjs.map +1 -0
- package/dist/esm/{chunk-QBSU3L5Q.mjs → chunk-7PVIWKGT.mjs} +2 -2
- package/dist/esm/chunk-7PVIWKGT.mjs.map +1 -0
- package/dist/esm/chunk-7V6RL27I.mjs +2 -0
- package/dist/esm/chunk-7V6RL27I.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-YUNDX5I7.mjs → chunk-AGBA3Y7A.mjs} +2 -2
- package/dist/esm/chunk-AGBA3Y7A.mjs.map +1 -0
- package/dist/esm/{chunk-OKAQO57B.mjs → chunk-BQXVHY7J.mjs} +2 -2
- package/dist/esm/chunk-BQXVHY7J.mjs.map +1 -0
- package/dist/esm/chunk-CRL4WGOH.mjs +2 -0
- package/dist/esm/chunk-CRL4WGOH.mjs.map +1 -0
- package/dist/esm/{chunk-APN6AV5Q.mjs → chunk-D3KBNFZR.mjs} +2 -2
- package/dist/esm/chunk-D3KBNFZR.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-FZ5EYP3D.mjs → chunk-DCUVV3VY.mjs} +2 -2
- package/dist/esm/chunk-DCUVV3VY.mjs.map +1 -0
- package/dist/esm/{chunk-S2KDCIZN.mjs → chunk-DXQT55L3.mjs} +2 -2
- package/dist/esm/chunk-DXQT55L3.mjs.map +1 -0
- package/dist/esm/chunk-DZJXOL64.mjs +2 -0
- package/dist/esm/chunk-DZJXOL64.mjs.map +1 -0
- package/dist/esm/{chunk-Y2GWUE7C.mjs → chunk-EF2PUPUH.mjs} +2 -2
- package/dist/esm/chunk-EF2PUPUH.mjs.map +1 -0
- package/dist/esm/{chunk-J64ARI4E.mjs → chunk-EKZQ3EYX.mjs} +2 -2
- package/dist/esm/chunk-EKZQ3EYX.mjs.map +1 -0
- package/dist/esm/{chunk-F76N4MQO.mjs → chunk-EN2HDNFE.mjs} +2 -2
- package/dist/esm/chunk-EN2HDNFE.mjs.map +1 -0
- package/dist/esm/{chunk-L2QXU6F4.mjs → chunk-FO4F3OJJ.mjs} +2 -2
- package/dist/esm/chunk-FO4F3OJJ.mjs.map +1 -0
- package/dist/esm/{chunk-HKBBA653.mjs → chunk-FPF4KZ5M.mjs} +2 -2
- package/dist/esm/chunk-FPF4KZ5M.mjs.map +1 -0
- package/dist/esm/{chunk-OMV7445F.mjs → chunk-FY7TSOUU.mjs} +2 -2
- package/dist/esm/chunk-FY7TSOUU.mjs.map +1 -0
- package/dist/esm/{chunk-ELYS7CWV.mjs → chunk-GIQQF2PD.mjs} +2 -2
- package/dist/esm/chunk-GIQQF2PD.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-GPZRGLU2.mjs +2 -0
- package/dist/esm/chunk-GPZRGLU2.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-JH6VLTMS.mjs → chunk-HAMXSLWF.mjs} +2 -2
- package/dist/esm/chunk-HAMXSLWF.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-QPB6EJVM.mjs → chunk-HCV3NGLS.mjs} +2 -2
- package/dist/esm/chunk-HCV3NGLS.mjs.map +1 -0
- package/dist/esm/{chunk-2BTTX2KO.mjs → chunk-HDTKBFRX.mjs} +2 -2
- package/dist/esm/chunk-HDTKBFRX.mjs.map +1 -0
- package/dist/esm/chunk-HGVZ7ULA.mjs +2 -0
- package/dist/esm/chunk-HGVZ7ULA.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-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-KUZ2YTJH.mjs → chunk-IFHQSZLK.mjs} +2 -2
- package/dist/esm/chunk-IFHQSZLK.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-7VKFXX5Q.mjs → chunk-JDYASF3E.mjs} +2 -2
- package/dist/esm/chunk-JDYASF3E.mjs.map +1 -0
- package/dist/esm/{chunk-H6YNXJNF.mjs → chunk-JGNMNCQB.mjs} +2 -2
- package/dist/esm/chunk-JGNMNCQB.mjs.map +1 -0
- package/dist/esm/{chunk-R76DHMGR.mjs → chunk-JNHFQTFC.mjs} +2 -2
- package/dist/esm/chunk-JNHFQTFC.mjs.map +1 -0
- package/dist/esm/{chunk-5PCNWXRN.mjs → chunk-JY3JJ55D.mjs} +2 -2
- package/dist/esm/chunk-JY3JJ55D.mjs.map +1 -0
- package/dist/esm/{chunk-3W2DHZXK.mjs → chunk-K6MZXKVV.mjs} +2 -2
- package/dist/esm/chunk-K6MZXKVV.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-4TB3AWQE.mjs → chunk-KFSVKIFO.mjs} +2 -2
- package/dist/esm/chunk-KFSVKIFO.mjs.map +1 -0
- package/dist/esm/chunk-KIW54KWR.mjs +2 -0
- package/dist/esm/{chunk-OHRL766V.mjs → chunk-KM6UXNC7.mjs} +2 -2
- package/dist/esm/chunk-KM6UXNC7.mjs.map +1 -0
- package/dist/esm/{chunk-NWOMSL6K.mjs → chunk-KRVLR3L4.mjs} +2 -2
- package/dist/esm/chunk-KRVLR3L4.mjs.map +1 -0
- package/dist/esm/{chunk-4HR32TSY.mjs → chunk-KSKQVOBA.mjs} +2 -2
- package/dist/esm/chunk-KSKQVOBA.mjs.map +1 -0
- package/dist/esm/{chunk-ZROQH5YL.mjs → chunk-KSUZS6EL.mjs} +2 -2
- package/dist/esm/chunk-L5I7F3NZ.mjs +2 -0
- package/dist/esm/chunk-L5I7F3NZ.mjs.map +1 -0
- package/dist/esm/{chunk-MAMPMCO7.mjs → chunk-LD5MUWGW.mjs} +2 -2
- package/dist/esm/chunk-LD5MUWGW.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-LZS7BQ2B.mjs +2 -0
- package/dist/esm/chunk-LZS7BQ2B.mjs.map +1 -0
- package/dist/esm/{chunk-53RB2PRH.mjs → chunk-N3OYD6VZ.mjs} +2 -2
- package/dist/esm/chunk-N3OYD6VZ.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-YDZBU2DJ.mjs → chunk-NODYW7DM.mjs} +2 -2
- package/dist/esm/chunk-NODYW7DM.mjs.map +1 -0
- package/dist/esm/{chunk-HVMFZF6P.mjs → chunk-NV6DHDM3.mjs} +2 -2
- package/dist/esm/chunk-NV6DHDM3.mjs.map +1 -0
- package/dist/esm/{chunk-YU3IYJRL.mjs → chunk-OLPI7QAH.mjs} +2 -2
- package/dist/esm/chunk-OLPI7QAH.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-A42BPAD4.mjs → chunk-OS2EG6AE.mjs} +2 -2
- package/dist/esm/chunk-OS2EG6AE.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-MNVUSJEK.mjs → chunk-OV5UQ75K.mjs} +2 -2
- package/dist/esm/chunk-OV5UQ75K.mjs.map +1 -0
- package/dist/esm/{chunk-P5V7OZNN.mjs → chunk-OZN3OOJV.mjs} +2 -2
- package/dist/esm/chunk-OZN3OOJV.mjs.map +1 -0
- package/dist/esm/{chunk-WRRQ7L5K.mjs → chunk-PCLU4KLY.mjs} +2 -2
- package/dist/esm/chunk-PCLU4KLY.mjs.map +1 -0
- package/dist/esm/{chunk-Q3TAEOH5.mjs → chunk-PGZWRY7A.mjs} +2 -2
- package/dist/esm/chunk-PGZWRY7A.mjs.map +1 -0
- package/dist/esm/{chunk-X34JJPW5.mjs → chunk-PHG2IWZW.mjs} +2 -2
- package/dist/esm/chunk-PHG2IWZW.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-6UZ3VI5Y.mjs → chunk-QBP4XJT5.mjs} +2 -2
- package/dist/esm/chunk-QBP4XJT5.mjs.map +1 -0
- package/dist/esm/{chunk-5VD4MHB3.mjs → chunk-QBWGWHJK.mjs} +2 -2
- package/dist/esm/chunk-QBWGWHJK.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-367OG3DB.mjs → chunk-QRTZYRH2.mjs} +2 -2
- package/dist/esm/chunk-QRTZYRH2.mjs.map +1 -0
- package/dist/esm/{chunk-2F7Z7RMW.mjs → chunk-R3Y6WH2U.mjs} +2 -2
- package/dist/esm/chunk-R3Y6WH2U.mjs.map +1 -0
- package/dist/esm/{chunk-S2W4D6NZ.mjs → chunk-RAXP3STS.mjs} +2 -2
- package/dist/esm/chunk-RAXP3STS.mjs.map +1 -0
- package/dist/esm/{chunk-F3M2UQA4.mjs → chunk-RNAKZVRN.mjs} +2 -2
- package/dist/esm/chunk-RNAKZVRN.mjs.map +1 -0
- package/dist/esm/{chunk-TQWGQLM6.mjs → chunk-RUDS7RSB.mjs} +2 -2
- package/dist/esm/chunk-RUDS7RSB.mjs.map +1 -0
- package/dist/esm/{chunk-GMBSQDPO.mjs → chunk-S3FVA55H.mjs} +2 -2
- package/dist/esm/chunk-S3FVA55H.mjs.map +1 -0
- package/dist/esm/{chunk-BSAHPS6E.mjs → chunk-TIZL5YVP.mjs} +2 -2
- package/dist/esm/chunk-TIZL5YVP.mjs.map +1 -0
- package/dist/esm/{chunk-SDWE6WMM.mjs → chunk-TRU3EK64.mjs} +2 -2
- package/dist/esm/chunk-TRU3EK64.mjs.map +1 -0
- package/dist/esm/chunk-UI3AKMZX.mjs +2 -0
- package/dist/esm/{chunk-UAEODDZS.mjs.map → chunk-UI3AKMZX.mjs.map} +1 -1
- package/dist/esm/{chunk-ADE6MVXC.mjs → chunk-UKAXCARD.mjs} +2 -2
- package/dist/esm/chunk-UKAXCARD.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-O2BPA6TS.mjs → chunk-VQTEGTUQ.mjs} +2 -2
- package/dist/esm/chunk-VQTEGTUQ.mjs.map +1 -0
- package/dist/esm/{chunk-45IUUCAV.mjs → chunk-WIXNX7HY.mjs} +2 -2
- package/dist/esm/chunk-WIXNX7HY.mjs.map +1 -0
- package/dist/esm/{chunk-CRA2MFJC.mjs → chunk-WOOH5MMX.mjs} +2 -2
- package/dist/esm/chunk-WOOH5MMX.mjs.map +1 -0
- package/dist/esm/{chunk-GWSDIX6C.mjs → chunk-WSVOJSAC.mjs} +2 -2
- package/dist/esm/chunk-WSVOJSAC.mjs.map +1 -0
- package/dist/esm/{chunk-IR4SLC2M.mjs → chunk-WUCPTRXU.mjs} +2 -2
- package/dist/esm/chunk-WUCPTRXU.mjs.map +1 -0
- package/dist/esm/chunk-XHCALZ7X.mjs +2 -0
- package/dist/esm/chunk-XHCALZ7X.mjs.map +1 -0
- package/dist/esm/{chunk-WJRZWAIS.mjs → chunk-XIY2VORC.mjs} +2 -2
- package/dist/esm/chunk-XIY2VORC.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-D3Q4BC3I.mjs → chunk-Z36WHOZV.mjs} +2 -2
- package/dist/esm/chunk-Z36WHOZV.mjs.map +1 -0
- package/dist/esm/{chunk-BOYYQAB4.mjs → chunk-ZINOJTLU.mjs} +2 -2
- package/dist/esm/chunk-ZINOJTLU.mjs.map +1 -0
- package/dist/esm/{chunk-RXE6NNOL.mjs → chunk-ZS3EWM5A.mjs} +2 -2
- package/dist/esm/chunk-ZS3EWM5A.mjs.map +1 -0
- package/dist/esm/{chunk-GDUAFXIQ.mjs → chunk-ZUTOMGB7.mjs} +2 -2
- package/dist/esm/chunk-ZUTOMGB7.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 +38 -2
- 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 +23 -22
- package/src/account/AbstractKeylessAccount.ts +7 -5
- 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 +4 -3
- package/src/account/KeylessAccount.ts +46 -3
- package/src/account/MultiKeyAccount.ts +56 -35
- package/src/account/SingleKeyAccount.ts +60 -28
- package/src/api/account.ts +443 -159
- 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 +117 -21
- 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 +119 -136
- package/src/client/core.ts +23 -8
- 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 +37 -1
- 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 +166 -42
- 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-2BTTX2KO.mjs.map +0 -1
- package/dist/esm/chunk-2F7Z7RMW.mjs.map +0 -1
- package/dist/esm/chunk-367OG3DB.mjs.map +0 -1
- package/dist/esm/chunk-3W2DHZXK.mjs.map +0 -1
- package/dist/esm/chunk-44GYWUSH.mjs.map +0 -1
- package/dist/esm/chunk-45IUUCAV.mjs.map +0 -1
- package/dist/esm/chunk-4HR32TSY.mjs.map +0 -1
- package/dist/esm/chunk-4TB3AWQE.mjs.map +0 -1
- package/dist/esm/chunk-53RB2PRH.mjs.map +0 -1
- package/dist/esm/chunk-5PCNWXRN.mjs.map +0 -1
- package/dist/esm/chunk-5VD4MHB3.mjs.map +0 -1
- package/dist/esm/chunk-6EMN3BOV.mjs.map +0 -1
- package/dist/esm/chunk-6UZ3VI5Y.mjs.map +0 -1
- package/dist/esm/chunk-76OH2Z4Q.mjs +0 -2
- package/dist/esm/chunk-76OH2Z4Q.mjs.map +0 -1
- package/dist/esm/chunk-7VKFXX5Q.mjs.map +0 -1
- package/dist/esm/chunk-A42BPAD4.mjs.map +0 -1
- package/dist/esm/chunk-A63SMUOU.mjs +0 -2
- package/dist/esm/chunk-A63SMUOU.mjs.map +0 -1
- package/dist/esm/chunk-ADE6MVXC.mjs.map +0 -1
- package/dist/esm/chunk-AH44UPM4.mjs.map +0 -1
- package/dist/esm/chunk-APN6AV5Q.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-BA4RBST6.mjs +0 -2
- package/dist/esm/chunk-BA4RBST6.mjs.map +0 -1
- package/dist/esm/chunk-BCUSI3N6.mjs.map +0 -1
- package/dist/esm/chunk-BOYYQAB4.mjs.map +0 -1
- package/dist/esm/chunk-BSAHPS6E.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-BWNTSJOC.mjs +0 -2
- package/dist/esm/chunk-BWNTSJOC.mjs.map +0 -1
- package/dist/esm/chunk-CB6H4VMZ.mjs +0 -2
- package/dist/esm/chunk-CB6H4VMZ.mjs.map +0 -1
- package/dist/esm/chunk-CRA2MFJC.mjs.map +0 -1
- package/dist/esm/chunk-D3Q4BC3I.mjs.map +0 -1
- package/dist/esm/chunk-E4O26ZJB.mjs +0 -2
- package/dist/esm/chunk-E4O26ZJB.mjs.map +0 -1
- package/dist/esm/chunk-ELYS7CWV.mjs.map +0 -1
- package/dist/esm/chunk-EXP5STXZ.mjs.map +0 -1
- package/dist/esm/chunk-F3M2UQA4.mjs.map +0 -1
- package/dist/esm/chunk-F63E4CR7.mjs +0 -2
- package/dist/esm/chunk-F63E4CR7.mjs.map +0 -1
- package/dist/esm/chunk-F76N4MQO.mjs.map +0 -1
- package/dist/esm/chunk-FZ5EYP3D.mjs.map +0 -1
- package/dist/esm/chunk-G5MGSV7Y.mjs +0 -2
- package/dist/esm/chunk-G5MGSV7Y.mjs.map +0 -1
- package/dist/esm/chunk-G5XLMQ5E.mjs +0 -2
- package/dist/esm/chunk-G5XLMQ5E.mjs.map +0 -1
- package/dist/esm/chunk-GDO6Q2FI.mjs +0 -2
- package/dist/esm/chunk-GDO6Q2FI.mjs.map +0 -1
- package/dist/esm/chunk-GDUAFXIQ.mjs.map +0 -1
- package/dist/esm/chunk-GMBSQDPO.mjs.map +0 -1
- package/dist/esm/chunk-GWSDIX6C.mjs.map +0 -1
- package/dist/esm/chunk-H6YNXJNF.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-HHGJXVAE.mjs +0 -2
- package/dist/esm/chunk-HHGJXVAE.mjs.map +0 -1
- package/dist/esm/chunk-HKBBA653.mjs.map +0 -1
- package/dist/esm/chunk-HVMFZF6P.mjs.map +0 -1
- package/dist/esm/chunk-IR4SLC2M.mjs.map +0 -1
- package/dist/esm/chunk-J64ARI4E.mjs.map +0 -1
- package/dist/esm/chunk-JH6VLTMS.mjs.map +0 -1
- package/dist/esm/chunk-KEYAPEAX.mjs.map +0 -1
- package/dist/esm/chunk-KUOB4DDE.mjs.map +0 -1
- package/dist/esm/chunk-KUZ2YTJH.mjs.map +0 -1
- package/dist/esm/chunk-L2QXU6F4.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs.map +0 -1
- package/dist/esm/chunk-LNEZEYYE.mjs +0 -2
- package/dist/esm/chunk-LNEZEYYE.mjs.map +0 -1
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-MAMPMCO7.mjs.map +0 -1
- package/dist/esm/chunk-MDJ66AA3.mjs +0 -2
- package/dist/esm/chunk-MDJ66AA3.mjs.map +0 -1
- package/dist/esm/chunk-MLDQ2TY2.mjs +0 -2
- package/dist/esm/chunk-MLDQ2TY2.mjs.map +0 -1
- package/dist/esm/chunk-MNVUSJEK.mjs.map +0 -1
- package/dist/esm/chunk-MQGW234H.mjs +0 -2
- package/dist/esm/chunk-MQGW234H.mjs.map +0 -1
- package/dist/esm/chunk-NMD45OTM.mjs.map +0 -1
- package/dist/esm/chunk-NWOMSL6K.mjs.map +0 -1
- package/dist/esm/chunk-O2BPA6TS.mjs.map +0 -1
- package/dist/esm/chunk-OHRL766V.mjs.map +0 -1
- package/dist/esm/chunk-OKAQO57B.mjs.map +0 -1
- package/dist/esm/chunk-OMV7445F.mjs.map +0 -1
- package/dist/esm/chunk-P2EIZ7WL.mjs.map +0 -1
- package/dist/esm/chunk-P3TAY5PP.mjs.map +0 -1
- package/dist/esm/chunk-P5V7OZNN.mjs.map +0 -1
- package/dist/esm/chunk-Q3TAEOH5.mjs.map +0 -1
- package/dist/esm/chunk-Q4XR6QOZ.mjs +0 -2
- package/dist/esm/chunk-QBSU3L5Q.mjs.map +0 -1
- package/dist/esm/chunk-QPB6EJVM.mjs.map +0 -1
- package/dist/esm/chunk-R76DHMGR.mjs.map +0 -1
- package/dist/esm/chunk-RXE6NNOL.mjs.map +0 -1
- package/dist/esm/chunk-S2KDCIZN.mjs.map +0 -1
- package/dist/esm/chunk-S2W4D6NZ.mjs.map +0 -1
- package/dist/esm/chunk-SDWE6WMM.mjs.map +0 -1
- package/dist/esm/chunk-SRPI2FFA.mjs.map +0 -1
- package/dist/esm/chunk-STUXKQVZ.mjs +0 -2
- package/dist/esm/chunk-STUXKQVZ.mjs.map +0 -1
- package/dist/esm/chunk-SUJLWCRN.mjs +0 -2
- package/dist/esm/chunk-SUJLWCRN.mjs.map +0 -1
- package/dist/esm/chunk-SWNFKKRE.mjs.map +0 -1
- package/dist/esm/chunk-TDGQGILY.mjs.map +0 -1
- package/dist/esm/chunk-TQWGQLM6.mjs.map +0 -1
- package/dist/esm/chunk-U6Z4FNB7.mjs.map +0 -1
- package/dist/esm/chunk-UAEODDZS.mjs +0 -2
- package/dist/esm/chunk-UAL27G6B.mjs.map +0 -1
- package/dist/esm/chunk-WJRZWAIS.mjs.map +0 -1
- package/dist/esm/chunk-WRRQ7L5K.mjs.map +0 -1
- package/dist/esm/chunk-X34JJPW5.mjs.map +0 -1
- package/dist/esm/chunk-XMW65WCQ.mjs +0 -2
- package/dist/esm/chunk-XMW65WCQ.mjs.map +0 -1
- package/dist/esm/chunk-Y2GWUE7C.mjs.map +0 -1
- package/dist/esm/chunk-Y3BATGHX.mjs +0 -2
- package/dist/esm/chunk-Y3BATGHX.mjs.map +0 -1
- package/dist/esm/chunk-YDZBU2DJ.mjs.map +0 -1
- package/dist/esm/chunk-YPHH6CAO.mjs +0 -2
- package/dist/esm/chunk-YPHH6CAO.mjs.map +0 -1
- package/dist/esm/chunk-YU3IYJRL.mjs.map +0 -1
- package/dist/esm/chunk-YUNDX5I7.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-ZROQH5YL.mjs.map → chunk-KSUZS6EL.mjs.map} +0 -0
|
@@ -50,7 +50,10 @@ import { MoveFunction } from "../../types";
|
|
|
50
50
|
const TEXT_ENCODER = new TextEncoder();
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Convert type arguments to only type tags, allowing for string representations of type tags
|
|
53
|
+
* Convert type arguments to only type tags, allowing for string representations of type tags.
|
|
54
|
+
*
|
|
55
|
+
* @param typeArguments - An optional array of type arguments that may include string representations.
|
|
56
|
+
* @returns An array of TypeTag objects derived from the provided type arguments.
|
|
54
57
|
*/
|
|
55
58
|
export function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<TypeTag> {
|
|
56
59
|
return (
|
|
@@ -65,11 +68,13 @@ export function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
/**
|
|
68
|
-
* Fetches a function
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
71
|
+
* Fetches the ABI of a specified function from the on-chain module ABI. This function allows you to access the details of a
|
|
72
|
+
* specific function within a module.
|
|
73
|
+
*
|
|
74
|
+
* @param moduleAddress - The address of the module from which to fetch the function ABI.
|
|
75
|
+
* @param moduleName - The name of the module containing the function.
|
|
76
|
+
* @param functionName - The name of the function whose ABI is to be fetched.
|
|
77
|
+
* @param aptosConfig - The configuration settings for Aptos.
|
|
73
78
|
*/
|
|
74
79
|
export async function fetchFunctionAbi(
|
|
75
80
|
moduleAddress: string,
|
|
@@ -88,12 +93,15 @@ export async function fetchFunctionAbi(
|
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
/**
|
|
91
|
-
* Fetches the ABI for an entry function from the module
|
|
96
|
+
* Fetches the ABI for an entry function from the specified module address.
|
|
97
|
+
* This function validates if the ABI corresponds to an entry function and retrieves its parameters.
|
|
92
98
|
*
|
|
93
|
-
* @param moduleAddress
|
|
94
|
-
* @param moduleName
|
|
95
|
-
* @param functionName
|
|
96
|
-
* @param aptosConfig
|
|
99
|
+
* @param moduleAddress - The address of the module containing the entry function.
|
|
100
|
+
* @param moduleName - The name of the module containing the entry function.
|
|
101
|
+
* @param functionName - The name of the entry function to fetch the ABI for.
|
|
102
|
+
* @param aptosConfig - The configuration settings for Aptos.
|
|
103
|
+
* @returns An object containing the number of signers, type parameters, and function parameters.
|
|
104
|
+
* @throws Error if the ABI cannot be found or if the function is not an entry function.
|
|
97
105
|
*/
|
|
98
106
|
export async function fetchEntryFunctionAbi(
|
|
99
107
|
moduleAddress: string,
|
|
@@ -128,12 +136,15 @@ export async function fetchEntryFunctionAbi(
|
|
|
128
136
|
}
|
|
129
137
|
|
|
130
138
|
/**
|
|
131
|
-
* Fetches the ABI for a view function from the module
|
|
139
|
+
* Fetches the ABI for a view function from the specified module address.
|
|
140
|
+
* This function ensures that the ABI is valid and retrieves the type parameters, parameters, and return types for the view function.
|
|
132
141
|
*
|
|
133
|
-
* @param moduleAddress
|
|
134
|
-
* @param moduleName
|
|
135
|
-
* @param functionName
|
|
136
|
-
* @param aptosConfig
|
|
142
|
+
* @param moduleAddress - The address of the module containing the view function.
|
|
143
|
+
* @param moduleName - The name of the module containing the view function.
|
|
144
|
+
* @param functionName - The name of the view function for which to fetch the ABI.
|
|
145
|
+
* @param aptosConfig - The configuration settings for Aptos.
|
|
146
|
+
* @returns An object containing the type parameters, parameters, and return types of the view function.
|
|
147
|
+
* @throws Error if the ABI cannot be found or if the function is not a view function.
|
|
137
148
|
*/
|
|
138
149
|
export async function fetchViewFunctionAbi(
|
|
139
150
|
moduleAddress: string,
|
|
@@ -173,12 +184,14 @@ export async function fetchViewFunctionAbi(
|
|
|
173
184
|
}
|
|
174
185
|
|
|
175
186
|
/**
|
|
176
|
-
* Converts a non-BCS encoded argument into BCS encoded, if necessary
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* @param
|
|
180
|
-
* @param
|
|
181
|
-
* @param
|
|
187
|
+
* Converts a non-BCS encoded argument into BCS encoded, if necessary.
|
|
188
|
+
* This function checks the provided argument against the expected parameter type and converts it accordingly.
|
|
189
|
+
*
|
|
190
|
+
* @param functionName - The name of the function for which the argument is being converted.
|
|
191
|
+
* @param functionAbi - The ABI (Application Binary Interface) of the function, which defines its parameters.
|
|
192
|
+
* @param arg - The argument to be converted, which can be of various types.
|
|
193
|
+
* @param position - The index of the argument in the function's parameter list.
|
|
194
|
+
* @param genericTypeParams - An array of type tags for any generic type parameters.
|
|
182
195
|
*/
|
|
183
196
|
export function convertArgument(
|
|
184
197
|
functionName: string,
|
|
@@ -196,6 +209,15 @@ export function convertArgument(
|
|
|
196
209
|
return checkOrConvertArgument(arg, param, position, genericTypeParams);
|
|
197
210
|
}
|
|
198
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Checks if the provided argument is BCS encoded and converts it if necessary, ensuring type compatibility with the ABI.
|
|
214
|
+
* This function helps in validating and converting arguments for entry functions based on their expected types.
|
|
215
|
+
*
|
|
216
|
+
* @param arg - The argument to check or convert, which can be either a simple or entry function argument type.
|
|
217
|
+
* @param param - The expected type tag for the argument.
|
|
218
|
+
* @param position - The position of the argument in the function call.
|
|
219
|
+
* @param genericTypeParams - An array of generic type parameters that may be used for conversion.
|
|
220
|
+
*/
|
|
199
221
|
export function checkOrConvertArgument(
|
|
200
222
|
arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes,
|
|
201
223
|
param: TypeTag,
|
|
@@ -205,6 +227,15 @@ export function checkOrConvertArgument(
|
|
|
205
227
|
// If the argument is bcs encoded, we can just use it directly
|
|
206
228
|
if (isEncodedEntryFunctionArgument(arg)) {
|
|
207
229
|
// Ensure the type matches the ABI
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Checks the type of the provided argument against the expected type.
|
|
233
|
+
* This function helps validate that the argument conforms to the specified type requirements.
|
|
234
|
+
*
|
|
235
|
+
* @param typeArgs - The expected type arguments.
|
|
236
|
+
* @param arg - The argument to be checked.
|
|
237
|
+
* @param position - The position of the argument in the context of the check.
|
|
238
|
+
*/
|
|
208
239
|
checkType(param, arg, position);
|
|
209
240
|
return arg;
|
|
210
241
|
}
|
|
@@ -214,11 +245,14 @@ export function checkOrConvertArgument(
|
|
|
214
245
|
}
|
|
215
246
|
|
|
216
247
|
/**
|
|
217
|
-
* Parses a non-BCS encoded argument into a BCS encoded argument recursively
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* @param
|
|
248
|
+
* Parses a non-BCS encoded argument into a BCS encoded argument recursively.
|
|
249
|
+
* This function helps convert various types of input arguments into their corresponding BCS encoded formats based on the
|
|
250
|
+
* specified parameter type.
|
|
251
|
+
*
|
|
252
|
+
* @param arg - The argument to be parsed, which can be of various types.
|
|
253
|
+
* @param param - The type tag that defines the expected type of the argument.
|
|
254
|
+
* @param position - The position of the argument in the function call, used for error reporting.
|
|
255
|
+
* @param genericTypeParams - An array of type tags for generic type parameters, used when the parameter type is generic.
|
|
222
256
|
*/
|
|
223
257
|
function parseArg(
|
|
224
258
|
arg: SimpleEntryFunctionArgumentTypes,
|
|
@@ -234,6 +268,13 @@ function parseArg(
|
|
|
234
268
|
if (arg === "true") return new Bool(true);
|
|
235
269
|
if (arg === "false") return new Bool(false);
|
|
236
270
|
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Throws a type mismatch error for the specified move option.
|
|
274
|
+
*
|
|
275
|
+
* @param moveOption - The name of the move option that caused the type mismatch.
|
|
276
|
+
* @param position - The position where the error occurred.
|
|
277
|
+
*/
|
|
237
278
|
throwTypeMismatch("boolean", position);
|
|
238
279
|
}
|
|
239
280
|
// TODO: support uint8array?
|
|
@@ -283,7 +324,7 @@ function parseArg(
|
|
|
283
324
|
throwTypeMismatch("bigint | number | string", position);
|
|
284
325
|
}
|
|
285
326
|
|
|
286
|
-
// Generic needs to use the
|
|
327
|
+
// Generic needs to use the subtype
|
|
287
328
|
if (param.isGeneric()) {
|
|
288
329
|
const genericIndex = param.value;
|
|
289
330
|
if (genericIndex < 0 || genericIndex >= genericTypeParams.length) {
|
|
@@ -297,7 +338,7 @@ function parseArg(
|
|
|
297
338
|
if (param.isVector()) {
|
|
298
339
|
// Check special case for Vector<u8>
|
|
299
340
|
if (param.value.isU8()) {
|
|
300
|
-
// We don't allow vector<u8>, but we convert strings to UTF8
|
|
341
|
+
// We don't allow vector<u8>, but we convert strings to UTF8 Uint8Array
|
|
301
342
|
// This is legacy behavior from the original SDK
|
|
302
343
|
if (isString(arg)) {
|
|
303
344
|
return MoveVector.U8(TEXT_ENCODER.encode(arg));
|
|
@@ -380,7 +421,7 @@ function parseArg(
|
|
|
380
421
|
}
|
|
381
422
|
|
|
382
423
|
/**
|
|
383
|
-
* Checks that the type of
|
|
424
|
+
* Checks that the type of the BCS encoded argument matches the ABI
|
|
384
425
|
* @param param
|
|
385
426
|
* @param arg
|
|
386
427
|
* @param position
|
|
@@ -11,9 +11,14 @@ import { AnyRawTransaction, AnyRawTransactionInstance } from "../types";
|
|
|
11
11
|
import { Serializable } from "../../bcs";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Derives the appropriate raw transaction type based on the provided transaction details.
|
|
15
|
+
* This function helps in identifying whether the transaction is a FeePayerRawTransaction,
|
|
16
|
+
* MultiAgentRawTransaction, or a standard RawTransaction.
|
|
15
17
|
*
|
|
16
|
-
* @param transaction
|
|
18
|
+
* @param transaction - An object representing an Aptos transaction, which may include:
|
|
19
|
+
* - feePayerAddress - The address of the fee payer (optional).
|
|
20
|
+
* - secondarySignerAddresses - An array of secondary signer addresses (optional).
|
|
21
|
+
* - rawTransaction - The raw transaction data.
|
|
17
22
|
*
|
|
18
23
|
* @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
|
|
19
24
|
*/
|
|
@@ -34,11 +39,12 @@ export function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTra
|
|
|
34
39
|
|
|
35
40
|
/**
|
|
36
41
|
* Generates the 'signing message' form of a message to be signed.
|
|
42
|
+
* This function combines a domain separator with the byte representation of the message to create a signing message.
|
|
37
43
|
*
|
|
38
|
-
* @param bytes The byte representation of the message to be signed and sent to the chain
|
|
39
|
-
* @param domainSeparator A domain separator that starts with 'APTOS::'
|
|
44
|
+
* @param bytes - The byte representation of the message to be signed and sent to the chain.
|
|
45
|
+
* @param domainSeparator - A domain separator that starts with 'APTOS::'.
|
|
40
46
|
*
|
|
41
|
-
* @returns The Uint8Array of the signing message
|
|
47
|
+
* @returns The Uint8Array of the signing message.
|
|
42
48
|
*/
|
|
43
49
|
export function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array {
|
|
44
50
|
const hash = sha3Hash.create();
|
|
@@ -64,25 +70,24 @@ export function generateSigningMessage(bytes: Uint8Array, domainSeparator: strin
|
|
|
64
70
|
* @deprecated
|
|
65
71
|
* Use CryptoHashable instead by having your class implement it and call hash() to get the signing message.
|
|
66
72
|
*
|
|
67
|
-
* Generates the 'signing message' form of a
|
|
68
|
-
*
|
|
73
|
+
* Generates the 'signing message' form of a serializable value by serializing it and using the constructor name as the domain
|
|
74
|
+
* separator.
|
|
69
75
|
*
|
|
70
|
-
* @param serializable An object that has a
|
|
76
|
+
* @param serializable - An object that has a BCS serialized form.
|
|
71
77
|
*
|
|
72
|
-
* @returns The Uint8Array of the signing message
|
|
78
|
+
* @returns The Uint8Array of the signing message.
|
|
73
79
|
*/
|
|
74
80
|
export function generateSigningMessageForSerializable(serializable: Serializable): Uint8Array {
|
|
75
81
|
return generateSigningMessage(serializable.bcsToBytes(), `APTOS::${serializable.constructor.name}`);
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
/**
|
|
79
|
-
* Generates the 'signing message' form of a transaction
|
|
80
|
-
*
|
|
81
|
-
* secondary signers.
|
|
85
|
+
* Generates the 'signing message' form of a transaction by deriving the type of transaction and applying the appropriate domain
|
|
86
|
+
* separator based on the presence of a fee payer or secondary signers.
|
|
82
87
|
*
|
|
83
|
-
* @param transaction A transaction that is to be signed
|
|
88
|
+
* @param transaction - A transaction that is to be signed, which can include a fee payer address or secondary signer addresses.
|
|
84
89
|
*
|
|
85
|
-
* @returns The Uint8Array of the signing message
|
|
90
|
+
* @returns The Uint8Array of the signing message.
|
|
86
91
|
*/
|
|
87
92
|
export function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array {
|
|
88
93
|
const rawTxn = deriveTransactionType(transaction);
|
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
KeylessSignature,
|
|
17
17
|
Secp256k1PublicKey,
|
|
18
18
|
FederatedKeylessPublicKey,
|
|
19
|
+
MultiKey,
|
|
20
|
+
MultiKeySignature,
|
|
19
21
|
} from "../../core/crypto";
|
|
20
22
|
import { Ed25519PublicKey, Ed25519Signature } from "../../core/crypto/ed25519";
|
|
21
23
|
import { getInfo } from "../../internal/account";
|
|
@@ -27,6 +29,7 @@ import { normalizeBundle } from "../../utils/normalizeBundle";
|
|
|
27
29
|
import {
|
|
28
30
|
AccountAuthenticator,
|
|
29
31
|
AccountAuthenticatorEd25519,
|
|
32
|
+
AccountAuthenticatorMultiKey,
|
|
30
33
|
AccountAuthenticatorSingleKey,
|
|
31
34
|
} from "../authenticator/account";
|
|
32
35
|
import {
|
|
@@ -78,10 +81,19 @@ import { SimpleTransaction } from "../instances/simpleTransaction";
|
|
|
78
81
|
import { MultiAgentTransaction } from "../instances/multiAgentTransaction";
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
84
|
+
* Builds a transaction payload based on the provided arguments and returns a transaction payload.
|
|
85
|
+
* This function uses the RemoteABI by default, but can also utilize a specified ABI.
|
|
83
86
|
* When we call our `generateTransactionPayload` function with the relevant type properties,
|
|
84
87
|
* Typescript can infer the return type based on the appropriate function overload.
|
|
88
|
+
* @param args - The input data for generating the transaction payload.
|
|
89
|
+
* @param args.function - The function to be called, specified in the format "moduleAddress::moduleName::functionName".
|
|
90
|
+
* @param args.functionArguments - The arguments to pass to the function.
|
|
91
|
+
* @param args.typeArguments - The type arguments for the function.
|
|
92
|
+
* @param args.aptosConfig - The configuration settings for Aptos.
|
|
93
|
+
* @param args.abi - The ABI to use for the transaction, if not using the RemoteABI.
|
|
94
|
+
*
|
|
95
|
+
* @returns TransactionPayload - The generated transaction payload, which can be of type TransactionPayloadScript,
|
|
96
|
+
* TransactionPayloadMultiSig, or TransactionPayloadEntryFunction.
|
|
85
97
|
*/
|
|
86
98
|
export async function generateTransactionPayload(args: InputScriptData): Promise<TransactionPayloadScript>;
|
|
87
99
|
export async function generateTransactionPayload(
|
|
@@ -123,6 +135,19 @@ export async function generateTransactionPayload(
|
|
|
123
135
|
return generateTransactionPayloadWithABI({ ...args, abi: functionAbi });
|
|
124
136
|
}
|
|
125
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Generates a transaction payload using the provided ABI and function details.
|
|
140
|
+
* This function helps create a properly structured transaction payload for executing a specific function on a module.
|
|
141
|
+
*
|
|
142
|
+
* @param args - The input data required to generate the transaction payload.
|
|
143
|
+
* @param args.abi - The ABI of the function to be executed.
|
|
144
|
+
* @param args.function - The fully qualified name of the function in the format `moduleAddress::moduleName::functionName`.
|
|
145
|
+
* @param args.typeArguments - An array of type arguments that correspond to the function's type parameters.
|
|
146
|
+
* @param args.functionArguments - An array of arguments to be passed to the function.
|
|
147
|
+
* @param args.multisigAddress - (Optional) The address for a multisig transaction if applicable.
|
|
148
|
+
*
|
|
149
|
+
* @throws Error if the type argument count does not match the ABI or if the number of function arguments is incorrect.
|
|
150
|
+
*/
|
|
126
151
|
export function generateTransactionPayloadWithABI(args: InputEntryFunctionDataWithABI): TransactionPayloadEntryFunction;
|
|
127
152
|
export function generateTransactionPayloadWithABI(args: InputMultiSigDataWithABI): TransactionPayloadMultiSig;
|
|
128
153
|
export function generateTransactionPayloadWithABI(
|
|
@@ -143,6 +168,18 @@ export function generateTransactionPayloadWithABI(
|
|
|
143
168
|
|
|
144
169
|
// Check all BCS types, and convert any non-BCS types
|
|
145
170
|
const functionArguments: Array<EntryFunctionArgumentTypes> = args.functionArguments.map((arg, i) =>
|
|
171
|
+
/**
|
|
172
|
+
* Converts the argument for a specified function using its ABI and type arguments.
|
|
173
|
+
* This function helps ensure that the correct number of arguments is provided for the function call.
|
|
174
|
+
*
|
|
175
|
+
* @param args - The arguments for the function call.
|
|
176
|
+
* @param args.function - The specific function to be invoked.
|
|
177
|
+
* @param functionAbi - The ABI (Application Binary Interface) of the function, which includes parameter details.
|
|
178
|
+
* @param arg - The argument to be converted.
|
|
179
|
+
* @param i - The index of the argument in the function call.
|
|
180
|
+
* @param typeArguments - Additional type arguments that may be required for the conversion.
|
|
181
|
+
*/
|
|
182
|
+
// TODO: Fix JSDoc
|
|
146
183
|
convertArgument(args.function, functionAbi, arg, i, typeArguments),
|
|
147
184
|
);
|
|
148
185
|
|
|
@@ -174,6 +211,17 @@ export function generateTransactionPayloadWithABI(
|
|
|
174
211
|
return new TransactionPayloadEntryFunction(entryFunctionPayload);
|
|
175
212
|
}
|
|
176
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Generates the payload for a view function call using the provided arguments.
|
|
216
|
+
* This function helps in preparing the necessary data to interact with a specific view function on the blockchain.
|
|
217
|
+
*
|
|
218
|
+
* @param args - The input data required to generate the view function payload.
|
|
219
|
+
* @param args.function - The function identifier in the format "moduleAddress::moduleName::functionName".
|
|
220
|
+
* @param args.aptosConfig - Configuration settings for the Aptos client.
|
|
221
|
+
* @param args.abi - The ABI (Application Binary Interface) of the module.
|
|
222
|
+
*
|
|
223
|
+
* @returns The generated payload for the view function call.
|
|
224
|
+
*/
|
|
177
225
|
export async function generateViewFunctionPayload(args: InputViewFunctionDataWithRemoteABI): Promise<EntryFunction> {
|
|
178
226
|
const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);
|
|
179
227
|
|
|
@@ -191,6 +239,20 @@ export async function generateViewFunctionPayload(args: InputViewFunctionDataWit
|
|
|
191
239
|
return generateViewFunctionPayloadWithABI({ abi: functionAbi, ...args });
|
|
192
240
|
}
|
|
193
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Generates a payload for a view function call using the provided ABI and arguments.
|
|
244
|
+
* This function ensures that the type arguments and function arguments are correctly formatted
|
|
245
|
+
* and match the expected counts as defined in the ABI.
|
|
246
|
+
*
|
|
247
|
+
* @param args - The input data for generating the view function payload.
|
|
248
|
+
* @param args.abi - The ABI of the function to be called.
|
|
249
|
+
* @param args.function - The full name of the function in the format "moduleAddress::moduleName::functionName".
|
|
250
|
+
* @param args.typeArguments - An array of type arguments to be used in the function call.
|
|
251
|
+
* @param args.functionArguments - An array of arguments to be passed to the function.
|
|
252
|
+
*
|
|
253
|
+
* @throws Error if the type argument count does not match the ABI or if the function arguments
|
|
254
|
+
* do not match the expected parameters defined in the ABI.
|
|
255
|
+
*/
|
|
194
256
|
export function generateViewFunctionPayloadWithABI(args: InputViewFunctionDataWithABI): EntryFunction {
|
|
195
257
|
const functionAbi = args.abi;
|
|
196
258
|
const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);
|
|
@@ -221,6 +283,16 @@ export function generateViewFunctionPayloadWithABI(args: InputViewFunctionDataWi
|
|
|
221
283
|
return EntryFunction.build(`${moduleAddress}::${moduleName}`, functionName, typeArguments, functionArguments);
|
|
222
284
|
}
|
|
223
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Generates a transaction payload script based on the provided input data.
|
|
288
|
+
* This function helps in creating a structured script for transaction processing.
|
|
289
|
+
*
|
|
290
|
+
* @param args - The input data required to generate the transaction payload script.
|
|
291
|
+
* @param args.bytecode - The bytecode to be converted into a Uint8Array.
|
|
292
|
+
* @param args.typeArguments - The type arguments that will be standardized.
|
|
293
|
+
* @param args.functionArguments - The arguments for the function being called.
|
|
294
|
+
* @returns A new instance of TransactionPayloadScript.
|
|
295
|
+
*/
|
|
224
296
|
function generateTransactionPayloadScript(args: InputScriptData) {
|
|
225
297
|
return new TransactionPayloadScript(
|
|
226
298
|
new Script(
|
|
@@ -232,13 +304,16 @@ function generateTransactionPayloadScript(args: InputScriptData) {
|
|
|
232
304
|
}
|
|
233
305
|
|
|
234
306
|
/**
|
|
235
|
-
* Generates a raw transaction
|
|
307
|
+
* Generates a raw transaction that can be sent to the Aptos network.
|
|
236
308
|
*
|
|
237
|
-
* @param args.
|
|
238
|
-
* @param args.
|
|
239
|
-
* @param args.
|
|
309
|
+
* @param args - The arguments for generating the raw transaction.
|
|
310
|
+
* @param args.aptosConfig - The configuration for the Aptos network.
|
|
311
|
+
* @param args.sender - The transaction's sender account address as a hex input.
|
|
312
|
+
* @param args.payload - The transaction payload, which can be created using generateTransactionPayload().
|
|
313
|
+
* @param args.options - Optional parameters for transaction generation.
|
|
314
|
+
* @param args.feePayerAddress - The address of the fee payer for sponsored transactions.
|
|
240
315
|
*
|
|
241
|
-
* @returns RawTransaction
|
|
316
|
+
* @returns RawTransaction - The generated raw transaction.
|
|
242
317
|
*/
|
|
243
318
|
export async function generateRawTransaction(args: {
|
|
244
319
|
aptosConfig: AptosConfig;
|
|
@@ -315,10 +390,17 @@ export async function generateRawTransaction(args: {
|
|
|
315
390
|
}
|
|
316
391
|
|
|
317
392
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
393
|
+
* Generates a transaction based on the provided arguments.
|
|
394
|
+
* This function can create both simple and multi-agent transactions, allowing for flexible transaction handling.
|
|
395
|
+
*
|
|
396
|
+
* @param args - The input arguments for generating the transaction.
|
|
397
|
+
* @param args.aptosConfig - The configuration settings for Aptos.
|
|
398
|
+
* @param args.sender - The transaction's sender account address as a hex input.
|
|
399
|
+
* @param args.payload - The transaction payload, which can be created using `generateTransactionPayload()`.
|
|
400
|
+
* @param args.options - Optional. Transaction options object.
|
|
401
|
+
* @param args.secondarySignerAddresses - Optional. An array of addresses for additional signers in a multi-signature transaction.
|
|
402
|
+
* @param args.feePayerAddress - Optional. The address of the fee payer for sponsored transactions.
|
|
403
|
+
* @returns An instance of a transaction, which may include secondary signer addresses and a fee payer address.
|
|
322
404
|
*/
|
|
323
405
|
export async function buildTransaction(args: InputGenerateSingleSignerRawTransactionArgs): Promise<SimpleTransaction>;
|
|
324
406
|
export async function buildTransaction(args: InputGenerateMultiAgentRawTransactionArgs): Promise<MultiAgentTransaction>;
|
|
@@ -340,7 +422,7 @@ export async function buildTransaction(args: InputGenerateMultiAgentRawTransacti
|
|
|
340
422
|
* ```
|
|
341
423
|
* {
|
|
342
424
|
* rawTransaction: RawTransaction,
|
|
343
|
-
* secondarySignerAddresses
|
|
425
|
+
* secondarySignerAddresses?: Array<AccountAddress>,
|
|
344
426
|
* feePayerAddress?: AccountAddress
|
|
345
427
|
* }
|
|
346
428
|
* ```
|
|
@@ -372,15 +454,17 @@ export async function buildTransaction(args: InputGenerateRawTransactionArgs): P
|
|
|
372
454
|
}
|
|
373
455
|
|
|
374
456
|
/**
|
|
375
|
-
*
|
|
457
|
+
* Generate a signed transaction for simulation before submitting it to the chain.
|
|
458
|
+
* This function helps in preparing a transaction that can be simulated, allowing users to verify its validity and expected behavior.
|
|
376
459
|
*
|
|
377
|
-
* @param args
|
|
378
|
-
* @param args.
|
|
379
|
-
* @param args.
|
|
380
|
-
* @param args.
|
|
381
|
-
* @param args.
|
|
460
|
+
* @param args - The input data required to generate the signed transaction for simulation.
|
|
461
|
+
* @param args.transaction - An Aptos transaction type to sign.
|
|
462
|
+
* @param args.signerPublicKey - The public key of the signer.
|
|
463
|
+
* @param args.secondarySignersPublicKeys - Optional. The public keys of secondary signers if it is a multi-signer transaction.
|
|
464
|
+
* @param args.feePayerPublicKey - Optional. The public key of the fee payer in a sponsored transaction.
|
|
465
|
+
* @param args.options - Optional. Additional options for simulating the transaction.
|
|
382
466
|
*
|
|
383
|
-
* @returns A signed serialized transaction that can be simulated
|
|
467
|
+
* @returns A signed serialized transaction that can be simulated.
|
|
384
468
|
*/
|
|
385
469
|
export function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array {
|
|
386
470
|
const { signerPublicKey, transaction, secondarySignersPublicKeys, feePayerPublicKey } = args;
|
|
@@ -400,7 +484,12 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
400
484
|
getAuthenticatorForSimulation(publicKey),
|
|
401
485
|
);
|
|
402
486
|
}
|
|
403
|
-
|
|
487
|
+
if (!feePayerPublicKey) {
|
|
488
|
+
throw new Error(
|
|
489
|
+
"Must provide a feePayerPublicKey argument to generate a signed fee payer transaction for simulation",
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
const feePayerAuthenticator = getAuthenticatorForSimulation(feePayerPublicKey);
|
|
404
493
|
|
|
405
494
|
const transactionAuthenticator = new TransactionAuthenticatorFeePayer(
|
|
406
495
|
accountAuthenticator,
|
|
@@ -423,7 +512,13 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
423
512
|
|
|
424
513
|
let secondaryAccountAuthenticators: Array<AccountAuthenticator> = [];
|
|
425
514
|
|
|
426
|
-
|
|
515
|
+
if (!secondarySignersPublicKeys) {
|
|
516
|
+
throw new Error(
|
|
517
|
+
"Must provide a secondarySignersPublicKeys argument to generate a signed multi agent transaction for simulation",
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
secondaryAccountAuthenticators = secondarySignersPublicKeys.map((publicKey) =>
|
|
427
522
|
getAuthenticatorForSimulation(publicKey),
|
|
428
523
|
);
|
|
429
524
|
|
|
@@ -443,7 +538,10 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
|
|
|
443
538
|
accountAuthenticator.public_key,
|
|
444
539
|
accountAuthenticator.signature,
|
|
445
540
|
);
|
|
446
|
-
} else if (
|
|
541
|
+
} else if (
|
|
542
|
+
accountAuthenticator instanceof AccountAuthenticatorSingleKey ||
|
|
543
|
+
accountAuthenticator instanceof AccountAuthenticatorMultiKey
|
|
544
|
+
) {
|
|
447
545
|
transactionAuthenticator = new TransactionAuthenticatorSingleSender(accountAuthenticator);
|
|
448
546
|
} else {
|
|
449
547
|
throw new Error("Invalid public key");
|
|
@@ -477,18 +575,37 @@ export function getAuthenticatorForSimulation(publicKey: PublicKey) {
|
|
|
477
575
|
return new AccountAuthenticatorSingleKey(accountPublicKey, new AnySignature(invalidSignature));
|
|
478
576
|
}
|
|
479
577
|
|
|
480
|
-
|
|
481
|
-
|
|
578
|
+
if (MultiKey.isInstance(accountPublicKey)) {
|
|
579
|
+
return new AccountAuthenticatorMultiKey(
|
|
580
|
+
accountPublicKey,
|
|
581
|
+
new MultiKeySignature({
|
|
582
|
+
signatures: accountPublicKey.publicKeys.map(() => new AnySignature(invalidSignature)),
|
|
583
|
+
bitmap: accountPublicKey.createBitmap({
|
|
584
|
+
bits: Array(accountPublicKey.publicKeys.length)
|
|
585
|
+
.fill(0)
|
|
586
|
+
.map((_, i) => i),
|
|
587
|
+
}),
|
|
588
|
+
}),
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
throw new Error("Unsupported PublicKey used for simulations");
|
|
482
593
|
}
|
|
483
594
|
|
|
484
595
|
/**
|
|
485
|
-
*
|
|
596
|
+
* Generate a signed transaction ready for submission to the blockchain.
|
|
597
|
+
* This function prepares the transaction by authenticating the sender and any additional signers based on the provided arguments.
|
|
598
|
+
*
|
|
599
|
+
* @param args - The input data required to generate the signed transaction.
|
|
600
|
+
* @param args.transaction - An Aptos transaction type containing the details of the transaction.
|
|
601
|
+
* @param args.senderAuthenticator - The account authenticator of the transaction sender.
|
|
602
|
+
* @param args.feePayerAuthenticator - The authenticator for the fee payer, required if the transaction has a fee payer address.
|
|
603
|
+
* @param args.additionalSignersAuthenticators - Optional authenticators for additional signers in a multi-signer transaction.
|
|
486
604
|
*
|
|
487
|
-
* @
|
|
488
|
-
* @param args.senderAuthenticator The account authenticator of the transaction sender
|
|
489
|
-
* @param args.secondarySignerAuthenticators optional. For when the transaction is a multi signers transaction
|
|
605
|
+
* @returns A Uint8Array representing the signed transaction in bytes.
|
|
490
606
|
*
|
|
491
|
-
* @
|
|
607
|
+
* @throws Error if the feePayerAuthenticator is not provided for a fee payer transaction.
|
|
608
|
+
* @throws Error if additionalSignersAuthenticators are not provided for a multi-signer transaction.
|
|
492
609
|
*/
|
|
493
610
|
export function generateSignedTransaction(args: InputSubmitTransactionData): Uint8Array {
|
|
494
611
|
const { transaction, feePayerAuthenticator, additionalSignersAuthenticators } = args;
|
|
@@ -532,8 +649,8 @@ export function generateSignedTransaction(args: InputSubmitTransactionData): Uin
|
|
|
532
649
|
}
|
|
533
650
|
|
|
534
651
|
/**
|
|
535
|
-
* Hashes the set of values
|
|
536
|
-
* @param input array of UTF-8 strings or
|
|
652
|
+
* Hashes the set of values using a SHA-3 256 hash algorithm.
|
|
653
|
+
* @param input - An array of UTF-8 strings or Uint8Array byte arrays to be hashed.
|
|
537
654
|
*/
|
|
538
655
|
export function hashValues(input: (Uint8Array | string)[]): Uint8Array {
|
|
539
656
|
const hash = sha3Hash.create();
|
|
@@ -544,13 +661,19 @@ export function hashValues(input: (Uint8Array | string)[]): Uint8Array {
|
|
|
544
661
|
}
|
|
545
662
|
|
|
546
663
|
/**
|
|
547
|
-
* The domain separated prefix for hashing
|
|
664
|
+
* The domain separated prefix for hashing transactions
|
|
548
665
|
*/
|
|
549
666
|
const TRANSACTION_PREFIX = hashValues(["APTOS::Transaction"]);
|
|
550
667
|
|
|
551
668
|
/**
|
|
552
|
-
* Generates a user transaction hash for the
|
|
553
|
-
*
|
|
669
|
+
* Generates a user transaction hash for the provided transaction payload, which must already have an authenticator.
|
|
670
|
+
* This function helps ensure the integrity and uniqueness of the transaction by producing a hash based on the signed transaction data.
|
|
671
|
+
*
|
|
672
|
+
* @param args - The input data required to submit the transaction.
|
|
673
|
+
* @param args.authenticator - The authenticator for the transaction.
|
|
674
|
+
* @param args.payload - The payload containing the transaction details.
|
|
675
|
+
* @param args.sender - The address of the sender initiating the transaction.
|
|
676
|
+
* @param args.sequenceNumber - The sequence number of the transaction for the sender.
|
|
554
677
|
*/
|
|
555
678
|
export function generateUserTransactionHash(args: InputSubmitTransactionData): string {
|
|
556
679
|
const signedTransaction = generateSignedTransaction(args);
|
|
@@ -562,14 +685,15 @@ export function generateUserTransactionHash(args: InputSubmitTransactionData): s
|
|
|
562
685
|
}
|
|
563
686
|
|
|
564
687
|
/**
|
|
565
|
-
* Fetches and caches ABIs
|
|
566
|
-
*
|
|
567
|
-
* @param
|
|
568
|
-
* @param
|
|
569
|
-
* @param
|
|
570
|
-
* @param
|
|
571
|
-
* @param
|
|
572
|
-
* @param
|
|
688
|
+
* Fetches and caches ABIs while allowing for pass-through on provided ABIs.
|
|
689
|
+
*
|
|
690
|
+
* @param key - A unique identifier for the cached ABI.
|
|
691
|
+
* @param moduleAddress - The address of the module from which to fetch the ABI.
|
|
692
|
+
* @param moduleName - The name of the module containing the function.
|
|
693
|
+
* @param functionName - The name of the function whose ABI is being fetched.
|
|
694
|
+
* @param aptosConfig - Configuration settings for Aptos.
|
|
695
|
+
* @param abi - An optional ABI to use if already available.
|
|
696
|
+
* @param fetch - A function to fetch the ABI if it is not provided.
|
|
573
697
|
*/
|
|
574
698
|
async function fetchAbi<T extends FunctionABI>({
|
|
575
699
|
key,
|