@aptos-labs/ts-sdk 1.18.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{accountAddress-Lv-GSihU.d.ts → accountAddress-NYtf3uZq.d.ts} +31 -20
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +138 -9
- package/dist/common/index.js +62 -51
- 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.d.mts +3 -3
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +3 -1
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +49 -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.d.mts +18 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +21 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +39 -0
- package/dist/esm/api/object.mjs +2 -0
- package/dist/esm/api/object.mjs.map +1 -0
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/{chunk-CZ6TC4GO.mjs → chunk-32BE76A3.mjs} +2 -2
- package/dist/esm/{chunk-DPO352QL.mjs → chunk-3CEN6LXR.mjs} +2 -2
- package/dist/esm/{chunk-FM6ALU5B.mjs → chunk-3DCHEXE3.mjs} +2 -2
- package/dist/esm/chunk-463B3NF7.mjs +2 -0
- package/dist/esm/chunk-463B3NF7.mjs.map +1 -0
- package/dist/esm/{chunk-L22R3OIW.mjs → chunk-4ARX2MGY.mjs} +2 -2
- package/dist/esm/{chunk-S32JHML7.mjs → chunk-4KAXCXAK.mjs} +2 -2
- package/dist/esm/chunk-4KYQ7N3N.mjs +2 -0
- package/dist/esm/{chunk-Z4YHE4A5.mjs.map → chunk-4KYQ7N3N.mjs.map} +1 -1
- package/dist/esm/chunk-5MFDTDK2.mjs +2 -0
- package/dist/esm/chunk-5MFDTDK2.mjs.map +1 -0
- package/dist/esm/{chunk-XWVU4G57.mjs → chunk-5ZBDXUER.mjs} +2 -2
- package/dist/esm/{chunk-U6X2FYNI.mjs → chunk-67BD7B6N.mjs} +2 -2
- package/dist/esm/chunk-6DDSU7HN.mjs +2 -0
- package/dist/esm/{chunk-LVSOUCFD.mjs.map → chunk-6DDSU7HN.mjs.map} +1 -1
- package/dist/esm/chunk-6QTWWNRH.mjs +2 -0
- package/dist/esm/chunk-6QTWWNRH.mjs.map +1 -0
- package/dist/esm/{chunk-5YHI7WOB.mjs → chunk-7CMCN6LB.mjs} +2 -2
- package/dist/esm/{chunk-UAZUO75M.mjs → chunk-7DDRPSWU.mjs} +2 -2
- package/dist/esm/chunk-7DDRPSWU.mjs.map +1 -0
- package/dist/esm/{chunk-AVH5SYTL.mjs → chunk-7HS4UJGE.mjs} +2 -2
- package/dist/esm/{chunk-4EPLOSKY.mjs → chunk-7WFKAS7T.mjs} +2 -2
- package/dist/esm/{chunk-WQHW4WQN.mjs → chunk-7X6HZUXX.mjs} +2 -2
- package/dist/esm/{chunk-NCUBVHUW.mjs → chunk-ARMY5A3J.mjs} +2 -2
- package/dist/esm/{chunk-5X2BJDOB.mjs → chunk-BLAIJHMU.mjs} +2 -2
- package/dist/esm/{chunk-BVB3QII3.mjs → chunk-C2IJG37E.mjs} +2 -2
- package/dist/esm/{chunk-7Y45UTRL.mjs → chunk-CCUUYI4Z.mjs} +2 -2
- package/dist/esm/{chunk-EAW6AWYD.mjs → chunk-COJZFWV3.mjs} +2 -2
- package/dist/esm/{chunk-M3JHXCGV.mjs → chunk-CPCS5KIA.mjs} +2 -2
- package/dist/esm/{chunk-A2Z7I2EY.mjs → chunk-F6REP536.mjs} +2 -2
- package/dist/esm/{chunk-DW2KZREM.mjs → chunk-GCPWPGCS.mjs} +2 -2
- package/dist/esm/{chunk-SLFAROVZ.mjs → chunk-GQ6Q7KK5.mjs} +2 -2
- package/dist/esm/{chunk-QL2QFRKV.mjs → chunk-H6CS3BD7.mjs} +2 -2
- package/dist/esm/{chunk-K7DBDI2I.mjs → chunk-H6QWMF3Q.mjs} +2 -2
- package/dist/esm/chunk-HNTKL7NS.mjs +2 -0
- package/dist/esm/chunk-HNTKL7NS.mjs.map +1 -0
- package/dist/esm/{chunk-NSQLZBCA.mjs → chunk-I2T6BJOA.mjs} +2 -2
- package/dist/esm/{chunk-42SZQH5Z.mjs → chunk-J5KAD2RM.mjs} +2 -2
- package/dist/esm/{chunk-MHZ64FIW.mjs → chunk-J5YHMYHB.mjs} +2 -2
- package/dist/esm/chunk-KMJ6TF6Y.mjs +2 -0
- package/dist/esm/chunk-KMJ6TF6Y.mjs.map +1 -0
- package/dist/esm/chunk-L36ZHC7J.mjs +2 -0
- package/dist/esm/{chunk-YE5B2S5L.mjs.map → chunk-L36ZHC7J.mjs.map} +1 -1
- package/dist/esm/{chunk-K4CTCBLY.mjs → chunk-L6RINMT6.mjs} +2 -2
- package/dist/esm/{chunk-HHE63GFW.mjs → chunk-LBKYNX5K.mjs} +2 -2
- package/dist/esm/{chunk-AYKZA676.mjs → chunk-LBU3LV7I.mjs} +2 -2
- package/dist/esm/{chunk-6DYDZSEW.mjs → chunk-M2J7QC7G.mjs} +2 -2
- package/dist/esm/chunk-MIEXKKJP.mjs +2 -0
- package/dist/esm/chunk-MIEXKKJP.mjs.map +1 -0
- package/dist/esm/{chunk-6UDHM6YZ.mjs → chunk-MTPARVMT.mjs} +2 -2
- package/dist/esm/{chunk-UGVNOSD3.mjs → chunk-NJYVAMTG.mjs} +2 -2
- package/dist/esm/{chunk-BS7EVBWX.mjs → chunk-NWAGENBX.mjs} +2 -2
- package/dist/esm/{chunk-6JL2U7JB.mjs → chunk-NZFKPV67.mjs} +2 -2
- package/dist/esm/{chunk-3ZCQQ3L2.mjs → chunk-O7XEE7QT.mjs} +2 -2
- package/dist/esm/{chunk-EYIJYUN7.mjs → chunk-PTK4OJ2U.mjs} +2 -2
- package/dist/esm/{chunk-F74FF323.mjs → chunk-PVEPP4HR.mjs} +2 -2
- package/dist/esm/chunk-PY23BQ2H.mjs +2 -0
- package/dist/esm/chunk-PY23BQ2H.mjs.map +1 -0
- package/dist/esm/{chunk-QAMV4L3K.mjs → chunk-PZAA2YYO.mjs} +2 -2
- package/dist/esm/{chunk-JSWBLHMX.mjs → chunk-Q7ZP25NJ.mjs} +2 -2
- package/dist/esm/{chunk-C5V4EBVP.mjs → chunk-RA56CRJB.mjs} +2 -2
- package/dist/esm/{chunk-FYB7C42X.mjs → chunk-RM2IVUJ2.mjs} +2 -2
- package/dist/esm/chunk-S6H5Q2IK.mjs +2 -0
- package/dist/esm/chunk-S6H5Q2IK.mjs.map +1 -0
- package/dist/esm/{chunk-QVWBJJRF.mjs → chunk-SQQ2424E.mjs} +2 -2
- package/dist/esm/chunk-SYV4KFI7.mjs +2 -0
- package/dist/esm/chunk-SYV4KFI7.mjs.map +1 -0
- package/dist/esm/{chunk-2QWQ6RX5.mjs → chunk-T4NXIMZL.mjs} +2 -2
- package/dist/esm/{chunk-4IBJW3PB.mjs → chunk-T7YRD4PM.mjs} +2 -2
- package/dist/esm/{chunk-XYLM277Z.mjs → chunk-TPMVNFS5.mjs} +2 -2
- package/dist/esm/{chunk-362JBD4O.mjs → chunk-TZOKV22Z.mjs} +2 -2
- package/dist/esm/{chunk-GFRNBBTY.mjs → chunk-UJYWEIQ2.mjs} +2 -2
- package/dist/esm/{chunk-VTKPSYKA.mjs → chunk-UYF7AQLE.mjs} +2 -2
- package/dist/esm/{chunk-TG2LLWVU.mjs → chunk-V2LIP26A.mjs} +2 -2
- package/dist/esm/chunk-V4SPDICR.mjs +2 -0
- package/dist/esm/chunk-V4SPDICR.mjs.map +1 -0
- package/dist/esm/{chunk-SFUTXSDK.mjs → chunk-VQPLSJEI.mjs} +2 -2
- package/dist/esm/chunk-WHQNLKFO.mjs +2 -0
- package/dist/esm/chunk-WHQNLKFO.mjs.map +1 -0
- package/dist/esm/{chunk-6ZQWPHLV.mjs → chunk-XWVMFCW3.mjs} +2 -2
- package/dist/esm/chunk-XZBGNMFN.mjs +2 -0
- package/dist/esm/chunk-XZBGNMFN.mjs.map +1 -0
- package/dist/esm/{chunk-FTIW5GGG.mjs → chunk-Y2H7FG2P.mjs} +2 -2
- package/dist/esm/{chunk-JPDT6E3B.mjs → chunk-YDXU6ALO.mjs} +2 -2
- package/dist/esm/{chunk-HIHKTLLM.mjs → chunk-YMFEA2TJ.mjs} +55 -44
- package/dist/esm/chunk-YMFEA2TJ.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.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.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.mjs +1 -1
- package/dist/esm/index.d.mts +4 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +3 -3
- 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.d.mts +14 -4
- 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.d.mts +25 -0
- package/dist/esm/internal/object.mjs +2 -0
- package/dist/esm/internal/object.mjs.map +1 -0
- 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.d.mts +7 -2
- 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.d.mts +2 -2
- 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.d.mts +3 -2
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -0
- 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/transactions/types.d.mts +18 -2
- package/dist/esm/types/generated/operations.d.mts +37 -26
- package/dist/esm/types/generated/queries.d.mts +5 -5
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +227 -15
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/indexer.d.mts +3 -3
- package/dist/esm/utils/const.d.mts +2 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +3 -3
- package/src/api/aptos.ts +6 -0
- package/src/api/digitalAsset.ts +81 -1
- package/src/api/fungibleAsset.ts +36 -2
- package/src/api/general.ts +25 -2
- package/src/api/object.ts +43 -0
- package/src/bcs/serializable/moveStructs.ts +5 -2
- package/src/cli/move.ts +2 -3
- package/src/internal/account.ts +7 -9
- package/src/internal/digitalAsset.ts +67 -24
- package/src/internal/object.ts +45 -0
- package/src/internal/queries/getCollectionData.graphql +19 -10
- package/src/internal/queries/{getAccountOwnedObjects.graphql → getObjectData.graphql} +1 -1
- package/src/internal/view.ts +27 -1
- package/src/transactions/transactionBuilder/helpers.ts +12 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +58 -24
- package/src/transactions/types.ts +19 -1
- package/src/types/generated/operations.ts +37 -26
- package/src/types/generated/queries.ts +51 -40
- package/src/types/generated/types.ts +252 -14
- package/src/types/indexer.ts +2 -2
- package/src/utils/const.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2DSPX6BX.mjs +0 -2
- package/dist/esm/chunk-2DSPX6BX.mjs.map +0 -1
- package/dist/esm/chunk-BLVYB7Y3.mjs +0 -2
- package/dist/esm/chunk-BLVYB7Y3.mjs.map +0 -1
- package/dist/esm/chunk-DLDGUTFV.mjs +0 -2
- package/dist/esm/chunk-DLDGUTFV.mjs.map +0 -1
- package/dist/esm/chunk-HCN7YJGB.mjs +0 -2
- package/dist/esm/chunk-HCN7YJGB.mjs.map +0 -1
- package/dist/esm/chunk-HIHKTLLM.mjs.map +0 -1
- package/dist/esm/chunk-LVSOUCFD.mjs +0 -2
- package/dist/esm/chunk-NNQYSSLH.mjs +0 -2
- package/dist/esm/chunk-NNQYSSLH.mjs.map +0 -1
- package/dist/esm/chunk-PTA3VHTQ.mjs +0 -2
- package/dist/esm/chunk-PTA3VHTQ.mjs.map +0 -1
- package/dist/esm/chunk-RJ4RKVVQ.mjs +0 -2
- package/dist/esm/chunk-RJ4RKVVQ.mjs.map +0 -1
- package/dist/esm/chunk-U4A56FN2.mjs +0 -2
- package/dist/esm/chunk-U4A56FN2.mjs.map +0 -1
- package/dist/esm/chunk-UAZUO75M.mjs.map +0 -1
- package/dist/esm/chunk-VCMP3MXN.mjs +0 -2
- package/dist/esm/chunk-VCMP3MXN.mjs.map +0 -1
- package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
- package/dist/esm/chunk-YMUCYX3B.mjs +0 -2
- package/dist/esm/chunk-YMUCYX3B.mjs.map +0 -1
- package/dist/esm/chunk-Z4YHE4A5.mjs +0 -2
- /package/dist/esm/{chunk-CZ6TC4GO.mjs.map → chunk-32BE76A3.mjs.map} +0 -0
- /package/dist/esm/{chunk-DPO352QL.mjs.map → chunk-3CEN6LXR.mjs.map} +0 -0
- /package/dist/esm/{chunk-FM6ALU5B.mjs.map → chunk-3DCHEXE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-L22R3OIW.mjs.map → chunk-4ARX2MGY.mjs.map} +0 -0
- /package/dist/esm/{chunk-S32JHML7.mjs.map → chunk-4KAXCXAK.mjs.map} +0 -0
- /package/dist/esm/{chunk-XWVU4G57.mjs.map → chunk-5ZBDXUER.mjs.map} +0 -0
- /package/dist/esm/{chunk-U6X2FYNI.mjs.map → chunk-67BD7B6N.mjs.map} +0 -0
- /package/dist/esm/{chunk-5YHI7WOB.mjs.map → chunk-7CMCN6LB.mjs.map} +0 -0
- /package/dist/esm/{chunk-AVH5SYTL.mjs.map → chunk-7HS4UJGE.mjs.map} +0 -0
- /package/dist/esm/{chunk-4EPLOSKY.mjs.map → chunk-7WFKAS7T.mjs.map} +0 -0
- /package/dist/esm/{chunk-WQHW4WQN.mjs.map → chunk-7X6HZUXX.mjs.map} +0 -0
- /package/dist/esm/{chunk-NCUBVHUW.mjs.map → chunk-ARMY5A3J.mjs.map} +0 -0
- /package/dist/esm/{chunk-5X2BJDOB.mjs.map → chunk-BLAIJHMU.mjs.map} +0 -0
- /package/dist/esm/{chunk-BVB3QII3.mjs.map → chunk-C2IJG37E.mjs.map} +0 -0
- /package/dist/esm/{chunk-7Y45UTRL.mjs.map → chunk-CCUUYI4Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-EAW6AWYD.mjs.map → chunk-COJZFWV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-M3JHXCGV.mjs.map → chunk-CPCS5KIA.mjs.map} +0 -0
- /package/dist/esm/{chunk-A2Z7I2EY.mjs.map → chunk-F6REP536.mjs.map} +0 -0
- /package/dist/esm/{chunk-DW2KZREM.mjs.map → chunk-GCPWPGCS.mjs.map} +0 -0
- /package/dist/esm/{chunk-SLFAROVZ.mjs.map → chunk-GQ6Q7KK5.mjs.map} +0 -0
- /package/dist/esm/{chunk-QL2QFRKV.mjs.map → chunk-H6CS3BD7.mjs.map} +0 -0
- /package/dist/esm/{chunk-K7DBDI2I.mjs.map → chunk-H6QWMF3Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-NSQLZBCA.mjs.map → chunk-I2T6BJOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-42SZQH5Z.mjs.map → chunk-J5KAD2RM.mjs.map} +0 -0
- /package/dist/esm/{chunk-MHZ64FIW.mjs.map → chunk-J5YHMYHB.mjs.map} +0 -0
- /package/dist/esm/{chunk-K4CTCBLY.mjs.map → chunk-L6RINMT6.mjs.map} +0 -0
- /package/dist/esm/{chunk-HHE63GFW.mjs.map → chunk-LBKYNX5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-AYKZA676.mjs.map → chunk-LBU3LV7I.mjs.map} +0 -0
- /package/dist/esm/{chunk-6DYDZSEW.mjs.map → chunk-M2J7QC7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-6UDHM6YZ.mjs.map → chunk-MTPARVMT.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGVNOSD3.mjs.map → chunk-NJYVAMTG.mjs.map} +0 -0
- /package/dist/esm/{chunk-BS7EVBWX.mjs.map → chunk-NWAGENBX.mjs.map} +0 -0
- /package/dist/esm/{chunk-6JL2U7JB.mjs.map → chunk-NZFKPV67.mjs.map} +0 -0
- /package/dist/esm/{chunk-3ZCQQ3L2.mjs.map → chunk-O7XEE7QT.mjs.map} +0 -0
- /package/dist/esm/{chunk-EYIJYUN7.mjs.map → chunk-PTK4OJ2U.mjs.map} +0 -0
- /package/dist/esm/{chunk-F74FF323.mjs.map → chunk-PVEPP4HR.mjs.map} +0 -0
- /package/dist/esm/{chunk-QAMV4L3K.mjs.map → chunk-PZAA2YYO.mjs.map} +0 -0
- /package/dist/esm/{chunk-JSWBLHMX.mjs.map → chunk-Q7ZP25NJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-C5V4EBVP.mjs.map → chunk-RA56CRJB.mjs.map} +0 -0
- /package/dist/esm/{chunk-FYB7C42X.mjs.map → chunk-RM2IVUJ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-QVWBJJRF.mjs.map → chunk-SQQ2424E.mjs.map} +0 -0
- /package/dist/esm/{chunk-2QWQ6RX5.mjs.map → chunk-T4NXIMZL.mjs.map} +0 -0
- /package/dist/esm/{chunk-4IBJW3PB.mjs.map → chunk-T7YRD4PM.mjs.map} +0 -0
- /package/dist/esm/{chunk-XYLM277Z.mjs.map → chunk-TPMVNFS5.mjs.map} +0 -0
- /package/dist/esm/{chunk-362JBD4O.mjs.map → chunk-TZOKV22Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-GFRNBBTY.mjs.map → chunk-UJYWEIQ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-VTKPSYKA.mjs.map → chunk-UYF7AQLE.mjs.map} +0 -0
- /package/dist/esm/{chunk-TG2LLWVU.mjs.map → chunk-V2LIP26A.mjs.map} +0 -0
- /package/dist/esm/{chunk-SFUTXSDK.mjs.map → chunk-VQPLSJEI.mjs.map} +0 -0
- /package/dist/esm/{chunk-6ZQWPHLV.mjs.map → chunk-XWVMFCW3.mjs.map} +0 -0
- /package/dist/esm/{chunk-FTIW5GGG.mjs.map → chunk-Y2H7FG2P.mjs.map} +0 -0
- /package/dist/esm/{chunk-JPDT6E3B.mjs.map → chunk-YDXU6ALO.mjs.map} +0 -0
|
@@ -68,17 +68,6 @@ type GetAccountCollectionsWithOwnedTokensQuery = {
|
|
|
68
68
|
} | null;
|
|
69
69
|
}>;
|
|
70
70
|
};
|
|
71
|
-
type GetAccountOwnedObjectsQuery = {
|
|
72
|
-
current_objects: Array<{
|
|
73
|
-
allow_ungated_transfer: boolean;
|
|
74
|
-
state_key_hash: string;
|
|
75
|
-
owner_address: string;
|
|
76
|
-
object_address: string;
|
|
77
|
-
last_transaction_version: any;
|
|
78
|
-
last_guid_creation_num: any;
|
|
79
|
-
is_deleted: boolean;
|
|
80
|
-
}>;
|
|
81
|
-
};
|
|
82
71
|
type GetAccountOwnedTokensQuery = {
|
|
83
72
|
current_token_ownerships_v2: Array<{
|
|
84
73
|
token_standard: string;
|
|
@@ -182,6 +171,13 @@ type GetChainTopUserTransactionsQuery = {
|
|
|
182
171
|
};
|
|
183
172
|
type GetCollectionDataQuery = {
|
|
184
173
|
current_collections_v2: Array<{
|
|
174
|
+
uri: string;
|
|
175
|
+
total_minted_v2?: any | null;
|
|
176
|
+
token_standard: string;
|
|
177
|
+
table_handle_v1?: string | null;
|
|
178
|
+
mutable_uri?: boolean | null;
|
|
179
|
+
mutable_description?: boolean | null;
|
|
180
|
+
max_supply?: any | null;
|
|
185
181
|
collection_id: string;
|
|
186
182
|
collection_name: string;
|
|
187
183
|
creator_address: string;
|
|
@@ -189,13 +185,17 @@ type GetCollectionDataQuery = {
|
|
|
189
185
|
description: string;
|
|
190
186
|
last_transaction_timestamp: any;
|
|
191
187
|
last_transaction_version: any;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
188
|
+
cdn_asset_uris?: {
|
|
189
|
+
cdn_image_uri?: string | null;
|
|
190
|
+
asset_uri: string;
|
|
191
|
+
animation_optimizer_retry_count: number;
|
|
192
|
+
cdn_animation_uri?: string | null;
|
|
193
|
+
cdn_json_uri?: string | null;
|
|
194
|
+
image_optimizer_retry_count: number;
|
|
195
|
+
json_parser_retry_count: number;
|
|
196
|
+
raw_animation_uri?: string | null;
|
|
197
|
+
raw_image_uri?: string | null;
|
|
198
|
+
} | null;
|
|
199
199
|
}>;
|
|
200
200
|
};
|
|
201
201
|
type GetCurrentFungibleAssetBalancesQuery = {
|
|
@@ -289,6 +289,17 @@ type GetNumberOfDelegatorsQuery = {
|
|
|
289
289
|
pool_address?: string | null;
|
|
290
290
|
}>;
|
|
291
291
|
};
|
|
292
|
+
type GetObjectDataQuery = {
|
|
293
|
+
current_objects: Array<{
|
|
294
|
+
allow_ungated_transfer: boolean;
|
|
295
|
+
state_key_hash: string;
|
|
296
|
+
owner_address: string;
|
|
297
|
+
object_address: string;
|
|
298
|
+
last_transaction_version: any;
|
|
299
|
+
last_guid_creation_num: any;
|
|
300
|
+
is_deleted: boolean;
|
|
301
|
+
}>;
|
|
302
|
+
};
|
|
292
303
|
type GetProcessorStatusQuery = {
|
|
293
304
|
processor_status: Array<{
|
|
294
305
|
last_success_version: any;
|
|
@@ -435,7 +446,7 @@ type GetTokenDataQuery = {
|
|
|
435
446
|
* These types are used as the return type when calling a sdk api function
|
|
436
447
|
* that calls the function that queries the server (usually under the /api/ folder)
|
|
437
448
|
*/
|
|
438
|
-
type
|
|
449
|
+
type GetObjectDataQueryResponse = GetObjectDataQuery["current_objects"];
|
|
439
450
|
type GetAccountOwnedTokensQueryResponse = GetAccountOwnedTokensQuery["current_token_ownerships_v2"];
|
|
440
451
|
type GetAccountOwnedTokensFromCollectionResponse = GetAccountOwnedTokensFromCollectionQuery["current_token_ownerships_v2"];
|
|
441
452
|
type GetAccountCollectionsWithOwnedTokenResponse = GetAccountCollectionsWithOwnedTokensQuery["current_collection_ownership_v2_view"];
|
|
@@ -2213,4 +2224,4 @@ declare class AccountAddress extends Serializable implements TransactionArgument
|
|
|
2213
2224
|
equals(other: AccountAddress): boolean;
|
|
2214
2225
|
}
|
|
2215
2226
|
|
|
2216
|
-
export { type
|
|
2227
|
+
export { type GetEventsResponse as $, type AnyNumber as A, type GetAccountOwnedTokensFromCollectionResponse as B, type Client as C, Deserializer as D, type EntryFunctionArgument as E, type FullNodeConfig as F, type GetAccountOwnedTokensQueryResponse as G, type HexInput as H, type IndexerConfig as I, type GetAccountCollectionsWithOwnedTokenResponse as J, type GetAccountCoinsDataResponse as K, type LedgerVersionArg as L, type MoveModuleId as M, Network as N, type OrderByArg as O, type PaginationArgs as P, type GetObjectDataQueryResponse as Q, type GetCollectionDataResponse as R, Serializable as S, type TransactionArgument as T, type Uint8 as U, type GetTokenDataResponse as V, type WhereArg as W, type GetCurrentTokenOwnershipResponse as X, type GetOwnedTokensResponse as Y, ZkpVariant as Z, type GetTokenActivityResponse as _, Serializer as a, type TransactionPayloadResponse as a$, type WaitForTransactionOptions as a0, type UserTransactionResponse as a1, type MoveFunction as a2, type GetFungibleAssetMetadataResponse as a3, type GetFungibleAssetActivitiesResponse as a4, type GetCurrentFungibleAssetBalancesResponse as a5, type LedgerInfo as a6, type Block as a7, type GetChainTopUserTransactionsResponse as a8, type GraphqlQuery as a9, AccountAuthenticatorVariant as aA, AnySignatureVariant as aB, EphemeralSignatureVariant as aC, type Uint64 as aD, type Uint128 as aE, type Uint256 as aF, type ClientHeadersType as aG, TransactionResponseType as aH, isPendingTransactionResponse as aI, isUserTransactionResponse as aJ, isGenesisTransactionResponse as aK, isBlockMetadataTransactionResponse as aL, isStateCheckpointTransactionResponse as aM, isValidatorTransactionResponse as aN, type GenesisTransactionResponse as aO, type BlockMetadataTransactionResponse as aP, type StateCheckpointTransactionResponse as aQ, type ValidatorTransactionResponse as aR, type WriteSetChange as aS, type WriteSetChangeDeleteModule as aT, type WriteSetChangeDeleteResource as aU, type WriteSetChangeDeleteTableItem as aV, type WriteSetChangeWriteModule as aW, type WriteSetChangeWriteResource as aX, type WriteSetChangeWriteTableItem as aY, type DecodedTableData as aZ, type DeletedTableData as a_, type GetProcessorStatusResponse as aa, type GetANSNameResponse as ab, type GetNumberOfDelegatorsResponse as ac, type GetDelegatedStakingActivitiesResponse as ad, type PendingTransactionResponse as ae, type CommittedTransactionResponse as af, type GasEstimation as ag, type TableItemRequest as ah, type GetTableItemsDataResponse as ai, type GetTableItemsMetadataResponse as aj, type AptosRequest as ak, type ClientRequest as al, type ClientResponse as am, MimeType as an, ensureBoolean as ao, outOfRangeErrorMessage as ap, validateNumberInRange as aq, AddressInvalidReason as ar, ParsingError as as, type ParsingResult as at, HexInvalidReason as au, TypeTagVariants as av, ScriptTransactionArgumentVariants as aw, TransactionPayloadVariants as ax, TransactionVariants as ay, TransactionAuthenticatorVariant as az, type Uint16 as b, type EntryFunctionPayloadResponse as b0, type ScriptPayloadResponse as b1, type MultisigPayloadResponse as b2, type GenesisPayload as b3, type MoveScriptBytecode as b4, type TransactionSignature as b5, isEd25519Signature as b6, isSecp256k1Signature as b7, isMultiAgentSignature as b8, isFeePayerSignature as b9, type MoveModule as bA, type MoveStruct as bB, RoleType as bC, DeriveScheme as bD, type GenerateAccountWithEd25519 as bE, type GenerateAccountWithSingleSignerSecp256k1Key as bF, type GenerateAccount as bG, type OrderBy as bH, type OrderByValue as bI, type TokenStandard as bJ, NetworkToIndexerAPI as bK, NetworkToNodeAPI as bL, NetworkToFaucetAPI as bM, NetworkToPepperAPI as bN, NetworkToProverAPI as bO, NetworkToChainId as bP, NetworkToNetworkName as bQ, isMultiEd25519Signature as ba, type TransactionEd25519Signature as bb, type TransactionSecp256k1Signature as bc, type TransactionMultiEd25519Signature as bd, type TransactionMultiAgentSignature as be, type TransactionFeePayerSignature as bf, type AccountSignature as bg, type WriteSet as bh, type ScriptWriteSet as bi, type DirectWriteSet as bj, type EventGuid as bk, type Event as bl, type MoveUint8Type as bm, type MoveUint16Type as bn, type MoveUint32Type as bo, type MoveUint64Type as bp, type MoveUint128Type as bq, type MoveUint256Type as br, type MoveAddressType as bs, type MoveObjectType as bt, type MoveOptionType as bu, type MoveStructType as bv, type MoveType as bw, MoveFunctionVisibility as bx, MoveAbility as by, type MoveStructField as bz, type Uint32 as c, type Deserializable as d, Hex as e, type AuthenticationKeyScheme as f, AccountAddress as g, AnyPublicKeyVariant as h, EphemeralPublicKeyVariant as i, type ClientConfig as j, type FaucetConfig as k, type AptosSettings as l, EphemeralCertificateVariant as m, type ScriptFunctionArgument as n, type MoveFunctionId as o, type AccountAddressInput as p, type MoveStructId as q, type MoveValue as r, type MoveFunctionGenericTypeParam as s, SigningSchemeInput as t, SigningScheme as u, type AccountData as v, type MoveModuleBytecode as w, type TransactionResponse as x, type MoveResource as y, type TokenStandardArg as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcessWithoutNullStreams } from 'child_process';
|
|
2
|
-
import { N as Network, g as AccountAddress } from '../accountAddress-
|
|
2
|
+
import { N as Network, g as AccountAddress } from '../accountAddress-NYtf3uZq.js';
|
|
3
3
|
|
|
4
4
|
declare class LocalNode {
|
|
5
5
|
readonly MAXIMUM_WAIT_TIME_SEC = 75;
|
package/dist/common/cli/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _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",t=["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"],
|
|
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",t=["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),e;r==="win32"?e=_child_process.spawn.call(void 0, s,t,{shell:!0}):e=_child_process.spawn.call(void 0, s,t),this.process=e,_optionalChain([e, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",o=>{let a=o.toString();console.log(a)})]),_optionalChain([e, '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(),t=Date.now()/1e3,r=t;for(;!s&&t+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 p=class{async init(s){let{network:t,profile:r}=s,e=["aptos","init",`--network=${_nullishCoalesce(t, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(e)}async compile(s){let{packageDirectoryPath:t,namedAddresses:r}=s,e=["aptos","move","compile","--package-dir",t],o=this.parseNamedAddresses(r);return e.push(...this.prepareNamedAddresses(o)),this.runCommand(e)}async test(s){let{packageDirectoryPath:t,namedAddresses:r}=s,e=["aptos","move","test","--package-dir",t],o=this.parseNamedAddresses(r);return e.push(...this.prepareNamedAddresses(o)),this.runCommand(e)}async publish(s){let{packageDirectoryPath:t,namedAddresses:r,profile:e}=s,o=["aptos","move","publish","--package-dir",t,`--profile=${_nullishCoalesce(e, () => ("default"))}`],a=this.parseNamedAddresses(r);return o.push(...this.prepareNamedAddresses(a)),this.runCommand(o)}async runCommand(s){return new Promise((t,r)=>{let e=_os.platform.call(void 0, ),o;e==="win32"?o=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):o=_child_process.spawn.call(void 0, "npx",s),o.stdout.pipe(process.stdout),o.stderr.pipe(process.stderr),process.stdin.pipe(o.stdin),o.on("close",a=>{a===0?t(!0):r(new Error(`Child process exited with code ${a}`))})})}prepareNamedAddresses(s){let t=s.size,r=[];if(t===0)return r;r.push("--named-addresses");let e=[];return s.forEach((o,a)=>{let m=`${a}=${o.toString()}`;e.push(m)}),r.push(e.join(",")),r}parseNamedAddresses(s){let t=new Map;return Object.keys(s).forEach(r=>{let e=s[r];t.set(r,e)}),t}};exports.LocalNode = c; exports.Move = p;
|
|
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","resolve","reject","code","totalNames","newArgs","names","value","key","toAppend","address"],"mappings":"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","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 Netowrk type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns\n */\n async init(args: { network?: Network; profile?: string }): Promise<boolean> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns\n */\n async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath, \"--skip-fetch-latest-git-deps\"];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publishe the modules in a Move package to the Aptos blockchain\n *\n * @param args.packageDirectoryPath Path to a move package (the folder with a Move.toml file)\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<boolean> {\n const { packageDirectoryPath, namedAddresses, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--skip-fetch-latest-git-deps\",\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const 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"]}
|
|
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","resolve","reject","code","totalNames","newArgs","names","value","key","toAppend","address"],"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,oBAAuC,CAC3C,GAAI,CAGF,OADa,MAAM,MAAM,KAAK,kBAAkB,GACvC,SAAW,GAItB,MAAmB,CACjB,MAAO,EACT,CACF,CACF,EClHA,OAAS,SAAAV,MAAa,gBACtB,OAAS,YAAAE,MAAgB,KAKlB,IAAMY,EAAN,KAAW,CAWhB,MAAM,KAAKC,EAAiE,CAC1E,GAAM,CAAE,QAAAC,EAAS,QAAAC,CAAQ,EAAIF,EACvBV,EAAU,CAAC,QAAS,OAAQ,aAAaW,GAAW,OAAO,GAAI,aAAaC,GAAW,SAAS,EAAE,EAExG,OAAO,KAAK,WAAWZ,CAAO,CAChC,CAcA,MAAM,QAAQU,EAGO,CACnB,GAAM,CAAE,qBAAAG,EAAsB,eAAAC,CAAe,EAAIJ,EAC3CV,EAAU,CAAC,QAAS,OAAQ,UAAW,gBAAiBa,CAAoB,EAE5EE,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAd,EAAQ,KAAK,GAAG,KAAK,sBAAsBe,CAAY,CAAC,EAEjD,KAAK,WAAWf,CAAO,CAChC,CAcA,MAAM,KAAKU,EAA0G,CACnH,GAAM,CAAE,qBAAAG,EAAsB,eAAAC,CAAe,EAAIJ,EAC3CV,EAAU,CAAC,QAAS,OAAQ,OAAQ,gBAAiBa,CAAoB,EAEzEE,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAd,EAAQ,KAAK,GAAG,KAAK,sBAAsBe,CAAY,CAAC,EAEjD,KAAK,WAAWf,CAAO,CAChC,CAeA,MAAM,QAAQU,EAIO,CACnB,GAAM,CAAE,qBAAAG,EAAsB,eAAAC,EAAgB,QAAAF,CAAQ,EAAIF,EACpDV,EAAU,CACd,QACA,OACA,UACA,gBACAa,EACA,aAAaD,GAAW,SAAS,EACnC,EAEMG,EAAe,KAAK,oBAAoBD,CAAc,EAE5D,OAAAd,EAAQ,KAAK,GAAG,KAAK,sBAAsBe,CAAY,CAAC,EAEjD,KAAK,WAAWf,CAAO,CAChC,CASA,MAAc,WAAWU,EAAuC,CAC9D,OAAO,IAAI,QAAQ,CAACM,EAASC,IAAW,CACtC,IAAMhB,EAAkBJ,EAAS,EAC7BK,EAGAD,IAAoB,QACtBC,EAAeP,EAAM,MAAOe,EAAM,CAAE,MAAO,EAAK,CAAC,EAEjDR,EAAeP,EAAM,MAAOe,CAAI,EAGlCR,EAAa,OAAO,KAAK,QAAQ,MAAM,EACvCA,EAAa,OAAO,KAAK,QAAQ,MAAM,EACvC,QAAQ,MAAM,KAAKA,EAAa,KAAK,EAErCA,EAAa,GAAG,QAAUgB,GAAS,CAC7BA,IAAS,EACXF,EAAQ,EAAI,EAEZC,EAAO,IAAI,MAAM,kCAAkCC,CAAI,EAAE,CAAC,CAE9D,CAAC,CACH,CAAC,CACH,CAaQ,sBAAsBJ,EAA4D,CACxF,IAAMK,EAAaL,EAAe,KAC5BM,EAAyB,CAAC,EAEhC,GAAID,IAAe,EACjB,OAAOC,EAGTA,EAAQ,KAAK,mBAAmB,EAEhC,IAAMC,EAAuB,CAAC,EAC9B,OAAAP,EAAe,QAAQ,CAACQ,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,oBAAoBN,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASS,GAAQ,CAC3C,IAAME,EAAUX,EAAeS,CAAG,EAClCR,EAAa,IAAIQ,EAAKE,CAAO,CAC/B,CAAC,EAEMV,CACT,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 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"]}
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as
|
|
2
|
-
export { aA as AccountAuthenticatorVariant, bg as AccountSignature, ar as AddressInvalidReason, aB as AnySignatureVariant, aP as BlockMetadataTransactionResponse, aG as ClientHeadersType, aZ as DecodedTableData, a_ as DeletedTableData, bD as DeriveScheme, bj as DirectWriteSet, b0 as EntryFunctionPayloadResponse, aC as EphemeralSignatureVariant, bl as Event, bk as EventGuid, bG as GenerateAccount, bE as GenerateAccountWithEd25519, bF as GenerateAccountWithSingleSignerSecp256k1Key, b3 as GenesisPayload, aO as GenesisTransactionResponse, au as HexInvalidReason, by as MoveAbility, bs as MoveAddressType, bx as MoveFunctionVisibility, bA as MoveModule, bt as MoveObjectType, bu as MoveOptionType, b4 as MoveScriptBytecode, bB as MoveStruct, bz as MoveStructField, bv as MoveStructType, bw as MoveType, bq as MoveUint128Type, bn as MoveUint16Type, br as MoveUint256Type, bo as MoveUint32Type, bp as MoveUint64Type, bm as MoveUint8Type, b2 as MultisigPayloadResponse, bP as NetworkToChainId, bM as NetworkToFaucetAPI, bK as NetworkToIndexerAPI, bQ as NetworkToNetworkName, bL as NetworkToNodeAPI, bN as NetworkToPepperAPI, bO as NetworkToProverAPI, bH as OrderBy, bI as OrderByValue, as as ParsingError, at as ParsingResult, bC as RoleType, b1 as ScriptPayloadResponse, aw as ScriptTransactionArgumentVariants, bi as ScriptWriteSet, aQ as StateCheckpointTransactionResponse, bJ as TokenStandard, az as TransactionAuthenticatorVariant, bb as TransactionEd25519Signature, bf as TransactionFeePayerSignature, be as TransactionMultiAgentSignature, bd as TransactionMultiEd25519Signature, a$ as TransactionPayloadResponse, ax as TransactionPayloadVariants, aH as TransactionResponseType, bc as TransactionSecp256k1Signature, b5 as TransactionSignature, ay as TransactionVariants, av as TypeTagVariants, aE as Uint128, aF as Uint256, aD as Uint64, aR as ValidatorTransactionResponse, bh as WriteSet, aS as WriteSetChange, aT as WriteSetChangeDeleteModule, aU as WriteSetChangeDeleteResource, aV as WriteSetChangeDeleteTableItem, aW as WriteSetChangeWriteModule, aX as WriteSetChangeWriteResource, aY as WriteSetChangeWriteTableItem, ao as ensureBoolean, aL as isBlockMetadataTransactionResponse, b6 as isEd25519Signature, b9 as isFeePayerSignature, aK as isGenesisTransactionResponse, b8 as isMultiAgentSignature, ba as isMultiEd25519Signature, aI as isPendingTransactionResponse, b7 as isSecp256k1Signature, aM as isStateCheckpointTransactionResponse, aJ as isUserTransactionResponse, aN as isValidatorTransactionResponse, ap as outOfRangeErrorMessage, aq as validateNumberInRange } from './accountAddress-
|
|
1
|
+
import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, P as PaginationArgs, w as MoveModuleBytecode, x as TransactionResponse, y as MoveResource, z as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, B as GetAccountOwnedTokensFromCollectionResponse, J as GetAccountCollectionsWithOwnedTokenResponse, K as GetAccountCoinsDataResponse, W as WhereArg, Q as GetObjectDataQueryResponse, R as GetCollectionDataResponse, V as GetTokenDataResponse, X as GetCurrentTokenOwnershipResponse, Y as GetOwnedTokensResponse, _ as GetTokenActivityResponse, $ as GetEventsResponse, a0 as WaitForTransactionOptions, a1 as UserTransactionResponse, a2 as MoveFunction, a3 as GetFungibleAssetMetadataResponse, a4 as GetFungibleAssetActivitiesResponse, a5 as GetCurrentFungibleAssetBalancesResponse, a6 as LedgerInfo, a7 as Block, a8 as GetChainTopUserTransactionsResponse, a9 as GraphqlQuery, aa as GetProcessorStatusResponse, ab as GetANSNameResponse, ac as GetNumberOfDelegatorsResponse, ad as GetDelegatedStakingActivitiesResponse, ae as PendingTransactionResponse, af as CommittedTransactionResponse, ag as GasEstimation, ah as TableItemRequest, ai as GetTableItemsDataResponse, aj as GetTableItemsMetadataResponse, ak as AptosRequest, al as ClientRequest, am as ClientResponse, an as MimeType } from './accountAddress-NYtf3uZq.js';
|
|
2
|
+
export { aA as AccountAuthenticatorVariant, bg as AccountSignature, ar as AddressInvalidReason, aB as AnySignatureVariant, aP as BlockMetadataTransactionResponse, aG as ClientHeadersType, aZ as DecodedTableData, a_ as DeletedTableData, bD as DeriveScheme, bj as DirectWriteSet, b0 as EntryFunctionPayloadResponse, aC as EphemeralSignatureVariant, bl as Event, bk as EventGuid, bG as GenerateAccount, bE as GenerateAccountWithEd25519, bF as GenerateAccountWithSingleSignerSecp256k1Key, b3 as GenesisPayload, aO as GenesisTransactionResponse, au as HexInvalidReason, by as MoveAbility, bs as MoveAddressType, bx as MoveFunctionVisibility, bA as MoveModule, bt as MoveObjectType, bu as MoveOptionType, b4 as MoveScriptBytecode, bB as MoveStruct, bz as MoveStructField, bv as MoveStructType, bw as MoveType, bq as MoveUint128Type, bn as MoveUint16Type, br as MoveUint256Type, bo as MoveUint32Type, bp as MoveUint64Type, bm as MoveUint8Type, b2 as MultisigPayloadResponse, bP as NetworkToChainId, bM as NetworkToFaucetAPI, bK as NetworkToIndexerAPI, bQ as NetworkToNetworkName, bL as NetworkToNodeAPI, bN as NetworkToPepperAPI, bO as NetworkToProverAPI, bH as OrderBy, bI as OrderByValue, as as ParsingError, at as ParsingResult, bC as RoleType, b1 as ScriptPayloadResponse, aw as ScriptTransactionArgumentVariants, bi as ScriptWriteSet, aQ as StateCheckpointTransactionResponse, bJ as TokenStandard, az as TransactionAuthenticatorVariant, bb as TransactionEd25519Signature, bf as TransactionFeePayerSignature, be as TransactionMultiAgentSignature, bd as TransactionMultiEd25519Signature, a$ as TransactionPayloadResponse, ax as TransactionPayloadVariants, aH as TransactionResponseType, bc as TransactionSecp256k1Signature, b5 as TransactionSignature, ay as TransactionVariants, av as TypeTagVariants, aE as Uint128, aF as Uint256, aD as Uint64, aR as ValidatorTransactionResponse, bh as WriteSet, aS as WriteSetChange, aT as WriteSetChangeDeleteModule, aU as WriteSetChangeDeleteResource, aV as WriteSetChangeDeleteTableItem, aW as WriteSetChangeWriteModule, aX as WriteSetChangeWriteResource, aY as WriteSetChangeWriteTableItem, ao as ensureBoolean, aL as isBlockMetadataTransactionResponse, b6 as isEd25519Signature, b9 as isFeePayerSignature, aK as isGenesisTransactionResponse, b8 as isMultiAgentSignature, ba as isMultiEd25519Signature, aI as isPendingTransactionResponse, b7 as isSecp256k1Signature, aM as isStateCheckpointTransactionResponse, aJ as isUserTransactionResponse, aN as isValidatorTransactionResponse, ap as outOfRangeErrorMessage, aq as validateNumberInRange } from './accountAddress-NYtf3uZq.js';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
|
|
5
5
|
type Maybe<T> = T | null;
|
|
@@ -1500,7 +1500,8 @@ declare enum ProcessorType {
|
|
|
1500
1500
|
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
1501
1501
|
STAKE_PROCESSOR = "stake_processor",
|
|
1502
1502
|
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
1503
|
-
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
1503
|
+
USER_TRANSACTION_PROCESSOR = "user_transaction_processor",
|
|
1504
|
+
OBJECT_PROCESSOR = "objects_processor"
|
|
1504
1505
|
}
|
|
1505
1506
|
|
|
1506
1507
|
/**
|
|
@@ -2782,6 +2783,22 @@ type InputViewFunctionData = {
|
|
|
2782
2783
|
functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
|
|
2783
2784
|
abi?: ViewFunctionABI;
|
|
2784
2785
|
};
|
|
2786
|
+
/**
|
|
2787
|
+
* The data needed to generate a View Function payload in JSON
|
|
2788
|
+
*/
|
|
2789
|
+
type InputViewFunctionJsonData = {
|
|
2790
|
+
function: MoveFunctionId;
|
|
2791
|
+
typeArguments?: Array<MoveStructId>;
|
|
2792
|
+
functionArguments?: Array<MoveValue>;
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Payload sent to the fullnode for a JSON view request
|
|
2796
|
+
*/
|
|
2797
|
+
type ViewFunctionJsonPayload = {
|
|
2798
|
+
function: MoveFunctionId;
|
|
2799
|
+
typeArguments: Array<MoveStructId>;
|
|
2800
|
+
functionArguments: Array<MoveValue>;
|
|
2801
|
+
};
|
|
2785
2802
|
/**
|
|
2786
2803
|
* Data needed to generate a view function payload and fetch the remote ABI
|
|
2787
2804
|
*/
|
|
@@ -3877,8 +3894,8 @@ declare class Account {
|
|
|
3877
3894
|
getAccountOwnedObjects(args: {
|
|
3878
3895
|
accountAddress: AccountAddressInput;
|
|
3879
3896
|
minimumLedgerVersion?: AnyNumber;
|
|
3880
|
-
options?: PaginationArgs & OrderByArg<
|
|
3881
|
-
}): Promise<
|
|
3897
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
3898
|
+
}): Promise<GetObjectDataQueryResponse>;
|
|
3882
3899
|
/**
|
|
3883
3900
|
* Derives an account by providing a private key.
|
|
3884
3901
|
* This functions resolves the provided private key type and derives the public key from it.
|
|
@@ -3976,6 +3993,9 @@ declare class DigitalAsset {
|
|
|
3976
3993
|
readonly config: AptosConfig;
|
|
3977
3994
|
constructor(config: AptosConfig);
|
|
3978
3995
|
/**
|
|
3996
|
+
* @deprecated use getCollectionDataByCreatorAddressAndCollectionName - this function
|
|
3997
|
+
* will be removed in the next major release
|
|
3998
|
+
*
|
|
3979
3999
|
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
3980
4000
|
*
|
|
3981
4001
|
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
@@ -3996,6 +4016,50 @@ declare class DigitalAsset {
|
|
|
3996
4016
|
minimumLedgerVersion?: AnyNumber;
|
|
3997
4017
|
options?: TokenStandardArg;
|
|
3998
4018
|
}): Promise<GetCollectionDataResponse>;
|
|
4019
|
+
/**
|
|
4020
|
+
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
4021
|
+
*
|
|
4022
|
+
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
4023
|
+
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
4024
|
+
*
|
|
4025
|
+
* @example
|
|
4026
|
+
* const collection = await aptos.getCollectionDataByCreatorAddressAndCollectionName({
|
|
4027
|
+
* creatorAddress:"0x123",
|
|
4028
|
+
* collectionName:"myCollection"
|
|
4029
|
+
* })
|
|
4030
|
+
*
|
|
4031
|
+
* @param args.creatorAddress the address of the collection's creator
|
|
4032
|
+
* @param args.collectionName the name of the collection
|
|
4033
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4034
|
+
* @param args.options.tokenStandard the token standard to query
|
|
4035
|
+
* @returns GetCollectionDataResponse response type
|
|
4036
|
+
*/
|
|
4037
|
+
getCollectionDataByCreatorAddressAndCollectionName(args: {
|
|
4038
|
+
creatorAddress: AccountAddressInput;
|
|
4039
|
+
collectionName: string;
|
|
4040
|
+
minimumLedgerVersion?: AnyNumber;
|
|
4041
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
4042
|
+
}): Promise<GetCollectionDataResponse>;
|
|
4043
|
+
/**
|
|
4044
|
+
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
4045
|
+
*
|
|
4046
|
+
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
4047
|
+
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
4048
|
+
*
|
|
4049
|
+
* @example
|
|
4050
|
+
* const collection = await aptos.getCollectionDataByCreatorAddressAnd({creatorAddress:"0x123"})
|
|
4051
|
+
*
|
|
4052
|
+
* @param args.creatorAddress the address of the collection's creator
|
|
4053
|
+
* @param args.collectionName the name of the collection
|
|
4054
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4055
|
+
* @param args.options.tokenStandard the token standard to query
|
|
4056
|
+
* @returns GetCollectionDataResponse response type
|
|
4057
|
+
*/
|
|
4058
|
+
getCollectionDataByCreatorAddress(args: {
|
|
4059
|
+
creatorAddress: AccountAddressInput;
|
|
4060
|
+
minimumLedgerVersion?: AnyNumber;
|
|
4061
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
4062
|
+
}): Promise<GetCollectionDataResponse>;
|
|
3999
4063
|
/**
|
|
4000
4064
|
* Queries data of a specific collection by the collection ID.
|
|
4001
4065
|
*
|
|
@@ -4009,6 +4073,7 @@ declare class DigitalAsset {
|
|
|
4009
4073
|
getCollectionDataByCollectionId(args: {
|
|
4010
4074
|
collectionId: AccountAddressInput;
|
|
4011
4075
|
minimumLedgerVersion?: AnyNumber;
|
|
4076
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
4012
4077
|
}): Promise<GetCollectionDataResponse>;
|
|
4013
4078
|
/**
|
|
4014
4079
|
* Queries a collection's ID.
|
|
@@ -4607,8 +4672,9 @@ declare class Faucet {
|
|
|
4607
4672
|
declare function isBool(arg: SimpleEntryFunctionArgumentTypes): arg is boolean;
|
|
4608
4673
|
declare function isString(arg: any): arg is string;
|
|
4609
4674
|
declare function isNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number;
|
|
4675
|
+
declare function convertNumber(arg: SimpleEntryFunctionArgumentTypes): number | undefined;
|
|
4610
4676
|
declare function isLargeNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number | bigint | string;
|
|
4611
|
-
declare function
|
|
4677
|
+
declare function isEmptyOption(arg: SimpleEntryFunctionArgumentTypes): arg is null | undefined;
|
|
4612
4678
|
declare function isEncodedEntryFunctionArgument(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is EntryFunctionArgumentTypes;
|
|
4613
4679
|
declare function isBcsBool(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is Bool;
|
|
4614
4680
|
declare function isBcsAddress(arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes): arg is AccountAddress;
|
|
@@ -4743,6 +4809,7 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
|
|
|
4743
4809
|
* @param functionAbi
|
|
4744
4810
|
* @param arg
|
|
4745
4811
|
* @param position
|
|
4812
|
+
* @param genericTypeParams
|
|
4746
4813
|
*/
|
|
4747
4814
|
declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
4748
4815
|
declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
|
|
@@ -4844,7 +4911,7 @@ declare class FungibleAsset {
|
|
|
4844
4911
|
options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;
|
|
4845
4912
|
}): Promise<GetFungibleAssetMetadataResponse>;
|
|
4846
4913
|
/**
|
|
4847
|
-
* Queries a fungible asset metadata
|
|
4914
|
+
* Queries a fungible asset metadata by the asset type
|
|
4848
4915
|
*
|
|
4849
4916
|
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
4850
4917
|
*
|
|
@@ -4863,6 +4930,23 @@ declare class FungibleAsset {
|
|
|
4863
4930
|
assetType: string;
|
|
4864
4931
|
minimumLedgerVersion?: AnyNumber;
|
|
4865
4932
|
}): Promise<GetFungibleAssetMetadataResponse[0]>;
|
|
4933
|
+
/**
|
|
4934
|
+
* Queries a fungible asset metadata by the creator address
|
|
4935
|
+
*
|
|
4936
|
+
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
4937
|
+
*
|
|
4938
|
+
* @example
|
|
4939
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadataByCreatorAddress({creatorAddress:"0x123"})
|
|
4940
|
+
*
|
|
4941
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
4942
|
+
* @param args.creatorAddress The creator address of the fungible asset.
|
|
4943
|
+
*
|
|
4944
|
+
* @returns A fungible asset metadata item
|
|
4945
|
+
*/
|
|
4946
|
+
getFungibleAssetMetadataByCreatorAddress(args: {
|
|
4947
|
+
creatorAddress: AccountAddressInput;
|
|
4948
|
+
minimumLedgerVersion?: AnyNumber;
|
|
4949
|
+
}): Promise<GetFungibleAssetMetadataResponse>;
|
|
4866
4950
|
/**
|
|
4867
4951
|
* Queries all fungible asset activities
|
|
4868
4952
|
*
|
|
@@ -5015,6 +5099,26 @@ declare class General {
|
|
|
5015
5099
|
payload: InputViewFunctionData;
|
|
5016
5100
|
options?: LedgerVersionArg;
|
|
5017
5101
|
}): Promise<T>;
|
|
5102
|
+
/**
|
|
5103
|
+
* Queries for a Move view function with JSON, this provides compatability with the old `aptos` package
|
|
5104
|
+
* @param args.payload Payload for the view function
|
|
5105
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
5106
|
+
*
|
|
5107
|
+
* @example
|
|
5108
|
+
* const data = await aptos.view({
|
|
5109
|
+
* payload: {
|
|
5110
|
+
* function: "0x1::coin::balance",
|
|
5111
|
+
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
5112
|
+
* functionArguments: [accountAddress.toString()],
|
|
5113
|
+
* }
|
|
5114
|
+
* })
|
|
5115
|
+
*
|
|
5116
|
+
* @returns an array of Move values
|
|
5117
|
+
*/
|
|
5118
|
+
viewJson<T extends Array<MoveValue>>(args: {
|
|
5119
|
+
payload: InputViewFunctionJsonData;
|
|
5120
|
+
options?: LedgerVersionArg;
|
|
5121
|
+
}): Promise<T>;
|
|
5018
5122
|
/**
|
|
5019
5123
|
* Queries top user transactions
|
|
5020
5124
|
*
|
|
@@ -6204,6 +6308,30 @@ declare class Keyless {
|
|
|
6204
6308
|
}): Promise<KeylessAccount>;
|
|
6205
6309
|
}
|
|
6206
6310
|
|
|
6311
|
+
/**
|
|
6312
|
+
* A class to query all `Object` related queries on Aptos.
|
|
6313
|
+
*/
|
|
6314
|
+
declare class AptosObject {
|
|
6315
|
+
readonly config: AptosConfig;
|
|
6316
|
+
constructor(config: AptosConfig);
|
|
6317
|
+
/**
|
|
6318
|
+
* Fetch the object data based on the oabject address
|
|
6319
|
+
*
|
|
6320
|
+
* @example
|
|
6321
|
+
* const object = await aptos.getObjectDataByObjectAddress({objectAddress:"0x123"})
|
|
6322
|
+
*
|
|
6323
|
+
* @param args.objectAddress The object address
|
|
6324
|
+
* @param args.options Configuration options for waitForTransaction
|
|
6325
|
+
*
|
|
6326
|
+
* @returns The object data
|
|
6327
|
+
*/
|
|
6328
|
+
getObjectDataByObjectAddress(args: {
|
|
6329
|
+
objectAddress: AccountAddressInput;
|
|
6330
|
+
minimumLedgerVersion?: AnyNumber;
|
|
6331
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
6332
|
+
}): Promise<GetObjectDataQueryResponse[0]>;
|
|
6333
|
+
}
|
|
6334
|
+
|
|
6207
6335
|
/**
|
|
6208
6336
|
* This class is the main entry point into Aptos's
|
|
6209
6337
|
* APIs and separates functionality into different namespaces.
|
|
@@ -6229,9 +6357,10 @@ declare class Aptos {
|
|
|
6229
6357
|
readonly transaction: Transaction;
|
|
6230
6358
|
readonly table: Table;
|
|
6231
6359
|
readonly keyless: Keyless;
|
|
6360
|
+
readonly object: AptosObject;
|
|
6232
6361
|
constructor(settings?: AptosConfig);
|
|
6233
6362
|
}
|
|
6234
|
-
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Table, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
6363
|
+
interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Table, AptosObject, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
|
|
6235
6364
|
}
|
|
6236
6365
|
|
|
6237
6366
|
/**
|
|
@@ -6409,4 +6538,4 @@ declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAp
|
|
|
6409
6538
|
declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6410
6539
|
declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
|
|
6411
6540
|
|
|
6412
|
-
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,
|
|
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 };
|