@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
|
@@ -44,6 +44,8 @@ import { EntryFunctionArgument, TransactionArgument } from "../../transactions/i
|
|
|
44
44
|
*
|
|
45
45
|
* @param values an Array<T> of values where T is a class that implements Serializable
|
|
46
46
|
* @returns a `MoveVector<T>` with the values `values`
|
|
47
|
+
* @group Implementation
|
|
48
|
+
* @category BCS
|
|
47
49
|
*/
|
|
48
50
|
export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
49
51
|
extends Serializable
|
|
@@ -56,6 +58,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
56
58
|
* This constructor sets up the internal vector based on the provided value.
|
|
57
59
|
*
|
|
58
60
|
* @param values - The initial value to be stored in the vector, or null to initialize an empty vector.
|
|
61
|
+
* @group Implementation
|
|
62
|
+
* @category BCS
|
|
59
63
|
*/
|
|
60
64
|
constructor(values: Array<T>) {
|
|
61
65
|
super();
|
|
@@ -67,6 +71,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
67
71
|
* This allows the data to be properly formatted for transmission or storage.
|
|
68
72
|
*
|
|
69
73
|
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
74
|
+
* @group Implementation
|
|
75
|
+
* @category BCS
|
|
70
76
|
*/
|
|
71
77
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
72
78
|
const bcsBytes = this.bcsToBytes();
|
|
@@ -76,11 +82,15 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
76
82
|
/**
|
|
77
83
|
* NOTE: This function will only work when the inner values in the `MoveVector` are `U8`s.
|
|
78
84
|
* @param serializer
|
|
85
|
+
* @group Implementation
|
|
86
|
+
* @category BCS
|
|
79
87
|
*/
|
|
80
88
|
|
|
81
89
|
/**
|
|
82
90
|
* Serialize the string as a fixed byte string without the length prefix for use in a script function.
|
|
83
91
|
* @param serializer - The serializer used to convert the byte vector into a format suitable for a script function.
|
|
92
|
+
* @group Implementation
|
|
93
|
+
* @category BCS
|
|
84
94
|
*/
|
|
85
95
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
86
96
|
// This checks if the type of a non-empty vector is of type other than U8. If so, we use the Serialized
|
|
@@ -108,6 +118,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
108
118
|
* ```typescript
|
|
109
119
|
* const v = MoveVector.U8([1, 2, 3, 4]);
|
|
110
120
|
* ```
|
|
121
|
+
* @group Implementation
|
|
122
|
+
* @category BCS
|
|
111
123
|
*/
|
|
112
124
|
static U8(values: Array<number> | HexInput): MoveVector<U8> {
|
|
113
125
|
let numbers: Array<number>;
|
|
@@ -141,6 +153,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
141
153
|
* ```typescript
|
|
142
154
|
* const v = MoveVector.U16([1, 2, 3, 4]);
|
|
143
155
|
* ```
|
|
156
|
+
* @group Implementation
|
|
157
|
+
* @category BCS
|
|
144
158
|
|
|
145
159
|
*/
|
|
146
160
|
static U16(values: Array<number>): MoveVector<U16> {
|
|
@@ -160,6 +174,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
160
174
|
* ```
|
|
161
175
|
* const v = MoveVector.U32([1, 2, 3, 4]);
|
|
162
176
|
* ```
|
|
177
|
+
* @group Implementation
|
|
178
|
+
* @category BCS
|
|
163
179
|
|
|
164
180
|
*/
|
|
165
181
|
static U32(values: Array<number>): MoveVector<U32> {
|
|
@@ -178,6 +194,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
178
194
|
* ```typescript
|
|
179
195
|
* const v = MoveVector.U64([1, 2, 3, 4]);
|
|
180
196
|
* ```
|
|
197
|
+
* @group Implementation
|
|
198
|
+
* @category BCS
|
|
181
199
|
*/
|
|
182
200
|
static U64(values: Array<AnyNumber>): MoveVector<U64> {
|
|
183
201
|
return new MoveVector<U64>(values.map((v) => new U64(v)));
|
|
@@ -194,6 +212,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
194
212
|
* ```typescript
|
|
195
213
|
* const v = MoveVector.U128([1, 2, 3, 4]);
|
|
196
214
|
* ```
|
|
215
|
+
* @group Implementation
|
|
216
|
+
* @category BCS
|
|
197
217
|
*/
|
|
198
218
|
static U128(values: Array<AnyNumber>): MoveVector<U128> {
|
|
199
219
|
return new MoveVector<U128>(values.map((v) => new U128(v)));
|
|
@@ -211,6 +231,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
211
231
|
* ```typescript
|
|
212
232
|
* const v = MoveVector.U256([1, 2, 3, 4]);
|
|
213
233
|
* ```
|
|
234
|
+
* @group Implementation
|
|
235
|
+
* @category BCS
|
|
214
236
|
*/
|
|
215
237
|
static U256(values: Array<AnyNumber>): MoveVector<U256> {
|
|
216
238
|
return new MoveVector<U256>(values.map((v) => new U256(v)));
|
|
@@ -227,6 +249,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
227
249
|
*
|
|
228
250
|
* @example
|
|
229
251
|
* * const v = MoveVector.Bool([true, false, true, false]);
|
|
252
|
+
* @group Implementation
|
|
253
|
+
* @category BCS
|
|
230
254
|
*/
|
|
231
255
|
static Bool(values: Array<boolean>): MoveVector<Bool> {
|
|
232
256
|
return new MoveVector<Bool>(values.map((v) => new Bool(v)));
|
|
@@ -242,6 +266,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
242
266
|
*
|
|
243
267
|
* @example
|
|
244
268
|
* const v = MoveVector.MoveString(["hello", "world"]);
|
|
269
|
+
* @group Implementation
|
|
270
|
+
* @category BCS
|
|
245
271
|
*/
|
|
246
272
|
static MoveString(values: Array<string>): MoveVector<MoveString> {
|
|
247
273
|
return new MoveVector<MoveString>(values.map((v) => new MoveString(v)));
|
|
@@ -252,6 +278,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
252
278
|
* This function will serialize the value if it is present.
|
|
253
279
|
*
|
|
254
280
|
* @param serializer - The serializer instance used to perform the serialization.
|
|
281
|
+
* @group Implementation
|
|
282
|
+
* @category BCS
|
|
255
283
|
*/
|
|
256
284
|
serialize(serializer: Serializer): void;
|
|
257
285
|
serialize(serializer: Serializer): void {
|
|
@@ -274,6 +302,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
274
302
|
* @param cls the class to typecast the input values to, must be a Serializable and Deserializable type.
|
|
275
303
|
* @returns a MoveVector of the corresponding class T
|
|
276
304
|
*
|
|
305
|
+
* @group Implementation
|
|
306
|
+
* @category BCS
|
|
277
307
|
*/
|
|
278
308
|
static deserialize<T extends Serializable & EntryFunctionArgument>(
|
|
279
309
|
deserializer: Deserializer,
|
|
@@ -294,6 +324,8 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
294
324
|
* and deserialization of byte data, as well as converting to a MoveVector.
|
|
295
325
|
*
|
|
296
326
|
* @extends Serializable
|
|
327
|
+
* @group Implementation
|
|
328
|
+
* @category BCS
|
|
297
329
|
*/
|
|
298
330
|
export class Serialized extends Serializable implements TransactionArgument {
|
|
299
331
|
public readonly value: Uint8Array;
|
|
@@ -325,6 +357,8 @@ export class Serialized extends Serializable implements TransactionArgument {
|
|
|
325
357
|
* This function allows you to convert serialized data into a usable MoveVector format.
|
|
326
358
|
*
|
|
327
359
|
* @param cls - The class type of the elements in the MoveVector.
|
|
360
|
+
* @group Implementation
|
|
361
|
+
* @category BCS
|
|
328
362
|
*/
|
|
329
363
|
toMoveVector<T extends Serializable & EntryFunctionArgument>(cls: Deserializable<T>): MoveVector<T> {
|
|
330
364
|
const deserializer = new Deserializer(this.bcsToBytes());
|
|
@@ -341,6 +375,8 @@ export class Serialized extends Serializable implements TransactionArgument {
|
|
|
341
375
|
* functions and script functions.
|
|
342
376
|
*
|
|
343
377
|
* @extends Serializable
|
|
378
|
+
* @group Implementation
|
|
379
|
+
* @category BCS
|
|
344
380
|
*/
|
|
345
381
|
export class MoveString extends Serializable implements TransactionArgument {
|
|
346
382
|
public value: string;
|
|
@@ -410,6 +446,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
410
446
|
* @throws {Error} Throws an error if the MoveOption does not contain a value.
|
|
411
447
|
*
|
|
412
448
|
* @returns {T} The contained value if present.
|
|
449
|
+
* @group Implementation
|
|
450
|
+
* @category BCS
|
|
413
451
|
*/
|
|
414
452
|
unwrap(): T {
|
|
415
453
|
if (!this.isSome()) {
|
|
@@ -423,6 +461,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
423
461
|
* Check if the MoveOption has a value.
|
|
424
462
|
*
|
|
425
463
|
* @returns {boolean} Returns true if there is exactly one value in the MoveOption.
|
|
464
|
+
* @group Implementation
|
|
465
|
+
* @category BCS
|
|
426
466
|
*/
|
|
427
467
|
isSome(): boolean {
|
|
428
468
|
return this.vec.values.length === 1;
|
|
@@ -444,6 +484,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
444
484
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
445
485
|
* the resulting MoveOption's .isSome() method will return false.
|
|
446
486
|
* @returns a MoveOption<U8> with an inner value `value`
|
|
487
|
+
* @group Implementation
|
|
488
|
+
* @category BCS
|
|
447
489
|
*/
|
|
448
490
|
static U8(value?: number | null): MoveOption<U8> {
|
|
449
491
|
return new MoveOption<U8>(value !== null && value !== undefined ? new U8(value) : undefined);
|
|
@@ -459,6 +501,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
459
501
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
460
502
|
* the resulting MoveOption's .isSome() method will return false.
|
|
461
503
|
* @returns a MoveOption<U16> with an inner value `value`
|
|
504
|
+
* @group Implementation
|
|
505
|
+
* @category BCS
|
|
462
506
|
*/
|
|
463
507
|
static U16(value?: number | null): MoveOption<U16> {
|
|
464
508
|
return new MoveOption<U16>(value !== null && value !== undefined ? new U16(value) : undefined);
|
|
@@ -474,6 +518,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
474
518
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
475
519
|
* the resulting MoveOption's .isSome() method will return false.
|
|
476
520
|
* @returns a MoveOption<U32> with an inner value `value`
|
|
521
|
+
* @group Implementation
|
|
522
|
+
* @category BCS
|
|
477
523
|
*/
|
|
478
524
|
static U32(value?: number | null): MoveOption<U32> {
|
|
479
525
|
return new MoveOption<U32>(value !== null && value !== undefined ? new U32(value) : undefined);
|
|
@@ -489,6 +535,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
489
535
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
490
536
|
* the resulting MoveOption's .isSome() method will return false.
|
|
491
537
|
* @returns a MoveOption<U64> with an inner value `value`
|
|
538
|
+
* @group Implementation
|
|
539
|
+
* @category BCS
|
|
492
540
|
*/
|
|
493
541
|
static U64(value?: AnyNumber | null): MoveOption<U64> {
|
|
494
542
|
return new MoveOption<U64>(value !== null && value !== undefined ? new U64(value) : undefined);
|
|
@@ -504,6 +552,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
504
552
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
505
553
|
* the resulting MoveOption's .isSome() method will return false.
|
|
506
554
|
* @returns a MoveOption<U128> with an inner value `value`
|
|
555
|
+
* @group Implementation
|
|
556
|
+
* @category BCS
|
|
507
557
|
*/
|
|
508
558
|
static U128(value?: AnyNumber | null): MoveOption<U128> {
|
|
509
559
|
return new MoveOption<U128>(value !== null && value !== undefined ? new U128(value) : undefined);
|
|
@@ -519,6 +569,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
519
569
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
520
570
|
* the resulting MoveOption's .isSome() method will return false.
|
|
521
571
|
* @returns a MoveOption<U256> with an inner value `value`
|
|
572
|
+
* @group Implementation
|
|
573
|
+
* @category BCS
|
|
522
574
|
*/
|
|
523
575
|
static U256(value?: AnyNumber | null): MoveOption<U256> {
|
|
524
576
|
return new MoveOption<U256>(value !== null && value !== undefined ? new U256(value) : undefined);
|
|
@@ -534,6 +586,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
534
586
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
535
587
|
* the resulting MoveOption's .isSome() method will return false.
|
|
536
588
|
* @returns a MoveOption<Bool> with an inner value `value`
|
|
589
|
+
* @group Implementation
|
|
590
|
+
* @category BCS
|
|
537
591
|
*/
|
|
538
592
|
static Bool(value?: boolean | null): MoveOption<Bool> {
|
|
539
593
|
return new MoveOption<Bool>(value !== null && value !== undefined ? new Bool(value) : undefined);
|
|
@@ -550,6 +604,8 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
550
604
|
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
551
605
|
* the resulting MoveOption's .isSome() method will return false.
|
|
552
606
|
* @returns a MoveOption<MoveString> with an inner value `value`
|
|
607
|
+
* @group Implementation
|
|
608
|
+
* @category BCS
|
|
553
609
|
*/
|
|
554
610
|
static MoveString(value?: string | null): MoveOption<MoveString> {
|
|
555
611
|
return new MoveOption<MoveString>(value !== null && value !== undefined ? new MoveString(value) : undefined);
|
package/src/bcs/serializer.ts
CHANGED
|
@@ -17,6 +17,8 @@ import { AnyNumber, Uint16, Uint32, Uint8 } from "../types";
|
|
|
17
17
|
* This class serves as a base class for all serializable types. It facilitates
|
|
18
18
|
* composable serialization of complex types and enables the serialization of
|
|
19
19
|
* instances to their BCS (Binary Canonical Serialization) representation.
|
|
20
|
+
* @group Implementation
|
|
21
|
+
* @category BCS
|
|
20
22
|
*/
|
|
21
23
|
export abstract class Serializable {
|
|
22
24
|
abstract serialize(serializer: Serializer): void;
|
|
@@ -25,6 +27,8 @@ export abstract class Serializable {
|
|
|
25
27
|
* Serializes a `Serializable` value to its BCS representation.
|
|
26
28
|
* This function is the TypeScript SDK equivalent of `bcs::to_bytes` in Move.
|
|
27
29
|
* @returns the BCS representation of the Serializable instance as a byte buffer.
|
|
30
|
+
* @group Implementation
|
|
31
|
+
* @category BCS
|
|
28
32
|
*/
|
|
29
33
|
bcsToBytes(): Uint8Array {
|
|
30
34
|
const serializer = new Serializer();
|
|
@@ -36,6 +40,8 @@ export abstract class Serializable {
|
|
|
36
40
|
* Converts the BCS-serialized bytes of a value into a Hex instance.
|
|
37
41
|
* This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
|
|
38
42
|
* @returns A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
|
|
43
|
+
* @group Implementation
|
|
44
|
+
* @category BCS
|
|
39
45
|
*/
|
|
40
46
|
bcsToHex(): Hex {
|
|
41
47
|
const bcsBytes = this.bcsToBytes();
|
|
@@ -64,6 +70,8 @@ export abstract class Serializable {
|
|
|
64
70
|
* It provides methods to serialize strings, bytes, numbers, and other serializable objects
|
|
65
71
|
* using the Binary Coded Serialization (BCS) layout. The serialized data can be retrieved as a
|
|
66
72
|
* Uint8Array.
|
|
73
|
+
* @group Implementation
|
|
74
|
+
* @category BCS
|
|
67
75
|
*/
|
|
68
76
|
export class Serializer {
|
|
69
77
|
private buffer: ArrayBuffer;
|
|
@@ -75,6 +83,8 @@ export class Serializer {
|
|
|
75
83
|
* The `length` must be greater than 0.
|
|
76
84
|
*
|
|
77
85
|
* @param length - The size of the buffer in bytes.
|
|
86
|
+
* @group Implementation
|
|
87
|
+
* @category BCS
|
|
78
88
|
*/
|
|
79
89
|
constructor(length: number = 64) {
|
|
80
90
|
if (length <= 0) {
|
|
@@ -89,6 +99,8 @@ export class Serializer {
|
|
|
89
99
|
* This function dynamically resizes the buffer if the current size is insufficient.
|
|
90
100
|
*
|
|
91
101
|
* @param bytes - The number of bytes to ensure the buffer can handle.
|
|
102
|
+
* @group Implementation
|
|
103
|
+
* @category BCS
|
|
92
104
|
*/
|
|
93
105
|
private ensureBufferWillHandleSize(bytes: number) {
|
|
94
106
|
while (this.buffer.byteLength < this.offset + bytes) {
|
|
@@ -102,6 +114,8 @@ export class Serializer {
|
|
|
102
114
|
* Appends the specified values to the buffer, ensuring that the buffer can accommodate the new data.
|
|
103
115
|
*
|
|
104
116
|
* @param {Uint8Array} values - The values to be appended to the buffer.
|
|
117
|
+
* @group Implementation
|
|
118
|
+
* @category BCS
|
|
105
119
|
*/
|
|
106
120
|
protected appendToBuffer(values: Uint8Array) {
|
|
107
121
|
this.ensureBufferWillHandleSize(values.length);
|
|
@@ -116,6 +130,8 @@ export class Serializer {
|
|
|
116
130
|
* @param fn.byteOffset - The byte offset at which to write the value.
|
|
117
131
|
* @param fn.value - The numeric value to serialize into the buffer.
|
|
118
132
|
* @param fn.littleEndian - Optional flag indicating whether to use little-endian byte order (defaults to true).
|
|
133
|
+
* @group Implementation
|
|
134
|
+
* @category BCS
|
|
119
135
|
*/
|
|
120
136
|
// TODO: JSDoc bytesLength and value
|
|
121
137
|
private serializeWithFunction(
|
|
@@ -145,6 +161,8 @@ export class Serializer {
|
|
|
145
161
|
* serializer.serializeStr("1234abcd");
|
|
146
162
|
* assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
|
|
147
163
|
* ```
|
|
164
|
+
* @group Implementation
|
|
165
|
+
* @category BCS
|
|
148
166
|
*/
|
|
149
167
|
serializeStr(value: string) {
|
|
150
168
|
const textEncoder = new TextEncoder();
|
|
@@ -158,6 +176,8 @@ export class Serializer {
|
|
|
158
176
|
* BCS layout for "bytes": bytes_length | bytes
|
|
159
177
|
* where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
|
|
160
178
|
* @param value - The byte array to serialize.
|
|
179
|
+
* @group Implementation
|
|
180
|
+
* @category BCS
|
|
161
181
|
*/
|
|
162
182
|
serializeBytes(value: Uint8Array) {
|
|
163
183
|
this.serializeU32AsUleb128(value.length);
|
|
@@ -170,6 +190,8 @@ export class Serializer {
|
|
|
170
190
|
* When deserializing, the number of bytes to deserialize needs to be passed in.
|
|
171
191
|
|
|
172
192
|
* @param value - The Uint8Array to be serialized.
|
|
193
|
+
* @group Implementation
|
|
194
|
+
* @category BCS
|
|
173
195
|
*/
|
|
174
196
|
serializeFixedBytes(value: Uint8Array) {
|
|
175
197
|
this.appendToBuffer(value);
|
|
@@ -181,6 +203,8 @@ export class Serializer {
|
|
|
181
203
|
* The BCS layout for a boolean uses one byte, where "0x01" represents true and "0x00" represents false.
|
|
182
204
|
*
|
|
183
205
|
* @param value - The boolean value to serialize.
|
|
206
|
+
* @group Implementation
|
|
207
|
+
* @category BCS
|
|
184
208
|
*/
|
|
185
209
|
serializeBool(value: boolean) {
|
|
186
210
|
/**
|
|
@@ -189,6 +213,8 @@ export class Serializer {
|
|
|
189
213
|
*
|
|
190
214
|
* @param value - The value to be checked for boolean type.
|
|
191
215
|
* @throws {Error} Throws an error if the value is not a boolean.
|
|
216
|
+
* @group Implementation
|
|
217
|
+
* @category BCS
|
|
192
218
|
*/
|
|
193
219
|
ensureBoolean(value);
|
|
194
220
|
const byteValue = value ? 1 : 0;
|
|
@@ -200,6 +226,8 @@ export class Serializer {
|
|
|
200
226
|
* BCS layout for "uint8": One byte. Binary format in little-endian representation.
|
|
201
227
|
*
|
|
202
228
|
* @param value - The Uint8 value to serialize.
|
|
229
|
+
* @group Implementation
|
|
230
|
+
* @category BCS
|
|
203
231
|
*/
|
|
204
232
|
@checkNumberRange(0, MAX_U8_NUMBER)
|
|
205
233
|
serializeU8(value: Uint8) {
|
|
@@ -209,6 +237,8 @@ export class Serializer {
|
|
|
209
237
|
/**
|
|
210
238
|
* Serializes a uint16 number.
|
|
211
239
|
*
|
|
240
|
+
* @group Implementation
|
|
241
|
+
* @category BCS
|
|
212
242
|
|
|
213
243
|
*/
|
|
214
244
|
|
|
@@ -223,6 +253,8 @@ export class Serializer {
|
|
|
223
253
|
* serializer.serializeU16(4660);
|
|
224
254
|
* assert(serializer.toUint8Array() === new Uint8Array([0x34, 0x12]));
|
|
225
255
|
* ```
|
|
256
|
+
* @group Implementation
|
|
257
|
+
* @category BCS
|
|
226
258
|
*/
|
|
227
259
|
@checkNumberRange(0, MAX_U16_NUMBER)
|
|
228
260
|
serializeU16(value: Uint16) {
|
|
@@ -239,6 +271,8 @@ export class Serializer {
|
|
|
239
271
|
* assert(serializer.toUint8Array() === new Uint8Array([0x78, 0x56, 0x34, 0x12]));
|
|
240
272
|
* ```
|
|
241
273
|
* @param value - The 32-bit unsigned integer value to serialize.
|
|
274
|
+
* @group Implementation
|
|
275
|
+
* @category BCS
|
|
242
276
|
*/
|
|
243
277
|
@checkNumberRange(0, MAX_U32_NUMBER)
|
|
244
278
|
serializeU32(value: Uint32) {
|
|
@@ -256,6 +290,8 @@ export class Serializer {
|
|
|
256
290
|
* serializer.serializeU64(1311768467750121216);
|
|
257
291
|
* assert(serializer.toUint8Array() === new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));
|
|
258
292
|
* ```
|
|
293
|
+
* @group Implementation
|
|
294
|
+
* @category BCS
|
|
259
295
|
*/
|
|
260
296
|
@checkNumberRange(BigInt(0), MAX_U64_BIG_INT)
|
|
261
297
|
serializeU64(value: AnyNumber) {
|
|
@@ -271,6 +307,8 @@ export class Serializer {
|
|
|
271
307
|
* Serializes a U128 value into a format suitable for storage or transmission.
|
|
272
308
|
*
|
|
273
309
|
* @param value - The U128 value to serialize, represented as a number.
|
|
310
|
+
* @group Implementation
|
|
311
|
+
* @category BCS
|
|
274
312
|
*/
|
|
275
313
|
@checkNumberRange(BigInt(0), MAX_U128_BIG_INT)
|
|
276
314
|
serializeU128(value: AnyNumber) {
|
|
@@ -287,6 +325,8 @@ export class Serializer {
|
|
|
287
325
|
* This function is essential for encoding large numbers in a compact format suitable for transmission or storage.
|
|
288
326
|
*
|
|
289
327
|
* @param value - The U256 value to serialize, represented as an AnyNumber.
|
|
328
|
+
* @group Implementation
|
|
329
|
+
* @category BCS
|
|
290
330
|
*/
|
|
291
331
|
@checkNumberRange(BigInt(0), MAX_U256_BIG_INT)
|
|
292
332
|
serializeU256(value: AnyNumber) {
|
|
@@ -303,6 +343,8 @@ export class Serializer {
|
|
|
303
343
|
* BCS uses uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values
|
|
304
344
|
*
|
|
305
345
|
* @param val - The 32-bit unsigned integer value to be serialized.
|
|
346
|
+
* @group Implementation
|
|
347
|
+
* @category BCS
|
|
306
348
|
*/
|
|
307
349
|
@checkNumberRange(0, MAX_U32_NUMBER)
|
|
308
350
|
serializeU32AsUleb128(val: Uint32) {
|
|
@@ -322,6 +364,8 @@ export class Serializer {
|
|
|
322
364
|
* This function allows you to retrieve the byte representation of the buffer up to the current offset.
|
|
323
365
|
*
|
|
324
366
|
* @returns Uint8Array - The byte array representation of the buffer.
|
|
367
|
+
* @group Implementation
|
|
368
|
+
* @category BCS
|
|
325
369
|
*/
|
|
326
370
|
toUint8Array(): Uint8Array {
|
|
327
371
|
return new Uint8Array(this.buffer).slice(0, this.offset);
|
|
@@ -333,6 +377,8 @@ export class Serializer {
|
|
|
333
377
|
* @param value The Serializable value to serialize.
|
|
334
378
|
*
|
|
335
379
|
* @returns the serializer instance
|
|
380
|
+
* @group Implementation
|
|
381
|
+
* @category BCS
|
|
336
382
|
*/
|
|
337
383
|
serialize<T extends Serializable>(value: T): void {
|
|
338
384
|
// NOTE: The `serialize` method called by `value` is defined in `value`'s
|
|
@@ -358,6 +404,8 @@ export class Serializer {
|
|
|
358
404
|
* // serializedBytes is now the BCS-serialized bytes
|
|
359
405
|
* // The equivalent value in Move would be:
|
|
360
406
|
* // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
|
|
407
|
+
* @group Implementation
|
|
408
|
+
* @category BCS
|
|
361
409
|
*/
|
|
362
410
|
serializeVector<T extends Serializable>(values: Array<T>): void {
|
|
363
411
|
this.serializeU32AsUleb128(values.length);
|
|
@@ -382,6 +430,8 @@ export class Serializer {
|
|
|
382
430
|
* serializer.serializeOption(new AccountAddress(...)); // Serializes optional Serializable
|
|
383
431
|
* serializer.serializeOption(undefined); // Serializes none case
|
|
384
432
|
* ```
|
|
433
|
+
* @group Implementation
|
|
434
|
+
* @category BCS
|
|
385
435
|
*/
|
|
386
436
|
serializeOption<T extends Serializable | string | Uint8Array>(value?: T, len?: number): void {
|
|
387
437
|
const hasValue = value !== undefined;
|
|
@@ -411,6 +461,8 @@ export class Serializer {
|
|
|
411
461
|
* BCS layout for undefined: 0
|
|
412
462
|
*
|
|
413
463
|
* @param value - The optional string to serialize. If undefined, it will serialize as 0.
|
|
464
|
+
* @group Implementation
|
|
465
|
+
* @category BCS
|
|
414
466
|
*/
|
|
415
467
|
serializeOptionStr(value?: string): void {
|
|
416
468
|
if (value === undefined) {
|
|
@@ -422,12 +474,19 @@ export class Serializer {
|
|
|
422
474
|
}
|
|
423
475
|
}
|
|
424
476
|
|
|
477
|
+
/**
|
|
478
|
+
* @group Implementation
|
|
479
|
+
* @category BCS
|
|
480
|
+
*/
|
|
425
481
|
export function ensureBoolean(value: unknown): asserts value is boolean {
|
|
426
482
|
if (typeof value !== "boolean") {
|
|
427
483
|
throw new Error(`${value} is not a boolean value`);
|
|
428
484
|
}
|
|
429
485
|
}
|
|
430
|
-
|
|
486
|
+
/**
|
|
487
|
+
* @group Implementation
|
|
488
|
+
* @category BCS
|
|
489
|
+
*/
|
|
431
490
|
export const outOfRangeErrorMessage = (value: AnyNumber, min: AnyNumber, max: AnyNumber) =>
|
|
432
491
|
`${value} is out of range: [${min}, ${max}]`;
|
|
433
492
|
|
|
@@ -438,6 +497,8 @@ export const outOfRangeErrorMessage = (value: AnyNumber, min: AnyNumber, max: An
|
|
|
438
497
|
* @param value - The number to validate.
|
|
439
498
|
* @param minValue - The minimum allowable value (inclusive).
|
|
440
499
|
* @param maxValue - The maximum allowable value (inclusive).
|
|
500
|
+
* @group Implementation
|
|
501
|
+
* @category BCS
|
|
441
502
|
*/
|
|
442
503
|
export function validateNumberInRange<T extends AnyNumber>(value: T, minValue: T, maxValue: T) {
|
|
443
504
|
const valueBigInt = BigInt(value);
|
|
@@ -452,6 +513,8 @@ export function validateNumberInRange<T extends AnyNumber>(value: T, minValue: T
|
|
|
452
513
|
*
|
|
453
514
|
* @param minValue - The input argument must be greater than or equal to this value.
|
|
454
515
|
* @param maxValue - The input argument must be less than or equal to this value.
|
|
516
|
+
* @group Implementation
|
|
517
|
+
* @category BCS
|
|
455
518
|
*/
|
|
456
519
|
function checkNumberRange<T extends AnyNumber>(minValue: T, maxValue: T) {
|
|
457
520
|
return (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => {
|
package/src/cli/localNode.ts
CHANGED
|
@@ -7,9 +7,11 @@ import { platform } from "os";
|
|
|
7
7
|
import { sleep } from "../utils/helpers";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Represents a local node for running a
|
|
11
|
-
* This class provides methods to start, stop, and check the status of the
|
|
10
|
+
* Represents a local node for running a localnet environment.
|
|
11
|
+
* This class provides methods to start, stop, and check the status of the localnet process.
|
|
12
12
|
* It manages the lifecycle of the node process and ensures that it is operational before executing tests.
|
|
13
|
+
* @group Implementation
|
|
14
|
+
* @category CLI
|
|
13
15
|
*/
|
|
14
16
|
export class LocalNode {
|
|
15
17
|
readonly MAXIMUM_WAIT_TIME_SEC = 75;
|
|
@@ -29,6 +31,8 @@ export class LocalNode {
|
|
|
29
31
|
*
|
|
30
32
|
* @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.
|
|
31
33
|
* @throws {Error} If there is an error while attempting to kill the process.
|
|
34
|
+
* @group Implementation
|
|
35
|
+
* @category CLI
|
|
32
36
|
*/
|
|
33
37
|
async stop(): Promise<void> {
|
|
34
38
|
await new Promise((resolve, reject) => {
|
|
@@ -41,6 +45,8 @@ export class LocalNode {
|
|
|
41
45
|
* @param callback - A function that is called after the termination attempt is complete.
|
|
42
46
|
* @param callback.err - An error object if the termination failed; otherwise, null.
|
|
43
47
|
* @param callback.resolve - A boolean indicating whether the termination was successful.
|
|
48
|
+
* @group Implementation
|
|
49
|
+
* @category CLI
|
|
44
50
|
*/
|
|
45
51
|
kill(this.process.pid, (err) => {
|
|
46
52
|
if (err) {
|
|
@@ -53,10 +59,12 @@ export class LocalNode {
|
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
/**
|
|
56
|
-
* Runs a
|
|
62
|
+
* Runs a localnet and waits for the process to be up.
|
|
57
63
|
* If the local node process is already running, it returns without starting the process.
|
|
58
64
|
*
|
|
59
65
|
* @returns {Promise<void>} A promise that resolves when the process is up.
|
|
66
|
+
* @group Implementation
|
|
67
|
+
* @category CLI
|
|
60
68
|
*/
|
|
61
69
|
async run(): Promise<void> {
|
|
62
70
|
const nodeIsUp = await this.checkIfProcessIsUp();
|
|
@@ -68,11 +76,13 @@ export class LocalNode {
|
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
/**
|
|
71
|
-
* Starts the
|
|
79
|
+
* Starts the localnet by running the Aptos node with the specified command-line arguments.
|
|
72
80
|
*
|
|
73
81
|
* @returns {void}
|
|
74
82
|
*
|
|
75
|
-
* @throws {Error} If there is an issue starting the
|
|
83
|
+
* @throws {Error} If there is an issue starting the localnet.
|
|
84
|
+
* @group Implementation
|
|
85
|
+
* @category CLI
|
|
76
86
|
*/
|
|
77
87
|
start(): void {
|
|
78
88
|
const cliCommand = "npx";
|
|
@@ -105,10 +115,12 @@ export class LocalNode {
|
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
/**
|
|
108
|
-
* Waits for the
|
|
118
|
+
* Waits for the localnet process to be operational within a specified maximum wait time.
|
|
109
119
|
* This function continuously checks if the process is up and will throw an error if it fails to start.
|
|
110
120
|
*
|
|
111
121
|
* @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.
|
|
122
|
+
* @group Implementation
|
|
123
|
+
* @category CLI
|
|
112
124
|
*/
|
|
113
125
|
async waitUntilProcessIsUp(): Promise<boolean> {
|
|
114
126
|
let operational = await this.checkIfProcessIsUp();
|
|
@@ -133,9 +145,11 @@ export class LocalNode {
|
|
|
133
145
|
}
|
|
134
146
|
|
|
135
147
|
/**
|
|
136
|
-
* Checks if the
|
|
148
|
+
* Checks if the localnet is up by querying the readiness endpoint.
|
|
137
149
|
*
|
|
138
|
-
* @returns Promise<boolean> - A promise that resolves to true if the
|
|
150
|
+
* @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.
|
|
151
|
+
* @group Implementation
|
|
152
|
+
* @category CLI
|
|
139
153
|
*/
|
|
140
154
|
async checkIfProcessIsUp(): Promise<boolean> {
|
|
141
155
|
try {
|