@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Network } from '../utils/apiEndpoints.mjs';
|
|
2
2
|
import { TokenStandard, OrderBy } from './indexer.mjs';
|
|
3
|
-
export { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse,
|
|
3
|
+
export { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderByValue } from './indexer.mjs';
|
|
4
4
|
import './generated/operations.mjs';
|
|
5
5
|
import './generated/types.mjs';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetObjectDataQuery, GetAccountOwnedTokensQuery, GetAccountOwnedTokensFromCollectionQuery, GetAccountCollectionsWithOwnedTokensQuery, GetAccountCoinsDataQuery, GetChainTopUserTransactionsQuery, GetEventsQuery, GetNumberOfDelegatorsQuery, GetDelegatedStakingActivitiesQuery, GetCollectionDataQuery, GetTokenDataQuery, GetProcessorStatusQuery, GetFungibleAssetMetadataQuery, GetFungibleAssetActivitiesQuery, GetCurrentFungibleAssetBalancesQuery, GetTokenActivityQuery, GetCurrentTokenOwnershipQuery, GetTableItemsDataQuery, GetTableItemsMetadataQuery, GetNamesQuery } from './generated/operations.mjs';
|
|
2
2
|
import './generated/types.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ import './generated/types.mjs';
|
|
|
21
21
|
* These types are used as the return type when calling a sdk api function
|
|
22
22
|
* that calls the function that queries the server (usually under the /api/ folder)
|
|
23
23
|
*/
|
|
24
|
-
type
|
|
24
|
+
type GetObjectDataQueryResponse = GetObjectDataQuery["current_objects"];
|
|
25
25
|
type GetAccountOwnedTokensQueryResponse = GetAccountOwnedTokensQuery["current_token_ownerships_v2"];
|
|
26
26
|
type GetAccountOwnedTokensFromCollectionResponse = GetAccountOwnedTokensFromCollectionQuery["current_token_ownerships_v2"];
|
|
27
27
|
type GetAccountCollectionsWithOwnedTokenResponse = GetAccountCollectionsWithOwnedTokensQuery["current_collection_ownership_v2_view"];
|
|
@@ -62,4 +62,4 @@ type GraphqlQuery = {
|
|
|
62
62
|
variables?: {};
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
export type { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse,
|
|
65
|
+
export type { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard };
|
|
@@ -52,7 +52,8 @@ declare enum ProcessorType {
|
|
|
52
52
|
FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
|
|
53
53
|
STAKE_PROCESSOR = "stake_processor",
|
|
54
54
|
TOKEN_V2_PROCESSOR = "token_v2_processor",
|
|
55
|
-
USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
|
|
55
|
+
USER_TRANSACTION_PROCESSOR = "user_transaction_processor",
|
|
56
|
+
OBJECT_PROCESSOR = "objects_processor"
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT };
|
package/dist/esm/utils/const.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-L36ZHC7J.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT};
|
|
2
2
|
//# sourceMappingURL=const.mjs.map
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-GED6IT3S.mjs";import{a as q}from"../chunk-WV5AD4IE.mjs";import
|
|
1
|
+
import"../chunk-GED6IT3S.mjs";import{a as q}from"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p}from"../chunk-L36ZHC7J.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-SCHZ67F3.mjs";import"../chunk-FVA2OPG4.mjs";export{m as APTOS_COIN,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,p as ProcessorType,n as RAW_TRANSACTION_SALT,o as RAW_TRANSACTION_WITH_DATA_SALT,q as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=normalizeBundle.mjs.map
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-4KYQ7N3N.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
package/src/api/account.ts
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
AnyNumber,
|
|
9
9
|
GetAccountCoinsDataResponse,
|
|
10
10
|
GetAccountCollectionsWithOwnedTokenResponse,
|
|
11
|
-
GetAccountOwnedObjectsResponse,
|
|
12
11
|
GetAccountOwnedTokensFromCollectionResponse,
|
|
13
12
|
GetAccountOwnedTokensQueryResponse,
|
|
13
|
+
GetObjectDataQueryResponse,
|
|
14
14
|
LedgerVersionArg,
|
|
15
15
|
MoveModuleBytecode,
|
|
16
16
|
MoveResource,
|
|
@@ -471,8 +471,8 @@ export class Account {
|
|
|
471
471
|
async getAccountOwnedObjects(args: {
|
|
472
472
|
accountAddress: AccountAddressInput;
|
|
473
473
|
minimumLedgerVersion?: AnyNumber;
|
|
474
|
-
options?: PaginationArgs & OrderByArg<
|
|
475
|
-
}): Promise<
|
|
474
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
475
|
+
}): Promise<GetObjectDataQueryResponse> {
|
|
476
476
|
await waitForIndexerOnVersion({
|
|
477
477
|
config: this.config,
|
|
478
478
|
minimumLedgerVersion: args.minimumLedgerVersion,
|
package/src/api/aptos.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { Staking } from "./staking";
|
|
|
14
14
|
import { Transaction } from "./transaction";
|
|
15
15
|
import { Table } from "./table";
|
|
16
16
|
import { Keyless } from "./keyless";
|
|
17
|
+
import { AptosObject } from "./object";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* This class is the main entry point into Aptos's
|
|
@@ -53,6 +54,8 @@ export class Aptos {
|
|
|
53
54
|
|
|
54
55
|
readonly keyless: Keyless;
|
|
55
56
|
|
|
57
|
+
readonly object: AptosObject;
|
|
58
|
+
|
|
56
59
|
constructor(settings?: AptosConfig) {
|
|
57
60
|
this.config = new AptosConfig(settings);
|
|
58
61
|
this.account = new Account(this.config);
|
|
@@ -67,6 +70,7 @@ export class Aptos {
|
|
|
67
70
|
this.transaction = new Transaction(this.config);
|
|
68
71
|
this.table = new Table(this.config);
|
|
69
72
|
this.keyless = new Keyless(this.config);
|
|
73
|
+
this.object = new AptosObject(this.config);
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
|
|
@@ -84,6 +88,7 @@ export interface Aptos
|
|
|
84
88
|
Keyless,
|
|
85
89
|
Staking,
|
|
86
90
|
Table,
|
|
91
|
+
AptosObject,
|
|
87
92
|
Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {}
|
|
88
93
|
|
|
89
94
|
/**
|
|
@@ -119,3 +124,4 @@ applyMixin(Aptos, Staking, "staking");
|
|
|
119
124
|
applyMixin(Aptos, Transaction, "transaction");
|
|
120
125
|
applyMixin(Aptos, Table, "table");
|
|
121
126
|
applyMixin(Aptos, Keyless, "keyless");
|
|
127
|
+
applyMixin(Aptos, AptosObject, "object");
|
package/src/api/digitalAsset.ts
CHANGED
|
@@ -25,6 +25,8 @@ import {
|
|
|
25
25
|
freezeDigitalAssetTransferTransaction,
|
|
26
26
|
getCollectionData,
|
|
27
27
|
getCollectionDataByCollectionId,
|
|
28
|
+
getCollectionDataByCreatorAddress,
|
|
29
|
+
getCollectionDataByCreatorAddressAndCollectionName,
|
|
28
30
|
getCollectionId,
|
|
29
31
|
getCurrentDigitalAssetOwnership,
|
|
30
32
|
getDigitalAssetActivity,
|
|
@@ -55,6 +57,9 @@ export class DigitalAsset {
|
|
|
55
57
|
constructor(readonly config: AptosConfig) {}
|
|
56
58
|
|
|
57
59
|
/**
|
|
60
|
+
* @deprecated use getCollectionDataByCreatorAddressAndCollectionName - this function
|
|
61
|
+
* will be removed in the next major release
|
|
62
|
+
*
|
|
58
63
|
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
59
64
|
*
|
|
60
65
|
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
@@ -80,7 +85,81 @@ export class DigitalAsset {
|
|
|
80
85
|
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
81
86
|
processorType: ProcessorType.TOKEN_V2_PROCESSOR,
|
|
82
87
|
});
|
|
83
|
-
|
|
88
|
+
|
|
89
|
+
const { creatorAddress, collectionName, options } = args;
|
|
90
|
+
const address = AccountAddress.from(creatorAddress);
|
|
91
|
+
|
|
92
|
+
const whereCondition: any = {
|
|
93
|
+
collection_name: { _eq: collectionName },
|
|
94
|
+
creator_address: { _eq: address.toStringLong() },
|
|
95
|
+
};
|
|
96
|
+
if (options?.tokenStandard) {
|
|
97
|
+
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return getCollectionData({ aptosConfig: this.config, options: { where: whereCondition } });
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
105
|
+
*
|
|
106
|
+
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
107
|
+
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* const collection = await aptos.getCollectionDataByCreatorAddressAndCollectionName({
|
|
111
|
+
* creatorAddress:"0x123",
|
|
112
|
+
* collectionName:"myCollection"
|
|
113
|
+
* })
|
|
114
|
+
*
|
|
115
|
+
* @param args.creatorAddress the address of the collection's creator
|
|
116
|
+
* @param args.collectionName the name of the collection
|
|
117
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
118
|
+
* @param args.options.tokenStandard the token standard to query
|
|
119
|
+
* @returns GetCollectionDataResponse response type
|
|
120
|
+
*/
|
|
121
|
+
async getCollectionDataByCreatorAddressAndCollectionName(args: {
|
|
122
|
+
creatorAddress: AccountAddressInput;
|
|
123
|
+
collectionName: string;
|
|
124
|
+
minimumLedgerVersion?: AnyNumber;
|
|
125
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
126
|
+
}): Promise<GetCollectionDataResponse> {
|
|
127
|
+
await waitForIndexerOnVersion({
|
|
128
|
+
config: this.config,
|
|
129
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
130
|
+
processorType: ProcessorType.TOKEN_V2_PROCESSOR,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
return getCollectionDataByCreatorAddressAndCollectionName({ aptosConfig: this.config, ...args });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
138
|
+
*
|
|
139
|
+
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
140
|
+
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* const collection = await aptos.getCollectionDataByCreatorAddressAnd({creatorAddress:"0x123"})
|
|
144
|
+
*
|
|
145
|
+
* @param args.creatorAddress the address of the collection's creator
|
|
146
|
+
* @param args.collectionName the name of the collection
|
|
147
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
148
|
+
* @param args.options.tokenStandard the token standard to query
|
|
149
|
+
* @returns GetCollectionDataResponse response type
|
|
150
|
+
*/
|
|
151
|
+
async getCollectionDataByCreatorAddress(args: {
|
|
152
|
+
creatorAddress: AccountAddressInput;
|
|
153
|
+
minimumLedgerVersion?: AnyNumber;
|
|
154
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
155
|
+
}): Promise<GetCollectionDataResponse> {
|
|
156
|
+
await waitForIndexerOnVersion({
|
|
157
|
+
config: this.config,
|
|
158
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
159
|
+
processorType: ProcessorType.TOKEN_V2_PROCESSOR,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
return getCollectionDataByCreatorAddress({ aptosConfig: this.config, ...args });
|
|
84
163
|
}
|
|
85
164
|
|
|
86
165
|
/**
|
|
@@ -96,6 +175,7 @@ export class DigitalAsset {
|
|
|
96
175
|
async getCollectionDataByCollectionId(args: {
|
|
97
176
|
collectionId: AccountAddressInput;
|
|
98
177
|
minimumLedgerVersion?: AnyNumber;
|
|
178
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
99
179
|
}): Promise<GetCollectionDataResponse> {
|
|
100
180
|
await waitForIndexerOnVersion({
|
|
101
181
|
config: this.config,
|
package/src/api/fungibleAsset.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { ProcessorType } from "../utils/const";
|
|
|
24
24
|
import { AptosConfig } from "./aptosConfig";
|
|
25
25
|
import { waitForIndexerOnVersion } from "./utils";
|
|
26
26
|
import { Account } from "../account";
|
|
27
|
-
import { AccountAddressInput } from "../core";
|
|
27
|
+
import { AccountAddress, AccountAddressInput } from "../core";
|
|
28
28
|
import { InputGenerateTransactionOptions } from "../transactions";
|
|
29
29
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
30
30
|
|
|
@@ -58,7 +58,7 @@ export class FungibleAsset {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Queries a fungible asset metadata
|
|
61
|
+
* Queries a fungible asset metadata by the asset type
|
|
62
62
|
*
|
|
63
63
|
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
64
64
|
*
|
|
@@ -94,6 +94,40 @@ export class FungibleAsset {
|
|
|
94
94
|
return data[0];
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Queries a fungible asset metadata by the creator address
|
|
99
|
+
*
|
|
100
|
+
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadataByCreatorAddress({creatorAddress:"0x123"})
|
|
104
|
+
*
|
|
105
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
106
|
+
* @param args.creatorAddress The creator address of the fungible asset.
|
|
107
|
+
*
|
|
108
|
+
* @returns A fungible asset metadata item
|
|
109
|
+
*/
|
|
110
|
+
async getFungibleAssetMetadataByCreatorAddress(args: {
|
|
111
|
+
creatorAddress: AccountAddressInput;
|
|
112
|
+
minimumLedgerVersion?: AnyNumber;
|
|
113
|
+
}): Promise<GetFungibleAssetMetadataResponse> {
|
|
114
|
+
await waitForIndexerOnVersion({
|
|
115
|
+
config: this.config,
|
|
116
|
+
minimumLedgerVersion: args?.minimumLedgerVersion,
|
|
117
|
+
processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,
|
|
118
|
+
});
|
|
119
|
+
const data = await getFungibleAssetMetadata({
|
|
120
|
+
aptosConfig: this.config,
|
|
121
|
+
options: {
|
|
122
|
+
where: {
|
|
123
|
+
creator_address: { _eq: AccountAddress.from(args.creatorAddress).toStringLong() },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
return data;
|
|
129
|
+
}
|
|
130
|
+
|
|
97
131
|
/**
|
|
98
132
|
* Queries all fungible asset activities
|
|
99
133
|
*
|
package/src/api/general.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
queryIndexer,
|
|
11
11
|
} from "../internal/general";
|
|
12
12
|
import { getBlockByHeight, getBlockByVersion } from "../internal/transaction";
|
|
13
|
-
import { view } from "../internal/view";
|
|
13
|
+
import { view, viewJson } from "../internal/view";
|
|
14
14
|
import {
|
|
15
15
|
AnyNumber,
|
|
16
16
|
Block,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
MoveValue,
|
|
23
23
|
} from "../types";
|
|
24
24
|
import { ProcessorType } from "../utils/const";
|
|
25
|
-
import { InputViewFunctionData } from "../transactions";
|
|
25
|
+
import { InputViewFunctionData, InputViewFunctionJsonData } from "../transactions";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* A class to query all `General` Aptos related queries
|
|
@@ -132,6 +132,29 @@ export class General {
|
|
|
132
132
|
return view<T>({ aptosConfig: this.config, ...args });
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Queries for a Move view function with JSON, this provides compatability with the old `aptos` package
|
|
137
|
+
* @param args.payload Payload for the view function
|
|
138
|
+
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* const data = await aptos.view({
|
|
142
|
+
* payload: {
|
|
143
|
+
* function: "0x1::coin::balance",
|
|
144
|
+
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
145
|
+
* functionArguments: [accountAddress.toString()],
|
|
146
|
+
* }
|
|
147
|
+
* })
|
|
148
|
+
*
|
|
149
|
+
* @returns an array of Move values
|
|
150
|
+
*/
|
|
151
|
+
async viewJson<T extends Array<MoveValue>>(args: {
|
|
152
|
+
payload: InputViewFunctionJsonData;
|
|
153
|
+
options?: LedgerVersionArg;
|
|
154
|
+
}): Promise<T> {
|
|
155
|
+
return viewJson<T>({ aptosConfig: this.config, ...args });
|
|
156
|
+
}
|
|
157
|
+
|
|
135
158
|
/**
|
|
136
159
|
* Queries top user transactions
|
|
137
160
|
*
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright © Aptos Foundation
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AnyNumber, GetObjectDataQueryResponse, OrderByArg, PaginationArgs } from "../types";
|
|
5
|
+
import { AccountAddressInput } from "../core";
|
|
6
|
+
import { AptosConfig } from "./aptosConfig";
|
|
7
|
+
import { ProcessorType } from "../utils";
|
|
8
|
+
import { waitForIndexerOnVersion } from "./utils";
|
|
9
|
+
import { getObjectDataByObjectAddress } from "../internal/object";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class to query all `Object` related queries on Aptos.
|
|
13
|
+
*/
|
|
14
|
+
export class AptosObject {
|
|
15
|
+
constructor(readonly config: AptosConfig) {}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Fetch the object data based on the oabject address
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const object = await aptos.getObjectDataByObjectAddress({objectAddress:"0x123"})
|
|
22
|
+
*
|
|
23
|
+
* @param args.objectAddress The object address
|
|
24
|
+
* @param args.options Configuration options for waitForTransaction
|
|
25
|
+
*
|
|
26
|
+
* @returns The object data
|
|
27
|
+
*/
|
|
28
|
+
async getObjectDataByObjectAddress(args: {
|
|
29
|
+
objectAddress: AccountAddressInput;
|
|
30
|
+
minimumLedgerVersion?: AnyNumber;
|
|
31
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
32
|
+
}): Promise<GetObjectDataQueryResponse[0]> {
|
|
33
|
+
await waitForIndexerOnVersion({
|
|
34
|
+
config: this.config,
|
|
35
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
36
|
+
processorType: ProcessorType.OBJECT_PROCESSOR,
|
|
37
|
+
});
|
|
38
|
+
return getObjectDataByObjectAddress({
|
|
39
|
+
aptosConfig: this.config,
|
|
40
|
+
...args,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -90,7 +90,10 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
90
90
|
static U8(values: Array<number> | HexInput): MoveVector<U8> {
|
|
91
91
|
let numbers: Array<number>;
|
|
92
92
|
|
|
93
|
-
if (Array.isArray(values) &&
|
|
93
|
+
if (Array.isArray(values) && values.length === 0) {
|
|
94
|
+
// Handle empty array, since it won't have a "first value"
|
|
95
|
+
numbers = [];
|
|
96
|
+
} else if (Array.isArray(values) && typeof values[0] === "number") {
|
|
94
97
|
numbers = values;
|
|
95
98
|
} else if (typeof values === "string") {
|
|
96
99
|
const hex = Hex.fromHexInput(values);
|
|
@@ -98,7 +101,7 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
98
101
|
} else if (values instanceof Uint8Array) {
|
|
99
102
|
numbers = Array.from(values);
|
|
100
103
|
} else {
|
|
101
|
-
throw new Error("Invalid input type");
|
|
104
|
+
throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
return new MoveVector<U8>(numbers.map((v) => new U8(v)));
|
package/src/cli/move.ts
CHANGED
|
@@ -39,7 +39,7 @@ export class Move {
|
|
|
39
39
|
namedAddresses: Record<string, AccountAddress>;
|
|
40
40
|
}): Promise<boolean> {
|
|
41
41
|
const { packageDirectoryPath, namedAddresses } = args;
|
|
42
|
-
const cliArgs = ["aptos", "move", "compile", "--package-dir", packageDirectoryPath
|
|
42
|
+
const cliArgs = ["aptos", "move", "compile", "--package-dir", packageDirectoryPath];
|
|
43
43
|
|
|
44
44
|
const addressesMap = this.parseNamedAddresses(namedAddresses);
|
|
45
45
|
|
|
@@ -62,7 +62,7 @@ export class Move {
|
|
|
62
62
|
*/
|
|
63
63
|
async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<boolean> {
|
|
64
64
|
const { packageDirectoryPath, namedAddresses } = args;
|
|
65
|
-
const cliArgs = ["aptos", "move", "test", "--package-dir", packageDirectoryPath
|
|
65
|
+
const cliArgs = ["aptos", "move", "test", "--package-dir", packageDirectoryPath];
|
|
66
66
|
|
|
67
67
|
const addressesMap = this.parseNamedAddresses(namedAddresses);
|
|
68
68
|
|
|
@@ -96,7 +96,6 @@ export class Move {
|
|
|
96
96
|
"publish",
|
|
97
97
|
"--package-dir",
|
|
98
98
|
packageDirectoryPath,
|
|
99
|
-
"--skip-fetch-latest-git-deps",
|
|
100
99
|
`--profile=${profile ?? "default"}`,
|
|
101
100
|
];
|
|
102
101
|
|
package/src/internal/account.ts
CHANGED
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
AccountData,
|
|
19
19
|
GetAccountCoinsDataResponse,
|
|
20
20
|
GetAccountCollectionsWithOwnedTokenResponse,
|
|
21
|
-
GetAccountOwnedObjectsResponse,
|
|
22
21
|
GetAccountOwnedTokensFromCollectionResponse,
|
|
23
22
|
GetAccountOwnedTokensQueryResponse,
|
|
23
|
+
GetObjectDataQueryResponse,
|
|
24
24
|
LedgerVersionArg,
|
|
25
25
|
MoveModuleBytecode,
|
|
26
26
|
MoveResource,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
GetAccountCoinsCountQuery,
|
|
36
36
|
GetAccountCoinsDataQuery,
|
|
37
37
|
GetAccountCollectionsWithOwnedTokensQuery,
|
|
38
|
-
|
|
38
|
+
GetObjectDataQuery,
|
|
39
39
|
GetAccountOwnedTokensFromCollectionQuery,
|
|
40
40
|
GetAccountOwnedTokensQuery,
|
|
41
41
|
GetAccountTokensCountQuery,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
GetAccountCoinsCount,
|
|
46
46
|
GetAccountCoinsData,
|
|
47
47
|
GetAccountCollectionsWithOwnedTokens,
|
|
48
|
-
|
|
48
|
+
GetObjectData,
|
|
49
49
|
GetAccountOwnedTokens,
|
|
50
50
|
GetAccountOwnedTokensFromCollection,
|
|
51
51
|
GetAccountTokensCount,
|
|
@@ -347,11 +347,9 @@ export async function getAccountCollectionsWithOwnedTokens(args: {
|
|
|
347
347
|
|
|
348
348
|
const whereCondition: {
|
|
349
349
|
owner_address: { _eq: string };
|
|
350
|
-
amount: { _gt: number };
|
|
351
350
|
current_collection?: { token_standard: { _eq: string } };
|
|
352
351
|
} = {
|
|
353
352
|
owner_address: { _eq: address },
|
|
354
|
-
amount: { _gt: 0 },
|
|
355
353
|
};
|
|
356
354
|
|
|
357
355
|
if (options?.tokenStandard) {
|
|
@@ -484,8 +482,8 @@ export async function getAccountCoinsCount(args: {
|
|
|
484
482
|
export async function getAccountOwnedObjects(args: {
|
|
485
483
|
aptosConfig: AptosConfig;
|
|
486
484
|
accountAddress: AccountAddressInput;
|
|
487
|
-
options?: PaginationArgs & OrderByArg<
|
|
488
|
-
}): Promise<
|
|
485
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
486
|
+
}): Promise<GetObjectDataQueryResponse> {
|
|
489
487
|
const { aptosConfig, accountAddress, options } = args;
|
|
490
488
|
const address = AccountAddress.from(accountAddress).toStringLong();
|
|
491
489
|
|
|
@@ -493,7 +491,7 @@ export async function getAccountOwnedObjects(args: {
|
|
|
493
491
|
owner_address: { _eq: address },
|
|
494
492
|
};
|
|
495
493
|
const graphqlQuery = {
|
|
496
|
-
query:
|
|
494
|
+
query: GetObjectData,
|
|
497
495
|
variables: {
|
|
498
496
|
where_condition: whereCondition,
|
|
499
497
|
offset: options?.offset,
|
|
@@ -501,7 +499,7 @@ export async function getAccountOwnedObjects(args: {
|
|
|
501
499
|
order_by: options?.orderBy,
|
|
502
500
|
},
|
|
503
501
|
};
|
|
504
|
-
const data = await queryIndexer<
|
|
502
|
+
const data = await queryIndexer<GetObjectDataQuery>({
|
|
505
503
|
aptosConfig,
|
|
506
504
|
query: graphqlQuery,
|
|
507
505
|
originMethod: "getAccountOwnedObjects",
|