@aptos-labs/ts-sdk 1.23.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/cli/index.d.ts +21 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +13 -8
- package/dist/common/index.js +7 -7
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/{chunk-MA7TL5VN.mjs → chunk-2CXQK6CH.mjs} +2 -2
- package/dist/esm/{chunk-FE6CYBDF.mjs → chunk-34PNYV2Q.mjs} +2 -2
- package/dist/esm/{chunk-PF54PEHF.mjs → chunk-35L6ZK2X.mjs} +2 -2
- package/dist/esm/{chunk-RBIJJSGB.mjs → chunk-3GGG4R4C.mjs} +2 -2
- package/dist/esm/{chunk-4R7FL2G2.mjs → chunk-5JTED2JJ.mjs} +2 -2
- package/dist/esm/{chunk-4ZDOOSRJ.mjs → chunk-5OODQH42.mjs} +2 -2
- package/dist/esm/{chunk-T7MGIHWV.mjs → chunk-6R3ZHOGL.mjs} +2 -2
- package/dist/esm/{chunk-7F7AIMGB.mjs → chunk-76IW7XM5.mjs} +2 -2
- package/dist/esm/{chunk-IZ7OGJBY.mjs → chunk-7JWCIWJ3.mjs} +2 -2
- package/dist/esm/chunk-7MYVC7NY.mjs +2 -0
- package/dist/esm/chunk-7MYVC7NY.mjs.map +1 -0
- package/dist/esm/{chunk-K7OBPPSF.mjs → chunk-7VIABVKU.mjs} +2 -2
- package/dist/esm/{chunk-VA4HKHNV.mjs → chunk-7WPECE2S.mjs} +2 -2
- package/dist/esm/chunk-AZRXSMC2.mjs +2 -0
- package/dist/esm/{chunk-2M45ESQN.mjs.map → chunk-AZRXSMC2.mjs.map} +1 -1
- package/dist/esm/{chunk-B4ROOQE3.mjs → chunk-BP7JPCSW.mjs} +2 -2
- package/dist/esm/chunk-C4RTKCIA.mjs +2 -0
- package/dist/esm/chunk-C4RTKCIA.mjs.map +1 -0
- package/dist/esm/{chunk-NJ2IXXY2.mjs → chunk-CZ6UX5WZ.mjs} +2 -2
- package/dist/esm/{chunk-BQ7OOQRE.mjs → chunk-DPZO54DD.mjs} +2 -2
- package/dist/esm/{chunk-IR6L77JS.mjs → chunk-E67RGLPK.mjs} +2 -2
- package/dist/esm/{chunk-QLKTSSVC.mjs → chunk-EAWQ4SD3.mjs} +2 -2
- package/dist/esm/{chunk-ZE2TCKUL.mjs → chunk-EFJCV23R.mjs} +2 -2
- package/dist/esm/{chunk-Y5AY3QBY.mjs → chunk-EMVWSYK5.mjs} +2 -2
- package/dist/esm/{chunk-BDD6OBUV.mjs → chunk-EV5QBTUM.mjs} +2 -2
- package/dist/esm/{chunk-QUMSKIYX.mjs → chunk-F3RBTS5V.mjs} +2 -2
- package/dist/esm/{chunk-NC3KKAAK.mjs → chunk-FDFE5GY2.mjs} +2 -2
- package/dist/esm/{chunk-WPYVWZQS.mjs → chunk-G5MGSV7Y.mjs} +2 -2
- package/dist/esm/{chunk-X2QSDREG.mjs → chunk-GFUP6W3X.mjs} +2 -2
- package/dist/esm/{chunk-V3NKDUY5.mjs → chunk-GY7ARJNT.mjs} +2 -2
- package/dist/esm/{chunk-ME2PENQD.mjs → chunk-HKLJ6JKE.mjs} +2 -2
- package/dist/esm/{chunk-PIUICROW.mjs → chunk-HKMG3LZX.mjs} +2 -2
- package/dist/esm/{chunk-L7FA4ISG.mjs → chunk-HWX6AJJ2.mjs} +2 -2
- package/dist/esm/{chunk-ODYVU346.mjs → chunk-HXYBTLQT.mjs} +2 -2
- package/dist/esm/{chunk-DAEUQBVZ.mjs → chunk-IDYCJIHI.mjs} +2 -2
- package/dist/esm/{chunk-GP3RTNYN.mjs → chunk-INZXND6M.mjs} +2 -2
- package/dist/esm/{chunk-UY4EIN3P.mjs → chunk-ISUHNAU4.mjs} +2 -2
- package/dist/esm/{chunk-D6DCZULX.mjs → chunk-JBCUGFGG.mjs} +2 -2
- package/dist/esm/{chunk-243IMA3Y.mjs → chunk-JCQYD2ZQ.mjs} +2 -2
- package/dist/esm/{chunk-RZKLIZ2D.mjs → chunk-KLD5S3J2.mjs} +2 -2
- package/dist/esm/{chunk-2SGICMXB.mjs → chunk-LKA54RAP.mjs} +2 -2
- package/dist/esm/{chunk-IUAAMX5V.mjs → chunk-M74WIV66.mjs} +2 -2
- package/dist/esm/{chunk-J26STL4T.mjs → chunk-METR6A53.mjs} +2 -2
- package/dist/esm/{chunk-PDOQLTXA.mjs → chunk-MULJ2GLJ.mjs} +2 -2
- package/dist/esm/{chunk-4FMAPHUM.mjs → chunk-NAHOALKG.mjs} +2 -2
- package/dist/esm/{chunk-D6QSRB4J.mjs → chunk-NLJ5MHA5.mjs} +2 -2
- package/dist/esm/{chunk-ES5Z33UX.mjs → chunk-NSEC2KVP.mjs} +2 -2
- package/dist/esm/chunk-NWLLWPBG.mjs +2 -0
- package/dist/esm/chunk-NWLLWPBG.mjs.map +1 -0
- package/dist/esm/{chunk-J4KAYDPB.mjs → chunk-NWOMSL6K.mjs} +2 -2
- package/dist/esm/chunk-O4BBULNE.mjs +2 -0
- package/dist/esm/chunk-O4BBULNE.mjs.map +1 -0
- package/dist/esm/{chunk-YEISKUKC.mjs → chunk-OGOWKEMD.mjs} +2 -2
- package/dist/esm/{chunk-WSE653RS.mjs → chunk-OHRL766V.mjs} +2 -2
- package/dist/esm/{chunk-WSE653RS.mjs.map → chunk-OHRL766V.mjs.map} +1 -1
- package/dist/esm/chunk-P2TDGITN.mjs +2 -0
- package/dist/esm/chunk-P2TDGITN.mjs.map +1 -0
- package/dist/esm/{chunk-FAFN34ZH.mjs → chunk-PYLB6CAF.mjs} +2 -2
- package/dist/esm/chunk-Q7MD4V7H.mjs +2 -0
- package/dist/esm/chunk-Q7MD4V7H.mjs.map +1 -0
- package/dist/esm/{chunk-J6NLU6QX.mjs → chunk-QRN6BG2N.mjs} +2 -2
- package/dist/esm/{chunk-GBZOWPC6.mjs → chunk-SUJLWCRN.mjs} +2 -2
- package/dist/esm/{chunk-5OR2POPO.mjs → chunk-TDCS6MMG.mjs} +2 -2
- package/dist/esm/{chunk-F435LQUS.mjs → chunk-UEP4UQS5.mjs} +2 -2
- package/dist/esm/{chunk-3JFX3XDA.mjs → chunk-UNMUX5HS.mjs} +2 -2
- package/dist/esm/{chunk-EMFVGL2Y.mjs → chunk-UWPO7WWS.mjs} +2 -2
- package/dist/esm/{chunk-FRUEQTCC.mjs → chunk-V3OYNKY5.mjs} +2 -2
- package/dist/esm/{chunk-T7WBGP37.mjs → chunk-V75UHXGZ.mjs} +2 -2
- package/dist/esm/{chunk-OUAQKVIC.mjs → chunk-VL6JZUYX.mjs} +2 -2
- package/dist/esm/chunk-W7MX6GBC.mjs +2 -0
- package/dist/esm/chunk-W7MX6GBC.mjs.map +1 -0
- package/dist/esm/chunk-WLLWOD5T.mjs +2 -0
- package/dist/esm/chunk-WLLWOD5T.mjs.map +1 -0
- package/dist/esm/{chunk-MG3T24A3.mjs → chunk-WMBECPK5.mjs} +2 -2
- package/dist/esm/{chunk-ZMFVKUFD.mjs → chunk-WMHYIP3S.mjs} +2 -2
- package/dist/esm/{chunk-FZ3HMVKE.mjs → chunk-WRRQ7L5K.mjs} +2 -2
- package/dist/esm/{chunk-BQIT7TKM.mjs → chunk-XJI57J4Q.mjs} +2 -2
- package/dist/esm/{chunk-OBKVMO7I.mjs → chunk-XNSOEUH7.mjs} +2 -2
- package/dist/esm/{chunk-3CB53WTP.mjs → chunk-XSNOPUMC.mjs} +2 -2
- package/dist/esm/{chunk-BEXHZ5XT.mjs → chunk-XUT73RUR.mjs} +2 -2
- package/dist/esm/{chunk-ZHNCJSXO.mjs → chunk-YB5DCDJY.mjs} +2 -2
- package/dist/esm/{chunk-BFRFAX5I.mjs → chunk-YDZBU2DJ.mjs} +2 -2
- package/dist/esm/{chunk-T52HPGL5.mjs → chunk-YZWR7OV5.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +20 -0
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +10 -9
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +1 -0
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -0
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +2 -0
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/faucet.ts +6 -1
- package/src/cli/localNode.ts +12 -4
- package/src/cli/move.ts +36 -0
- package/src/core/accountAddress.ts +6 -6
- package/src/core/crypto/ed25519.ts +28 -28
- package/src/core/crypto/keyless.ts +9 -0
- package/src/core/crypto/secp256k1.ts +4 -3
- package/src/core/crypto/singleKey.ts +20 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +17 -27
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2M45ESQN.mjs +0 -2
- package/dist/esm/chunk-6WAXFWLH.mjs +0 -2
- package/dist/esm/chunk-6WAXFWLH.mjs.map +0 -1
- package/dist/esm/chunk-72QKG5N2.mjs +0 -2
- package/dist/esm/chunk-72QKG5N2.mjs.map +0 -1
- package/dist/esm/chunk-FNFQA7NS.mjs +0 -2
- package/dist/esm/chunk-FNFQA7NS.mjs.map +0 -1
- package/dist/esm/chunk-FSTRZMCK.mjs +0 -2
- package/dist/esm/chunk-FSTRZMCK.mjs.map +0 -1
- package/dist/esm/chunk-OID45FCB.mjs +0 -2
- package/dist/esm/chunk-OID45FCB.mjs.map +0 -1
- package/dist/esm/chunk-XWVMFCW3.mjs +0 -2
- package/dist/esm/chunk-XWVMFCW3.mjs.map +0 -1
- package/dist/esm/chunk-Y5VJSCVY.mjs +0 -2
- package/dist/esm/chunk-Y5VJSCVY.mjs.map +0 -1
- package/dist/esm/chunk-ZKCSQAGW.mjs +0 -2
- package/dist/esm/chunk-ZKCSQAGW.mjs.map +0 -1
- /package/dist/esm/{chunk-MA7TL5VN.mjs.map → chunk-2CXQK6CH.mjs.map} +0 -0
- /package/dist/esm/{chunk-FE6CYBDF.mjs.map → chunk-34PNYV2Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-PF54PEHF.mjs.map → chunk-35L6ZK2X.mjs.map} +0 -0
- /package/dist/esm/{chunk-RBIJJSGB.mjs.map → chunk-3GGG4R4C.mjs.map} +0 -0
- /package/dist/esm/{chunk-4R7FL2G2.mjs.map → chunk-5JTED2JJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4ZDOOSRJ.mjs.map → chunk-5OODQH42.mjs.map} +0 -0
- /package/dist/esm/{chunk-T7MGIHWV.mjs.map → chunk-6R3ZHOGL.mjs.map} +0 -0
- /package/dist/esm/{chunk-7F7AIMGB.mjs.map → chunk-76IW7XM5.mjs.map} +0 -0
- /package/dist/esm/{chunk-IZ7OGJBY.mjs.map → chunk-7JWCIWJ3.mjs.map} +0 -0
- /package/dist/esm/{chunk-K7OBPPSF.mjs.map → chunk-7VIABVKU.mjs.map} +0 -0
- /package/dist/esm/{chunk-VA4HKHNV.mjs.map → chunk-7WPECE2S.mjs.map} +0 -0
- /package/dist/esm/{chunk-B4ROOQE3.mjs.map → chunk-BP7JPCSW.mjs.map} +0 -0
- /package/dist/esm/{chunk-NJ2IXXY2.mjs.map → chunk-CZ6UX5WZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQ7OOQRE.mjs.map → chunk-DPZO54DD.mjs.map} +0 -0
- /package/dist/esm/{chunk-IR6L77JS.mjs.map → chunk-E67RGLPK.mjs.map} +0 -0
- /package/dist/esm/{chunk-QLKTSSVC.mjs.map → chunk-EAWQ4SD3.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZE2TCKUL.mjs.map → chunk-EFJCV23R.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y5AY3QBY.mjs.map → chunk-EMVWSYK5.mjs.map} +0 -0
- /package/dist/esm/{chunk-BDD6OBUV.mjs.map → chunk-EV5QBTUM.mjs.map} +0 -0
- /package/dist/esm/{chunk-QUMSKIYX.mjs.map → chunk-F3RBTS5V.mjs.map} +0 -0
- /package/dist/esm/{chunk-NC3KKAAK.mjs.map → chunk-FDFE5GY2.mjs.map} +0 -0
- /package/dist/esm/{chunk-WPYVWZQS.mjs.map → chunk-G5MGSV7Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-X2QSDREG.mjs.map → chunk-GFUP6W3X.mjs.map} +0 -0
- /package/dist/esm/{chunk-V3NKDUY5.mjs.map → chunk-GY7ARJNT.mjs.map} +0 -0
- /package/dist/esm/{chunk-ME2PENQD.mjs.map → chunk-HKLJ6JKE.mjs.map} +0 -0
- /package/dist/esm/{chunk-PIUICROW.mjs.map → chunk-HKMG3LZX.mjs.map} +0 -0
- /package/dist/esm/{chunk-L7FA4ISG.mjs.map → chunk-HWX6AJJ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-ODYVU346.mjs.map → chunk-HXYBTLQT.mjs.map} +0 -0
- /package/dist/esm/{chunk-DAEUQBVZ.mjs.map → chunk-IDYCJIHI.mjs.map} +0 -0
- /package/dist/esm/{chunk-GP3RTNYN.mjs.map → chunk-INZXND6M.mjs.map} +0 -0
- /package/dist/esm/{chunk-UY4EIN3P.mjs.map → chunk-ISUHNAU4.mjs.map} +0 -0
- /package/dist/esm/{chunk-D6DCZULX.mjs.map → chunk-JBCUGFGG.mjs.map} +0 -0
- /package/dist/esm/{chunk-243IMA3Y.mjs.map → chunk-JCQYD2ZQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-RZKLIZ2D.mjs.map → chunk-KLD5S3J2.mjs.map} +0 -0
- /package/dist/esm/{chunk-2SGICMXB.mjs.map → chunk-LKA54RAP.mjs.map} +0 -0
- /package/dist/esm/{chunk-IUAAMX5V.mjs.map → chunk-M74WIV66.mjs.map} +0 -0
- /package/dist/esm/{chunk-J26STL4T.mjs.map → chunk-METR6A53.mjs.map} +0 -0
- /package/dist/esm/{chunk-PDOQLTXA.mjs.map → chunk-MULJ2GLJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4FMAPHUM.mjs.map → chunk-NAHOALKG.mjs.map} +0 -0
- /package/dist/esm/{chunk-D6QSRB4J.mjs.map → chunk-NLJ5MHA5.mjs.map} +0 -0
- /package/dist/esm/{chunk-ES5Z33UX.mjs.map → chunk-NSEC2KVP.mjs.map} +0 -0
- /package/dist/esm/{chunk-J4KAYDPB.mjs.map → chunk-NWOMSL6K.mjs.map} +0 -0
- /package/dist/esm/{chunk-YEISKUKC.mjs.map → chunk-OGOWKEMD.mjs.map} +0 -0
- /package/dist/esm/{chunk-FAFN34ZH.mjs.map → chunk-PYLB6CAF.mjs.map} +0 -0
- /package/dist/esm/{chunk-J6NLU6QX.mjs.map → chunk-QRN6BG2N.mjs.map} +0 -0
- /package/dist/esm/{chunk-GBZOWPC6.mjs.map → chunk-SUJLWCRN.mjs.map} +0 -0
- /package/dist/esm/{chunk-5OR2POPO.mjs.map → chunk-TDCS6MMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-F435LQUS.mjs.map → chunk-UEP4UQS5.mjs.map} +0 -0
- /package/dist/esm/{chunk-3JFX3XDA.mjs.map → chunk-UNMUX5HS.mjs.map} +0 -0
- /package/dist/esm/{chunk-EMFVGL2Y.mjs.map → chunk-UWPO7WWS.mjs.map} +0 -0
- /package/dist/esm/{chunk-FRUEQTCC.mjs.map → chunk-V3OYNKY5.mjs.map} +0 -0
- /package/dist/esm/{chunk-T7WBGP37.mjs.map → chunk-V75UHXGZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OUAQKVIC.mjs.map → chunk-VL6JZUYX.mjs.map} +0 -0
- /package/dist/esm/{chunk-MG3T24A3.mjs.map → chunk-WMBECPK5.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZMFVKUFD.mjs.map → chunk-WMHYIP3S.mjs.map} +0 -0
- /package/dist/esm/{chunk-FZ3HMVKE.mjs.map → chunk-WRRQ7L5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-BQIT7TKM.mjs.map → chunk-XJI57J4Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-OBKVMO7I.mjs.map → chunk-XNSOEUH7.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CB53WTP.mjs.map → chunk-XSNOPUMC.mjs.map} +0 -0
- /package/dist/esm/{chunk-BEXHZ5XT.mjs.map → chunk-XUT73RUR.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZHNCJSXO.mjs.map → chunk-YB5DCDJY.mjs.map} +0 -0
- /package/dist/esm/{chunk-BFRFAX5I.mjs.map → chunk-YDZBU2DJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-T52HPGL5.mjs.map → chunk-YZWR7OV5.mjs.map} +0 -0
|
@@ -9,7 +9,7 @@ declare class LocalNode {
|
|
|
9
9
|
* kills all the descendent processes
|
|
10
10
|
* of the node process, including the node process itself
|
|
11
11
|
*/
|
|
12
|
-
stop(): void
|
|
12
|
+
stop(): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Runs a local testnet and waits for process to be up.
|
|
15
15
|
*
|
|
@@ -164,6 +164,26 @@ declare class Move {
|
|
|
164
164
|
}): Promise<{
|
|
165
165
|
output: string;
|
|
166
166
|
}>;
|
|
167
|
+
/**
|
|
168
|
+
* Build a publication transaction payload and store it in a JSON output file
|
|
169
|
+
*
|
|
170
|
+
* @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)
|
|
171
|
+
* @param args.outputFile Output file to write publication transaction to
|
|
172
|
+
* @param args.namedAddresses Named addresses for the move binary
|
|
173
|
+
* @example
|
|
174
|
+
* {
|
|
175
|
+
* alice:0x1234, bob:0x5678
|
|
176
|
+
* }
|
|
177
|
+
*
|
|
178
|
+
* @returns stdout
|
|
179
|
+
*/
|
|
180
|
+
buildPublishPayload(args: {
|
|
181
|
+
packageDirectoryPath: string;
|
|
182
|
+
outputFile: string;
|
|
183
|
+
namedAddresses: Record<string, AccountAddress>;
|
|
184
|
+
}): Promise<{
|
|
185
|
+
output: string;
|
|
186
|
+
}>;
|
|
167
187
|
/**
|
|
168
188
|
* Function to run a Move script, please run compile before running this
|
|
169
189
|
*
|
package/dist/common/cli/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkBHKSQXUZjs = require('../chunk-BHKSQXUZ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}stop(){_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid)}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkBHKSQXUZjs = require('../chunk-BHKSQXUZ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid,r=>{r?e(r):s(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),t;r==="win32"?t=_child_process.spawn.call(void 0, s,e,{shell:!0}):t=_child_process.spawn.call(void 0, s,e),this.process=t,_optionalChain([t, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",a=>{let o=a.toString();console.log(o)})]),_optionalChain([t, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",a=>{let o=a.toString();console.log(o)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkBHKSQXUZjs.b.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var u=class{async init(s){let{network:e,profile:r}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","compile","--package-dir",e],a=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(a)),this.runCommand(t)}async test(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","test","--package-dir",e],a=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(a)),this.runCommand(t)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:t}=s,a=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(t, () => ("default"))}`],o=this.parseNamedAddresses(r);return a.push(...this.prepareNamedAddresses(o)),this.runCommand(a)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:t,profile:a}=s,o=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],i=this.parseNamedAddresses(t);o.push(...this.prepareNamedAddresses(i));let m=await this.runCommand(o);return{objectAddress:this.extractAddressFromOutput(m.output)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:t,profile:a}=s,o=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],i=this.parseNamedAddresses(t);return o.push(...this.prepareNamedAddresses(i)),this.runCommand(o)}async buildPublishPayload(s){let{outputFile:e,packageDirectoryPath:r,namedAddresses:t}=s,a=["aptos","move","build-publish-payload","--json-output-file",e,"--package-dir",r],o=this.parseNamedAddresses(t);return a.push(...this.prepareNamedAddresses(o)),this.runCommand(a)}async runScript(s){let{compiledScriptPath:e,profile:r}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async runCommand(s){return new Promise((e,r)=>{let t=_os.platform.call(void 0, ),a,o="";t==="win32"?a=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):a=_child_process.spawn.call(void 0, "npx",s),a.stdout.on("data",i=>{o+=i.toString()}),a.stdout.pipe(process.stdout),a.stderr.pipe(process.stderr),process.stdin.pipe(a.stdin),a.on("close",i=>{i===0?e({output:o}):r(new Error(`Child process exited with code ${i}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let t=[];return s.forEach((a,o)=>{let i=`${o}=${a.toString()}`;t.push(i)}),r.push(t.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let t=s[r];e.set(r,t)}),e}extractAddressFromOutput(s){let e=s.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)\\.");if(e)return e[1];throw new Error("Failed to extract object address from output")}};exports.LocalNode = c; exports.Move = u;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","platform","LocalNode","cliCommand","cliArgs","currentPlatform","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","packageDirectoryPath","namedAddresses","addressesMap","addressName","result","objectAddress","compiledScriptPath","resolve","reject","stdout","code","totalNames","newArgs","names","value","key","toAppend","address","output","match"],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MAAM,KAAKA,EAAa,KAAK,EAErCA,EAAa,GAAG,QAAUqB,GAAS,CAC7BA,IAAS,EACXH,EAAQ,CAAE,OAAQE,CAAO,CAAC,EAE1BD,EAAO,IAAI,MAAM,kCAAkCE,CAAI,EAAE,CAAC,CAE9D,CAAC,CACH,CAAC,CACH,CAaQ,sBAAsBT,EAA4D,CACxF,IAAMU,EAAaV,EAAe,KAC5BW,EAAyB,CAAC,EAEhC,GAAID,IAAe,EACjB,OAAOC,EAGTA,EAAQ,KAAK,mBAAmB,EAEhC,IAAMC,EAAuB,CAAC,EAC9B,OAAAZ,EAAe,QAAQ,CAACa,EAAOC,IAAQ,CACrC,IAAMC,EAAW,GAAGD,CAAG,IAAID,EAAM,SAAS,CAAC,GAC3CD,EAAM,KAAKG,CAAQ,CACrB,CAAC,EACDJ,EAAQ,KAAKC,EAAM,KAAK,GAAG,CAAC,EACrBD,CACT,CASQ,oBAAoBX,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASc,GAAQ,CAC3C,IAAME,EAAUhB,EAAec,CAAG,EAClCb,EAAa,IAAIa,EAAKE,CAAO,CAC/B,CAAC,EAEMf,CACT,CASQ,yBAAyBgB,EAAwB,CACvD,IAAMC,EAAQD,EAAO,MAAM,sEAAsE,EACjG,GAAIC,EACF,OAAOA,EAAM,CAAC,EAEhB,MAAM,IAAI,MAAM,8CAA8C,CAChE,CACF","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n stop() {\n if (!this.process?.pid) return;\n kill(this.process.pid);\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-local-testnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const 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 log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Network type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns stdout\n */\n async init(args: { network?: Network; profile?: string }): Promise<{ output: string }> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publish the modules to the publisher account on the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to create a new object and publish the Move package to it on the Aptos blockchain\n *\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 * @example\n * MoonCoin, please find the actual address name in Move.toml\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * 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 * @returns object address\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile } = 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 const result = await this.runCommand(cliArgs);\n return { objectAddress: this.extractAddressFromOutput(result.output) };\n }\n\n /**\n * Function to upgrade a Move package previously published to an object on the Aptos blockchain\n * Caller must be the object owner to call this function\n *\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\n * @example\n * 0x1000\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run a Move script, please run compile before running this\n *\n * @param args.compiledScriptPath Path to a compiled Move script bytecode file\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * build/my_package/bytecode_scripts/my_move_script.mv\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async runScript(args: { compiledScriptPath: string; profile?: string }): Promise<{ output: string }> {\n const { compiledScriptPath, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns stdout\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<{ output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\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 stdout += data.toString();\n });\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve({ output: stdout }); // Resolve with stdout if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n 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 * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extract object address from the output\n *\n * @param output\n * @returns object address\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":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","platform","LocalNode","resolve","reject","err","cliCommand","cliArgs","currentPlatform","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","packageDirectoryPath","namedAddresses","addressesMap","addressName","result","objectAddress","outputFile","compiledScriptPath","stdout","code","totalNames","newArgs","names","value","key","toAppend","address","output","match"],"mappings":"yCAAA,OAAyC,SAAAA,MAAa,gBACtD,OAAOC,MAAU,YACjB,OAAS,YAAAC,MAAgB,KAIlB,IAAMC,EAAN,KAAgB,CAAhB,cACL,KAAS,sBAAwB,GAEjC,KAAS,mBAAqB,yBAE9B,aAAiD,KAMjD,MAAM,MAAO,CACX,MAAM,IAAI,QAAQ,CAACC,EAASC,IAAW,CAChC,KAAK,SAAS,KACnBJ,EAAK,KAAK,QAAQ,IAAMK,GAAQ,CAC1BA,EACFD,EAAOC,CAAG,EAEVF,EAAQ,EAAI,CAEhB,CAAC,CACH,CAAC,CACH,CAQA,MAAM,KAAM,CACO,MAAM,KAAK,mBAAmB,IAI/C,KAAK,MAAM,EACX,MAAM,KAAK,qBAAqB,EAClC,CAKA,OAAQ,CACN,IAAMG,EAAa,MACbC,EAAU,CAAC,QAAS,OAAQ,eAAgB,kBAAmB,eAAgB,oBAAoB,EAEnGC,EAAkBP,EAAS,EAC7BQ,EAEAD,IAAoB,QACtBC,EAAeV,EAAMO,EAAYC,EAAS,CAAE,MAAO,EAAK,CAAC,EAEzDE,EAAeV,EAAMO,EAAYC,CAAO,EAG1C,KAAK,QAAUE,EAEfA,EAAa,QAAQ,GAAG,OAASC,GAAc,CAC7C,IAAMC,EAAMD,EAAK,SAAS,EAG1B,QAAQ,IAAIC,CAAG,CACjB,CAAC,EAEDF,EAAa,QAAQ,GAAG,OAASC,GAAc,CAC7C,IAAMC,EAAMD,EAAK,SAAS,EAG1B,QAAQ,IAAIC,CAAG,CACjB,C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C,EAAM,KAAK,GAAG,CAAC,EACrBD,CACT,CASQ,oBAAoBV,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASa,GAAQ,CAC3C,IAAME,EAAUf,EAAea,CAAG,EAClCZ,EAAa,IAAIY,EAAKE,CAAO,CAC/B,CAAC,EAEMd,CACT,CASQ,yBAAyBe,EAAwB,CACvD,IAAMC,EAAQD,EAAO,MAAM,sEAAsE,EACjG,GAAIC,EACF,OAAOA,EAAM,CAAC,EAEhB,MAAM,IAAI,MAAM,8CAA8C,CAChE,CACF","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n async stop() {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\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 process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-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 log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Network type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns stdout\n */\n async init(args: { network?: Network; profile?: string }): Promise<{ output: string }> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publish the modules to the publisher account on the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to create a new object and publish the Move package to it on the Aptos blockchain\n *\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 * @example\n * MoonCoin, please find the actual address name in Move.toml\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * 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 * @returns object address\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile } = 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 const result = await this.runCommand(cliArgs);\n return { objectAddress: this.extractAddressFromOutput(result.output) };\n }\n\n /**\n * Function to upgrade a Move package previously published to an object on the Aptos blockchain\n * Caller must be the object owner to call this function\n *\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\n * @example\n * 0x1000\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.outputFile Output file to write publication transaction to\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n }) {\n const { outputFile, packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run a Move script, please run compile before running this\n *\n * @param args.compiledScriptPath Path to a compiled Move script bytecode file\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * build/my_package/bytecode_scripts/my_move_script.mv\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async runScript(args: { compiledScriptPath: string; profile?: string }): Promise<{ output: string }> {\n const { compiledScriptPath, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns stdout\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<{ output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\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 stdout += data.toString();\n });\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve({ output: stdout }); // Resolve with stdout if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n 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 * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extract object address from the output\n *\n * @param output\n * @returns object address\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
|
@@ -887,6 +887,13 @@ interface PrivateKey {
|
|
|
887
887
|
toUint8Array(): Uint8Array;
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
+
/**
|
|
891
|
+
* Checks if an ED25519 signature is non-canonical.
|
|
892
|
+
*
|
|
893
|
+
* Comes from Aptos Core
|
|
894
|
+
* https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos-crypto/src/ed25519/ed25519_sigs.rs#L47-L85
|
|
895
|
+
*/
|
|
896
|
+
declare function isCanonicalEd25519Signature(signature: Signature): boolean;
|
|
890
897
|
/**
|
|
891
898
|
* Represents the public key of an Ed25519 key pair.
|
|
892
899
|
*
|
|
@@ -931,6 +938,7 @@ declare class Ed25519PublicKey extends AccountPublicKey {
|
|
|
931
938
|
* @deprecated use `instanceof Ed25519PublicKey` instead.
|
|
932
939
|
*/
|
|
933
940
|
static isPublicKey(publicKey: AccountPublicKey): publicKey is Ed25519PublicKey;
|
|
941
|
+
static isInstance(publicKey: PublicKey): publicKey is Ed25519PublicKey;
|
|
934
942
|
}
|
|
935
943
|
/**
|
|
936
944
|
* Represents the private key of an Ed25519 key pair.
|
|
@@ -1033,13 +1041,6 @@ declare class Ed25519Signature extends Signature {
|
|
|
1033
1041
|
toUint8Array(): Uint8Array;
|
|
1034
1042
|
serialize(serializer: Serializer): void;
|
|
1035
1043
|
static deserialize(deserializer: Deserializer): Ed25519Signature;
|
|
1036
|
-
/**
|
|
1037
|
-
* Checks if an ED25519 signature is non-canonical.
|
|
1038
|
-
*
|
|
1039
|
-
* Comes from Aptos Core
|
|
1040
|
-
* https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos-crypto/src/ed25519/ed25519_sigs.rs#L47-L85
|
|
1041
|
-
*/
|
|
1042
|
-
isCanonicalSignature(): boolean;
|
|
1043
1044
|
}
|
|
1044
1045
|
|
|
1045
1046
|
type DerivedKeys = {
|
|
@@ -1253,6 +1254,7 @@ declare class AnyPublicKey extends AccountPublicKey {
|
|
|
1253
1254
|
* @deprecated use `publicKey instanceof Secp256k1PublicKey` instead.
|
|
1254
1255
|
*/
|
|
1255
1256
|
isSecp256k1PublicKey(): boolean;
|
|
1257
|
+
static isInstance(publicKey: PublicKey): publicKey is AnyPublicKey;
|
|
1256
1258
|
}
|
|
1257
1259
|
/**
|
|
1258
1260
|
* Instance of signature that uses the SingleKey authentication scheme.
|
|
@@ -1269,6 +1271,7 @@ declare class AnySignature extends Signature {
|
|
|
1269
1271
|
toUint8Array(): Uint8Array;
|
|
1270
1272
|
serialize(serializer: Serializer): void;
|
|
1271
1273
|
static deserialize(deserializer: Deserializer): AnySignature;
|
|
1274
|
+
static isInstance(signature: Signature): signature is AnySignature;
|
|
1272
1275
|
}
|
|
1273
1276
|
|
|
1274
1277
|
/**
|
|
@@ -1666,6 +1669,7 @@ declare class KeylessPublicKey extends AccountPublicKey {
|
|
|
1666
1669
|
pepper: HexInput;
|
|
1667
1670
|
uidKey?: string;
|
|
1668
1671
|
}): KeylessPublicKey;
|
|
1672
|
+
static isInstance(publicKey: PublicKey): boolean;
|
|
1669
1673
|
}
|
|
1670
1674
|
/**
|
|
1671
1675
|
* A signature of a message signed via Keyless Accounnt that uses proofs or the jwt token to authenticate.
|
|
@@ -1911,6 +1915,7 @@ declare class Secp256k1PublicKey extends PublicKey {
|
|
|
1911
1915
|
* @param publicKey
|
|
1912
1916
|
*/
|
|
1913
1917
|
static isPublicKey(publicKey: PublicKey): publicKey is Secp256k1PublicKey;
|
|
1918
|
+
static isInstance(publicKey: PublicKey): publicKey is Secp256k1PublicKey;
|
|
1914
1919
|
}
|
|
1915
1920
|
/**
|
|
1916
1921
|
* A Secp256k1 ecdsa private key
|
|
@@ -6587,4 +6592,4 @@ declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAp
|
|
|
6587
6592
|
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6588
6593
|
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6589
6594
|
|
|
6590
|
-
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, 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, type 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, type FailureEventData, FaucetConfig, 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, 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, KeylessPublicKey, KeylessSignature, 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, 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, type PrivateKey, type PrivateKeyFromDerivationPathArgs, 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, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, 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, buildTransaction, checkOrConvertArgument, convertArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, getKeylessConfig, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEmptyOption, isEncodedEntryFunctionArgument, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|
|
6595
|
+
export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, 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, type 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, type FailureEventData, FaucetConfig, 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, 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, KeylessPublicKey, KeylessSignature, 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, 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, type PrivateKey, type PrivateKeyFromDerivationPathArgs, 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, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, 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, buildTransaction, checkOrConvertArgument, convertArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, getKeylessConfig, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
|