@aptos-labs/ts-sdk 1.22.0 → 1.22.2
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 -7
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +30 -1
- package/dist/common/index.js +24 -24
- 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/sign.mjs.map +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-Z4CGG42L.mjs → chunk-2ZAYK464.mjs} +2 -2
- package/dist/esm/{chunk-KDIPFPMS.mjs → chunk-37Y7VAN7.mjs} +2 -2
- package/dist/esm/{chunk-V5COHBA4.mjs → chunk-42XNGDUC.mjs} +2 -2
- package/dist/esm/{chunk-7WFKAS7T.mjs → chunk-4EPLOSKY.mjs} +2 -2
- package/dist/esm/{chunk-NAGFCYG6.mjs → chunk-4ZXCQXVC.mjs} +2 -2
- package/dist/esm/{chunk-LTMOMXPN.mjs → chunk-5E672SHG.mjs} +2 -2
- package/dist/esm/{chunk-IPGKZUSA.mjs → chunk-5IRM54PL.mjs} +2 -2
- package/dist/esm/{chunk-SK2HTEP7.mjs → chunk-6AJLTBXC.mjs} +2 -2
- package/dist/esm/{chunk-OVG4SGPI.mjs → chunk-6TWRNWC3.mjs} +2 -2
- package/dist/esm/{chunk-Y2H7FG2P.mjs → chunk-6XCZ56O7.mjs} +2 -2
- package/dist/esm/{chunk-XWVMFCW3.mjs → chunk-6ZQWPHLV.mjs} +2 -2
- package/dist/esm/{chunk-XVWNPR4T.mjs → chunk-7LY73OAN.mjs} +2 -2
- package/dist/esm/{chunk-F6REP536.mjs → chunk-A2Z7I2EY.mjs} +2 -2
- package/dist/esm/chunk-B6PLCJJ2.mjs +2 -0
- package/dist/esm/chunk-B6PLCJJ2.mjs.map +1 -0
- package/dist/esm/{chunk-3NPBKAPF.mjs → chunk-BF3D6ADE.mjs} +2 -2
- package/dist/esm/{chunk-J5YHMYHB.mjs → chunk-BN2PXCFR.mjs} +2 -2
- package/dist/esm/{chunk-H6CS3BD7.mjs → chunk-D6WTINSF.mjs} +2 -2
- package/dist/esm/{chunk-JB5R6RGF.mjs → chunk-DM6HVA4K.mjs} +2 -2
- package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
- package/dist/esm/{chunk-43IKKJ2Y.mjs → chunk-EIKBYKIJ.mjs} +2 -2
- package/dist/esm/{chunk-H6QWMF3Q.mjs → chunk-EKZHYOQH.mjs} +2 -2
- package/dist/esm/{chunk-TCEOTADF.mjs → chunk-EOJWPF3P.mjs} +2 -2
- package/dist/esm/{chunk-GWH34VNI.mjs → chunk-EPVAT625.mjs} +2 -2
- package/dist/esm/{chunk-J5KAD2RM.mjs → chunk-FC7IRFFN.mjs} +2 -2
- package/dist/esm/{chunk-L6RINMT6.mjs → chunk-FEGCUPGO.mjs} +2 -2
- package/dist/esm/{chunk-PY23BQ2H.mjs → chunk-FPDE5EYE.mjs} +2 -2
- package/dist/esm/{chunk-3DCHEXE3.mjs → chunk-GEP4HPQ6.mjs} +2 -2
- package/dist/esm/{chunk-TWRYY6DD.mjs → chunk-GGU4XOUO.mjs} +2 -2
- package/dist/esm/{chunk-SQQ2424E.mjs → chunk-H4XMI4WZ.mjs} +2 -2
- package/dist/esm/{chunk-4ARX2MGY.mjs → chunk-HFOLSSAQ.mjs} +2 -2
- package/dist/esm/{chunk-6TRGVQLA.mjs → chunk-IMF5XUVW.mjs} +2 -2
- package/dist/esm/{chunk-7CMCN6LB.mjs → chunk-JY5LTRTM.mjs} +2 -2
- package/dist/esm/{chunk-T7YRD4PM.mjs → chunk-K7Y2SC65.mjs} +2 -2
- package/dist/esm/{chunk-TZOKV22Z.mjs → chunk-MI732NUU.mjs} +2 -2
- package/dist/esm/{chunk-UJYWEIQ2.mjs → chunk-NBJFTE2P.mjs} +2 -2
- package/dist/esm/chunk-NECL5FCQ.mjs +1 -0
- package/dist/esm/chunk-NECL5FCQ.mjs.map +1 -0
- package/dist/esm/{chunk-LBU3LV7I.mjs → chunk-NRAQZUD5.mjs} +2 -2
- package/dist/esm/{chunk-7X6HZUXX.mjs → chunk-O4O7HSUQ.mjs} +2 -2
- package/dist/esm/{chunk-4GNJJZ4R.mjs → chunk-OAKHR7AG.mjs} +2 -2
- package/dist/esm/{chunk-VN2CRWOI.mjs → chunk-OTK3HBAU.mjs} +2 -2
- package/dist/esm/{chunk-ZL4JYTID.mjs → chunk-OYLT6IVC.mjs} +2 -2
- package/dist/esm/chunk-QA7VTFUT.mjs +2 -0
- package/dist/esm/{chunk-4KYQ7N3N.mjs.map → chunk-QA7VTFUT.mjs.map} +1 -1
- package/dist/esm/{chunk-463B3NF7.mjs → chunk-RFMLKHUD.mjs} +2 -2
- package/dist/esm/{chunk-T4NXIMZL.mjs → chunk-RS2FIBMQ.mjs} +2 -2
- package/dist/esm/{chunk-VQPLSJEI.mjs → chunk-U2QQD2ER.mjs} +2 -2
- package/dist/esm/{chunk-67BD7B6N.mjs → chunk-U6X2FYNI.mjs} +2 -2
- package/dist/esm/{chunk-NLJVP5RP.mjs → chunk-U7I7YKWD.mjs} +2 -2
- package/dist/esm/{chunk-IPTCWBFV.mjs → chunk-UIJK42CX.mjs} +2 -2
- package/dist/esm/{chunk-LBKYNX5K.mjs → chunk-VBPDZZXC.mjs} +2 -2
- package/dist/esm/{chunk-S6H5Q2IK.mjs → chunk-W5ZII3JO.mjs} +2 -2
- package/dist/esm/{chunk-7HS4UJGE.mjs → chunk-WL4FXFAM.mjs} +2 -2
- package/dist/esm/{chunk-O7XEE7QT.mjs → chunk-WTJCMD4D.mjs} +2 -2
- package/dist/esm/{chunk-S7G6VBUB.mjs → chunk-XBTCOCZJ.mjs} +2 -2
- package/dist/esm/{chunk-W26LO3CR.mjs → chunk-XCNNMSVO.mjs} +2 -2
- package/dist/esm/{chunk-I2T6BJOA.mjs → chunk-XFBB7YYI.mjs} +2 -2
- package/dist/esm/{chunk-IN2L5ZAT.mjs → chunk-XT2VVDT3.mjs} +2 -2
- package/dist/esm/{chunk-7RVYF5OP.mjs → chunk-XWAOZPIP.mjs} +2 -2
- package/dist/esm/{chunk-P43CXEO4.mjs → chunk-XYWMFCL6.mjs} +2 -2
- package/dist/esm/{chunk-CUSKA6RZ.mjs → chunk-Y2DHN4CV.mjs} +2 -2
- package/dist/esm/chunk-Y5VJSCVY.mjs +2 -0
- package/dist/esm/chunk-Y5VJSCVY.mjs.map +1 -0
- package/dist/esm/{chunk-VEGT6ZPK.mjs → chunk-Z4OZBMSL.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.d.mts +21 -7
- 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/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +3 -3
- package/dist/esm/core/crypto/index.mjs +1 -1
- 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.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +1 -0
- 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/version.ts +1 -1
- package/dist/esm/chunk-4KYQ7N3N.mjs +0 -2
- package/dist/esm/chunk-5M235PLS.mjs +0 -2
- package/dist/esm/chunk-5M235PLS.mjs.map +0 -1
- package/dist/esm/chunk-Q7ZP25NJ.mjs +0 -2
- package/dist/esm/chunk-Q7ZP25NJ.mjs.map +0 -1
- package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
- /package/dist/esm/{chunk-Z4CGG42L.mjs.map → chunk-2ZAYK464.mjs.map} +0 -0
- /package/dist/esm/{chunk-KDIPFPMS.mjs.map → chunk-37Y7VAN7.mjs.map} +0 -0
- /package/dist/esm/{chunk-V5COHBA4.mjs.map → chunk-42XNGDUC.mjs.map} +0 -0
- /package/dist/esm/{chunk-7WFKAS7T.mjs.map → chunk-4EPLOSKY.mjs.map} +0 -0
- /package/dist/esm/{chunk-NAGFCYG6.mjs.map → chunk-4ZXCQXVC.mjs.map} +0 -0
- /package/dist/esm/{chunk-LTMOMXPN.mjs.map → chunk-5E672SHG.mjs.map} +0 -0
- /package/dist/esm/{chunk-IPGKZUSA.mjs.map → chunk-5IRM54PL.mjs.map} +0 -0
- /package/dist/esm/{chunk-SK2HTEP7.mjs.map → chunk-6AJLTBXC.mjs.map} +0 -0
- /package/dist/esm/{chunk-OVG4SGPI.mjs.map → chunk-6TWRNWC3.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y2H7FG2P.mjs.map → chunk-6XCZ56O7.mjs.map} +0 -0
- /package/dist/esm/{chunk-XWVMFCW3.mjs.map → chunk-6ZQWPHLV.mjs.map} +0 -0
- /package/dist/esm/{chunk-XVWNPR4T.mjs.map → chunk-7LY73OAN.mjs.map} +0 -0
- /package/dist/esm/{chunk-F6REP536.mjs.map → chunk-A2Z7I2EY.mjs.map} +0 -0
- /package/dist/esm/{chunk-3NPBKAPF.mjs.map → chunk-BF3D6ADE.mjs.map} +0 -0
- /package/dist/esm/{chunk-J5YHMYHB.mjs.map → chunk-BN2PXCFR.mjs.map} +0 -0
- /package/dist/esm/{chunk-H6CS3BD7.mjs.map → chunk-D6WTINSF.mjs.map} +0 -0
- /package/dist/esm/{chunk-JB5R6RGF.mjs.map → chunk-DM6HVA4K.mjs.map} +0 -0
- /package/dist/esm/{chunk-RFSO3JRG.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
- /package/dist/esm/{chunk-43IKKJ2Y.mjs.map → chunk-EIKBYKIJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-H6QWMF3Q.mjs.map → chunk-EKZHYOQH.mjs.map} +0 -0
- /package/dist/esm/{chunk-TCEOTADF.mjs.map → chunk-EOJWPF3P.mjs.map} +0 -0
- /package/dist/esm/{chunk-GWH34VNI.mjs.map → chunk-EPVAT625.mjs.map} +0 -0
- /package/dist/esm/{chunk-J5KAD2RM.mjs.map → chunk-FC7IRFFN.mjs.map} +0 -0
- /package/dist/esm/{chunk-L6RINMT6.mjs.map → chunk-FEGCUPGO.mjs.map} +0 -0
- /package/dist/esm/{chunk-PY23BQ2H.mjs.map → chunk-FPDE5EYE.mjs.map} +0 -0
- /package/dist/esm/{chunk-3DCHEXE3.mjs.map → chunk-GEP4HPQ6.mjs.map} +0 -0
- /package/dist/esm/{chunk-TWRYY6DD.mjs.map → chunk-GGU4XOUO.mjs.map} +0 -0
- /package/dist/esm/{chunk-SQQ2424E.mjs.map → chunk-H4XMI4WZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4ARX2MGY.mjs.map → chunk-HFOLSSAQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-6TRGVQLA.mjs.map → chunk-IMF5XUVW.mjs.map} +0 -0
- /package/dist/esm/{chunk-7CMCN6LB.mjs.map → chunk-JY5LTRTM.mjs.map} +0 -0
- /package/dist/esm/{chunk-T7YRD4PM.mjs.map → chunk-K7Y2SC65.mjs.map} +0 -0
- /package/dist/esm/{chunk-TZOKV22Z.mjs.map → chunk-MI732NUU.mjs.map} +0 -0
- /package/dist/esm/{chunk-UJYWEIQ2.mjs.map → chunk-NBJFTE2P.mjs.map} +0 -0
- /package/dist/esm/{chunk-LBU3LV7I.mjs.map → chunk-NRAQZUD5.mjs.map} +0 -0
- /package/dist/esm/{chunk-7X6HZUXX.mjs.map → chunk-O4O7HSUQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-4GNJJZ4R.mjs.map → chunk-OAKHR7AG.mjs.map} +0 -0
- /package/dist/esm/{chunk-VN2CRWOI.mjs.map → chunk-OTK3HBAU.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZL4JYTID.mjs.map → chunk-OYLT6IVC.mjs.map} +0 -0
- /package/dist/esm/{chunk-463B3NF7.mjs.map → chunk-RFMLKHUD.mjs.map} +0 -0
- /package/dist/esm/{chunk-T4NXIMZL.mjs.map → chunk-RS2FIBMQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-VQPLSJEI.mjs.map → chunk-U2QQD2ER.mjs.map} +0 -0
- /package/dist/esm/{chunk-67BD7B6N.mjs.map → chunk-U6X2FYNI.mjs.map} +0 -0
- /package/dist/esm/{chunk-NLJVP5RP.mjs.map → chunk-U7I7YKWD.mjs.map} +0 -0
- /package/dist/esm/{chunk-IPTCWBFV.mjs.map → chunk-UIJK42CX.mjs.map} +0 -0
- /package/dist/esm/{chunk-LBKYNX5K.mjs.map → chunk-VBPDZZXC.mjs.map} +0 -0
- /package/dist/esm/{chunk-S6H5Q2IK.mjs.map → chunk-W5ZII3JO.mjs.map} +0 -0
- /package/dist/esm/{chunk-7HS4UJGE.mjs.map → chunk-WL4FXFAM.mjs.map} +0 -0
- /package/dist/esm/{chunk-O7XEE7QT.mjs.map → chunk-WTJCMD4D.mjs.map} +0 -0
- /package/dist/esm/{chunk-S7G6VBUB.mjs.map → chunk-XBTCOCZJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-W26LO3CR.mjs.map → chunk-XCNNMSVO.mjs.map} +0 -0
- /package/dist/esm/{chunk-I2T6BJOA.mjs.map → chunk-XFBB7YYI.mjs.map} +0 -0
- /package/dist/esm/{chunk-IN2L5ZAT.mjs.map → chunk-XT2VVDT3.mjs.map} +0 -0
- /package/dist/esm/{chunk-7RVYF5OP.mjs.map → chunk-XWAOZPIP.mjs.map} +0 -0
- /package/dist/esm/{chunk-P43CXEO4.mjs.map → chunk-XYWMFCL6.mjs.map} +0 -0
- /package/dist/esm/{chunk-CUSKA6RZ.mjs.map → chunk-Y2DHN4CV.mjs.map} +0 -0
- /package/dist/esm/{chunk-VEGT6ZPK.mjs.map → chunk-Z4OZBMSL.mjs.map} +0 -0
|
@@ -49,7 +49,9 @@ declare class Move {
|
|
|
49
49
|
init(args: {
|
|
50
50
|
network?: Network;
|
|
51
51
|
profile?: string;
|
|
52
|
-
}): Promise<
|
|
52
|
+
}): Promise<{
|
|
53
|
+
output: string;
|
|
54
|
+
}>;
|
|
53
55
|
/**
|
|
54
56
|
* Function to compile a package
|
|
55
57
|
*
|
|
@@ -65,7 +67,9 @@ declare class Move {
|
|
|
65
67
|
compile(args: {
|
|
66
68
|
packageDirectoryPath: string;
|
|
67
69
|
namedAddresses: Record<string, AccountAddress>;
|
|
68
|
-
}): Promise<
|
|
70
|
+
}): Promise<{
|
|
71
|
+
output: string;
|
|
72
|
+
}>;
|
|
69
73
|
/**
|
|
70
74
|
* Function to run Move unit tests for a package
|
|
71
75
|
*
|
|
@@ -81,7 +85,9 @@ declare class Move {
|
|
|
81
85
|
test(args: {
|
|
82
86
|
packageDirectoryPath: string;
|
|
83
87
|
namedAddresses: Record<string, AccountAddress>;
|
|
84
|
-
}): Promise<
|
|
88
|
+
}): Promise<{
|
|
89
|
+
output: string;
|
|
90
|
+
}>;
|
|
85
91
|
/**
|
|
86
92
|
* Function to publish the modules to the publisher account on the Aptos blockchain
|
|
87
93
|
*
|
|
@@ -99,7 +105,9 @@ declare class Move {
|
|
|
99
105
|
packageDirectoryPath: string;
|
|
100
106
|
namedAddresses: Record<string, AccountAddress>;
|
|
101
107
|
profile?: string;
|
|
102
|
-
}): Promise<
|
|
108
|
+
}): Promise<{
|
|
109
|
+
output: string;
|
|
110
|
+
}>;
|
|
103
111
|
/**
|
|
104
112
|
* Function to create a new object and publish the Move package to it on the Aptos blockchain
|
|
105
113
|
*
|
|
@@ -128,7 +136,9 @@ declare class Move {
|
|
|
128
136
|
addressName: string;
|
|
129
137
|
namedAddresses: Record<string, AccountAddress>;
|
|
130
138
|
profile?: string;
|
|
131
|
-
}): Promise<
|
|
139
|
+
}): Promise<{
|
|
140
|
+
objectAddress: string;
|
|
141
|
+
}>;
|
|
132
142
|
/**
|
|
133
143
|
* Function to upgrade a Move package previously published to an object on the Aptos blockchain
|
|
134
144
|
* Caller must be the object owner to call this function
|
|
@@ -151,7 +161,9 @@ declare class Move {
|
|
|
151
161
|
objectAddress: string;
|
|
152
162
|
namedAddresses: Record<string, AccountAddress>;
|
|
153
163
|
profile?: string;
|
|
154
|
-
}): Promise<
|
|
164
|
+
}): Promise<{
|
|
165
|
+
output: string;
|
|
166
|
+
}>;
|
|
155
167
|
/**
|
|
156
168
|
* Function to run a Move script, please run compile before running this
|
|
157
169
|
*
|
|
@@ -166,7 +178,9 @@ declare class Move {
|
|
|
166
178
|
runScript(args: {
|
|
167
179
|
compiledScriptPath: string;
|
|
168
180
|
profile?: string;
|
|
169
|
-
}): Promise<
|
|
181
|
+
}): Promise<{
|
|
182
|
+
output: string;
|
|
183
|
+
}>;
|
|
170
184
|
/**
|
|
171
185
|
* Run a move command
|
|
172
186
|
*
|
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-local-testnet","--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",
|
|
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-local-testnet","--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",o=>{let a=o.toString();console.log(a)})]),_optionalChain([t, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",o=>{let a=o.toString();console.log(a)})])}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],o=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(o)),this.runCommand(t)}async test(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","test","--package-dir",e],o=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(o)),this.runCommand(t)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:t}=s,o=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(t, () => ("default"))}`],a=this.parseNamedAddresses(r);return o.push(...this.prepareNamedAddresses(a)),this.runCommand(o)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:t,profile:o}=s,a=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(o, () => ("default"))}`],n=this.parseNamedAddresses(t);a.push(...this.prepareNamedAddresses(n));let m=await this.runCommand(a);return{objectAddress:this.extractAddressFromOutput(m.output)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:t,profile:o}=s,a=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(o, () => ("default"))}`],n=this.parseNamedAddresses(t);return a.push(...this.prepareNamedAddresses(n)),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, ),o,a="";t==="win32"?o=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):o=_child_process.spawn.call(void 0, "npx",s),o.stdout.on("data",n=>{a+=n.toString()}),o.stdout.pipe(process.stdout),o.stderr.pipe(process.stderr),process.stdin.pipe(o.stdin),o.on("close",n=>{n===0?e({output:a}):r(new Error(`Child process exited with code ${n}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let t=[];return s.forEach((o,a)=>{let n=`${a}=${o.toString()}`;t.push(n)}),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","output","objectAddress","compiledScriptPath","resolve","reject","stdout","code","totalNames","newArgs","names","value","key","toAppend","address","match"],"mappings":"yCAAA,OAAyC,SAAAA,MAAa,gBACtD,OAAOC,M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AAQE,CAAM,EAEdD,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,CAQQ,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 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<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<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: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<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<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<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 return this.runCommand(cliArgs).then((output) => this.extractAddressFromOutput(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<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<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<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(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 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","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"],"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,MAAO,CACA,KAAK,SAAS,KACnBF,EAAK,KAAK,QAAQ,GAAG,CACvB,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,oBAAqB,kBAAmB,eAAgB,oBAAoB,EAExGC,EAAkBJ,EAAS,EAC7BK,EAEAD,IAAoB,QACtBC,EAAeP,EAAMI,EAAYC,EAAS,CAAE,MAAO,EAAK,CAAC,EAEzDE,EAAeP,EAAMI,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,CAAC,CACH,CAOA,MAAM,sBAAyC,CAC7C,IAAIC,EAAc,MAAM,KAAK,mBAAmB,EAC1CC,EAAQ,KAAK,IAAI,EAAI,IACvBC,EAAOD,EAEX,KAAO,CAACD,GAAeC,EAAQ,KAAK,sBAAwBC,GAE1D,MAAMC,EAAM,GAAI,EAEhBH,EAAc,MAAM,KAAK,mBAAmB,EAC5CE,EAAO,KAAK,IAAI,EAAI,IAKtB,GAAI,CAACF,EACH,MAAM,IAAI,MAAM,yBAAyB,EAG3C,MAAO,EACT,CAOA,MAAM,oB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OAAO,KAAK,QAAQ,MAAM,EACvCA,EAAa,OAAO,KAAK,QAAQ,MAAM,EACvC,QAAQ,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"]}
|
package/dist/common/index.d.ts
CHANGED
|
@@ -2079,6 +2079,35 @@ declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
|
|
|
2079
2079
|
static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
|
|
2080
2080
|
}
|
|
2081
2081
|
|
|
2082
|
+
/**
|
|
2083
|
+
* Creates an object address from creator address and seed
|
|
2084
|
+
*
|
|
2085
|
+
* @param creatorAddress The object creator account address
|
|
2086
|
+
* @param seed The seed in either Uint8Array | string type
|
|
2087
|
+
*
|
|
2088
|
+
* @returns The object account address
|
|
2089
|
+
*/
|
|
2090
|
+
declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
2091
|
+
/**
|
|
2092
|
+
* Creates an resource address from creator address and seed
|
|
2093
|
+
*
|
|
2094
|
+
* @param creatorAddress The creator account address
|
|
2095
|
+
* @param seed The seed in either Uint8Array | string type
|
|
2096
|
+
*
|
|
2097
|
+
* @returns The resource account address
|
|
2098
|
+
*/
|
|
2099
|
+
declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
|
|
2100
|
+
/**
|
|
2101
|
+
* Creates a token object address from creator address, collection name and token name
|
|
2102
|
+
*
|
|
2103
|
+
* @param creatorAddress The token creator account address
|
|
2104
|
+
* @param collectionName The collection name
|
|
2105
|
+
* @param tokenName The token name
|
|
2106
|
+
*
|
|
2107
|
+
* @returns The token account address
|
|
2108
|
+
*/
|
|
2109
|
+
declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
|
|
2110
|
+
|
|
2082
2111
|
/**
|
|
2083
2112
|
* Representation of a ChainId that can serialized and deserialized
|
|
2084
2113
|
*/
|
|
@@ -6538,4 +6567,4 @@ declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAp
|
|
|
6538
6567
|
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6539
6568
|
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6540
6569
|
|
|
6541
|
-
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, 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 };
|
|
6570
|
+
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 };
|