@aptos-labs/ts-sdk 1.33.1 → 1.33.2-sc.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 +11 -6
- package/dist/common/{accountAddress-BHsGaOsa.d.ts → accountAddress-Cf1amU98.d.ts} +279 -0
- package/dist/common/{chunk-F43XVDYJ.js → chunk-IHUCZKG2.js} +1 -1
- package/dist/common/chunk-IHUCZKG2.js.map +1 -0
- package/dist/common/cli/index.d.ts +47 -9
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +2126 -306
- package/dist/common/index.js +33 -33
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-B3xHXAQe.d.mts → Ed25519Account-D4j3_WIS.d.mts} +122 -12
- package/dist/esm/account/AbstractKeylessAccount.d.mts +82 -7
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +6 -4
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.d.mts +65 -0
- package/dist/esm/account/AccountUtils.mjs +2 -0
- package/dist/esm/account/Ed25519Account.d.mts +4 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +30 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +26 -5
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +31 -5
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +41 -5
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +5 -3
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +5 -2
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.d.mts +19 -0
- package/dist/esm/account/utils.mjs +2 -0
- package/dist/esm/api/account.d.mts +26 -4
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +19 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +7 -2
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +17 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +6 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +30 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +7 -0
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +12 -2
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +12 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +15 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +5 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +9 -2
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +4 -0
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +6 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +6 -0
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +25 -6
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +72 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/helpers.d.mts +2 -0
- package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +9 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +8 -2
- 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 +7 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +7 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +2 -0
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +1 -0
- package/dist/esm/bcs/deserializer.d.mts +43 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.d.mts +1 -0
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +11 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +13 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +25 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +57 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +61 -0
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-4DP3PEYK.mjs → chunk-32WLD3F3.mjs} +2 -2
- package/dist/esm/chunk-32WLD3F3.mjs.map +1 -0
- package/dist/esm/{chunk-FZDEGDUY.mjs → chunk-35DKMW7Q.mjs} +1 -1
- package/dist/esm/chunk-35DKMW7Q.mjs.map +1 -0
- package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
- package/dist/esm/chunk-3OLFJ65O.mjs.map +1 -0
- package/dist/esm/chunk-3XH3NNSR.mjs +2 -0
- package/dist/esm/chunk-3XH3NNSR.mjs.map +1 -0
- package/dist/esm/chunk-4RXKALLC.mjs +2 -0
- package/dist/esm/chunk-4RXKALLC.mjs.map +1 -0
- package/dist/esm/{chunk-IBZKCBN5.mjs → chunk-4UYVRG5Z.mjs} +2 -2
- package/dist/esm/chunk-4UYVRG5Z.mjs.map +1 -0
- package/dist/esm/chunk-4YLUM62M.mjs +2 -0
- package/dist/esm/chunk-4YLUM62M.mjs.map +1 -0
- package/dist/esm/{chunk-JMPHD4BP.mjs → chunk-4ZJJINCW.mjs} +2 -2
- package/dist/esm/chunk-4ZJJINCW.mjs.map +1 -0
- package/dist/esm/{chunk-ZXVN3HXB.mjs → chunk-66AQ2MJ6.mjs} +2 -2
- package/dist/esm/chunk-66AQ2MJ6.mjs.map +1 -0
- package/dist/esm/{chunk-4XB3BB5Z.mjs → chunk-67BUAZ6O.mjs} +2 -2
- package/dist/esm/chunk-67BUAZ6O.mjs.map +1 -0
- package/dist/esm/{chunk-333QBK32.mjs → chunk-67ZANQ3R.mjs} +2 -2
- package/dist/esm/chunk-67ZANQ3R.mjs.map +1 -0
- package/dist/esm/{chunk-UFPYCROT.mjs → chunk-6IIAGMDR.mjs} +2 -2
- package/dist/esm/chunk-6IIAGMDR.mjs.map +1 -0
- package/dist/esm/{chunk-F2WY2DEY.mjs → chunk-6IPM5P4L.mjs} +2 -2
- package/dist/esm/chunk-6IPM5P4L.mjs.map +1 -0
- package/dist/esm/{chunk-IK2NYNKG.mjs → chunk-6XHBRRS6.mjs} +2 -2
- package/dist/esm/chunk-6XHBRRS6.mjs.map +1 -0
- package/dist/esm/chunk-7HLNV3QL.mjs +2 -0
- package/dist/esm/chunk-7HLNV3QL.mjs.map +1 -0
- package/dist/esm/{chunk-2KSMV5KD.mjs → chunk-A3NEASNH.mjs} +2 -2
- package/dist/esm/chunk-A3NEASNH.mjs.map +1 -0
- package/dist/esm/{chunk-2CJC43CV.mjs → chunk-A5L76YP7.mjs} +1 -1
- package/dist/esm/chunk-A5L76YP7.mjs.map +1 -0
- package/dist/esm/{chunk-5PVZ4N42.mjs → chunk-AD3A7DTH.mjs} +2 -2
- package/dist/esm/chunk-AD3A7DTH.mjs.map +1 -0
- package/dist/esm/chunk-AIABPCUF.mjs +2 -0
- package/dist/esm/{chunk-YD2BMHH7.mjs.map → chunk-AIABPCUF.mjs.map} +1 -1
- package/dist/esm/{chunk-AOROYJ74.mjs → chunk-AZWVCBK2.mjs} +2 -2
- package/dist/esm/chunk-AZWVCBK2.mjs.map +1 -0
- package/dist/esm/chunk-BFIXIXHO.mjs +2 -0
- package/dist/esm/chunk-BFIXIXHO.mjs.map +1 -0
- package/dist/esm/{chunk-6ZOVTYLJ.mjs → chunk-BI3BTSUB.mjs} +2 -2
- package/dist/esm/chunk-BI3BTSUB.mjs.map +1 -0
- package/dist/esm/{chunk-OIOGOW6I.mjs → chunk-C3Q23D22.mjs} +1 -1
- package/dist/esm/chunk-C3Q23D22.mjs.map +1 -0
- package/dist/esm/{chunk-EGV3HFE3.mjs → chunk-CDYLZDD2.mjs} +2 -2
- package/dist/esm/chunk-CDYLZDD2.mjs.map +1 -0
- package/dist/esm/{chunk-LA5HJILW.mjs → chunk-CGTHWGSJ.mjs} +2 -2
- package/dist/esm/chunk-CGTHWGSJ.mjs.map +1 -0
- package/dist/esm/{chunk-VWGB5BHW.mjs → chunk-CNCRJ56P.mjs} +2 -2
- package/dist/esm/chunk-CNCRJ56P.mjs.map +1 -0
- package/dist/esm/{chunk-VQZMI3EZ.mjs → chunk-CWKNJZB6.mjs} +2 -2
- package/dist/esm/chunk-CWKNJZB6.mjs.map +1 -0
- package/dist/esm/chunk-CWRANLXZ.mjs +2 -0
- package/dist/esm/chunk-CWRANLXZ.mjs.map +1 -0
- package/dist/esm/{chunk-SK3LIS4Z.mjs → chunk-CYMVZJHC.mjs} +2 -2
- package/dist/esm/chunk-CYMVZJHC.mjs.map +1 -0
- package/dist/esm/{chunk-V4FKFCBL.mjs → chunk-DAFSKSZ5.mjs} +1 -1
- package/dist/esm/chunk-DAFSKSZ5.mjs.map +1 -0
- package/dist/esm/chunk-DPW6ELCQ.mjs +2 -0
- package/dist/esm/chunk-DPW6ELCQ.mjs.map +1 -0
- package/dist/esm/{chunk-YEWZAR76.mjs → chunk-DW3ETAZB.mjs} +2 -2
- package/dist/esm/chunk-DW3ETAZB.mjs.map +1 -0
- package/dist/esm/{chunk-AJ5JHBAE.mjs → chunk-EBMEXURY.mjs} +2 -2
- package/dist/esm/chunk-EBMEXURY.mjs.map +1 -0
- package/dist/esm/{chunk-G4KAHJXB.mjs → chunk-EBS4BKER.mjs} +2 -2
- package/dist/esm/chunk-EBS4BKER.mjs.map +1 -0
- package/dist/esm/{chunk-S5SQJRAV.mjs → chunk-ECZYQTNN.mjs} +2 -2
- package/dist/esm/chunk-ECZYQTNN.mjs.map +1 -0
- package/dist/esm/chunk-EMURYYVO.mjs +2 -0
- package/dist/esm/chunk-EMURYYVO.mjs.map +1 -0
- package/dist/esm/chunk-F2ZTBAJJ.mjs +2 -0
- package/dist/esm/chunk-F2ZTBAJJ.mjs.map +1 -0
- package/dist/esm/chunk-FC2IYWI7.mjs +2 -0
- package/dist/esm/chunk-FC2IYWI7.mjs.map +1 -0
- package/dist/esm/chunk-FKJ3GCBI.mjs +2 -0
- package/dist/esm/chunk-FKJ3GCBI.mjs.map +1 -0
- package/dist/esm/{chunk-AKIO3OIT.mjs → chunk-FN4C3CKC.mjs} +2 -2
- package/dist/esm/chunk-FN4C3CKC.mjs.map +1 -0
- package/dist/esm/{chunk-2ESU5N3V.mjs → chunk-FNXO3URE.mjs} +2 -2
- package/dist/esm/chunk-FNXO3URE.mjs.map +1 -0
- package/dist/esm/{chunk-7V35JAAF.mjs → chunk-FQECACH3.mjs} +2 -2
- package/dist/esm/chunk-FQECACH3.mjs.map +1 -0
- package/dist/esm/{chunk-2QGJDHME.mjs → chunk-FQXEX2HN.mjs} +2 -2
- package/dist/esm/chunk-FQXEX2HN.mjs.map +1 -0
- package/dist/esm/{chunk-T6ADNZE5.mjs → chunk-G4O6FXCF.mjs} +2 -2
- package/dist/esm/chunk-G4O6FXCF.mjs.map +1 -0
- package/dist/esm/{chunk-7N7FEBZA.mjs → chunk-G5ZWH5T3.mjs} +2 -2
- package/dist/esm/chunk-G5ZWH5T3.mjs.map +1 -0
- package/dist/esm/{chunk-UGIHQFID.mjs → chunk-GL4OJVYH.mjs} +2 -2
- package/dist/esm/chunk-GL4OJVYH.mjs.map +1 -0
- package/dist/esm/{chunk-GMKKHGXK.mjs → chunk-GOXRBEIJ.mjs} +1 -1
- package/dist/esm/chunk-GOXRBEIJ.mjs.map +1 -0
- package/dist/esm/chunk-GP4TLDVZ.mjs +1 -0
- package/dist/esm/{chunk-33CVOPIN.mjs → chunk-H3XZ3FZY.mjs} +2 -2
- package/dist/esm/{chunk-33CVOPIN.mjs.map → chunk-H3XZ3FZY.mjs.map} +1 -1
- package/dist/esm/{chunk-7T26VA2W.mjs → chunk-I7JGKVOC.mjs} +2 -2
- package/dist/esm/chunk-I7JGKVOC.mjs.map +1 -0
- package/dist/esm/{chunk-6Q2O5G3J.mjs → chunk-IF4UU2MT.mjs} +1 -1
- package/dist/esm/chunk-IF4UU2MT.mjs.map +1 -0
- package/dist/esm/{chunk-LPVGVTWT.mjs → chunk-IJ2QKE4W.mjs} +2 -2
- package/dist/esm/chunk-IJ2QKE4W.mjs.map +1 -0
- package/dist/esm/chunk-JJM6ELMS.mjs +2 -0
- package/dist/esm/chunk-JJM6ELMS.mjs.map +1 -0
- package/dist/esm/{chunk-SNYYEVJA.mjs → chunk-K2CSACQY.mjs} +2 -2
- package/dist/esm/chunk-K2CSACQY.mjs.map +1 -0
- package/dist/esm/{chunk-NZ7M6NG2.mjs → chunk-KFCLSJC3.mjs} +2 -2
- package/dist/esm/chunk-KFGXOZ77.mjs +2 -0
- package/dist/esm/chunk-KFGXOZ77.mjs.map +1 -0
- package/dist/esm/{chunk-PXMNAP2Q.mjs → chunk-KG23XFU2.mjs} +2 -2
- package/dist/esm/chunk-KG23XFU2.mjs.map +1 -0
- package/dist/esm/chunk-KNTAED2Z.mjs +2 -0
- package/dist/esm/chunk-KNTAED2Z.mjs.map +1 -0
- package/dist/esm/{chunk-GVNK3UMT.mjs → chunk-KPLWOVKG.mjs} +2 -2
- package/dist/esm/chunk-KPLWOVKG.mjs.map +1 -0
- package/dist/esm/{chunk-BRV3RLKW.mjs → chunk-MT2RJ7H3.mjs} +2 -2
- package/dist/esm/chunk-MT2RJ7H3.mjs.map +1 -0
- package/dist/esm/{chunk-ACVIE7IE.mjs → chunk-N4DM5FYH.mjs} +2 -2
- package/dist/esm/chunk-N4DM5FYH.mjs.map +1 -0
- package/dist/esm/{chunk-ZMMLM6ZJ.mjs → chunk-N4VVDQA5.mjs} +2 -2
- package/dist/esm/chunk-N4VVDQA5.mjs.map +1 -0
- package/dist/esm/{chunk-LGTOOAQI.mjs → chunk-N6YTF76Q.mjs} +2 -2
- package/dist/esm/chunk-N6YTF76Q.mjs.map +1 -0
- package/dist/esm/{chunk-HMMNQFVM.mjs → chunk-NDUIXMIA.mjs} +2 -2
- package/dist/esm/chunk-NDUIXMIA.mjs.map +1 -0
- package/dist/esm/{chunk-U3T4ZT7B.mjs → chunk-NW2WUKWV.mjs} +2 -2
- package/dist/esm/chunk-NW2WUKWV.mjs.map +1 -0
- package/dist/esm/{chunk-XZN344G4.mjs → chunk-ODEDSSQL.mjs} +2 -2
- package/dist/esm/chunk-ODEDSSQL.mjs.map +1 -0
- package/dist/esm/{chunk-42H7WETG.mjs → chunk-ORMOQWWH.mjs} +2 -2
- package/dist/esm/chunk-ORMOQWWH.mjs.map +1 -0
- package/dist/esm/{chunk-4MTSP4S2.mjs → chunk-P4VF7BN4.mjs} +2 -2
- package/dist/esm/chunk-P4VF7BN4.mjs.map +1 -0
- package/dist/esm/chunk-P54RNN4V.mjs +2 -0
- package/dist/esm/chunk-P54RNN4V.mjs.map +1 -0
- package/dist/esm/{chunk-XOLU6UP3.mjs → chunk-PHJRCZQ3.mjs} +2 -2
- package/dist/esm/chunk-PHJRCZQ3.mjs.map +1 -0
- package/dist/esm/{chunk-VIZHWYI5.mjs → chunk-PNDCGNVH.mjs} +2 -2
- package/dist/esm/chunk-PNDCGNVH.mjs.map +1 -0
- package/dist/esm/{chunk-5LGKGWLX.mjs → chunk-PTS3BTOU.mjs} +2 -2
- package/dist/esm/chunk-PTS3BTOU.mjs.map +1 -0
- package/dist/esm/{chunk-NK67FECB.mjs → chunk-PUNTBVRJ.mjs} +2 -2
- package/dist/esm/chunk-PUNTBVRJ.mjs.map +1 -0
- package/dist/esm/{chunk-DBTKJMLV.mjs → chunk-Q2C6ZY5N.mjs} +2 -2
- package/dist/esm/chunk-Q2C6ZY5N.mjs.map +1 -0
- package/dist/esm/{chunk-UJSTWN32.mjs → chunk-Q3VS6AEN.mjs} +2 -2
- package/dist/esm/{chunk-UJSTWN32.mjs.map → chunk-Q3VS6AEN.mjs.map} +1 -1
- package/dist/esm/{chunk-JNO7KPMG.mjs → chunk-Q4C4U6I4.mjs} +2 -2
- package/dist/esm/chunk-Q4C4U6I4.mjs.map +1 -0
- package/dist/esm/{chunk-F45G3GP3.mjs → chunk-QHEKBHNU.mjs} +2 -2
- package/dist/esm/chunk-R7QOPBWA.mjs +2 -0
- package/dist/esm/chunk-R7QOPBWA.mjs.map +1 -0
- package/dist/esm/{chunk-J7PJSK3J.mjs → chunk-RJ7F4JDV.mjs} +1 -1
- package/dist/esm/chunk-RJ7F4JDV.mjs.map +1 -0
- package/dist/esm/{chunk-BUAHUVAD.mjs → chunk-ROT6S6BM.mjs} +2 -2
- package/dist/esm/chunk-ROT6S6BM.mjs.map +1 -0
- package/dist/esm/{chunk-RCA73RVB.mjs → chunk-SOLQ5VON.mjs} +2 -2
- package/dist/esm/chunk-SOLQ5VON.mjs.map +1 -0
- package/dist/esm/{chunk-L4SWQLAJ.mjs → chunk-SQR3AIY7.mjs} +2 -2
- package/dist/esm/chunk-SQR3AIY7.mjs.map +1 -0
- package/dist/esm/{chunk-SPRNSFUV.mjs → chunk-STY74NUA.mjs} +2 -2
- package/dist/esm/chunk-STY74NUA.mjs.map +1 -0
- package/dist/esm/{chunk-LKKI2KAP.mjs → chunk-SZRZ3HIL.mjs} +2 -2
- package/dist/esm/chunk-SZRZ3HIL.mjs.map +1 -0
- package/dist/esm/{chunk-KCWRCWNT.mjs → chunk-T6NQDM7D.mjs} +2 -2
- package/dist/esm/chunk-T6NQDM7D.mjs.map +1 -0
- package/dist/esm/{chunk-ZMBXHMVQ.mjs → chunk-TOBQ5UE6.mjs} +2 -2
- package/dist/esm/chunk-TOBQ5UE6.mjs.map +1 -0
- package/dist/esm/{chunk-2MN7DW2J.mjs → chunk-UF6SI2QE.mjs} +2 -2
- package/dist/esm/chunk-UF6SI2QE.mjs.map +1 -0
- package/dist/esm/chunk-UIRAXHDH.mjs +1 -0
- package/dist/esm/chunk-UIRAXHDH.mjs.map +1 -0
- package/dist/esm/{chunk-ALNQK276.mjs → chunk-UONSJQUV.mjs} +2 -2
- package/dist/esm/chunk-UONSJQUV.mjs.map +1 -0
- package/dist/esm/{chunk-N62NUAHT.mjs → chunk-UQ7D5CSM.mjs} +2 -2
- package/dist/esm/chunk-UQ7D5CSM.mjs.map +1 -0
- package/dist/esm/{chunk-BAEIZAP7.mjs → chunk-UYONA6PP.mjs} +2 -2
- package/dist/esm/chunk-UYONA6PP.mjs.map +1 -0
- package/dist/esm/{chunk-YJVZFYBX.mjs → chunk-VCIJX6R4.mjs} +2 -2
- package/dist/esm/chunk-VCIJX6R4.mjs.map +1 -0
- package/dist/esm/{chunk-CX6KECGV.mjs → chunk-VVAKGJDN.mjs} +2 -2
- package/dist/esm/chunk-VVAKGJDN.mjs.map +1 -0
- package/dist/esm/chunk-VZELORLW.mjs +2 -0
- package/dist/esm/chunk-VZELORLW.mjs.map +1 -0
- package/dist/esm/{chunk-IHGA5KAD.mjs → chunk-W4BSN6SK.mjs} +1 -1
- package/dist/esm/chunk-W4BSN6SK.mjs.map +1 -0
- package/dist/esm/chunk-WCMW2L3P.mjs +2 -0
- package/dist/esm/chunk-WCMW2L3P.mjs.map +1 -0
- package/dist/esm/{chunk-PMGK5IHB.mjs → chunk-X3SO2LDX.mjs} +2 -2
- package/dist/esm/chunk-X3SO2LDX.mjs.map +1 -0
- package/dist/esm/{chunk-H3C3VTHS.mjs → chunk-XGF7UNEW.mjs} +2 -2
- package/dist/esm/chunk-XGF7UNEW.mjs.map +1 -0
- package/dist/esm/chunk-XHPWHA6B.mjs +2 -0
- package/dist/esm/chunk-XHPWHA6B.mjs.map +1 -0
- package/dist/esm/{chunk-2C27NY4D.mjs → chunk-XIFIACCB.mjs} +2 -2
- package/dist/esm/chunk-XIFIACCB.mjs.map +1 -0
- package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
- package/dist/esm/{chunk-UGTIALNW.mjs.map → chunk-XJJVJOX5.mjs.map} +1 -1
- package/dist/esm/{chunk-OPO5EYF7.mjs → chunk-XKUIMGKU.mjs} +2 -2
- package/dist/esm/chunk-XKUIMGKU.mjs.map +1 -0
- package/dist/esm/{chunk-ZMS3AOEZ.mjs → chunk-XLFX2YQA.mjs} +2 -2
- package/dist/esm/chunk-XLFX2YQA.mjs.map +1 -0
- package/dist/esm/chunk-XTOIL6MB.mjs +2 -0
- package/dist/esm/chunk-XTOIL6MB.mjs.map +1 -0
- package/dist/esm/{chunk-U6OCK6T4.mjs → chunk-Y6QTKAQO.mjs} +2 -2
- package/dist/esm/chunk-Y6QTKAQO.mjs.map +1 -0
- package/dist/esm/{chunk-HBIDHQ2M.mjs → chunk-YOZBVVKL.mjs} +1 -1
- package/dist/esm/chunk-YOZBVVKL.mjs.map +1 -0
- package/dist/esm/{chunk-WFK3XRQX.mjs → chunk-YPGI5HAA.mjs} +2 -2
- package/dist/esm/chunk-YPGI5HAA.mjs.map +1 -0
- package/dist/esm/{chunk-QI7OREBM.mjs → chunk-ZJNPBHEI.mjs} +2 -2
- package/dist/esm/chunk-ZJNPBHEI.mjs.map +1 -0
- package/dist/esm/cli/index.d.mts +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +20 -8
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +27 -0
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.d.mts +5 -0
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +34 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +38 -0
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +1 -0
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +7 -0
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +1 -0
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +47 -0
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +2 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.d.mts +14 -0
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +58 -5
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +24 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +14 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.d.mts +28 -0
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +3 -2
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +132 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +42 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +39 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +10 -0
- package/dist/esm/core/crypto/poseidon.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +10 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +3 -0
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +2 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +51 -3
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +7 -0
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +37 -2
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.d.mts +3 -0
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.d.mts +21 -0
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +3 -2
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +1 -0
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.d.mts +9 -6
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +25 -4
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +28 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +4 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +32 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +6 -0
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +6 -0
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +9 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +8 -0
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +7 -2
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +3 -0
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +6 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +4 -0
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +15 -0
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +17 -5
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +3 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/{publicKey-BVXX1nVl.d.mts → publicKey-BMtGNNLg.d.mts} +36 -0
- package/dist/esm/transactions/authenticator/account.d.mts +29 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +3 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +24 -2
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +6 -3
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +9 -0
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +9 -0
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +3 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +11 -0
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +9 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +31 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +8 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +11 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +9 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +17 -0
- package/dist/esm/transactions/instances/transactionPayload.d.mts +49 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +20 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/asyncQueue.d.mts +16 -0
- package/dist/esm/transactions/management/asyncQueue.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +4 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +46 -7
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/scriptComposer/index.d.mts +47 -0
- package/dist/esm/transactions/scriptComposer/index.mjs +2 -0
- package/dist/esm/transactions/scriptComposer/index.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +65 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +4 -2
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +37 -3
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +11 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +43 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +83 -0
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +9 -0
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +90 -2
- package/dist/esm/types/index.d.mts +1 -0
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +52 -0
- package/dist/esm/types/keyless.d.mts +12 -0
- package/dist/esm/types/types.d.mts +1 -0
- package/dist/esm/utils/apiEndpoints.d.mts +30 -0
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +24 -0
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +21 -0
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -0
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/memoize.d.mts +4 -0
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +9 -0
- 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 +10 -4
- package/src/account/AbstractKeylessAccount.ts +80 -9
- package/src/account/Account.ts +51 -6
- package/src/account/AccountUtils.ts +216 -0
- package/src/account/Ed25519Account.ts +26 -0
- package/src/account/EphemeralKeyPair.ts +30 -0
- package/src/account/FederatedKeylessAccount.ts +10 -3
- package/src/account/KeylessAccount.ts +13 -1
- package/src/account/MultiKeyAccount.ts +75 -12
- package/src/account/SingleKeyAccount.ts +63 -6
- package/src/account/index.ts +1 -0
- package/src/account/utils.ts +16 -0
- package/src/api/account.ts +22 -2
- package/src/api/ans.ts +15 -0
- package/src/api/aptos.ts +3 -0
- package/src/api/aptosConfig.ts +24 -0
- package/src/api/coin.ts +3 -0
- package/src/api/digitalAsset.ts +26 -0
- package/src/api/event.ts +6 -0
- package/src/api/faucet.ts +11 -2
- package/src/api/fungibleAsset.ts +8 -0
- package/src/api/general.ts +12 -0
- package/src/api/keyless.ts +6 -0
- package/src/api/object.ts +3 -0
- package/src/api/staking.ts +5 -0
- package/src/api/table.ts +5 -0
- package/src/api/transaction.ts +19 -3
- package/src/api/transactionSubmission/build.ts +89 -2
- package/src/api/transactionSubmission/helpers.ts +2 -0
- package/src/api/transactionSubmission/management.ts +5 -0
- package/src/api/transactionSubmission/sign.ts +4 -0
- package/src/api/transactionSubmission/simulate.ts +4 -0
- package/src/api/transactionSubmission/submit.ts +4 -0
- package/src/api/utils.ts +1 -0
- package/src/bcs/deserializer.ts +47 -1
- package/src/bcs/serializable/entryFunctionBytes.ts +10 -0
- package/src/bcs/serializable/fixedBytes.ts +12 -0
- package/src/bcs/serializable/movePrimitives.ts +26 -0
- package/src/bcs/serializable/moveStructs.ts +56 -0
- package/src/bcs/serializer.ts +64 -1
- package/src/cli/localNode.ts +22 -8
- package/src/cli/move.ts +26 -0
- package/src/client/core.ts +4 -0
- package/src/client/get.ts +75 -1
- package/src/client/post.ts +37 -0
- package/src/core/account/utils/address.ts +6 -0
- package/src/core/accountAddress.ts +46 -0
- package/src/core/authenticationKey.ts +22 -0
- package/src/core/common.ts +14 -0
- package/src/core/crypto/ed25519.ts +58 -4
- package/src/core/crypto/ephemeral.ts +22 -0
- package/src/core/crypto/federatedKeyless.ts +12 -0
- package/src/core/crypto/hdKey.ts +29 -0
- package/src/core/crypto/keyless.ts +134 -0
- package/src/core/crypto/multiEd25519.ts +40 -0
- package/src/core/crypto/multiKey.ts +37 -1
- package/src/core/crypto/poseidon.ts +20 -0
- package/src/core/crypto/privateKey.ts +8 -0
- package/src/core/crypto/proof.ts +2 -0
- package/src/core/crypto/publicKey.ts +14 -0
- package/src/core/crypto/secp256k1.ts +49 -2
- package/src/core/crypto/signature.ts +8 -0
- package/src/core/crypto/singleKey.ts +34 -2
- package/src/core/crypto/utils.ts +2 -0
- package/src/core/hex.ts +20 -0
- package/src/internal/account.ts +27 -7
- package/src/internal/ans.ts +27 -0
- package/src/internal/coin.ts +1 -0
- package/src/internal/digitalAsset.ts +30 -0
- package/src/internal/event.ts +6 -0
- package/src/internal/faucet.ts +5 -0
- package/src/internal/fungibleAsset.ts +5 -0
- package/src/internal/general.ts +7 -0
- package/src/internal/keyless.ts +4 -0
- package/src/internal/object.ts +2 -0
- package/src/internal/staking.ts +5 -1
- package/src/internal/table.ts +3 -0
- package/src/internal/transaction.ts +16 -0
- package/src/internal/transactionSubmission.ts +15 -2
- package/src/transactions/authenticator/account.ts +26 -0
- package/src/transactions/authenticator/transaction.ts +20 -0
- package/src/transactions/index.ts +1 -0
- package/src/transactions/instances/chainId.ts +8 -0
- package/src/transactions/instances/identifier.ts +8 -0
- package/src/transactions/instances/moduleId.ts +10 -0
- package/src/transactions/instances/multiAgentTransaction.ts +8 -0
- package/src/transactions/instances/rawTransaction.ts +30 -0
- package/src/transactions/instances/rotationProofChallenge.ts +6 -0
- package/src/transactions/instances/signedTransaction.ts +8 -0
- package/src/transactions/instances/simpleTransaction.ts +8 -0
- package/src/transactions/instances/transactionArgument.ts +16 -0
- package/src/transactions/instances/transactionPayload.ts +50 -0
- package/src/transactions/management/accountSequenceNumber.ts +16 -0
- package/src/transactions/management/asyncQueue.ts +16 -0
- package/src/transactions/management/transactionWorker.ts +42 -5
- package/src/transactions/scriptComposer/index.ts +86 -0
- package/src/transactions/transactionBuilder/helpers.ts +82 -10
- package/src/transactions/transactionBuilder/remoteAbi.ts +75 -1
- package/src/transactions/transactionBuilder/signingMessage.ts +10 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +58 -0
- package/src/transactions/typeTag/index.ts +82 -0
- package/src/transactions/typeTag/parser.ts +24 -0
- package/src/transactions/types.ts +89 -0
- package/src/types/index.ts +1 -0
- package/src/types/indexer.ts +52 -0
- package/src/types/keyless.ts +12 -0
- package/src/utils/apiEndpoints.ts +30 -2
- package/src/utils/const.ts +24 -1
- package/src/utils/helpers.ts +22 -0
- package/src/utils/memoize.ts +6 -0
- package/src/utils/normalizeBundle.ts +8 -1
- package/src/version.ts +1 -1
- package/dist/common/chunk-F43XVDYJ.js.map +0 -1
- package/dist/esm/chunk-2C27NY4D.mjs.map +0 -1
- package/dist/esm/chunk-2CJC43CV.mjs.map +0 -1
- package/dist/esm/chunk-2ESU5N3V.mjs.map +0 -1
- package/dist/esm/chunk-2KSMV5KD.mjs.map +0 -1
- package/dist/esm/chunk-2MN7DW2J.mjs.map +0 -1
- package/dist/esm/chunk-2QGJDHME.mjs.map +0 -1
- package/dist/esm/chunk-333QBK32.mjs.map +0 -1
- package/dist/esm/chunk-372SLYVR.mjs +0 -2
- package/dist/esm/chunk-372SLYVR.mjs.map +0 -1
- package/dist/esm/chunk-42H7WETG.mjs.map +0 -1
- package/dist/esm/chunk-46O23AOD.mjs +0 -2
- package/dist/esm/chunk-46O23AOD.mjs.map +0 -1
- package/dist/esm/chunk-4DI5SPSK.mjs +0 -2
- package/dist/esm/chunk-4DI5SPSK.mjs.map +0 -1
- package/dist/esm/chunk-4DP3PEYK.mjs.map +0 -1
- package/dist/esm/chunk-4MTSP4S2.mjs.map +0 -1
- package/dist/esm/chunk-4O5XDQDO.mjs +0 -2
- package/dist/esm/chunk-4O5XDQDO.mjs.map +0 -1
- package/dist/esm/chunk-4OV2A6PJ.mjs +0 -2
- package/dist/esm/chunk-4OV2A6PJ.mjs.map +0 -1
- package/dist/esm/chunk-4XB3BB5Z.mjs.map +0 -1
- package/dist/esm/chunk-5B3SMBXQ.mjs +0 -2
- package/dist/esm/chunk-5B3SMBXQ.mjs.map +0 -1
- package/dist/esm/chunk-5LGKGWLX.mjs.map +0 -1
- package/dist/esm/chunk-5PVZ4N42.mjs.map +0 -1
- package/dist/esm/chunk-6Q2O5G3J.mjs.map +0 -1
- package/dist/esm/chunk-6ZOVTYLJ.mjs.map +0 -1
- package/dist/esm/chunk-7N7FEBZA.mjs.map +0 -1
- package/dist/esm/chunk-7T26VA2W.mjs.map +0 -1
- package/dist/esm/chunk-7V35JAAF.mjs.map +0 -1
- package/dist/esm/chunk-ACVIE7IE.mjs.map +0 -1
- package/dist/esm/chunk-AJ5JHBAE.mjs.map +0 -1
- package/dist/esm/chunk-AKIO3OIT.mjs.map +0 -1
- package/dist/esm/chunk-ALNQK276.mjs.map +0 -1
- package/dist/esm/chunk-AOROYJ74.mjs.map +0 -1
- package/dist/esm/chunk-BAEIZAP7.mjs.map +0 -1
- package/dist/esm/chunk-BRV3RLKW.mjs.map +0 -1
- package/dist/esm/chunk-BUAHUVAD.mjs.map +0 -1
- package/dist/esm/chunk-C2HCRGQU.mjs +0 -2
- package/dist/esm/chunk-C2HCRGQU.mjs.map +0 -1
- package/dist/esm/chunk-CDEYH77E.mjs +0 -2
- package/dist/esm/chunk-CDEYH77E.mjs.map +0 -1
- package/dist/esm/chunk-CX6KECGV.mjs.map +0 -1
- package/dist/esm/chunk-D3OEQLUE.mjs +0 -2
- package/dist/esm/chunk-D3OEQLUE.mjs.map +0 -1
- package/dist/esm/chunk-DBTKJMLV.mjs.map +0 -1
- package/dist/esm/chunk-DC2IESER.mjs +0 -2
- package/dist/esm/chunk-DC2IESER.mjs.map +0 -1
- package/dist/esm/chunk-EGV3HFE3.mjs.map +0 -1
- package/dist/esm/chunk-ELXJ5A4B.mjs +0 -2
- package/dist/esm/chunk-ELXJ5A4B.mjs.map +0 -1
- package/dist/esm/chunk-F2WY2DEY.mjs.map +0 -1
- package/dist/esm/chunk-FD6FGKYY.mjs +0 -1
- package/dist/esm/chunk-FZDEGDUY.mjs.map +0 -1
- package/dist/esm/chunk-G4KAHJXB.mjs.map +0 -1
- package/dist/esm/chunk-GAEAYY44.mjs +0 -1
- package/dist/esm/chunk-GMKKHGXK.mjs.map +0 -1
- package/dist/esm/chunk-GVNK3UMT.mjs.map +0 -1
- package/dist/esm/chunk-H3C3VTHS.mjs.map +0 -1
- package/dist/esm/chunk-HBIDHQ2M.mjs.map +0 -1
- package/dist/esm/chunk-HMMNQFVM.mjs.map +0 -1
- package/dist/esm/chunk-I5OYNCZS.mjs +0 -1
- package/dist/esm/chunk-IBZKCBN5.mjs.map +0 -1
- package/dist/esm/chunk-ICMELYCL.mjs +0 -2
- package/dist/esm/chunk-ICMELYCL.mjs.map +0 -1
- package/dist/esm/chunk-IHGA5KAD.mjs.map +0 -1
- package/dist/esm/chunk-IK2NYNKG.mjs.map +0 -1
- package/dist/esm/chunk-J3E4UMBB.mjs +0 -2
- package/dist/esm/chunk-J3E4UMBB.mjs.map +0 -1
- package/dist/esm/chunk-J7PJSK3J.mjs.map +0 -1
- package/dist/esm/chunk-JMPHD4BP.mjs.map +0 -1
- package/dist/esm/chunk-JNO7KPMG.mjs.map +0 -1
- package/dist/esm/chunk-KCWRCWNT.mjs.map +0 -1
- package/dist/esm/chunk-L4SWQLAJ.mjs.map +0 -1
- package/dist/esm/chunk-LA5HJILW.mjs.map +0 -1
- package/dist/esm/chunk-LGTOOAQI.mjs.map +0 -1
- package/dist/esm/chunk-LKKI2KAP.mjs.map +0 -1
- package/dist/esm/chunk-LPVGVTWT.mjs.map +0 -1
- package/dist/esm/chunk-MHN6XY4Z.mjs +0 -2
- package/dist/esm/chunk-MHN6XY4Z.mjs.map +0 -1
- package/dist/esm/chunk-N62NUAHT.mjs.map +0 -1
- package/dist/esm/chunk-NK67FECB.mjs.map +0 -1
- package/dist/esm/chunk-OIOGOW6I.mjs.map +0 -1
- package/dist/esm/chunk-OPO5EYF7.mjs.map +0 -1
- package/dist/esm/chunk-P6KX7AS2.mjs +0 -2
- package/dist/esm/chunk-P6KX7AS2.mjs.map +0 -1
- package/dist/esm/chunk-PMGK5IHB.mjs.map +0 -1
- package/dist/esm/chunk-PXMNAP2Q.mjs.map +0 -1
- package/dist/esm/chunk-QI7OREBM.mjs.map +0 -1
- package/dist/esm/chunk-RCA73RVB.mjs.map +0 -1
- package/dist/esm/chunk-S5SQJRAV.mjs.map +0 -1
- package/dist/esm/chunk-SK3LIS4Z.mjs.map +0 -1
- package/dist/esm/chunk-SNYYEVJA.mjs.map +0 -1
- package/dist/esm/chunk-SPRNSFUV.mjs.map +0 -1
- package/dist/esm/chunk-T6ADNZE5.mjs.map +0 -1
- package/dist/esm/chunk-TCXYTPUR.mjs +0 -2
- package/dist/esm/chunk-TCXYTPUR.mjs.map +0 -1
- package/dist/esm/chunk-U3T4ZT7B.mjs.map +0 -1
- package/dist/esm/chunk-U6OCK6T4.mjs.map +0 -1
- package/dist/esm/chunk-UFPYCROT.mjs.map +0 -1
- package/dist/esm/chunk-UGIHQFID.mjs.map +0 -1
- package/dist/esm/chunk-UGTIALNW.mjs +0 -2
- package/dist/esm/chunk-V4FKFCBL.mjs.map +0 -1
- package/dist/esm/chunk-V5NDNR36.mjs +0 -2
- package/dist/esm/chunk-V5NDNR36.mjs.map +0 -1
- package/dist/esm/chunk-VIZHWYI5.mjs.map +0 -1
- package/dist/esm/chunk-VQZMI3EZ.mjs.map +0 -1
- package/dist/esm/chunk-VWGB5BHW.mjs.map +0 -1
- package/dist/esm/chunk-WFK3XRQX.mjs.map +0 -1
- package/dist/esm/chunk-XOLU6UP3.mjs.map +0 -1
- package/dist/esm/chunk-XZN344G4.mjs.map +0 -1
- package/dist/esm/chunk-YD2BMHH7.mjs +0 -2
- package/dist/esm/chunk-YEWZAR76.mjs.map +0 -1
- package/dist/esm/chunk-YJVZFYBX.mjs.map +0 -1
- package/dist/esm/chunk-ZMBXHMVQ.mjs.map +0 -1
- package/dist/esm/chunk-ZMMLM6ZJ.mjs.map +0 -1
- package/dist/esm/chunk-ZMS3AOEZ.mjs.map +0 -1
- package/dist/esm/chunk-ZXVN3HXB.mjs.map +0 -1
- /package/dist/esm/{chunk-FD6FGKYY.mjs.map → account/AccountUtils.mjs.map} +0 -0
- /package/dist/esm/{chunk-GAEAYY44.mjs.map → account/utils.mjs.map} +0 -0
- /package/dist/esm/{chunk-I5OYNCZS.mjs.map → chunk-GP4TLDVZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-NZ7M6NG2.mjs.map → chunk-KFCLSJC3.mjs.map} +0 -0
- /package/dist/esm/{chunk-F45G3GP3.mjs.map → chunk-QHEKBHNU.mjs.map} +0 -0
package/src/cli/move.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { Network } from "../utils";
|
|
|
8
8
|
* Class representing a Move package management utility for the Aptos blockchain.
|
|
9
9
|
* This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade
|
|
10
10
|
* packages, build transaction payloads, and run scripts.
|
|
11
|
+
* @group Implementation
|
|
12
|
+
* @category CLI
|
|
11
13
|
*/
|
|
12
14
|
export class Move {
|
|
13
15
|
/**
|
|
@@ -21,6 +23,8 @@ export class Move {
|
|
|
21
23
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
22
24
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
23
25
|
* @returns stdout
|
|
26
|
+
* @group Implementation
|
|
27
|
+
* @category CLI
|
|
24
28
|
*/
|
|
25
29
|
async init(args: {
|
|
26
30
|
network?: Network;
|
|
@@ -48,6 +52,8 @@ export class Move {
|
|
|
48
52
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
49
53
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
50
54
|
* @returns stdout
|
|
55
|
+
* @group Implementation
|
|
56
|
+
* @category CLI
|
|
51
57
|
*/
|
|
52
58
|
async compile(args: {
|
|
53
59
|
packageDirectoryPath: string;
|
|
@@ -78,6 +84,8 @@ export class Move {
|
|
|
78
84
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
79
85
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
80
86
|
* @returns The stdout output from running the tests.
|
|
87
|
+
* @group Implementation
|
|
88
|
+
* @category CLI
|
|
81
89
|
*/
|
|
82
90
|
async test(args: {
|
|
83
91
|
packageDirectoryPath: string;
|
|
@@ -109,6 +117,8 @@ export class Move {
|
|
|
109
117
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
110
118
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
111
119
|
* @returns stdout
|
|
120
|
+
* @group Implementation
|
|
121
|
+
* @category CLI
|
|
112
122
|
*/
|
|
113
123
|
async publish(args: {
|
|
114
124
|
packageDirectoryPath: string;
|
|
@@ -157,6 +167,8 @@ export class Move {
|
|
|
157
167
|
* --named-addresses "launchpad_addr=0x123,initial_creator_addr=0x456" \
|
|
158
168
|
* --profile my_profile \
|
|
159
169
|
* --assume-yes
|
|
170
|
+
* @group Implementation
|
|
171
|
+
* @category CLI
|
|
160
172
|
*/
|
|
161
173
|
async createObjectAndPublishPackage(args: {
|
|
162
174
|
packageDirectoryPath: string;
|
|
@@ -202,6 +214,8 @@ export class Move {
|
|
|
202
214
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
203
215
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
204
216
|
* @returns stdout
|
|
217
|
+
* @group Implementation
|
|
218
|
+
* @category CLI
|
|
205
219
|
*/
|
|
206
220
|
async upgradeObjectPackage(args: {
|
|
207
221
|
packageDirectoryPath: string;
|
|
@@ -244,6 +258,8 @@ export class Move {
|
|
|
244
258
|
* @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.
|
|
245
259
|
* Ex. ["--assume-yes","--gas-unit-price=10"] *
|
|
246
260
|
* @returns stdout
|
|
261
|
+
* @group Implementation
|
|
262
|
+
* @category CLI
|
|
247
263
|
*/
|
|
248
264
|
async buildPublishPayload(args: {
|
|
249
265
|
packageDirectoryPath: string;
|
|
@@ -286,6 +302,8 @@ export class Move {
|
|
|
286
302
|
* Ex. ["--assume-yes","--gas-unit-price=10"]
|
|
287
303
|
*
|
|
288
304
|
* @returns The standard output from running the script.
|
|
305
|
+
* @group Implementation
|
|
306
|
+
* @category CLI
|
|
289
307
|
*/
|
|
290
308
|
async runScript(args: {
|
|
291
309
|
compiledScriptPath: string;
|
|
@@ -332,6 +350,8 @@ export class Move {
|
|
|
332
350
|
* @param args - An array of strings representing the command-line arguments to be passed to the command.
|
|
333
351
|
* @param showStdout - Show the standard output generated by the command.
|
|
334
352
|
* @returns The standard output generated by the command.
|
|
353
|
+
* @group Implementation
|
|
354
|
+
* @category CLI
|
|
335
355
|
*/
|
|
336
356
|
// eslint-disable-next-line class-methods-use-this
|
|
337
357
|
private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {
|
|
@@ -388,6 +408,8 @@ export class Move {
|
|
|
388
408
|
* @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.
|
|
389
409
|
* Ex. {'alice' => '0x123', 'bob' => '0x456'}
|
|
390
410
|
* @returns An array of named addresses formatted as strings separated by a comma. Ex. "alice=0x123,bob=0x456"
|
|
411
|
+
* @group Implementation
|
|
412
|
+
* @category CLI
|
|
391
413
|
*/
|
|
392
414
|
// eslint-disable-next-line class-methods-use-this
|
|
393
415
|
private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {
|
|
@@ -417,6 +439,8 @@ export class Move {
|
|
|
417
439
|
*
|
|
418
440
|
* @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.
|
|
419
441
|
* @returns A Map where each key is a name and each value is the corresponding address.
|
|
442
|
+
* @group Implementation
|
|
443
|
+
* @category CLI
|
|
420
444
|
*/
|
|
421
445
|
// eslint-disable-next-line class-methods-use-this
|
|
422
446
|
private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {
|
|
@@ -436,6 +460,8 @@ export class Move {
|
|
|
436
460
|
* @param output - The output string containing the object address.
|
|
437
461
|
* @returns The extracted object address.
|
|
438
462
|
* @throws Error if the object address cannot be extracted from the output.
|
|
463
|
+
* @group Implementation
|
|
464
|
+
* @category CLI
|
|
439
465
|
*/
|
|
440
466
|
// eslint-disable-next-line class-methods-use-this
|
|
441
467
|
private extractAddressFromOutput(output: string): string {
|
package/src/client/core.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { AptosApiError } from "../errors";
|
|
|
24
24
|
* @param client - The client used to make the request.
|
|
25
25
|
*
|
|
26
26
|
* @returns The response from the request.
|
|
27
|
+
* @group Implementation
|
|
28
|
+
* @category Client
|
|
27
29
|
*/
|
|
28
30
|
export async function request<Req, Res>(options: ClientRequest<Req>, client: Client): Promise<ClientResponse<Res>> {
|
|
29
31
|
const { url, method, body, contentType, params, overrides, originMethod } = options;
|
|
@@ -62,6 +64,8 @@ export async function request<Req, Res>(options: ClientRequest<Req>, client: Cli
|
|
|
62
64
|
* @param aptosConfig - The configuration information for the SDK client instance.
|
|
63
65
|
* @param apiType - The type of API being accessed, which determines how the response is handled.
|
|
64
66
|
* @returns The response from the API request or throws an AptosApiError if the request fails.
|
|
67
|
+
* @group Implementation
|
|
68
|
+
* @category Client
|
|
65
69
|
*/
|
|
66
70
|
export async function aptosRequest<Req extends {}, Res extends {}>(
|
|
67
71
|
aptosRequestOpts: AptosRequest,
|
package/src/client/get.ts
CHANGED
|
@@ -5,44 +5,64 @@ import { AptosApiType } from "../utils/const";
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Options for making a GET request, including configuration for the API client.
|
|
8
|
+
* @group Implementation
|
|
9
|
+
* @category Client
|
|
8
10
|
*/
|
|
9
11
|
export type GetRequestOptions = {
|
|
10
12
|
/**
|
|
11
13
|
* The config for the API client
|
|
14
|
+
* @group Implementation
|
|
15
|
+
* @category Client
|
|
12
16
|
*/
|
|
13
17
|
aptosConfig: AptosConfig;
|
|
14
18
|
/**
|
|
15
19
|
* The type of API endpoint to call e.g. fullnode, indexer, etc
|
|
20
|
+
* @group Implementation
|
|
21
|
+
* @category Client
|
|
16
22
|
*/
|
|
17
23
|
type: AptosApiType;
|
|
18
24
|
/**
|
|
19
25
|
* The name of the API method
|
|
26
|
+
* @group Implementation
|
|
27
|
+
* @category Client
|
|
20
28
|
*/
|
|
21
29
|
originMethod: string;
|
|
22
30
|
/**
|
|
23
31
|
* The URL path to the API method
|
|
32
|
+
* @group Implementation
|
|
33
|
+
* @category Client
|
|
24
34
|
*/
|
|
25
35
|
path: string;
|
|
26
36
|
/**
|
|
27
37
|
* The content type of the request body
|
|
38
|
+
* @group Implementation
|
|
39
|
+
* @category Client
|
|
28
40
|
*/
|
|
29
41
|
contentType?: MimeType;
|
|
30
42
|
/**
|
|
31
43
|
* The accepted content type of the response of the API
|
|
44
|
+
* @group Implementation
|
|
45
|
+
* @category Client
|
|
32
46
|
*/
|
|
33
47
|
acceptType?: MimeType;
|
|
34
48
|
/**
|
|
35
49
|
* The query parameters for the request
|
|
50
|
+
* @group Implementation
|
|
51
|
+
* @category Client
|
|
36
52
|
*/
|
|
37
53
|
params?: Record<string, string | AnyNumber | boolean | undefined>;
|
|
38
54
|
/**
|
|
39
55
|
* Specific client overrides for this request to override aptosConfig
|
|
56
|
+
* @group Implementation
|
|
57
|
+
* @category Client
|
|
40
58
|
*/
|
|
41
59
|
overrides?: ClientConfig;
|
|
42
60
|
};
|
|
43
61
|
|
|
44
62
|
/**
|
|
45
63
|
* Options for making a request to the Aptos API, excluding the "type" field.
|
|
64
|
+
* @group Implementation
|
|
65
|
+
* @category Client
|
|
46
66
|
*/
|
|
47
67
|
export type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
48
68
|
|
|
@@ -59,6 +79,8 @@ export type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
|
|
|
59
79
|
* @param options.originMethod - The original method of the request.
|
|
60
80
|
* @param options.type - The type of request being made.
|
|
61
81
|
* @returns The response from the GET request.
|
|
82
|
+
* @group Implementation
|
|
83
|
+
* @category Client
|
|
62
84
|
*/
|
|
63
85
|
export async function get<Req extends {}, Res extends {}>(
|
|
64
86
|
options: GetRequestOptions,
|
|
@@ -96,6 +118,8 @@ export async function get<Req extends {}, Res extends {}>(
|
|
|
96
118
|
* @param options.type - The type of API request being made.
|
|
97
119
|
*
|
|
98
120
|
* @returns A promise that resolves with the response from the Aptos full node.
|
|
121
|
+
* @group Implementation
|
|
122
|
+
* @category Client
|
|
99
123
|
*/
|
|
100
124
|
export async function getAptosFullNode<Req extends {}, Res extends {}>(
|
|
101
125
|
options: GetAptosRequestOptions,
|
|
@@ -121,6 +145,8 @@ export async function getAptosFullNode<Req extends {}, Res extends {}>(
|
|
|
121
145
|
* @param options.param1 - Description of param1.
|
|
122
146
|
* @param options.param2 - Description of param2.
|
|
123
147
|
* @returns AptosResponse - The response from the Aptos Pepper service.
|
|
148
|
+
* @group Implementation
|
|
149
|
+
* @category Client
|
|
124
150
|
*/
|
|
125
151
|
export async function getAptosPepperService<Req extends {}, Res extends {}>(
|
|
126
152
|
options: GetAptosRequestOptions,
|
|
@@ -128,7 +154,11 @@ export async function getAptosPepperService<Req extends {}, Res extends {}>(
|
|
|
128
154
|
return get<Req, Res>({ ...options, type: AptosApiType.PEPPER });
|
|
129
155
|
}
|
|
130
156
|
|
|
131
|
-
|
|
157
|
+
/**
|
|
158
|
+
* This function is a helper for paginating using a function wrapping an API
|
|
159
|
+
* @group Implementation
|
|
160
|
+
* @category Client
|
|
161
|
+
*/
|
|
132
162
|
export async function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(
|
|
133
163
|
options: GetAptosRequestOptions,
|
|
134
164
|
): Promise<Res> {
|
|
@@ -149,6 +179,8 @@ export async function paginateWithCursor<Req extends Record<string, any>, Res ex
|
|
|
149
179
|
* the cursor is a "state key" from the API perspective. Client
|
|
150
180
|
* should not need to "care" what it represents but just use it
|
|
151
181
|
* to query the next chunk of data.
|
|
182
|
+
* @group Implementation
|
|
183
|
+
* @category Client
|
|
152
184
|
*/
|
|
153
185
|
cursor = response.headers["x-aptos-cursor"];
|
|
154
186
|
// Now that we have the cursor (if any), we remove the headers before
|
|
@@ -159,3 +191,45 @@ export async function paginateWithCursor<Req extends Record<string, any>, Res ex
|
|
|
159
191
|
} while (cursor !== null && cursor !== undefined);
|
|
160
192
|
return out as Res;
|
|
161
193
|
}
|
|
194
|
+
|
|
195
|
+
/// This function is a helper for paginating using a function wrapping an API using offset instead of start
|
|
196
|
+
export async function paginateWithObfuscatedCursor<Req extends Record<string, any>, Res extends Array<{}>>(
|
|
197
|
+
options: GetAptosRequestOptions,
|
|
198
|
+
): Promise<Res> {
|
|
199
|
+
const out: any[] = [];
|
|
200
|
+
let cursor: string | undefined;
|
|
201
|
+
const requestParams = options.params as { offset?: string; limit?: number };
|
|
202
|
+
const totalLimit = requestParams.limit;
|
|
203
|
+
do {
|
|
204
|
+
// eslint-disable-next-line no-await-in-loop
|
|
205
|
+
const response = await get<Req, Res>({
|
|
206
|
+
type: AptosApiType.FULLNODE,
|
|
207
|
+
aptosConfig: options.aptosConfig,
|
|
208
|
+
originMethod: options.originMethod,
|
|
209
|
+
path: options.path,
|
|
210
|
+
params: requestParams,
|
|
211
|
+
overrides: options.overrides,
|
|
212
|
+
});
|
|
213
|
+
/**
|
|
214
|
+
* the cursor is a "state key" from the API perspective. Client
|
|
215
|
+
* should not need to "care" what it represents but just use it
|
|
216
|
+
* to query the next chunk of data.
|
|
217
|
+
*/
|
|
218
|
+
cursor = response.headers["x-aptos-cursor"];
|
|
219
|
+
// Now that we have the cursor (if any), we remove the headers before
|
|
220
|
+
// adding these to the output of this function.
|
|
221
|
+
delete response.headers;
|
|
222
|
+
out.push(...response.data);
|
|
223
|
+
requestParams.offset = cursor;
|
|
224
|
+
|
|
225
|
+
// Re-evaluate length
|
|
226
|
+
if (totalLimit !== undefined) {
|
|
227
|
+
const newLimit = totalLimit - out.length;
|
|
228
|
+
if (newLimit <= 0) {
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
requestParams.limit = newLimit;
|
|
232
|
+
}
|
|
233
|
+
} while (cursor !== null && cursor !== undefined);
|
|
234
|
+
return out as Res;
|
|
235
|
+
}
|
package/src/client/post.ts
CHANGED
|
@@ -8,48 +8,70 @@ import { AptosApiType } from "../utils/const";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Options for making a POST request, including the API client configuration.
|
|
11
|
+
* @group Implementation
|
|
12
|
+
* @category Client
|
|
11
13
|
*/
|
|
12
14
|
export type PostRequestOptions = {
|
|
13
15
|
/**
|
|
14
16
|
* The config for the API client
|
|
17
|
+
* @group Implementation
|
|
18
|
+
* @category Client
|
|
15
19
|
*/
|
|
16
20
|
aptosConfig: AptosConfig;
|
|
17
21
|
/**
|
|
18
22
|
* The type of API endpoint to call e.g. fullnode, indexer, etc
|
|
23
|
+
* @group Implementation
|
|
24
|
+
* @category Client
|
|
19
25
|
*/
|
|
20
26
|
type: AptosApiType;
|
|
21
27
|
/**
|
|
22
28
|
* The name of the API method
|
|
29
|
+
* @group Implementation
|
|
30
|
+
* @category Client
|
|
23
31
|
*/
|
|
24
32
|
originMethod: string;
|
|
25
33
|
/**
|
|
26
34
|
* The URL path to the API method
|
|
35
|
+
* @group Implementation
|
|
36
|
+
* @category Client
|
|
27
37
|
*/
|
|
28
38
|
path: string;
|
|
29
39
|
/**
|
|
30
40
|
* The content type of the request body
|
|
41
|
+
* @group Implementation
|
|
42
|
+
* @category Client
|
|
31
43
|
*/
|
|
32
44
|
contentType?: MimeType;
|
|
33
45
|
/**
|
|
34
46
|
* The accepted content type of the response of the API
|
|
47
|
+
* @group Implementation
|
|
48
|
+
* @category Client
|
|
35
49
|
*/
|
|
36
50
|
acceptType?: MimeType;
|
|
37
51
|
/**
|
|
38
52
|
* The query parameters for the request
|
|
53
|
+
* @group Implementation
|
|
54
|
+
* @category Client
|
|
39
55
|
*/
|
|
40
56
|
params?: Record<string, string | AnyNumber | boolean | undefined>;
|
|
41
57
|
/**
|
|
42
58
|
* The body of the request, should match the content type of the request
|
|
59
|
+
* @group Implementation
|
|
60
|
+
* @category Client
|
|
43
61
|
*/
|
|
44
62
|
body?: any;
|
|
45
63
|
/**
|
|
46
64
|
* Specific client overrides for this request to override aptosConfig
|
|
65
|
+
* @group Implementation
|
|
66
|
+
* @category Client
|
|
47
67
|
*/
|
|
48
68
|
overrides?: ClientConfig;
|
|
49
69
|
};
|
|
50
70
|
|
|
51
71
|
/**
|
|
52
72
|
* Options for posting a request to Aptos, excluding the type field.
|
|
73
|
+
* @group Implementation
|
|
74
|
+
* @category Client
|
|
53
75
|
*/
|
|
54
76
|
export type PostAptosRequestOptions = Omit<PostRequestOptions, "type">;
|
|
55
77
|
|
|
@@ -67,6 +89,8 @@ export type PostAptosRequestOptions = Omit<PostRequestOptions, "type">;
|
|
|
67
89
|
* @param options.aptosConfig - Configuration settings for the Aptos request.
|
|
68
90
|
* @param options.overrides - Any overrides for the default request behavior.
|
|
69
91
|
* @returns The response from the POST request.
|
|
92
|
+
* @group Implementation
|
|
93
|
+
* @category Client
|
|
70
94
|
*/
|
|
71
95
|
export async function post<Req extends {}, Res extends {}>(
|
|
72
96
|
options: PostRequestOptions,
|
|
@@ -100,6 +124,8 @@ export async function post<Req extends {}, Res extends {}>(
|
|
|
100
124
|
* @param options.aptosConfig.clientConfig - Client-specific configuration settings.
|
|
101
125
|
* @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.
|
|
102
126
|
* @param options.overrides - Additional overrides for the request.
|
|
127
|
+
* @group Implementation
|
|
128
|
+
* @category Client
|
|
103
129
|
*/
|
|
104
130
|
export async function postAptosFullNode<Req extends {}, Res extends {}>(
|
|
105
131
|
options: PostAptosRequestOptions,
|
|
@@ -128,6 +154,8 @@ export async function postAptosFullNode<Req extends {}, Res extends {}>(
|
|
|
128
154
|
* @param options.aptosConfig.indexerConfig - The indexer configuration settings.
|
|
129
155
|
* @param options.overrides - Additional overrides for the request.
|
|
130
156
|
* @param options.overrides.HEADERS - Custom headers to include in the request.
|
|
157
|
+
* @group Implementation
|
|
158
|
+
* @category Client
|
|
131
159
|
*/
|
|
132
160
|
export async function postAptosIndexer<Req extends {}, Res extends {}>(
|
|
133
161
|
options: PostAptosRequestOptions,
|
|
@@ -150,12 +178,17 @@ export async function postAptosIndexer<Req extends {}, Res extends {}>(
|
|
|
150
178
|
* Sends a request to the Aptos faucet to obtain test tokens.
|
|
151
179
|
* This function modifies the provided configuration to ensure that the API_KEY is not included in the request.
|
|
152
180
|
*
|
|
181
|
+
* Note that only devnet has a publicly accessible faucet. For testnet, you must use
|
|
182
|
+
* the minting page at https://aptos.dev/network/faucet.
|
|
183
|
+
*
|
|
153
184
|
* @param options - The options for the request.
|
|
154
185
|
* @param options.aptosConfig - The configuration settings for the Aptos client.
|
|
155
186
|
* @param options.aptosConfig.clientConfig - The client-specific configuration settings.
|
|
156
187
|
* @param options.aptosConfig.clientConfig.HEADERS - Optional headers to include in the request.
|
|
157
188
|
* @param options.aptosConfig.faucetConfig - The configuration settings specific to the faucet.
|
|
158
189
|
* @param options.overrides - Additional overrides for the request configuration.
|
|
190
|
+
* @group Implementation
|
|
191
|
+
* @category Client
|
|
159
192
|
*/
|
|
160
193
|
export async function postAptosFaucet<Req extends {}, Res extends {}>(
|
|
161
194
|
options: PostAptosRequestOptions,
|
|
@@ -190,6 +223,8 @@ export async function postAptosFaucet<Req extends {}, Res extends {}>(
|
|
|
190
223
|
* @param options.headers - The headers to include in the request.
|
|
191
224
|
* @param options.body - The body of the request.
|
|
192
225
|
* @returns A promise that resolves to the response from the pepper service.
|
|
226
|
+
* @group Implementation
|
|
227
|
+
* @category Client
|
|
193
228
|
*/
|
|
194
229
|
export async function postAptosPepperService<Req extends {}, Res extends {}>(
|
|
195
230
|
options: PostAptosRequestOptions,
|
|
@@ -203,6 +238,8 @@ export async function postAptosPepperService<Req extends {}, Res extends {}>(
|
|
|
203
238
|
* @param options - The options for the request to the Aptos proving service.
|
|
204
239
|
* @param options.type - The type of the request, which should be set to AptosApiType.PROVER.
|
|
205
240
|
* @param options.data - The data to be included in the request.
|
|
241
|
+
* @group Implementation
|
|
242
|
+
* @category Client
|
|
206
243
|
*/
|
|
207
244
|
export async function postAptosProvingService<Req extends {}, Res extends {}>(
|
|
208
245
|
options: PostAptosRequestOptions,
|
|
@@ -9,6 +9,8 @@ import { DeriveScheme } from "../../../types";
|
|
|
9
9
|
* @param seed The seed in either Uint8Array | string type
|
|
10
10
|
*
|
|
11
11
|
* @returns The object account address
|
|
12
|
+
* @group Implementation
|
|
13
|
+
* @category Account (On-Chain Model)
|
|
12
14
|
*/
|
|
13
15
|
export const createObjectAddress = (creatorAddress: AccountAddress, seed: Uint8Array | string): AccountAddress => {
|
|
14
16
|
const creatorBytes = creatorAddress.bcsToBytes();
|
|
@@ -27,6 +29,8 @@ export const createObjectAddress = (creatorAddress: AccountAddress, seed: Uint8A
|
|
|
27
29
|
* @param seed The seed in either Uint8Array | string type
|
|
28
30
|
*
|
|
29
31
|
* @returns The resource account address
|
|
32
|
+
* @group Implementation
|
|
33
|
+
* @category Account (On-Chain Model)
|
|
30
34
|
*/
|
|
31
35
|
export const createResourceAddress = (creatorAddress: AccountAddress, seed: Uint8Array | string): AccountAddress => {
|
|
32
36
|
const creatorBytes = creatorAddress.bcsToBytes();
|
|
@@ -46,6 +50,8 @@ export const createResourceAddress = (creatorAddress: AccountAddress, seed: Uint
|
|
|
46
50
|
* @param tokenName The token name
|
|
47
51
|
*
|
|
48
52
|
* @returns The token account address
|
|
53
|
+
* @group Implementation
|
|
54
|
+
* @category Account (On-Chain Model)
|
|
49
55
|
*/
|
|
50
56
|
export const createTokenAddress = (
|
|
51
57
|
creatorAddress: AccountAddress,
|
|
@@ -10,6 +10,8 @@ import { HexInput, ScriptTransactionArgumentVariants } from "../types";
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Provides reasons for an address was invalid.
|
|
13
|
+
* @group Implementation
|
|
14
|
+
* @category Serialization
|
|
13
15
|
*/
|
|
14
16
|
export enum AddressInvalidReason {
|
|
15
17
|
INCORRECT_NUMBER_OF_BYTES = "incorrect_number_of_bytes",
|
|
@@ -24,6 +26,8 @@ export enum AddressInvalidReason {
|
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* The input for an account address, which can be either a hexadecimal string or a standard account address.
|
|
29
|
+
* @group Implementation
|
|
30
|
+
* @category Serialization
|
|
27
31
|
*/
|
|
28
32
|
export type AccountAddressInput = HexInput | AccountAddress;
|
|
29
33
|
|
|
@@ -42,20 +46,28 @@ export type AccountAddressInput = HexInput | AccountAddress;
|
|
|
42
46
|
*
|
|
43
47
|
* The comments in this class make frequent reference to the LONG and SHORT formats,
|
|
44
48
|
* as well as "special" addresses. To learn what these refer to see AIP-40.
|
|
49
|
+
* @group Implementation
|
|
50
|
+
* @category Serialization
|
|
45
51
|
*/
|
|
46
52
|
export class AccountAddress extends Serializable implements TransactionArgument {
|
|
47
53
|
/**
|
|
48
54
|
* This is the internal representation of an account address.
|
|
55
|
+
* @group Implementation
|
|
56
|
+
* @category Serialization
|
|
49
57
|
*/
|
|
50
58
|
readonly data: Uint8Array;
|
|
51
59
|
|
|
52
60
|
/**
|
|
53
61
|
* The number of bytes that make up an account address.
|
|
62
|
+
* @group Implementation
|
|
63
|
+
* @category Serialization
|
|
54
64
|
*/
|
|
55
65
|
static readonly LENGTH: number = 32;
|
|
56
66
|
|
|
57
67
|
/**
|
|
58
68
|
* The length of an address string in LONG form without a leading 0x.
|
|
69
|
+
* @group Implementation
|
|
70
|
+
* @category Serialization
|
|
59
71
|
*/
|
|
60
72
|
static readonly LONG_STRING_LENGTH: number = 64;
|
|
61
73
|
|
|
@@ -78,6 +90,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
78
90
|
*
|
|
79
91
|
* @param input A Uint8Array representing an account address.
|
|
80
92
|
* @throws ParsingError if the input length is not equal to 32 bytes.
|
|
93
|
+
* @group Implementation
|
|
94
|
+
* @category Serialization
|
|
81
95
|
*/
|
|
82
96
|
constructor(input: Uint8Array) {
|
|
83
97
|
super();
|
|
@@ -99,6 +113,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
99
113
|
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
100
114
|
*
|
|
101
115
|
* @returns true if the address is special, false otherwise.
|
|
116
|
+
* @group Implementation
|
|
117
|
+
* @category Serialization
|
|
102
118
|
*/
|
|
103
119
|
isSpecial(): boolean {
|
|
104
120
|
return (
|
|
@@ -116,6 +132,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
116
132
|
* and other addresses in LONG form (0x + 64 characters).
|
|
117
133
|
*
|
|
118
134
|
* @returns AccountAddress as a string conforming to AIP-40.
|
|
135
|
+
* @group Implementation
|
|
136
|
+
* @category Serialization
|
|
119
137
|
*/
|
|
120
138
|
toString(): `0x${string}` {
|
|
121
139
|
return `0x${this.toStringWithoutPrefix()}`;
|
|
@@ -127,6 +145,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
127
145
|
* NOTE: Prefer to use `toString` where possible.
|
|
128
146
|
*
|
|
129
147
|
* @returns AccountAddress as a string without the leading 0x.
|
|
148
|
+
* @group Implementation
|
|
149
|
+
* @category Serialization
|
|
130
150
|
*/
|
|
131
151
|
toStringWithoutPrefix(): string {
|
|
132
152
|
let hex = bytesToHex(this.data);
|
|
@@ -142,6 +162,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
142
162
|
* NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
|
|
143
163
|
*
|
|
144
164
|
* @returns AccountAddress as a string in LONG form.
|
|
165
|
+
* @group Implementation
|
|
166
|
+
* @category Serialization
|
|
145
167
|
*/
|
|
146
168
|
toStringLong(): `0x${string}` {
|
|
147
169
|
return `0x${this.toStringLongWithoutPrefix()}`;
|
|
@@ -154,6 +176,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
154
176
|
* NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
|
|
155
177
|
*
|
|
156
178
|
* @returns {string} The account address in LONG form.
|
|
179
|
+
* @group Implementation
|
|
180
|
+
* @category Serialization
|
|
157
181
|
*/
|
|
158
182
|
toStringLongWithoutPrefix(): string {
|
|
159
183
|
return bytesToHex(this.data);
|
|
@@ -164,6 +188,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
164
188
|
* The inner data is already a Uint8Array, so no conversion takes place.
|
|
165
189
|
*
|
|
166
190
|
* @returns Hex data as Uint8Array
|
|
191
|
+
* @group Implementation
|
|
192
|
+
* @category Serialization
|
|
167
193
|
*/
|
|
168
194
|
toUint8Array(): Uint8Array {
|
|
169
195
|
return this.data;
|
|
@@ -179,6 +205,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
179
205
|
* address.serialize(serializer);
|
|
180
206
|
* const bytes = serializer.toUint8Array();
|
|
181
207
|
* // `bytes` is now the BCS-serialized address.
|
|
208
|
+
* @group Implementation
|
|
209
|
+
* @category Serialization
|
|
182
210
|
*/
|
|
183
211
|
serialize(serializer: Serializer): void {
|
|
184
212
|
serializer.serializeFixedBytes(this.data);
|
|
@@ -189,6 +217,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
189
217
|
* This allows for the proper encoding of data when interacting with entry functions in the blockchain.
|
|
190
218
|
*
|
|
191
219
|
* @param serializer - The serializer instance used to convert the data into bytes.
|
|
220
|
+
* @group Implementation
|
|
221
|
+
* @category Serialization
|
|
192
222
|
*/
|
|
193
223
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
194
224
|
const bcsBytes = this.bcsToBytes();
|
|
@@ -200,6 +230,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
200
230
|
* This process involves serializing the variant index and the instance data, making it suitable for transmission.
|
|
201
231
|
*
|
|
202
232
|
* @param serializer - The serializer instance used to perform the serialization.
|
|
233
|
+
* @group Implementation
|
|
234
|
+
* @category Serialization
|
|
203
235
|
*/
|
|
204
236
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
205
237
|
serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Address);
|
|
@@ -216,6 +248,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
216
248
|
* const deserializer = new Deserializer(bytes);
|
|
217
249
|
* const address = AccountAddress.deserialize(deserializer);
|
|
218
250
|
* // `address` is now an instance of AccountAddress.
|
|
251
|
+
* @group Implementation
|
|
252
|
+
* @category Serialization
|
|
219
253
|
*/
|
|
220
254
|
static deserialize(deserializer: Deserializer): AccountAddress {
|
|
221
255
|
const bytes = deserializer.deserializeFixedBytes(AccountAddress.LENGTH);
|
|
@@ -258,6 +292,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
258
292
|
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
259
293
|
*
|
|
260
294
|
* @returns An instance of AccountAddress.
|
|
295
|
+
* @group Implementation
|
|
296
|
+
* @category Serialization
|
|
261
297
|
*/
|
|
262
298
|
static fromStringStrict(input: string): AccountAddress {
|
|
263
299
|
// Assert the string starts with 0x.
|
|
@@ -315,6 +351,8 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
315
351
|
* @returns An instance of AccountAddress.
|
|
316
352
|
*
|
|
317
353
|
* @throws ParsingError if the hex string is too short, too long, or contains invalid characters.
|
|
354
|
+
* @group Implementation
|
|
355
|
+
* @category Serialization
|
|
318
356
|
*/
|
|
319
357
|
static fromString(input: string, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {
|
|
320
358
|
let parsedInput = input;
|
|
@@ -384,6 +422,8 @@ Received ${input}`,
|
|
|
384
422
|
* @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,
|
|
385
423
|
* or an existing AccountAddress.
|
|
386
424
|
* @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.
|
|
425
|
+
* @group Implementation
|
|
426
|
+
* @category Serialization
|
|
387
427
|
*/
|
|
388
428
|
static from(input: AccountAddressInput, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {
|
|
389
429
|
if (typeof input === "string") {
|
|
@@ -399,6 +439,8 @@ Received ${input}`,
|
|
|
399
439
|
* Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.
|
|
400
440
|
*
|
|
401
441
|
* @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.
|
|
442
|
+
* @group Implementation
|
|
443
|
+
* @category Serialization
|
|
402
444
|
*/
|
|
403
445
|
static fromStrict(input: AccountAddressInput): AccountAddress {
|
|
404
446
|
if (typeof input === "string") {
|
|
@@ -422,6 +464,8 @@ Received ${input}`,
|
|
|
422
464
|
*
|
|
423
465
|
* @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.
|
|
424
466
|
* If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.
|
|
467
|
+
* @group Implementation
|
|
468
|
+
* @category Serialization
|
|
425
469
|
*/
|
|
426
470
|
static isValid(args: { input: AccountAddressInput; strict?: boolean }): ParsingResult<AddressInvalidReason> {
|
|
427
471
|
try {
|
|
@@ -445,6 +489,8 @@ Received ${input}`,
|
|
|
445
489
|
*
|
|
446
490
|
* @param other - The AccountAddress to compare to.
|
|
447
491
|
* @returns true if the AccountAddresses are equal, false if not.
|
|
492
|
+
* @group Implementation
|
|
493
|
+
* @category Serialization
|
|
448
494
|
*/
|
|
449
495
|
equals(other: AccountAddress): boolean {
|
|
450
496
|
if (this.data.length !== other.data.length) return false;
|