@aptos-labs/ts-sdk 1.14.0-zeta.3 → 1.15.0-win.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/dist/common/{accountAddress-u9wEan9p.d.ts → accountAddress-ccLvlUQe.d.ts} +22 -49
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +103 -550
- package/dist/common/index.js +55 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-9zBaZEnp.d.mts → Ed25519Account-B1VMJOY2.d.mts} +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +7 -12
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -8
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +2 -2
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +2 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +5 -10
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +0 -20
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +2 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -27
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +3 -8
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +84 -0
- package/dist/esm/api/table.mjs +2 -0
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -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 +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +0 -26
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +0 -2
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-3CUVYW32.mjs → chunk-2X7A4HUS.mjs} +2 -2
- package/dist/esm/chunk-2XK53QFA.mjs +2 -0
- package/dist/esm/{chunk-WM2NCYZL.mjs.map → chunk-2XK53QFA.mjs.map} +1 -1
- package/dist/esm/{chunk-Y4SSUCPJ.mjs → chunk-2YZSEM2G.mjs} +2 -2
- package/dist/esm/{chunk-ZNEBMSNC.mjs → chunk-35EWRSDK.mjs} +2 -2
- package/dist/esm/{chunk-TVRJ3M7B.mjs → chunk-36QXVFR5.mjs} +2 -2
- package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-36QXVFR5.mjs.map} +1 -1
- package/dist/esm/chunk-3HSXKDOC.mjs +2 -0
- package/dist/esm/chunk-3HSXKDOC.mjs.map +1 -0
- package/dist/esm/chunk-3N6N3KOS.mjs +2 -0
- package/dist/esm/{chunk-HYDDIAJ6.mjs.map → chunk-3N6N3KOS.mjs.map} +1 -1
- package/dist/esm/{chunk-SLI3KELH.mjs → chunk-477G7LHJ.mjs} +2 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
- package/dist/esm/{chunk-7STYQ5ZE.mjs → chunk-5EN52MUT.mjs} +2 -2
- package/dist/esm/{chunk-P7JMD7KZ.mjs → chunk-5VIESFOC.mjs} +2 -2
- package/dist/esm/{chunk-TE3WIJ26.mjs → chunk-5YLAWRI2.mjs} +2 -2
- package/dist/esm/chunk-6IFMQ5AS.mjs +2 -0
- package/dist/esm/chunk-6IFMQ5AS.mjs.map +1 -0
- package/dist/esm/{chunk-3CMS2KOX.mjs → chunk-6JLYD5Q2.mjs} +2 -2
- package/dist/esm/{chunk-HMFL7AOJ.mjs → chunk-6XWDDCQD.mjs} +2 -2
- package/dist/esm/{chunk-CS7B3FVO.mjs → chunk-7NEETXEA.mjs} +2 -2
- package/dist/esm/chunk-7VRZLDIJ.mjs +2 -0
- package/dist/esm/{chunk-24ZOKI52.mjs → chunk-ACG4ZGRQ.mjs} +2 -2
- package/dist/esm/chunk-AQAH67IV.mjs +2 -0
- package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
- package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
- package/dist/esm/{chunk-HYU23YVP.mjs → chunk-BHLICYAI.mjs} +2 -2
- package/dist/esm/chunk-BO2TLWNT.mjs +2 -0
- package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
- package/dist/esm/chunk-CJDEPZ4J.mjs +2 -0
- package/dist/esm/{chunk-NBEXLW7P.mjs.map → chunk-CJDEPZ4J.mjs.map} +1 -1
- package/dist/esm/{chunk-WWGROAKX.mjs → chunk-CWUH4PNH.mjs} +2 -2
- package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
- package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
- package/dist/esm/chunk-DLAIJ2UM.mjs +2 -0
- package/dist/esm/chunk-DLAIJ2UM.mjs.map +1 -0
- package/dist/esm/{chunk-DD2VWOMZ.mjs → chunk-E2NVC2VR.mjs} +2 -2
- package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
- package/dist/esm/{chunk-EB7AI4B4.mjs → chunk-G56GPLTB.mjs} +2 -2
- package/dist/esm/{chunk-RKHPXZM6.mjs → chunk-GHYE26Q5.mjs} +2 -2
- package/dist/esm/{chunk-RKHPXZM6.mjs.map → chunk-GHYE26Q5.mjs.map} +1 -1
- package/dist/esm/{chunk-7IMWGGA6.mjs → chunk-GIAABV7R.mjs} +2 -2
- package/dist/esm/{chunk-KMKSA7LM.mjs → chunk-GKJ2NJG5.mjs} +2 -2
- package/dist/esm/{chunk-NC5HHEEM.mjs → chunk-GM56MMNJ.mjs} +2 -2
- package/dist/esm/{chunk-GQ6HIKZT.mjs → chunk-HMARHACL.mjs} +2 -2
- package/dist/esm/chunk-HNEAPYNI.mjs +2 -0
- package/dist/esm/{chunk-P2WALKSW.mjs → chunk-HSJTQLI2.mjs} +2 -2
- package/dist/esm/chunk-HYCGMFC2.mjs +2 -0
- package/dist/esm/chunk-HYCGMFC2.mjs.map +1 -0
- package/dist/esm/chunk-IENCDVPF.mjs +2 -0
- package/dist/esm/chunk-IENCDVPF.mjs.map +1 -0
- package/dist/esm/{chunk-23MNZ5LZ.mjs → chunk-IZQV2SU6.mjs} +2 -2
- package/dist/esm/chunk-J6OFSYUA.mjs +2 -0
- package/dist/esm/chunk-J6OFSYUA.mjs.map +1 -0
- package/dist/esm/chunk-JB5H65CE.mjs +2 -0
- package/dist/esm/chunk-JB5H65CE.mjs.map +1 -0
- package/dist/esm/{chunk-XZGQMZ2H.mjs → chunk-JFIAWBCK.mjs} +2 -2
- package/dist/esm/chunk-JQIGQMNZ.mjs +2 -0
- package/dist/esm/chunk-JQIGQMNZ.mjs.map +1 -0
- package/dist/esm/chunk-K7HX7JQH.mjs +2 -0
- package/dist/esm/chunk-K7HX7JQH.mjs.map +1 -0
- package/dist/esm/{chunk-HGZGTBA4.mjs → chunk-KAGLWBIJ.mjs} +2 -2
- package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
- package/dist/esm/{chunk-HHVAU5HU.mjs → chunk-MCRRHBFQ.mjs} +2 -2
- package/dist/esm/{chunk-PFFAQZHT.mjs → chunk-MJPUASSD.mjs} +2 -2
- package/dist/esm/{chunk-7XYECSW6.mjs → chunk-MQI2IE6Y.mjs} +2 -2
- package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
- package/dist/esm/{chunk-L5WUYZ35.mjs → chunk-NZETF6Z4.mjs} +2 -2
- package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
- package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
- package/dist/esm/{chunk-CB6CNNM2.mjs → chunk-P6GWG2CY.mjs} +2 -2
- package/dist/esm/chunk-PF57EOJY.mjs +2 -0
- package/dist/esm/{chunk-JLWKIYHV.mjs → chunk-PIVZMT5D.mjs} +2 -2
- package/dist/esm/{chunk-R52BRP36.mjs → chunk-PLXGSUZA.mjs} +2 -2
- package/dist/esm/{chunk-AHNE2QA3.mjs → chunk-PPO4IXE4.mjs} +2 -2
- package/dist/esm/{chunk-PMPTAPM3.mjs → chunk-QIHR7HD6.mjs} +2 -2
- package/dist/esm/{chunk-BTLFW3YY.mjs → chunk-QQ5PHEJF.mjs} +2 -2
- package/dist/esm/{chunk-T23OVRNF.mjs → chunk-QRS4DGP3.mjs} +2 -2
- package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
- package/dist/esm/{chunk-LDQ6JFEF.mjs → chunk-QSHLNSUP.mjs} +2 -2
- package/dist/esm/{chunk-LDQ6JFEF.mjs.map → chunk-QSHLNSUP.mjs.map} +1 -1
- package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
- package/dist/esm/chunk-RTSWVT2Q.mjs +2 -0
- package/dist/esm/chunk-RTSWVT2Q.mjs.map +1 -0
- package/dist/esm/{chunk-Y33CIIZX.mjs → chunk-RVWYURXG.mjs} +2 -2
- package/dist/esm/{chunk-U5C2PXC6.mjs → chunk-RYD6HRW7.mjs} +2 -2
- package/dist/esm/chunk-S2VSJJRJ.mjs +2 -0
- package/dist/esm/chunk-S2VSJJRJ.mjs.map +1 -0
- package/dist/esm/{chunk-S4SEFF4K.mjs → chunk-S3EDNXZE.mjs} +46 -17
- package/dist/esm/chunk-S3EDNXZE.mjs.map +1 -0
- package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
- package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
- package/dist/esm/{chunk-SI7MPP6G.mjs → chunk-T2AGN5YT.mjs} +2 -2
- package/dist/esm/chunk-TGQARO3F.mjs +2 -0
- package/dist/esm/chunk-TGQARO3F.mjs.map +1 -0
- package/dist/esm/chunk-TM7NDDT3.mjs +2 -0
- package/dist/esm/chunk-TM7NDDT3.mjs.map +1 -0
- package/dist/esm/{chunk-HSFG2AIK.mjs → chunk-TT2XR5ZI.mjs} +2 -2
- package/dist/esm/{chunk-3VGX3TXH.mjs → chunk-U3YYSIIT.mjs} +2 -2
- package/dist/esm/chunk-UGPALAPN.mjs +2 -0
- package/dist/esm/{chunk-7SIQDOYY.mjs → chunk-UKSRF2Q3.mjs} +2 -2
- package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
- package/dist/esm/{chunk-TICM455H.mjs → chunk-UPSCPEEE.mjs} +2 -2
- package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
- package/dist/esm/chunk-WXWWYH73.mjs +2 -0
- package/dist/esm/chunk-WXWWYH73.mjs.map +1 -0
- package/dist/esm/{chunk-O3PLAAN7.mjs → chunk-XBHFMNYB.mjs} +2 -2
- package/dist/esm/{chunk-GNNNICLW.mjs → chunk-XD46HTI2.mjs} +2 -2
- package/dist/esm/{chunk-6WIB3GGF.mjs → chunk-XFSDV3ND.mjs} +2 -2
- package/dist/esm/chunk-YMB2XW2O.mjs +2 -0
- package/dist/esm/{chunk-YNNPWCF6.mjs.map → chunk-YMB2XW2O.mjs.map} +1 -1
- package/dist/esm/{chunk-ZPMS2Q37.mjs → chunk-ZBXOX3S7.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +1 -2
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +1 -3
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.d.mts +1 -5
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -4
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -4
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +9 -14
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +2 -2
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +2 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +2 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +2 -8
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +31 -0
- package/dist/esm/internal/table.mjs +2 -0
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +1 -1
- package/dist/esm/types/generated/operations.d.mts +31 -2
- package/dist/esm/types/generated/queries.d.mts +6 -2
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +212 -7
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +4 -20
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +4 -2
- package/dist/esm/utils/apiEndpoints.d.mts +1 -3
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +1 -3
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +3 -11
- package/src/account/MultiKeyAccount.ts +0 -10
- package/src/account/index.ts +0 -2
- package/src/api/aptos.ts +5 -5
- package/src/api/aptosConfig.ts +1 -46
- package/src/api/general.ts +0 -26
- package/src/api/table.ts +108 -0
- package/src/bcs/deserializer.ts +0 -40
- package/src/bcs/serializer.ts +0 -18
- package/src/cli/move.ts +1 -1
- package/src/client/core.ts +0 -8
- package/src/client/get.ts +0 -6
- package/src/client/post.ts +0 -12
- package/src/client/types.ts +1 -1
- package/src/core/crypto/index.ts +0 -2
- package/src/core/crypto/singleKey.ts +0 -11
- package/src/internal/account.ts +2 -1
- package/src/internal/general.ts +1 -20
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
- package/src/internal/queries/getTableItemsData.graphql +15 -0
- package/src/internal/queries/getTableItemsMetadata.graphql +12 -0
- package/src/internal/table.ts +82 -0
- package/src/internal/transactionSubmission.ts +7 -20
- package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -16
- package/src/types/generated/operations.ts +29 -0
- package/src/types/generated/queries.ts +59 -0
- package/src/types/generated/types.ts +223 -4
- package/src/types/index.ts +0 -22
- package/src/types/indexer.ts +4 -0
- package/src/utils/apiEndpoints.ts +0 -14
- package/src/utils/const.ts +0 -2
- package/src/version.ts +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +0 -80
- package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
- package/dist/esm/account/KeylessAccount.d.mts +0 -145
- package/dist/esm/account/KeylessAccount.mjs +0 -2
- package/dist/esm/api/keyless.d.mts +0 -81
- package/dist/esm/api/keyless.mjs +0 -2
- package/dist/esm/chunk-25H3DXTL.mjs +0 -2
- package/dist/esm/chunk-25H3DXTL.mjs.map +0 -1
- package/dist/esm/chunk-2ECWQRBB.mjs +0 -2
- package/dist/esm/chunk-2HD2G4AH.mjs +0 -2
- package/dist/esm/chunk-2HD2G4AH.mjs.map +0 -1
- package/dist/esm/chunk-3COVJN6Z.mjs +0 -2
- package/dist/esm/chunk-3COVJN6Z.mjs.map +0 -1
- package/dist/esm/chunk-3FVRXELT.mjs +0 -2
- package/dist/esm/chunk-3S3GIUQY.mjs +0 -2
- package/dist/esm/chunk-5XOFEQWC.mjs +0 -2
- package/dist/esm/chunk-6RBUXB5I.mjs +0 -2
- package/dist/esm/chunk-75J7H3XD.mjs +0 -2
- package/dist/esm/chunk-75J7H3XD.mjs.map +0 -1
- package/dist/esm/chunk-7KOC7VNK.mjs +0 -2
- package/dist/esm/chunk-7KOC7VNK.mjs.map +0 -1
- package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
- package/dist/esm/chunk-AJ7UC2G3.mjs +0 -2
- package/dist/esm/chunk-AJ7UC2G3.mjs.map +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
- package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
- package/dist/esm/chunk-C3L4ETUF.mjs +0 -2
- package/dist/esm/chunk-CO53EOHE.mjs +0 -2
- package/dist/esm/chunk-CO53EOHE.mjs.map +0 -1
- package/dist/esm/chunk-COW5IGYC.mjs +0 -2
- package/dist/esm/chunk-FBPNHF54.mjs +0 -2
- package/dist/esm/chunk-FLYEALDB.mjs +0 -2
- package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
- package/dist/esm/chunk-H62IKYXG.mjs +0 -2
- package/dist/esm/chunk-HYDDIAJ6.mjs +0 -2
- package/dist/esm/chunk-JM2B5E2I.mjs +0 -2
- package/dist/esm/chunk-JM2B5E2I.mjs.map +0 -1
- package/dist/esm/chunk-JM544NRW.mjs +0 -2
- package/dist/esm/chunk-JM544NRW.mjs.map +0 -1
- package/dist/esm/chunk-MGOHPDX4.mjs +0 -2
- package/dist/esm/chunk-MOKAU77C.mjs +0 -2
- package/dist/esm/chunk-MOKAU77C.mjs.map +0 -1
- package/dist/esm/chunk-MWUJCP27.mjs +0 -2
- package/dist/esm/chunk-N466X3S6.mjs +0 -2
- package/dist/esm/chunk-N466X3S6.mjs.map +0 -1
- package/dist/esm/chunk-NBEXLW7P.mjs +0 -2
- package/dist/esm/chunk-PGCBIU33.mjs +0 -2
- package/dist/esm/chunk-PGCBIU33.mjs.map +0 -1
- package/dist/esm/chunk-PYUWGGAW.mjs +0 -2
- package/dist/esm/chunk-PYUWGGAW.mjs.map +0 -1
- package/dist/esm/chunk-RKTM5GBP.mjs +0 -2
- package/dist/esm/chunk-RKTM5GBP.mjs.map +0 -1
- package/dist/esm/chunk-S4SEFF4K.mjs.map +0 -1
- package/dist/esm/chunk-STYDBDYL.mjs +0 -2
- package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
- package/dist/esm/chunk-UTXJOB3O.mjs +0 -2
- package/dist/esm/chunk-VL6EYA53.mjs +0 -2
- package/dist/esm/chunk-VL6EYA53.mjs.map +0 -1
- package/dist/esm/chunk-VPKPQBKL.mjs +0 -2
- package/dist/esm/chunk-VPKPQBKL.mjs.map +0 -1
- package/dist/esm/chunk-VSD2AWUR.mjs +0 -2
- package/dist/esm/chunk-VSD2AWUR.mjs.map +0 -1
- package/dist/esm/chunk-VT6XJSRO.mjs +0 -2
- package/dist/esm/chunk-VT6XJSRO.mjs.map +0 -1
- package/dist/esm/chunk-WM2NCYZL.mjs +0 -2
- package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
- package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
- package/dist/esm/chunk-YGOJYDJA.mjs +0 -2
- package/dist/esm/chunk-YGOJYDJA.mjs.map +0 -1
- package/dist/esm/chunk-YNNPWCF6.mjs +0 -2
- package/dist/esm/chunk-YV7OBLK2.mjs +0 -2
- package/dist/esm/chunk-YV7OBLK2.mjs.map +0 -1
- package/dist/esm/chunk-ZKRG4C4U.mjs +0 -2
- package/dist/esm/chunk-ZKRG4C4U.mjs.map +0 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +0 -73
- package/dist/esm/core/crypto/ephemeral.mjs +0 -2
- package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
- package/dist/esm/core/crypto/keyless.d.mts +0 -232
- package/dist/esm/core/crypto/keyless.mjs +0 -2
- package/dist/esm/core/crypto/keyless.mjs.map +0 -1
- package/dist/esm/core/crypto/poseidon.d.mts +0 -7
- package/dist/esm/core/crypto/poseidon.mjs +0 -2
- package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
- package/dist/esm/core/crypto/proof.d.mts +0 -21
- package/dist/esm/core/crypto/proof.mjs +0 -2
- package/dist/esm/core/crypto/proof.mjs.map +0 -1
- package/dist/esm/internal/keyless.d.mts +0 -68
- package/dist/esm/internal/keyless.mjs +0 -2
- package/dist/esm/internal/keyless.mjs.map +0 -1
- package/dist/esm/types/keyless.d.mts +0 -69
- package/dist/esm/types/keyless.mjs +0 -2
- package/dist/esm/types/keyless.mjs.map +0 -1
- package/src/account/EphemeralKeyPair.ts +0 -161
- package/src/account/KeylessAccount.ts +0 -341
- package/src/api/keyless.ts +0 -48
- package/src/core/crypto/ephemeral.ts +0 -138
- package/src/core/crypto/keyless.ts +0 -453
- package/src/core/crypto/poseidon.ts +0 -134
- package/src/core/crypto/proof.ts +0 -16
- package/src/internal/keyless.ts +0 -119
- package/src/types/keyless.ts +0 -37
- /package/dist/esm/{account/EphemeralKeyPair.mjs.map → api/table.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CUVYW32.mjs.map → chunk-2X7A4HUS.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y4SSUCPJ.mjs.map → chunk-2YZSEM2G.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
- /package/dist/esm/{chunk-SLI3KELH.mjs.map → chunk-477G7LHJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
- /package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
- /package/dist/esm/{chunk-P7JMD7KZ.mjs.map → chunk-5VIESFOC.mjs.map} +0 -0
- /package/dist/esm/{chunk-TE3WIJ26.mjs.map → chunk-5YLAWRI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CMS2KOX.mjs.map → chunk-6JLYD5Q2.mjs.map} +0 -0
- /package/dist/esm/{chunk-HMFL7AOJ.mjs.map → chunk-6XWDDCQD.mjs.map} +0 -0
- /package/dist/esm/{chunk-CS7B3FVO.mjs.map → chunk-7NEETXEA.mjs.map} +0 -0
- /package/dist/esm/{chunk-H62IKYXG.mjs.map → chunk-7VRZLDIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-24ZOKI52.mjs.map → chunk-ACG4ZGRQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-3S3GIUQY.mjs.map → chunk-AQAH67IV.mjs.map} +0 -0
- /package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
- /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
- /package/dist/esm/{chunk-HYU23YVP.mjs.map → chunk-BHLICYAI.mjs.map} +0 -0
- /package/dist/esm/{chunk-2ECWQRBB.mjs.map → chunk-BO2TLWNT.mjs.map} +0 -0
- /package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
- /package/dist/esm/{chunk-WWGROAKX.mjs.map → chunk-CWUH4PNH.mjs.map} +0 -0
- /package/dist/esm/{chunk-DD2VWOMZ.mjs.map → chunk-E2NVC2VR.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
- /package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-7IMWGGA6.mjs.map → chunk-GIAABV7R.mjs.map} +0 -0
- /package/dist/esm/{chunk-KMKSA7LM.mjs.map → chunk-GKJ2NJG5.mjs.map} +0 -0
- /package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-GQ6HIKZT.mjs.map → chunk-HMARHACL.mjs.map} +0 -0
- /package/dist/esm/{chunk-5XOFEQWC.mjs.map → chunk-HNEAPYNI.mjs.map} +0 -0
- /package/dist/esm/{chunk-P2WALKSW.mjs.map → chunk-HSJTQLI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-23MNZ5LZ.mjs.map → chunk-IZQV2SU6.mjs.map} +0 -0
- /package/dist/esm/{chunk-XZGQMZ2H.mjs.map → chunk-JFIAWBCK.mjs.map} +0 -0
- /package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
- /package/dist/esm/{chunk-HHVAU5HU.mjs.map → chunk-MCRRHBFQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-PFFAQZHT.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
- /package/dist/esm/{chunk-7XYECSW6.mjs.map → chunk-MQI2IE6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-L5WUYZ35.mjs.map → chunk-NZETF6Z4.mjs.map} +0 -0
- /package/dist/esm/{chunk-CB6CNNM2.mjs.map → chunk-P6GWG2CY.mjs.map} +0 -0
- /package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLWKIYHV.mjs.map → chunk-PIVZMT5D.mjs.map} +0 -0
- /package/dist/esm/{chunk-R52BRP36.mjs.map → chunk-PLXGSUZA.mjs.map} +0 -0
- /package/dist/esm/{chunk-AHNE2QA3.mjs.map → chunk-PPO4IXE4.mjs.map} +0 -0
- /package/dist/esm/{chunk-PMPTAPM3.mjs.map → chunk-QIHR7HD6.mjs.map} +0 -0
- /package/dist/esm/{chunk-BTLFW3YY.mjs.map → chunk-QQ5PHEJF.mjs.map} +0 -0
- /package/dist/esm/{chunk-UTXJOB3O.mjs.map → chunk-ROXFCLDT.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y33CIIZX.mjs.map → chunk-RVWYURXG.mjs.map} +0 -0
- /package/dist/esm/{chunk-U5C2PXC6.mjs.map → chunk-RYD6HRW7.mjs.map} +0 -0
- /package/dist/esm/{chunk-SI7MPP6G.mjs.map → chunk-T2AGN5YT.mjs.map} +0 -0
- /package/dist/esm/{chunk-HSFG2AIK.mjs.map → chunk-TT2XR5ZI.mjs.map} +0 -0
- /package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
- /package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-7SIQDOYY.mjs.map → chunk-UKSRF2Q3.mjs.map} +0 -0
- /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-UO3NZ5AH.mjs.map} +0 -0
- /package/dist/esm/{chunk-TICM455H.mjs.map → chunk-UPSCPEEE.mjs.map} +0 -0
- /package/dist/esm/{api/keyless.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
- /package/dist/esm/{chunk-O3PLAAN7.mjs.map → chunk-XBHFMNYB.mjs.map} +0 -0
- /package/dist/esm/{chunk-GNNNICLW.mjs.map → chunk-XD46HTI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-6WIB3GGF.mjs.map → chunk-XFSDV3ND.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZPMS2Q37.mjs.map → chunk-ZBXOX3S7.mjs.map} +0 -0
- /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → internal/table.mjs.map} +0 -0
- /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
declare const NetworkToIndexerAPI: Record<string, string>;
|
|
2
2
|
declare const NetworkToNodeAPI: Record<string, string>;
|
|
3
3
|
declare const NetworkToFaucetAPI: Record<string, string>;
|
|
4
|
-
declare const NetworkToPepperAPI: Record<string, string>;
|
|
5
|
-
declare const NetworkToProverAPI: Record<string, string>;
|
|
6
4
|
declare enum Network {
|
|
7
5
|
MAINNET = "mainnet",
|
|
8
6
|
TESTNET = "testnet",
|
|
@@ -294,6 +292,23 @@ type GetProcessorStatusQuery = {
|
|
|
294
292
|
last_updated: any;
|
|
295
293
|
}>;
|
|
296
294
|
};
|
|
295
|
+
type GetTableItemsDataQuery = {
|
|
296
|
+
table_items: Array<{
|
|
297
|
+
decoded_key: any;
|
|
298
|
+
decoded_value?: any | null;
|
|
299
|
+
key: string;
|
|
300
|
+
table_handle: string;
|
|
301
|
+
transaction_version: any;
|
|
302
|
+
write_set_change_index: any;
|
|
303
|
+
}>;
|
|
304
|
+
};
|
|
305
|
+
type GetTableItemsMetadataQuery = {
|
|
306
|
+
table_metadatas: Array<{
|
|
307
|
+
handle: string;
|
|
308
|
+
key_type: string;
|
|
309
|
+
value_type: string;
|
|
310
|
+
}>;
|
|
311
|
+
};
|
|
297
312
|
type GetTokenActivityQuery = {
|
|
298
313
|
token_activities_v2: Array<{
|
|
299
314
|
after_value?: string | null;
|
|
@@ -434,6 +449,8 @@ type GetCurrentFungibleAssetBalancesResponse = GetCurrentFungibleAssetBalancesQu
|
|
|
434
449
|
type GetTokenActivityResponse = GetTokenActivityQuery["token_activities_v2"];
|
|
435
450
|
type GetCurrentTokenOwnershipResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"][0];
|
|
436
451
|
type GetOwnedTokensResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"];
|
|
452
|
+
type GetTableItemsDataResponse = GetTableItemsDataQuery["table_items"];
|
|
453
|
+
type GetTableItemsMetadataResponse = GetTableItemsMetadataQuery["table_metadatas"];
|
|
437
454
|
type GetANSNameResponse = GetNamesQuery["current_aptos_names"];
|
|
438
455
|
/**
|
|
439
456
|
* A generic type that being passed by each function and holds an
|
|
@@ -548,25 +565,11 @@ declare enum AccountAuthenticatorVariant {
|
|
|
548
565
|
}
|
|
549
566
|
declare enum AnyPublicKeyVariant {
|
|
550
567
|
Ed25519 = 0,
|
|
551
|
-
Secp256k1 = 1
|
|
552
|
-
Keyless = 3
|
|
568
|
+
Secp256k1 = 1
|
|
553
569
|
}
|
|
554
570
|
declare enum AnySignatureVariant {
|
|
555
571
|
Ed25519 = 0,
|
|
556
|
-
Secp256k1 = 1
|
|
557
|
-
Keyless = 3
|
|
558
|
-
}
|
|
559
|
-
declare enum EphemeralPublicKeyVariant {
|
|
560
|
-
Ed25519 = 0
|
|
561
|
-
}
|
|
562
|
-
declare enum EphemeralSignatureVariant {
|
|
563
|
-
Ed25519 = 0
|
|
564
|
-
}
|
|
565
|
-
declare enum EphemeralCertificateVariant {
|
|
566
|
-
ZkProof = 0
|
|
567
|
-
}
|
|
568
|
-
declare enum ZkpVariant {
|
|
569
|
-
Groth16 = 0
|
|
572
|
+
Secp256k1 = 1
|
|
570
573
|
}
|
|
571
574
|
/**
|
|
572
575
|
* BCS types
|
|
@@ -588,8 +591,6 @@ type AptosSettings = {
|
|
|
588
591
|
readonly fullnode?: string;
|
|
589
592
|
readonly faucet?: string;
|
|
590
593
|
readonly indexer?: string;
|
|
591
|
-
readonly pepper?: string;
|
|
592
|
-
readonly prover?: string;
|
|
593
594
|
readonly clientConfig?: ClientConfig;
|
|
594
595
|
readonly client?: Client;
|
|
595
596
|
readonly fullnodeConfig?: FullNodeConfig;
|
|
@@ -1430,32 +1431,6 @@ declare class Deserializer {
|
|
|
1430
1431
|
* ```
|
|
1431
1432
|
*/
|
|
1432
1433
|
deserializeStr(): string;
|
|
1433
|
-
/**
|
|
1434
|
-
* Deserializes a an optional string.
|
|
1435
|
-
*
|
|
1436
|
-
* BCS layout for Optional<String>: 0 if none, else 1 | string_length | string_content
|
|
1437
|
-
* @example
|
|
1438
|
-
* ```ts
|
|
1439
|
-
* const deserializer = new Deserializer(new Uint8Array([0x00]));
|
|
1440
|
-
* assert(deserializer.deserializeOptionStr() === undefined);
|
|
1441
|
-
* const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));
|
|
1442
|
-
* assert(deserializer.deserializeOptionStr() === "1234abcd");
|
|
1443
|
-
* ```
|
|
1444
|
-
*/
|
|
1445
|
-
deserializeOptionStr(): string | undefined;
|
|
1446
|
-
/**
|
|
1447
|
-
* Deserializes a an optional string.
|
|
1448
|
-
*
|
|
1449
|
-
* BCS layout for Optional<String>: 0 if none, else 1 | string_length | string_content
|
|
1450
|
-
* @example
|
|
1451
|
-
* ```ts
|
|
1452
|
-
* const deserializer = new Deserializer(new Uint8Array([0x00]));
|
|
1453
|
-
* assert(deserializer.deserializeOptionStr() === undefined);
|
|
1454
|
-
* const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));
|
|
1455
|
-
* assert(deserializer.deserializeOptionStr() === "1234abcd");
|
|
1456
|
-
* ```
|
|
1457
|
-
*/
|
|
1458
|
-
deserializeOption<T>(cls: Deserializable<T>): T | undefined;
|
|
1459
1434
|
/**
|
|
1460
1435
|
* Deserializes an array of bytes.
|
|
1461
1436
|
*
|
|
@@ -1877,8 +1852,6 @@ declare class Serializer {
|
|
|
1877
1852
|
* // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
|
|
1878
1853
|
*/
|
|
1879
1854
|
serializeVector<T extends Serializable>(values: Array<T>): void;
|
|
1880
|
-
serializeOption<T extends Serializable>(value?: T): void;
|
|
1881
|
-
serializeOptionStr(value?: string): void;
|
|
1882
1855
|
}
|
|
1883
1856
|
declare function ensureBoolean(value: unknown): asserts value is boolean;
|
|
1884
1857
|
declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
|
|
@@ -2146,4 +2119,4 @@ declare class AccountAddress extends Serializable implements TransactionArgument
|
|
|
2146
2119
|
equals(other: AccountAddress): boolean;
|
|
2147
2120
|
}
|
|
2148
2121
|
|
|
2149
|
-
export { type
|
|
2122
|
+
export { type GetFungibleAssetMetadataResponse as $, type AnyNumber as A, type GetAccountOwnedObjectsResponse as B, type Client as C, Deserializer as D, type EntryFunctionArgument as E, type FullNodeConfig as F, type GetAccountOwnedTokensQueryResponse as G, type HexInput as H, type IndexerConfig as I, type GetCollectionDataResponse as J, type GetTokenDataResponse as K, type LedgerVersionArg as L, type MoveModuleId as M, Network as N, type OrderByArg as O, type PaginationArgs as P, type GetCurrentTokenOwnershipResponse as Q, type GetOwnedTokensResponse as R, Serializable as S, type TransactionArgument as T, type Uint8 as U, type GetTokenActivityResponse as V, type WhereArg as W, type GetEventsResponse as X, type WaitForTransactionOptions as Y, type UserTransactionResponse as Z, type MoveFunction as _, Serializer as a, type GenesisPayload as a$, type GetFungibleAssetActivitiesResponse as a0, type GetCurrentFungibleAssetBalancesResponse as a1, type LedgerInfo as a2, type Block as a3, type MoveValue as a4, type GetChainTopUserTransactionsResponse as a5, type GraphqlQuery as a6, type GetProcessorStatusResponse as a7, type GetANSNameResponse as a8, type GetNumberOfDelegatorsResponse as a9, type Uint128 as aA, type Uint256 as aB, type ClientHeadersType as aC, TransactionResponseType as aD, isPendingTransactionResponse as aE, isUserTransactionResponse as aF, isGenesisTransactionResponse as aG, isBlockMetadataTransactionResponse as aH, isStateCheckpointTransactionResponse as aI, isValidatorTransactionResponse as aJ, type GenesisTransactionResponse as aK, type BlockMetadataTransactionResponse as aL, type StateCheckpointTransactionResponse as aM, type ValidatorTransactionResponse as aN, type WriteSetChange as aO, type WriteSetChangeDeleteModule as aP, type WriteSetChangeDeleteResource as aQ, type WriteSetChangeDeleteTableItem as aR, type WriteSetChangeWriteModule as aS, type WriteSetChangeWriteResource as aT, type WriteSetChangeWriteTableItem as aU, type DecodedTableData as aV, type DeletedTableData as aW, type TransactionPayloadResponse as aX, type EntryFunctionPayloadResponse as aY, type ScriptPayloadResponse as aZ, type MultisigPayloadResponse as a_, type GetDelegatedStakingActivitiesResponse as aa, type PendingTransactionResponse as ab, type CommittedTransactionResponse as ac, type GasEstimation as ad, type TableItemRequest as ae, type GetTableItemsDataResponse as af, type GetTableItemsMetadataResponse as ag, type AptosRequest as ah, type ClientRequest as ai, type ClientResponse as aj, MimeType as ak, ensureBoolean as al, outOfRangeErrorMessage as am, validateNumberInRange as an, AddressInvalidReason as ao, ParsingError as ap, type ParsingResult as aq, HexInvalidReason as ar, TypeTagVariants as as, ScriptTransactionArgumentVariants as at, TransactionPayloadVariants as au, TransactionVariants as av, TransactionAuthenticatorVariant as aw, AccountAuthenticatorVariant as ax, AnySignatureVariant as ay, type Uint64 as az, type Uint16 as b, type MoveScriptBytecode as b0, type TransactionSignature as b1, isEd25519Signature as b2, isSecp256k1Signature as b3, isMultiAgentSignature as b4, isFeePayerSignature as b5, isMultiEd25519Signature as b6, type TransactionEd25519Signature as b7, type TransactionSecp256k1Signature as b8, type TransactionMultiEd25519Signature as b9, type GenerateAccountWithEd25519 as bA, type GenerateAccountWithSingleSignerSecp256k1Key as bB, type GenerateAccount as bC, type OrderBy as bD, type OrderByValue as bE, type TokenStandard as bF, NetworkToIndexerAPI as bG, NetworkToNodeAPI as bH, NetworkToFaucetAPI as bI, NetworkToChainId as bJ, NetworkToNetworkName as bK, type TransactionMultiAgentSignature as ba, type TransactionFeePayerSignature as bb, type AccountSignature as bc, type WriteSet as bd, type ScriptWriteSet as be, type DirectWriteSet as bf, type EventGuid as bg, type Event as bh, type MoveUint8Type as bi, type MoveUint16Type as bj, type MoveUint32Type as bk, type MoveUint64Type as bl, type MoveUint128Type as bm, type MoveUint256Type as bn, type MoveAddressType as bo, type MoveObjectType as bp, type MoveOptionType as bq, type MoveStructType as br, type MoveType as bs, MoveFunctionVisibility as bt, MoveAbility as bu, type MoveStructField as bv, type MoveModule as bw, type MoveStruct as bx, RoleType as by, DeriveScheme as bz, type Uint32 as c, type Deserializable as d, Hex as e, type AuthenticationKeyScheme as f, AccountAddress as g, AnyPublicKeyVariant as h, type ClientConfig as i, type FaucetConfig as j, type AptosSettings as k, type ScriptFunctionArgument as l, type MoveFunctionId as m, type AccountAddressInput as n, type MoveFunctionGenericTypeParam as o, SigningSchemeInput as p, SigningScheme as q, type AccountData as r, type MoveModuleBytecode as s, type TransactionResponse as t, type MoveResource as u, type MoveStructId as v, type TokenStandardArg as w, type GetAccountOwnedTokensFromCollectionResponse as x, type GetAccountCollectionsWithOwnedTokenResponse as y, type GetAccountCoinsDataResponse as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcessWithoutNullStreams } from 'child_process';
|
|
2
|
-
import { N as Network, g as AccountAddress } from '../accountAddress-
|
|
2
|
+
import { N as Network, g as AccountAddress } from '../accountAddress-ccLvlUQe.js';
|
|
3
3
|
|
|
4
4
|
declare class LocalNode {
|
|
5
5
|
readonly MAXIMUM_WAIT_TIME_SEC = 75;
|
package/dist/common/cli/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkKSEUZTKYjs = require('../chunk-KSEUZTKY.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}stop(){_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid)}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s=_child_process.spawn.call(void 0, "npx",["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"]);this.process=s,_optionalChain([s, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",r=>{let o=r.toString();console.log(o)})]),_optionalChain([s, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",r=>{let o=r.toString();console.log(o)})])}async waitUntilProcessIsUp(){let e=await this.checkIfProcessIsUp(),t=Date.now()/1e3,s=t;for(;!e&&t+this.MAXIMUM_WAIT_TIME_SEC>s;)await _chunkKSEUZTKYjs.b.call(void 0, 1e3),e=await this.checkIfProcessIsUp(),s=Date.now()/1e3;if(!e)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var d=class{async init(e){let{network:t,profile:s}=e,r=["aptos","init",`--network=${_nullishCoalesce(t, () => ("local"))}`,`--profile=${_nullishCoalesce(s, () => ("default"))}`];return this.runCommand(r)}async compile(e){let{packageDirectoryPath:t,namedAddresses:s}=e,r=["aptos","move","compile","--package-dir",t,"--skip-fetch-latest-git-deps"],o=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(o)),this.runCommand(r)}async test(e){let{packageDirectoryPath:t,namedAddresses:s}=e,r=["aptos","move","test","--package-dir",t,"--skip-fetch-latest-git-deps"],o=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(o)),this.runCommand(r)}async publish(e){let{packageDirectoryPath:t,namedAddresses:s,profile:r}=e,o=["aptos","move","publish","--package-dir",t,"--skip-fetch-latest-git-deps",`--profile=${_nullishCoalesce(r, () => ("default"))}`],a=this.parseNamedAddresses(s);return o.push(...this.prepareNamedAddresses(a)),this.runCommand(o)}async runCommand(e){return new Promise((t,s)=>{let r=_child_process.spawn.call(void 0, "npx",e);r.stdout.pipe(process.stdout),r.stderr.pipe(process.stderr),process.stdin.pipe(r.stdin),r.on("close",o=>{o===0?t(!0):s(new Error(`Child process exited with code ${o}`))})})}prepareNamedAddresses(e){let t=e.size,s=[];if(t===0)return s;s.push("--named-addresses");let r=0;return e.forEach((o,a)=>{r+=1;let n=`${a}=${o.toString()}`;r<t-1&&(n+=","),s.push(n)}),s}parseNamedAddresses(e){let t=new Map;return Object.keys(e).forEach(s=>{let r=e[s];t.set(s,r)}),t}};exports.LocalNode = c; exports.Move = d;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkKSEUZTKYjs = require('../chunk-KSEUZTKY.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}stop(){_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid)}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s=_child_process.spawn.call(void 0, "npx",["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"]);this.process=s,_optionalChain([s, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",r=>{let o=r.toString();console.log(o)})]),_optionalChain([s, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",r=>{let o=r.toString();console.log(o)})])}async waitUntilProcessIsUp(){let e=await this.checkIfProcessIsUp(),t=Date.now()/1e3,s=t;for(;!e&&t+this.MAXIMUM_WAIT_TIME_SEC>s;)await _chunkKSEUZTKYjs.b.call(void 0, 1e3),e=await this.checkIfProcessIsUp(),s=Date.now()/1e3;if(!e)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var d=class{async init(e){let{network:t,profile:s}=e,r=["aptos","init",`--network=${_nullishCoalesce(t, () => ("local"))}`,`--profile=${_nullishCoalesce(s, () => ("default"))}`];return this.runCommand(r)}async compile(e){let{packageDirectoryPath:t,namedAddresses:s}=e,r=["aptos","move","compile","--package-dir",t,"--skip-fetch-latest-git-deps"],o=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(o)),this.runCommand(r)}async test(e){let{packageDirectoryPath:t,namedAddresses:s}=e,r=["aptos","move","test","--package-dir",t,"--skip-fetch-latest-git-deps"],o=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(o)),this.runCommand(r)}async publish(e){let{packageDirectoryPath:t,namedAddresses:s,profile:r}=e,o=["aptos","move","publish","--package-dir",t,"--skip-fetch-latest-git-deps",`--profile=${_nullishCoalesce(r, () => ("default"))}`],a=this.parseNamedAddresses(s);return o.push(...this.prepareNamedAddresses(a)),this.runCommand(o)}async runCommand(e){return new Promise((t,s)=>{let r=_child_process.spawn.call(void 0, "npx",e,{shell:!0});r.stdout.pipe(process.stdout),r.stderr.pipe(process.stderr),process.stdin.pipe(r.stdin),r.on("close",o=>{o===0?t(!0):s(new Error(`Child process exited with code ${o}`))})})}prepareNamedAddresses(e){let t=e.size,s=[];if(t===0)return s;s.push("--named-addresses");let r=0;return e.forEach((o,a)=>{r+=1;let n=`${a}=${o.toString()}`;r<t-1&&(n+=","),s.push(n)}),s}parseNamedAddresses(e){let t=new Map;return Object.keys(e).forEach(s=>{let r=e[s];t.set(s,r)}),t}};exports.LocalNode = c; exports.Move = d;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","LocalNode","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","cliArgs","packageDirectoryPath","namedAddresses","addressesMap","resolve","reject","code","totalNames","newArgs","idx","value","key","toAppend","address"],"mappings":"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","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n stop() {\n if (!this.process?.pid) return;\n kill(this.process.pid);\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-local-testnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const childProcess = spawn(cliCommand, cliArgs);\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Netowrk type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns\n */\n async init(args: { network?: Network; profile?: string }): Promise<boolean> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publishe the modules in a Move package to the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--skip-fetch-latest-git-deps\",\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const childProcess = spawn(\"npx\", args);\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve(true); // Resolve with true if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n let idx = 0;\n namedAddresses.forEach((value, key) => {\n idx += 1;\n let toAppend = `${key}=${value.toString()}`;\n if (idx < totalNames - 1) {\n toAppend += \",\";\n }\n newArgs.push(toAppend);\n });\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map\n *\n * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","LocalNode","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","cliArgs","packageDirectoryPath","namedAddresses","addressesMap","resolve","reject","code","totalNames","newArgs","idx","value","key","toAppend","address"],"mappings":"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","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n stop() {\n if (!this.process?.pid) return;\n kill(this.process.pid);\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-local-testnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const childProcess = spawn(cliCommand, cliArgs);\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Netowrk type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns\n */\n async init(args: { network?: Network; profile?: string }): Promise<boolean> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publishe the modules in a Move package to the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--skip-fetch-latest-git-deps\",\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const childProcess = spawn(\"npx\", args, { shell: true });\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve(true); // Resolve with true if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n let idx = 0;\n namedAddresses.forEach((value, key) => {\n idx += 1;\n let toAppend = `${key}=${value.toString()}`;\n if (idx < totalNames - 1) {\n toAppend += \",\";\n }\n newArgs.push(toAppend);\n });\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map\n *\n * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n}\n"]}
|