@aptos-labs/ts-sdk 1.20.0 → 1.21.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 +85 -11
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/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/{chunk-XZBGNMFN.mjs → chunk-3NPBKAPF.mjs} +2 -2
- package/dist/esm/{chunk-3CEN6LXR.mjs → chunk-43IKKJ2Y.mjs} +2 -2
- package/dist/esm/{chunk-5MFDTDK2.mjs → chunk-4GNJJZ4R.mjs} +2 -2
- package/dist/esm/chunk-5M235PLS.mjs +2 -0
- package/dist/esm/chunk-5M235PLS.mjs.map +1 -0
- package/dist/esm/{chunk-6QTWWNRH.mjs → chunk-6TRGVQLA.mjs} +2 -2
- package/dist/esm/{chunk-5ZBDXUER.mjs → chunk-7RVYF5OP.mjs} +2 -2
- package/dist/esm/{chunk-32BE76A3.mjs → chunk-CUSKA6RZ.mjs} +2 -2
- package/dist/esm/{chunk-BLAIJHMU.mjs → chunk-GWH34VNI.mjs} +2 -2
- package/dist/esm/{chunk-PTK4OJ2U.mjs → chunk-IN2L5ZAT.mjs} +2 -2
- package/dist/esm/{chunk-CCUUYI4Z.mjs → chunk-IPGKZUSA.mjs} +2 -2
- package/dist/esm/{chunk-ARMY5A3J.mjs → chunk-IPTCWBFV.mjs} +2 -2
- package/dist/esm/{chunk-NWAGENBX.mjs → chunk-JB5R6RGF.mjs} +2 -2
- package/dist/esm/{chunk-M2J7QC7G.mjs → chunk-KDIPFPMS.mjs} +2 -2
- package/dist/esm/{chunk-7DDRPSWU.mjs → chunk-LTMOMXPN.mjs} +2 -2
- package/dist/esm/{chunk-GQ6Q7KK5.mjs → chunk-NAGFCYG6.mjs} +2 -2
- package/dist/esm/{chunk-WHQNLKFO.mjs → chunk-NLJVP5RP.mjs} +2 -2
- package/dist/esm/{chunk-NJYVAMTG.mjs → chunk-OVG4SGPI.mjs} +2 -2
- package/dist/esm/{chunk-V2LIP26A.mjs → chunk-P43CXEO4.mjs} +2 -2
- package/dist/esm/{chunk-HNTKL7NS.mjs → chunk-S7G6VBUB.mjs} +2 -2
- package/dist/esm/{chunk-RM2IVUJ2.mjs → chunk-SK2HTEP7.mjs} +2 -2
- package/dist/esm/{chunk-RA56CRJB.mjs → chunk-TCEOTADF.mjs} +2 -2
- package/dist/esm/{chunk-4KAXCXAK.mjs → chunk-TWRYY6DD.mjs} +2 -2
- package/dist/esm/{chunk-MTPARVMT.mjs → chunk-V5COHBA4.mjs} +2 -2
- package/dist/esm/{chunk-TPMVNFS5.mjs → chunk-VEGT6ZPK.mjs} +2 -2
- package/dist/esm/{chunk-NZFKPV67.mjs → chunk-VN2CRWOI.mjs} +2 -2
- package/dist/esm/{chunk-PZAA2YYO.mjs → chunk-W26LO3CR.mjs} +2 -2
- package/dist/esm/{chunk-COJZFWV3.mjs → chunk-XVWNPR4T.mjs} +2 -2
- package/dist/esm/{chunk-V4SPDICR.mjs → chunk-Z4CGG42L.mjs} +2 -2
- package/dist/esm/{chunk-MIEXKKJP.mjs → chunk-ZL4JYTID.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.d.mts +85 -11
- 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/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +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/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/package.json +1 -1
- package/src/cli/move.ts +152 -13
- package/src/core/index.ts +1 -0
- package/src/internal/event.ts +3 -21
- package/src/version.ts +1 -1
- package/dist/esm/chunk-SYV4KFI7.mjs +0 -2
- package/dist/esm/chunk-SYV4KFI7.mjs.map +0 -1
- /package/dist/esm/{chunk-XZBGNMFN.mjs.map → chunk-3NPBKAPF.mjs.map} +0 -0
- /package/dist/esm/{chunk-3CEN6LXR.mjs.map → chunk-43IKKJ2Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-5MFDTDK2.mjs.map → chunk-4GNJJZ4R.mjs.map} +0 -0
- /package/dist/esm/{chunk-6QTWWNRH.mjs.map → chunk-6TRGVQLA.mjs.map} +0 -0
- /package/dist/esm/{chunk-5ZBDXUER.mjs.map → chunk-7RVYF5OP.mjs.map} +0 -0
- /package/dist/esm/{chunk-32BE76A3.mjs.map → chunk-CUSKA6RZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BLAIJHMU.mjs.map → chunk-GWH34VNI.mjs.map} +0 -0
- /package/dist/esm/{chunk-PTK4OJ2U.mjs.map → chunk-IN2L5ZAT.mjs.map} +0 -0
- /package/dist/esm/{chunk-CCUUYI4Z.mjs.map → chunk-IPGKZUSA.mjs.map} +0 -0
- /package/dist/esm/{chunk-ARMY5A3J.mjs.map → chunk-IPTCWBFV.mjs.map} +0 -0
- /package/dist/esm/{chunk-NWAGENBX.mjs.map → chunk-JB5R6RGF.mjs.map} +0 -0
- /package/dist/esm/{chunk-M2J7QC7G.mjs.map → chunk-KDIPFPMS.mjs.map} +0 -0
- /package/dist/esm/{chunk-7DDRPSWU.mjs.map → chunk-LTMOMXPN.mjs.map} +0 -0
- /package/dist/esm/{chunk-GQ6Q7KK5.mjs.map → chunk-NAGFCYG6.mjs.map} +0 -0
- /package/dist/esm/{chunk-WHQNLKFO.mjs.map → chunk-NLJVP5RP.mjs.map} +0 -0
- /package/dist/esm/{chunk-NJYVAMTG.mjs.map → chunk-OVG4SGPI.mjs.map} +0 -0
- /package/dist/esm/{chunk-V2LIP26A.mjs.map → chunk-P43CXEO4.mjs.map} +0 -0
- /package/dist/esm/{chunk-HNTKL7NS.mjs.map → chunk-S7G6VBUB.mjs.map} +0 -0
- /package/dist/esm/{chunk-RM2IVUJ2.mjs.map → chunk-SK2HTEP7.mjs.map} +0 -0
- /package/dist/esm/{chunk-RA56CRJB.mjs.map → chunk-TCEOTADF.mjs.map} +0 -0
- /package/dist/esm/{chunk-4KAXCXAK.mjs.map → chunk-TWRYY6DD.mjs.map} +0 -0
- /package/dist/esm/{chunk-MTPARVMT.mjs.map → chunk-V5COHBA4.mjs.map} +0 -0
- /package/dist/esm/{chunk-TPMVNFS5.mjs.map → chunk-VEGT6ZPK.mjs.map} +0 -0
- /package/dist/esm/{chunk-NZFKPV67.mjs.map → chunk-VN2CRWOI.mjs.map} +0 -0
- /package/dist/esm/{chunk-PZAA2YYO.mjs.map → chunk-W26LO3CR.mjs.map} +0 -0
- /package/dist/esm/{chunk-COJZFWV3.mjs.map → chunk-XVWNPR4T.mjs.map} +0 -0
- /package/dist/esm/{chunk-V4SPDICR.mjs.map → chunk-Z4CGG42L.mjs.map} +0 -0
- /package/dist/esm/{chunk-MIEXKKJP.mjs.map → chunk-ZL4JYTID.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../chunk-UYF7AQLE.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-CPCS5KIA.mjs";import"../../chunk-GCPWPGCS.mjs";import"../../chunk-T7YRD4PM.mjs";import"../../chunk-C2IJG37E.mjs";import"../../chunk-YDXU6ALO.mjs";import"../../chunk-PVEPP4HR.mjs";import"../../chunk-RFA7BIDN.mjs";import"../../chunk-TY4IEDJD.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c,d}from"../../chunk-UYF7AQLE.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-CPCS5KIA.mjs";import"../../chunk-GCPWPGCS.mjs";import"../../chunk-T7YRD4PM.mjs";import"../../chunk-C2IJG37E.mjs";import"../../chunk-YDXU6ALO.mjs";import"../../chunk-PVEPP4HR.mjs";import"../../chunk-RFA7BIDN.mjs";import"../../chunk-TY4IEDJD.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-H6QWMF3Q.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-LBU3LV7I.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-4KYQ7N3N.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as deriveTransactionType,b as generateSigningMessage,c as generateSigningMessageForSerializable,d as generateSigningMessageForTransaction};
|
|
2
2
|
//# sourceMappingURL=signingMessage.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-W26LO3CR.mjs";import"../../chunk-463B3NF7.mjs";import"../../chunk-3VUSIKCF.mjs";import"../../chunk-6DDSU7HN.mjs";import"../../chunk-PY23BQ2H.mjs";import"../../chunk-I2T6BJOA.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-VN2CRWOI.mjs";import"../../chunk-L6RINMT6.mjs";import"../../chunk-YMFEA2TJ.mjs";import"../../chunk-7CMCN6LB.mjs";import"../../chunk-H6CS3BD7.mjs";import"../../chunk-J5KAD2RM.mjs";import"../../chunk-VQPLSJEI.mjs";import"../../chunk-7X6HZUXX.mjs";import"../../chunk-YTQVMLFD.mjs";import"../../chunk-J5YHMYHB.mjs";import"../../chunk-UYF7AQLE.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-CPCS5KIA.mjs";import"../../chunk-GCPWPGCS.mjs";import"../../chunk-T7YRD4PM.mjs";import"../../chunk-C2IJG37E.mjs";import"../../chunk-YDXU6ALO.mjs";import"../../chunk-PVEPP4HR.mjs";import"../../chunk-RFA7BIDN.mjs";import"../../chunk-TY4IEDJD.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-H6QWMF3Q.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-LBU3LV7I.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-4KYQ7N3N.mjs";import"../../chunk-FVA2OPG4.mjs";export{f as buildTransaction,e as generateRawTransaction,i as generateSignedTransaction,g as generateSignedTransactionForSimulation,a as generateTransactionPayload,b as generateTransactionPayloadWithABI,k as generateUserTransactionHash,c as generateViewFunctionPayload,d as generateViewFunctionPayloadWithABI,h as getAuthenticatorForSimulation,j as hashValues};
|
|
2
2
|
//# sourceMappingURL=transactionBuilder.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-RFA7BIDN.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"../../chunk-RFA7BIDN.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-4KYQ7N3N.mjs";import"../../chunk-FVA2OPG4.mjs";export{o as StructTag,a as TypeTag,i as TypeTagAddress,b as TypeTagBool,l as TypeTagGeneric,k as TypeTagReference,j as TypeTagSigner,n as TypeTagStruct,g as TypeTagU128,d as TypeTagU16,h as TypeTagU256,e as TypeTagU32,f as TypeTagU64,c as TypeTagU8,m as TypeTagVector,p as aptosCoinStructTag,s as objectStructTag,r as optionStructTag,q as stringStructTag};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-3VUSIKCF.mjs";import"../../chunk-RFA7BIDN.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-
|
|
1
|
+
import{a,b,c}from"../../chunk-3VUSIKCF.mjs";import"../../chunk-RFA7BIDN.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-7WFKAS7T.mjs";import"../../chunk-4ARX2MGY.mjs";import"../../chunk-SQQ2424E.mjs";import"../../chunk-UJYWEIQ2.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-67BD7B6N.mjs";import"../../chunk-F6REP536.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-77NXCSLY.mjs";import"../../chunk-BF46IXHH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-LBKYNX5K.mjs";import"../../chunk-Y2H7FG2P.mjs";import"../../chunk-TZOKV22Z.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-Q6LFIZ3L.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-4KYQ7N3N.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
|
|
2
2
|
//# sourceMappingURL=parser.mjs.map
|
package/package.json
CHANGED
package/src/cli/move.ts
CHANGED
|
@@ -9,13 +9,13 @@ export class Move {
|
|
|
9
9
|
* Function to initialize current directory for Aptos
|
|
10
10
|
*
|
|
11
11
|
* Configuration will be pushed into .aptos/config.yaml
|
|
12
|
-
* @param args.network optional
|
|
12
|
+
* @param args.network optional Network type argument to use for default settings, default is local
|
|
13
13
|
* @param args.profile optional Profile to use from the config file, default is 'default'
|
|
14
14
|
* This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.
|
|
15
15
|
*
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns stdout
|
|
17
17
|
*/
|
|
18
|
-
async init(args: { network?: Network; profile?: string }): Promise<
|
|
18
|
+
async init(args: { network?: Network; profile?: string }): Promise<{ output: string }> {
|
|
19
19
|
const { network, profile } = args;
|
|
20
20
|
const cliArgs = ["aptos", "init", `--network=${network ?? "local"}`, `--profile=${profile ?? "default"}`];
|
|
21
21
|
|
|
@@ -32,12 +32,12 @@ export class Move {
|
|
|
32
32
|
* alice:0x1234, bob:0x5678
|
|
33
33
|
* }
|
|
34
34
|
*
|
|
35
|
-
* @returns
|
|
35
|
+
* @returns stdout
|
|
36
36
|
*/
|
|
37
37
|
async compile(args: {
|
|
38
38
|
packageDirectoryPath: string;
|
|
39
39
|
namedAddresses: Record<string, AccountAddress>;
|
|
40
|
-
}): Promise<
|
|
40
|
+
}): Promise<{ output: string }> {
|
|
41
41
|
const { packageDirectoryPath, namedAddresses } = args;
|
|
42
42
|
const cliArgs = ["aptos", "move", "compile", "--package-dir", packageDirectoryPath];
|
|
43
43
|
|
|
@@ -58,9 +58,12 @@ export class Move {
|
|
|
58
58
|
* alice:0x1234, bob:0x5678
|
|
59
59
|
* }
|
|
60
60
|
*
|
|
61
|
-
* @returns
|
|
61
|
+
* @returns stdout
|
|
62
62
|
*/
|
|
63
|
-
async test(args: {
|
|
63
|
+
async test(args: {
|
|
64
|
+
packageDirectoryPath: string;
|
|
65
|
+
namedAddresses: Record<string, AccountAddress>;
|
|
66
|
+
}): Promise<{ output: string }> {
|
|
64
67
|
const { packageDirectoryPath, namedAddresses } = args;
|
|
65
68
|
const cliArgs = ["aptos", "move", "test", "--package-dir", packageDirectoryPath];
|
|
66
69
|
|
|
@@ -72,7 +75,7 @@ export class Move {
|
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
/**
|
|
75
|
-
* Function to
|
|
78
|
+
* Function to publish the modules to the publisher account on the Aptos blockchain
|
|
76
79
|
*
|
|
77
80
|
* @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)
|
|
78
81
|
* @param args.namedAddresses Named addresses for the move binary
|
|
@@ -82,13 +85,13 @@ export class Move {
|
|
|
82
85
|
* }
|
|
83
86
|
* @param args.profile optional Profile to use from the config file.
|
|
84
87
|
*
|
|
85
|
-
* @returns
|
|
88
|
+
* @returns stdout
|
|
86
89
|
*/
|
|
87
90
|
async publish(args: {
|
|
88
91
|
packageDirectoryPath: string;
|
|
89
92
|
namedAddresses: Record<string, AccountAddress>;
|
|
90
93
|
profile?: string;
|
|
91
|
-
}): Promise<
|
|
94
|
+
}): Promise<{ output: string }> {
|
|
92
95
|
const { packageDirectoryPath, namedAddresses, profile } = args;
|
|
93
96
|
const cliArgs = [
|
|
94
97
|
"aptos",
|
|
@@ -106,17 +109,134 @@ export class Move {
|
|
|
106
109
|
return this.runCommand(cliArgs);
|
|
107
110
|
}
|
|
108
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Function to create a new object and publish the Move package to it on the Aptos blockchain
|
|
114
|
+
*
|
|
115
|
+
* @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)
|
|
116
|
+
* @param args.addressName Address name for the Move package
|
|
117
|
+
* @example
|
|
118
|
+
* MoonCoin, please find the actual address name in Move.toml
|
|
119
|
+
* @param args.namedAddresses Named addresses for the move binary
|
|
120
|
+
* @example
|
|
121
|
+
* {
|
|
122
|
+
* alice:0x1234, bob:0x5678
|
|
123
|
+
* }
|
|
124
|
+
* @param args.profile optional Profile to use from the config file.
|
|
125
|
+
*
|
|
126
|
+
* A complete example in cli
|
|
127
|
+
* aptos move create-object-and-publish-package \
|
|
128
|
+
* --package-dir path_to_directory_that_has_move.toml \
|
|
129
|
+
* --address-name launchpad_addr \
|
|
130
|
+
* --named-addresses "launchpad_addr=0x123,initial_creator_addr=0x456"\
|
|
131
|
+
* --profile my_profile \
|
|
132
|
+
* --assume-yes
|
|
133
|
+
* @returns object address
|
|
134
|
+
*/
|
|
135
|
+
async createObjectAndPublishPackage(args: {
|
|
136
|
+
packageDirectoryPath: string;
|
|
137
|
+
addressName: string;
|
|
138
|
+
namedAddresses: Record<string, AccountAddress>;
|
|
139
|
+
profile?: string;
|
|
140
|
+
}): Promise<{ objectAddress: string }> {
|
|
141
|
+
const { packageDirectoryPath, addressName, namedAddresses, profile } = args;
|
|
142
|
+
const cliArgs = [
|
|
143
|
+
"aptos",
|
|
144
|
+
"move",
|
|
145
|
+
"create-object-and-publish-package",
|
|
146
|
+
"--package-dir",
|
|
147
|
+
packageDirectoryPath,
|
|
148
|
+
"--address-name",
|
|
149
|
+
addressName,
|
|
150
|
+
`--profile=${profile ?? "default"}`,
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
const addressesMap = this.parseNamedAddresses(namedAddresses);
|
|
154
|
+
|
|
155
|
+
cliArgs.push(...this.prepareNamedAddresses(addressesMap));
|
|
156
|
+
|
|
157
|
+
const result = await this.runCommand(cliArgs);
|
|
158
|
+
return { objectAddress: this.extractAddressFromOutput(result.output) };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Function to upgrade a Move package previously published to an object on the Aptos blockchain
|
|
163
|
+
* Caller must be the object owner to call this function
|
|
164
|
+
*
|
|
165
|
+
* @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)
|
|
166
|
+
* @param args.objectAddress Address of the object that the Move package published to
|
|
167
|
+
* @example
|
|
168
|
+
* 0x1000
|
|
169
|
+
* @param args.namedAddresses Named addresses for the move binary
|
|
170
|
+
* @example
|
|
171
|
+
* {
|
|
172
|
+
* alice:0x1234, bob:0x5678
|
|
173
|
+
* }
|
|
174
|
+
* @param args.profile optional Profile to use from the config file.
|
|
175
|
+
*
|
|
176
|
+
* @returns stdout
|
|
177
|
+
*/
|
|
178
|
+
async upgradeObjectPackage(args: {
|
|
179
|
+
packageDirectoryPath: string;
|
|
180
|
+
objectAddress: string;
|
|
181
|
+
namedAddresses: Record<string, AccountAddress>;
|
|
182
|
+
profile?: string;
|
|
183
|
+
}): Promise<{ output: string }> {
|
|
184
|
+
const { packageDirectoryPath, objectAddress, namedAddresses, profile } = args;
|
|
185
|
+
const cliArgs = [
|
|
186
|
+
"aptos",
|
|
187
|
+
"move",
|
|
188
|
+
"upgrade-object-package",
|
|
189
|
+
"--package-dir",
|
|
190
|
+
packageDirectoryPath,
|
|
191
|
+
"--object-address",
|
|
192
|
+
objectAddress,
|
|
193
|
+
`--profile=${profile ?? "default"}`,
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
const addressesMap = this.parseNamedAddresses(namedAddresses);
|
|
197
|
+
|
|
198
|
+
cliArgs.push(...this.prepareNamedAddresses(addressesMap));
|
|
199
|
+
|
|
200
|
+
return this.runCommand(cliArgs);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Function to run a Move script, please run compile before running this
|
|
205
|
+
*
|
|
206
|
+
* @param args.compiledScriptPath Path to a compiled Move script bytecode file
|
|
207
|
+
* @param args.namedAddresses Named addresses for the move binary
|
|
208
|
+
* @example
|
|
209
|
+
* build/my_package/bytecode_scripts/my_move_script.mv
|
|
210
|
+
* @param args.profile optional Profile to use from the config file.
|
|
211
|
+
*
|
|
212
|
+
* @returns stdout
|
|
213
|
+
*/
|
|
214
|
+
async runScript(args: { compiledScriptPath: string; profile?: string }): Promise<{ output: string }> {
|
|
215
|
+
const { compiledScriptPath, profile } = args;
|
|
216
|
+
const cliArgs = [
|
|
217
|
+
"aptos",
|
|
218
|
+
"move",
|
|
219
|
+
"run-script",
|
|
220
|
+
"--compiled-script-path",
|
|
221
|
+
compiledScriptPath,
|
|
222
|
+
`--profile=${profile ?? "default"}`,
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
return this.runCommand(cliArgs);
|
|
226
|
+
}
|
|
227
|
+
|
|
109
228
|
/**
|
|
110
229
|
* Run a move command
|
|
111
230
|
*
|
|
112
231
|
* @param args
|
|
113
|
-
* @returns
|
|
232
|
+
* @returns stdout
|
|
114
233
|
*/
|
|
115
234
|
// eslint-disable-next-line class-methods-use-this
|
|
116
|
-
private async runCommand(args: Array<string>): Promise<
|
|
235
|
+
private async runCommand(args: Array<string>): Promise<{ output: string }> {
|
|
117
236
|
return new Promise((resolve, reject) => {
|
|
118
237
|
const currentPlatform = platform();
|
|
119
238
|
let childProcess;
|
|
239
|
+
let stdout = "";
|
|
120
240
|
|
|
121
241
|
// Check if current OS is windows
|
|
122
242
|
if (currentPlatform === "win32") {
|
|
@@ -125,13 +245,17 @@ export class Move {
|
|
|
125
245
|
childProcess = spawn("npx", args);
|
|
126
246
|
}
|
|
127
247
|
|
|
248
|
+
childProcess.stdout.on("data", (data) => {
|
|
249
|
+
stdout += data.toString();
|
|
250
|
+
});
|
|
251
|
+
|
|
128
252
|
childProcess.stdout.pipe(process.stdout);
|
|
129
253
|
childProcess.stderr.pipe(process.stderr);
|
|
130
254
|
process.stdin.pipe(childProcess.stdin);
|
|
131
255
|
|
|
132
256
|
childProcess.on("close", (code) => {
|
|
133
257
|
if (code === 0) {
|
|
134
|
-
resolve(
|
|
258
|
+
resolve({ output: stdout }); // Resolve with stdout if the child process exits successfully
|
|
135
259
|
} else {
|
|
136
260
|
reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code
|
|
137
261
|
}
|
|
@@ -186,4 +310,19 @@ export class Move {
|
|
|
186
310
|
|
|
187
311
|
return addressesMap;
|
|
188
312
|
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Extract object address from the output
|
|
316
|
+
*
|
|
317
|
+
* @param output
|
|
318
|
+
* @returns object address
|
|
319
|
+
*/
|
|
320
|
+
// eslint-disable-next-line class-methods-use-this
|
|
321
|
+
private extractAddressFromOutput(output: string): string {
|
|
322
|
+
const match = output.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)\\.");
|
|
323
|
+
if (match) {
|
|
324
|
+
return match[1];
|
|
325
|
+
}
|
|
326
|
+
throw new Error("Failed to extract object address from output");
|
|
327
|
+
}
|
|
189
328
|
}
|
package/src/core/index.ts
CHANGED
package/src/internal/event.ts
CHANGED
|
@@ -37,13 +37,7 @@ export async function getModuleEventsByEventType(args: {
|
|
|
37
37
|
indexed_type: { _eq: eventType },
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
where: whereCondition,
|
|
42
|
-
pagination: options,
|
|
43
|
-
orderBy: options?.orderBy,
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return getEvents({ aptosConfig, options: customOptions });
|
|
40
|
+
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
47
41
|
}
|
|
48
42
|
|
|
49
43
|
export async function getAccountEventsByCreationNumber(args: {
|
|
@@ -60,13 +54,7 @@ export async function getAccountEventsByCreationNumber(args: {
|
|
|
60
54
|
creation_number: { _eq: creationNumber },
|
|
61
55
|
};
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
where: whereCondition,
|
|
65
|
-
pagination: options,
|
|
66
|
-
orderBy: options?.orderBy,
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
return getEvents({ aptosConfig, options: customOptions });
|
|
57
|
+
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
70
58
|
}
|
|
71
59
|
|
|
72
60
|
export async function getAccountEventsByEventType(args: {
|
|
@@ -83,13 +71,7 @@ export async function getAccountEventsByEventType(args: {
|
|
|
83
71
|
indexed_type: { _eq: eventType },
|
|
84
72
|
};
|
|
85
73
|
|
|
86
|
-
|
|
87
|
-
where: whereCondition,
|
|
88
|
-
pagination: options,
|
|
89
|
-
orderBy: options?.orderBy,
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
return getEvents({ aptosConfig, options: customOptions });
|
|
74
|
+
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
93
75
|
}
|
|
94
76
|
|
|
95
77
|
export async function getEvents(args: {
|
package/src/version.ts
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{spawn as n}from"child_process";import{platform as c}from"os";var d=class{async init(e){let{network:o,profile:s}=e,r=["aptos","init",`--network=${o??"local"}`,`--profile=${s??"default"}`];return this.runCommand(r)}async compile(e){let{packageDirectoryPath:o,namedAddresses:s}=e,r=["aptos","move","compile","--package-dir",o],t=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(t)),this.runCommand(r)}async test(e){let{packageDirectoryPath:o,namedAddresses:s}=e,r=["aptos","move","test","--package-dir",o],t=this.parseNamedAddresses(s);return r.push(...this.prepareNamedAddresses(t)),this.runCommand(r)}async publish(e){let{packageDirectoryPath:o,namedAddresses:s,profile:r}=e,t=["aptos","move","publish","--package-dir",o,`--profile=${r??"default"}`],a=this.parseNamedAddresses(s);return t.push(...this.prepareNamedAddresses(a)),this.runCommand(t)}async runCommand(e){return new Promise((o,s)=>{let r=c(),t;r==="win32"?t=n("npx",e,{shell:!0}):t=n("npx",e),t.stdout.pipe(process.stdout),t.stderr.pipe(process.stderr),process.stdin.pipe(t.stdin),t.on("close",a=>{a===0?o(!0):s(new Error(`Child process exited with code ${a}`))})})}prepareNamedAddresses(e){let o=e.size,s=[];if(o===0)return s;s.push("--named-addresses");let r=[];return e.forEach((t,a)=>{let i=`${a}=${t.toString()}`;r.push(i)}),s.push(r.join(",")),s}parseNamedAddresses(e){let o=new Map;return Object.keys(e).forEach(s=>{let r=e[s];o.set(s,r)}),o}};export{d as a};
|
|
2
|
-
//# sourceMappingURL=chunk-SYV4KFI7.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/move.ts"],"sourcesContent":["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 Netowrk type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns\n */\n async init(args: { network?: Network; profile?: string }): Promise<boolean> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publishe the modules in a Move package to the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\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.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve(true); // Resolve with true if the child process exits successfully\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n 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"],"mappings":"AAAA,OAAS,SAAAA,MAAa,gBACtB,OAAS,YAAAC,MAAgB,KAKlB,IAAMC,EAAN,KAAW,CAWhB,MAAM,KAAKC,EAAiE,CAC1E,GAAM,CAAE,QAAAC,EAAS,QAAAC,CAAQ,EAAIF,EACvBG,EAAU,CAAC,QAAS,OAAQ,aAAaF,GAAW,OAAO,GAAI,aAAaC,GAAW,SAAS,EAAE,EAExG,OAAO,KAAK,WAAWC,CAAO,CAChC,CAcA,MAAM,QAAQH,EAGO,CACnB,GAAM,CAAE,qBAAAI,EAAsB,eAAAC,CAAe,EAAIL,EAC3CG,EAAU,CAAC,QAAS,OAAQ,UAAW,gBAAiBC,CAAoB,EAE5EE,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAF,EAAQ,KAAK,GAAG,KAAK,sBAAsBG,CAAY,CAAC,EAEjD,KAAK,WAAWH,CAAO,CAChC,CAcA,MAAM,KAAKH,EAA0G,CACnH,GAAM,CAAE,qBAAAI,EAAsB,eAAAC,CAAe,EAAIL,EAC3CG,EAAU,CAAC,QAAS,OAAQ,OAAQ,gBAAiBC,CAAoB,EAEzEE,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAF,EAAQ,KAAK,GAAG,KAAK,sBAAsBG,CAAY,CAAC,EAEjD,KAAK,WAAWH,CAAO,CAChC,CAeA,MAAM,QAAQH,EAIO,CACnB,GAAM,CAAE,qBAAAI,EAAsB,eAAAC,EAAgB,QAAAH,CAAQ,EAAIF,EACpDG,EAAU,CACd,QACA,OACA,UACA,gBACAC,EACA,aAAaF,GAAW,SAAS,EACnC,EAEMI,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAF,EAAQ,KAAK,GAAG,KAAK,sBAAsBG,CAAY,CAAC,EAEjD,KAAK,WAAWH,CAAO,CAChC,CASA,MAAc,WAAWH,EAAuC,CAC9D,OAAO,IAAI,QAAQ,CAACO,EAASC,IAAW,CACtC,IAAMC,EAAkBX,EAAS,EAC7BY,EAGAD,IAAoB,QACtBC,EAAeb,EAAM,MAAOG,EAAM,CAAE,MAAO,EAAK,CAAC,EAEjDU,EAAeb,EAAM,MAAOG,CAAI,EAGlCU,EAAa,OAAO,KAAK,QAAQ,MAAM,EACvCA,EAAa,OAAO,KAAK,QAAQ,MAAM,EACvC,QAAQ,MAAM,KAAKA,EAAa,KAAK,EAErCA,EAAa,GAAG,QAAUC,GAAS,CAC7BA,IAAS,EACXJ,EAAQ,EAAI,EAEZC,EAAO,IAAI,MAAM,kCAAkCG,CAAI,EAAE,CAAC,CAE9D,CAAC,CACH,CAAC,CACH,CAaQ,sBAAsBN,EAA4D,CACxF,IAAMO,EAAaP,EAAe,KAC5BQ,EAAyB,CAAC,EAEhC,GAAID,IAAe,EACjB,OAAOC,EAGTA,EAAQ,KAAK,mBAAmB,EAEhC,IAAMC,EAAuB,CAAC,EAC9B,OAAAT,EAAe,QAAQ,CAACU,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,oBAAoBR,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASW,GAAQ,CAC3C,IAAME,EAAUb,EAAeW,CAAG,EAClCV,EAAa,IAAIU,EAAKE,CAAO,CAC/B,CAAC,EAEMZ,CACT,CACF","names":["spawn","platform","Move","args","network","profile","cliArgs","packageDirectoryPath","namedAddresses","addressesMap","resolve","reject","currentPlatform","childProcess","code","totalNames","newArgs","names","value","key","toAppend","address"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|