@aptos-labs/ts-sdk 1.12.1 → 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.
Files changed (373) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.d.ts +37 -0
  4. package/dist/common/cli/index.js +2 -0
  5. package/dist/common/cli/index.js.map +1 -0
  6. package/dist/common/index.d.ts +384 -111
  7. package/dist/common/index.js +24 -24
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/{Ed25519Account-DHqzsb8B.d.mts → Ed25519Account--qjfup2u.d.mts} +1 -1
  10. package/dist/esm/api/account.d.mts +51 -10
  11. package/dist/esm/api/account.mjs +1 -1
  12. package/dist/esm/api/ans.d.mts +10 -18
  13. package/dist/esm/api/ans.mjs +1 -1
  14. package/dist/esm/api/aptos.d.mts +6 -2
  15. package/dist/esm/api/aptos.mjs +1 -1
  16. package/dist/esm/api/aptosConfig.d.mts +4 -0
  17. package/dist/esm/api/aptosConfig.mjs +1 -1
  18. package/dist/esm/api/coin.d.mts +8 -1
  19. package/dist/esm/api/coin.mjs +1 -1
  20. package/dist/esm/api/digitalAsset.d.mts +144 -5
  21. package/dist/esm/api/digitalAsset.mjs +1 -1
  22. package/dist/esm/api/event.d.mts +14 -9
  23. package/dist/esm/api/event.mjs +1 -1
  24. package/dist/esm/api/faucet.d.mts +3 -0
  25. package/dist/esm/api/faucet.mjs +1 -1
  26. package/dist/esm/api/fungibleAsset.d.mts +30 -7
  27. package/dist/esm/api/fungibleAsset.mjs +1 -1
  28. package/dist/esm/api/general.d.mts +51 -28
  29. package/dist/esm/api/general.mjs +1 -1
  30. package/dist/esm/api/index.d.mts +2 -2
  31. package/dist/esm/api/index.mjs +1 -1
  32. package/dist/esm/api/staking.d.mts +11 -2
  33. package/dist/esm/api/staking.mjs +1 -1
  34. package/dist/esm/api/transaction.d.mts +60 -17
  35. package/dist/esm/api/transaction.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  37. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  39. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  40. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  41. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  42. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  43. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  45. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  46. package/dist/esm/api/utils.mjs +1 -1
  47. package/dist/esm/bcs/index.mjs +1 -1
  48. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  49. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  50. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  51. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  52. package/dist/esm/bcs/serializer.mjs +1 -1
  53. package/dist/esm/{chunk-T4C6BVXK.mjs → chunk-2M6OT6DU.mjs} +2 -2
  54. package/dist/esm/chunk-2M6OT6DU.mjs.map +1 -0
  55. package/dist/esm/chunk-3CLYWZYZ.mjs +2 -0
  56. package/dist/esm/{chunk-A7XZTJ3D.mjs → chunk-3F6EYD5O.mjs} +2 -2
  57. package/dist/esm/{chunk-36QXVFR5.mjs → chunk-52C73T26.mjs} +2 -2
  58. package/dist/esm/{chunk-GJDGR3KQ.mjs → chunk-54BANKLA.mjs} +2 -2
  59. package/dist/esm/{chunk-CQS6ZCJ7.mjs → chunk-5AQEETAC.mjs} +1 -1
  60. package/dist/esm/chunk-5AQEETAC.mjs.map +1 -0
  61. package/dist/esm/{chunk-3RQ5V3F3.mjs → chunk-63AIRYJX.mjs} +2 -2
  62. package/dist/esm/{chunk-HJYT6LDB.mjs → chunk-647IOEXV.mjs} +2 -2
  63. package/dist/esm/{chunk-M4SQNMCW.mjs → chunk-6CBPMYW5.mjs} +2 -2
  64. package/dist/esm/chunk-6CBPMYW5.mjs.map +1 -0
  65. package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-6FBKUTGF.mjs} +2 -2
  66. package/dist/esm/chunk-7CAEMK4R.mjs +2 -0
  67. package/dist/esm/chunk-7CAEMK4R.mjs.map +1 -0
  68. package/dist/esm/{chunk-AIPKOP3K.mjs → chunk-7PYFGGHM.mjs} +2 -2
  69. package/dist/esm/chunk-7PYFGGHM.mjs.map +1 -0
  70. package/dist/esm/{chunk-5ID6W7XL.mjs → chunk-A7MSW6OL.mjs} +2 -2
  71. package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
  72. package/dist/esm/{chunk-RIUFW2OG.mjs → chunk-AP7UZTPZ.mjs} +2 -2
  73. package/dist/esm/{chunk-FXHXOVL4.mjs → chunk-BMKDEIRL.mjs} +2 -2
  74. package/dist/esm/chunk-BMKDEIRL.mjs.map +1 -0
  75. package/dist/esm/{chunk-EV75CYGN.mjs → chunk-BSEQPVD6.mjs} +2 -2
  76. package/dist/esm/chunk-BWFJHFBQ.mjs +2 -0
  77. package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-DMKUAQB7.mjs} +2 -2
  78. package/dist/esm/chunk-DSTKXJMA.mjs +2 -0
  79. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  80. package/dist/esm/{chunk-G56GPLTB.mjs → chunk-FS3NSGBF.mjs} +2 -2
  81. package/dist/esm/{chunk-UEKKYJGA.mjs → chunk-G2QII3AT.mjs} +2 -2
  82. package/dist/esm/{chunk-527DYQ3X.mjs → chunk-GMVVQD72.mjs} +2 -2
  83. package/dist/esm/chunk-GMVVQD72.mjs.map +1 -0
  84. package/dist/esm/{chunk-DUP7XY5P.mjs → chunk-GXVUN32G.mjs} +2 -2
  85. package/dist/esm/{chunk-VNIABDOT.mjs → chunk-H4UVHJ3M.mjs} +2 -2
  86. package/dist/esm/{chunk-KXFMI7RM.mjs → chunk-HB6T27S2.mjs} +2 -2
  87. package/dist/esm/{chunk-5NWTYUKC.mjs → chunk-HXN2WRUX.mjs} +2 -2
  88. package/dist/esm/{chunk-SUTBXHYU.mjs → chunk-I7YI22IW.mjs} +2 -2
  89. package/dist/esm/chunk-I7YI22IW.mjs.map +1 -0
  90. package/dist/esm/{chunk-FVMJDRHO.mjs → chunk-IA6XM7QE.mjs} +2 -2
  91. package/dist/esm/chunk-IA6XM7QE.mjs.map +1 -0
  92. package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-IOSQVDZI.mjs} +2 -2
  93. package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-IOSQVDZI.mjs.map} +1 -1
  94. package/dist/esm/{chunk-NF5OUPPU.mjs → chunk-IS3OLRMB.mjs} +2 -2
  95. package/dist/esm/chunk-IS3OLRMB.mjs.map +1 -0
  96. package/dist/esm/{chunk-DGLW7OBS.mjs → chunk-KL6VJ3UK.mjs} +2 -2
  97. package/dist/esm/{chunk-QRVYLV76.mjs → chunk-KOAUBVO6.mjs} +2 -2
  98. package/dist/esm/{chunk-25UTAIJG.mjs → chunk-KUOIRTNL.mjs} +2 -2
  99. package/dist/esm/chunk-KVIVMWN5.mjs +2 -0
  100. package/dist/esm/chunk-L4Q2XTHT.mjs +2 -0
  101. package/dist/esm/chunk-MIEV7J74.mjs +2 -0
  102. package/dist/esm/chunk-MIEV7J74.mjs.map +1 -0
  103. package/dist/esm/{chunk-5EN52MUT.mjs → chunk-NPFNYP75.mjs} +2 -2
  104. package/dist/esm/chunk-OKCU4GHN.mjs +2 -0
  105. package/dist/esm/chunk-OKCU4GHN.mjs.map +1 -0
  106. package/dist/esm/{chunk-6O5ZR5ME.mjs → chunk-ONDQ4MK7.mjs} +2 -2
  107. package/dist/esm/{chunk-NJRNZEHX.mjs → chunk-OWW6SIDP.mjs} +1 -1
  108. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  109. package/dist/esm/chunk-QIAHBEEW.mjs +2 -0
  110. package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-QIAHBEEW.mjs.map} +1 -1
  111. package/dist/esm/{chunk-EJBUUMWV.mjs → chunk-QK4P26SH.mjs} +2 -2
  112. package/dist/esm/{chunk-FPD4JBPV.mjs → chunk-QTSECE7R.mjs} +2 -2
  113. package/dist/esm/chunk-QTSECE7R.mjs.map +1 -0
  114. package/dist/esm/{chunk-FC5MU6ZN.mjs → chunk-QVKMFPAV.mjs} +2 -2
  115. package/dist/esm/{chunk-O3YFCZJ5.mjs → chunk-QW3VNZJ7.mjs} +2 -2
  116. package/dist/esm/chunk-R5QUBEH6.mjs +2 -0
  117. package/dist/esm/{chunk-JOLLCFQL.mjs → chunk-RAYJRFIG.mjs} +2 -2
  118. package/dist/esm/{chunk-JOLLCFQL.mjs.map → chunk-RAYJRFIG.mjs.map} +1 -1
  119. package/dist/esm/{chunk-35EWRSDK.mjs → chunk-RHBCVCOS.mjs} +2 -2
  120. package/dist/esm/{chunk-VLNBGWGX.mjs → chunk-SDUIZ3FY.mjs} +2 -2
  121. package/dist/esm/chunk-SDUIZ3FY.mjs.map +1 -0
  122. package/dist/esm/{chunk-XDXI3TRT.mjs → chunk-TBFLWWV4.mjs} +2 -2
  123. package/dist/esm/chunk-TBMAJ6AW.mjs +2 -0
  124. package/dist/esm/chunk-TGLSJGFO.mjs +2 -0
  125. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  126. package/dist/esm/chunk-TLKV4NHK.mjs +2 -0
  127. package/dist/esm/chunk-TLKV4NHK.mjs.map +1 -0
  128. package/dist/esm/{chunk-YG6YYQRG.mjs → chunk-TR2YS7DT.mjs} +2 -2
  129. package/dist/esm/chunk-TR2YS7DT.mjs.map +1 -0
  130. package/dist/esm/{chunk-MJPUASSD.mjs → chunk-U43IJHQN.mjs} +2 -2
  131. package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-UML2VQZT.mjs} +2 -2
  132. package/dist/esm/{chunk-KQB7A4OX.mjs → chunk-V4YBGBCN.mjs} +2 -2
  133. package/dist/esm/{chunk-B4DWWHNL.mjs → chunk-V6SPPOWX.mjs} +2 -2
  134. package/dist/esm/{chunk-CP4QCRBZ.mjs → chunk-VBTJVPAM.mjs} +2 -2
  135. package/dist/esm/{chunk-3PMUIXFS.mjs → chunk-VM3EJYJU.mjs} +2 -2
  136. package/dist/esm/chunk-VM3EJYJU.mjs.map +1 -0
  137. package/dist/esm/chunk-VX6LTXGB.mjs +2 -0
  138. package/dist/esm/chunk-VX6LTXGB.mjs.map +1 -0
  139. package/dist/esm/chunk-WEZXFWPR.mjs +2 -0
  140. package/dist/esm/{chunk-CXR7MOBW.mjs.map → chunk-WEZXFWPR.mjs.map} +1 -1
  141. package/dist/esm/chunk-WFZDFFBM.mjs +2 -0
  142. package/dist/esm/{chunk-5ZQJLHJA.mjs → chunk-XYLYHSEI.mjs} +2 -2
  143. package/dist/esm/chunk-Y2VA7F5D.mjs +2 -0
  144. package/dist/esm/chunk-Y2VA7F5D.mjs.map +1 -0
  145. package/dist/esm/{chunk-FNLRLSGJ.mjs → chunk-Y5M5DD64.mjs} +2 -2
  146. package/dist/esm/{chunk-CAGDOGXS.mjs → chunk-YWQLLV2R.mjs} +2 -2
  147. package/dist/esm/chunk-ZEXZ4CX5.mjs +2 -0
  148. package/dist/esm/{chunk-3MFILHZT.mjs → chunk-ZKNM27TR.mjs} +2 -2
  149. package/dist/esm/{chunk-QJAI7DNA.mjs → chunk-ZPNCA4C7.mjs} +2 -2
  150. package/dist/esm/chunk-ZYYK3UXP.mjs +2 -0
  151. package/dist/esm/cli/index.mjs +1 -1
  152. package/dist/esm/client/core.mjs +1 -1
  153. package/dist/esm/client/get.mjs +1 -1
  154. package/dist/esm/client/index.mjs +1 -1
  155. package/dist/esm/client/post.mjs +1 -1
  156. package/dist/esm/client/types.mjs +1 -1
  157. package/dist/esm/core/account/Account.d.mts +2 -2
  158. package/dist/esm/core/account/Account.mjs +1 -1
  159. package/dist/esm/core/account/Ed25519Account.d.mts +2 -2
  160. package/dist/esm/core/account/Ed25519Account.mjs +1 -1
  161. package/dist/esm/core/account/SingleKeyAccount.d.mts +2 -2
  162. package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
  163. package/dist/esm/core/account/index.d.mts +2 -2
  164. package/dist/esm/core/account/index.mjs +1 -1
  165. package/dist/esm/core/account/utils/address.mjs +1 -1
  166. package/dist/esm/core/account/utils/index.mjs +1 -1
  167. package/dist/esm/core/accountAddress.mjs +1 -1
  168. package/dist/esm/core/authenticationKey.d.mts +1 -1
  169. package/dist/esm/core/authenticationKey.mjs +1 -1
  170. package/dist/esm/core/common.mjs +1 -1
  171. package/dist/esm/core/crypto/ed25519.d.mts +9 -2
  172. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  173. package/dist/esm/core/crypto/index.d.mts +1 -1
  174. package/dist/esm/core/crypto/index.mjs +1 -1
  175. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  176. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  177. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  178. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  179. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  180. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  181. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  182. package/dist/esm/core/crypto/secp256k1.d.mts +8 -1
  183. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  184. package/dist/esm/core/crypto/signature.mjs +1 -1
  185. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  186. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  187. package/dist/esm/core/crypto/utils.mjs +1 -1
  188. package/dist/esm/core/hex.mjs +1 -1
  189. package/dist/esm/core/index.d.mts +2 -2
  190. package/dist/esm/core/index.mjs +1 -1
  191. package/dist/esm/index.d.mts +2 -4
  192. package/dist/esm/index.mjs +1 -1
  193. package/dist/esm/internal/account.d.mts +3 -3
  194. package/dist/esm/internal/account.mjs +1 -1
  195. package/dist/esm/internal/ans.d.mts +2 -2
  196. package/dist/esm/internal/ans.mjs +1 -1
  197. package/dist/esm/internal/coin.d.mts +1 -1
  198. package/dist/esm/internal/coin.mjs +1 -1
  199. package/dist/esm/internal/digitalAsset.d.mts +3 -3
  200. package/dist/esm/internal/digitalAsset.mjs +1 -1
  201. package/dist/esm/internal/event.d.mts +1 -1
  202. package/dist/esm/internal/event.mjs +1 -1
  203. package/dist/esm/internal/faucet.mjs +1 -1
  204. package/dist/esm/internal/fungibleAsset.d.mts +6 -6
  205. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  206. package/dist/esm/internal/general.mjs +1 -1
  207. package/dist/esm/internal/staking.d.mts +2 -2
  208. package/dist/esm/internal/staking.mjs +1 -1
  209. package/dist/esm/internal/transaction.d.mts +5 -1
  210. package/dist/esm/internal/transaction.mjs +1 -1
  211. package/dist/esm/internal/transactionSubmission.d.mts +6 -6
  212. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  213. package/dist/esm/internal/view.d.mts +1 -1
  214. package/dist/esm/internal/view.mjs +1 -1
  215. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  216. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  217. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  218. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  219. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  220. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  221. package/dist/esm/transactions/index.d.mts +2 -2
  222. package/dist/esm/transactions/index.mjs +1 -1
  223. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  224. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  225. package/dist/esm/transactions/instances/index.d.mts +1 -1
  226. package/dist/esm/transactions/instances/index.mjs +1 -1
  227. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  228. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  229. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  231. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  232. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  233. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  234. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  235. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  236. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  237. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  238. package/dist/esm/transactions/management/index.d.mts +2 -2
  239. package/dist/esm/transactions/management/index.mjs +1 -1
  240. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  241. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  242. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  243. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  244. package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -2
  245. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  246. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  247. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  248. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  249. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  250. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  251. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  252. package/dist/esm/transactions/types.d.mts +1 -1
  253. package/dist/esm/types/index.d.mts +1 -0
  254. package/dist/esm/types/index.mjs +1 -1
  255. package/dist/esm/version.d.mts +1 -1
  256. package/dist/esm/version.mjs +1 -1
  257. package/package.json +7 -6
  258. package/src/api/account.ts +48 -7
  259. package/src/api/ans.ts +8 -16
  260. package/src/api/aptos.ts +4 -0
  261. package/src/api/aptosConfig.ts +4 -0
  262. package/src/api/coin.ts +7 -0
  263. package/src/api/digitalAsset.ts +140 -1
  264. package/src/api/event.ts +13 -8
  265. package/src/api/faucet.ts +3 -0
  266. package/src/api/fungibleAsset.ts +27 -4
  267. package/src/api/general.ts +48 -25
  268. package/src/api/staking.ts +9 -0
  269. package/src/api/transaction.ts +57 -14
  270. package/src/client/core.ts +2 -1
  271. package/src/core/crypto/ed25519.ts +44 -10
  272. package/src/core/crypto/secp256k1.ts +9 -3
  273. package/src/index.ts +0 -1
  274. package/src/internal/account.ts +6 -9
  275. package/src/internal/digitalAsset.ts +1 -1
  276. package/src/internal/fungibleAsset.ts +3 -3
  277. package/src/internal/transaction.ts +48 -10
  278. package/src/types/index.ts +1 -0
  279. package/src/version.ts +1 -1
  280. package/dist/esm/chunk-3PMUIXFS.mjs.map +0 -1
  281. package/dist/esm/chunk-4AVC2RCH.mjs +0 -2
  282. package/dist/esm/chunk-4AVC2RCH.mjs.map +0 -1
  283. package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
  284. package/dist/esm/chunk-527DYQ3X.mjs.map +0 -1
  285. package/dist/esm/chunk-AIPKOP3K.mjs.map +0 -1
  286. package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
  287. package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
  288. package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
  289. package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
  290. package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
  291. package/dist/esm/chunk-BAYKVJBZ.mjs +0 -2
  292. package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
  293. package/dist/esm/chunk-CQS6ZCJ7.mjs.map +0 -1
  294. package/dist/esm/chunk-CXR7MOBW.mjs +0 -2
  295. package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
  296. package/dist/esm/chunk-FPD4JBPV.mjs.map +0 -1
  297. package/dist/esm/chunk-FVMJDRHO.mjs.map +0 -1
  298. package/dist/esm/chunk-FXHXOVL4.mjs.map +0 -1
  299. package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
  300. package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
  301. package/dist/esm/chunk-M4SQNMCW.mjs.map +0 -1
  302. package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
  303. package/dist/esm/chunk-NF5OUPPU.mjs.map +0 -1
  304. package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
  305. package/dist/esm/chunk-PF57EOJY.mjs +0 -2
  306. package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
  307. package/dist/esm/chunk-SUTBXHYU.mjs.map +0 -1
  308. package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
  309. package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
  310. package/dist/esm/chunk-SZKJ3TC5.mjs +0 -1
  311. package/dist/esm/chunk-SZKJ3TC5.mjs.map +0 -1
  312. package/dist/esm/chunk-T4C6BVXK.mjs.map +0 -1
  313. package/dist/esm/chunk-UGPALAPN.mjs +0 -2
  314. package/dist/esm/chunk-UQCSBLD5.mjs +0 -2
  315. package/dist/esm/chunk-VBDMQERT.mjs +0 -2
  316. package/dist/esm/chunk-VHANL47W.mjs +0 -2
  317. package/dist/esm/chunk-VHANL47W.mjs.map +0 -1
  318. package/dist/esm/chunk-VLNBGWGX.mjs.map +0 -1
  319. package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
  320. package/dist/esm/chunk-YG6YYQRG.mjs.map +0 -1
  321. package/dist/esm/chunk-YIGDWPGM.mjs +0 -2
  322. package/dist/esm/chunk-YIGDWPGM.mjs.map +0 -1
  323. /package/dist/esm/{chunk-VBDMQERT.mjs.map → chunk-3CLYWZYZ.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-A7XZTJ3D.mjs.map → chunk-3F6EYD5O.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-52C73T26.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-GJDGR3KQ.mjs.map → chunk-54BANKLA.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-3RQ5V3F3.mjs.map → chunk-63AIRYJX.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-HJYT6LDB.mjs.map → chunk-647IOEXV.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-5ID6W7XL.mjs.map → chunk-A7MSW6OL.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-RIUFW2OG.mjs.map → chunk-AP7UZTPZ.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-EV75CYGN.mjs.map → chunk-BSEQPVD6.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-UEKKYJGA.mjs.map → chunk-G2QII3AT.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-DUP7XY5P.mjs.map → chunk-GXVUN32G.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-VNIABDOT.mjs.map → chunk-H4UVHJ3M.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-KXFMI7RM.mjs.map → chunk-HB6T27S2.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-5NWTYUKC.mjs.map → chunk-HXN2WRUX.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-DGLW7OBS.mjs.map → chunk-KL6VJ3UK.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-QRVYLV76.mjs.map → chunk-KOAUBVO6.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-25UTAIJG.mjs.map → chunk-KUOIRTNL.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-KVIVMWN5.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-UQCSBLD5.mjs.map → chunk-L4Q2XTHT.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-6O5ZR5ME.mjs.map → chunk-ONDQ4MK7.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-EJBUUMWV.mjs.map → chunk-QK4P26SH.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-FC5MU6ZN.mjs.map → chunk-QVKMFPAV.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-O3YFCZJ5.mjs.map → chunk-QW3VNZJ7.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-TBFLWWV4.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-BAYKVJBZ.mjs.map → chunk-TGLSJGFO.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-KQB7A4OX.mjs.map → chunk-V4YBGBCN.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-B4DWWHNL.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-CP4QCRBZ.mjs.map → chunk-VBTJVPAM.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-5ZQJLHJA.mjs.map → chunk-XYLYHSEI.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-FNLRLSGJ.mjs.map → chunk-Y5M5DD64.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-YWQLLV2R.mjs.map} +0 -0
  369. /package/dist/esm/{chunk-XX5J7KKC.mjs.map → chunk-ZEXZ4CX5.mjs.map} +0 -0
  370. /package/dist/esm/{chunk-3MFILHZT.mjs.map → chunk-ZKNM27TR.mjs.map} +0 -0
  371. /package/dist/esm/{chunk-QJAI7DNA.mjs.map → chunk-ZPNCA4C7.mjs.map} +0 -0
  372. /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  373. /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
@@ -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: AccountAddress;
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
- *@param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
102
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
94
103
  * @example
95
- * ```
96
- * { where:
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
@@ -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, AccountAddress } from "../core";
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
- * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
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: AccountAddress;
143
- recipient: AccountAddress;
165
+ fungibleAssetMetadataAddress: AccountAddressInput;
166
+ recipient: AccountAddressInput;
144
167
  amount: AnyNumber;
145
168
  options?: InputGenerateTransactionOptions;
146
169
  }): Promise<SimpleTransaction> {
@@ -42,7 +42,9 @@ export class General {
42
42
  *
43
43
  * @returns Aptos Ledger Info
44
44
  *
45
- * @example An example of the returned data
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
- * const payload: ViewRequest = {
131
- * function: "0x1::coin::balance",
132
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
133
- * functionArguments: [accountAddress],
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
- ledger_infos {
171
- chain_id
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
  */
@@ -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