@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
|
@@ -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
|
}
|
package/src/internal/view.ts
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
import { LedgerVersionArg, MimeType, MoveValue } from "../types";
|
|
5
5
|
import { AptosConfig } from "../api/aptosConfig";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
generateViewFunctionPayload,
|
|
8
|
+
InputViewFunctionData,
|
|
9
|
+
InputViewFunctionJsonData,
|
|
10
|
+
ViewFunctionJsonPayload,
|
|
11
|
+
} from "../transactions";
|
|
7
12
|
import { Serializer } from "../bcs";
|
|
8
13
|
import { postAptosFullNode } from "../client";
|
|
9
14
|
|
|
@@ -33,3 +38,24 @@ export async function view<T extends Array<MoveValue> = Array<MoveValue>>(args:
|
|
|
33
38
|
|
|
34
39
|
return data as T;
|
|
35
40
|
}
|
|
41
|
+
|
|
42
|
+
export async function viewJson<T extends Array<MoveValue> = Array<MoveValue>>(args: {
|
|
43
|
+
aptosConfig: AptosConfig;
|
|
44
|
+
payload: InputViewFunctionJsonData;
|
|
45
|
+
options?: LedgerVersionArg;
|
|
46
|
+
}): Promise<T> {
|
|
47
|
+
const { aptosConfig, payload, options } = args;
|
|
48
|
+
const { data } = await postAptosFullNode<ViewFunctionJsonPayload, MoveValue[]>({
|
|
49
|
+
aptosConfig,
|
|
50
|
+
originMethod: "viewJson",
|
|
51
|
+
path: "view",
|
|
52
|
+
params: { ledger_version: options?.ledgerVersion },
|
|
53
|
+
body: {
|
|
54
|
+
function: payload.function,
|
|
55
|
+
type_arguments: payload.typeArguments ?? [],
|
|
56
|
+
arguments: payload.functionArguments ?? [],
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return data as T;
|
|
61
|
+
}
|
|
@@ -24,11 +24,22 @@ export function isNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number {
|
|
|
24
24
|
return typeof arg === "number";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export function convertNumber(arg: SimpleEntryFunctionArgumentTypes): number | undefined {
|
|
28
|
+
if (isNumber(arg)) {
|
|
29
|
+
return arg;
|
|
30
|
+
}
|
|
31
|
+
if (isString(arg) && arg !== "") {
|
|
32
|
+
return Number.parseInt(arg, 10);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
27
38
|
export function isLargeNumber(arg: SimpleEntryFunctionArgumentTypes): arg is number | bigint | string {
|
|
28
39
|
return typeof arg === "number" || typeof arg === "bigint" || typeof arg === "string";
|
|
29
40
|
}
|
|
30
41
|
|
|
31
|
-
export function
|
|
42
|
+
export function isEmptyOption(arg: SimpleEntryFunctionArgumentTypes): arg is null | undefined {
|
|
32
43
|
return arg === null || arg === undefined;
|
|
33
44
|
}
|
|
34
45
|
|
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { parseTypeTag } from "../typeTag/parser";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
TypeTag,
|
|
7
|
+
TypeTagAddress,
|
|
8
|
+
TypeTagBool,
|
|
9
|
+
TypeTagStruct,
|
|
10
|
+
TypeTagU128,
|
|
11
|
+
TypeTagU16,
|
|
12
|
+
TypeTagU256,
|
|
13
|
+
TypeTagU32,
|
|
14
|
+
TypeTagU64,
|
|
15
|
+
TypeTagU8,
|
|
16
|
+
} from "../typeTag";
|
|
6
17
|
import { AptosConfig } from "../../api/aptosConfig";
|
|
7
18
|
import {
|
|
8
19
|
EntryFunctionArgumentTypes,
|
|
@@ -29,10 +40,10 @@ import {
|
|
|
29
40
|
isBool,
|
|
30
41
|
isEncodedEntryFunctionArgument,
|
|
31
42
|
isLargeNumber,
|
|
32
|
-
|
|
33
|
-
isNumber,
|
|
43
|
+
isEmptyOption,
|
|
34
44
|
isString,
|
|
35
45
|
throwTypeMismatch,
|
|
46
|
+
convertNumber,
|
|
36
47
|
} from "./helpers";
|
|
37
48
|
import { MoveFunction } from "../../types";
|
|
38
49
|
|
|
@@ -167,6 +178,7 @@ export async function fetchViewFunctionAbi(
|
|
|
167
178
|
* @param functionAbi
|
|
168
179
|
* @param arg
|
|
169
180
|
* @param position
|
|
181
|
+
* @param genericTypeParams
|
|
170
182
|
*/
|
|
171
183
|
export function convertArgument(
|
|
172
184
|
functionName: string,
|
|
@@ -232,31 +244,25 @@ function parseArg(
|
|
|
232
244
|
throwTypeMismatch("string | AccountAddress", position);
|
|
233
245
|
}
|
|
234
246
|
if (param.isU8()) {
|
|
235
|
-
|
|
236
|
-
|
|
247
|
+
const num = convertNumber(arg);
|
|
248
|
+
if (num !== undefined) {
|
|
249
|
+
return new U8(num);
|
|
237
250
|
}
|
|
238
|
-
|
|
239
|
-
return new U8(Number.parseInt(arg, 10));
|
|
240
|
-
}
|
|
241
|
-
throwTypeMismatch("number", position);
|
|
251
|
+
throwTypeMismatch("number | string", position);
|
|
242
252
|
}
|
|
243
253
|
if (param.isU16()) {
|
|
244
|
-
|
|
245
|
-
|
|
254
|
+
const num = convertNumber(arg);
|
|
255
|
+
if (num !== undefined) {
|
|
256
|
+
return new U16(num);
|
|
246
257
|
}
|
|
247
|
-
|
|
248
|
-
return new U16(Number.parseInt(arg, 10));
|
|
249
|
-
}
|
|
250
|
-
throwTypeMismatch("number", position);
|
|
258
|
+
throwTypeMismatch("number | string", position);
|
|
251
259
|
}
|
|
252
260
|
if (param.isU32()) {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
if (isString(arg)) {
|
|
257
|
-
return new U32(Number.parseInt(arg, 10));
|
|
261
|
+
const num = convertNumber(arg);
|
|
262
|
+
if (num !== undefined) {
|
|
263
|
+
return new U32(num);
|
|
258
264
|
}
|
|
259
|
-
throwTypeMismatch("number", position);
|
|
265
|
+
throwTypeMismatch("number | string", position);
|
|
260
266
|
}
|
|
261
267
|
if (param.isU64()) {
|
|
262
268
|
if (isLargeNumber(arg)) {
|
|
@@ -330,10 +336,38 @@ function parseArg(
|
|
|
330
336
|
}
|
|
331
337
|
|
|
332
338
|
if (param.isOption()) {
|
|
333
|
-
|
|
334
|
-
|
|
339
|
+
if (isEmptyOption(arg)) {
|
|
340
|
+
// Here we attempt to reconstruct the underlying type
|
|
341
|
+
// Note, for some reason the `isBool` etc. does not work with the compiler
|
|
342
|
+
const innerParam = param.value.typeArgs[0];
|
|
343
|
+
if (innerParam instanceof TypeTagBool) {
|
|
344
|
+
return new MoveOption<Bool>(null);
|
|
345
|
+
}
|
|
346
|
+
if (innerParam instanceof TypeTagAddress) {
|
|
347
|
+
return new MoveOption<AccountAddress>(null);
|
|
348
|
+
}
|
|
349
|
+
if (innerParam instanceof TypeTagU8) {
|
|
350
|
+
return new MoveOption<U8>(null);
|
|
351
|
+
}
|
|
352
|
+
if (innerParam instanceof TypeTagU16) {
|
|
353
|
+
return new MoveOption<U16>(null);
|
|
354
|
+
}
|
|
355
|
+
if (innerParam instanceof TypeTagU32) {
|
|
356
|
+
return new MoveOption<U32>(null);
|
|
357
|
+
}
|
|
358
|
+
if (innerParam instanceof TypeTagU64) {
|
|
359
|
+
return new MoveOption<U64>(null);
|
|
360
|
+
}
|
|
361
|
+
if (innerParam instanceof TypeTagU128) {
|
|
362
|
+
return new MoveOption<U128>(null);
|
|
363
|
+
}
|
|
364
|
+
if (innerParam instanceof TypeTagU256) {
|
|
365
|
+
return new MoveOption<U256>(null);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// In all other cases, we will use a placeholder, it doesn't actually matter what the type is, but it will be obvious
|
|
335
369
|
// Note: This is a placeholder U8 type, and does not match the actual type, as that can't be dynamically grabbed
|
|
336
|
-
return new MoveOption<
|
|
370
|
+
return new MoveOption<MoveString>(null);
|
|
337
371
|
}
|
|
338
372
|
|
|
339
373
|
return new MoveOption(checkOrConvertArgument(arg, param.value.typeArgs[0], position, genericTypeParams));
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TransactionPayloadMultiSig,
|
|
16
16
|
TransactionPayloadScript,
|
|
17
17
|
} from "./instances";
|
|
18
|
-
import { AnyNumber, HexInput, MoveFunctionGenericTypeParam, MoveFunctionId } from "../types";
|
|
18
|
+
import { AnyNumber, HexInput, MoveFunctionGenericTypeParam, MoveFunctionId, MoveStructId, MoveValue } from "../types";
|
|
19
19
|
import { TypeTag } from "./typeTag";
|
|
20
20
|
import { AccountAuthenticator } from "./authenticator/account";
|
|
21
21
|
import { SimpleTransaction } from "./instances/simpleTransaction";
|
|
@@ -177,6 +177,24 @@ export type InputViewFunctionData = {
|
|
|
177
177
|
abi?: ViewFunctionABI;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* The data needed to generate a View Function payload in JSON
|
|
182
|
+
*/
|
|
183
|
+
export type InputViewFunctionJsonData = {
|
|
184
|
+
function: MoveFunctionId;
|
|
185
|
+
typeArguments?: Array<MoveStructId>;
|
|
186
|
+
functionArguments?: Array<MoveValue>;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Payload sent to the fullnode for a JSON view request
|
|
191
|
+
*/
|
|
192
|
+
export type ViewFunctionJsonPayload = {
|
|
193
|
+
function: MoveFunctionId;
|
|
194
|
+
typeArguments: Array<MoveStructId>;
|
|
195
|
+
functionArguments: Array<MoveValue>;
|
|
196
|
+
};
|
|
197
|
+
|
|
180
198
|
/**
|
|
181
199
|
* Data needed to generate a view function payload and fetch the remote ABI
|
|
182
200
|
*/
|
|
@@ -158,25 +158,6 @@ export type GetAccountCollectionsWithOwnedTokensQuery = {
|
|
|
158
158
|
}>;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
export type GetAccountOwnedObjectsQueryVariables = Types.Exact<{
|
|
162
|
-
where_condition?: Types.InputMaybe<Types.CurrentObjectsBoolExp>;
|
|
163
|
-
offset?: Types.InputMaybe<Types.Scalars["Int"]["input"]>;
|
|
164
|
-
limit?: Types.InputMaybe<Types.Scalars["Int"]["input"]>;
|
|
165
|
-
order_by?: Types.InputMaybe<Array<Types.CurrentObjectsOrderBy> | Types.CurrentObjectsOrderBy>;
|
|
166
|
-
}>;
|
|
167
|
-
|
|
168
|
-
export type GetAccountOwnedObjectsQuery = {
|
|
169
|
-
current_objects: Array<{
|
|
170
|
-
allow_ungated_transfer: boolean;
|
|
171
|
-
state_key_hash: string;
|
|
172
|
-
owner_address: string;
|
|
173
|
-
object_address: string;
|
|
174
|
-
last_transaction_version: any;
|
|
175
|
-
last_guid_creation_num: any;
|
|
176
|
-
is_deleted: boolean;
|
|
177
|
-
}>;
|
|
178
|
-
};
|
|
179
|
-
|
|
180
161
|
export type GetAccountOwnedTokensQueryVariables = Types.Exact<{
|
|
181
162
|
where_condition: Types.CurrentTokenOwnershipsV2BoolExp;
|
|
182
163
|
offset?: Types.InputMaybe<Types.Scalars["Int"]["input"]>;
|
|
@@ -375,6 +356,13 @@ export type GetCollectionDataQueryVariables = Types.Exact<{
|
|
|
375
356
|
|
|
376
357
|
export type GetCollectionDataQuery = {
|
|
377
358
|
current_collections_v2: Array<{
|
|
359
|
+
uri: string;
|
|
360
|
+
total_minted_v2?: any | null;
|
|
361
|
+
token_standard: string;
|
|
362
|
+
table_handle_v1?: string | null;
|
|
363
|
+
mutable_uri?: boolean | null;
|
|
364
|
+
mutable_description?: boolean | null;
|
|
365
|
+
max_supply?: any | null;
|
|
378
366
|
collection_id: string;
|
|
379
367
|
collection_name: string;
|
|
380
368
|
creator_address: string;
|
|
@@ -382,13 +370,17 @@ export type GetCollectionDataQuery = {
|
|
|
382
370
|
description: string;
|
|
383
371
|
last_transaction_timestamp: any;
|
|
384
372
|
last_transaction_version: any;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
373
|
+
cdn_asset_uris?: {
|
|
374
|
+
cdn_image_uri?: string | null;
|
|
375
|
+
asset_uri: string;
|
|
376
|
+
animation_optimizer_retry_count: number;
|
|
377
|
+
cdn_animation_uri?: string | null;
|
|
378
|
+
cdn_json_uri?: string | null;
|
|
379
|
+
image_optimizer_retry_count: number;
|
|
380
|
+
json_parser_retry_count: number;
|
|
381
|
+
raw_animation_uri?: string | null;
|
|
382
|
+
raw_image_uri?: string | null;
|
|
383
|
+
} | null;
|
|
392
384
|
}>;
|
|
393
385
|
};
|
|
394
386
|
|
|
@@ -529,6 +521,25 @@ export type GetNumberOfDelegatorsQuery = {
|
|
|
529
521
|
num_active_delegator_per_pool: Array<{ num_active_delegator?: any | null; pool_address?: string | null }>;
|
|
530
522
|
};
|
|
531
523
|
|
|
524
|
+
export type GetObjectDataQueryVariables = Types.Exact<{
|
|
525
|
+
where_condition?: Types.InputMaybe<Types.CurrentObjectsBoolExp>;
|
|
526
|
+
offset?: Types.InputMaybe<Types.Scalars["Int"]["input"]>;
|
|
527
|
+
limit?: Types.InputMaybe<Types.Scalars["Int"]["input"]>;
|
|
528
|
+
order_by?: Types.InputMaybe<Array<Types.CurrentObjectsOrderBy> | Types.CurrentObjectsOrderBy>;
|
|
529
|
+
}>;
|
|
530
|
+
|
|
531
|
+
export type GetObjectDataQuery = {
|
|
532
|
+
current_objects: Array<{
|
|
533
|
+
allow_ungated_transfer: boolean;
|
|
534
|
+
state_key_hash: string;
|
|
535
|
+
owner_address: string;
|
|
536
|
+
object_address: string;
|
|
537
|
+
last_transaction_version: any;
|
|
538
|
+
last_guid_creation_num: any;
|
|
539
|
+
is_deleted: boolean;
|
|
540
|
+
}>;
|
|
541
|
+
};
|
|
542
|
+
|
|
532
543
|
export type GetProcessorStatusQueryVariables = Types.Exact<{
|
|
533
544
|
where_condition?: Types.InputMaybe<Types.ProcessorStatusBoolExp>;
|
|
534
545
|
}>;
|
|
@@ -160,24 +160,6 @@ export const GetAccountCollectionsWithOwnedTokens = `
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
`;
|
|
163
|
-
export const GetAccountOwnedObjects = `
|
|
164
|
-
query getAccountOwnedObjects($where_condition: current_objects_bool_exp, $offset: Int, $limit: Int, $order_by: [current_objects_order_by!]) {
|
|
165
|
-
current_objects(
|
|
166
|
-
where: $where_condition
|
|
167
|
-
offset: $offset
|
|
168
|
-
limit: $limit
|
|
169
|
-
order_by: $order_by
|
|
170
|
-
) {
|
|
171
|
-
allow_ungated_transfer
|
|
172
|
-
state_key_hash
|
|
173
|
-
owner_address
|
|
174
|
-
object_address
|
|
175
|
-
last_transaction_version
|
|
176
|
-
last_guid_creation_num
|
|
177
|
-
is_deleted
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
`;
|
|
181
163
|
export const GetAccountOwnedTokens = `
|
|
182
164
|
query getAccountOwnedTokens($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {
|
|
183
165
|
current_token_ownerships_v2(
|
|
@@ -246,6 +228,13 @@ export const GetChainTopUserTransactions = `
|
|
|
246
228
|
export const GetCollectionData = `
|
|
247
229
|
query getCollectionData($where_condition: current_collections_v2_bool_exp!) {
|
|
248
230
|
current_collections_v2(where: $where_condition) {
|
|
231
|
+
uri
|
|
232
|
+
total_minted_v2
|
|
233
|
+
token_standard
|
|
234
|
+
table_handle_v1
|
|
235
|
+
mutable_uri
|
|
236
|
+
mutable_description
|
|
237
|
+
max_supply
|
|
249
238
|
collection_id
|
|
250
239
|
collection_name
|
|
251
240
|
creator_address
|
|
@@ -253,13 +242,17 @@ export const GetCollectionData = `
|
|
|
253
242
|
description
|
|
254
243
|
last_transaction_timestamp
|
|
255
244
|
last_transaction_version
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
245
|
+
cdn_asset_uris {
|
|
246
|
+
cdn_image_uri
|
|
247
|
+
asset_uri
|
|
248
|
+
animation_optimizer_retry_count
|
|
249
|
+
cdn_animation_uri
|
|
250
|
+
cdn_json_uri
|
|
251
|
+
image_optimizer_retry_count
|
|
252
|
+
json_parser_retry_count
|
|
253
|
+
raw_animation_uri
|
|
254
|
+
raw_image_uri
|
|
255
|
+
}
|
|
263
256
|
}
|
|
264
257
|
}
|
|
265
258
|
`;
|
|
@@ -382,6 +375,24 @@ export const GetNumberOfDelegators = `
|
|
|
382
375
|
}
|
|
383
376
|
}
|
|
384
377
|
`;
|
|
378
|
+
export const GetObjectData = `
|
|
379
|
+
query getObjectData($where_condition: current_objects_bool_exp, $offset: Int, $limit: Int, $order_by: [current_objects_order_by!]) {
|
|
380
|
+
current_objects(
|
|
381
|
+
where: $where_condition
|
|
382
|
+
offset: $offset
|
|
383
|
+
limit: $limit
|
|
384
|
+
order_by: $order_by
|
|
385
|
+
) {
|
|
386
|
+
allow_ungated_transfer
|
|
387
|
+
state_key_hash
|
|
388
|
+
owner_address
|
|
389
|
+
object_address
|
|
390
|
+
last_transaction_version
|
|
391
|
+
last_guid_creation_num
|
|
392
|
+
is_deleted
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
`;
|
|
385
396
|
export const GetProcessorStatus = `
|
|
386
397
|
query getProcessorStatus($where_condition: processor_status_bool_exp) {
|
|
387
398
|
processor_status(where: $where_condition) {
|
|
@@ -545,21 +556,6 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
|
|
|
545
556
|
variables,
|
|
546
557
|
);
|
|
547
558
|
},
|
|
548
|
-
getAccountOwnedObjects(
|
|
549
|
-
variables?: Types.GetAccountOwnedObjectsQueryVariables,
|
|
550
|
-
requestHeaders?: GraphQLClientRequestHeaders,
|
|
551
|
-
): Promise<Types.GetAccountOwnedObjectsQuery> {
|
|
552
|
-
return withWrapper(
|
|
553
|
-
(wrappedRequestHeaders) =>
|
|
554
|
-
client.request<Types.GetAccountOwnedObjectsQuery>(GetAccountOwnedObjects, variables, {
|
|
555
|
-
...requestHeaders,
|
|
556
|
-
...wrappedRequestHeaders,
|
|
557
|
-
}),
|
|
558
|
-
"getAccountOwnedObjects",
|
|
559
|
-
"query",
|
|
560
|
-
variables,
|
|
561
|
-
);
|
|
562
|
-
},
|
|
563
559
|
getAccountOwnedTokens(
|
|
564
560
|
variables: Types.GetAccountOwnedTokensQueryVariables,
|
|
565
561
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -765,6 +761,21 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper =
|
|
|
765
761
|
variables,
|
|
766
762
|
);
|
|
767
763
|
},
|
|
764
|
+
getObjectData(
|
|
765
|
+
variables?: Types.GetObjectDataQueryVariables,
|
|
766
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
767
|
+
): Promise<Types.GetObjectDataQuery> {
|
|
768
|
+
return withWrapper(
|
|
769
|
+
(wrappedRequestHeaders) =>
|
|
770
|
+
client.request<Types.GetObjectDataQuery>(GetObjectData, variables, {
|
|
771
|
+
...requestHeaders,
|
|
772
|
+
...wrappedRequestHeaders,
|
|
773
|
+
}),
|
|
774
|
+
"getObjectData",
|
|
775
|
+
"query",
|
|
776
|
+
variables,
|
|
777
|
+
);
|
|
778
|
+
},
|
|
768
779
|
getProcessorStatus(
|
|
769
780
|
variables?: Types.GetProcessorStatusQueryVariables,
|
|
770
781
|
requestHeaders?: GraphQLClientRequestHeaders,
|