@aptos-labs/ts-sdk 1.12.2 → 1.13.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/chunk-KSEUZTKY.js +2 -0
- package/dist/common/chunk-KSEUZTKY.js.map +1 -0
- package/dist/common/cli/index.d.ts +37 -0
- package/dist/common/cli/index.js +2 -0
- package/dist/common/cli/index.js.map +1 -0
- package/dist/common/index.d.ts +383 -75
- package/dist/common/index.js +25 -25
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-DHqzsb8B.d.mts → Ed25519Account--qjfup2u.d.mts} +1 -1
- package/dist/esm/api/account.d.mts +51 -10
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +10 -18
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +6 -2
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +4 -0
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +8 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +144 -5
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +14 -9
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +3 -0
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +30 -7
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +51 -28
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +2 -2
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/staking.d.mts +11 -2
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +60 -17
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +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/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-3AYBWD76.mjs → chunk-2M6OT6DU.mjs} +2 -2
- package/dist/esm/chunk-2M6OT6DU.mjs.map +1 -0
- package/dist/esm/chunk-3CLYWZYZ.mjs +2 -0
- package/dist/esm/{chunk-C7YANDB2.mjs → chunk-3F6EYD5O.mjs} +2 -2
- package/dist/esm/{chunk-36QXVFR5.mjs → chunk-52C73T26.mjs} +2 -2
- package/dist/esm/{chunk-SOBCWGBM.mjs → chunk-54BANKLA.mjs} +2 -2
- package/dist/esm/{chunk-CQS6ZCJ7.mjs → chunk-5AQEETAC.mjs} +1 -1
- package/dist/esm/chunk-5AQEETAC.mjs.map +1 -0
- package/dist/esm/{chunk-6BR5UJDT.mjs → chunk-63AIRYJX.mjs} +2 -2
- package/dist/esm/{chunk-WHA7RISE.mjs → chunk-647IOEXV.mjs} +2 -2
- package/dist/esm/{chunk-OWXKKVWD.mjs → chunk-6CBPMYW5.mjs} +2 -2
- package/dist/esm/chunk-6CBPMYW5.mjs.map +1 -0
- package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-6FBKUTGF.mjs} +2 -2
- package/dist/esm/chunk-7CAEMK4R.mjs +2 -0
- package/dist/esm/chunk-7CAEMK4R.mjs.map +1 -0
- package/dist/esm/{chunk-GQR35QW3.mjs → chunk-7PYFGGHM.mjs} +2 -2
- package/dist/esm/chunk-7PYFGGHM.mjs.map +1 -0
- package/dist/esm/{chunk-LPB7SZHL.mjs → chunk-A7MSW6OL.mjs} +2 -2
- package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
- package/dist/esm/{chunk-RIUFW2OG.mjs → chunk-AP7UZTPZ.mjs} +2 -2
- package/dist/esm/{chunk-45ZZWQ7X.mjs → chunk-BMKDEIRL.mjs} +2 -2
- package/dist/esm/chunk-BMKDEIRL.mjs.map +1 -0
- package/dist/esm/{chunk-EV75CYGN.mjs → chunk-BSEQPVD6.mjs} +2 -2
- package/dist/esm/chunk-BWFJHFBQ.mjs +2 -0
- package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-DMKUAQB7.mjs} +2 -2
- package/dist/esm/chunk-DSTKXJMA.mjs +2 -0
- package/dist/esm/chunk-FBPNHF54.mjs +2 -0
- package/dist/esm/{chunk-G56GPLTB.mjs → chunk-FS3NSGBF.mjs} +2 -2
- package/dist/esm/{chunk-UEKKYJGA.mjs → chunk-G2QII3AT.mjs} +2 -2
- package/dist/esm/{chunk-ZBT4HP6E.mjs → chunk-GMVVQD72.mjs} +2 -2
- package/dist/esm/chunk-GMVVQD72.mjs.map +1 -0
- package/dist/esm/{chunk-DUP7XY5P.mjs → chunk-GXVUN32G.mjs} +2 -2
- package/dist/esm/{chunk-EKR6HLSN.mjs → chunk-H4UVHJ3M.mjs} +2 -2
- package/dist/esm/{chunk-GKGTODGE.mjs → chunk-HB6T27S2.mjs} +2 -2
- package/dist/esm/{chunk-KS7UY4W5.mjs → chunk-HXN2WRUX.mjs} +2 -2
- package/dist/esm/{chunk-IHPWATYH.mjs → chunk-I7YI22IW.mjs} +2 -2
- package/dist/esm/chunk-I7YI22IW.mjs.map +1 -0
- package/dist/esm/{chunk-TVHLZDCO.mjs → chunk-IA6XM7QE.mjs} +2 -2
- package/dist/esm/chunk-IA6XM7QE.mjs.map +1 -0
- package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-IOSQVDZI.mjs} +2 -2
- package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-IOSQVDZI.mjs.map} +1 -1
- package/dist/esm/{chunk-5RUPEEIG.mjs → chunk-IS3OLRMB.mjs} +2 -2
- package/dist/esm/chunk-IS3OLRMB.mjs.map +1 -0
- package/dist/esm/{chunk-URTTOOEM.mjs → chunk-KL6VJ3UK.mjs} +2 -2
- package/dist/esm/{chunk-MXO53VAI.mjs → chunk-KOAUBVO6.mjs} +2 -2
- package/dist/esm/{chunk-KXR3IUJ7.mjs → chunk-KUOIRTNL.mjs} +2 -2
- package/dist/esm/chunk-KVIVMWN5.mjs +2 -0
- package/dist/esm/chunk-L4Q2XTHT.mjs +2 -0
- package/dist/esm/chunk-MIEV7J74.mjs +2 -0
- package/dist/esm/chunk-MIEV7J74.mjs.map +1 -0
- package/dist/esm/{chunk-5EN52MUT.mjs → chunk-NPFNYP75.mjs} +2 -2
- package/dist/esm/chunk-OKCU4GHN.mjs +2 -0
- package/dist/esm/chunk-OKCU4GHN.mjs.map +1 -0
- package/dist/esm/{chunk-V6FZ7WZH.mjs → chunk-ONDQ4MK7.mjs} +2 -2
- package/dist/esm/{chunk-NJRNZEHX.mjs → chunk-OWW6SIDP.mjs} +1 -1
- package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
- package/dist/esm/chunk-QIAHBEEW.mjs +2 -0
- package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-QIAHBEEW.mjs.map} +1 -1
- package/dist/esm/{chunk-SK5TPUAN.mjs → chunk-QK4P26SH.mjs} +2 -2
- package/dist/esm/{chunk-YZGEWPDE.mjs → chunk-QTSECE7R.mjs} +2 -2
- package/dist/esm/chunk-QTSECE7R.mjs.map +1 -0
- package/dist/esm/{chunk-Y2MYVQVT.mjs → chunk-QVKMFPAV.mjs} +2 -2
- package/dist/esm/{chunk-IYSHHN5A.mjs → chunk-QW3VNZJ7.mjs} +2 -2
- package/dist/esm/chunk-R5QUBEH6.mjs +2 -0
- package/dist/esm/{chunk-JOLLCFQL.mjs → chunk-RAYJRFIG.mjs} +2 -2
- package/dist/esm/{chunk-JOLLCFQL.mjs.map → chunk-RAYJRFIG.mjs.map} +1 -1
- package/dist/esm/{chunk-35EWRSDK.mjs → chunk-RHBCVCOS.mjs} +2 -2
- package/dist/esm/{chunk-KLAYDUFD.mjs → chunk-SDUIZ3FY.mjs} +2 -2
- package/dist/esm/chunk-SDUIZ3FY.mjs.map +1 -0
- package/dist/esm/{chunk-XDXI3TRT.mjs → chunk-TBFLWWV4.mjs} +2 -2
- package/dist/esm/chunk-TBMAJ6AW.mjs +2 -0
- package/dist/esm/chunk-TGLSJGFO.mjs +2 -0
- package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
- package/dist/esm/chunk-TLKV4NHK.mjs +2 -0
- package/dist/esm/chunk-TLKV4NHK.mjs.map +1 -0
- package/dist/esm/{chunk-2EZJOBD2.mjs → chunk-TR2YS7DT.mjs} +2 -2
- package/dist/esm/chunk-TR2YS7DT.mjs.map +1 -0
- package/dist/esm/{chunk-MJPUASSD.mjs → chunk-U43IJHQN.mjs} +2 -2
- package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-UML2VQZT.mjs} +2 -2
- package/dist/esm/{chunk-Q73VKL3A.mjs → chunk-V4YBGBCN.mjs} +2 -2
- package/dist/esm/{chunk-WMJXRWVE.mjs → chunk-V6SPPOWX.mjs} +2 -2
- package/dist/esm/{chunk-6ILDDGAX.mjs → chunk-VBTJVPAM.mjs} +2 -2
- package/dist/esm/{chunk-AEVRPB4E.mjs → chunk-VM3EJYJU.mjs} +2 -2
- package/dist/esm/chunk-VM3EJYJU.mjs.map +1 -0
- package/dist/esm/chunk-VX6LTXGB.mjs +2 -0
- package/dist/esm/chunk-VX6LTXGB.mjs.map +1 -0
- package/dist/esm/chunk-WEZXFWPR.mjs +2 -0
- package/dist/esm/{chunk-CXR7MOBW.mjs.map → chunk-WEZXFWPR.mjs.map} +1 -1
- package/dist/esm/chunk-WFZDFFBM.mjs +2 -0
- package/dist/esm/{chunk-U43KR4TW.mjs → chunk-XYLYHSEI.mjs} +2 -2
- package/dist/esm/chunk-Y2VA7F5D.mjs +2 -0
- package/dist/esm/chunk-Y2VA7F5D.mjs.map +1 -0
- package/dist/esm/{chunk-TTUXAKCV.mjs → chunk-Y5M5DD64.mjs} +2 -2
- package/dist/esm/{chunk-CAGDOGXS.mjs → chunk-YWQLLV2R.mjs} +2 -2
- package/dist/esm/chunk-ZEXZ4CX5.mjs +2 -0
- package/dist/esm/{chunk-6APZ5TPE.mjs → chunk-ZKNM27TR.mjs} +2 -2
- package/dist/esm/{chunk-QJAI7DNA.mjs → chunk-ZPNCA4C7.mjs} +2 -2
- package/dist/esm/chunk-ZYYK3UXP.mjs +2 -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/client/types.mjs +1 -1
- package/dist/esm/core/account/Account.d.mts +2 -2
- package/dist/esm/core/account/Account.mjs +1 -1
- package/dist/esm/core/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/core/account/Ed25519Account.mjs +1 -1
- package/dist/esm/core/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +2 -2
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +9 -2
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +8 -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.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +2 -2
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +2 -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.d.mts +2 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +3 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +1 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +6 -6
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -2
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +5 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +6 -6
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +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/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +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.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +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.d.mts +2 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -2
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
- 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 +1 -1
- package/dist/esm/types/index.d.mts +1 -0
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +7 -6
- package/src/api/account.ts +48 -7
- package/src/api/ans.ts +8 -16
- package/src/api/aptos.ts +4 -0
- package/src/api/aptosConfig.ts +4 -0
- package/src/api/coin.ts +7 -0
- package/src/api/digitalAsset.ts +140 -1
- package/src/api/event.ts +13 -8
- package/src/api/faucet.ts +3 -0
- package/src/api/fungibleAsset.ts +27 -4
- package/src/api/general.ts +48 -25
- package/src/api/staking.ts +9 -0
- package/src/api/transaction.ts +57 -14
- package/src/client/core.ts +2 -1
- package/src/core/crypto/ed25519.ts +44 -10
- package/src/core/crypto/secp256k1.ts +9 -3
- package/src/internal/account.ts +6 -9
- package/src/internal/digitalAsset.ts +1 -1
- package/src/internal/fungibleAsset.ts +3 -3
- package/src/internal/transaction.ts +48 -10
- package/src/types/index.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/esm/chunk-2EZJOBD2.mjs.map +0 -1
- package/dist/esm/chunk-3AYBWD76.mjs.map +0 -1
- package/dist/esm/chunk-45ZZWQ7X.mjs.map +0 -1
- package/dist/esm/chunk-4ILXLBGX.mjs +0 -2
- package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
- package/dist/esm/chunk-5GKROFZ4.mjs +0 -2
- package/dist/esm/chunk-5GKROFZ4.mjs.map +0 -1
- package/dist/esm/chunk-5RUPEEIG.mjs.map +0 -1
- package/dist/esm/chunk-AEVRPB4E.mjs.map +0 -1
- package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
- package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
- package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
- package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
- package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
- package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
- package/dist/esm/chunk-CQS6ZCJ7.mjs.map +0 -1
- package/dist/esm/chunk-CXR7MOBW.mjs +0 -2
- package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
- package/dist/esm/chunk-FKTXWOKR.mjs +0 -2
- package/dist/esm/chunk-FKTXWOKR.mjs.map +0 -1
- package/dist/esm/chunk-GQR35QW3.mjs.map +0 -1
- package/dist/esm/chunk-IHPWATYH.mjs.map +0 -1
- package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
- package/dist/esm/chunk-KLAYDUFD.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
- package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
- package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
- package/dist/esm/chunk-OWXKKVWD.mjs.map +0 -1
- package/dist/esm/chunk-PF57EOJY.mjs +0 -2
- package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
- package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
- package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
- package/dist/esm/chunk-T6J2LHHS.mjs +0 -2
- package/dist/esm/chunk-T6J2LHHS.mjs.map +0 -1
- package/dist/esm/chunk-TVHLZDCO.mjs.map +0 -1
- package/dist/esm/chunk-UGPALAPN.mjs +0 -2
- package/dist/esm/chunk-W3V4IGGB.mjs +0 -2
- package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
- package/dist/esm/chunk-YZGEWPDE.mjs.map +0 -1
- package/dist/esm/chunk-ZBT4HP6E.mjs.map +0 -1
- package/dist/esm/chunk-ZTIRBBNS.mjs +0 -2
- /package/dist/esm/{chunk-4ILXLBGX.mjs.map → chunk-3CLYWZYZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-C7YANDB2.mjs.map → chunk-3F6EYD5O.mjs.map} +0 -0
- /package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-52C73T26.mjs.map} +0 -0
- /package/dist/esm/{chunk-SOBCWGBM.mjs.map → chunk-54BANKLA.mjs.map} +0 -0
- /package/dist/esm/{chunk-6BR5UJDT.mjs.map → chunk-63AIRYJX.mjs.map} +0 -0
- /package/dist/esm/{chunk-WHA7RISE.mjs.map → chunk-647IOEXV.mjs.map} +0 -0
- /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
- /package/dist/esm/{chunk-LPB7SZHL.mjs.map → chunk-A7MSW6OL.mjs.map} +0 -0
- /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
- /package/dist/esm/{chunk-RIUFW2OG.mjs.map → chunk-AP7UZTPZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-EV75CYGN.mjs.map → chunk-BSEQPVD6.mjs.map} +0 -0
- /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
- /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
- /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
- /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
- /package/dist/esm/{chunk-UEKKYJGA.mjs.map → chunk-G2QII3AT.mjs.map} +0 -0
- /package/dist/esm/{chunk-DUP7XY5P.mjs.map → chunk-GXVUN32G.mjs.map} +0 -0
- /package/dist/esm/{chunk-EKR6HLSN.mjs.map → chunk-H4UVHJ3M.mjs.map} +0 -0
- /package/dist/esm/{chunk-GKGTODGE.mjs.map → chunk-HB6T27S2.mjs.map} +0 -0
- /package/dist/esm/{chunk-KS7UY4W5.mjs.map → chunk-HXN2WRUX.mjs.map} +0 -0
- /package/dist/esm/{chunk-URTTOOEM.mjs.map → chunk-KL6VJ3UK.mjs.map} +0 -0
- /package/dist/esm/{chunk-MXO53VAI.mjs.map → chunk-KOAUBVO6.mjs.map} +0 -0
- /package/dist/esm/{chunk-KXR3IUJ7.mjs.map → chunk-KUOIRTNL.mjs.map} +0 -0
- /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-KVIVMWN5.mjs.map} +0 -0
- /package/dist/esm/{chunk-W3V4IGGB.mjs.map → chunk-L4Q2XTHT.mjs.map} +0 -0
- /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
- /package/dist/esm/{chunk-V6FZ7WZH.mjs.map → chunk-ONDQ4MK7.mjs.map} +0 -0
- /package/dist/esm/{chunk-SK5TPUAN.mjs.map → chunk-QK4P26SH.mjs.map} +0 -0
- /package/dist/esm/{chunk-Y2MYVQVT.mjs.map → chunk-QVKMFPAV.mjs.map} +0 -0
- /package/dist/esm/{chunk-IYSHHN5A.mjs.map → chunk-QW3VNZJ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
- /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
- /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-TBFLWWV4.mjs.map} +0 -0
- /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZTIRBBNS.mjs.map → chunk-TGLSJGFO.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
- /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q73VKL3A.mjs.map → chunk-V4YBGBCN.mjs.map} +0 -0
- /package/dist/esm/{chunk-WMJXRWVE.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
- /package/dist/esm/{chunk-6ILDDGAX.mjs.map → chunk-VBTJVPAM.mjs.map} +0 -0
- /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
- /package/dist/esm/{chunk-U43KR4TW.mjs.map → chunk-XYLYHSEI.mjs.map} +0 -0
- /package/dist/esm/{chunk-TTUXAKCV.mjs.map → chunk-Y5M5DD64.mjs.map} +0 -0
- /package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-YWQLLV2R.mjs.map} +0 -0
- /package/dist/esm/{chunk-XX5J7KKC.mjs.map → chunk-ZEXZ4CX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-6APZ5TPE.mjs.map → chunk-ZKNM27TR.mjs.map} +0 -0
- /package/dist/esm/{chunk-QJAI7DNA.mjs.map → chunk-ZPNCA4C7.mjs.map} +0 -0
- /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
- /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
package/src/api/digitalAsset.ts
CHANGED
|
@@ -59,6 +59,9 @@ export class DigitalAsset {
|
|
|
59
59
|
* If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
|
|
60
60
|
* can pass an optional `tokenStandard` parameter to query a specific standard
|
|
61
61
|
*
|
|
62
|
+
* @example
|
|
63
|
+
* const collection = await aptos.getCollectionData({creatorAddress:"0x123",collectionName:"myCollection"})
|
|
64
|
+
*
|
|
62
65
|
* @param args.creatorAddress the address of the collection's creator
|
|
63
66
|
* @param args.collectionName the name of the collection
|
|
64
67
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -82,6 +85,9 @@ export class DigitalAsset {
|
|
|
82
85
|
/**
|
|
83
86
|
* Queries data of a specific collection by the collection ID.
|
|
84
87
|
*
|
|
88
|
+
* @example
|
|
89
|
+
* const collection = await aptos.getCollectionDataByCollectionId({collectionId:"0x123"})
|
|
90
|
+
*
|
|
85
91
|
* @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
|
|
86
92
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
87
93
|
* @returns GetCollectionDataResponse response type
|
|
@@ -104,6 +110,9 @@ export class DigitalAsset {
|
|
|
104
110
|
* This is the same as the collection's object address in V2, but V1 does
|
|
105
111
|
* not use objects, and does not have an address
|
|
106
112
|
*
|
|
113
|
+
* @example
|
|
114
|
+
* const collection = await aptos.getCollectionId({creatorAddress:"0x123",collectionName:"myCollection"})
|
|
115
|
+
*
|
|
107
116
|
* @param args.creatorAddress the address of the collection's creator
|
|
108
117
|
* @param args.collectionName the name of the collection
|
|
109
118
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -127,6 +136,9 @@ export class DigitalAsset {
|
|
|
127
136
|
/**
|
|
128
137
|
* Gets digital asset data given the address of a digital asset.
|
|
129
138
|
*
|
|
139
|
+
* @example
|
|
140
|
+
* const digitalAsset = await aptos.getDigitalAssetData({digitalAssetAddress:"0x123"})
|
|
141
|
+
*
|
|
130
142
|
* @param args.tokenAddress The address of the digital asset
|
|
131
143
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
132
144
|
* @returns GetTokenDataResponse containing relevant data to the digital asset.
|
|
@@ -146,6 +158,9 @@ export class DigitalAsset {
|
|
|
146
158
|
/**
|
|
147
159
|
* Gets digital asset ownership data given the address of a digital asset.
|
|
148
160
|
*
|
|
161
|
+
* @example
|
|
162
|
+
* const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({digitalAssetAddress:"0x123"})
|
|
163
|
+
*
|
|
149
164
|
* @param args.tokenAddress The address of the digital asset
|
|
150
165
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
151
166
|
*
|
|
@@ -166,6 +181,9 @@ export class DigitalAsset {
|
|
|
166
181
|
/**
|
|
167
182
|
* Gets the digital assets that the given address owns.
|
|
168
183
|
*
|
|
184
|
+
* @example
|
|
185
|
+
* const digitalAssets = await aptos.getOwnedDigitalAssets({ownerAddress:"0x123"})
|
|
186
|
+
*
|
|
169
187
|
* @param args.ownerAddress The address of the owner
|
|
170
188
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
171
189
|
*
|
|
@@ -187,6 +205,9 @@ export class DigitalAsset {
|
|
|
187
205
|
/**
|
|
188
206
|
* Gets the activity data given the address of a digital asset.
|
|
189
207
|
*
|
|
208
|
+
* @example
|
|
209
|
+
* const digitalAssetActivity = await aptos.getDigitalAssetActivity({digitalAssetAddress:"0x123"})
|
|
210
|
+
*
|
|
190
211
|
* @param args.tokenAddress The address of the digital asset
|
|
191
212
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
192
213
|
*
|
|
@@ -208,6 +229,14 @@ export class DigitalAsset {
|
|
|
208
229
|
/**
|
|
209
230
|
* Creates a new collection within the specified account
|
|
210
231
|
*
|
|
232
|
+
* @example
|
|
233
|
+
* const transaction = await aptos.createCollectionTransaction({
|
|
234
|
+
* creator: alice,
|
|
235
|
+
* description: "collectionDescription",
|
|
236
|
+
* name: "collectionName",
|
|
237
|
+
* uri: "collection-uri.com",
|
|
238
|
+
* });
|
|
239
|
+
*
|
|
211
240
|
* @param args.creator the account of the collection's creator
|
|
212
241
|
* @param args.description the description of the collection
|
|
213
242
|
* @param args.name the name of the collection
|
|
@@ -246,6 +275,15 @@ export class DigitalAsset {
|
|
|
246
275
|
/**
|
|
247
276
|
* Create a transaction to mint a digital asset into the creators account within an existing collection.
|
|
248
277
|
*
|
|
278
|
+
* @example
|
|
279
|
+
* const transaction = await aptos.mintDigitalAssetTransaction({
|
|
280
|
+
* creator: alice,
|
|
281
|
+
* description: "collectionDescription",
|
|
282
|
+
* collection: "collectionName",
|
|
283
|
+
* name: "digitalAssetName",
|
|
284
|
+
* uri: "digital-asset-uri.com",
|
|
285
|
+
* });
|
|
286
|
+
*
|
|
249
287
|
* @param args.creator the creator of the collection
|
|
250
288
|
* @param args.collection the name of the collection the digital asset belongs to
|
|
251
289
|
* @param args.description the description of the digital asset
|
|
@@ -274,6 +312,13 @@ export class DigitalAsset {
|
|
|
274
312
|
* We can transfer a digital asset only when the digital asset is not frozen
|
|
275
313
|
* (i.e. owner transfer is not disabled such as for soul bound digital assets)
|
|
276
314
|
*
|
|
315
|
+
* @example
|
|
316
|
+
* const transaction = await aptos.transferDigitalAssetTransaction({
|
|
317
|
+
* sender: alice,
|
|
318
|
+
* digitalAssetAddress: "0x123",
|
|
319
|
+
* recipient: "0x456",
|
|
320
|
+
* });
|
|
321
|
+
*
|
|
277
322
|
* @param args.sender The sender account of the current digital asset owner
|
|
278
323
|
* @param args.digitalAssetAddress The digital asset address
|
|
279
324
|
* @param args.recipient The recipient account address
|
|
@@ -294,6 +339,16 @@ export class DigitalAsset {
|
|
|
294
339
|
/**
|
|
295
340
|
* Mint a soul bound digital asset into a recipient's account
|
|
296
341
|
*
|
|
342
|
+
* @example
|
|
343
|
+
* const transaction = await aptos.mintSoulBoundTransaction({
|
|
344
|
+
* account: alice,
|
|
345
|
+
* collection: "collectionName",
|
|
346
|
+
* description: "collectionDescription",
|
|
347
|
+
* name: "digitalAssetName",
|
|
348
|
+
* uri: "digital-asset-uri.com",
|
|
349
|
+
* recipient: "0x123"
|
|
350
|
+
* });
|
|
351
|
+
*
|
|
297
352
|
* @param args.account The account that mints the digital asset
|
|
298
353
|
* @param args.collection The collection name that the digital asset belongs to
|
|
299
354
|
* @param args.description The digital asset description
|
|
@@ -312,7 +367,7 @@ export class DigitalAsset {
|
|
|
312
367
|
description: string;
|
|
313
368
|
name: string;
|
|
314
369
|
uri: string;
|
|
315
|
-
recipient:
|
|
370
|
+
recipient: AccountAddressInput;
|
|
316
371
|
propertyKeys?: Array<string>;
|
|
317
372
|
propertyTypes?: Array<PropertyType>;
|
|
318
373
|
propertyValues?: Array<PropertyValue>;
|
|
@@ -324,6 +379,12 @@ export class DigitalAsset {
|
|
|
324
379
|
/**
|
|
325
380
|
* Burn a digital asset by its creator
|
|
326
381
|
*
|
|
382
|
+
* @example
|
|
383
|
+
* const transaction = await aptos.burnDigitalAssetTransaction({
|
|
384
|
+
* creator: alice,
|
|
385
|
+
* digitalAssetAddress: "0x123",
|
|
386
|
+
* });
|
|
387
|
+
*
|
|
327
388
|
* @param args.creator The creator account
|
|
328
389
|
* @param args.digitalAssetAddress The digital asset address
|
|
329
390
|
*
|
|
@@ -341,6 +402,12 @@ export class DigitalAsset {
|
|
|
341
402
|
/**
|
|
342
403
|
* Freeze digital asset transfer ability
|
|
343
404
|
*
|
|
405
|
+
* @example
|
|
406
|
+
* const transaction = await aptos.freezeDigitalAssetTransaferTransaction({
|
|
407
|
+
* creator: alice,
|
|
408
|
+
* digitalAssetAddress: "0x123",
|
|
409
|
+
* });
|
|
410
|
+
*
|
|
344
411
|
* @param args.creator The creator account
|
|
345
412
|
* @param args.digitalAssetAddress The digital asset address
|
|
346
413
|
*
|
|
@@ -358,6 +425,12 @@ export class DigitalAsset {
|
|
|
358
425
|
/**
|
|
359
426
|
* Unfreeze digital asset transfer ability
|
|
360
427
|
*
|
|
428
|
+
* @example
|
|
429
|
+
* const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({
|
|
430
|
+
* creator: alice,
|
|
431
|
+
* digitalAssetAddress: "0x123",
|
|
432
|
+
* });
|
|
433
|
+
*
|
|
361
434
|
* @param args.creator The creator account
|
|
362
435
|
* @param args.digitalAssetAddress The digital asset address
|
|
363
436
|
*
|
|
@@ -375,6 +448,13 @@ export class DigitalAsset {
|
|
|
375
448
|
/**
|
|
376
449
|
* Set the digital asset description
|
|
377
450
|
*
|
|
451
|
+
* @example
|
|
452
|
+
* const transaction = await aptos.setDigitalAssetDescriptionTransaction({
|
|
453
|
+
* creator: alice,
|
|
454
|
+
* description: "digitalAssetDescription",
|
|
455
|
+
* digitalAssetAddress: "0x123",
|
|
456
|
+
* });
|
|
457
|
+
*
|
|
378
458
|
* @param args.creator The creator account
|
|
379
459
|
* @param args.description The digital asset description
|
|
380
460
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -394,6 +474,13 @@ export class DigitalAsset {
|
|
|
394
474
|
/**
|
|
395
475
|
* Set the digital asset name
|
|
396
476
|
*
|
|
477
|
+
* @example
|
|
478
|
+
* const transaction = await aptos.setDigitalAssetNameTransaction({
|
|
479
|
+
* creator: alice,
|
|
480
|
+
* name: "digitalAssetName",
|
|
481
|
+
* digitalAssetAddress: "0x123",
|
|
482
|
+
* });
|
|
483
|
+
*
|
|
397
484
|
* @param args.creator The creator account
|
|
398
485
|
* @param args.name The digital asset name
|
|
399
486
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -413,6 +500,13 @@ export class DigitalAsset {
|
|
|
413
500
|
/**
|
|
414
501
|
* Set the digital asset name
|
|
415
502
|
*
|
|
503
|
+
* @example
|
|
504
|
+
* const transaction = await aptos.setDigitalAssetURITransaction({
|
|
505
|
+
* creator: alice,
|
|
506
|
+
* uri: "digital-asset-uri.com",
|
|
507
|
+
* digitalAssetAddress: "0x123",
|
|
508
|
+
* });
|
|
509
|
+
*
|
|
416
510
|
* @param args.creator The creator account
|
|
417
511
|
* @param args.uri The digital asset uri
|
|
418
512
|
* @param args.digitalAssetAddress The digital asset address
|
|
@@ -432,6 +526,15 @@ export class DigitalAsset {
|
|
|
432
526
|
/**
|
|
433
527
|
* Add a digital asset property
|
|
434
528
|
*
|
|
529
|
+
* @example
|
|
530
|
+
* const transaction = await aptos.addDigitalAssetPropertyTransaction({
|
|
531
|
+
* creator: alice,
|
|
532
|
+
* propertyKey: "newKey",
|
|
533
|
+
* propertyType: "BOOLEAN",
|
|
534
|
+
* propertyValue: true,
|
|
535
|
+
* digitalAssetAddress: "0x123",
|
|
536
|
+
* });
|
|
537
|
+
*
|
|
435
538
|
* @param args.account The account that mints the digital asset
|
|
436
539
|
* @param args.digitalAssetAddress The digital asset address
|
|
437
540
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -455,6 +558,15 @@ export class DigitalAsset {
|
|
|
455
558
|
/**
|
|
456
559
|
* Remove a digital asset property
|
|
457
560
|
*
|
|
561
|
+
* @example
|
|
562
|
+
* const transaction = await aptos.removeDigitalAssetPropertyTransaction({
|
|
563
|
+
* creator: alice,
|
|
564
|
+
* propertyKey: "newKey",
|
|
565
|
+
* propertyType: "BOOLEAN",
|
|
566
|
+
* propertyValue: true,
|
|
567
|
+
* digitalAssetAddress: "0x123",
|
|
568
|
+
* });
|
|
569
|
+
*
|
|
458
570
|
* @param args.account The account that mints the digital asset
|
|
459
571
|
* @param args.digitalAssetAddress The digital asset address
|
|
460
572
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -478,6 +590,15 @@ export class DigitalAsset {
|
|
|
478
590
|
/**
|
|
479
591
|
* Update a digital asset property
|
|
480
592
|
*
|
|
593
|
+
* @example
|
|
594
|
+
* const transaction = await aptos.updateDigitalAssetPropertyTransaction({
|
|
595
|
+
* creator: alice,
|
|
596
|
+
* propertyKey: "newKey",
|
|
597
|
+
* propertyType: "BOOLEAN",
|
|
598
|
+
* propertyValue: false,
|
|
599
|
+
* digitalAssetAddress: "0x123",
|
|
600
|
+
* });
|
|
601
|
+
*
|
|
481
602
|
* @param args.account The account that mints the digital asset
|
|
482
603
|
* @param args.digitalAssetAddress The digital asset address
|
|
483
604
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -501,6 +622,15 @@ export class DigitalAsset {
|
|
|
501
622
|
/**
|
|
502
623
|
* Add a typed digital asset property
|
|
503
624
|
*
|
|
625
|
+
* @example
|
|
626
|
+
* const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({
|
|
627
|
+
* creator: alice,
|
|
628
|
+
* propertyKey: "typedKey",
|
|
629
|
+
* propertyType: "STRING",
|
|
630
|
+
* propertyValue: "hello",
|
|
631
|
+
* digitalAssetAddress: "0x123",
|
|
632
|
+
* });
|
|
633
|
+
*
|
|
504
634
|
* @param args.account The account that mints the digital asset
|
|
505
635
|
* @param args.digitalAssetAddress The digital asset address
|
|
506
636
|
* @param args.propertyKey The property key for storing on-chain properties
|
|
@@ -524,6 +654,15 @@ export class DigitalAsset {
|
|
|
524
654
|
/**
|
|
525
655
|
* Update a typed digital asset property
|
|
526
656
|
*
|
|
657
|
+
* @example
|
|
658
|
+
* const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({
|
|
659
|
+
* creator: alice,
|
|
660
|
+
* propertyKey: "typedKey",
|
|
661
|
+
* propertyType: "U8",
|
|
662
|
+
* propertyValue: 2,
|
|
663
|
+
* digitalAssetAddress: "0x123",
|
|
664
|
+
* });
|
|
665
|
+
*
|
|
527
666
|
* @param args.account The account that mints the digital asset
|
|
528
667
|
* @param args.digitalAssetAddress The digital asset address
|
|
529
668
|
* @param args.propertyKey The property key for storing on-chain properties
|
package/src/api/event.ts
CHANGED
|
@@ -23,6 +23,9 @@ export class Event {
|
|
|
23
23
|
/**
|
|
24
24
|
* Get module events by event type
|
|
25
25
|
*
|
|
26
|
+
* @example
|
|
27
|
+
* const events = await aptos.getModuleEventsByEventType({eventType:"0x1::transaction_fee::FeeStatement"})
|
|
28
|
+
*
|
|
26
29
|
* @param args.eventType - The event type
|
|
27
30
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
28
31
|
*
|
|
@@ -44,6 +47,9 @@ export class Event {
|
|
|
44
47
|
/**
|
|
45
48
|
* Get events by creation number and an account address
|
|
46
49
|
*
|
|
50
|
+
* @example
|
|
51
|
+
* const events = await aptos.getAccountEventsByCreationNumber({accountAddress:"0x123",creationNumber: 0})
|
|
52
|
+
*
|
|
47
53
|
* @param args.accountAddress - The account address
|
|
48
54
|
* @param args.creationNumber - The event creation number
|
|
49
55
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -66,6 +72,9 @@ export class Event {
|
|
|
66
72
|
/**
|
|
67
73
|
* Get events by event type and an account address
|
|
68
74
|
*
|
|
75
|
+
* @example
|
|
76
|
+
* const events = await aptos.getAccountEventsByEventType({accountAddress:"0x123",eventType: "0x1::transaction_fee::FeeStatement"})
|
|
77
|
+
*
|
|
69
78
|
* @param args.accountAddress - The account address
|
|
70
79
|
* @param args.eventType - The event type
|
|
71
80
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
@@ -90,15 +99,11 @@ export class Event {
|
|
|
90
99
|
* Get all events
|
|
91
100
|
*
|
|
92
101
|
* An optional `where` can be passed in to filter out the response.
|
|
93
|
-
|
|
102
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
94
103
|
* @example
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* transaction_version: { _eq: 123456 },
|
|
99
|
-
* }
|
|
100
|
-
* }
|
|
101
|
-
* ```
|
|
104
|
+
* const events = await aptos.getEvents()
|
|
105
|
+
* // with filtering
|
|
106
|
+
* const events = await aptos.getEvents({options: { where: { account_address: { _eq: "0x123" } } }});
|
|
102
107
|
*
|
|
103
108
|
* @returns GetEventsQuery response type
|
|
104
109
|
*/
|
package/src/api/faucet.ts
CHANGED
|
@@ -17,6 +17,9 @@ export class Faucet {
|
|
|
17
17
|
* This creates an account if it does not exist and mints the specified amount of
|
|
18
18
|
* coins into that account
|
|
19
19
|
*
|
|
20
|
+
* @example
|
|
21
|
+
* const transaction = await aptos.fundAccount({accountAddress:"0x123", amount: 100})
|
|
22
|
+
*
|
|
20
23
|
* @param args.accountAddress Address of the account to fund
|
|
21
24
|
* @param args.amount Amount of tokens to fund the account with
|
|
22
25
|
* @param args.options Configuration options for waitForTransaction
|
package/src/api/fungibleAsset.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { ProcessorType } from "../utils/const";
|
|
24
24
|
import { AptosConfig } from "./aptosConfig";
|
|
25
25
|
import { waitForIndexerOnVersion } from "./utils";
|
|
26
|
-
import { Account,
|
|
26
|
+
import { Account, AccountAddressInput } from "../core";
|
|
27
27
|
import { InputGenerateTransactionOptions } from "../transactions";
|
|
28
28
|
import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
29
29
|
|
|
@@ -36,7 +36,11 @@ export class FungibleAsset {
|
|
|
36
36
|
/**
|
|
37
37
|
* Queries all fungible asset metadata.
|
|
38
38
|
*
|
|
39
|
+
* @example
|
|
40
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadata()
|
|
41
|
+
*
|
|
39
42
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
43
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
40
44
|
*
|
|
41
45
|
* @returns A list of fungible asset metadata
|
|
42
46
|
*/
|
|
@@ -57,6 +61,9 @@ export class FungibleAsset {
|
|
|
57
61
|
*
|
|
58
62
|
* This query returns the fungible asset metadata for a specific fungible asset.
|
|
59
63
|
*
|
|
64
|
+
* @example
|
|
65
|
+
* const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:"0x123::test_coin::TestCoin"})
|
|
66
|
+
*
|
|
60
67
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
61
68
|
* @param args.assetType The asset type of the fungible asset.
|
|
62
69
|
* e.g
|
|
@@ -89,7 +96,11 @@ export class FungibleAsset {
|
|
|
89
96
|
/**
|
|
90
97
|
* Queries all fungible asset activities
|
|
91
98
|
*
|
|
99
|
+
* @example
|
|
100
|
+
* const fungibleAssetActivities = await aptos.getFungibleAssetActivities()
|
|
101
|
+
*
|
|
92
102
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
103
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
93
104
|
*
|
|
94
105
|
* @returns A list of fungible asset metadata
|
|
95
106
|
*/
|
|
@@ -108,7 +119,11 @@ export class FungibleAsset {
|
|
|
108
119
|
/**
|
|
109
120
|
* Queries all fungible asset balances
|
|
110
121
|
*
|
|
122
|
+
* @example
|
|
123
|
+
* const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()
|
|
124
|
+
*
|
|
111
125
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
126
|
+
* @param args.options Optional configuration for pagination and filtering
|
|
112
127
|
*
|
|
113
128
|
* @returns A list of fungible asset metadata
|
|
114
129
|
*/
|
|
@@ -125,10 +140,18 @@ export class FungibleAsset {
|
|
|
125
140
|
}
|
|
126
141
|
|
|
127
142
|
/**
|
|
128
|
-
*
|
|
143
|
+
* Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
|
|
129
144
|
*
|
|
130
145
|
* Use this method to transfer any fungible asset including fungible token.
|
|
131
146
|
*
|
|
147
|
+
* @example
|
|
148
|
+
* const transaction = await aptos.transferFungibleAsset({
|
|
149
|
+
* sender: alice,
|
|
150
|
+
* fungibleAssetMetadataAddress: "0x123",
|
|
151
|
+
* recipient: "0x456",
|
|
152
|
+
* amount: 5
|
|
153
|
+
* })
|
|
154
|
+
*
|
|
132
155
|
* @param sender The sender account
|
|
133
156
|
* @param fungibleAssetMetadataAddress The fungible asset account address.
|
|
134
157
|
* For example if you’re transferring USDT this would be the USDT address
|
|
@@ -139,8 +162,8 @@ export class FungibleAsset {
|
|
|
139
162
|
*/
|
|
140
163
|
async transferFungibleAsset(args: {
|
|
141
164
|
sender: Account;
|
|
142
|
-
fungibleAssetMetadataAddress:
|
|
143
|
-
recipient:
|
|
165
|
+
fungibleAssetMetadataAddress: AccountAddressInput;
|
|
166
|
+
recipient: AccountAddressInput;
|
|
144
167
|
amount: AnyNumber;
|
|
145
168
|
options?: InputGenerateTransactionOptions;
|
|
146
169
|
}): Promise<SimpleTransaction> {
|
package/src/api/general.ts
CHANGED
|
@@ -42,7 +42,9 @@ export class General {
|
|
|
42
42
|
*
|
|
43
43
|
* @returns Aptos Ledger Info
|
|
44
44
|
*
|
|
45
|
-
* @example
|
|
45
|
+
* @example
|
|
46
|
+
* const ledgerInfo = await aptos.getLedgerInfo()
|
|
47
|
+
* // an example of the returned data
|
|
46
48
|
* ```
|
|
47
49
|
* {
|
|
48
50
|
* "chain_id": 4,
|
|
@@ -64,6 +66,9 @@ export class General {
|
|
|
64
66
|
/**
|
|
65
67
|
* Queries for the chain id
|
|
66
68
|
*
|
|
69
|
+
* @example
|
|
70
|
+
* const chainId = await aptos.getChainId()
|
|
71
|
+
*
|
|
67
72
|
* @returns The chain id
|
|
68
73
|
*/
|
|
69
74
|
async getChainId(): Promise<number> {
|
|
@@ -74,6 +79,9 @@ export class General {
|
|
|
74
79
|
/**
|
|
75
80
|
* Queries for block by transaction version
|
|
76
81
|
*
|
|
82
|
+
* @example
|
|
83
|
+
* const block = await aptos.getBlockByVersion({ledgerVersion:5})
|
|
84
|
+
*
|
|
77
85
|
* @param args.ledgerVersion Ledger version to lookup block information for
|
|
78
86
|
* @param args.options.withTransactions If set to true, include all transactions in the block
|
|
79
87
|
*
|
|
@@ -92,6 +100,9 @@ export class General {
|
|
|
92
100
|
/**
|
|
93
101
|
* Get block by block height
|
|
94
102
|
*
|
|
103
|
+
* @example
|
|
104
|
+
* const block = await aptos.getBlockByVersion({blockHeight:5})
|
|
105
|
+
*
|
|
95
106
|
* @param args.blockHeight Block height to lookup. Starts at 0
|
|
96
107
|
* @param args.options.withTransactions If set to true, include all transactions in the block
|
|
97
108
|
*
|
|
@@ -104,17 +115,21 @@ export class General {
|
|
|
104
115
|
/**
|
|
105
116
|
* Queries for a table item for a table identified by the handle and the key for the item.
|
|
106
117
|
* Key and value types need to be passed in to help with key serialization and value deserialization.
|
|
118
|
+
*
|
|
119
|
+
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
120
|
+
* const tableItem = await aptos.getTableItem({
|
|
121
|
+
* handle: "0x123",
|
|
122
|
+
* data: {
|
|
123
|
+
* key_type: "address", // Move type of table key
|
|
124
|
+
* value_type: "u128", // Move type of table value
|
|
125
|
+
* key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
126
|
+
* },
|
|
127
|
+
* })
|
|
128
|
+
*
|
|
107
129
|
* @param args.handle A pointer to where that table is stored
|
|
108
130
|
* @param args.data Object that describes table item
|
|
109
131
|
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
110
132
|
*
|
|
111
|
-
* @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
|
|
112
|
-
* {
|
|
113
|
-
* data.key_type = "address" // Move type of table key
|
|
114
|
-
* data.value_type = "u128" // Move type of table value
|
|
115
|
-
* data.key = "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
|
|
116
|
-
* }
|
|
117
|
-
*
|
|
118
133
|
* @returns Table item value rendered in JSON
|
|
119
134
|
*/
|
|
120
135
|
async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {
|
|
@@ -125,14 +140,15 @@ export class General {
|
|
|
125
140
|
* Queries for a Move view function
|
|
126
141
|
* @param args.payload Payload for the view function
|
|
127
142
|
* @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
|
|
143
|
+
*
|
|
128
144
|
* @example
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
145
|
+
* const data = await aptos.view({
|
|
146
|
+
* payload: {
|
|
147
|
+
* function: "0x1::coin::balance",
|
|
148
|
+
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
149
|
+
* functionArguments: [accountAddress],
|
|
150
|
+
* }
|
|
151
|
+
* })
|
|
136
152
|
*
|
|
137
153
|
* @returns an array of Move values
|
|
138
154
|
*/
|
|
@@ -146,6 +162,9 @@ export class General {
|
|
|
146
162
|
/**
|
|
147
163
|
* Queries top user transactions
|
|
148
164
|
*
|
|
165
|
+
* @example
|
|
166
|
+
* const topUserTransactions = await aptos.getChainTopUserTransactions({limit:5})
|
|
167
|
+
*
|
|
149
168
|
* @param args.limit The number of transactions to return
|
|
150
169
|
* @returns GetChainTopUserTransactionsResponse
|
|
151
170
|
*/
|
|
@@ -161,18 +180,16 @@ export class General {
|
|
|
161
180
|
* For more detailed queries specification see
|
|
162
181
|
* {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
|
|
163
182
|
*
|
|
164
|
-
* @param args.query.query A GraphQL query
|
|
165
|
-
* @param args.query.variables The variables for the query
|
|
166
183
|
* @example
|
|
167
|
-
*
|
|
168
|
-
* {
|
|
184
|
+
* const topUserTransactions = await aptos.queryIndexer({
|
|
169
185
|
* query: `query MyQuery {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
*
|
|
175
|
-
*
|
|
186
|
+
* ledger_infos {
|
|
187
|
+
* chain_id
|
|
188
|
+
* }}`;
|
|
189
|
+
* })
|
|
190
|
+
*
|
|
191
|
+
* @param args.query.query A GraphQL query
|
|
192
|
+
* @param args.query.variables The variables for the query
|
|
176
193
|
*
|
|
177
194
|
* @return The provided T type
|
|
178
195
|
*/
|
|
@@ -187,6 +204,9 @@ export class General {
|
|
|
187
204
|
* Queries for the last successful indexer version
|
|
188
205
|
*
|
|
189
206
|
* This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* const version = await aptos.getIndexerLastSuccessVersion()
|
|
190
210
|
*/
|
|
191
211
|
async getIndexerLastSuccessVersion(): Promise<bigint> {
|
|
192
212
|
return getIndexerLastSuccessVersion({ aptosConfig: this.config });
|
|
@@ -195,6 +215,9 @@ export class General {
|
|
|
195
215
|
/**
|
|
196
216
|
* Query the processor status for a specific processor type.
|
|
197
217
|
*
|
|
218
|
+
* @example
|
|
219
|
+
* const status = await aptos.getProcessorStatus({processorType:"account_transactions_processor"})
|
|
220
|
+
*
|
|
198
221
|
* @param processorType The processor type to query
|
|
199
222
|
* @returns
|
|
200
223
|
*/
|
package/src/api/staking.ts
CHANGED
|
@@ -21,6 +21,9 @@ export class Staking {
|
|
|
21
21
|
/**
|
|
22
22
|
* Queries current number of delegators in a pool. Throws an error if the pool is not found.
|
|
23
23
|
*
|
|
24
|
+
* @example
|
|
25
|
+
* const delegators = await aptos.getNumberOfDelegators({poolAddress:"0x123"})
|
|
26
|
+
*
|
|
24
27
|
* @param args.poolAddress Pool address
|
|
25
28
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
26
29
|
* @returns The number of delegators for the given pool
|
|
@@ -40,6 +43,9 @@ export class Staking {
|
|
|
40
43
|
/**
|
|
41
44
|
* Queries current number of delegators in a pool. Throws an error if the pool is not found.
|
|
42
45
|
*
|
|
46
|
+
* @example
|
|
47
|
+
* const delegators = await aptos.getNumberOfDelegatorsForAllPools()
|
|
48
|
+
*
|
|
43
49
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
44
50
|
* @returns GetNumberOfDelegatorsForAllPoolsResponse response type
|
|
45
51
|
*/
|
|
@@ -58,6 +64,9 @@ export class Staking {
|
|
|
58
64
|
/**
|
|
59
65
|
* Queries delegated staking activities
|
|
60
66
|
*
|
|
67
|
+
* @example
|
|
68
|
+
* const delegators = await aptos.getDelegatedStakingActivities({delegatorAddress:"0x123",poolAddress:"0x456"})
|
|
69
|
+
*
|
|
61
70
|
* @param args.delegatorAddress Delegator address
|
|
62
71
|
* @param args.poolAddress Pool address
|
|
63
72
|
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|