@aptos-labs/ts-sdk 1.29.0 → 1.30.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/README.md +2 -2
- package/dist/common/{accountAddress-DUCC2ffJ.d.ts → accountAddress-DnSqjhSl.d.ts} +700 -245
- package/dist/common/{chunk-HBPH2AD3.js → chunk-7IYTZDXV.js} +1 -1
- package/dist/common/chunk-7IYTZDXV.js.map +1 -0
- package/dist/common/cli/index.d.ts +123 -126
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +5921 -1627
- package/dist/common/index.js +8 -8
- package/dist/common/index.js.map +1 -1
- package/dist/esm/Ed25519Account-DpH9qAcg.d.mts +470 -0
- package/dist/esm/account/AbstractKeylessAccount.d.mts +6 -5
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +49 -14
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +42 -4
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +54 -34
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -2
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/api/account.d.mts +446 -161
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +369 -122
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +40 -7
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +102 -14
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +52 -15
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +710 -300
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +129 -26
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +44 -7
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +152 -49
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +171 -55
- 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/keyless.d.mts +82 -11
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +51 -7
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +86 -17
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +118 -38
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +440 -109
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +99 -13
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/helpers.d.mts +79 -0
- package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +111 -12
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +97 -3
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +140 -15
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +104 -13
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +26 -3
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.mjs +1 -1
- package/dist/esm/bcs/deserializer.d.mts +82 -32
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +25 -6
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +51 -21
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +79 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +119 -32
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +111 -76
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-U6Z4FNB7.mjs → chunk-2CJC43CV.mjs} +1 -1
- package/dist/esm/chunk-2CJC43CV.mjs.map +1 -0
- package/dist/esm/{chunk-P2EIZ7WL.mjs → chunk-2I56E4T2.mjs} +2 -2
- package/dist/esm/chunk-2I56E4T2.mjs.map +1 -0
- package/dist/esm/{chunk-P3TAY5PP.mjs → chunk-2QRWGJJA.mjs} +2 -2
- package/dist/esm/chunk-2QRWGJJA.mjs.map +1 -0
- package/dist/esm/chunk-37UZKMJI.mjs +2 -0
- package/dist/esm/chunk-37UZKMJI.mjs.map +1 -0
- package/dist/esm/chunk-4CDDWSKZ.mjs +2 -0
- package/dist/esm/chunk-4CDDWSKZ.mjs.map +1 -0
- package/dist/esm/chunk-4OV7QU2U.mjs +2 -0
- package/dist/esm/chunk-4OV7QU2U.mjs.map +1 -0
- package/dist/esm/{chunk-SWNFKKRE.mjs → chunk-5AAFF2PV.mjs} +2 -2
- package/dist/esm/chunk-5AAFF2PV.mjs.map +1 -0
- package/dist/esm/chunk-5CCHECTE.mjs +2 -0
- package/dist/esm/chunk-5CCHECTE.mjs.map +1 -0
- package/dist/esm/{chunk-KUOB4DDE.mjs → chunk-5XXIIWG7.mjs} +2 -2
- package/dist/esm/chunk-5XXIIWG7.mjs.map +1 -0
- package/dist/esm/chunk-5ZBHIUWG.mjs +2 -0
- package/dist/esm/chunk-5ZBHIUWG.mjs.map +1 -0
- package/dist/esm/chunk-6AGTDRNM.mjs +2 -0
- package/dist/esm/chunk-6AGTDRNM.mjs.map +1 -0
- package/dist/esm/chunk-6FLHGOKP.mjs +2 -0
- package/dist/esm/chunk-6FLHGOKP.mjs.map +1 -0
- package/dist/esm/{chunk-LG7RJQ57.mjs → chunk-6Q2O5G3J.mjs} +1 -1
- package/dist/esm/chunk-6Q2O5G3J.mjs.map +1 -0
- package/dist/esm/chunk-7D3RY73L.mjs +2 -0
- package/dist/esm/chunk-7D3RY73L.mjs.map +1 -0
- package/dist/esm/{chunk-QBSU3L5Q.mjs → chunk-7PVIWKGT.mjs} +2 -2
- package/dist/esm/chunk-7PVIWKGT.mjs.map +1 -0
- package/dist/esm/chunk-7V6RL27I.mjs +2 -0
- package/dist/esm/chunk-7V6RL27I.mjs.map +1 -0
- package/dist/esm/{chunk-44GYWUSH.mjs → chunk-7XS45O6M.mjs} +1 -1
- package/dist/esm/chunk-7XS45O6M.mjs.map +1 -0
- package/dist/esm/{chunk-YUNDX5I7.mjs → chunk-AGBA3Y7A.mjs} +2 -2
- package/dist/esm/chunk-AGBA3Y7A.mjs.map +1 -0
- package/dist/esm/{chunk-OKAQO57B.mjs → chunk-BQXVHY7J.mjs} +2 -2
- package/dist/esm/chunk-BQXVHY7J.mjs.map +1 -0
- package/dist/esm/chunk-CRL4WGOH.mjs +2 -0
- package/dist/esm/chunk-CRL4WGOH.mjs.map +1 -0
- package/dist/esm/{chunk-APN6AV5Q.mjs → chunk-D3KBNFZR.mjs} +2 -2
- package/dist/esm/chunk-D3KBNFZR.mjs.map +1 -0
- package/dist/esm/{chunk-SCHZ67F3.mjs → chunk-D3OEQLUE.mjs} +1 -1
- package/dist/esm/{chunk-SCHZ67F3.mjs.map → chunk-D3OEQLUE.mjs.map} +1 -1
- package/dist/esm/{chunk-FZ5EYP3D.mjs → chunk-DCUVV3VY.mjs} +2 -2
- package/dist/esm/chunk-DCUVV3VY.mjs.map +1 -0
- package/dist/esm/{chunk-S2KDCIZN.mjs → chunk-DXQT55L3.mjs} +2 -2
- package/dist/esm/chunk-DXQT55L3.mjs.map +1 -0
- package/dist/esm/chunk-DZJXOL64.mjs +2 -0
- package/dist/esm/chunk-DZJXOL64.mjs.map +1 -0
- package/dist/esm/{chunk-Y2GWUE7C.mjs → chunk-EF2PUPUH.mjs} +2 -2
- package/dist/esm/chunk-EF2PUPUH.mjs.map +1 -0
- package/dist/esm/{chunk-J64ARI4E.mjs → chunk-EKZQ3EYX.mjs} +2 -2
- package/dist/esm/chunk-EKZQ3EYX.mjs.map +1 -0
- package/dist/esm/{chunk-F76N4MQO.mjs → chunk-EN2HDNFE.mjs} +2 -2
- package/dist/esm/chunk-EN2HDNFE.mjs.map +1 -0
- package/dist/esm/{chunk-L2QXU6F4.mjs → chunk-FO4F3OJJ.mjs} +2 -2
- package/dist/esm/chunk-FO4F3OJJ.mjs.map +1 -0
- package/dist/esm/{chunk-HKBBA653.mjs → chunk-FPF4KZ5M.mjs} +2 -2
- package/dist/esm/chunk-FPF4KZ5M.mjs.map +1 -0
- package/dist/esm/{chunk-OMV7445F.mjs → chunk-FY7TSOUU.mjs} +2 -2
- package/dist/esm/chunk-FY7TSOUU.mjs.map +1 -0
- package/dist/esm/{chunk-ELYS7CWV.mjs → chunk-GIQQF2PD.mjs} +2 -2
- package/dist/esm/chunk-GIQQF2PD.mjs.map +1 -0
- package/dist/esm/{chunk-SRPI2FFA.mjs → chunk-GMKKHGXK.mjs} +1 -1
- package/dist/esm/chunk-GMKKHGXK.mjs.map +1 -0
- package/dist/esm/chunk-GPZRGLU2.mjs +2 -0
- package/dist/esm/chunk-GPZRGLU2.mjs.map +1 -0
- package/dist/esm/{chunk-TDGQGILY.mjs → chunk-GQABU3RQ.mjs} +1 -1
- package/dist/esm/chunk-GQABU3RQ.mjs.map +1 -0
- package/dist/esm/{chunk-JH6VLTMS.mjs → chunk-HAMXSLWF.mjs} +2 -2
- package/dist/esm/chunk-HAMXSLWF.mjs.map +1 -0
- package/dist/esm/{chunk-AH44UPM4.mjs → chunk-HBIDHQ2M.mjs} +1 -1
- package/dist/esm/chunk-HBIDHQ2M.mjs.map +1 -0
- package/dist/esm/{chunk-QPB6EJVM.mjs → chunk-HCV3NGLS.mjs} +2 -2
- package/dist/esm/chunk-HCV3NGLS.mjs.map +1 -0
- package/dist/esm/{chunk-2BTTX2KO.mjs → chunk-HDTKBFRX.mjs} +2 -2
- package/dist/esm/chunk-HDTKBFRX.mjs.map +1 -0
- package/dist/esm/chunk-HGVZ7ULA.mjs +2 -0
- package/dist/esm/chunk-HGVZ7ULA.mjs.map +1 -0
- package/dist/esm/{chunk-6EMN3BOV.mjs → chunk-I2NMCLNW.mjs} +1 -1
- package/dist/esm/chunk-I2NMCLNW.mjs.map +1 -0
- package/dist/esm/chunk-IBLZ6MZU.mjs +2 -0
- package/dist/esm/chunk-IBLZ6MZU.mjs.map +1 -0
- package/dist/esm/chunk-IECDO22V.mjs +2 -0
- package/dist/esm/chunk-IECDO22V.mjs.map +1 -0
- package/dist/esm/{chunk-KUZ2YTJH.mjs → chunk-IFHQSZLK.mjs} +2 -2
- package/dist/esm/chunk-IFHQSZLK.mjs.map +1 -0
- package/dist/esm/{chunk-EXP5STXZ.mjs → chunk-J245N3XF.mjs} +1 -1
- package/dist/esm/chunk-J245N3XF.mjs.map +1 -0
- package/dist/esm/{chunk-7VKFXX5Q.mjs → chunk-JDYASF3E.mjs} +2 -2
- package/dist/esm/chunk-JDYASF3E.mjs.map +1 -0
- package/dist/esm/{chunk-H6YNXJNF.mjs → chunk-JGNMNCQB.mjs} +2 -2
- package/dist/esm/chunk-JGNMNCQB.mjs.map +1 -0
- package/dist/esm/{chunk-R76DHMGR.mjs → chunk-JNHFQTFC.mjs} +2 -2
- package/dist/esm/chunk-JNHFQTFC.mjs.map +1 -0
- package/dist/esm/{chunk-5PCNWXRN.mjs → chunk-JY3JJ55D.mjs} +2 -2
- package/dist/esm/chunk-JY3JJ55D.mjs.map +1 -0
- package/dist/esm/{chunk-3W2DHZXK.mjs → chunk-K6MZXKVV.mjs} +2 -2
- package/dist/esm/chunk-K6MZXKVV.mjs.map +1 -0
- package/dist/esm/{chunk-FVA2OPG4.mjs → chunk-KDMSOCZY.mjs} +1 -1
- package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-KFNDDPOW.mjs} +2 -2
- package/dist/esm/chunk-KFNDDPOW.mjs.map +1 -0
- package/dist/esm/{chunk-4TB3AWQE.mjs → chunk-KFSVKIFO.mjs} +2 -2
- package/dist/esm/chunk-KFSVKIFO.mjs.map +1 -0
- package/dist/esm/chunk-KIW54KWR.mjs +2 -0
- package/dist/esm/{chunk-OHRL766V.mjs → chunk-KM6UXNC7.mjs} +2 -2
- package/dist/esm/chunk-KM6UXNC7.mjs.map +1 -0
- package/dist/esm/{chunk-NWOMSL6K.mjs → chunk-KRVLR3L4.mjs} +2 -2
- package/dist/esm/chunk-KRVLR3L4.mjs.map +1 -0
- package/dist/esm/{chunk-4HR32TSY.mjs → chunk-KSKQVOBA.mjs} +2 -2
- package/dist/esm/chunk-KSKQVOBA.mjs.map +1 -0
- package/dist/esm/{chunk-ZROQH5YL.mjs → chunk-KSUZS6EL.mjs} +2 -2
- package/dist/esm/chunk-L5I7F3NZ.mjs +2 -0
- package/dist/esm/chunk-L5I7F3NZ.mjs.map +1 -0
- package/dist/esm/{chunk-MAMPMCO7.mjs → chunk-LD5MUWGW.mjs} +2 -2
- package/dist/esm/chunk-LD5MUWGW.mjs.map +1 -0
- package/dist/esm/{chunk-UAL27G6B.mjs → chunk-LEKBJ2EG.mjs} +1 -1
- package/dist/esm/chunk-LEKBJ2EG.mjs.map +1 -0
- package/dist/esm/chunk-LZS7BQ2B.mjs +2 -0
- package/dist/esm/chunk-LZS7BQ2B.mjs.map +1 -0
- package/dist/esm/{chunk-53RB2PRH.mjs → chunk-N3OYD6VZ.mjs} +2 -2
- package/dist/esm/chunk-N3OYD6VZ.mjs.map +1 -0
- package/dist/esm/{chunk-KEYAPEAX.mjs → chunk-N47FTRYO.mjs} +1 -1
- package/dist/esm/chunk-N47FTRYO.mjs.map +1 -0
- package/dist/esm/{chunk-YDZBU2DJ.mjs → chunk-NODYW7DM.mjs} +2 -2
- package/dist/esm/chunk-NODYW7DM.mjs.map +1 -0
- package/dist/esm/{chunk-HVMFZF6P.mjs → chunk-NV6DHDM3.mjs} +2 -2
- package/dist/esm/chunk-NV6DHDM3.mjs.map +1 -0
- package/dist/esm/{chunk-YU3IYJRL.mjs → chunk-OLPI7QAH.mjs} +2 -2
- package/dist/esm/chunk-OLPI7QAH.mjs.map +1 -0
- package/dist/esm/chunk-ONBFUPEC.mjs +2 -0
- package/dist/esm/chunk-ONBFUPEC.mjs.map +1 -0
- package/dist/esm/{chunk-A42BPAD4.mjs → chunk-OS2EG6AE.mjs} +2 -2
- package/dist/esm/chunk-OS2EG6AE.mjs.map +1 -0
- package/dist/esm/chunk-OTY3NO7Q.mjs +2 -0
- package/dist/esm/chunk-OTY3NO7Q.mjs.map +1 -0
- package/dist/esm/{chunk-MNVUSJEK.mjs → chunk-OV5UQ75K.mjs} +2 -2
- package/dist/esm/chunk-OV5UQ75K.mjs.map +1 -0
- package/dist/esm/{chunk-P5V7OZNN.mjs → chunk-OZN3OOJV.mjs} +2 -2
- package/dist/esm/chunk-OZN3OOJV.mjs.map +1 -0
- package/dist/esm/{chunk-WRRQ7L5K.mjs → chunk-PCLU4KLY.mjs} +2 -2
- package/dist/esm/chunk-PCLU4KLY.mjs.map +1 -0
- package/dist/esm/{chunk-Q3TAEOH5.mjs → chunk-PGZWRY7A.mjs} +2 -2
- package/dist/esm/chunk-PGZWRY7A.mjs.map +1 -0
- package/dist/esm/{chunk-X34JJPW5.mjs → chunk-PHG2IWZW.mjs} +2 -2
- package/dist/esm/chunk-PHG2IWZW.mjs.map +1 -0
- package/dist/esm/{chunk-LR65XHSF.mjs → chunk-PHP47DI4.mjs} +2 -2
- package/dist/esm/chunk-PHP47DI4.mjs.map +1 -0
- package/dist/esm/chunk-PRZ7AIGA.mjs +2 -0
- package/dist/esm/chunk-PRZ7AIGA.mjs.map +1 -0
- package/dist/esm/{chunk-6UZ3VI5Y.mjs → chunk-QBP4XJT5.mjs} +2 -2
- package/dist/esm/chunk-QBP4XJT5.mjs.map +1 -0
- package/dist/esm/{chunk-5VD4MHB3.mjs → chunk-QBWGWHJK.mjs} +2 -2
- package/dist/esm/chunk-QBWGWHJK.mjs.map +1 -0
- package/dist/esm/chunk-QQIVWB6G.mjs +2 -0
- package/dist/esm/chunk-QQIVWB6G.mjs.map +1 -0
- package/dist/esm/{chunk-367OG3DB.mjs → chunk-QRTZYRH2.mjs} +2 -2
- package/dist/esm/chunk-QRTZYRH2.mjs.map +1 -0
- package/dist/esm/{chunk-2F7Z7RMW.mjs → chunk-R3Y6WH2U.mjs} +2 -2
- package/dist/esm/chunk-R3Y6WH2U.mjs.map +1 -0
- package/dist/esm/{chunk-S2W4D6NZ.mjs → chunk-RAXP3STS.mjs} +2 -2
- package/dist/esm/chunk-RAXP3STS.mjs.map +1 -0
- package/dist/esm/{chunk-F3M2UQA4.mjs → chunk-RNAKZVRN.mjs} +2 -2
- package/dist/esm/chunk-RNAKZVRN.mjs.map +1 -0
- package/dist/esm/{chunk-TQWGQLM6.mjs → chunk-RUDS7RSB.mjs} +2 -2
- package/dist/esm/chunk-RUDS7RSB.mjs.map +1 -0
- package/dist/esm/{chunk-GMBSQDPO.mjs → chunk-S3FVA55H.mjs} +2 -2
- package/dist/esm/chunk-S3FVA55H.mjs.map +1 -0
- package/dist/esm/{chunk-BSAHPS6E.mjs → chunk-TIZL5YVP.mjs} +2 -2
- package/dist/esm/chunk-TIZL5YVP.mjs.map +1 -0
- package/dist/esm/{chunk-SDWE6WMM.mjs → chunk-TRU3EK64.mjs} +2 -2
- package/dist/esm/chunk-TRU3EK64.mjs.map +1 -0
- package/dist/esm/chunk-UI3AKMZX.mjs +2 -0
- package/dist/esm/{chunk-UAEODDZS.mjs.map → chunk-UI3AKMZX.mjs.map} +1 -1
- package/dist/esm/{chunk-ADE6MVXC.mjs → chunk-UKAXCARD.mjs} +2 -2
- package/dist/esm/chunk-UKAXCARD.mjs.map +1 -0
- package/dist/esm/{chunk-NMD45OTM.mjs → chunk-V5NDNR36.mjs} +2 -2
- package/dist/esm/chunk-V5NDNR36.mjs.map +1 -0
- package/dist/esm/{chunk-O2BPA6TS.mjs → chunk-VQTEGTUQ.mjs} +2 -2
- package/dist/esm/chunk-VQTEGTUQ.mjs.map +1 -0
- package/dist/esm/{chunk-45IUUCAV.mjs → chunk-WIXNX7HY.mjs} +2 -2
- package/dist/esm/chunk-WIXNX7HY.mjs.map +1 -0
- package/dist/esm/{chunk-CRA2MFJC.mjs → chunk-WOOH5MMX.mjs} +2 -2
- package/dist/esm/chunk-WOOH5MMX.mjs.map +1 -0
- package/dist/esm/{chunk-GWSDIX6C.mjs → chunk-WSVOJSAC.mjs} +2 -2
- package/dist/esm/chunk-WSVOJSAC.mjs.map +1 -0
- package/dist/esm/{chunk-IR4SLC2M.mjs → chunk-WUCPTRXU.mjs} +2 -2
- package/dist/esm/chunk-WUCPTRXU.mjs.map +1 -0
- package/dist/esm/chunk-XHCALZ7X.mjs +2 -0
- package/dist/esm/chunk-XHCALZ7X.mjs.map +1 -0
- package/dist/esm/{chunk-WJRZWAIS.mjs → chunk-XIY2VORC.mjs} +2 -2
- package/dist/esm/chunk-XIY2VORC.mjs.map +1 -0
- package/dist/esm/chunk-XOCRDV2V.mjs +2 -0
- package/dist/esm/chunk-XOCRDV2V.mjs.map +1 -0
- package/dist/esm/{chunk-D3Q4BC3I.mjs → chunk-Z36WHOZV.mjs} +2 -2
- package/dist/esm/chunk-Z36WHOZV.mjs.map +1 -0
- package/dist/esm/{chunk-BOYYQAB4.mjs → chunk-ZINOJTLU.mjs} +2 -2
- package/dist/esm/chunk-ZINOJTLU.mjs.map +1 -0
- package/dist/esm/{chunk-RXE6NNOL.mjs → chunk-ZS3EWM5A.mjs} +2 -2
- package/dist/esm/chunk-ZS3EWM5A.mjs.map +1 -0
- package/dist/esm/{chunk-GDUAFXIQ.mjs → chunk-ZUTOMGB7.mjs} +2 -2
- package/dist/esm/chunk-ZUTOMGB7.mjs.map +1 -0
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +26 -10
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +104 -123
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.d.mts +21 -6
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +34 -6
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +63 -6
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/types.d.mts +21 -8
- package/dist/esm/client/types.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +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.d.mts +63 -48
- 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.d.mts +6 -0
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +77 -26
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +36 -14
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -14
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.d.mts +9 -6
- package/dist/esm/core/crypto/hdKey.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/keyless.d.mts +126 -45
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +45 -6
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +58 -7
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.d.mts +35 -5
- package/dist/esm/core/crypto/poseidon.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +10 -6
- package/dist/esm/core/crypto/proof.d.mts +2 -6
- package/dist/esm/core/crypto/proof.mjs +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 +72 -27
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +5 -4
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +63 -5
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.d.mts +27 -28
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/index.d.mts +1 -1
- 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 +191 -12
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +206 -14
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +13 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +330 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +39 -0
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +14 -0
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +48 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +46 -0
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +38 -2
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +21 -0
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +26 -0
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +33 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +107 -5
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +72 -29
- 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/publicKey-_tPa99ea.d.mts +151 -0
- package/dist/esm/transactions/authenticator/account.d.mts +66 -17
- 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 +53 -20
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +20 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +21 -3
- 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.d.mts +22 -8
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +24 -8
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +31 -4
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +25 -3
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +29 -7
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +23 -8
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +23 -0
- package/dist/esm/transactions/instances/transactionPayload.d.mts +72 -26
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +37 -11
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/asyncQueue.d.mts +22 -19
- package/dist/esm/transactions/management/asyncQueue.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 +67 -36
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +74 -4
- 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 +45 -23
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +20 -15
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +101 -30
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +244 -3
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +31 -2
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +82 -34
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/index.d.mts +320 -59
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +65 -2
- package/dist/esm/types/keyless.d.mts +18 -0
- package/dist/esm/utils/apiEndpoints.d.mts +3 -0
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/const.d.mts +2 -4
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +25 -10
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/memoize.d.mts +12 -10
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +11 -5
- 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 +23 -22
- package/src/account/AbstractKeylessAccount.ts +7 -5
- package/src/account/Account.ts +88 -54
- package/src/account/Ed25519Account.ts +56 -21
- package/src/account/EphemeralKeyPair.ts +50 -15
- package/src/account/FederatedKeylessAccount.ts +4 -3
- package/src/account/KeylessAccount.ts +46 -3
- package/src/account/MultiKeyAccount.ts +56 -35
- package/src/account/SingleKeyAccount.ts +60 -28
- package/src/api/account.ts +443 -159
- package/src/api/ans.ts +367 -120
- package/src/api/aptos.ts +38 -5
- package/src/api/aptosConfig.ts +102 -14
- package/src/api/coin.ts +49 -12
- package/src/api/digitalAsset.ts +707 -296
- package/src/api/event.ts +128 -25
- package/src/api/faucet.ts +44 -7
- package/src/api/fungibleAsset.ts +149 -46
- package/src/api/general.ts +168 -52
- package/src/api/keyless.ts +117 -21
- package/src/api/object.ts +49 -5
- package/src/api/staking.ts +84 -15
- package/src/api/table.ts +117 -37
- package/src/api/transaction.ts +438 -107
- package/src/api/transactionSubmission/build.ts +98 -12
- package/src/api/transactionSubmission/helpers.ts +79 -0
- package/src/api/transactionSubmission/management.ts +110 -10
- package/src/api/transactionSubmission/sign.ts +96 -2
- package/src/api/transactionSubmission/simulate.ts +139 -14
- package/src/api/transactionSubmission/submit.ts +103 -12
- package/src/api/utils.ts +26 -3
- package/src/bcs/deserializer.ts +82 -32
- package/src/bcs/serializable/entryFunctionBytes.ts +27 -6
- package/src/bcs/serializable/fixedBytes.ts +55 -25
- package/src/bcs/serializable/movePrimitives.ts +91 -0
- package/src/bcs/serializable/moveStructs.ts +123 -35
- package/src/bcs/serializer.ts +131 -84
- package/src/cli/localNode.ts +46 -17
- package/src/cli/move.ts +119 -136
- package/src/client/core.ts +23 -8
- package/src/client/get.ts +34 -6
- package/src/client/post.ts +63 -6
- package/src/client/types.ts +40 -13
- package/src/core/account/utils/address.ts +1 -1
- package/src/core/accountAddress.ts +63 -50
- package/src/core/authenticationKey.ts +47 -20
- package/src/core/common.ts +6 -0
- package/src/core/crypto/ed25519.ts +76 -25
- package/src/core/crypto/ephemeral.ts +37 -21
- package/src/core/crypto/federatedKeyless.ts +1 -20
- package/src/core/crypto/hdKey.ts +10 -7
- package/src/core/crypto/keyless.ts +140 -63
- package/src/core/crypto/multiEd25519.ts +44 -5
- package/src/core/crypto/multiKey.ts +66 -19
- package/src/core/crypto/poseidon.ts +72 -5
- package/src/core/crypto/privateKey.ts +9 -5
- package/src/core/crypto/proof.ts +3 -12
- package/src/core/crypto/publicKey.ts +15 -5
- package/src/core/crypto/secp256k1.ts +76 -26
- package/src/core/crypto/signature.ts +7 -4
- package/src/core/crypto/singleKey.ts +62 -5
- package/src/core/hex.ts +27 -28
- package/src/internal/account.ts +248 -12
- package/src/internal/ans.ts +219 -15
- package/src/internal/coin.ts +12 -0
- package/src/internal/digitalAsset.ts +344 -3
- package/src/internal/event.ts +51 -0
- package/src/internal/faucet.ts +14 -0
- package/src/internal/fungibleAsset.ts +46 -0
- package/src/internal/general.ts +46 -0
- package/src/internal/keyless.ts +37 -1
- package/src/internal/object.ts +21 -0
- package/src/internal/queries/getTableItemsData.graphql +1 -1
- package/src/internal/queries/getTableItemsMetadata.graphql +1 -1
- package/src/internal/staking.ts +27 -1
- package/src/internal/table.ts +32 -0
- package/src/internal/transaction.ts +120 -7
- package/src/internal/transactionSubmission.ts +86 -30
- package/src/transactions/authenticator/account.ts +65 -16
- package/src/transactions/authenticator/transaction.ts +52 -19
- package/src/transactions/instances/chainId.ts +20 -1
- package/src/transactions/instances/identifier.ts +21 -3
- package/src/transactions/instances/moduleId.ts +22 -8
- package/src/transactions/instances/multiAgentTransaction.ts +26 -10
- package/src/transactions/instances/rawTransaction.ts +31 -4
- package/src/transactions/instances/rotationProofChallenge.ts +24 -2
- package/src/transactions/instances/signedTransaction.ts +28 -6
- package/src/transactions/instances/simpleTransaction.ts +26 -11
- package/src/transactions/instances/transactionArgument.ts +26 -0
- package/src/transactions/instances/transactionPayload.ts +73 -26
- package/src/transactions/management/accountSequenceNumber.ts +38 -11
- package/src/transactions/management/asyncQueue.ts +22 -19
- package/src/transactions/management/transactionWorker.ts +66 -40
- package/src/transactions/transactionBuilder/helpers.ts +130 -3
- package/src/transactions/transactionBuilder/remoteAbi.ts +71 -30
- package/src/transactions/transactionBuilder/signingMessage.ts +19 -14
- package/src/transactions/transactionBuilder/transactionBuilder.ts +166 -42
- package/src/transactions/typeTag/index.ts +264 -3
- package/src/transactions/typeTag/parser.ts +54 -20
- package/src/transactions/types.ts +81 -33
- package/src/types/index.ts +338 -61
- package/src/types/indexer.ts +82 -2
- package/src/types/keyless.ts +21 -0
- package/src/utils/apiEndpoints.ts +3 -0
- package/src/utils/const.ts +2 -4
- package/src/utils/helpers.ts +25 -10
- package/src/utils/memoize.ts +12 -10
- package/src/utils/normalizeBundle.ts +11 -5
- package/src/version.ts +1 -1
- package/dist/common/chunk-HBPH2AD3.js.map +0 -1
- package/dist/esm/Ed25519Account-B1VMJOY2.d.mts +0 -361
- package/dist/esm/chunk-2BTTX2KO.mjs.map +0 -1
- package/dist/esm/chunk-2F7Z7RMW.mjs.map +0 -1
- package/dist/esm/chunk-367OG3DB.mjs.map +0 -1
- package/dist/esm/chunk-3W2DHZXK.mjs.map +0 -1
- package/dist/esm/chunk-44GYWUSH.mjs.map +0 -1
- package/dist/esm/chunk-45IUUCAV.mjs.map +0 -1
- package/dist/esm/chunk-4HR32TSY.mjs.map +0 -1
- package/dist/esm/chunk-4TB3AWQE.mjs.map +0 -1
- package/dist/esm/chunk-53RB2PRH.mjs.map +0 -1
- package/dist/esm/chunk-5PCNWXRN.mjs.map +0 -1
- package/dist/esm/chunk-5VD4MHB3.mjs.map +0 -1
- package/dist/esm/chunk-6EMN3BOV.mjs.map +0 -1
- package/dist/esm/chunk-6UZ3VI5Y.mjs.map +0 -1
- package/dist/esm/chunk-76OH2Z4Q.mjs +0 -2
- package/dist/esm/chunk-76OH2Z4Q.mjs.map +0 -1
- package/dist/esm/chunk-7VKFXX5Q.mjs.map +0 -1
- package/dist/esm/chunk-A42BPAD4.mjs.map +0 -1
- package/dist/esm/chunk-A63SMUOU.mjs +0 -2
- package/dist/esm/chunk-A63SMUOU.mjs.map +0 -1
- package/dist/esm/chunk-ADE6MVXC.mjs.map +0 -1
- package/dist/esm/chunk-AH44UPM4.mjs.map +0 -1
- package/dist/esm/chunk-APN6AV5Q.mjs.map +0 -1
- package/dist/esm/chunk-B5NYEWNM.mjs +0 -2
- package/dist/esm/chunk-B5NYEWNM.mjs.map +0 -1
- package/dist/esm/chunk-BA4RBST6.mjs +0 -2
- package/dist/esm/chunk-BA4RBST6.mjs.map +0 -1
- package/dist/esm/chunk-BCUSI3N6.mjs.map +0 -1
- package/dist/esm/chunk-BOYYQAB4.mjs.map +0 -1
- package/dist/esm/chunk-BSAHPS6E.mjs.map +0 -1
- package/dist/esm/chunk-BSUYPXRD.mjs +0 -2
- package/dist/esm/chunk-BSUYPXRD.mjs.map +0 -1
- package/dist/esm/chunk-BWNTSJOC.mjs +0 -2
- package/dist/esm/chunk-BWNTSJOC.mjs.map +0 -1
- package/dist/esm/chunk-CB6H4VMZ.mjs +0 -2
- package/dist/esm/chunk-CB6H4VMZ.mjs.map +0 -1
- package/dist/esm/chunk-CRA2MFJC.mjs.map +0 -1
- package/dist/esm/chunk-D3Q4BC3I.mjs.map +0 -1
- package/dist/esm/chunk-E4O26ZJB.mjs +0 -2
- package/dist/esm/chunk-E4O26ZJB.mjs.map +0 -1
- package/dist/esm/chunk-ELYS7CWV.mjs.map +0 -1
- package/dist/esm/chunk-EXP5STXZ.mjs.map +0 -1
- package/dist/esm/chunk-F3M2UQA4.mjs.map +0 -1
- package/dist/esm/chunk-F63E4CR7.mjs +0 -2
- package/dist/esm/chunk-F63E4CR7.mjs.map +0 -1
- package/dist/esm/chunk-F76N4MQO.mjs.map +0 -1
- package/dist/esm/chunk-FZ5EYP3D.mjs.map +0 -1
- package/dist/esm/chunk-G5MGSV7Y.mjs +0 -2
- package/dist/esm/chunk-G5MGSV7Y.mjs.map +0 -1
- package/dist/esm/chunk-G5XLMQ5E.mjs +0 -2
- package/dist/esm/chunk-G5XLMQ5E.mjs.map +0 -1
- package/dist/esm/chunk-GDO6Q2FI.mjs +0 -2
- package/dist/esm/chunk-GDO6Q2FI.mjs.map +0 -1
- package/dist/esm/chunk-GDUAFXIQ.mjs.map +0 -1
- package/dist/esm/chunk-GMBSQDPO.mjs.map +0 -1
- package/dist/esm/chunk-GWSDIX6C.mjs.map +0 -1
- package/dist/esm/chunk-H6YNXJNF.mjs.map +0 -1
- package/dist/esm/chunk-HAT5S2XX.mjs +0 -2
- package/dist/esm/chunk-HAT5S2XX.mjs.map +0 -1
- package/dist/esm/chunk-HHGJXVAE.mjs +0 -2
- package/dist/esm/chunk-HHGJXVAE.mjs.map +0 -1
- package/dist/esm/chunk-HKBBA653.mjs.map +0 -1
- package/dist/esm/chunk-HVMFZF6P.mjs.map +0 -1
- package/dist/esm/chunk-IR4SLC2M.mjs.map +0 -1
- package/dist/esm/chunk-J64ARI4E.mjs.map +0 -1
- package/dist/esm/chunk-JH6VLTMS.mjs.map +0 -1
- package/dist/esm/chunk-KEYAPEAX.mjs.map +0 -1
- package/dist/esm/chunk-KUOB4DDE.mjs.map +0 -1
- package/dist/esm/chunk-KUZ2YTJH.mjs.map +0 -1
- package/dist/esm/chunk-L2QXU6F4.mjs.map +0 -1
- package/dist/esm/chunk-LG7RJQ57.mjs.map +0 -1
- package/dist/esm/chunk-LNEZEYYE.mjs +0 -2
- package/dist/esm/chunk-LNEZEYYE.mjs.map +0 -1
- package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
- package/dist/esm/chunk-MAMPMCO7.mjs.map +0 -1
- package/dist/esm/chunk-MDJ66AA3.mjs +0 -2
- package/dist/esm/chunk-MDJ66AA3.mjs.map +0 -1
- package/dist/esm/chunk-MLDQ2TY2.mjs +0 -2
- package/dist/esm/chunk-MLDQ2TY2.mjs.map +0 -1
- package/dist/esm/chunk-MNVUSJEK.mjs.map +0 -1
- package/dist/esm/chunk-MQGW234H.mjs +0 -2
- package/dist/esm/chunk-MQGW234H.mjs.map +0 -1
- package/dist/esm/chunk-NMD45OTM.mjs.map +0 -1
- package/dist/esm/chunk-NWOMSL6K.mjs.map +0 -1
- package/dist/esm/chunk-O2BPA6TS.mjs.map +0 -1
- package/dist/esm/chunk-OHRL766V.mjs.map +0 -1
- package/dist/esm/chunk-OKAQO57B.mjs.map +0 -1
- package/dist/esm/chunk-OMV7445F.mjs.map +0 -1
- package/dist/esm/chunk-P2EIZ7WL.mjs.map +0 -1
- package/dist/esm/chunk-P3TAY5PP.mjs.map +0 -1
- package/dist/esm/chunk-P5V7OZNN.mjs.map +0 -1
- package/dist/esm/chunk-Q3TAEOH5.mjs.map +0 -1
- package/dist/esm/chunk-Q4XR6QOZ.mjs +0 -2
- package/dist/esm/chunk-QBSU3L5Q.mjs.map +0 -1
- package/dist/esm/chunk-QPB6EJVM.mjs.map +0 -1
- package/dist/esm/chunk-R76DHMGR.mjs.map +0 -1
- package/dist/esm/chunk-RXE6NNOL.mjs.map +0 -1
- package/dist/esm/chunk-S2KDCIZN.mjs.map +0 -1
- package/dist/esm/chunk-S2W4D6NZ.mjs.map +0 -1
- package/dist/esm/chunk-SDWE6WMM.mjs.map +0 -1
- package/dist/esm/chunk-SRPI2FFA.mjs.map +0 -1
- package/dist/esm/chunk-STUXKQVZ.mjs +0 -2
- package/dist/esm/chunk-STUXKQVZ.mjs.map +0 -1
- package/dist/esm/chunk-SUJLWCRN.mjs +0 -2
- package/dist/esm/chunk-SUJLWCRN.mjs.map +0 -1
- package/dist/esm/chunk-SWNFKKRE.mjs.map +0 -1
- package/dist/esm/chunk-TDGQGILY.mjs.map +0 -1
- package/dist/esm/chunk-TQWGQLM6.mjs.map +0 -1
- package/dist/esm/chunk-U6Z4FNB7.mjs.map +0 -1
- package/dist/esm/chunk-UAEODDZS.mjs +0 -2
- package/dist/esm/chunk-UAL27G6B.mjs.map +0 -1
- package/dist/esm/chunk-WJRZWAIS.mjs.map +0 -1
- package/dist/esm/chunk-WRRQ7L5K.mjs.map +0 -1
- package/dist/esm/chunk-X34JJPW5.mjs.map +0 -1
- package/dist/esm/chunk-XMW65WCQ.mjs +0 -2
- package/dist/esm/chunk-XMW65WCQ.mjs.map +0 -1
- package/dist/esm/chunk-Y2GWUE7C.mjs.map +0 -1
- package/dist/esm/chunk-Y3BATGHX.mjs +0 -2
- package/dist/esm/chunk-Y3BATGHX.mjs.map +0 -1
- package/dist/esm/chunk-YDZBU2DJ.mjs.map +0 -1
- package/dist/esm/chunk-YPHH6CAO.mjs +0 -2
- package/dist/esm/chunk-YPHH6CAO.mjs.map +0 -1
- package/dist/esm/chunk-YU3IYJRL.mjs.map +0 -1
- package/dist/esm/chunk-YUNDX5I7.mjs.map +0 -1
- package/dist/esm/publicKey-B3XRNhHO.d.mts +0 -113
- /package/dist/esm/{chunk-FVA2OPG4.mjs.map → chunk-KDMSOCZY.mjs.map} +0 -0
- /package/dist/esm/{chunk-Q4XR6QOZ.mjs.map → chunk-KIW54KWR.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZROQH5YL.mjs.map → chunk-KSUZS6EL.mjs.map} +0 -0
package/src/api/digitalAsset.ts
CHANGED
|
@@ -54,25 +54,63 @@ import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
|
|
|
54
54
|
* A class to query all `DigitalAsset` related queries on Aptos.
|
|
55
55
|
*/
|
|
56
56
|
export class DigitalAsset {
|
|
57
|
+
/**
|
|
58
|
+
* Initializes a new instance of the Aptos client with the specified configuration.
|
|
59
|
+
* This allows you to interact with the Aptos blockchain using the provided settings.
|
|
60
|
+
*
|
|
61
|
+
* @param config - The configuration settings for the Aptos client.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
66
|
+
*
|
|
67
|
+
* async function runExample() {
|
|
68
|
+
* // Create a configuration for the Aptos client
|
|
69
|
+
* const config = new AptosConfig({ network: Network.TESTNET }); // Specify your desired network
|
|
70
|
+
*
|
|
71
|
+
* // Initialize the Aptos client with the configuration
|
|
72
|
+
* const aptos = new Aptos(config);
|
|
73
|
+
*
|
|
74
|
+
* console.log("Aptos client initialized:", aptos);
|
|
75
|
+
* }
|
|
76
|
+
* runExample().catch(console.error);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
57
79
|
constructor(readonly config: AptosConfig) {}
|
|
58
80
|
|
|
59
81
|
/**
|
|
60
|
-
* @deprecated use getCollectionDataByCreatorAddressAndCollectionName - this function
|
|
61
|
-
* will be removed in the next major release
|
|
62
|
-
*
|
|
63
82
|
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
83
|
+
* This function is deprecated; use `getCollectionDataByCreatorAddressAndCollectionName` instead.
|
|
64
84
|
*
|
|
65
|
-
* If
|
|
66
|
-
*
|
|
85
|
+
* If a creator account has two collections with the same name in v1 and v2, you can pass an optional `tokenStandard` parameter
|
|
86
|
+
* to query a specific standard.
|
|
67
87
|
*
|
|
68
|
-
* @
|
|
69
|
-
*
|
|
88
|
+
* @param args - The arguments for querying the collection data.
|
|
89
|
+
* @param args.creatorAddress - The address of the collection's creator.
|
|
90
|
+
* @param args.collectionName - The name of the collection.
|
|
91
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
92
|
+
* @param args.options - Optional parameters for the query.
|
|
93
|
+
* @param args.options.tokenStandard - The token standard to query.
|
|
94
|
+
* @returns GetCollectionDataResponse - The response type containing the collection data.
|
|
70
95
|
*
|
|
71
|
-
* @
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
99
|
+
*
|
|
100
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
101
|
+
* const aptos = new Aptos(config);
|
|
102
|
+
*
|
|
103
|
+
* async function runExample() {
|
|
104
|
+
* // Querying collection data by creator address and collection name
|
|
105
|
+
* const collection = await aptos.getCollectionData({
|
|
106
|
+
* creatorAddress: "0x1", // replace with a real creator address
|
|
107
|
+
* collectionName: "myCollection", // specify your collection name
|
|
108
|
+
* });
|
|
109
|
+
*
|
|
110
|
+
* console.log(collection);
|
|
111
|
+
* }
|
|
112
|
+
* runExample().catch(console.error);
|
|
113
|
+
* ```
|
|
76
114
|
*/
|
|
77
115
|
async getCollectionData(args: {
|
|
78
116
|
creatorAddress: AccountAddressInput;
|
|
@@ -102,21 +140,35 @@ export class DigitalAsset {
|
|
|
102
140
|
|
|
103
141
|
/**
|
|
104
142
|
* Queries data of a specific collection by the collection creator address and the collection name.
|
|
143
|
+
* If a creator account has multiple collections with the same name across different versions,
|
|
144
|
+
* specify the `tokenStandard` parameter to query a specific standard.
|
|
105
145
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
146
|
+
* @param args.creatorAddress - The address of the collection's creator.
|
|
147
|
+
* @param args.collectionName - The name of the collection.
|
|
148
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
149
|
+
* @param args.options.tokenStandard - Optional token standard to query.
|
|
150
|
+
* @returns GetCollectionDataResponse - The response type containing collection data.
|
|
108
151
|
*
|
|
109
152
|
* @example
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* })
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
153
|
+
* ```typescript
|
|
154
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
155
|
+
*
|
|
156
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
157
|
+
* const aptos = new Aptos(config);
|
|
158
|
+
*
|
|
159
|
+
* async function runExample() {
|
|
160
|
+
* // Fetching collection data by creator address and collection name
|
|
161
|
+
* const collection = await aptos.getCollectionDataByCreatorAddressAndCollectionName({
|
|
162
|
+
* creatorAddress: "0x1", // replace with a real creator address
|
|
163
|
+
* collectionName: "myCollection",
|
|
164
|
+
* minimumLedgerVersion: 1, // optional, specify if needed
|
|
165
|
+
* options: { tokenStandard: "v2" } // optional, specify if needed
|
|
166
|
+
* });
|
|
167
|
+
*
|
|
168
|
+
* console.log(collection);
|
|
169
|
+
* }
|
|
170
|
+
* runExample().catch(console.error);
|
|
171
|
+
* ```
|
|
120
172
|
*/
|
|
121
173
|
async getCollectionDataByCreatorAddressAndCollectionName(args: {
|
|
122
174
|
creatorAddress: AccountAddressInput;
|
|
@@ -134,19 +186,37 @@ export class DigitalAsset {
|
|
|
134
186
|
}
|
|
135
187
|
|
|
136
188
|
/**
|
|
137
|
-
*
|
|
189
|
+
* Retrieves data for a specific collection created by a given creator address.
|
|
190
|
+
* This function allows you to query collection data while optionally specifying a minimum ledger version and pagination options.
|
|
138
191
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
192
|
+
* @param args.creatorAddress - The address of the collection's creator.
|
|
193
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
194
|
+
* @param args.options.tokenStandard - Optional token standard to query.
|
|
195
|
+
* @param args.options.pagination - Optional pagination arguments.
|
|
196
|
+
* @returns GetCollectionDataResponse - The response type containing collection data.
|
|
141
197
|
*
|
|
142
198
|
* @example
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
199
|
+
* ```typescript
|
|
200
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
201
|
+
*
|
|
202
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
203
|
+
* const aptos = new Aptos(config);
|
|
204
|
+
*
|
|
205
|
+
* async function runExample() {
|
|
206
|
+
* // Retrieve collection data by creator address
|
|
207
|
+
* const collectionData = await aptos.getCollectionDataByCreatorAddress({
|
|
208
|
+
* creatorAddress: "0x1", // replace with a real creator address
|
|
209
|
+
* minimumLedgerVersion: 1, // specify the minimum ledger version if needed
|
|
210
|
+
* options: {
|
|
211
|
+
* tokenStandard: "v2", // specify the token standard if needed
|
|
212
|
+
* pagination: { limit: 10, offset: 0 } // specify pagination options if needed
|
|
213
|
+
* }
|
|
214
|
+
* });
|
|
215
|
+
*
|
|
216
|
+
* console.log(collectionData);
|
|
217
|
+
* }
|
|
218
|
+
* runExample().catch(console.error);
|
|
219
|
+
* ```
|
|
150
220
|
*/
|
|
151
221
|
async getCollectionDataByCreatorAddress(args: {
|
|
152
222
|
creatorAddress: AccountAddressInput;
|
|
@@ -165,12 +235,28 @@ export class DigitalAsset {
|
|
|
165
235
|
/**
|
|
166
236
|
* Queries data of a specific collection by the collection ID.
|
|
167
237
|
*
|
|
168
|
-
* @
|
|
169
|
-
*
|
|
238
|
+
* @param args.collectionId - The ID of the collection, which is the same as the address of the collection object.
|
|
239
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
240
|
+
* @param args.options - Optional parameters for token standard and pagination.
|
|
241
|
+
* @returns GetCollectionDataResponse - The response type containing the collection data.
|
|
170
242
|
*
|
|
171
|
-
* @
|
|
172
|
-
*
|
|
173
|
-
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
246
|
+
*
|
|
247
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
248
|
+
* const aptos = new Aptos(config);
|
|
249
|
+
*
|
|
250
|
+
* async function runExample() {
|
|
251
|
+
* // Fetching collection data by collection ID
|
|
252
|
+
* const collection = await aptos.getCollectionDataByCollectionId({
|
|
253
|
+
* collectionId: "0x123", // replace with a real collection ID
|
|
254
|
+
* });
|
|
255
|
+
*
|
|
256
|
+
* console.log(collection);
|
|
257
|
+
* }
|
|
258
|
+
* runExample().catch(console.error);
|
|
259
|
+
* ```
|
|
174
260
|
*/
|
|
175
261
|
async getCollectionDataByCollectionId(args: {
|
|
176
262
|
collectionId: AccountAddressInput;
|
|
@@ -186,19 +272,33 @@ export class DigitalAsset {
|
|
|
186
272
|
}
|
|
187
273
|
|
|
188
274
|
/**
|
|
189
|
-
* Queries a collection
|
|
275
|
+
* Queries the ID of a specified collection.
|
|
276
|
+
* This ID corresponds to the collection's object address in V2, while V1 does not utilize objects and lacks an address.
|
|
190
277
|
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
278
|
+
* @param args.creatorAddress - The address of the collection's creator.
|
|
279
|
+
* @param args.collectionName - The name of the collection.
|
|
280
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
281
|
+
* @param args.options.tokenStandard - The token standard to query.
|
|
282
|
+
* @returns The collection ID.
|
|
193
283
|
*
|
|
194
284
|
* @example
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
285
|
+
* ```typescript
|
|
286
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
287
|
+
*
|
|
288
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
289
|
+
* const aptos = new Aptos(config);
|
|
290
|
+
*
|
|
291
|
+
* async function runExample() {
|
|
292
|
+
* // Fetching the collection ID for a specific creator and collection name
|
|
293
|
+
* const collectionId = await aptos.getCollectionId({
|
|
294
|
+
* creatorAddress: "0x1", // replace with a real creator address
|
|
295
|
+
* collectionName: "myCollection"
|
|
296
|
+
* });
|
|
297
|
+
*
|
|
298
|
+
* console.log("Collection ID:", collectionId);
|
|
299
|
+
* }
|
|
300
|
+
* runExample().catch(console.error);
|
|
301
|
+
* ```
|
|
202
302
|
*/
|
|
203
303
|
async getCollectionId(args: {
|
|
204
304
|
creatorAddress: AccountAddressInput;
|
|
@@ -215,14 +315,30 @@ export class DigitalAsset {
|
|
|
215
315
|
}
|
|
216
316
|
|
|
217
317
|
/**
|
|
218
|
-
*
|
|
318
|
+
* Retrieves digital asset data using the address of a digital asset.
|
|
219
319
|
*
|
|
220
|
-
* @
|
|
221
|
-
*
|
|
320
|
+
* @param args - The parameters for the request.
|
|
321
|
+
* @param args.digitalAssetAddress - The address of the digital asset.
|
|
322
|
+
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
323
|
+
* @returns GetTokenDataResponse containing relevant data for the digital asset.
|
|
222
324
|
*
|
|
223
|
-
* @
|
|
224
|
-
*
|
|
225
|
-
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```typescript
|
|
327
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
328
|
+
*
|
|
329
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
330
|
+
* const aptos = new Aptos(config);
|
|
331
|
+
*
|
|
332
|
+
* async function runExample() {
|
|
333
|
+
* // Fetching digital asset data for a specific address
|
|
334
|
+
* const digitalAsset = await aptos.getDigitalAssetData({
|
|
335
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
336
|
+
* });
|
|
337
|
+
*
|
|
338
|
+
* console.log(digitalAsset);
|
|
339
|
+
* }
|
|
340
|
+
* runExample().catch(console.error);
|
|
341
|
+
* ```
|
|
226
342
|
*/
|
|
227
343
|
async getDigitalAssetData(args: {
|
|
228
344
|
digitalAssetAddress: AccountAddressInput;
|
|
@@ -237,15 +353,31 @@ export class DigitalAsset {
|
|
|
237
353
|
}
|
|
238
354
|
|
|
239
355
|
/**
|
|
240
|
-
*
|
|
356
|
+
* Retrieves the current ownership data of a specified digital asset using its address.
|
|
241
357
|
*
|
|
242
|
-
* @
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* @param args.tokenAddress The address of the digital asset
|
|
246
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
358
|
+
* @param args The parameters for the request.
|
|
359
|
+
* @param args.digitalAssetAddress The address of the digital asset.
|
|
360
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.
|
|
247
361
|
*
|
|
248
362
|
* @returns GetCurrentTokenOwnershipResponse containing relevant ownership data of the digital asset.
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* ```typescript
|
|
366
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
367
|
+
*
|
|
368
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
369
|
+
* const aptos = new Aptos(config);
|
|
370
|
+
*
|
|
371
|
+
* async function runExample() {
|
|
372
|
+
* // Getting the current ownership of a digital asset
|
|
373
|
+
* const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({
|
|
374
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
375
|
+
* });
|
|
376
|
+
*
|
|
377
|
+
* console.log(digitalAssetOwner);
|
|
378
|
+
* }
|
|
379
|
+
* runExample().catch(console.error);
|
|
380
|
+
* ```
|
|
249
381
|
*/
|
|
250
382
|
async getCurrentDigitalAssetOwnership(args: {
|
|
251
383
|
digitalAssetAddress: AccountAddressInput;
|
|
@@ -260,15 +392,31 @@ export class DigitalAsset {
|
|
|
260
392
|
}
|
|
261
393
|
|
|
262
394
|
/**
|
|
263
|
-
*
|
|
395
|
+
* Retrieves the digital assets owned by a specified address.
|
|
264
396
|
*
|
|
265
|
-
* @
|
|
266
|
-
*
|
|
397
|
+
* @param args.ownerAddress The address of the owner.
|
|
398
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.
|
|
399
|
+
* @param args.options Optional pagination and ordering parameters for the response.
|
|
267
400
|
*
|
|
268
|
-
* @
|
|
269
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
401
|
+
* @returns GetOwnedTokensResponse containing ownership data of the digital assets belonging to the ownerAddress.
|
|
270
402
|
*
|
|
271
|
-
* @
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
406
|
+
*
|
|
407
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
408
|
+
* const aptos = new Aptos(config);
|
|
409
|
+
*
|
|
410
|
+
* async function runExample() {
|
|
411
|
+
* // Fetching the digital assets owned by the specified address
|
|
412
|
+
* const digitalAssets = await aptos.getOwnedDigitalAssets({
|
|
413
|
+
* ownerAddress: "0x1", // replace with a real account address
|
|
414
|
+
* });
|
|
415
|
+
*
|
|
416
|
+
* console.log(digitalAssets);
|
|
417
|
+
* }
|
|
418
|
+
* runExample().catch(console.error);
|
|
419
|
+
* ```
|
|
272
420
|
*/
|
|
273
421
|
async getOwnedDigitalAssets(args: {
|
|
274
422
|
ownerAddress: AccountAddressInput;
|
|
@@ -284,15 +432,32 @@ export class DigitalAsset {
|
|
|
284
432
|
}
|
|
285
433
|
|
|
286
434
|
/**
|
|
287
|
-
*
|
|
435
|
+
* Retrieves the activity data for a specified digital asset using its address.
|
|
288
436
|
*
|
|
289
|
-
* @
|
|
290
|
-
*
|
|
437
|
+
* @param args - The parameters for the request.
|
|
438
|
+
* @param args.digitalAssetAddress - The address of the digital asset.
|
|
439
|
+
* @param args.minimumLedgerVersion - Optional minimum ledger version to sync up to before querying.
|
|
440
|
+
* @param args.options - Optional pagination and ordering parameters.
|
|
291
441
|
*
|
|
292
|
-
* @
|
|
293
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
442
|
+
* @returns A promise that resolves to the activity data related to the digital asset.
|
|
294
443
|
*
|
|
295
|
-
* @
|
|
444
|
+
* @example
|
|
445
|
+
* ```typescript
|
|
446
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
447
|
+
*
|
|
448
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
449
|
+
* const aptos = new Aptos(config);
|
|
450
|
+
*
|
|
451
|
+
* async function runExample() {
|
|
452
|
+
* // Get the activity data for a digital asset
|
|
453
|
+
* const digitalAssetActivity = await aptos.getDigitalAssetActivity({
|
|
454
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
455
|
+
* });
|
|
456
|
+
*
|
|
457
|
+
* console.log(digitalAssetActivity);
|
|
458
|
+
* }
|
|
459
|
+
* runExample().catch(console.error);
|
|
460
|
+
* ```
|
|
296
461
|
*/
|
|
297
462
|
async getDigitalAssetActivity(args: {
|
|
298
463
|
digitalAssetAddress: AccountAddressInput;
|
|
@@ -308,38 +473,52 @@ export class DigitalAsset {
|
|
|
308
473
|
}
|
|
309
474
|
|
|
310
475
|
/**
|
|
311
|
-
* Creates a new collection within the specified account
|
|
312
|
-
*
|
|
313
|
-
* @
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* @param args.
|
|
322
|
-
* @param args.
|
|
323
|
-
* @param args.
|
|
324
|
-
* @param args.
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
* @param args.
|
|
328
|
-
* @param args.
|
|
329
|
-
* @param args.
|
|
330
|
-
* @param args.
|
|
331
|
-
*
|
|
332
|
-
* @param args.
|
|
333
|
-
*
|
|
334
|
-
* @param args.mutableTokenUri controls mutability of the digital asset's URI - defaults true
|
|
335
|
-
* @param args.tokensBurnableByCreator controls whether digital assets can be burnable by the creator - defaults true
|
|
336
|
-
* @param args.tokensFreezableByCreator controls whether digital assets can be frozen by the creator - defaults true
|
|
337
|
-
* @param args.royaltyNumerator the numerator of the royalty to be paid to the creator when
|
|
338
|
-
* a digital asset is transferred - defaults 0
|
|
339
|
-
* @param args.royaltyDenominator the denominator of the royalty to be paid to the creator
|
|
340
|
-
* when a digital asset is transferred - defaults 1
|
|
476
|
+
* Creates a new collection within the specified account.
|
|
477
|
+
*
|
|
478
|
+
* @param args.creator - The account of the collection's creator.
|
|
479
|
+
* @param args.description - The description of the collection.
|
|
480
|
+
* @param args.name - The name of the collection.
|
|
481
|
+
* @param args.uri - The URI to additional info about the collection.
|
|
482
|
+
* @param args.options - Optional parameters for generating the transaction.
|
|
483
|
+
*
|
|
484
|
+
* The parameters below are optional:
|
|
485
|
+
* @param args.maxSupply - Controls the max supply of the digital assets. Defaults to MAX_U64_BIG_INT.
|
|
486
|
+
* @param args.mutableDescription - Controls mutability of the collection's description. Defaults to true.
|
|
487
|
+
* @param args.mutableRoyalty - Controls mutability of the collection's royalty. Defaults to true.
|
|
488
|
+
* @param args.mutableUri - Controls mutability of the collection's URI. Defaults to true.
|
|
489
|
+
* @param args.mutableTokenDescription - Controls mutability of the digital asset's description. Defaults to true.
|
|
490
|
+
* @param args.mutableTokenName - Controls mutability of the digital asset's name. Defaults to true.
|
|
491
|
+
* @param args.mutableTokenProperties - Controls mutability of digital asset's properties. Defaults to true.
|
|
492
|
+
* @param args.mutableTokenUri - Controls mutability of the digital asset's URI. Defaults to true.
|
|
493
|
+
* @param args.tokensBurnableByCreator - Controls whether digital assets can be burnable by the creator. Defaults to true.
|
|
494
|
+
* @param args.tokensFreezableByCreator - Controls whether digital assets can be frozen by the creator. Defaults to true.
|
|
495
|
+
* @param args.royaltyNumerator - The numerator of the royalty to be paid to the creator when a digital asset is transferred.
|
|
496
|
+
* Defaults to 0.
|
|
497
|
+
* @param args.royaltyDenominator - The denominator of the royalty to be paid to the creator when a digital asset is
|
|
498
|
+
* transferred. Defaults to 1.
|
|
341
499
|
*
|
|
342
500
|
* @returns A SimpleTransaction that when submitted will create the collection.
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
* ```typescript
|
|
504
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
505
|
+
*
|
|
506
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
507
|
+
* const aptos = new Aptos(config);
|
|
508
|
+
*
|
|
509
|
+
* async function runExample() {
|
|
510
|
+
* // Creating a new collection transaction
|
|
511
|
+
* const transaction = await aptos.createCollectionTransaction({
|
|
512
|
+
* creator: Account.generate(), // Replace with a real account
|
|
513
|
+
* description: "A unique collection of digital assets.",
|
|
514
|
+
* name: "My Digital Collection",
|
|
515
|
+
* uri: "https://mycollection.com",
|
|
516
|
+
* });
|
|
517
|
+
*
|
|
518
|
+
* console.log("Transaction created:", transaction);
|
|
519
|
+
* }
|
|
520
|
+
* runExample().catch(console.error);
|
|
521
|
+
* ```
|
|
343
522
|
*/
|
|
344
523
|
async createCollectionTransaction(
|
|
345
524
|
args: {
|
|
@@ -354,24 +533,42 @@ export class DigitalAsset {
|
|
|
354
533
|
}
|
|
355
534
|
|
|
356
535
|
/**
|
|
357
|
-
* Create a transaction to mint a digital asset into the
|
|
536
|
+
* Create a transaction to mint a digital asset into the creator's account within an existing collection.
|
|
537
|
+
* This function helps you generate a transaction that can be simulated or submitted to the blockchain for minting a digital asset.
|
|
538
|
+
*
|
|
539
|
+
* @param args.creator - The creator of the collection.
|
|
540
|
+
* @param args.collection - The name of the collection the digital asset belongs to.
|
|
541
|
+
* @param args.description - The description of the digital asset.
|
|
542
|
+
* @param args.name - The name of the digital asset.
|
|
543
|
+
* @param args.uri - The URI to additional info about the digital asset.
|
|
544
|
+
* @param args.propertyKeys - Optional array of property keys for the digital asset.
|
|
545
|
+
* @param args.propertyTypes - Optional array of property types for the digital asset.
|
|
546
|
+
* @param args.propertyValues - Optional array of property values for the digital asset.
|
|
547
|
+
* @param args.options - Optional transaction generation options.
|
|
548
|
+
*
|
|
549
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
358
550
|
*
|
|
359
551
|
* @example
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
552
|
+
* ```typescript
|
|
553
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
554
|
+
*
|
|
555
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
556
|
+
* const aptos = new Aptos(config);
|
|
557
|
+
*
|
|
558
|
+
* async function runExample() {
|
|
559
|
+
* // Creating a transaction to mint a digital asset
|
|
560
|
+
* const transaction = await aptos.mintDigitalAssetTransaction({
|
|
561
|
+
* creator: Account.generate(), // replace with a real account
|
|
562
|
+
* collection: "MyCollection",
|
|
563
|
+
* description: "This is a digital asset.",
|
|
564
|
+
* name: "MyDigitalAsset",
|
|
565
|
+
* uri: "https://example.com/my-digital-asset",
|
|
566
|
+
* });
|
|
567
|
+
*
|
|
568
|
+
* console.log(transaction);
|
|
569
|
+
* }
|
|
570
|
+
* runExample().catch(console.error);
|
|
571
|
+
* ```
|
|
375
572
|
*/
|
|
376
573
|
async mintDigitalAssetTransaction(args: {
|
|
377
574
|
creator: Account;
|
|
@@ -388,24 +585,37 @@ export class DigitalAsset {
|
|
|
388
585
|
}
|
|
389
586
|
|
|
390
587
|
/**
|
|
391
|
-
* Transfer
|
|
588
|
+
* Transfer ownership of a non-fungible digital asset.
|
|
589
|
+
* This function allows you to transfer a digital asset only if it is not frozen, meaning the ownership transfer is not disabled.
|
|
590
|
+
*
|
|
591
|
+
* @param args The arguments for transferring the digital asset.
|
|
592
|
+
* @param args.sender The sender account of the current digital asset owner.
|
|
593
|
+
* @param args.digitalAssetAddress The address of the digital asset being transferred.
|
|
594
|
+
* @param args.recipient The account address of the recipient.
|
|
595
|
+
* @param args.digitalAssetType Optional. The type of the digital asset, defaults to "0x4::token::Token".
|
|
596
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
392
597
|
*
|
|
393
|
-
*
|
|
394
|
-
* (i.e. owner transfer is not disabled such as for soul bound digital assets)
|
|
598
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
395
599
|
*
|
|
396
600
|
* @example
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
601
|
+
* ```typescript
|
|
602
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
603
|
+
*
|
|
604
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
605
|
+
* const aptos = new Aptos(config);
|
|
606
|
+
*
|
|
607
|
+
* async function runExample() {
|
|
608
|
+
* // Transfer a digital asset
|
|
609
|
+
* const transaction = await aptos.transferDigitalAssetTransaction({
|
|
610
|
+
* sender: Account.generate(), // replace with a real sender account
|
|
611
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
612
|
+
* recipient: "0x456", // replace with a real recipient account address
|
|
613
|
+
* });
|
|
614
|
+
*
|
|
615
|
+
* console.log(transaction);
|
|
616
|
+
* }
|
|
617
|
+
* runExample().catch(console.error);
|
|
618
|
+
* ```
|
|
409
619
|
*/
|
|
410
620
|
async transferDigitalAssetTransaction(args: {
|
|
411
621
|
sender: Account;
|
|
@@ -418,29 +628,45 @@ export class DigitalAsset {
|
|
|
418
628
|
}
|
|
419
629
|
|
|
420
630
|
/**
|
|
421
|
-
* Mint a soul bound digital asset into a recipient's account
|
|
631
|
+
* Mint a soul bound digital asset into a recipient's account.
|
|
632
|
+
* This function allows you to create a unique digital asset that is bound to a specific account.
|
|
633
|
+
*
|
|
634
|
+
* @param args - The arguments for minting the soul bound transaction.
|
|
635
|
+
* @param args.account - The account that mints the digital asset.
|
|
636
|
+
* @param args.collection - The collection name that the digital asset belongs to.
|
|
637
|
+
* @param args.description - The digital asset description.
|
|
638
|
+
* @param args.name - The digital asset name.
|
|
639
|
+
* @param args.uri - The digital asset URL.
|
|
640
|
+
* @param args.recipient - The account address where the digital asset will be created.
|
|
641
|
+
* @param args.propertyKeys - The property keys for storing on-chain properties.
|
|
642
|
+
* @param args.propertyTypes - The type of property values.
|
|
643
|
+
* @param args.propertyValues - The property values to be stored on-chain.
|
|
644
|
+
* @param args.options - Additional options for generating the transaction.
|
|
645
|
+
*
|
|
646
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
422
647
|
*
|
|
423
648
|
* @example
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
649
|
+
* ```typescript
|
|
650
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
651
|
+
*
|
|
652
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
653
|
+
* const aptos = new Aptos(config);
|
|
654
|
+
*
|
|
655
|
+
* async function runExample() {
|
|
656
|
+
* // Mint a soul bound digital asset
|
|
657
|
+
* const transaction = await aptos.mintSoulBoundTransaction({
|
|
658
|
+
* account: Account.generate(), // Replace with a real account
|
|
659
|
+
* collection: "collectionName",
|
|
660
|
+
* description: "collectionDescription",
|
|
661
|
+
* name: "digitalAssetName",
|
|
662
|
+
* uri: "digital-asset-uri.com",
|
|
663
|
+
* recipient: "0x123" // Replace with a real recipient account address
|
|
664
|
+
* });
|
|
665
|
+
*
|
|
666
|
+
* console.log(transaction);
|
|
667
|
+
* }
|
|
668
|
+
* runExample().catch(console.error);
|
|
669
|
+
* ```
|
|
444
670
|
*/
|
|
445
671
|
async mintSoulBoundTransaction(args: {
|
|
446
672
|
account: Account;
|
|
@@ -458,18 +684,34 @@ export class DigitalAsset {
|
|
|
458
684
|
}
|
|
459
685
|
|
|
460
686
|
/**
|
|
461
|
-
* Burn a digital asset by its creator
|
|
687
|
+
* Burn a digital asset by its creator, allowing for the removal of a specified digital asset from the blockchain.
|
|
462
688
|
*
|
|
463
|
-
* @
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
689
|
+
* @param args The arguments for burning the digital asset.
|
|
690
|
+
* @param args.creator The creator account that is burning the digital asset.
|
|
691
|
+
* @param args.digitalAssetAddress The address of the digital asset to be burned.
|
|
692
|
+
* @param args.digitalAssetType Optional. The type of the digital asset being burned.
|
|
693
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
468
694
|
*
|
|
469
|
-
* @
|
|
470
|
-
* @param args.digitalAssetAddress The digital asset address
|
|
695
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
471
696
|
*
|
|
472
|
-
* @
|
|
697
|
+
* @example
|
|
698
|
+
* ```typescript
|
|
699
|
+
* import { Aptos, AptosConfig, Network, Account } from "@aptos-labs/ts-sdk";
|
|
700
|
+
*
|
|
701
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
702
|
+
* const aptos = new Aptos(config);
|
|
703
|
+
*
|
|
704
|
+
* async function runExample() {
|
|
705
|
+
* const creator = Account.generate(); // Replace with a real creator account
|
|
706
|
+
* const transaction = await aptos.burnDigitalAssetTransaction({
|
|
707
|
+
* creator: creator,
|
|
708
|
+
* digitalAssetAddress: "0x123", // Replace with a real digital asset address
|
|
709
|
+
* });
|
|
710
|
+
*
|
|
711
|
+
* console.log(transaction);
|
|
712
|
+
* }
|
|
713
|
+
* runExample().catch(console.error);
|
|
714
|
+
* ```
|
|
473
715
|
*/
|
|
474
716
|
async burnDigitalAssetTransaction(args: {
|
|
475
717
|
creator: Account;
|
|
@@ -481,18 +723,35 @@ export class DigitalAsset {
|
|
|
481
723
|
}
|
|
482
724
|
|
|
483
725
|
/**
|
|
484
|
-
* Freeze
|
|
726
|
+
* Freeze the ability to transfer a specified digital asset.
|
|
727
|
+
* This function allows the creator to restrict the transfer capability of a digital asset.
|
|
485
728
|
*
|
|
486
|
-
* @
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
729
|
+
* @param args The arguments for freezing the digital asset transfer.
|
|
730
|
+
* @param args.creator The creator account initiating the freeze.
|
|
731
|
+
* @param args.digitalAssetAddress The address of the digital asset to be frozen.
|
|
732
|
+
* @param args.digitalAssetType Optional. The type of the digital asset being frozen.
|
|
733
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
491
734
|
*
|
|
492
|
-
* @
|
|
493
|
-
* @param args.digitalAssetAddress The digital asset address
|
|
735
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
494
736
|
*
|
|
495
|
-
* @
|
|
737
|
+
* @example
|
|
738
|
+
* ```typescript
|
|
739
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
740
|
+
*
|
|
741
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
742
|
+
* const aptos = new Aptos(config);
|
|
743
|
+
*
|
|
744
|
+
* async function runExample() {
|
|
745
|
+
* // Freeze the digital asset transfer
|
|
746
|
+
* const transaction = await aptos.freezeDigitalAssetTransaferTransaction({
|
|
747
|
+
* creator: Account.generate(), // Replace with a real account if needed
|
|
748
|
+
* digitalAssetAddress: "0x123", // Replace with a real digital asset address
|
|
749
|
+
* });
|
|
750
|
+
*
|
|
751
|
+
* console.log(transaction);
|
|
752
|
+
* }
|
|
753
|
+
* runExample().catch(console.error);
|
|
754
|
+
* ```
|
|
496
755
|
*/
|
|
497
756
|
async freezeDigitalAssetTransaferTransaction(args: {
|
|
498
757
|
creator: Account;
|
|
@@ -504,19 +763,37 @@ export class DigitalAsset {
|
|
|
504
763
|
}
|
|
505
764
|
|
|
506
765
|
/**
|
|
507
|
-
* Unfreeze
|
|
766
|
+
* Unfreeze the ability to transfer a digital asset.
|
|
767
|
+
* This function allows the specified creator account to unfreeze the transfer of a digital asset identified by its address.
|
|
508
768
|
*
|
|
509
|
-
* @
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
769
|
+
* @param args The parameters for unfreezing the digital asset transfer.
|
|
770
|
+
* @param args.creator The creator account that is unfreezing the digital asset transfer.
|
|
771
|
+
* @param args.digitalAssetAddress The address of the digital asset to unfreeze.
|
|
772
|
+
* @param args.digitalAssetType Optional. The type of the digital asset being unfrozen.
|
|
773
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
514
774
|
*
|
|
515
|
-
* @
|
|
516
|
-
* @param args.digitalAssetAddress The digital asset address
|
|
775
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
517
776
|
*
|
|
518
|
-
* @
|
|
777
|
+
* @example
|
|
778
|
+
* ```typescript
|
|
779
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
780
|
+
*
|
|
781
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
782
|
+
* const aptos = new Aptos(config);
|
|
783
|
+
*
|
|
784
|
+
* async function runExample() {
|
|
785
|
+
* // Unfreeze the ability to transfer a digital asset
|
|
786
|
+
* const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({
|
|
787
|
+
* creator: Account.generate(), // replace with a real creator account
|
|
788
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
789
|
+
* });
|
|
790
|
+
*
|
|
791
|
+
* console.log(transaction);
|
|
792
|
+
* }
|
|
793
|
+
* runExample().catch(console.error);
|
|
794
|
+
* ```
|
|
519
795
|
*/
|
|
796
|
+
// TODO: Rename Transafer to Transfer
|
|
520
797
|
async unfreezeDigitalAssetTransaferTransaction(args: {
|
|
521
798
|
creator: Account;
|
|
522
799
|
digitalAssetAddress: AccountAddressInput;
|
|
@@ -527,20 +804,36 @@ export class DigitalAsset {
|
|
|
527
804
|
}
|
|
528
805
|
|
|
529
806
|
/**
|
|
530
|
-
* Set the digital asset description
|
|
807
|
+
* Set the digital asset description to provide additional context or information about the asset.
|
|
531
808
|
*
|
|
532
|
-
* @
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
809
|
+
* @param args The parameters for setting the digital asset description.
|
|
810
|
+
* @param args.creator The creator account responsible for the digital asset.
|
|
811
|
+
* @param args.description The digital asset description to be set.
|
|
812
|
+
* @param args.digitalAssetAddress The address of the digital asset.
|
|
813
|
+
* @param args.digitalAssetType Optional. The type of the digital asset.
|
|
814
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
538
815
|
*
|
|
539
|
-
* @
|
|
540
|
-
* @param args.description The digital asset description
|
|
541
|
-
* @param args.digitalAssetAddress The digital asset address
|
|
816
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
542
817
|
*
|
|
543
|
-
* @
|
|
818
|
+
* @example
|
|
819
|
+
* ```typescript
|
|
820
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
821
|
+
*
|
|
822
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
823
|
+
* const aptos = new Aptos(config);
|
|
824
|
+
*
|
|
825
|
+
* async function runExample() {
|
|
826
|
+
* // Set the digital asset description
|
|
827
|
+
* const transaction = await aptos.setDigitalAssetDescriptionTransaction({
|
|
828
|
+
* creator: Account.generate(), // replace with a real account
|
|
829
|
+
* description: "This is a digital asset description.",
|
|
830
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
831
|
+
* });
|
|
832
|
+
*
|
|
833
|
+
* console.log(transaction);
|
|
834
|
+
* }
|
|
835
|
+
* runExample().catch(console.error);
|
|
836
|
+
* ```
|
|
544
837
|
*/
|
|
545
838
|
async setDigitalAssetDescriptionTransaction(args: {
|
|
546
839
|
creator: Account;
|
|
@@ -553,20 +846,39 @@ export class DigitalAsset {
|
|
|
553
846
|
}
|
|
554
847
|
|
|
555
848
|
/**
|
|
556
|
-
* Set the digital asset name
|
|
849
|
+
* Set the digital asset name, allowing you to define a name for a specific digital asset on the blockchain.
|
|
557
850
|
*
|
|
558
|
-
* @
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
851
|
+
* @param args The parameters for setting the digital asset name.
|
|
852
|
+
* @param args.creator The creator account responsible for the transaction.
|
|
853
|
+
* @param args.name The desired name for the digital asset.
|
|
854
|
+
* @param args.digitalAssetAddress The address of the digital asset.
|
|
855
|
+
* @param args.digitalAssetType Optional. The type of the digital asset, represented as a Move struct ID.
|
|
856
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
564
857
|
*
|
|
565
|
-
* @
|
|
566
|
-
* @param args.name The digital asset name
|
|
567
|
-
* @param args.digitalAssetAddress The digital asset address
|
|
858
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the blockchain.
|
|
568
859
|
*
|
|
569
|
-
* @
|
|
860
|
+
* @example
|
|
861
|
+
* ```typescript
|
|
862
|
+
* import { Aptos, AptosConfig, Network, Account } from "@aptos-labs/ts-sdk";
|
|
863
|
+
*
|
|
864
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
865
|
+
* const aptos = new Aptos(config);
|
|
866
|
+
*
|
|
867
|
+
* async function runExample() {
|
|
868
|
+
* const creator = Account.generate(); // Generate a new account for the creator
|
|
869
|
+
* const digitalAssetAddress = "0x123"; // replace with a real digital asset address
|
|
870
|
+
*
|
|
871
|
+
* // Set the digital asset name
|
|
872
|
+
* const transaction = await aptos.setDigitalAssetNameTransaction({
|
|
873
|
+
* creator: creator,
|
|
874
|
+
* name: "digitalAssetName",
|
|
875
|
+
* digitalAssetAddress: digitalAssetAddress,
|
|
876
|
+
* });
|
|
877
|
+
*
|
|
878
|
+
* console.log(transaction);
|
|
879
|
+
* }
|
|
880
|
+
* runExample().catch(console.error);
|
|
881
|
+
* ```
|
|
570
882
|
*/
|
|
571
883
|
async setDigitalAssetNameTransaction(args: {
|
|
572
884
|
creator: Account;
|
|
@@ -579,20 +891,35 @@ export class DigitalAsset {
|
|
|
579
891
|
}
|
|
580
892
|
|
|
581
893
|
/**
|
|
582
|
-
* Set the digital asset
|
|
583
|
-
*
|
|
584
|
-
* @example
|
|
585
|
-
* const transaction = await aptos.setDigitalAssetURITransaction({
|
|
586
|
-
* creator: alice,
|
|
587
|
-
* uri: "digital-asset-uri.com",
|
|
588
|
-
* digitalAssetAddress: "0x123",
|
|
589
|
-
* });
|
|
894
|
+
* Set the URI for a digital asset, allowing you to associate a unique identifier with the asset.
|
|
590
895
|
*
|
|
591
|
-
* @param args
|
|
592
|
-
* @param args.
|
|
593
|
-
* @param args.
|
|
896
|
+
* @param args The parameters for the transaction.
|
|
897
|
+
* @param args.creator The creator account initiating the transaction.
|
|
898
|
+
* @param args.uri The digital asset URI to be set.
|
|
899
|
+
* @param args.digitalAssetAddress The address of the digital asset.
|
|
900
|
+
* @param args.digitalAssetType Optional. The type of the digital asset.
|
|
901
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
902
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
594
903
|
*
|
|
595
|
-
* @
|
|
904
|
+
* @example
|
|
905
|
+
* ```typescript
|
|
906
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
907
|
+
*
|
|
908
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
909
|
+
* const aptos = new Aptos(config);
|
|
910
|
+
*
|
|
911
|
+
* async function runExample() {
|
|
912
|
+
* // Set the URI for a digital asset
|
|
913
|
+
* const transaction = await aptos.setDigitalAssetURITransaction({
|
|
914
|
+
* creator: Account.generate(), // Replace with a real creator account
|
|
915
|
+
* uri: "digital-asset-uri.com",
|
|
916
|
+
* digitalAssetAddress: "0x123", // Replace with a real digital asset address
|
|
917
|
+
* });
|
|
918
|
+
*
|
|
919
|
+
* console.log(transaction);
|
|
920
|
+
* }
|
|
921
|
+
* runExample().catch(console.error);
|
|
922
|
+
* ```
|
|
596
923
|
*/
|
|
597
924
|
async setDigitalAssetURITransaction(args: {
|
|
598
925
|
creator: Account;
|
|
@@ -605,24 +932,40 @@ export class DigitalAsset {
|
|
|
605
932
|
}
|
|
606
933
|
|
|
607
934
|
/**
|
|
608
|
-
* Add a digital asset property
|
|
935
|
+
* Add a digital asset property to the blockchain.
|
|
936
|
+
* This function allows you to specify a new property for a digital asset, including its key, type, and value.
|
|
937
|
+
*
|
|
938
|
+
* @param args - The arguments for adding a digital asset property.
|
|
939
|
+
* @param args.creator - The account that mints the digital asset.
|
|
940
|
+
* @param args.propertyKey - The property key for storing on-chain properties.
|
|
941
|
+
* @param args.propertyType - The type of property value.
|
|
942
|
+
* @param args.propertyValue - The property value to be stored on-chain.
|
|
943
|
+
* @param args.digitalAssetAddress - The digital asset address.
|
|
944
|
+
* @param args.digitalAssetType - (Optional) The type of the digital asset.
|
|
945
|
+
* @param args.options - (Optional) Options for generating the transaction.
|
|
946
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
609
947
|
*
|
|
610
948
|
* @example
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
949
|
+
* ```typescript
|
|
950
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
951
|
+
*
|
|
952
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
953
|
+
* const aptos = new Aptos(config);
|
|
954
|
+
*
|
|
955
|
+
* async function runExample() {
|
|
956
|
+
* // Add a digital asset property
|
|
957
|
+
* const transaction = await aptos.addDigitalAssetPropertyTransaction({
|
|
958
|
+
* creator: Account.generate(), // Replace with a real account
|
|
959
|
+
* propertyKey: "newKey",
|
|
960
|
+
* propertyType: "BOOLEAN",
|
|
961
|
+
* propertyValue: true,
|
|
962
|
+
* digitalAssetAddress: "0x123", // Replace with a real digital asset address
|
|
963
|
+
* });
|
|
964
|
+
*
|
|
965
|
+
* console.log(transaction);
|
|
966
|
+
* }
|
|
967
|
+
* runExample().catch(console.error);
|
|
968
|
+
* ```
|
|
626
969
|
*/
|
|
627
970
|
async addDigitalAssetPropertyTransaction(args: {
|
|
628
971
|
creator: Account;
|
|
@@ -637,24 +980,41 @@ export class DigitalAsset {
|
|
|
637
980
|
}
|
|
638
981
|
|
|
639
982
|
/**
|
|
640
|
-
* Remove a digital asset property
|
|
983
|
+
* Remove a digital asset property from the blockchain.
|
|
984
|
+
* This function allows you to delete an existing property associated with a digital asset.
|
|
985
|
+
*
|
|
986
|
+
* @param args The parameters required to remove the digital asset property.
|
|
987
|
+
* @param args.creator The account that mints the digital asset.
|
|
988
|
+
* @param args.propertyKey The property key for storing on-chain properties.
|
|
989
|
+
* @param args.propertyType The type of property value.
|
|
990
|
+
* @param args.propertyValue The property value to be stored on-chain.
|
|
991
|
+
* @param args.digitalAssetAddress The digital asset address.
|
|
992
|
+
* @param args.digitalAssetType Optional. The type of the digital asset.
|
|
993
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
994
|
+
*
|
|
995
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
641
996
|
*
|
|
642
997
|
* @example
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
998
|
+
* ```typescript
|
|
999
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
1000
|
+
*
|
|
1001
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1002
|
+
* const aptos = new Aptos(config);
|
|
1003
|
+
*
|
|
1004
|
+
* async function runExample() {
|
|
1005
|
+
* // Remove a digital asset property
|
|
1006
|
+
* const transaction = await aptos.removeDigitalAssetPropertyTransaction({
|
|
1007
|
+
* creator: Account.generate(), // replace with a real account
|
|
1008
|
+
* propertyKey: "newKey",
|
|
1009
|
+
* propertyType: "BOOLEAN",
|
|
1010
|
+
* propertyValue: true,
|
|
1011
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
1012
|
+
* });
|
|
1013
|
+
*
|
|
1014
|
+
* console.log(transaction);
|
|
1015
|
+
* }
|
|
1016
|
+
* runExample().catch(console.error);
|
|
1017
|
+
* ```
|
|
658
1018
|
*/
|
|
659
1019
|
async removeDigitalAssetPropertyTransaction(args: {
|
|
660
1020
|
creator: Account;
|
|
@@ -669,24 +1029,40 @@ export class DigitalAsset {
|
|
|
669
1029
|
}
|
|
670
1030
|
|
|
671
1031
|
/**
|
|
672
|
-
* Update a digital asset property
|
|
1032
|
+
* Update a digital asset property on-chain.
|
|
1033
|
+
*
|
|
1034
|
+
* @param args The parameters for updating the digital asset property.
|
|
1035
|
+
* @param args.creator The account that mints the digital asset.
|
|
1036
|
+
* @param args.digitalAssetAddress The address of the digital asset.
|
|
1037
|
+
* @param args.propertyKey The property key for storing on-chain properties.
|
|
1038
|
+
* @param args.propertyType The type of property value.
|
|
1039
|
+
* @param args.propertyValue The property value to be stored on-chain.
|
|
1040
|
+
* @param args.digitalAssetType Optional. The type of the digital asset.
|
|
1041
|
+
* @param args.options Optional. Additional options for generating the transaction.
|
|
1042
|
+
*
|
|
1043
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
673
1044
|
*
|
|
674
1045
|
* @example
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
1046
|
+
* ```typescript
|
|
1047
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
1048
|
+
*
|
|
1049
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1050
|
+
* const aptos = new Aptos(config);
|
|
1051
|
+
*
|
|
1052
|
+
* async function runExample() {
|
|
1053
|
+
* // Update a digital asset property
|
|
1054
|
+
* const transaction = await aptos.updateDigitalAssetPropertyTransaction({
|
|
1055
|
+
* creator: Account.generate(), // replace with a real account
|
|
1056
|
+
* propertyKey: "newKey",
|
|
1057
|
+
* propertyType: "BOOLEAN",
|
|
1058
|
+
* propertyValue: false,
|
|
1059
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
1060
|
+
* });
|
|
1061
|
+
*
|
|
1062
|
+
* console.log(transaction);
|
|
1063
|
+
* }
|
|
1064
|
+
* runExample().catch(console.error);
|
|
1065
|
+
* ```
|
|
690
1066
|
*/
|
|
691
1067
|
async updateDigitalAssetPropertyTransaction(args: {
|
|
692
1068
|
creator: Account;
|
|
@@ -701,24 +1077,42 @@ export class DigitalAsset {
|
|
|
701
1077
|
}
|
|
702
1078
|
|
|
703
1079
|
/**
|
|
704
|
-
* Add a typed digital asset property
|
|
1080
|
+
* Add a typed digital asset property to the blockchain.
|
|
1081
|
+
* This function allows you to define and store a specific property for a digital asset, enabling better categorization and
|
|
1082
|
+
* management of digital assets.
|
|
1083
|
+
*
|
|
1084
|
+
* @param args - The parameters for adding the typed property.
|
|
1085
|
+
* @param args.creator - The account that mints the digital asset.
|
|
1086
|
+
* @param args.propertyKey - The property key for storing on-chain properties.
|
|
1087
|
+
* @param args.propertyType - The type of property value.
|
|
1088
|
+
* @param args.propertyValue - The property value to be stored on-chain.
|
|
1089
|
+
* @param args.digitalAssetAddress - The digital asset address.
|
|
1090
|
+
* @param args.digitalAssetType - The optional type of the digital asset.
|
|
1091
|
+
* @param args.options - Optional transaction generation options.
|
|
1092
|
+
*
|
|
1093
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
705
1094
|
*
|
|
706
1095
|
* @example
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
*
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
*
|
|
1096
|
+
* ```typescript
|
|
1097
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
1098
|
+
*
|
|
1099
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1100
|
+
* const aptos = new Aptos(config);
|
|
1101
|
+
*
|
|
1102
|
+
* async function runExample() {
|
|
1103
|
+
* // Adding a typed digital asset property
|
|
1104
|
+
* const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({
|
|
1105
|
+
* creator: Account.generate(), // replace with a real account
|
|
1106
|
+
* propertyKey: "typedKey",
|
|
1107
|
+
* propertyType: "STRING",
|
|
1108
|
+
* propertyValue: "hello",
|
|
1109
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
1110
|
+
* });
|
|
1111
|
+
*
|
|
1112
|
+
* console.log(transaction);
|
|
1113
|
+
* }
|
|
1114
|
+
* runExample().catch(console.error);
|
|
1115
|
+
* ```
|
|
722
1116
|
*/
|
|
723
1117
|
async addDigitalAssetTypedPropertyTransaction(args: {
|
|
724
1118
|
creator: Account;
|
|
@@ -733,24 +1127,41 @@ export class DigitalAsset {
|
|
|
733
1127
|
}
|
|
734
1128
|
|
|
735
1129
|
/**
|
|
736
|
-
* Update a typed digital asset property
|
|
1130
|
+
* Update a typed digital asset property on-chain.
|
|
1131
|
+
* This function allows you to modify the properties of a digital asset, enabling dynamic updates to its attributes.
|
|
1132
|
+
*
|
|
1133
|
+
* @param args - The arguments for updating the digital asset property.
|
|
1134
|
+
* @param args.creator - The account that mints the digital asset.
|
|
1135
|
+
* @param args.propertyKey - The property key for storing on-chain properties.
|
|
1136
|
+
* @param args.propertyType - The type of property value.
|
|
1137
|
+
* @param args.propertyValue - The property value to be stored on-chain.
|
|
1138
|
+
* @param args.digitalAssetAddress - The digital asset address.
|
|
1139
|
+
* @param args.digitalAssetType - (Optional) The type of the digital asset.
|
|
1140
|
+
* @param args.options - (Optional) Additional options for generating the transaction.
|
|
1141
|
+
*
|
|
1142
|
+
* @returns A SimpleTransaction that can be simulated or submitted to the chain.
|
|
737
1143
|
*
|
|
738
1144
|
* @example
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
1145
|
+
* ```typescript
|
|
1146
|
+
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
1147
|
+
*
|
|
1148
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1149
|
+
* const aptos = new Aptos(config);
|
|
1150
|
+
*
|
|
1151
|
+
* async function runExample() {
|
|
1152
|
+
* // Update a typed digital asset property
|
|
1153
|
+
* const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({
|
|
1154
|
+
* creator: Account.generate(), // replace with a real account
|
|
1155
|
+
* propertyKey: "typedKey",
|
|
1156
|
+
* propertyType: "U8",
|
|
1157
|
+
* propertyValue: 2,
|
|
1158
|
+
* digitalAssetAddress: "0x123", // replace with a real digital asset address
|
|
1159
|
+
* });
|
|
1160
|
+
*
|
|
1161
|
+
* console.log(transaction);
|
|
1162
|
+
* }
|
|
1163
|
+
* runExample().catch(console.error);
|
|
1164
|
+
* ```
|
|
754
1165
|
*/
|
|
755
1166
|
async updateDigitalAssetTypedPropertyTransaction(args: {
|
|
756
1167
|
creator: Account;
|