@aptos-labs/ts-sdk 1.19.0 → 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/index.d.ts +117 -7
- 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.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/{chunk-N5A4L6Z6.mjs → chunk-32BE76A3.mjs} +2 -2
- package/dist/esm/{chunk-3EDNV7KS.mjs → chunk-3CEN6LXR.mjs} +2 -2
- package/dist/esm/{chunk-4ZM7V7HN.mjs → chunk-3DCHEXE3.mjs} +2 -2
- package/dist/esm/{chunk-E2JEBCSY.mjs → chunk-463B3NF7.mjs} +2 -2
- package/dist/esm/{chunk-MUAV4P6C.mjs → chunk-4ARX2MGY.mjs} +2 -2
- package/dist/esm/{chunk-BCY5UOGP.mjs → chunk-4KAXCXAK.mjs} +2 -2
- package/dist/esm/chunk-4KYQ7N3N.mjs +2 -0
- package/dist/esm/{chunk-EAXCOIOP.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-HED6CPN2.mjs → chunk-5ZBDXUER.mjs} +2 -2
- package/dist/esm/{chunk-MH6HIFMG.mjs → chunk-67BD7B6N.mjs} +2 -2
- package/dist/esm/chunk-6QTWWNRH.mjs +2 -0
- package/dist/esm/chunk-6QTWWNRH.mjs.map +1 -0
- package/dist/esm/{chunk-VRSZLJVR.mjs → chunk-7CMCN6LB.mjs} +2 -2
- package/dist/esm/{chunk-LLLINNAG.mjs → chunk-7DDRPSWU.mjs} +2 -2
- package/dist/esm/chunk-7DDRPSWU.mjs.map +1 -0
- package/dist/esm/{chunk-IOMJ5OWV.mjs → chunk-7HS4UJGE.mjs} +2 -2
- package/dist/esm/{chunk-4EPLOSKY.mjs → chunk-7WFKAS7T.mjs} +2 -2
- package/dist/esm/{chunk-YXXEXFQH.mjs → chunk-7X6HZUXX.mjs} +2 -2
- package/dist/esm/{chunk-KUAN2WZF.mjs → chunk-ARMY5A3J.mjs} +2 -2
- package/dist/esm/{chunk-ILXK4OH5.mjs → chunk-BLAIJHMU.mjs} +2 -2
- package/dist/esm/{chunk-RUVDYKIZ.mjs → chunk-CCUUYI4Z.mjs} +2 -2
- package/dist/esm/{chunk-HJT2Q5NL.mjs → chunk-COJZFWV3.mjs} +2 -2
- package/dist/esm/{chunk-A2Z7I2EY.mjs → chunk-F6REP536.mjs} +2 -2
- package/dist/esm/{chunk-CAC7G2HC.mjs → chunk-GQ6Q7KK5.mjs} +2 -2
- package/dist/esm/{chunk-JM7CSDJ3.mjs → chunk-H6CS3BD7.mjs} +2 -2
- package/dist/esm/{chunk-OKLLJQM4.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-7JUBWA7V.mjs → chunk-I2T6BJOA.mjs} +2 -2
- package/dist/esm/{chunk-ICE6OL3A.mjs → chunk-J5KAD2RM.mjs} +2 -2
- package/dist/esm/{chunk-3KZ7HFFA.mjs → chunk-J5YHMYHB.mjs} +2 -2
- 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-GPZEPKKD.mjs → chunk-L6RINMT6.mjs} +2 -2
- package/dist/esm/{chunk-47M33ENP.mjs → chunk-LBKYNX5K.mjs} +2 -2
- package/dist/esm/{chunk-LWFSV3OA.mjs → chunk-LBU3LV7I.mjs} +2 -2
- package/dist/esm/{chunk-4U3MAEYH.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-YF6UA3XW.mjs → chunk-MTPARVMT.mjs} +2 -2
- package/dist/esm/{chunk-QTNKFKDE.mjs → chunk-NJYVAMTG.mjs} +2 -2
- package/dist/esm/{chunk-Y37TV7SM.mjs → chunk-NWAGENBX.mjs} +2 -2
- package/dist/esm/{chunk-TFNJPJF6.mjs → chunk-NZFKPV67.mjs} +2 -2
- package/dist/esm/{chunk-XSHUCBNT.mjs → chunk-O7XEE7QT.mjs} +2 -2
- package/dist/esm/{chunk-GXLFQEPR.mjs → chunk-PTK4OJ2U.mjs} +2 -2
- package/dist/esm/chunk-PY23BQ2H.mjs +2 -0
- package/dist/esm/chunk-PY23BQ2H.mjs.map +1 -0
- package/dist/esm/{chunk-ZQUDGZIZ.mjs → chunk-PZAA2YYO.mjs} +2 -2
- package/dist/esm/{chunk-FGFQZQGX.mjs → chunk-Q7ZP25NJ.mjs} +2 -2
- package/dist/esm/{chunk-OLVNRYGT.mjs → chunk-RA56CRJB.mjs} +2 -2
- package/dist/esm/{chunk-FD2VCIZG.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-V5JJHVMP.mjs → chunk-SQQ2424E.mjs} +2 -2
- package/dist/esm/{chunk-64P5SB7N.mjs → chunk-T4NXIMZL.mjs} +2 -2
- package/dist/esm/{chunk-PS7L2TLP.mjs → chunk-T7YRD4PM.mjs} +2 -2
- package/dist/esm/{chunk-BI5P5ASH.mjs → chunk-TPMVNFS5.mjs} +2 -2
- package/dist/esm/{chunk-VY2MJZWM.mjs → chunk-TZOKV22Z.mjs} +2 -2
- package/dist/esm/{chunk-K6NUFABY.mjs → chunk-UJYWEIQ2.mjs} +2 -2
- package/dist/esm/{chunk-HACVLK5I.mjs → chunk-UYF7AQLE.mjs} +2 -2
- package/dist/esm/{chunk-3JEL6FIZ.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-WUWJLSGN.mjs → chunk-VQPLSJEI.mjs} +2 -2
- package/dist/esm/{chunk-LAZTLEXF.mjs → chunk-WHQNLKFO.mjs} +2 -2
- 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-GMHGYDZQ.mjs → chunk-Y2H7FG2P.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/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 +3 -2
- 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 +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/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/general.ts +25 -2
- package/src/api/object.ts +43 -0
- 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/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-5Y3O7MLN.mjs +0 -2
- package/dist/esm/chunk-5Y3O7MLN.mjs.map +0 -1
- package/dist/esm/chunk-DCBXXRXS.mjs +0 -2
- package/dist/esm/chunk-DCBXXRXS.mjs.map +0 -1
- package/dist/esm/chunk-EAXCOIOP.mjs +0 -2
- package/dist/esm/chunk-FTA2ZMUX.mjs +0 -2
- package/dist/esm/chunk-FTA2ZMUX.mjs.map +0 -1
- package/dist/esm/chunk-GRZVD45M.mjs +0 -2
- package/dist/esm/chunk-GRZVD45M.mjs.map +0 -1
- package/dist/esm/chunk-HIHKTLLM.mjs.map +0 -1
- package/dist/esm/chunk-LLLINNAG.mjs.map +0 -1
- package/dist/esm/chunk-MKOIEX4B.mjs +0 -2
- package/dist/esm/chunk-MKOIEX4B.mjs.map +0 -1
- package/dist/esm/chunk-NBGXHLM4.mjs +0 -2
- package/dist/esm/chunk-NBGXHLM4.mjs.map +0 -1
- package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
- /package/dist/esm/{chunk-N5A4L6Z6.mjs.map → chunk-32BE76A3.mjs.map} +0 -0
- /package/dist/esm/{chunk-3EDNV7KS.mjs.map → chunk-3CEN6LXR.mjs.map} +0 -0
- /package/dist/esm/{chunk-4ZM7V7HN.mjs.map → chunk-3DCHEXE3.mjs.map} +0 -0
- /package/dist/esm/{chunk-E2JEBCSY.mjs.map → chunk-463B3NF7.mjs.map} +0 -0
- /package/dist/esm/{chunk-MUAV4P6C.mjs.map → chunk-4ARX2MGY.mjs.map} +0 -0
- /package/dist/esm/{chunk-BCY5UOGP.mjs.map → chunk-4KAXCXAK.mjs.map} +0 -0
- /package/dist/esm/{chunk-HED6CPN2.mjs.map → chunk-5ZBDXUER.mjs.map} +0 -0
- /package/dist/esm/{chunk-MH6HIFMG.mjs.map → chunk-67BD7B6N.mjs.map} +0 -0
- /package/dist/esm/{chunk-VRSZLJVR.mjs.map → chunk-7CMCN6LB.mjs.map} +0 -0
- /package/dist/esm/{chunk-IOMJ5OWV.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-YXXEXFQH.mjs.map → chunk-7X6HZUXX.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUAN2WZF.mjs.map → chunk-ARMY5A3J.mjs.map} +0 -0
- /package/dist/esm/{chunk-ILXK4OH5.mjs.map → chunk-BLAIJHMU.mjs.map} +0 -0
- /package/dist/esm/{chunk-RUVDYKIZ.mjs.map → chunk-CCUUYI4Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-HJT2Q5NL.mjs.map → chunk-COJZFWV3.mjs.map} +0 -0
- /package/dist/esm/{chunk-A2Z7I2EY.mjs.map → chunk-F6REP536.mjs.map} +0 -0
- /package/dist/esm/{chunk-CAC7G2HC.mjs.map → chunk-GQ6Q7KK5.mjs.map} +0 -0
- /package/dist/esm/{chunk-JM7CSDJ3.mjs.map → chunk-H6CS3BD7.mjs.map} +0 -0
- /package/dist/esm/{chunk-OKLLJQM4.mjs.map → chunk-H6QWMF3Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-7JUBWA7V.mjs.map → chunk-I2T6BJOA.mjs.map} +0 -0
- /package/dist/esm/{chunk-ICE6OL3A.mjs.map → chunk-J5KAD2RM.mjs.map} +0 -0
- /package/dist/esm/{chunk-3KZ7HFFA.mjs.map → chunk-J5YHMYHB.mjs.map} +0 -0
- /package/dist/esm/{chunk-GPZEPKKD.mjs.map → chunk-L6RINMT6.mjs.map} +0 -0
- /package/dist/esm/{chunk-47M33ENP.mjs.map → chunk-LBKYNX5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-LWFSV3OA.mjs.map → chunk-LBU3LV7I.mjs.map} +0 -0
- /package/dist/esm/{chunk-4U3MAEYH.mjs.map → chunk-M2J7QC7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-YF6UA3XW.mjs.map → chunk-MTPARVMT.mjs.map} +0 -0
- /package/dist/esm/{chunk-QTNKFKDE.mjs.map → chunk-NJYVAMTG.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y37TV7SM.mjs.map → chunk-NWAGENBX.mjs.map} +0 -0
- /package/dist/esm/{chunk-TFNJPJF6.mjs.map → chunk-NZFKPV67.mjs.map} +0 -0
- /package/dist/esm/{chunk-XSHUCBNT.mjs.map → chunk-O7XEE7QT.mjs.map} +0 -0
- /package/dist/esm/{chunk-GXLFQEPR.mjs.map → chunk-PTK4OJ2U.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZQUDGZIZ.mjs.map → chunk-PZAA2YYO.mjs.map} +0 -0
- /package/dist/esm/{chunk-FGFQZQGX.mjs.map → chunk-Q7ZP25NJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-OLVNRYGT.mjs.map → chunk-RA56CRJB.mjs.map} +0 -0
- /package/dist/esm/{chunk-FD2VCIZG.mjs.map → chunk-RM2IVUJ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-V5JJHVMP.mjs.map → chunk-SQQ2424E.mjs.map} +0 -0
- /package/dist/esm/{chunk-64P5SB7N.mjs.map → chunk-T4NXIMZL.mjs.map} +0 -0
- /package/dist/esm/{chunk-PS7L2TLP.mjs.map → chunk-T7YRD4PM.mjs.map} +0 -0
- /package/dist/esm/{chunk-BI5P5ASH.mjs.map → chunk-TPMVNFS5.mjs.map} +0 -0
- /package/dist/esm/{chunk-VY2MJZWM.mjs.map → chunk-TZOKV22Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-K6NUFABY.mjs.map → chunk-UJYWEIQ2.mjs.map} +0 -0
- /package/dist/esm/{chunk-HACVLK5I.mjs.map → chunk-UYF7AQLE.mjs.map} +0 -0
- /package/dist/esm/{chunk-3JEL6FIZ.mjs.map → chunk-V2LIP26A.mjs.map} +0 -0
- /package/dist/esm/{chunk-WUWJLSGN.mjs.map → chunk-VQPLSJEI.mjs.map} +0 -0
- /package/dist/esm/{chunk-LAZTLEXF.mjs.map → chunk-WHQNLKFO.mjs.map} +0 -0
- /package/dist/esm/{chunk-6ZQWPHLV.mjs.map → chunk-XWVMFCW3.mjs.map} +0 -0
- /package/dist/esm/{chunk-GMHGYDZQ.mjs.map → chunk-Y2H7FG2P.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"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-
|
|
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-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.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/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
|
+
}
|
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",
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
OrderByArg,
|
|
26
26
|
PaginationArgs,
|
|
27
27
|
TokenStandardArg,
|
|
28
|
+
WhereArg,
|
|
28
29
|
} from "../types";
|
|
29
30
|
import {
|
|
30
31
|
GetCollectionDataQuery,
|
|
@@ -41,7 +42,11 @@ import {
|
|
|
41
42
|
import { queryIndexer } from "./general";
|
|
42
43
|
import { generateTransaction } from "./transactionSubmission";
|
|
43
44
|
import { MAX_U64_BIG_INT } from "../bcs/consts";
|
|
44
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
CurrentCollectionsV2BoolExp,
|
|
47
|
+
CurrentTokenOwnershipsV2BoolExp,
|
|
48
|
+
TokenActivitiesV2BoolExp,
|
|
49
|
+
} from "../types/generated/types";
|
|
45
50
|
import {
|
|
46
51
|
checkOrConvertArgument,
|
|
47
52
|
objectStructTag,
|
|
@@ -274,17 +279,11 @@ export async function createCollectionTransaction(
|
|
|
274
279
|
|
|
275
280
|
export async function getCollectionData(args: {
|
|
276
281
|
aptosConfig: AptosConfig;
|
|
277
|
-
|
|
278
|
-
collectionName: string;
|
|
279
|
-
options?: TokenStandardArg;
|
|
282
|
+
options?: TokenStandardArg & PaginationArgs & WhereArg<CurrentCollectionsV2BoolExp>;
|
|
280
283
|
}): Promise<GetCollectionDataResponse> {
|
|
281
|
-
const { aptosConfig,
|
|
282
|
-
const address = AccountAddress.from(creatorAddress);
|
|
284
|
+
const { aptosConfig, options } = args;
|
|
283
285
|
|
|
284
|
-
const whereCondition: any =
|
|
285
|
-
collection_name: { _eq: collectionName },
|
|
286
|
-
creator_address: { _eq: address.toStringLong() },
|
|
287
|
-
};
|
|
286
|
+
const whereCondition: any = options?.where;
|
|
288
287
|
|
|
289
288
|
if (options?.tokenStandard) {
|
|
290
289
|
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
@@ -294,6 +293,8 @@ export async function getCollectionData(args: {
|
|
|
294
293
|
query: GetCollectionData,
|
|
295
294
|
variables: {
|
|
296
295
|
where_condition: whereCondition,
|
|
296
|
+
offset: options?.offset,
|
|
297
|
+
limit: options?.limit,
|
|
297
298
|
},
|
|
298
299
|
};
|
|
299
300
|
const data = await queryIndexer<GetCollectionDataQuery>({
|
|
@@ -305,30 +306,61 @@ export async function getCollectionData(args: {
|
|
|
305
306
|
return data.current_collections_v2[0];
|
|
306
307
|
}
|
|
307
308
|
|
|
309
|
+
export async function getCollectionDataByCreatorAddressAndCollectionName(args: {
|
|
310
|
+
aptosConfig: AptosConfig;
|
|
311
|
+
creatorAddress: AccountAddressInput;
|
|
312
|
+
collectionName: string;
|
|
313
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
314
|
+
}): Promise<GetCollectionDataResponse> {
|
|
315
|
+
const { aptosConfig, creatorAddress, collectionName, options } = args;
|
|
316
|
+
const address = AccountAddress.from(creatorAddress);
|
|
317
|
+
|
|
318
|
+
const whereCondition: any = {
|
|
319
|
+
collection_name: { _eq: collectionName },
|
|
320
|
+
creator_address: { _eq: address.toStringLong() },
|
|
321
|
+
};
|
|
322
|
+
if (options?.tokenStandard) {
|
|
323
|
+
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export async function getCollectionDataByCreatorAddress(args: {
|
|
330
|
+
aptosConfig: AptosConfig;
|
|
331
|
+
creatorAddress: AccountAddressInput;
|
|
332
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
333
|
+
}): Promise<GetCollectionDataResponse> {
|
|
334
|
+
const { aptosConfig, creatorAddress, options } = args;
|
|
335
|
+
const address = AccountAddress.from(creatorAddress);
|
|
336
|
+
|
|
337
|
+
const whereCondition: any = {
|
|
338
|
+
creator_address: { _eq: address.toStringLong() },
|
|
339
|
+
};
|
|
340
|
+
if (options?.tokenStandard) {
|
|
341
|
+
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
345
|
+
}
|
|
346
|
+
|
|
308
347
|
export async function getCollectionDataByCollectionId(args: {
|
|
309
348
|
aptosConfig: AptosConfig;
|
|
310
349
|
collectionId: AccountAddressInput;
|
|
350
|
+
options?: TokenStandardArg & PaginationArgs;
|
|
311
351
|
}): Promise<GetCollectionDataResponse> {
|
|
312
|
-
const { aptosConfig, collectionId } = args;
|
|
352
|
+
const { aptosConfig, collectionId, options } = args;
|
|
313
353
|
const address = AccountAddress.from(collectionId);
|
|
314
354
|
|
|
315
355
|
const whereCondition: any = {
|
|
316
356
|
collection_id: { _eq: address.toStringLong() },
|
|
317
357
|
};
|
|
318
358
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
where_condition: whereCondition,
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
const data = await queryIndexer<GetCollectionDataQuery>({
|
|
326
|
-
aptosConfig,
|
|
327
|
-
query: graphqlQuery,
|
|
328
|
-
originMethod: "getCollectionData",
|
|
329
|
-
});
|
|
359
|
+
if (options?.tokenStandard) {
|
|
360
|
+
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
361
|
+
}
|
|
330
362
|
|
|
331
|
-
return
|
|
363
|
+
return getCollectionData({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
332
364
|
}
|
|
333
365
|
|
|
334
366
|
export async function getCollectionId(args: {
|
|
@@ -337,7 +369,18 @@ export async function getCollectionId(args: {
|
|
|
337
369
|
collectionName: string;
|
|
338
370
|
options?: TokenStandardArg;
|
|
339
371
|
}): Promise<string> {
|
|
340
|
-
|
|
372
|
+
const { creatorAddress, collectionName, options, aptosConfig } = args;
|
|
373
|
+
const address = AccountAddress.from(creatorAddress);
|
|
374
|
+
|
|
375
|
+
const whereCondition: any = {
|
|
376
|
+
collection_name: { _eq: collectionName },
|
|
377
|
+
creator_address: { _eq: address.toStringLong() },
|
|
378
|
+
};
|
|
379
|
+
if (options?.tokenStandard) {
|
|
380
|
+
whereCondition.token_standard = { _eq: options?.tokenStandard ?? "v2" };
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return (await getCollectionData({ aptosConfig, options: { where: whereCondition } })).collection_id;
|
|
341
384
|
}
|
|
342
385
|
|
|
343
386
|
// TRANSACTIONS
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AptosConfig } from "../api/aptosConfig";
|
|
2
|
+
import { AccountAddressInput, AccountAddress } from "../core";
|
|
3
|
+
import { PaginationArgs, OrderByArg, GetObjectDataQueryResponse, WhereArg } from "../types";
|
|
4
|
+
import { GetObjectDataQuery } from "../types/generated/operations";
|
|
5
|
+
import { GetObjectData } from "../types/generated/queries";
|
|
6
|
+
import { CurrentObjectsBoolExp } from "../types/generated/types";
|
|
7
|
+
import { queryIndexer } from "./general";
|
|
8
|
+
|
|
9
|
+
export async function getObjectData(args: {
|
|
10
|
+
aptosConfig: AptosConfig;
|
|
11
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]> & WhereArg<CurrentObjectsBoolExp>;
|
|
12
|
+
}): Promise<GetObjectDataQueryResponse> {
|
|
13
|
+
const { aptosConfig, options } = args;
|
|
14
|
+
|
|
15
|
+
const graphqlQuery = {
|
|
16
|
+
query: GetObjectData,
|
|
17
|
+
variables: {
|
|
18
|
+
where_condition: options?.where,
|
|
19
|
+
offset: options?.offset,
|
|
20
|
+
limit: options?.limit,
|
|
21
|
+
order_by: options?.orderBy,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
const data = await queryIndexer<GetObjectDataQuery>({
|
|
25
|
+
aptosConfig,
|
|
26
|
+
query: graphqlQuery,
|
|
27
|
+
originMethod: "getObjectData",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return data.current_objects;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function getObjectDataByObjectAddress(args: {
|
|
34
|
+
aptosConfig: AptosConfig;
|
|
35
|
+
objectAddress: AccountAddressInput;
|
|
36
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
37
|
+
}): Promise<GetObjectDataQueryResponse[0]> {
|
|
38
|
+
const { aptosConfig, objectAddress, options } = args;
|
|
39
|
+
const address = AccountAddress.from(objectAddress).toStringLong();
|
|
40
|
+
|
|
41
|
+
const whereCondition: { object_address: { _eq: string } } = {
|
|
42
|
+
object_address: { _eq: address },
|
|
43
|
+
};
|
|
44
|
+
return (await getObjectData({ aptosConfig, options: { ...options, where: whereCondition } }))[0];
|
|
45
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
query getCollectionData(
|
|
2
|
-
$where_condition: current_collections_v2_bool_exp!
|
|
3
|
-
) {
|
|
1
|
+
query getCollectionData($where_condition: current_collections_v2_bool_exp!) {
|
|
4
2
|
current_collections_v2(where: $where_condition) {
|
|
3
|
+
uri
|
|
4
|
+
total_minted_v2
|
|
5
|
+
token_standard
|
|
6
|
+
table_handle_v1
|
|
7
|
+
mutable_uri
|
|
8
|
+
mutable_description
|
|
9
|
+
max_supply
|
|
5
10
|
collection_id
|
|
6
11
|
collection_name
|
|
7
12
|
creator_address
|
|
@@ -9,12 +14,16 @@ query getCollectionData(
|
|
|
9
14
|
description
|
|
10
15
|
last_transaction_timestamp
|
|
11
16
|
last_transaction_version
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
cdn_asset_uris {
|
|
18
|
+
cdn_image_uri
|
|
19
|
+
asset_uri
|
|
20
|
+
animation_optimizer_retry_count
|
|
21
|
+
cdn_animation_uri
|
|
22
|
+
cdn_json_uri
|
|
23
|
+
image_optimizer_retry_count
|
|
24
|
+
json_parser_retry_count
|
|
25
|
+
raw_animation_uri
|
|
26
|
+
raw_image_uri
|
|
27
|
+
}
|
|
19
28
|
}
|
|
20
29
|
}
|