@aptos-labs/ts-sdk 1.12.2 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) 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 +383 -75
  7. package/dist/common/index.js +25 -25
  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-3AYBWD76.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-C7YANDB2.mjs → chunk-3F6EYD5O.mjs} +2 -2
  57. package/dist/esm/{chunk-36QXVFR5.mjs → chunk-52C73T26.mjs} +2 -2
  58. package/dist/esm/{chunk-SOBCWGBM.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-6BR5UJDT.mjs → chunk-63AIRYJX.mjs} +2 -2
  62. package/dist/esm/{chunk-WHA7RISE.mjs → chunk-647IOEXV.mjs} +2 -2
  63. package/dist/esm/{chunk-OWXKKVWD.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-GQR35QW3.mjs → chunk-7PYFGGHM.mjs} +2 -2
  69. package/dist/esm/chunk-7PYFGGHM.mjs.map +1 -0
  70. package/dist/esm/{chunk-LPB7SZHL.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-45ZZWQ7X.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-ZBT4HP6E.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-EKR6HLSN.mjs → chunk-H4UVHJ3M.mjs} +2 -2
  86. package/dist/esm/{chunk-GKGTODGE.mjs → chunk-HB6T27S2.mjs} +2 -2
  87. package/dist/esm/{chunk-KS7UY4W5.mjs → chunk-HXN2WRUX.mjs} +2 -2
  88. package/dist/esm/{chunk-IHPWATYH.mjs → chunk-I7YI22IW.mjs} +2 -2
  89. package/dist/esm/chunk-I7YI22IW.mjs.map +1 -0
  90. package/dist/esm/{chunk-TVHLZDCO.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-5RUPEEIG.mjs → chunk-IS3OLRMB.mjs} +2 -2
  95. package/dist/esm/chunk-IS3OLRMB.mjs.map +1 -0
  96. package/dist/esm/{chunk-URTTOOEM.mjs → chunk-KL6VJ3UK.mjs} +2 -2
  97. package/dist/esm/{chunk-MXO53VAI.mjs → chunk-KOAUBVO6.mjs} +2 -2
  98. package/dist/esm/{chunk-KXR3IUJ7.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-V6FZ7WZH.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-SK5TPUAN.mjs → chunk-QK4P26SH.mjs} +2 -2
  112. package/dist/esm/{chunk-YZGEWPDE.mjs → chunk-QTSECE7R.mjs} +2 -2
  113. package/dist/esm/chunk-QTSECE7R.mjs.map +1 -0
  114. package/dist/esm/{chunk-Y2MYVQVT.mjs → chunk-QVKMFPAV.mjs} +2 -2
  115. package/dist/esm/{chunk-IYSHHN5A.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-KLAYDUFD.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-2EZJOBD2.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-Q73VKL3A.mjs → chunk-V4YBGBCN.mjs} +2 -2
  133. package/dist/esm/{chunk-WMJXRWVE.mjs → chunk-V6SPPOWX.mjs} +2 -2
  134. package/dist/esm/{chunk-6ILDDGAX.mjs → chunk-VBTJVPAM.mjs} +2 -2
  135. package/dist/esm/{chunk-AEVRPB4E.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-U43KR4TW.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-TTUXAKCV.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-6APZ5TPE.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/client/core.mjs +1 -1
  152. package/dist/esm/client/get.mjs +1 -1
  153. package/dist/esm/client/index.mjs +1 -1
  154. package/dist/esm/client/post.mjs +1 -1
  155. package/dist/esm/client/types.mjs +1 -1
  156. package/dist/esm/core/account/Account.d.mts +2 -2
  157. package/dist/esm/core/account/Account.mjs +1 -1
  158. package/dist/esm/core/account/Ed25519Account.d.mts +2 -2
  159. package/dist/esm/core/account/Ed25519Account.mjs +1 -1
  160. package/dist/esm/core/account/SingleKeyAccount.d.mts +2 -2
  161. package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
  162. package/dist/esm/core/account/index.d.mts +2 -2
  163. package/dist/esm/core/account/index.mjs +1 -1
  164. package/dist/esm/core/account/utils/address.mjs +1 -1
  165. package/dist/esm/core/account/utils/index.mjs +1 -1
  166. package/dist/esm/core/accountAddress.mjs +1 -1
  167. package/dist/esm/core/authenticationKey.d.mts +1 -1
  168. package/dist/esm/core/authenticationKey.mjs +1 -1
  169. package/dist/esm/core/common.mjs +1 -1
  170. package/dist/esm/core/crypto/ed25519.d.mts +9 -2
  171. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  172. package/dist/esm/core/crypto/index.d.mts +1 -1
  173. package/dist/esm/core/crypto/index.mjs +1 -1
  174. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  175. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  176. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  177. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  178. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  179. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  180. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  181. package/dist/esm/core/crypto/secp256k1.d.mts +8 -1
  182. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  183. package/dist/esm/core/crypto/signature.mjs +1 -1
  184. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  185. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  186. package/dist/esm/core/crypto/utils.mjs +1 -1
  187. package/dist/esm/core/hex.mjs +1 -1
  188. package/dist/esm/core/index.d.mts +2 -2
  189. package/dist/esm/core/index.mjs +1 -1
  190. package/dist/esm/index.d.mts +2 -2
  191. package/dist/esm/index.mjs +1 -1
  192. package/dist/esm/internal/account.d.mts +3 -3
  193. package/dist/esm/internal/account.mjs +1 -1
  194. package/dist/esm/internal/ans.d.mts +2 -2
  195. package/dist/esm/internal/ans.mjs +1 -1
  196. package/dist/esm/internal/coin.d.mts +1 -1
  197. package/dist/esm/internal/coin.mjs +1 -1
  198. package/dist/esm/internal/digitalAsset.d.mts +3 -3
  199. package/dist/esm/internal/digitalAsset.mjs +1 -1
  200. package/dist/esm/internal/event.d.mts +1 -1
  201. package/dist/esm/internal/event.mjs +1 -1
  202. package/dist/esm/internal/faucet.mjs +1 -1
  203. package/dist/esm/internal/fungibleAsset.d.mts +6 -6
  204. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  205. package/dist/esm/internal/general.mjs +1 -1
  206. package/dist/esm/internal/staking.d.mts +2 -2
  207. package/dist/esm/internal/staking.mjs +1 -1
  208. package/dist/esm/internal/transaction.d.mts +5 -1
  209. package/dist/esm/internal/transaction.mjs +1 -1
  210. package/dist/esm/internal/transactionSubmission.d.mts +6 -6
  211. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  212. package/dist/esm/internal/view.d.mts +1 -1
  213. package/dist/esm/internal/view.mjs +1 -1
  214. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  215. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  216. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  217. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  218. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  219. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  220. package/dist/esm/transactions/index.d.mts +2 -2
  221. package/dist/esm/transactions/index.mjs +1 -1
  222. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  223. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  224. package/dist/esm/transactions/instances/index.d.mts +1 -1
  225. package/dist/esm/transactions/instances/index.mjs +1 -1
  226. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  227. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  228. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  229. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  231. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  232. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  233. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  234. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  235. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  236. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  237. package/dist/esm/transactions/management/index.d.mts +2 -2
  238. package/dist/esm/transactions/management/index.mjs +1 -1
  239. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  240. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  241. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  242. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  243. package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -2
  244. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  245. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  246. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  247. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  248. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  249. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  250. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  251. package/dist/esm/transactions/types.d.mts +1 -1
  252. package/dist/esm/types/index.d.mts +1 -0
  253. package/dist/esm/types/index.mjs +1 -1
  254. package/dist/esm/version.d.mts +1 -1
  255. package/dist/esm/version.mjs +1 -1
  256. package/package.json +7 -6
  257. package/src/api/account.ts +48 -7
  258. package/src/api/ans.ts +8 -16
  259. package/src/api/aptos.ts +4 -0
  260. package/src/api/aptosConfig.ts +4 -0
  261. package/src/api/coin.ts +7 -0
  262. package/src/api/digitalAsset.ts +140 -1
  263. package/src/api/event.ts +13 -8
  264. package/src/api/faucet.ts +3 -0
  265. package/src/api/fungibleAsset.ts +27 -4
  266. package/src/api/general.ts +48 -25
  267. package/src/api/staking.ts +9 -0
  268. package/src/api/transaction.ts +57 -14
  269. package/src/client/core.ts +2 -1
  270. package/src/core/crypto/ed25519.ts +44 -10
  271. package/src/core/crypto/secp256k1.ts +9 -3
  272. package/src/internal/account.ts +6 -9
  273. package/src/internal/digitalAsset.ts +1 -1
  274. package/src/internal/fungibleAsset.ts +3 -3
  275. package/src/internal/transaction.ts +48 -10
  276. package/src/types/index.ts +1 -0
  277. package/src/version.ts +1 -1
  278. package/dist/esm/chunk-2EZJOBD2.mjs.map +0 -1
  279. package/dist/esm/chunk-3AYBWD76.mjs.map +0 -1
  280. package/dist/esm/chunk-45ZZWQ7X.mjs.map +0 -1
  281. package/dist/esm/chunk-4ILXLBGX.mjs +0 -2
  282. package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
  283. package/dist/esm/chunk-5GKROFZ4.mjs +0 -2
  284. package/dist/esm/chunk-5GKROFZ4.mjs.map +0 -1
  285. package/dist/esm/chunk-5RUPEEIG.mjs.map +0 -1
  286. package/dist/esm/chunk-AEVRPB4E.mjs.map +0 -1
  287. package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
  288. package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
  289. package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
  290. package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
  291. package/dist/esm/chunk-B7X6PSE7.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-FKTXWOKR.mjs +0 -2
  297. package/dist/esm/chunk-FKTXWOKR.mjs.map +0 -1
  298. package/dist/esm/chunk-GQR35QW3.mjs.map +0 -1
  299. package/dist/esm/chunk-IHPWATYH.mjs.map +0 -1
  300. package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
  301. package/dist/esm/chunk-KLAYDUFD.mjs.map +0 -1
  302. package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
  303. package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
  304. package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
  305. package/dist/esm/chunk-OWXKKVWD.mjs.map +0 -1
  306. package/dist/esm/chunk-PF57EOJY.mjs +0 -2
  307. package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
  308. package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
  309. package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
  310. package/dist/esm/chunk-T6J2LHHS.mjs +0 -2
  311. package/dist/esm/chunk-T6J2LHHS.mjs.map +0 -1
  312. package/dist/esm/chunk-TVHLZDCO.mjs.map +0 -1
  313. package/dist/esm/chunk-UGPALAPN.mjs +0 -2
  314. package/dist/esm/chunk-W3V4IGGB.mjs +0 -2
  315. package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
  316. package/dist/esm/chunk-YZGEWPDE.mjs.map +0 -1
  317. package/dist/esm/chunk-ZBT4HP6E.mjs.map +0 -1
  318. package/dist/esm/chunk-ZTIRBBNS.mjs +0 -2
  319. /package/dist/esm/{chunk-4ILXLBGX.mjs.map → chunk-3CLYWZYZ.mjs.map} +0 -0
  320. /package/dist/esm/{chunk-C7YANDB2.mjs.map → chunk-3F6EYD5O.mjs.map} +0 -0
  321. /package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-52C73T26.mjs.map} +0 -0
  322. /package/dist/esm/{chunk-SOBCWGBM.mjs.map → chunk-54BANKLA.mjs.map} +0 -0
  323. /package/dist/esm/{chunk-6BR5UJDT.mjs.map → chunk-63AIRYJX.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-WHA7RISE.mjs.map → chunk-647IOEXV.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-LPB7SZHL.mjs.map → chunk-A7MSW6OL.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-RIUFW2OG.mjs.map → chunk-AP7UZTPZ.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-EV75CYGN.mjs.map → chunk-BSEQPVD6.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-UEKKYJGA.mjs.map → chunk-G2QII3AT.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-DUP7XY5P.mjs.map → chunk-GXVUN32G.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-EKR6HLSN.mjs.map → chunk-H4UVHJ3M.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-GKGTODGE.mjs.map → chunk-HB6T27S2.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-KS7UY4W5.mjs.map → chunk-HXN2WRUX.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-URTTOOEM.mjs.map → chunk-KL6VJ3UK.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-MXO53VAI.mjs.map → chunk-KOAUBVO6.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-KXR3IUJ7.mjs.map → chunk-KUOIRTNL.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-KVIVMWN5.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-W3V4IGGB.mjs.map → chunk-L4Q2XTHT.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-V6FZ7WZH.mjs.map → chunk-ONDQ4MK7.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-SK5TPUAN.mjs.map → chunk-QK4P26SH.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-Y2MYVQVT.mjs.map → chunk-QVKMFPAV.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-IYSHHN5A.mjs.map → chunk-QW3VNZJ7.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-TBFLWWV4.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-ZTIRBBNS.mjs.map → chunk-TGLSJGFO.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-Q73VKL3A.mjs.map → chunk-V4YBGBCN.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-WMJXRWVE.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-6ILDDGAX.mjs.map → chunk-VBTJVPAM.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-U43KR4TW.mjs.map → chunk-XYLYHSEI.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-TTUXAKCV.mjs.map → chunk-Y5M5DD64.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-YWQLLV2R.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-XX5J7KKC.mjs.map → chunk-ZEXZ4CX5.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-6APZ5TPE.mjs.map → chunk-ZKNM27TR.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-QJAI7DNA.mjs.map → chunk-ZPNCA4C7.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  369. /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
@@ -962,6 +962,7 @@ type ClientHeadersType = {
962
962
  interface ClientRequest<Req> {
963
963
  url: string;
964
964
  method: "GET" | "POST";
965
+ originMethod?: string;
965
966
  body?: Req;
966
967
  contentType?: string;
967
968
  params?: any;
@@ -3020,7 +3021,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
3020
3021
  * The Ed25519 signing key
3021
3022
  * @private
3022
3023
  */
3023
- private readonly signingKeyPair;
3024
+ private readonly signingKey;
3024
3025
  /**
3025
3026
  * Create a new PrivateKey instance from a Uint8Array or String.
3026
3027
  *
@@ -3104,6 +3105,13 @@ declare class Ed25519Signature extends Signature {
3104
3105
  toUint8Array(): Uint8Array;
3105
3106
  serialize(serializer: Serializer): void;
3106
3107
  static deserialize(deserializer: Deserializer): Ed25519Signature;
3108
+ /**
3109
+ * Checks if an ED25519 signature is non-canonical.
3110
+ *
3111
+ * Comes from Aptos Core
3112
+ * https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos-crypto/src/ed25519/ed25519_sigs.rs#L47-L85
3113
+ */
3114
+ isCanonicalSignature(): boolean;
3107
3115
  }
3108
3116
 
3109
3117
  type DerivedKeys = {
@@ -3440,6 +3448,11 @@ declare class Secp256k1PublicKey extends PublicKey {
3440
3448
  * @param hexInput A HexInput (string or Uint8Array)
3441
3449
  */
3442
3450
  constructor(hexInput: HexInput);
3451
+ /**
3452
+ * Verifies a Secp256k1 signature against the public key
3453
+ *
3454
+ * Note signatures are validated to be canonical as a malleability check
3455
+ */
3443
3456
  verifySignature(args: VerifySignatureArgs): boolean;
3444
3457
  toUint8Array(): Uint8Array;
3445
3458
  serialize(serializer: Serializer): void;
@@ -3497,6 +3510,8 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
3497
3510
  /**
3498
3511
  * Sign the given message with the private key.
3499
3512
  *
3513
+ * Note: signatures are canonical, and non-malleable
3514
+ *
3500
3515
  * @param message a message as a string or Uint8Array
3501
3516
  * @returns Signature
3502
3517
  */
@@ -3986,6 +4001,10 @@ declare enum ProcessorType {
3986
4001
 
3987
4002
  /**
3988
4003
  * This class holds the config information for the SDK client instance.
4004
+ *
4005
+ * @example
4006
+ *
4007
+ * const aptosConfig = new AptosConfig({network:Network.TESTNET})
3989
4008
  */
3990
4009
  declare class AptosConfig {
3991
4010
  /**
@@ -4088,7 +4107,9 @@ declare class Account {
4088
4107
  *
4089
4108
  * @returns Account module
4090
4109
  *
4091
- * @example An example of an account module
4110
+ * @example
4111
+ * const module = await aptos.getAccountModule({accountAddress:"0x456"})
4112
+ * // An example of an account module response
4092
4113
  * ```
4093
4114
  * {
4094
4115
  * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
@@ -4107,6 +4128,9 @@ declare class Account {
4107
4128
  * Note: In order to get all account transactions, this function may call the API
4108
4129
  * multiple times as it auto paginates.
4109
4130
  *
4131
+ * @example
4132
+ * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
4133
+ *
4110
4134
  * @param args.accountAddress Aptos account address
4111
4135
  * @param args.options.offset The number transaction to start returning results from
4112
4136
  * @param args.options.limit The number of results to return
@@ -4123,6 +4147,9 @@ declare class Account {
4123
4147
  * Note: In order to get all account resources, this function may call the API
4124
4148
  * multiple times as it auto paginates.
4125
4149
  *
4150
+ * @example
4151
+ * const resources = await aptos.getAccountResources({accountAddress:"0x456"})
4152
+ *
4126
4153
  * @param args.accountAddress Aptos account address
4127
4154
  * @param args.options.offset The number resource to start returning results from
4128
4155
  * @param args.options.limit The number of results to return
@@ -4144,12 +4171,9 @@ declare class Account {
4144
4171
  *
4145
4172
  * @returns Account resource
4146
4173
  *
4147
- * @example An example of an account resource
4148
- * ```
4149
- * {
4150
- * value: 6
4151
- * }
4152
- * ```
4174
+ * @example
4175
+ * const resource = await aptos.getAccountResource({accountAddress:"0x456"})
4176
+ *
4153
4177
  */
4154
4178
  getAccountResource<T extends {} = any>(args: {
4155
4179
  accountAddress: AccountAddressInput;
@@ -4161,6 +4185,9 @@ declare class Account {
4161
4185
  *
4162
4186
  * This handles both if the account's authentication key has been rotated or not.
4163
4187
  *
4188
+ * @example
4189
+ * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
4190
+ *
4164
4191
  * @param args.authenticationKey The authentication key
4165
4192
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4166
4193
  * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
@@ -4174,6 +4201,9 @@ declare class Account {
4174
4201
  /**
4175
4202
  * Queries the current count of tokens owned by an account
4176
4203
  *
4204
+ * @example
4205
+ * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
4206
+ *
4177
4207
  * @param args.accountAddress The account address
4178
4208
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4179
4209
  * @returns Current count of tokens owned by the account
@@ -4188,6 +4218,9 @@ declare class Account {
4188
4218
  * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4189
4219
  * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4190
4220
  *
4221
+ * @example
4222
+ * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
4223
+ *
4191
4224
  * @param args.accountAddress The account address we want to get the tokens for
4192
4225
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4193
4226
  * @param args.options.tokenStandard The NFT standard to query for
@@ -4207,6 +4240,9 @@ declare class Account {
4207
4240
  * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4208
4241
  * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4209
4242
  *
4243
+ * @example
4244
+ * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
4245
+ *
4210
4246
  * @param args.accountAddress The account address we want to get the tokens for
4211
4247
  * @param args.collectionAddress The address of the collection being queried
4212
4248
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -4228,6 +4264,9 @@ declare class Account {
4228
4264
  * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4229
4265
  * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4230
4266
  *
4267
+ * @example
4268
+ * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
4269
+ *
4231
4270
  * @param args.accountAddress The account address we want to get the collections for
4232
4271
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4233
4272
  * @param args.options.tokenStandard The NFT standard to query for
@@ -4244,6 +4283,9 @@ declare class Account {
4244
4283
  /**
4245
4284
  * Queries the current count of transactions submitted by an account
4246
4285
  *
4286
+ * @example
4287
+ * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
4288
+ *
4247
4289
  * @param args.accountAddress The account address we want to get the total count for
4248
4290
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4249
4291
  * @returns Current count of transactions made by an account
@@ -4255,6 +4297,9 @@ declare class Account {
4255
4297
  /**
4256
4298
  * Queries an account's coins data
4257
4299
  *
4300
+ * @example
4301
+ * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
4302
+ *
4258
4303
  * @param args.accountAddress The account address we want to get the coins data for
4259
4304
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4260
4305
  * @param args.options.offset optional. The number coin to start returning results from
@@ -4271,6 +4316,9 @@ declare class Account {
4271
4316
  /**
4272
4317
  * Queries the current count of an account's coins aggregated
4273
4318
  *
4319
+ * @example
4320
+ * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
4321
+ *
4274
4322
  * @param args.accountAddress The account address we want to get the total count for
4275
4323
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4276
4324
  * @returns Current count of the aggregated count of all account's coins
@@ -4282,6 +4330,9 @@ declare class Account {
4282
4330
  /**
4283
4331
  * Queries the account's APT amount
4284
4332
  *
4333
+ * @example
4334
+ * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
4335
+ *
4285
4336
  * @param args.accountAddress The account address we want to get the total count for
4286
4337
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4287
4338
  * @returns Current amount of account's APT
@@ -4293,6 +4344,9 @@ declare class Account {
4293
4344
  /**
4294
4345
  * Queries the account's coin amount by the coin type
4295
4346
  *
4347
+ * @example
4348
+ * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
4349
+ *
4296
4350
  * @param args.accountAddress The account address we want to get the total count for
4297
4351
  * @param args.coinType The coin type to query
4298
4352
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -4306,6 +4360,9 @@ declare class Account {
4306
4360
  /**
4307
4361
  * Queries an account's owned objects
4308
4362
  *
4363
+ * @example
4364
+ * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
4365
+ *
4309
4366
  * @param args.accountAddress The account address we want to get the objects for
4310
4367
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4311
4368
  * @param args.options.offset The starting position to start returning results from
@@ -4329,6 +4386,9 @@ declare class Account {
4329
4386
  * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
4330
4387
  * on that.
4331
4388
  *
4389
+ * @example
4390
+ * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
4391
+ *
4332
4392
  * @param args.privateKey An account private key
4333
4393
  * @returns Account type
4334
4394
  */
@@ -5156,6 +5216,13 @@ declare class Coin {
5156
5216
  /**
5157
5217
  * Generate a transfer coin transaction that can be simulated and/or signed and submitted
5158
5218
  *
5219
+ * @example
5220
+ * const transferCoinTransaction = await aptos.transferCoinTransaction({
5221
+ * sender: "0x123",
5222
+ * recipient:"0x456",
5223
+ * amount: 10,
5224
+ * })
5225
+ *
5159
5226
  * @param args.sender The sender account
5160
5227
  * @param args.recipient The recipient address
5161
5228
  * @param args.amount The amount to transfer
@@ -5220,6 +5287,9 @@ declare class DigitalAsset {
5220
5287
  * If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
5221
5288
  * can pass an optional `tokenStandard` parameter to query a specific standard
5222
5289
  *
5290
+ * @example
5291
+ * const collection = await aptos.getCollectionData({creatorAddress:"0x123",collectionName:"myCollection"})
5292
+ *
5223
5293
  * @param args.creatorAddress the address of the collection's creator
5224
5294
  * @param args.collectionName the name of the collection
5225
5295
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5235,6 +5305,9 @@ declare class DigitalAsset {
5235
5305
  /**
5236
5306
  * Queries data of a specific collection by the collection ID.
5237
5307
  *
5308
+ * @example
5309
+ * const collection = await aptos.getCollectionDataByCollectionId({collectionId:"0x123"})
5310
+ *
5238
5311
  * @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
5239
5312
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5240
5313
  * @returns GetCollectionDataResponse response type
@@ -5249,6 +5322,9 @@ declare class DigitalAsset {
5249
5322
  * This is the same as the collection's object address in V2, but V1 does
5250
5323
  * not use objects, and does not have an address
5251
5324
  *
5325
+ * @example
5326
+ * const collection = await aptos.getCollectionId({creatorAddress:"0x123",collectionName:"myCollection"})
5327
+ *
5252
5328
  * @param args.creatorAddress the address of the collection's creator
5253
5329
  * @param args.collectionName the name of the collection
5254
5330
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5264,6 +5340,9 @@ declare class DigitalAsset {
5264
5340
  /**
5265
5341
  * Gets digital asset data given the address of a digital asset.
5266
5342
  *
5343
+ * @example
5344
+ * const digitalAsset = await aptos.getDigitalAssetData({digitalAssetAddress:"0x123"})
5345
+ *
5267
5346
  * @param args.tokenAddress The address of the digital asset
5268
5347
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5269
5348
  * @returns GetTokenDataResponse containing relevant data to the digital asset.
@@ -5275,6 +5354,9 @@ declare class DigitalAsset {
5275
5354
  /**
5276
5355
  * Gets digital asset ownership data given the address of a digital asset.
5277
5356
  *
5357
+ * @example
5358
+ * const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({digitalAssetAddress:"0x123"})
5359
+ *
5278
5360
  * @param args.tokenAddress The address of the digital asset
5279
5361
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5280
5362
  *
@@ -5287,6 +5369,9 @@ declare class DigitalAsset {
5287
5369
  /**
5288
5370
  * Gets the digital assets that the given address owns.
5289
5371
  *
5372
+ * @example
5373
+ * const digitalAssets = await aptos.getOwnedDigitalAssets({ownerAddress:"0x123"})
5374
+ *
5290
5375
  * @param args.ownerAddress The address of the owner
5291
5376
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5292
5377
  *
@@ -5300,6 +5385,9 @@ declare class DigitalAsset {
5300
5385
  /**
5301
5386
  * Gets the activity data given the address of a digital asset.
5302
5387
  *
5388
+ * @example
5389
+ * const digitalAssetActivity = await aptos.getDigitalAssetActivity({digitalAssetAddress:"0x123"})
5390
+ *
5303
5391
  * @param args.tokenAddress The address of the digital asset
5304
5392
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5305
5393
  *
@@ -5313,6 +5401,14 @@ declare class DigitalAsset {
5313
5401
  /**
5314
5402
  * Creates a new collection within the specified account
5315
5403
  *
5404
+ * @example
5405
+ * const transaction = await aptos.createCollectionTransaction({
5406
+ * creator: alice,
5407
+ * description: "collectionDescription",
5408
+ * name: "collectionName",
5409
+ * uri: "collection-uri.com",
5410
+ * });
5411
+ *
5316
5412
  * @param args.creator the account of the collection's creator
5317
5413
  * @param args.description the description of the collection
5318
5414
  * @param args.name the name of the collection
@@ -5346,6 +5442,15 @@ declare class DigitalAsset {
5346
5442
  /**
5347
5443
  * Create a transaction to mint a digital asset into the creators account within an existing collection.
5348
5444
  *
5445
+ * @example
5446
+ * const transaction = await aptos.mintDigitalAssetTransaction({
5447
+ * creator: alice,
5448
+ * description: "collectionDescription",
5449
+ * collection: "collectionName",
5450
+ * name: "digitalAssetName",
5451
+ * uri: "digital-asset-uri.com",
5452
+ * });
5453
+ *
5349
5454
  * @param args.creator the creator of the collection
5350
5455
  * @param args.collection the name of the collection the digital asset belongs to
5351
5456
  * @param args.description the description of the digital asset
@@ -5371,6 +5476,13 @@ declare class DigitalAsset {
5371
5476
  * We can transfer a digital asset only when the digital asset is not frozen
5372
5477
  * (i.e. owner transfer is not disabled such as for soul bound digital assets)
5373
5478
  *
5479
+ * @example
5480
+ * const transaction = await aptos.transferDigitalAssetTransaction({
5481
+ * sender: alice,
5482
+ * digitalAssetAddress: "0x123",
5483
+ * recipient: "0x456",
5484
+ * });
5485
+ *
5374
5486
  * @param args.sender The sender account of the current digital asset owner
5375
5487
  * @param args.digitalAssetAddress The digital asset address
5376
5488
  * @param args.recipient The recipient account address
@@ -5388,6 +5500,16 @@ declare class DigitalAsset {
5388
5500
  /**
5389
5501
  * Mint a soul bound digital asset into a recipient's account
5390
5502
  *
5503
+ * @example
5504
+ * const transaction = await aptos.mintSoulBoundTransaction({
5505
+ * account: alice,
5506
+ * collection: "collectionName",
5507
+ * description: "collectionDescription",
5508
+ * name: "digitalAssetName",
5509
+ * uri: "digital-asset-uri.com",
5510
+ * recipient: "0x123"
5511
+ * });
5512
+ *
5391
5513
  * @param args.account The account that mints the digital asset
5392
5514
  * @param args.collection The collection name that the digital asset belongs to
5393
5515
  * @param args.description The digital asset description
@@ -5406,7 +5528,7 @@ declare class DigitalAsset {
5406
5528
  description: string;
5407
5529
  name: string;
5408
5530
  uri: string;
5409
- recipient: AccountAddress;
5531
+ recipient: AccountAddressInput;
5410
5532
  propertyKeys?: Array<string>;
5411
5533
  propertyTypes?: Array<PropertyType>;
5412
5534
  propertyValues?: Array<PropertyValue>;
@@ -5415,6 +5537,12 @@ declare class DigitalAsset {
5415
5537
  /**
5416
5538
  * Burn a digital asset by its creator
5417
5539
  *
5540
+ * @example
5541
+ * const transaction = await aptos.burnDigitalAssetTransaction({
5542
+ * creator: alice,
5543
+ * digitalAssetAddress: "0x123",
5544
+ * });
5545
+ *
5418
5546
  * @param args.creator The creator account
5419
5547
  * @param args.digitalAssetAddress The digital asset address
5420
5548
  *
@@ -5429,6 +5557,12 @@ declare class DigitalAsset {
5429
5557
  /**
5430
5558
  * Freeze digital asset transfer ability
5431
5559
  *
5560
+ * @example
5561
+ * const transaction = await aptos.freezeDigitalAssetTransaferTransaction({
5562
+ * creator: alice,
5563
+ * digitalAssetAddress: "0x123",
5564
+ * });
5565
+ *
5432
5566
  * @param args.creator The creator account
5433
5567
  * @param args.digitalAssetAddress The digital asset address
5434
5568
  *
@@ -5443,6 +5577,12 @@ declare class DigitalAsset {
5443
5577
  /**
5444
5578
  * Unfreeze digital asset transfer ability
5445
5579
  *
5580
+ * @example
5581
+ * const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({
5582
+ * creator: alice,
5583
+ * digitalAssetAddress: "0x123",
5584
+ * });
5585
+ *
5446
5586
  * @param args.creator The creator account
5447
5587
  * @param args.digitalAssetAddress The digital asset address
5448
5588
  *
@@ -5457,6 +5597,13 @@ declare class DigitalAsset {
5457
5597
  /**
5458
5598
  * Set the digital asset description
5459
5599
  *
5600
+ * @example
5601
+ * const transaction = await aptos.setDigitalAssetDescriptionTransaction({
5602
+ * creator: alice,
5603
+ * description: "digitalAssetDescription",
5604
+ * digitalAssetAddress: "0x123",
5605
+ * });
5606
+ *
5460
5607
  * @param args.creator The creator account
5461
5608
  * @param args.description The digital asset description
5462
5609
  * @param args.digitalAssetAddress The digital asset address
@@ -5473,6 +5620,13 @@ declare class DigitalAsset {
5473
5620
  /**
5474
5621
  * Set the digital asset name
5475
5622
  *
5623
+ * @example
5624
+ * const transaction = await aptos.setDigitalAssetNameTransaction({
5625
+ * creator: alice,
5626
+ * name: "digitalAssetName",
5627
+ * digitalAssetAddress: "0x123",
5628
+ * });
5629
+ *
5476
5630
  * @param args.creator The creator account
5477
5631
  * @param args.name The digital asset name
5478
5632
  * @param args.digitalAssetAddress The digital asset address
@@ -5489,6 +5643,13 @@ declare class DigitalAsset {
5489
5643
  /**
5490
5644
  * Set the digital asset name
5491
5645
  *
5646
+ * @example
5647
+ * const transaction = await aptos.setDigitalAssetURITransaction({
5648
+ * creator: alice,
5649
+ * uri: "digital-asset-uri.com",
5650
+ * digitalAssetAddress: "0x123",
5651
+ * });
5652
+ *
5492
5653
  * @param args.creator The creator account
5493
5654
  * @param args.uri The digital asset uri
5494
5655
  * @param args.digitalAssetAddress The digital asset address
@@ -5505,6 +5666,15 @@ declare class DigitalAsset {
5505
5666
  /**
5506
5667
  * Add a digital asset property
5507
5668
  *
5669
+ * @example
5670
+ * const transaction = await aptos.addDigitalAssetPropertyTransaction({
5671
+ * creator: alice,
5672
+ * propertyKey: "newKey",
5673
+ * propertyType: "BOOLEAN",
5674
+ * propertyValue: true,
5675
+ * digitalAssetAddress: "0x123",
5676
+ * });
5677
+ *
5508
5678
  * @param args.account The account that mints the digital asset
5509
5679
  * @param args.digitalAssetAddress The digital asset address
5510
5680
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5525,6 +5695,15 @@ declare class DigitalAsset {
5525
5695
  /**
5526
5696
  * Remove a digital asset property
5527
5697
  *
5698
+ * @example
5699
+ * const transaction = await aptos.removeDigitalAssetPropertyTransaction({
5700
+ * creator: alice,
5701
+ * propertyKey: "newKey",
5702
+ * propertyType: "BOOLEAN",
5703
+ * propertyValue: true,
5704
+ * digitalAssetAddress: "0x123",
5705
+ * });
5706
+ *
5528
5707
  * @param args.account The account that mints the digital asset
5529
5708
  * @param args.digitalAssetAddress The digital asset address
5530
5709
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5545,6 +5724,15 @@ declare class DigitalAsset {
5545
5724
  /**
5546
5725
  * Update a digital asset property
5547
5726
  *
5727
+ * @example
5728
+ * const transaction = await aptos.updateDigitalAssetPropertyTransaction({
5729
+ * creator: alice,
5730
+ * propertyKey: "newKey",
5731
+ * propertyType: "BOOLEAN",
5732
+ * propertyValue: false,
5733
+ * digitalAssetAddress: "0x123",
5734
+ * });
5735
+ *
5548
5736
  * @param args.account The account that mints the digital asset
5549
5737
  * @param args.digitalAssetAddress The digital asset address
5550
5738
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5565,6 +5753,15 @@ declare class DigitalAsset {
5565
5753
  /**
5566
5754
  * Add a typed digital asset property
5567
5755
  *
5756
+ * @example
5757
+ * const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({
5758
+ * creator: alice,
5759
+ * propertyKey: "typedKey",
5760
+ * propertyType: "STRING",
5761
+ * propertyValue: "hello",
5762
+ * digitalAssetAddress: "0x123",
5763
+ * });
5764
+ *
5568
5765
  * @param args.account The account that mints the digital asset
5569
5766
  * @param args.digitalAssetAddress The digital asset address
5570
5767
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5585,6 +5782,15 @@ declare class DigitalAsset {
5585
5782
  /**
5586
5783
  * Update a typed digital asset property
5587
5784
  *
5785
+ * @example
5786
+ * const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({
5787
+ * creator: alice,
5788
+ * propertyKey: "typedKey",
5789
+ * propertyType: "U8",
5790
+ * propertyValue: 2,
5791
+ * digitalAssetAddress: "0x123",
5792
+ * });
5793
+ *
5588
5794
  * @param args.account The account that mints the digital asset
5589
5795
  * @param args.digitalAssetAddress The digital asset address
5590
5796
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5613,6 +5819,9 @@ declare class Event {
5613
5819
  /**
5614
5820
  * Get module events by event type
5615
5821
  *
5822
+ * @example
5823
+ * const events = await aptos.getModuleEventsByEventType({eventType:"0x1::transaction_fee::FeeStatement"})
5824
+ *
5616
5825
  * @param args.eventType - The event type
5617
5826
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5618
5827
  *
@@ -5626,6 +5835,9 @@ declare class Event {
5626
5835
  /**
5627
5836
  * Get events by creation number and an account address
5628
5837
  *
5838
+ * @example
5839
+ * const events = await aptos.getAccountEventsByCreationNumber({accountAddress:"0x123",creationNumber: 0})
5840
+ *
5629
5841
  * @param args.accountAddress - The account address
5630
5842
  * @param args.creationNumber - The event creation number
5631
5843
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5640,6 +5852,9 @@ declare class Event {
5640
5852
  /**
5641
5853
  * Get events by event type and an account address
5642
5854
  *
5855
+ * @example
5856
+ * const events = await aptos.getAccountEventsByEventType({accountAddress:"0x123",eventType: "0x1::transaction_fee::FeeStatement"})
5857
+ *
5643
5858
  * @param args.accountAddress - The account address
5644
5859
  * @param args.eventType - The event type
5645
5860
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5656,15 +5871,11 @@ declare class Event {
5656
5871
  * Get all events
5657
5872
  *
5658
5873
  * An optional `where` can be passed in to filter out the response.
5659
- *@param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5874
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5660
5875
  * @example
5661
- * ```
5662
- * { where:
5663
- * {
5664
- * transaction_version: { _eq: 123456 },
5665
- * }
5666
- * }
5667
- * ```
5876
+ * const events = await aptos.getEvents()
5877
+ * // with filtering
5878
+ * const events = await aptos.getEvents({options: { where: { account_address: { _eq: "0x123" } } }});
5668
5879
  *
5669
5880
  * @returns GetEventsQuery response type
5670
5881
  */
@@ -5684,6 +5895,9 @@ declare class Faucet {
5684
5895
  * This creates an account if it does not exist and mints the specified amount of
5685
5896
  * coins into that account
5686
5897
  *
5898
+ * @example
5899
+ * const transaction = await aptos.fundAccount({accountAddress:"0x123", amount: 100})
5900
+ *
5687
5901
  * @param args.accountAddress Address of the account to fund
5688
5902
  * @param args.amount Amount of tokens to fund the account with
5689
5903
  * @param args.options Configuration options for waitForTransaction
@@ -5912,7 +6126,11 @@ declare class FungibleAsset {
5912
6126
  /**
5913
6127
  * Queries all fungible asset metadata.
5914
6128
  *
6129
+ * @example
6130
+ * const fungibleAsset = await aptos.getFungibleAssetMetadata()
6131
+ *
5915
6132
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6133
+ * @param args.options Optional configuration for pagination and filtering
5916
6134
  *
5917
6135
  * @returns A list of fungible asset metadata
5918
6136
  */
@@ -5925,6 +6143,9 @@ declare class FungibleAsset {
5925
6143
  *
5926
6144
  * This query returns the fungible asset metadata for a specific fungible asset.
5927
6145
  *
6146
+ * @example
6147
+ * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:"0x123::test_coin::TestCoin"})
6148
+ *
5928
6149
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5929
6150
  * @param args.assetType The asset type of the fungible asset.
5930
6151
  * e.g
@@ -5940,7 +6161,11 @@ declare class FungibleAsset {
5940
6161
  /**
5941
6162
  * Queries all fungible asset activities
5942
6163
  *
6164
+ * @example
6165
+ * const fungibleAssetActivities = await aptos.getFungibleAssetActivities()
6166
+ *
5943
6167
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6168
+ * @param args.options Optional configuration for pagination and filtering
5944
6169
  *
5945
6170
  * @returns A list of fungible asset metadata
5946
6171
  */
@@ -5951,7 +6176,11 @@ declare class FungibleAsset {
5951
6176
  /**
5952
6177
  * Queries all fungible asset balances
5953
6178
  *
6179
+ * @example
6180
+ * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()
6181
+ *
5954
6182
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6183
+ * @param args.options Optional configuration for pagination and filtering
5955
6184
  *
5956
6185
  * @returns A list of fungible asset metadata
5957
6186
  */
@@ -5960,10 +6189,18 @@ declare class FungibleAsset {
5960
6189
  options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
5961
6190
  }): Promise<GetCurrentFungibleAssetBalancesResponse>;
5962
6191
  /**
5963
- * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
6192
+ * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
5964
6193
  *
5965
6194
  * Use this method to transfer any fungible asset including fungible token.
5966
6195
  *
6196
+ * @example
6197
+ * const transaction = await aptos.transferFungibleAsset({
6198
+ * sender: alice,
6199
+ * fungibleAssetMetadataAddress: "0x123",
6200
+ * recipient: "0x456",
6201
+ * amount: 5
6202
+ * })
6203
+ *
5967
6204
  * @param sender The sender account
5968
6205
  * @param fungibleAssetMetadataAddress The fungible asset account address.
5969
6206
  * For example if you’re transferring USDT this would be the USDT address
@@ -5974,8 +6211,8 @@ declare class FungibleAsset {
5974
6211
  */
5975
6212
  transferFungibleAsset(args: {
5976
6213
  sender: Account$1;
5977
- fungibleAssetMetadataAddress: AccountAddress;
5978
- recipient: AccountAddress;
6214
+ fungibleAssetMetadataAddress: AccountAddressInput;
6215
+ recipient: AccountAddressInput;
5979
6216
  amount: AnyNumber;
5980
6217
  options?: InputGenerateTransactionOptions;
5981
6218
  }): Promise<SimpleTransaction>;
@@ -5992,7 +6229,9 @@ declare class General {
5992
6229
  *
5993
6230
  * @returns Aptos Ledger Info
5994
6231
  *
5995
- * @example An example of the returned data
6232
+ * @example
6233
+ * const ledgerInfo = await aptos.getLedgerInfo()
6234
+ * // an example of the returned data
5996
6235
  * ```
5997
6236
  * {
5998
6237
  * "chain_id": 4,
@@ -6011,12 +6250,18 @@ declare class General {
6011
6250
  /**
6012
6251
  * Queries for the chain id
6013
6252
  *
6253
+ * @example
6254
+ * const chainId = await aptos.getChainId()
6255
+ *
6014
6256
  * @returns The chain id
6015
6257
  */
6016
6258
  getChainId(): Promise<number>;
6017
6259
  /**
6018
6260
  * Queries for block by transaction version
6019
6261
  *
6262
+ * @example
6263
+ * const block = await aptos.getBlockByVersion({ledgerVersion:5})
6264
+ *
6020
6265
  * @param args.ledgerVersion Ledger version to lookup block information for
6021
6266
  * @param args.options.withTransactions If set to true, include all transactions in the block
6022
6267
  *
@@ -6031,6 +6276,9 @@ declare class General {
6031
6276
  /**
6032
6277
  * Get block by block height
6033
6278
  *
6279
+ * @example
6280
+ * const block = await aptos.getBlockByVersion({blockHeight:5})
6281
+ *
6034
6282
  * @param args.blockHeight Block height to lookup. Starts at 0
6035
6283
  * @param args.options.withTransactions If set to true, include all transactions in the block
6036
6284
  *
@@ -6045,17 +6293,21 @@ declare class General {
6045
6293
  /**
6046
6294
  * Queries for a table item for a table identified by the handle and the key for the item.
6047
6295
  * Key and value types need to be passed in to help with key serialization and value deserialization.
6296
+ *
6297
+ * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
6298
+ * const tableItem = await aptos.getTableItem({
6299
+ * handle: "0x123",
6300
+ * data: {
6301
+ * key_type: "address", // Move type of table key
6302
+ * value_type: "u128", // Move type of table value
6303
+ * key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
6304
+ * },
6305
+ * })
6306
+ *
6048
6307
  * @param args.handle A pointer to where that table is stored
6049
6308
  * @param args.data Object that describes table item
6050
6309
  * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
6051
6310
  *
6052
- * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
6053
- * {
6054
- * data.key_type = "address" // Move type of table key
6055
- * data.value_type = "u128" // Move type of table value
6056
- * data.key = "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
6057
- * }
6058
- *
6059
6311
  * @returns Table item value rendered in JSON
6060
6312
  */
6061
6313
  getTableItem<T>(args: {
@@ -6067,14 +6319,15 @@ declare class General {
6067
6319
  * Queries for a Move view function
6068
6320
  * @param args.payload Payload for the view function
6069
6321
  * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
6322
+ *
6070
6323
  * @example
6071
- * `
6072
- * const payload: ViewRequest = {
6073
- * function: "0x1::coin::balance",
6074
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
6075
- * functionArguments: [accountAddress],
6076
- * };
6077
- * `
6324
+ * const data = await aptos.view({
6325
+ * payload: {
6326
+ * function: "0x1::coin::balance",
6327
+ * typeArguments: ["0x1::aptos_coin::AptosCoin"],
6328
+ * functionArguments: [accountAddress],
6329
+ * }
6330
+ * })
6078
6331
  *
6079
6332
  * @returns an array of Move values
6080
6333
  */
@@ -6085,6 +6338,9 @@ declare class General {
6085
6338
  /**
6086
6339
  * Queries top user transactions
6087
6340
  *
6341
+ * @example
6342
+ * const topUserTransactions = await aptos.getChainTopUserTransactions({limit:5})
6343
+ *
6088
6344
  * @param args.limit The number of transactions to return
6089
6345
  * @returns GetChainTopUserTransactionsResponse
6090
6346
  */
@@ -6096,18 +6352,16 @@ declare class General {
6096
6352
  * For more detailed queries specification see
6097
6353
  * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
6098
6354
  *
6099
- * @param args.query.query A GraphQL query
6100
- * @param args.query.variables The variables for the query
6101
6355
  * @example
6102
- * ```
6103
- * {
6356
+ * const topUserTransactions = await aptos.queryIndexer({
6104
6357
  * query: `query MyQuery {
6105
- ledger_infos {
6106
- chain_id
6107
- }
6108
- }`;
6109
- * }
6110
- * ```
6358
+ * ledger_infos {
6359
+ * chain_id
6360
+ * }}`;
6361
+ * })
6362
+ *
6363
+ * @param args.query.query A GraphQL query
6364
+ * @param args.query.variables The variables for the query
6111
6365
  *
6112
6366
  * @return The provided T type
6113
6367
  */
@@ -6118,11 +6372,17 @@ declare class General {
6118
6372
  * Queries for the last successful indexer version
6119
6373
  *
6120
6374
  * This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.
6375
+ *
6376
+ * @example
6377
+ * const version = await aptos.getIndexerLastSuccessVersion()
6121
6378
  */
6122
6379
  getIndexerLastSuccessVersion(): Promise<bigint>;
6123
6380
  /**
6124
6381
  * Query the processor status for a specific processor type.
6125
6382
  *
6383
+ * @example
6384
+ * const status = await aptos.getProcessorStatus({processorType:"account_transactions_processor"})
6385
+ *
6126
6386
  * @param processorType The processor type to query
6127
6387
  * @returns
6128
6388
  */
@@ -6179,11 +6439,10 @@ declare class ANS {
6179
6439
  /**
6180
6440
  * Retrieve the owner address of a domain name or subdomain name from the contract.
6181
6441
  *
6182
- * ```ts
6442
+ * @example
6183
6443
  * // Will return the owner address of "test.aptos.apt" or undefined
6184
6444
  * const owner = await aptos.getOwnerAddress({name: "test.aptos"})
6185
6445
  * // owner = 0x123...
6186
- * ```
6187
6446
  *
6188
6447
  * @param args.name - A string of the name to retrieve
6189
6448
  *
@@ -6195,11 +6454,10 @@ declare class ANS {
6195
6454
  /**
6196
6455
  * Retrieve the expiration time of a domain name or subdomain name from the contract.
6197
6456
  *
6198
- * ```ts
6457
+ * @example
6199
6458
  * // Will return the expiration of "test.aptos.apt" or undefined
6200
6459
  * const exp = await aptos.getExpiration({name: "test.aptos"})
6201
6460
  * // new Date(exp) would give you the date in question: 2021-01-01T00:00:00.000Z
6202
- * ```
6203
6461
  *
6204
6462
  * @param args.name - A string of the name to retrieve
6205
6463
  *
@@ -6213,10 +6471,9 @@ declare class ANS {
6213
6471
  * address the name points to for use on chain. Note, the target address can
6214
6472
  * point to addresses that are not the owner of the name
6215
6473
  *
6216
- * ```ts
6474
+ * @example
6217
6475
  * const targetAddr = await aptos.getTargetAddress({name: "test.aptos"})
6218
6476
  * // targetAddr = 0x123...
6219
- * ```
6220
6477
  *
6221
6478
  * @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.
6222
6479
  *
@@ -6230,11 +6487,10 @@ declare class ANS {
6230
6487
  * address the name points to for use on chain. Note, the target address can
6231
6488
  * point to addresses that are not the owner of the name
6232
6489
  *
6233
- * ```ts
6490
+ * @example
6234
6491
  * await aptos.setTargetAddress({sender: alice, name: "test.aptos", address: bob.accountAddress})
6235
6492
  * const address = await aptos.getTargetAddress({name: "test.aptos"})
6236
6493
  * // address = bob.accountAddress
6237
- * ```
6238
6494
  *
6239
6495
  * @param args.name - A string of the name: test.aptos.apt, test.apt, test, test.aptos, etc.
6240
6496
  * @param args.address - A AccountAddressInput of the address to set the domain or subdomain to
@@ -6252,10 +6508,9 @@ declare class ANS {
6252
6508
  * multiple names that target it, but only a single name that is primary. An
6253
6509
  * account also may not have a primary name.
6254
6510
  *
6255
- * ```ts
6511
+ * @example
6256
6512
  * const name = await aptos.getPrimaryName({address: alice.accountAddress})
6257
6513
  * // name = test.aptos
6258
- * ```
6259
6514
  *
6260
6515
  * @param args.address - A AccountAddressInput (address) of the account
6261
6516
  *
@@ -6269,11 +6524,10 @@ declare class ANS {
6269
6524
  * multiple names that target it, but only a single name that is primary. An
6270
6525
  * account also may not have a primary name.
6271
6526
  *
6272
- * ```ts
6527
+ * @example
6273
6528
  * await aptos.setPrimaryName({sender: alice, name: "test.aptos"})
6274
6529
  * const primaryName = await aptos.getPrimaryName({address: alice.accountAddress})
6275
6530
  * // primaryName = test.aptos
6276
- * ```
6277
6531
  *
6278
6532
  * @param args.sender - The sender account
6279
6533
  * @param args.name - A string of the name: test, test.apt, test.aptos, test.aptos.apt, etc.
@@ -6288,7 +6542,7 @@ declare class ANS {
6288
6542
  /**
6289
6543
  * Registers a new name
6290
6544
  *
6291
- * ```ts
6545
+ * @example
6292
6546
  * // An example of registering a subdomain name assuming def.apt is already registered
6293
6547
  * // and belongs to the sender alice.
6294
6548
  * const txn = aptos.registerName({
@@ -6299,7 +6553,6 @@ declare class ANS {
6299
6553
  * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000,
6300
6554
  * },
6301
6555
  * });
6302
- * ```
6303
6556
  *
6304
6557
  * @param args.sender - The sender account
6305
6558
  * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix.
@@ -6326,10 +6579,9 @@ declare class ANS {
6326
6579
  *
6327
6580
  * Note: If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.
6328
6581
  *
6329
- * ```ts
6582
+ * @example
6330
6583
  * await aptos.renewDomain({sender: alice, name: "test"})
6331
6584
  * // test.apt will be renewed for one year
6332
- * ```
6333
6585
  *
6334
6586
  * @param args.sender - The sender account
6335
6587
  * @param args.name - A string of the domain the subdomain will be under. The signer must be the domain owner.
@@ -6418,6 +6670,9 @@ declare class Staking {
6418
6670
  /**
6419
6671
  * Queries current number of delegators in a pool. Throws an error if the pool is not found.
6420
6672
  *
6673
+ * @example
6674
+ * const delegators = await aptos.getNumberOfDelegators({poolAddress:"0x123"})
6675
+ *
6421
6676
  * @param args.poolAddress Pool address
6422
6677
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6423
6678
  * @returns The number of delegators for the given pool
@@ -6429,6 +6684,9 @@ declare class Staking {
6429
6684
  /**
6430
6685
  * Queries current number of delegators in a pool. Throws an error if the pool is not found.
6431
6686
  *
6687
+ * @example
6688
+ * const delegators = await aptos.getNumberOfDelegatorsForAllPools()
6689
+ *
6432
6690
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6433
6691
  * @returns GetNumberOfDelegatorsForAllPoolsResponse response type
6434
6692
  */
@@ -6439,6 +6697,9 @@ declare class Staking {
6439
6697
  /**
6440
6698
  * Queries delegated staking activities
6441
6699
  *
6700
+ * @example
6701
+ * const delegators = await aptos.getDelegatedStakingActivities({delegatorAddress:"0x123",poolAddress:"0x456"})
6702
+ *
6442
6703
  * @param args.delegatorAddress Delegator address
6443
6704
  * @param args.poolAddress Pool address
6444
6705
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -6889,6 +7150,9 @@ declare class Transaction {
6889
7150
  * Queries on-chain transactions. This function will not return pending
6890
7151
  * transactions. For that, use `getTransactionsByHash`.
6891
7152
  *
7153
+ * @example
7154
+ * const transactions = await aptos.getTransactions()
7155
+ *
6892
7156
  * @param args.options.offset The number transaction to start with
6893
7157
  * @param args.options.limit Number of results to return
6894
7158
  *
@@ -6900,6 +7164,9 @@ declare class Transaction {
6900
7164
  /**
6901
7165
  * Queries on-chain transaction by version. This function will not return pending transactions.
6902
7166
  *
7167
+ * @example
7168
+ * const transaction = await aptos.getTransactions({ledgerVersion:1})
7169
+ *
6903
7170
  * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.
6904
7171
  * @returns On-chain transaction. Only on-chain transactions have versions, so this
6905
7172
  * function cannot be used to query pending transactions.
@@ -6909,6 +7176,10 @@ declare class Transaction {
6909
7176
  }): Promise<TransactionResponse>;
6910
7177
  /**
6911
7178
  * Queries on-chain transaction by transaction hash. This function will return pending transactions.
7179
+ *
7180
+ * @example
7181
+ * const transaction = await aptos.getTransactionByHash({transactionHash:"0x123"})
7182
+ *
6912
7183
  * @param args.transactionHash - Transaction hash should be hex-encoded bytes string with 0x prefix.
6913
7184
  * @returns Transaction from mempool (pending) or on-chain (committed) transaction
6914
7185
  */
@@ -6924,6 +7195,9 @@ declare class Transaction {
6924
7195
  * 2. Apply hash algorithm SHA3-256 to the hash message bytes.
6925
7196
  * 3. Hex-encode the hash bytes with 0x prefix.
6926
7197
  *
7198
+ * @example
7199
+ * const isPendingTransaction = await aptos.isPendingTransaction({transactionHash:"0x123"})
7200
+ *
6927
7201
  * @param args.transactionHash A hash of transaction
6928
7202
  * @returns `true` if transaction is in pending state and `false` otherwise
6929
7203
  */
@@ -6945,6 +7219,8 @@ declare class Transaction {
6945
7219
  * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.
6946
7220
  * - The function will throw a WaitForTransactionError
6947
7221
  *
7222
+ * @example
7223
+ * const transaction = await aptos.waitForTransaction({transactionHash:"0x123"})
6948
7224
  *
6949
7225
  * @param args.transactionHash The hash of a transaction previously submitted to the blockchain.
6950
7226
  * @param args.options.timeoutSecs Timeout in seconds. Defaults to 20 seconds.
@@ -6962,14 +7238,9 @@ declare class Transaction {
6962
7238
  * For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}
6963
7239
  *
6964
7240
  * @returns Object holding the outputs of the estimate gas API
7241
+ *
6965
7242
  * @example
6966
- * ```
6967
- * {
6968
- * gas_estimate: number;
6969
- * deprioritized_gas_estimate?: number;
6970
- * prioritized_gas_estimate?: number;
6971
- * }
6972
- * ```
7243
+ * const gasPrice = await aptos.waitForTransaction()
6973
7244
  */
6974
7245
  getGasPriceEstimation(): Promise<GasEstimation>;
6975
7246
  /**
@@ -6977,6 +7248,11 @@ declare class Transaction {
6977
7248
  *
6978
7249
  * This allows a user to sign a transaction using their own preferred signing method, and
6979
7250
  * then submit it to the network.
7251
+ *
7252
+ * @example
7253
+ * const transaction = await aptos.transaction.build.simple({...})
7254
+ * const message = await aptos.getSigningMessage({transaction})
7255
+ *
6980
7256
  * @param args.transaction A raw transaction for signing elsewhere
6981
7257
  */
6982
7258
  getSigningMessage(args: {
@@ -6989,6 +7265,13 @@ declare class Transaction {
6989
7265
  * `aptos move compile --save-metadata ...`,
6990
7266
  * For more info {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}
6991
7267
  *
7268
+ * @example
7269
+ * const transaction = await aptos.publishPackageTransaction({
7270
+ * account: alice,
7271
+ * metadataBytes,
7272
+ * moduleBytecode: [byteCode],
7273
+ * })
7274
+ *
6992
7275
  * @param args.account The publisher account
6993
7276
  * @param args.metadataBytes The package metadata bytes
6994
7277
  * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order
@@ -7006,6 +7289,13 @@ declare class Transaction {
7006
7289
  * the account.
7007
7290
  * Note: Only legacy Ed25519 scheme is supported for now.
7008
7291
  * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}
7292
+ *
7293
+ * @example
7294
+ * const response = await aptos.rotateAuthKey({
7295
+ * fromAccount: alice,
7296
+ * toNewPrivateKey: new ED25519PublicKey("0x123"),
7297
+ * })
7298
+ *
7009
7299
  * @param args.fromAccount The account to rotate the auth key for
7010
7300
  * @param args.toNewPrivateKey The new private key to rotate to
7011
7301
  *
@@ -7018,6 +7308,13 @@ declare class Transaction {
7018
7308
  /**
7019
7309
  * Sign a transaction that can later be submitted to chain
7020
7310
  *
7311
+ * @example
7312
+ * const transaction = await aptos.transaction.build.simple({...})
7313
+ * const transaction = await aptos.transaction.sign({
7314
+ * signer: alice,
7315
+ * transaction
7316
+ * })
7317
+ *
7021
7318
  * @param args.signer The signer account
7022
7319
  * @param args.transaction A raw transaction to sign on
7023
7320
  *
@@ -7030,6 +7327,13 @@ declare class Transaction {
7030
7327
  /**
7031
7328
  * Sign a transaction as a fee payer that can later be submitted to chain
7032
7329
  *
7330
+ * @example
7331
+ * const transaction = await aptos.transaction.build.simple({...})
7332
+ * const transaction = await aptos.transaction.signAsFeePayer({
7333
+ * signer: alice,
7334
+ * transaction
7335
+ * })
7336
+ *
7033
7337
  * @param args.signer The fee payer signer account
7034
7338
  * @param args.transaction A raw transaction to sign on
7035
7339
  *
@@ -7067,13 +7371,13 @@ declare class Transaction {
7067
7371
  *
7068
7372
  * @param args.signer The signer account to sign the transaction
7069
7373
  * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses
7070
- * ```
7071
- * {
7072
- * rawTransaction: RawTransaction,
7073
- * secondarySignerAddresses? : Array<AccountAddress>,
7074
- * feePayerAddress?: AccountAddress
7075
- * }
7076
- * ```
7374
+ *
7375
+ * @example
7376
+ * const transaction = await aptos.transaction.build.simple({...})
7377
+ * const transaction = await aptos.signAndSubmitTransaction({
7378
+ * signer: alice,
7379
+ * transaction
7380
+ * })
7077
7381
  *
7078
7382
  * @return PendingTransactionResponse
7079
7383
  */
@@ -7089,6 +7393,10 @@ declare class Transaction {
7089
7393
  *
7090
7394
  * To use the SDK, create a new Aptos instance to get access
7091
7395
  * to all the sdk functionality.
7396
+ *
7397
+ * @example
7398
+ *
7399
+ * const aptos = new Aptos();
7092
7400
  */
7093
7401
  declare class Aptos {
7094
7402
  readonly config: AptosConfig;