@aptos-labs/ts-sdk 1.32.0 → 1.32.1
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/chunk-F43XVDYJ.js.map +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +7 -103
- package/dist/common/index.js +31 -31
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.d.mts +0 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +0 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +0 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +0 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +0 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +0 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +0 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +0 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +0 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +0 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +0 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +0 -2
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +0 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +2 -3
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +0 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +0 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +0 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +0 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +0 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +0 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +1 -2
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +0 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +0 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +0 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +0 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +0 -66
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +0 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +0 -1
- 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 +0 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +0 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +0 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +0 -1
- package/dist/esm/bcs/deserializer.d.mts +0 -1
- package/dist/esm/bcs/index.d.mts +0 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +0 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +0 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +0 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +0 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +0 -1
- package/dist/esm/{chunk-XKOSS5KC.mjs → chunk-26WX3UFP.mjs} +2 -2
- package/dist/esm/{chunk-HEHVWRMO.mjs → chunk-2E3BT4YW.mjs} +2 -2
- package/dist/esm/{chunk-JLD7DLKM.mjs → chunk-2LQ4FTSR.mjs} +2 -2
- package/dist/esm/{chunk-E2NYQVP3.mjs → chunk-2REHS35S.mjs} +2 -2
- package/dist/esm/{chunk-QQM47PHZ.mjs → chunk-2YTHKFJZ.mjs} +2 -2
- package/dist/esm/{chunk-IBMZYDAR.mjs → chunk-4IQZOAN7.mjs} +2 -2
- package/dist/esm/{chunk-VCY3JGZM.mjs → chunk-4J2JYRV3.mjs} +2 -2
- package/dist/esm/{chunk-5AKSORBJ.mjs → chunk-5KCKWL2C.mjs} +2 -2
- package/dist/esm/{chunk-WSFHH3BK.mjs → chunk-5O3RHPER.mjs} +2 -2
- package/dist/esm/{chunk-AAATWCJT.mjs → chunk-7OHMMGS6.mjs} +2 -2
- package/dist/esm/{chunk-L2QVUMBV.mjs → chunk-A3USS2NC.mjs} +2 -2
- package/dist/esm/{chunk-DP3YPGIK.mjs → chunk-AGEJNSEX.mjs} +2 -2
- package/dist/esm/{chunk-XT5T5LAP.mjs → chunk-BP45UJII.mjs} +2 -2
- package/dist/esm/{chunk-SU2WB34N.mjs → chunk-CEW2NI3K.mjs} +2 -2
- package/dist/esm/{chunk-6LLGRGCN.mjs → chunk-CPKG25HX.mjs} +2 -2
- package/dist/esm/{chunk-X3JPX7T6.mjs → chunk-D54FD6XE.mjs} +2 -2
- package/dist/esm/{chunk-YZ3YPLEU.mjs → chunk-DYELAVMR.mjs} +2 -2
- package/dist/esm/{chunk-2QBCTW67.mjs → chunk-E2GPZCQI.mjs} +2 -2
- package/dist/esm/{chunk-7WXDXBXK.mjs → chunk-EJKX6MGV.mjs} +2 -2
- package/dist/esm/{chunk-HXXELLHN.mjs → chunk-ERDYU5YQ.mjs} +2 -2
- package/dist/esm/{chunk-CA3Q2X6B.mjs → chunk-ETF76XA3.mjs} +2 -2
- package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
- package/dist/esm/{chunk-OKE3FXIP.mjs → chunk-FFCCBAEZ.mjs} +2 -2
- package/dist/esm/{chunk-K4TJRYGQ.mjs → chunk-FYYTCJS4.mjs} +2 -2
- package/dist/esm/{chunk-3XCYCFYI.mjs → chunk-GX4CYRK4.mjs} +2 -2
- package/dist/esm/{chunk-5NJWJXSS.mjs → chunk-GZBVXXUL.mjs} +2 -2
- package/dist/esm/{chunk-IDNDUJOK.mjs → chunk-H7AALSJ7.mjs} +2 -2
- package/dist/esm/{chunk-SBCLBDCP.mjs → chunk-HBWIDPNN.mjs} +2 -2
- package/dist/esm/{chunk-PW3ISXPN.mjs → chunk-HPZQGMSH.mjs} +2 -2
- package/dist/esm/{chunk-OJBMR5CT.mjs → chunk-I5GENJBA.mjs} +2 -2
- package/dist/esm/chunk-I5OYNCZS.mjs +1 -0
- package/dist/esm/{chunk-JJUINAQE.mjs → chunk-II26BNYA.mjs} +2 -2
- package/dist/esm/{chunk-YPBNYKOD.mjs → chunk-IQ4SCMB6.mjs} +2 -2
- package/dist/esm/{chunk-4YEOOZ2N.mjs → chunk-IUSAYAEI.mjs} +2 -2
- package/dist/esm/{chunk-J245N3XF.mjs → chunk-J7PJSK3J.mjs} +2 -2
- package/dist/esm/{chunk-J245N3XF.mjs.map → chunk-J7PJSK3J.mjs.map} +1 -1
- package/dist/esm/{chunk-6K4TOFCO.mjs → chunk-JGLEKXFP.mjs} +2 -2
- package/dist/esm/{chunk-DDVOBEJA.mjs → chunk-JIT2FYGE.mjs} +2 -2
- package/dist/esm/{chunk-46L6BAJG.mjs → chunk-JONEH52T.mjs} +2 -2
- package/dist/esm/{chunk-XUP6VABV.mjs → chunk-K62JTXWQ.mjs} +2 -2
- package/dist/esm/{chunk-6PJH53CK.mjs → chunk-KCEI5JYS.mjs} +2 -2
- package/dist/esm/{chunk-ZRWZIAF5.mjs → chunk-KM6IOJ6Y.mjs} +2 -2
- package/dist/esm/chunk-KTM6KVUJ.mjs +2 -0
- package/dist/esm/chunk-KTM6KVUJ.mjs.map +1 -0
- package/dist/esm/{chunk-AVPQOD67.mjs → chunk-KX43GEAB.mjs} +2 -2
- package/dist/esm/{chunk-DSKAMBBL.mjs → chunk-L25CRR2W.mjs} +2 -2
- package/dist/esm/{chunk-WKNX43KN.mjs → chunk-LGHPJTF3.mjs} +2 -2
- package/dist/esm/{chunk-ONFKJ57C.mjs → chunk-LHBMBCFC.mjs} +2 -2
- package/dist/esm/{chunk-37Y54PJ5.mjs → chunk-LYO22HMF.mjs} +2 -2
- package/dist/esm/{chunk-4DNCQM3S.mjs → chunk-MBEWPBGN.mjs} +2 -2
- package/dist/esm/{chunk-MOGPSSTD.mjs → chunk-ML7D2CVG.mjs} +2 -2
- package/dist/esm/{chunk-GBVRCWCD.mjs → chunk-NF7ZQQE3.mjs} +2 -2
- package/dist/esm/{chunk-YNT7JHMS.mjs → chunk-O4MRRWRI.mjs} +2 -2
- package/dist/esm/{chunk-BLLHTGAP.mjs → chunk-OVI7L7OG.mjs} +2 -2
- package/dist/esm/{chunk-LAAFLCDM.mjs → chunk-P2FTRAK3.mjs} +2 -2
- package/dist/esm/{chunk-TM7OZT3W.mjs → chunk-Q3CWUEXI.mjs} +2 -2
- package/dist/esm/{chunk-F2AIWA7L.mjs → chunk-RC43EXC4.mjs} +2 -2
- package/dist/esm/{chunk-NARS3JDH.mjs → chunk-RLH25IDA.mjs} +2 -2
- package/dist/esm/{chunk-HFWFDS6Y.mjs → chunk-RSO5YIDW.mjs} +2 -2
- package/dist/esm/chunk-RZGTHCJY.mjs +2 -0
- package/dist/esm/{chunk-AMCJQIOT.mjs.map → chunk-RZGTHCJY.mjs.map} +1 -1
- package/dist/esm/{chunk-KT3DT5GV.mjs → chunk-SPX2YFZN.mjs} +2 -2
- package/dist/esm/{chunk-AHWZA3GD.mjs → chunk-SY4HK6CC.mjs} +2 -2
- package/dist/esm/{chunk-II654QZU.mjs → chunk-TGW36YOD.mjs} +2 -2
- package/dist/esm/{chunk-FXUI3SSD.mjs → chunk-TQA6HY6A.mjs} +2 -2
- package/dist/esm/{chunk-KA5FX53Q.mjs → chunk-U3GE6IPF.mjs} +2 -2
- package/dist/esm/{chunk-JDNI5VIJ.mjs → chunk-UKVH4UGL.mjs} +2 -2
- package/dist/esm/{chunk-H457BI3I.mjs → chunk-UWLW2VLZ.mjs} +2 -2
- package/dist/esm/{chunk-2NHQQQZK.mjs → chunk-VGITSRT6.mjs} +2 -2
- package/dist/esm/{chunk-L2SDI7PI.mjs → chunk-VGJIATTB.mjs} +2 -2
- package/dist/esm/chunk-WYOFF5DJ.mjs +2 -0
- package/dist/esm/chunk-WYOFF5DJ.mjs.map +1 -0
- package/dist/esm/{chunk-NHKAQRJB.mjs → chunk-X7JNNNMC.mjs} +2 -2
- package/dist/esm/chunk-XIB6LX22.mjs +2 -0
- package/dist/esm/chunk-XIB6LX22.mjs.map +1 -0
- package/dist/esm/{chunk-KUL55M2H.mjs → chunk-YIQ3JFHW.mjs} +2 -2
- package/dist/esm/{chunk-WGIYSLH6.mjs → chunk-YP3VO6GM.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +0 -1
- package/dist/esm/cli/move.d.mts +0 -1
- package/dist/esm/client/core.d.mts +0 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +0 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +0 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +0 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +0 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +0 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +0 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +0 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +0 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +0 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +0 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +0 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +0 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +0 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +0 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +0 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +0 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +0 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +0 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +0 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +0 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +0 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.d.mts +0 -1
- package/dist/esm/core/hex.d.mts +0 -1
- package/dist/esm/core/index.d.mts +0 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +0 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.d.mts +3 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +0 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +0 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +0 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +0 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +0 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +0 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +0 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +0 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +0 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +0 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +0 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +0 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +0 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +0 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +0 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +0 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +0 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +0 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +2 -4
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +0 -1
- package/dist/esm/transactions/instances/identifier.d.mts +0 -1
- package/dist/esm/transactions/instances/index.d.mts +0 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +0 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +0 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +0 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +0 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +0 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +0 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +0 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +0 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -2
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -23
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +0 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +0 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +0 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +1 -10
- package/dist/esm/types/index.d.mts +0 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/types.d.mts +0 -1
- package/dist/esm/utils/const.d.mts +7 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +0 -1
- package/dist/esm/utils/index.d.mts +1 -2
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +0 -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 +1 -2
- package/src/api/transactionSubmission/build.ts +1 -82
- package/src/internal/keyless.ts +11 -1
- package/src/transactions/index.ts +0 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -55
- package/src/transactions/types.ts +0 -11
- package/src/types/index.ts +0 -1
- package/src/utils/const.ts +7 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-3DQVGPFE.mjs +0 -2
- package/dist/esm/chunk-3DQVGPFE.mjs.map +0 -1
- package/dist/esm/chunk-4PBXTMN3.mjs +0 -2
- package/dist/esm/chunk-4PBXTMN3.mjs.map +0 -1
- package/dist/esm/chunk-AMCJQIOT.mjs +0 -2
- package/dist/esm/chunk-EEB7EZFO.mjs +0 -2
- package/dist/esm/chunk-EEB7EZFO.mjs.map +0 -1
- package/dist/esm/chunk-G2GN4LH5.mjs +0 -2
- package/dist/esm/chunk-G2GN4LH5.mjs.map +0 -1
- package/dist/esm/chunk-L56DQ4N3.mjs +0 -2
- package/dist/esm/chunk-L56DQ4N3.mjs.map +0 -1
- package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
- package/dist/esm/transactions/script-composer/index.d.mts +0 -44
- package/dist/esm/transactions/script-composer/index.mjs +0 -2
- package/src/transactions/script-composer/index.ts +0 -76
- /package/dist/esm/{chunk-XKOSS5KC.mjs.map → chunk-26WX3UFP.mjs.map} +0 -0
- /package/dist/esm/{chunk-HEHVWRMO.mjs.map → chunk-2E3BT4YW.mjs.map} +0 -0
- /package/dist/esm/{chunk-JLD7DLKM.mjs.map → chunk-2LQ4FTSR.mjs.map} +0 -0
- /package/dist/esm/{chunk-E2NYQVP3.mjs.map → chunk-2REHS35S.mjs.map} +0 -0
- /package/dist/esm/{chunk-QQM47PHZ.mjs.map → chunk-2YTHKFJZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-IBMZYDAR.mjs.map → chunk-4IQZOAN7.mjs.map} +0 -0
- /package/dist/esm/{chunk-VCY3JGZM.mjs.map → chunk-4J2JYRV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-5AKSORBJ.mjs.map → chunk-5KCKWL2C.mjs.map} +0 -0
- /package/dist/esm/{chunk-WSFHH3BK.mjs.map → chunk-5O3RHPER.mjs.map} +0 -0
- /package/dist/esm/{chunk-AAATWCJT.mjs.map → chunk-7OHMMGS6.mjs.map} +0 -0
- /package/dist/esm/{chunk-L2QVUMBV.mjs.map → chunk-A3USS2NC.mjs.map} +0 -0
- /package/dist/esm/{chunk-DP3YPGIK.mjs.map → chunk-AGEJNSEX.mjs.map} +0 -0
- /package/dist/esm/{chunk-XT5T5LAP.mjs.map → chunk-BP45UJII.mjs.map} +0 -0
- /package/dist/esm/{chunk-SU2WB34N.mjs.map → chunk-CEW2NI3K.mjs.map} +0 -0
- /package/dist/esm/{chunk-6LLGRGCN.mjs.map → chunk-CPKG25HX.mjs.map} +0 -0
- /package/dist/esm/{chunk-X3JPX7T6.mjs.map → chunk-D54FD6XE.mjs.map} +0 -0
- /package/dist/esm/{chunk-YZ3YPLEU.mjs.map → chunk-DYELAVMR.mjs.map} +0 -0
- /package/dist/esm/{chunk-2QBCTW67.mjs.map → chunk-E2GPZCQI.mjs.map} +0 -0
- /package/dist/esm/{chunk-7WXDXBXK.mjs.map → chunk-EJKX6MGV.mjs.map} +0 -0
- /package/dist/esm/{chunk-HXXELLHN.mjs.map → chunk-ERDYU5YQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CA3Q2X6B.mjs.map → chunk-ETF76XA3.mjs.map} +0 -0
- /package/dist/esm/{chunk-UIRAXHDH.mjs.map → chunk-FD6FGKYY.mjs.map} +0 -0
- /package/dist/esm/{chunk-OKE3FXIP.mjs.map → chunk-FFCCBAEZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-K4TJRYGQ.mjs.map → chunk-FYYTCJS4.mjs.map} +0 -0
- /package/dist/esm/{chunk-3XCYCFYI.mjs.map → chunk-GX4CYRK4.mjs.map} +0 -0
- /package/dist/esm/{chunk-5NJWJXSS.mjs.map → chunk-GZBVXXUL.mjs.map} +0 -0
- /package/dist/esm/{chunk-IDNDUJOK.mjs.map → chunk-H7AALSJ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-SBCLBDCP.mjs.map → chunk-HBWIDPNN.mjs.map} +0 -0
- /package/dist/esm/{chunk-PW3ISXPN.mjs.map → chunk-HPZQGMSH.mjs.map} +0 -0
- /package/dist/esm/{chunk-OJBMR5CT.mjs.map → chunk-I5GENJBA.mjs.map} +0 -0
- /package/dist/esm/{transactions/script-composer/index.mjs.map → chunk-I5OYNCZS.mjs.map} +0 -0
- /package/dist/esm/{chunk-JJUINAQE.mjs.map → chunk-II26BNYA.mjs.map} +0 -0
- /package/dist/esm/{chunk-YPBNYKOD.mjs.map → chunk-IQ4SCMB6.mjs.map} +0 -0
- /package/dist/esm/{chunk-4YEOOZ2N.mjs.map → chunk-IUSAYAEI.mjs.map} +0 -0
- /package/dist/esm/{chunk-6K4TOFCO.mjs.map → chunk-JGLEKXFP.mjs.map} +0 -0
- /package/dist/esm/{chunk-DDVOBEJA.mjs.map → chunk-JIT2FYGE.mjs.map} +0 -0
- /package/dist/esm/{chunk-46L6BAJG.mjs.map → chunk-JONEH52T.mjs.map} +0 -0
- /package/dist/esm/{chunk-XUP6VABV.mjs.map → chunk-K62JTXWQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PJH53CK.mjs.map → chunk-KCEI5JYS.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZRWZIAF5.mjs.map → chunk-KM6IOJ6Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-AVPQOD67.mjs.map → chunk-KX43GEAB.mjs.map} +0 -0
- /package/dist/esm/{chunk-DSKAMBBL.mjs.map → chunk-L25CRR2W.mjs.map} +0 -0
- /package/dist/esm/{chunk-WKNX43KN.mjs.map → chunk-LGHPJTF3.mjs.map} +0 -0
- /package/dist/esm/{chunk-ONFKJ57C.mjs.map → chunk-LHBMBCFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-37Y54PJ5.mjs.map → chunk-LYO22HMF.mjs.map} +0 -0
- /package/dist/esm/{chunk-4DNCQM3S.mjs.map → chunk-MBEWPBGN.mjs.map} +0 -0
- /package/dist/esm/{chunk-MOGPSSTD.mjs.map → chunk-ML7D2CVG.mjs.map} +0 -0
- /package/dist/esm/{chunk-GBVRCWCD.mjs.map → chunk-NF7ZQQE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-YNT7JHMS.mjs.map → chunk-O4MRRWRI.mjs.map} +0 -0
- /package/dist/esm/{chunk-BLLHTGAP.mjs.map → chunk-OVI7L7OG.mjs.map} +0 -0
- /package/dist/esm/{chunk-LAAFLCDM.mjs.map → chunk-P2FTRAK3.mjs.map} +0 -0
- /package/dist/esm/{chunk-TM7OZT3W.mjs.map → chunk-Q3CWUEXI.mjs.map} +0 -0
- /package/dist/esm/{chunk-F2AIWA7L.mjs.map → chunk-RC43EXC4.mjs.map} +0 -0
- /package/dist/esm/{chunk-NARS3JDH.mjs.map → chunk-RLH25IDA.mjs.map} +0 -0
- /package/dist/esm/{chunk-HFWFDS6Y.mjs.map → chunk-RSO5YIDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-KT3DT5GV.mjs.map → chunk-SPX2YFZN.mjs.map} +0 -0
- /package/dist/esm/{chunk-AHWZA3GD.mjs.map → chunk-SY4HK6CC.mjs.map} +0 -0
- /package/dist/esm/{chunk-II654QZU.mjs.map → chunk-TGW36YOD.mjs.map} +0 -0
- /package/dist/esm/{chunk-FXUI3SSD.mjs.map → chunk-TQA6HY6A.mjs.map} +0 -0
- /package/dist/esm/{chunk-KA5FX53Q.mjs.map → chunk-U3GE6IPF.mjs.map} +0 -0
- /package/dist/esm/{chunk-JDNI5VIJ.mjs.map → chunk-UKVH4UGL.mjs.map} +0 -0
- /package/dist/esm/{chunk-H457BI3I.mjs.map → chunk-UWLW2VLZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-2NHQQQZK.mjs.map → chunk-VGITSRT6.mjs.map} +0 -0
- /package/dist/esm/{chunk-L2SDI7PI.mjs.map → chunk-VGJIATTB.mjs.map} +0 -0
- /package/dist/esm/{chunk-NHKAQRJB.mjs.map → chunk-X7JNNNMC.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUL55M2H.mjs.map → chunk-YIQ3JFHW.mjs.map} +0 -0
- /package/dist/esm/{chunk-WGIYSLH6.mjs.map → chunk-YP3VO6GM.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/
|
|
1
|
+
{"version":3,"sources":["/Users/philip/Documents/General/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","../../src/utils/helpers.ts"],"names":["sleep","timeMs","resolve","getErrorMessage","error","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64","decode","convertAmountFromHumanReadableToOnChain","value","decimal","convertAmountFromOnChainToHumanReadable","hexToAscii","hex","str","n","parseEncodedStruct","structObj","account_address","module_name","struct_name","moduleName","structName"],"mappings":"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","file":"/Users/philip/Documents/General/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\nimport { MoveStructId } from \"../types\";\n\n/**\n * Sleep for the specified amount of time in milliseconds.\n * This function can be used to introduce delays in asynchronous operations.\n *\n * @param timeMs - The time in milliseconds to sleep.\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\n/**\n * Get the error message from an unknown error.\n *\n * @param error The error to get the message from\n * @returns The error message\n */\nexport function getErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\n/**\n * Floors the given timestamp to the nearest whole hour.\n * This function is useful for normalizing timestamps to hourly intervals.\n *\n * @param timestampInSeconds - The timestamp in seconds to be floored.\n */\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\n/**\n * Decodes a base64 URL-encoded string into its original form.\n * This function is useful for converting base64 URL-encoded data back to a readable format.\n *\n * @param base64Url - The base64 URL-encoded string to decode.\n * @returns The decoded string.\n */\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * a human-readable amount format to the smallest unit format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * the smallest unit format to a human-readable amount format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;\n\n/**\n * Convert a hex string to an ascii string with the `0x` prefix.\n *\n * `0x6170746f735f636f696e` --> `aptos_coin`\n *\n * @param hex The hex string to convert (e.g. `0x6170746f735f636f696e`)\n * @returns The ascii string\n */\nconst hexToAscii = (hex: string) => {\n let str = \"\";\n for (let n = 2; n < hex.length; n += 2) {\n str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));\n }\n return str;\n};\n\n/**\n * Convert an encoded struct to a MoveStructId.\n *\n * @example\n * const structObj = {\n * account_address: \"0x1\",\n * module_name: \"0x6170746f735f636f696e\",\n * struct_name: \"0x4170746f73436f696e\",\n * };\n * // structId is \"0x1::aptos_coin::AptosCoin\"\n * const structId = parseEncodedStruct(structObj);\n *\n * @param structObj The struct with account_address, module_name, and struct_name properties\n * @returns The MoveStructId\n */\nexport const parseEncodedStruct = (structObj: {\n account_address: string;\n module_name: string;\n struct_name: string;\n}): MoveStructId => {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { account_address, module_name, struct_name } = structObj;\n const moduleName = hexToAscii(module_name);\n const structName = hexToAscii(struct_name);\n return `${account_address}::${moduleName}::${structName}`;\n};\n\n/**\n * Determines whether the given object is an encoded struct type with the following properties:\n * - account_address: string\n * - module_name: string\n * - struct_name: string\n *\n * @param structObj The object to check\n * @returns Whether the object is an encoded struct type\n */\nexport const isEncodedStruct = (\n structObj: any,\n): structObj is {\n account_address: string;\n module_name: string;\n struct_name: string;\n} =>\n typeof structObj === \"object\" &&\n !Array.isArray(structObj) &&\n structObj !== null &&\n \"account_address\" in structObj &&\n \"module_name\" in structObj &&\n \"struct_name\" in structObj &&\n typeof structObj.account_address === \"string\" &&\n typeof structObj.module_name === \"string\" &&\n typeof structObj.struct_name === \"string\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/oliverhe/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliCommand","cliArgs","currentPlatform","platform","childProcess","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"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","file":"/Users/oliverhe/aptos-ts-sdk/dist/common/cli/index.js","sourcesContent":[null,"/* eslint-disable no-console */\n\nimport { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\n/**\n * Represents a local node for running a testnet environment.\n * This class provides methods to start, stop, and check the status of the local testnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n */\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n showStdout: boolean = true;\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n constructor(args?: { showStdout?: boolean }) {\n this.showStdout = args?.showStdout ?? true;\n }\n\n /**\n * Kills the current process and all its descendant processes.\n *\n * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.\n * @throws {Error} If there is an error while attempting to kill the process.\n */\n async stop(): Promise<void> {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n\n /**\n * Terminates the process associated with the given process ID.\n *\n * @param pid - The process ID of the process to be terminated.\n * @param callback - A function that is called after the termination attempt is complete.\n * @param callback.err - An error object if the termination failed; otherwise, null.\n * @param callback.resolve - A boolean indicating whether the termination was successful.\n */\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a local testnet and waits for the process to be up.\n * If the local node process is already running, it returns without starting the process.\n *\n * @returns {Promise<void>} A promise that resolves when the process is up.\n */\n async run(): Promise<void> {\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 with the specified command-line arguments.\n *\n * @returns {void}\n *\n * @throws {Error} If there is an issue starting the local testnet.\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output error log\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 if (this.showStdout) {\n console.log(str);\n }\n });\n }\n\n /**\n * Waits for the local testnet process to be operational within a specified maximum wait time.\n * This function continuously checks if the process is up and will throw an error if it fails to start.\n *\n * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.\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 by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the testnet is up, otherwise false.\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 { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\n/**\n * Class representing a Move package management utility for the Aptos blockchain.\n * This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade\n * packages, build transaction payloads, and run scripts.\n */\nexport class Move {\n /**\n * Initialize the current directory for Aptos by configuring the necessary settings.\n * Configuration will be pushed into .aptos/config.yaml.\n *\n * @param args - The arguments for initialization.\n * @param args.network - Optional Network type argument to use for default settings; defaults to local.\n * @param args.profile - Optional Profile to use from the config file; defaults to 'default'. This will override associated\n * settings such as the REST URL, the Faucet URL, and the private key arguments.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async init(args: {\n network?: Network;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { network, profile, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Compile a Move package located at the specified directory path.\n * This function helps in preparing the Move package for deployment or further processing.\n *\n * @param args - The arguments for compiling the package.\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. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run Move unit tests for a specified package.\n *\n * @param args - The arguments for running the tests.\n * @param args.packageDirectoryPath - The path to a Move package (the folder containing a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The stdout output from running the tests.\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Publishes the modules to the publisher account on the Aptos blockchain.\n *\n * @param args - The arguments for publishing the modules.\n * @param args.packageDirectoryPath - The path to a move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Create a new object and publish the Move package to it on the Aptos blockchain.\n *\n * @param args - The arguments for creating the object and publishing the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.addressName - Address name for the Move package.\n * @param args.namedAddresses - Named addresses for the Move binary.\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The object address.\n *\n * A complete example in CLI:\n * aptos move create-object-and-publish-package \\\n * --package-dir path_to_directory_that_has_move.toml \\\n * --address-name launchpad_addr \\\n * --named-addresses \"launchpad_addr=0x123,initial_creator_addr=0x456\" \\\n * --profile my_profile \\\n * --assume-yes\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"create-object-and-publish-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--address-name\",\n addressName,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n const { output } = await this.runCommand(cliArgs, showStdout);\n return { objectAddress: this.extractAddressFromOutput(output) };\n }\n\n /**\n * Upgrade a Move package previously published to an object on the Aptos blockchain.\n * The caller must be the object owner to execute this function.\n *\n * @param args - The arguments for upgrading the object package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.objectAddress - Address of the object that the Move package published to. Ex. 0x1000\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"upgrade-object-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--object-address\",\n objectAddress,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file.\n *\n * @param args - The arguments for building the publishing payload.\n * @param args.packageDirectoryPath - Path to a move package (the folder with a Move.toml file).\n * @param args.outputFile - Output file to write the publication transaction to.\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"] *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { outputFile, packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"build-publish-payload\",\n \"--json-output-file\",\n outputFile,\n \"--package-dir\",\n packageDirectoryPath,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Runs a Move script using the provided compiled script path and optional parameters. Ensure that the script is compiled\n * before executing this function.\n *\n * @param args - The arguments for running the script.\n * @param args.compiledScriptPath - Path to a compiled Move script bytecode file.\n * Ex. \"build/my_package/bytecode_scripts/my_move_script.mv\"\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n *\n * @returns The standard output from running the script.\n */\n async runScript(args: {\n compiledScriptPath: string;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { compiledScriptPath, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run a command with the specified arguments and return the output.\n *\n * @param args - An array of strings representing the command-line arguments to be passed to the command.\n * @param showStdout - Show the standard output generated by the command.\n * @returns The standard output generated by the command.\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\n // CLI final stdout is the Result/Error JSON string output\n // so we need to keep track of the last stdout\n let lastStdout = \"\";\n\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(\"npx\", args, { shell: true });\n } else {\n childProcess = spawn(\"npx\", args);\n }\n\n childProcess.stdout.on(\"data\", (data) => {\n lastStdout = data.toString();\n stdout += data.toString();\n });\n\n if (showStdout) {\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n }\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n try {\n // parse the last stdout as it might be the result\n const parsed = JSON.parse(lastStdout);\n if (parsed.Error) {\n reject(new Error(`Error: ${parsed.Error}`)); // Reject if the \"Error\" key exists\n } else if (parsed.Result) {\n resolve({ result: parsed.Result, output: stdout }); // Resolve if the \"Result\" key exists\n }\n } catch (error: any) {\n // resolve the stdout as it might be just a stdout\n resolve({ output: stdout });\n }\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 separated by a comma.\n *\n * @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.\n * Ex. {'alice' => '0x123', 'bob' => '0x456'}\n * @returns An array of named addresses formatted as strings separated by a comma. Ex. \"alice=0x123,bob=0x456\"\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 const names: Array<string> = [];\n namedAddresses.forEach((value, key) => {\n const toAppend = `${key}=${value.toString()}`;\n names.push(toAppend);\n });\n newArgs.push(names.join(\",\"));\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map.\n *\n * This function transforms a collection of named addresses into a more accessible format by mapping each name to its\n * corresponding address.\n *\n * @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.\n * @returns A Map where each key is a name and each value is the corresponding 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 /**\n * Extracts the object address from the provided output string.\n *\n * @param output - The output string containing the object address.\n * @returns The extracted object address.\n * @throws Error if the object address cannot be extracted from the output.\n */\n // eslint-disable-next-line class-methods-use-this\n private extractAddressFromOutput(output: string): string {\n const match = output.match(\"Code was successfully deployed to object address (0x[0-9a-fA-F]+)\");\n if (match) {\n return match[1];\n }\n throw new Error(\"Failed to extract object address from output\");\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/philip/Documents/General/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliCommand","cliArgs","currentPlatform","platform","childProcess","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"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","file":"/Users/philip/Documents/General/aptos-ts-sdk/dist/common/cli/index.js","sourcesContent":[null,"/* eslint-disable no-console */\n\nimport { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\n/**\n * Represents a local node for running a testnet environment.\n * This class provides methods to start, stop, and check the status of the local testnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n */\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n showStdout: boolean = true;\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n constructor(args?: { showStdout?: boolean }) {\n this.showStdout = args?.showStdout ?? true;\n }\n\n /**\n * Kills the current process and all its descendant processes.\n *\n * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.\n * @throws {Error} If there is an error while attempting to kill the process.\n */\n async stop(): Promise<void> {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n\n /**\n * Terminates the process associated with the given process ID.\n *\n * @param pid - The process ID of the process to be terminated.\n * @param callback - A function that is called after the termination attempt is complete.\n * @param callback.err - An error object if the termination failed; otherwise, null.\n * @param callback.resolve - A boolean indicating whether the termination was successful.\n */\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a local testnet and waits for the process to be up.\n * If the local node process is already running, it returns without starting the process.\n *\n * @returns {Promise<void>} A promise that resolves when the process is up.\n */\n async run(): Promise<void> {\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 with the specified command-line arguments.\n *\n * @returns {void}\n *\n * @throws {Error} If there is an issue starting the local testnet.\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output error log\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 if (this.showStdout) {\n console.log(str);\n }\n });\n }\n\n /**\n * Waits for the local testnet process to be operational within a specified maximum wait time.\n * This function continuously checks if the process is up and will throw an error if it fails to start.\n *\n * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.\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 by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the testnet is up, otherwise false.\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 { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\n/**\n * Class representing a Move package management utility for the Aptos blockchain.\n * This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade\n * packages, build transaction payloads, and run scripts.\n */\nexport class Move {\n /**\n * Initialize the current directory for Aptos by configuring the necessary settings.\n * Configuration will be pushed into .aptos/config.yaml.\n *\n * @param args - The arguments for initialization.\n * @param args.network - Optional Network type argument to use for default settings; defaults to local.\n * @param args.profile - Optional Profile to use from the config file; defaults to 'default'. This will override associated\n * settings such as the REST URL, the Faucet URL, and the private key arguments.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async init(args: {\n network?: Network;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { network, profile, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Compile a Move package located at the specified directory path.\n * This function helps in preparing the Move package for deployment or further processing.\n *\n * @param args - The arguments for compiling the package.\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. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run Move unit tests for a specified package.\n *\n * @param args - The arguments for running the tests.\n * @param args.packageDirectoryPath - The path to a Move package (the folder containing a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The stdout output from running the tests.\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Publishes the modules to the publisher account on the Aptos blockchain.\n *\n * @param args - The arguments for publishing the modules.\n * @param args.packageDirectoryPath - The path to a move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Create a new object and publish the Move package to it on the Aptos blockchain.\n *\n * @param args - The arguments for creating the object and publishing the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.addressName - Address name for the Move package.\n * @param args.namedAddresses - Named addresses for the Move binary.\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The object address.\n *\n * A complete example in CLI:\n * aptos move create-object-and-publish-package \\\n * --package-dir path_to_directory_that_has_move.toml \\\n * --address-name launchpad_addr \\\n * --named-addresses \"launchpad_addr=0x123,initial_creator_addr=0x456\" \\\n * --profile my_profile \\\n * --assume-yes\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"create-object-and-publish-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--address-name\",\n addressName,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n const { output } = await this.runCommand(cliArgs, showStdout);\n return { objectAddress: this.extractAddressFromOutput(output) };\n }\n\n /**\n * Upgrade a Move package previously published to an object on the Aptos blockchain.\n * The caller must be the object owner to execute this function.\n *\n * @param args - The arguments for upgrading the object package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.objectAddress - Address of the object that the Move package published to. Ex. 0x1000\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"upgrade-object-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--object-address\",\n objectAddress,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file.\n *\n * @param args - The arguments for building the publishing payload.\n * @param args.packageDirectoryPath - Path to a move package (the folder with a Move.toml file).\n * @param args.outputFile - Output file to write the publication transaction to.\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"] *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { outputFile, packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"build-publish-payload\",\n \"--json-output-file\",\n outputFile,\n \"--package-dir\",\n packageDirectoryPath,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Runs a Move script using the provided compiled script path and optional parameters. Ensure that the script is compiled\n * before executing this function.\n *\n * @param args - The arguments for running the script.\n * @param args.compiledScriptPath - Path to a compiled Move script bytecode file.\n * Ex. \"build/my_package/bytecode_scripts/my_move_script.mv\"\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n *\n * @returns The standard output from running the script.\n */\n async runScript(args: {\n compiledScriptPath: string;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { compiledScriptPath, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run a command with the specified arguments and return the output.\n *\n * @param args - An array of strings representing the command-line arguments to be passed to the command.\n * @param showStdout - Show the standard output generated by the command.\n * @returns The standard output generated by the command.\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\n // CLI final stdout is the Result/Error JSON string output\n // so we need to keep track of the last stdout\n let lastStdout = \"\";\n\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(\"npx\", args, { shell: true });\n } else {\n childProcess = spawn(\"npx\", args);\n }\n\n childProcess.stdout.on(\"data\", (data) => {\n lastStdout = data.toString();\n stdout += data.toString();\n });\n\n if (showStdout) {\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n }\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n try {\n // parse the last stdout as it might be the result\n const parsed = JSON.parse(lastStdout);\n if (parsed.Error) {\n reject(new Error(`Error: ${parsed.Error}`)); // Reject if the \"Error\" key exists\n } else if (parsed.Result) {\n resolve({ result: parsed.Result, output: stdout }); // Resolve if the \"Result\" key exists\n }\n } catch (error: any) {\n // resolve the stdout as it might be just a stdout\n resolve({ output: stdout });\n }\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 separated by a comma.\n *\n * @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.\n * Ex. {'alice' => '0x123', 'bob' => '0x456'}\n * @returns An array of named addresses formatted as strings separated by a comma. Ex. \"alice=0x123,bob=0x456\"\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 const names: Array<string> = [];\n namedAddresses.forEach((value, key) => {\n const toAppend = `${key}=${value.toString()}`;\n names.push(toAppend);\n });\n newArgs.push(names.join(\",\"));\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map.\n *\n * This function transforms a collection of named addresses into a more accessible format by mapping each name to its\n * corresponding address.\n *\n * @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.\n * @returns A Map where each key is a name and each value is the corresponding 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 /**\n * Extracts the object address from the provided output string.\n *\n * @param output - The output string containing the object address.\n * @returns The extracted object address.\n * @throws Error if the object address cannot be extracted from the output.\n */\n // eslint-disable-next-line class-methods-use-this\n private extractAddressFromOutput(output: string): string {\n const match = output.match(\"Code was successfully deployed to object address (0x[0-9a-fA-F]+)\");\n if (match) {\n return match[1];\n }\n throw new Error(\"Failed to extract object address from output\");\n }\n}\n"]}
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, P as PrivateKeyVariants, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, n as AccountAddressInput, M as MoveModuleId, o as ScriptFunctionArgument, p as MoveFunctionId, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, w as PaginationArgs, x as MoveModuleBytecode, y as TransactionResponse, z as MoveResource, B as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, J as GetAccountOwnedTokensFromCollectionResponse, K as GetAccountCollectionsWithOwnedTokenResponse, Q as GetAccountCoinsDataResponse, W as WhereArg, R as GetObjectDataQueryResponse, V as GetCollectionDataResponse, X as GetTokenDataResponse, Y as GetCurrentTokenOwnershipResponse, _ as GetOwnedTokensResponse, $ as GetTokenActivityResponse, a0 as GetEventsResponse, a1 as WaitForTransactionOptions, a2 as UserTransactionResponse, a3 as MoveFunction, a4 as GetFungibleAssetMetadataResponse, a5 as GetFungibleAssetActivitiesResponse, a6 as GetCurrentFungibleAssetBalancesResponse, a7 as LedgerInfo, a8 as Block, a9 as GetChainTopUserTransactionsResponse, aa as GraphqlQuery, ab as GetProcessorStatusResponse, ac as GetANSNameResponse, ad as GetNumberOfDelegatorsResponse, ae as GetDelegatedStakingActivitiesResponse, af as PendingTransactionResponse, ag as CommittedTransactionResponse, ah as GasEstimation, ai as TableItemRequest, aj as GetTableItemsDataResponse, ak as GetTableItemsMetadataResponse, al as ClientRequest, am as ClientResponse, an as AptosRequest, ao as AptosResponse, ap as MimeType } from './accountAddress-6RqI8Aam.js';
|
|
2
2
|
export { aG as AccountAuthenticatorVariant, bp as AccountSignature, at as AddressInvalidReason, aH as AnySignatureVariant, aZ as BlockEndInfo, a_ as BlockEpilogueTransactionResponse, aW as BlockMetadataTransactionResponse, aM as ClientHeadersType, b6 as DecodedTableData, b7 as DeletedTableData, bM as DeriveScheme, bs as DirectWriteSet, b9 as EntryFunctionPayloadResponse, aI as EphemeralSignatureVariant, bu as Event, bt as EventGuid, bP as GenerateAccount, bN as GenerateAccountWithEd25519, bO as GenerateAccountWithSingleSignerSecp256k1Key, bc as GenesisPayload, aV as GenesisTransactionResponse, aw as HexInvalidReason, bH as MoveAbility, bB as MoveAddressType, bG as MoveFunctionVisibility, bJ as MoveModule, bC as MoveObjectType, bD as MoveOptionType, bd as MoveScriptBytecode, bK as MoveStruct, bI as MoveStructField, bE as MoveStructType, bF as MoveType, bz as MoveUint128Type, bw as MoveUint16Type, bA as MoveUint256Type, bx as MoveUint32Type, by as MoveUint64Type, bv as MoveUint8Type, bb as MultisigPayloadResponse, bV as NetworkToChainId, bS as NetworkToFaucetAPI, bQ as NetworkToIndexerAPI, bW as NetworkToNetworkName, bR as NetworkToNodeAPI, bT as NetworkToPepperAPI, bU as NetworkToProverAPI, ay as OrderBy, az as OrderByValue, au as ParsingError, av as ParsingResult, bL as RoleType, ba as ScriptPayloadResponse, aC as ScriptTransactionArgumentVariants, br as ScriptWriteSet, aX as StateCheckpointTransactionResponse, aA as TokenStandard, aF as TransactionAuthenticatorVariant, bk as TransactionEd25519Signature, bo as TransactionFeePayerSignature, bn as TransactionMultiAgentSignature, bm as TransactionMultiEd25519Signature, b8 as TransactionPayloadResponse, aD as TransactionPayloadVariants, aN as TransactionResponseType, bl as TransactionSecp256k1Signature, be as TransactionSignature, aE as TransactionVariants, aB as TypeTagVariants, aK as Uint128, aL as Uint256, aJ as Uint64, aY as ValidatorTransactionResponse, bq as WriteSet, a$ as WriteSetChange, b0 as WriteSetChangeDeleteModule, b1 as WriteSetChangeDeleteResource, b2 as WriteSetChangeDeleteTableItem, b3 as WriteSetChangeWriteModule, b4 as WriteSetChangeWriteResource, b5 as WriteSetChangeWriteTableItem, aq as ensureBoolean, ax as hexToAsciiString, aU as isBlockEpilogueTransactionResponse, aR as isBlockMetadataTransactionResponse, bf as isEd25519Signature, bi as isFeePayerSignature, aQ as isGenesisTransactionResponse, bh as isMultiAgentSignature, bj as isMultiEd25519Signature, aO as isPendingTransactionResponse, bg as isSecp256k1Signature, aS as isStateCheckpointTransactionResponse, aP as isUserTransactionResponse, aT as isValidatorTransactionResponse, ar as outOfRangeErrorMessage, as as validateNumberInRange } from './accountAddress-6RqI8Aam.js';
|
|
3
|
-
import { CallArgument } from '@wgb5445/aptos-intent-npm';
|
|
4
|
-
export { CallArgument } from '@wgb5445/aptos-intent-npm';
|
|
5
3
|
import EventEmitter from 'eventemitter3';
|
|
6
4
|
|
|
7
5
|
type Maybe<T> = T | null;
|
|
@@ -2042,6 +2040,12 @@ declare enum ProcessorType {
|
|
|
2042
2040
|
USER_TRANSACTION_PROCESSOR = "user_transaction_processor",
|
|
2043
2041
|
OBJECT_PROCESSOR = "objects_processor"
|
|
2044
2042
|
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Regular expression pattern for Firebase Auth issuer URLs
|
|
2045
|
+
* Matches URLs in the format: https://securetoken.google.com/[project-id]
|
|
2046
|
+
* where project-id can contain letters, numbers, hyphens, and underscores
|
|
2047
|
+
*/
|
|
2048
|
+
declare const FIREBASE_AUTH_ISS_PATTERN: RegExp;
|
|
2045
2049
|
|
|
2046
2050
|
/**
|
|
2047
2051
|
* Represents the configuration settings for an Aptos SDK client instance.
|
|
@@ -4270,14 +4274,6 @@ type InputMultiSigDataWithABI = {
|
|
|
4270
4274
|
type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
|
|
4271
4275
|
aptosConfig: AptosConfig;
|
|
4272
4276
|
};
|
|
4273
|
-
/**
|
|
4274
|
-
* The data needed to generate a batched function payload
|
|
4275
|
-
*/
|
|
4276
|
-
type InputBatchedFunctionData = {
|
|
4277
|
-
function: MoveFunctionId;
|
|
4278
|
-
typeArguments?: Array<TypeArgument>;
|
|
4279
|
-
functionArguments: Array<EntryFunctionArgumentTypes | CallArgument | SimpleEntryFunctionArgumentTypes>;
|
|
4280
|
-
};
|
|
4281
4277
|
/**
|
|
4282
4278
|
* The data needed to generate a Multi Sig payload
|
|
4283
4279
|
*/
|
|
@@ -7822,14 +7818,6 @@ declare function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array
|
|
|
7822
7818
|
* @param aptosConfig - The configuration settings for Aptos.
|
|
7823
7819
|
*/
|
|
7824
7820
|
declare function fetchFunctionAbi(moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig): Promise<MoveFunction | undefined>;
|
|
7825
|
-
/**
|
|
7826
|
-
* Fetches a function ABI from the on-chain module ABI. It doesn't validate whether it's a view or entry function.
|
|
7827
|
-
* @param moduleAddress
|
|
7828
|
-
* @param moduleName
|
|
7829
|
-
* @param functionName
|
|
7830
|
-
* @param aptosConfig
|
|
7831
|
-
*/
|
|
7832
|
-
declare function fetchMoveFunctionAbi(moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig): Promise<FunctionABI>;
|
|
7833
7821
|
/**
|
|
7834
7822
|
* Fetches the ABI for an entry function from the specified module address.
|
|
7835
7823
|
* This function validates if the ABI corresponds to an entry function and retrieves its parameters.
|
|
@@ -7854,18 +7842,6 @@ declare function fetchEntryFunctionAbi(moduleAddress: string, moduleName: string
|
|
|
7854
7842
|
* @throws Error if the ABI cannot be found or if the function is not a view function.
|
|
7855
7843
|
*/
|
|
7856
7844
|
declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig): Promise<ViewFunctionABI>;
|
|
7857
|
-
/**
|
|
7858
|
-
* Converts a entry function argument into CallArgument, if necessary.
|
|
7859
|
-
* This function checks the provided argument against the expected parameter type and converts it accordingly.
|
|
7860
|
-
*
|
|
7861
|
-
* @param functionName - The name of the function for which the argument is being converted.
|
|
7862
|
-
* @param functionAbi - The ABI (Application Binary Interface) of the function, which defines its parameters.
|
|
7863
|
-
* @param argument - The argument to be converted, which can be of various types. If the argument is already
|
|
7864
|
-
* CallArgument returned from TransactionComposer it would be returned immediately.
|
|
7865
|
-
* @param position - The index of the argument in the function's parameter list.
|
|
7866
|
-
* @param genericTypeParams - An array of type tags for any generic type parameters.
|
|
7867
|
-
*/
|
|
7868
|
-
declare function convertCallArgument(argument: CallArgument | EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, functionName: string, functionAbi: FunctionABI, position: number, genericTypeParams: Array<TypeTag>): CallArgument;
|
|
7869
7845
|
/**
|
|
7870
7846
|
* Converts a non-BCS encoded argument into BCS encoded, if necessary.
|
|
7871
7847
|
* This function checks the provided argument against the expected parameter type and converts it accordingly.
|
|
@@ -7997,14 +7973,6 @@ declare function parseTypeTag(typeStr: string, options?: {
|
|
|
7997
7973
|
allowGenerics?: boolean;
|
|
7998
7974
|
}): TypeTag;
|
|
7999
7975
|
|
|
8000
|
-
declare class AptosScriptComposer {
|
|
8001
|
-
private builder;
|
|
8002
|
-
private config;
|
|
8003
|
-
constructor(aptosConfig: AptosConfig);
|
|
8004
|
-
addBatchedCalls(input: InputBatchedFunctionData): Promise<CallArgument[]>;
|
|
8005
|
-
build(): Uint8Array;
|
|
8006
|
-
}
|
|
8007
|
-
|
|
8008
7976
|
/**
|
|
8009
7977
|
* A class for querying and managing fungible asset-related operations on the Aptos blockchain.
|
|
8010
7978
|
*/
|
|
@@ -9276,70 +9244,6 @@ declare class Build {
|
|
|
9276
9244
|
options?: InputGenerateTransactionOptions;
|
|
9277
9245
|
withFeePayer?: boolean;
|
|
9278
9246
|
}): Promise<SimpleTransaction>;
|
|
9279
|
-
/**
|
|
9280
|
-
* Build a transaction from a series of Move calls.
|
|
9281
|
-
*
|
|
9282
|
-
* This function allows you to create a transaction with a list of Move calls.
|
|
9283
|
-
*
|
|
9284
|
-
* Right now we only tested this logic with single signer and we will add support
|
|
9285
|
-
* for mutli agent transactions if needed.
|
|
9286
|
-
*
|
|
9287
|
-
* @param args.sender - The sender account address.
|
|
9288
|
-
* @param args.builder - The closure to construct the list of calls.
|
|
9289
|
-
* @param args.options - Optional transaction configurations.
|
|
9290
|
-
* @param args.withFeePayer - Whether there is a fee payer for the transaction.
|
|
9291
|
-
*
|
|
9292
|
-
* @returns SimpleTransaction
|
|
9293
|
-
*
|
|
9294
|
-
* @example
|
|
9295
|
-
* ```typescript
|
|
9296
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
9297
|
-
*
|
|
9298
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
9299
|
-
* const aptos = new Aptos(config);
|
|
9300
|
-
*
|
|
9301
|
-
* async function runExample() {
|
|
9302
|
-
* // Build a transaction from a chained series of Move calls.
|
|
9303
|
-
* const transaction = await aptos.transaction.script_composer({
|
|
9304
|
-
* sender: "0x1", // replace with a real sender account address
|
|
9305
|
-
* builder: builder: async (builder) => {
|
|
9306
|
-
* const coin = await builder.addBatchedCalls({
|
|
9307
|
-
* function: "0x1::coin::withdraw",
|
|
9308
|
-
* functionArguments: [CallArgument.new_signer(0), 1],
|
|
9309
|
-
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
9310
|
-
* });
|
|
9311
|
-
*
|
|
9312
|
-
* // Pass the returned value from the first function call to the second call
|
|
9313
|
-
* const fungibleAsset = await builder.addBatchedCalls({
|
|
9314
|
-
* function: "0x1::coin::coin_to_fungible_asset",
|
|
9315
|
-
* functionArguments: [coin[0]],
|
|
9316
|
-
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
9317
|
-
* });
|
|
9318
|
-
*
|
|
9319
|
-
* await builder.addBatchedCalls({
|
|
9320
|
-
* function: "0x1::primary_fungible_store::deposit",
|
|
9321
|
-
* functionArguments: [singleSignerED25519SenderAccount.accountAddress, fungibleAsset[0]],
|
|
9322
|
-
* typeArguments: [],
|
|
9323
|
-
* });
|
|
9324
|
-
* return builder;
|
|
9325
|
-
* },
|
|
9326
|
-
* options: {
|
|
9327
|
-
* gasUnitPrice: 100, // specify your own gas unit price if needed
|
|
9328
|
-
* maxGasAmount: 1000, // specify your own max gas amount if needed
|
|
9329
|
-
* },
|
|
9330
|
-
* });
|
|
9331
|
-
*
|
|
9332
|
-
* console.log(transaction);
|
|
9333
|
-
* }
|
|
9334
|
-
* runExample().catch(console.error);
|
|
9335
|
-
* ```
|
|
9336
|
-
*/
|
|
9337
|
-
scriptComposer(args: {
|
|
9338
|
-
sender: AccountAddressInput;
|
|
9339
|
-
builder: (builder: AptosScriptComposer) => Promise<AptosScriptComposer>;
|
|
9340
|
-
options?: InputGenerateTransactionOptions;
|
|
9341
|
-
withFeePayer?: boolean;
|
|
9342
|
-
}): Promise<SimpleTransaction>;
|
|
9343
9247
|
/**
|
|
9344
9248
|
* Build a multi-agent transaction that allows multiple signers to authorize a transaction.
|
|
9345
9249
|
*
|
|
@@ -11623,4 +11527,4 @@ declare class AptosApiError extends Error {
|
|
|
11623
11527
|
constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts);
|
|
11624
11528
|
}
|
|
11625
11529
|
|
|
11626
|
-
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse,
|
|
11530
|
+
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, FIREBASE_AUTH_ISS_PATTERN, type FailureEventData, FaucetConfig, FederatedKeylessAccount, FederatedKeylessPublicKey, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessError, KeylessErrorCategory, KeylessErrorResolutionTip, KeylessErrorType, KeylessPublicKey, KeylessSignature, type KeylessSigner, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveJWK, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, PrivateKeyVariants, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serialized, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, base64UrlDecode, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, objectStructTag, optionStructTag, padAndPackBytesWithLen, paginateWithCursor, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|