@aptos-labs/ts-sdk 5.1.1-side-effect-free.1 → 5.1.2

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 (420) hide show
  1. package/README.md +4 -4
  2. package/dist/common/{account-Dr4y1uZG.d.ts → account-147vfOGb.d.ts} +1 -0
  3. package/dist/common/chunk-347THBDE.js +4 -0
  4. package/dist/common/chunk-347THBDE.js.map +1 -0
  5. package/dist/common/cli/index.d.ts +3 -1
  6. package/dist/common/cli/index.js +1 -1
  7. package/dist/common/cli/index.js.map +1 -1
  8. package/dist/common/index.d.ts +15 -82
  9. package/dist/common/index.js +34 -34
  10. package/dist/common/index.js.map +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  12. package/dist/esm/account/AbstractKeylessAccount.mjs.map +1 -1
  13. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  14. package/dist/esm/account/AbstractedAccount.mjs.map +1 -1
  15. package/dist/esm/account/Account.mjs +1 -1
  16. package/dist/esm/account/Account.mjs.map +1 -1
  17. package/dist/esm/account/AccountUtils.mjs +1 -1
  18. package/dist/esm/account/AccountUtils.mjs.map +1 -1
  19. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  20. package/dist/esm/account/DerivableAbstractedAccount.mjs.map +1 -1
  21. package/dist/esm/account/Ed25519Account.mjs +1 -1
  22. package/dist/esm/account/Ed25519Account.mjs.map +1 -1
  23. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  24. package/dist/esm/account/EphemeralKeyPair.mjs.map +1 -1
  25. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  26. package/dist/esm/account/FederatedKeylessAccount.mjs.map +1 -1
  27. package/dist/esm/account/KeylessAccount.mjs +1 -1
  28. package/dist/esm/account/KeylessAccount.mjs.map +1 -1
  29. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  30. package/dist/esm/account/MultiEd25519Account.mjs.map +1 -1
  31. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  32. package/dist/esm/account/MultiKeyAccount.mjs.map +1 -1
  33. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  34. package/dist/esm/account/SingleKeyAccount.mjs.map +1 -1
  35. package/dist/esm/account/index.mjs +1 -1
  36. package/dist/esm/account/index.mjs.map +1 -1
  37. package/dist/esm/account/utils.mjs +1 -1
  38. package/dist/esm/account/utils.mjs.map +1 -1
  39. package/dist/esm/api/account/abstraction.mjs +1 -1
  40. package/dist/esm/api/account/abstraction.mjs.map +1 -1
  41. package/dist/esm/api/account.d.mts +1 -1
  42. package/dist/esm/api/account.mjs +1 -1
  43. package/dist/esm/api/account.mjs.map +1 -1
  44. package/dist/esm/api/ans.mjs +1 -1
  45. package/dist/esm/api/ans.mjs.map +1 -1
  46. package/dist/esm/api/aptos.d.mts +14 -81
  47. package/dist/esm/api/aptos.mjs +1 -1
  48. package/dist/esm/api/aptos.mjs.map +1 -1
  49. package/dist/esm/api/aptosConfig.mjs +1 -1
  50. package/dist/esm/api/aptosConfig.mjs.map +1 -1
  51. package/dist/esm/api/coin.mjs +1 -1
  52. package/dist/esm/api/coin.mjs.map +1 -1
  53. package/dist/esm/api/digitalAsset.mjs +1 -1
  54. package/dist/esm/api/digitalAsset.mjs.map +1 -1
  55. package/dist/esm/api/faucet.mjs +1 -1
  56. package/dist/esm/api/faucet.mjs.map +1 -1
  57. package/dist/esm/api/fungibleAsset.mjs +1 -1
  58. package/dist/esm/api/fungibleAsset.mjs.map +1 -1
  59. package/dist/esm/api/general.mjs +1 -1
  60. package/dist/esm/api/general.mjs.map +1 -1
  61. package/dist/esm/api/index.d.mts +2 -2
  62. package/dist/esm/api/index.mjs +1 -1
  63. package/dist/esm/api/index.mjs.map +1 -1
  64. package/dist/esm/api/keyless.mjs +1 -1
  65. package/dist/esm/api/keyless.mjs.map +1 -1
  66. package/dist/esm/api/object.mjs +1 -1
  67. package/dist/esm/api/object.mjs.map +1 -1
  68. package/dist/esm/api/staking.mjs +1 -1
  69. package/dist/esm/api/staking.mjs.map +1 -1
  70. package/dist/esm/api/table.mjs +1 -1
  71. package/dist/esm/api/table.mjs.map +1 -1
  72. package/dist/esm/api/transaction.mjs +1 -1
  73. package/dist/esm/api/transaction.mjs.map +1 -1
  74. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  75. package/dist/esm/api/transactionSubmission/build.mjs.map +1 -1
  76. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
  77. package/dist/esm/api/transactionSubmission/helpers.mjs.map +1 -1
  78. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  79. package/dist/esm/api/transactionSubmission/management.mjs.map +1 -1
  80. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  81. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  82. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  83. package/dist/esm/api/transactionSubmission/simulate.mjs.map +1 -1
  84. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  85. package/dist/esm/api/transactionSubmission/submit.mjs.map +1 -1
  86. package/dist/esm/api/utils.mjs +1 -1
  87. package/dist/esm/api/utils.mjs.map +1 -1
  88. package/dist/esm/bcs/consts.mjs +1 -1
  89. package/dist/esm/bcs/consts.mjs.map +1 -1
  90. package/dist/esm/bcs/deserializer.mjs +1 -1
  91. package/dist/esm/bcs/deserializer.mjs.map +1 -1
  92. package/dist/esm/bcs/index.mjs +1 -1
  93. package/dist/esm/bcs/index.mjs.map +1 -1
  94. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  95. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -1
  96. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  97. package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -1
  98. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  99. package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -1
  100. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  101. package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -1
  102. package/dist/esm/bcs/serializer.mjs +1 -1
  103. package/dist/esm/bcs/serializer.mjs.map +1 -1
  104. package/dist/esm/chunk-2OPKZKOB.mjs +2 -0
  105. package/dist/esm/chunk-2OPKZKOB.mjs.map +1 -0
  106. package/dist/esm/chunk-2PASUPUO.mjs +2 -0
  107. package/dist/esm/chunk-2PASUPUO.mjs.map +1 -0
  108. package/dist/esm/chunk-35DKMW7Q.mjs +2 -0
  109. package/dist/esm/chunk-35DKMW7Q.mjs.map +1 -0
  110. package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
  111. package/dist/esm/chunk-4QMXOWHP.mjs.map +1 -0
  112. package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
  113. package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
  114. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  115. package/dist/esm/chunk-56CNRT2K.mjs.map +1 -0
  116. package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
  117. package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
  118. package/dist/esm/chunk-626KB2UQ.mjs +2 -0
  119. package/dist/esm/chunk-626KB2UQ.mjs.map +1 -0
  120. package/dist/esm/chunk-7ECCT6PK.mjs +1 -0
  121. package/dist/esm/chunk-7ECCT6PK.mjs.map +1 -0
  122. package/dist/esm/chunk-A5L76YP7.mjs +2 -0
  123. package/dist/esm/chunk-A5L76YP7.mjs.map +1 -0
  124. package/dist/esm/chunk-AQW4BUKF.mjs +2 -0
  125. package/dist/esm/chunk-AQW4BUKF.mjs.map +1 -0
  126. package/dist/esm/chunk-C3Q23D22.mjs +2 -0
  127. package/dist/esm/chunk-C3Q23D22.mjs.map +1 -0
  128. package/dist/esm/chunk-CW35YAMN.mjs +2 -0
  129. package/dist/esm/chunk-CW35YAMN.mjs.map +1 -0
  130. package/dist/esm/chunk-E2U27PNC.mjs +2 -0
  131. package/dist/esm/chunk-E2U27PNC.mjs.map +1 -0
  132. package/dist/esm/chunk-EBMEXURY.mjs +2 -0
  133. package/dist/esm/chunk-EBMEXURY.mjs.map +1 -0
  134. package/dist/esm/chunk-FC72YL4B.mjs +2 -0
  135. package/dist/esm/chunk-FC72YL4B.mjs.map +1 -0
  136. package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
  137. package/dist/esm/chunk-FD6FGKYY.mjs.map +1 -0
  138. package/dist/esm/chunk-FGFLPH5K.mjs +2 -0
  139. package/dist/esm/chunk-FGFLPH5K.mjs.map +1 -0
  140. package/dist/esm/chunk-FLZPUYXQ.mjs +2 -0
  141. package/dist/esm/chunk-FLZPUYXQ.mjs.map +1 -0
  142. package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
  143. package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
  144. package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
  145. package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
  146. package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
  147. package/dist/esm/chunk-GOXRBEIJ.mjs.map +1 -0
  148. package/dist/esm/chunk-GQ3UIDPQ.mjs +2 -0
  149. package/dist/esm/chunk-GQ3UIDPQ.mjs.map +1 -0
  150. package/dist/esm/chunk-H3EP5CGP.mjs +2 -0
  151. package/dist/esm/chunk-H3EP5CGP.mjs.map +1 -0
  152. package/dist/esm/chunk-HGLO5LDS.mjs +1 -0
  153. package/dist/esm/chunk-HGLO5LDS.mjs.map +1 -0
  154. package/dist/esm/chunk-IF4UU2MT.mjs +2 -0
  155. package/dist/esm/chunk-IF4UU2MT.mjs.map +1 -0
  156. package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
  157. package/dist/esm/chunk-KDMSOCZY.mjs.map +1 -0
  158. package/dist/esm/chunk-LA56UDUK.mjs +2 -0
  159. package/dist/esm/chunk-LA56UDUK.mjs.map +1 -0
  160. package/dist/esm/chunk-LAPXUUHK.mjs +2 -0
  161. package/dist/esm/chunk-LAPXUUHK.mjs.map +1 -0
  162. package/dist/esm/chunk-MCFQE4GC.mjs +2 -0
  163. package/dist/esm/chunk-MCFQE4GC.mjs.map +1 -0
  164. package/dist/esm/chunk-MT2RJ7H3.mjs +2 -0
  165. package/dist/esm/chunk-MT2RJ7H3.mjs.map +1 -0
  166. package/dist/esm/chunk-N6YTF76Q.mjs +2 -0
  167. package/dist/esm/chunk-N6YTF76Q.mjs.map +1 -0
  168. package/dist/esm/chunk-NCKJ7X57.mjs +2 -0
  169. package/dist/esm/chunk-NCKJ7X57.mjs.map +1 -0
  170. package/dist/esm/chunk-NECL5FCQ.mjs +1 -0
  171. package/dist/esm/chunk-NECL5FCQ.mjs.map +1 -0
  172. package/dist/esm/chunk-OLILO7VD.mjs +2 -0
  173. package/dist/esm/chunk-OLILO7VD.mjs.map +1 -0
  174. package/dist/esm/chunk-ORMOQWWH.mjs +2 -0
  175. package/dist/esm/chunk-ORMOQWWH.mjs.map +1 -0
  176. package/dist/esm/chunk-P5HCJN3A.mjs +2 -0
  177. package/dist/esm/chunk-P5HCJN3A.mjs.map +1 -0
  178. package/dist/esm/chunk-PJTG745G.mjs +4 -0
  179. package/dist/esm/chunk-PJTG745G.mjs.map +1 -0
  180. package/dist/esm/chunk-PSSIJHHC.mjs +2 -0
  181. package/dist/esm/chunk-PSSIJHHC.mjs.map +1 -0
  182. package/dist/esm/chunk-Q4W3WJ2U.mjs +2 -0
  183. package/dist/esm/chunk-Q4W3WJ2U.mjs.map +1 -0
  184. package/dist/esm/chunk-QNARIAVM.mjs +2 -0
  185. package/dist/esm/chunk-QNARIAVM.mjs.map +1 -0
  186. package/dist/esm/chunk-QREVMGQZ.mjs +2 -0
  187. package/dist/esm/chunk-QREVMGQZ.mjs.map +1 -0
  188. package/dist/esm/chunk-R7FWJP3N.mjs +2 -0
  189. package/dist/esm/chunk-R7FWJP3N.mjs.map +1 -0
  190. package/dist/esm/chunk-RGKRCZ36.mjs +4 -0
  191. package/dist/esm/chunk-RGKRCZ36.mjs.map +1 -0
  192. package/dist/esm/chunk-RQX6JOEN.mjs +2 -0
  193. package/dist/esm/chunk-RQX6JOEN.mjs.map +1 -0
  194. package/dist/esm/chunk-STY74NUA.mjs +2 -0
  195. package/dist/esm/chunk-STY74NUA.mjs.map +1 -0
  196. package/dist/esm/chunk-TOBQ5UE6.mjs +2 -0
  197. package/dist/esm/chunk-TOBQ5UE6.mjs.map +1 -0
  198. package/dist/esm/chunk-UL777LTI.mjs +494 -0
  199. package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
  200. package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
  201. package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
  202. package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
  203. package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
  204. package/dist/esm/chunk-V74WPKSY.mjs +2 -0
  205. package/dist/esm/chunk-V74WPKSY.mjs.map +1 -0
  206. package/dist/esm/chunk-WCMW2L3P.mjs +2 -0
  207. package/dist/esm/chunk-WCMW2L3P.mjs.map +1 -0
  208. package/dist/esm/chunk-WSR5EBJM.mjs +2 -0
  209. package/dist/esm/chunk-WSR5EBJM.mjs.map +1 -0
  210. package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
  211. package/dist/esm/chunk-XJJVJOX5.mjs.map +1 -0
  212. package/dist/esm/chunk-XKUIMGKU.mjs +2 -0
  213. package/dist/esm/chunk-XKUIMGKU.mjs.map +1 -0
  214. package/dist/esm/chunk-YOZBVVKL.mjs +2 -0
  215. package/dist/esm/chunk-YOZBVVKL.mjs.map +1 -0
  216. package/dist/esm/chunk-YS5IUILF.mjs +2 -0
  217. package/dist/esm/chunk-YS5IUILF.mjs.map +1 -0
  218. package/dist/esm/chunk-YZHAI55C.mjs +7 -0
  219. package/dist/esm/chunk-YZHAI55C.mjs.map +1 -0
  220. package/dist/esm/chunk-ZP4DWSQA.mjs +2 -0
  221. package/dist/esm/chunk-ZP4DWSQA.mjs.map +1 -0
  222. package/dist/esm/chunk-ZYE7UTJZ.mjs +2 -0
  223. package/dist/esm/chunk-ZYE7UTJZ.mjs.map +1 -0
  224. package/dist/esm/cli/index.mjs +1 -1
  225. package/dist/esm/cli/index.mjs.map +1 -1
  226. package/dist/esm/cli/localNode.d.mts +2 -0
  227. package/dist/esm/cli/localNode.mjs +1 -1
  228. package/dist/esm/cli/localNode.mjs.map +1 -1
  229. package/dist/esm/cli/move.mjs +1 -1
  230. package/dist/esm/cli/move.mjs.map +1 -1
  231. package/dist/esm/client/core.mjs +1 -1
  232. package/dist/esm/client/core.mjs.map +1 -1
  233. package/dist/esm/client/get.mjs +1 -1
  234. package/dist/esm/client/get.mjs.map +1 -1
  235. package/dist/esm/client/index.mjs +1 -1
  236. package/dist/esm/client/index.mjs.map +1 -1
  237. package/dist/esm/client/post.mjs +1 -1
  238. package/dist/esm/client/post.mjs.map +1 -1
  239. package/dist/esm/core/account/index.mjs +1 -1
  240. package/dist/esm/core/account/index.mjs.map +1 -1
  241. package/dist/esm/core/account/utils/address.mjs +1 -1
  242. package/dist/esm/core/account/utils/address.mjs.map +1 -1
  243. package/dist/esm/core/account/utils/index.mjs +1 -1
  244. package/dist/esm/core/account/utils/index.mjs.map +1 -1
  245. package/dist/esm/core/accountAddress.mjs +1 -3
  246. package/dist/esm/core/accountAddress.mjs.map +1 -1
  247. package/dist/esm/core/authenticationKey.mjs +1 -1
  248. package/dist/esm/core/authenticationKey.mjs.map +1 -1
  249. package/dist/esm/core/common.mjs +1 -1
  250. package/dist/esm/core/common.mjs.map +1 -1
  251. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  252. package/dist/esm/core/crypto/abstraction.mjs.map +1 -1
  253. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  254. package/dist/esm/core/crypto/deserializationUtils.mjs.map +1 -1
  255. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  256. package/dist/esm/core/crypto/ed25519.mjs.map +1 -1
  257. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  258. package/dist/esm/core/crypto/ephemeral.mjs.map +1 -1
  259. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  260. package/dist/esm/core/crypto/federatedKeyless.mjs.map +1 -1
  261. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  262. package/dist/esm/core/crypto/hdKey.mjs.map +1 -1
  263. package/dist/esm/core/crypto/index.mjs +1 -1
  264. package/dist/esm/core/crypto/index.mjs.map +1 -1
  265. package/dist/esm/core/crypto/keyless.mjs +1 -1
  266. package/dist/esm/core/crypto/keyless.mjs.map +1 -1
  267. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  268. package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -1
  269. package/dist/esm/core/crypto/multiKey.mjs +1 -3
  270. package/dist/esm/core/crypto/multiKey.mjs.map +1 -1
  271. package/dist/esm/core/crypto/poseidon.mjs +1 -1
  272. package/dist/esm/core/crypto/poseidon.mjs.map +1 -1
  273. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  274. package/dist/esm/core/crypto/privateKey.mjs.map +1 -1
  275. package/dist/esm/core/crypto/proof.mjs +1 -1
  276. package/dist/esm/core/crypto/proof.mjs.map +1 -1
  277. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  278. package/dist/esm/core/crypto/publicKey.mjs.map +1 -1
  279. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  280. package/dist/esm/core/crypto/secp256k1.mjs.map +1 -1
  281. package/dist/esm/core/crypto/secp256r1.mjs +1 -1
  282. package/dist/esm/core/crypto/secp256r1.mjs.map +1 -1
  283. package/dist/esm/core/crypto/signature.mjs +1 -1
  284. package/dist/esm/core/crypto/signature.mjs.map +1 -1
  285. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  286. package/dist/esm/core/crypto/singleKey.mjs.map +1 -1
  287. package/dist/esm/core/crypto/types.mjs +1 -0
  288. package/dist/esm/core/crypto/utils.mjs +1 -1
  289. package/dist/esm/core/crypto/utils.mjs.map +1 -1
  290. package/dist/esm/core/hex.mjs +1 -1
  291. package/dist/esm/core/hex.mjs.map +1 -1
  292. package/dist/esm/core/index.mjs +1 -1
  293. package/dist/esm/core/index.mjs.map +1 -1
  294. package/dist/esm/errors/index.mjs +1 -6
  295. package/dist/esm/errors/index.mjs.map +1 -1
  296. package/dist/esm/index.d.mts +1 -1
  297. package/dist/esm/index.mjs +1 -1
  298. package/dist/esm/index.mjs.map +1 -1
  299. package/dist/esm/internal/abstraction.mjs +1 -1
  300. package/dist/esm/internal/abstraction.mjs.map +1 -1
  301. package/dist/esm/internal/account.mjs +1 -1
  302. package/dist/esm/internal/account.mjs.map +1 -1
  303. package/dist/esm/internal/ans.mjs +1 -1
  304. package/dist/esm/internal/ans.mjs.map +1 -1
  305. package/dist/esm/internal/coin.mjs +1 -1
  306. package/dist/esm/internal/coin.mjs.map +1 -1
  307. package/dist/esm/internal/digitalAsset.mjs +1 -1
  308. package/dist/esm/internal/digitalAsset.mjs.map +1 -1
  309. package/dist/esm/internal/faucet.mjs +1 -1
  310. package/dist/esm/internal/faucet.mjs.map +1 -1
  311. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  312. package/dist/esm/internal/fungibleAsset.mjs.map +1 -1
  313. package/dist/esm/internal/general.mjs +1 -1
  314. package/dist/esm/internal/general.mjs.map +1 -1
  315. package/dist/esm/internal/keyless.mjs +1 -1
  316. package/dist/esm/internal/keyless.mjs.map +1 -1
  317. package/dist/esm/internal/object.mjs +1 -1
  318. package/dist/esm/internal/object.mjs.map +1 -1
  319. package/dist/esm/internal/staking.mjs +1 -1
  320. package/dist/esm/internal/staking.mjs.map +1 -1
  321. package/dist/esm/internal/table.mjs +1 -1
  322. package/dist/esm/internal/table.mjs.map +1 -1
  323. package/dist/esm/internal/transaction.mjs +1 -1
  324. package/dist/esm/internal/transaction.mjs.map +1 -1
  325. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  326. package/dist/esm/internal/transactionSubmission.mjs.map +1 -1
  327. package/dist/esm/internal/utils/index.mjs +1 -1
  328. package/dist/esm/internal/utils/index.mjs.map +1 -1
  329. package/dist/esm/internal/utils/utils.mjs +1 -1
  330. package/dist/esm/internal/utils/utils.mjs.map +1 -1
  331. package/dist/esm/internal/view.mjs +1 -1
  332. package/dist/esm/internal/view.mjs.map +1 -1
  333. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  334. package/dist/esm/transactions/authenticator/account.mjs.map +1 -1
  335. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  336. package/dist/esm/transactions/authenticator/index.mjs.map +1 -1
  337. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  338. package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -1
  339. package/dist/esm/transactions/index.mjs +1 -1
  340. package/dist/esm/transactions/index.mjs.map +1 -1
  341. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  342. package/dist/esm/transactions/instances/chainId.mjs.map +1 -1
  343. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  344. package/dist/esm/transactions/instances/identifier.mjs.map +1 -1
  345. package/dist/esm/transactions/instances/index.mjs +1 -1
  346. package/dist/esm/transactions/instances/index.mjs.map +1 -1
  347. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  348. package/dist/esm/transactions/instances/moduleId.mjs.map +1 -1
  349. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  350. package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -1
  351. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  352. package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -1
  353. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  354. package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -1
  355. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  356. package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -1
  357. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  358. package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -1
  359. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -0
  360. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  361. package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -1
  362. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  363. package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +1 -1
  364. package/dist/esm/transactions/management/asyncQueue.mjs +1 -1
  365. package/dist/esm/transactions/management/asyncQueue.mjs.map +1 -1
  366. package/dist/esm/transactions/management/index.mjs +1 -1
  367. package/dist/esm/transactions/management/index.mjs.map +1 -1
  368. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  369. package/dist/esm/transactions/management/transactionWorker.mjs.map +1 -1
  370. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  371. package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -1
  372. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  373. package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -1
  374. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  375. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -1
  376. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  377. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -1
  378. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  379. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  380. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -1
  381. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  382. package/dist/esm/transactions/typeTag/index.mjs.map +1 -1
  383. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  384. package/dist/esm/transactions/typeTag/parser.mjs.map +1 -1
  385. package/dist/esm/transactions/types.mjs +1 -0
  386. package/dist/esm/types/abstraction.mjs +1 -1
  387. package/dist/esm/types/abstraction.mjs.map +1 -1
  388. package/dist/esm/types/generated/queries.mjs +1 -493
  389. package/dist/esm/types/generated/queries.mjs.map +1 -1
  390. package/dist/esm/types/generated/types.mjs +1 -1
  391. package/dist/esm/types/generated/types.mjs.map +1 -1
  392. package/dist/esm/types/index.mjs +1 -1
  393. package/dist/esm/types/index.mjs.map +1 -1
  394. package/dist/esm/types/indexer.mjs +1 -0
  395. package/dist/esm/types/types.mjs +1 -1
  396. package/dist/esm/types/types.mjs.map +1 -1
  397. package/dist/esm/utils/apiEndpoints.d.mts +1 -0
  398. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  399. package/dist/esm/utils/apiEndpoints.mjs.map +1 -1
  400. package/dist/esm/utils/const.mjs +1 -1
  401. package/dist/esm/utils/const.mjs.map +1 -1
  402. package/dist/esm/utils/helpers.mjs +1 -1
  403. package/dist/esm/utils/helpers.mjs.map +1 -1
  404. package/dist/esm/utils/index.mjs +1 -1
  405. package/dist/esm/utils/index.mjs.map +1 -1
  406. package/dist/esm/utils/memoize.mjs +1 -1
  407. package/dist/esm/utils/memoize.mjs.map +1 -1
  408. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  409. package/dist/esm/utils/normalizeBundle.mjs.map +1 -1
  410. package/dist/esm/version.d.mts +1 -1
  411. package/dist/esm/version.mjs +1 -1
  412. package/dist/esm/version.mjs.map +1 -1
  413. package/package.json +1 -22
  414. package/src/api/aptos.ts +51 -193
  415. package/src/cli/localNode.ts +13 -2
  416. package/src/internal/ans.ts +1 -0
  417. package/src/utils/apiEndpoints.ts +9 -2
  418. package/src/version.ts +1 -1
  419. package/dist/common/chunk-AWFAHZSB.js +0 -4
  420. package/dist/common/chunk-AWFAHZSB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/aptosConfig.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport aptosClient from \"@aptos-labs/aptos-client\";\nimport {\n AptosSettings,\n ClientConfig,\n Client,\n FullNodeConfig,\n IndexerConfig,\n FaucetConfig,\n TransactionGenerationConfig,\n PluginConfig,\n TransactionSubmitter,\n} from \"../types\";\nimport {\n NetworkToNodeAPI,\n NetworkToFaucetAPI,\n NetworkToIndexerAPI,\n Network,\n NetworkToPepperAPI,\n NetworkToProverAPI,\n} from \"../utils/apiEndpoints\";\nimport { AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW } from \"../utils/const\";\n\n/**\n * Represents the configuration settings for an Aptos SDK client instance.\n * This class allows customization of various endpoints and client settings.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for connecting to the Aptos testnet\n * const config = new AptosConfig({ network: Network.TESTNET });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\nexport class AptosConfig {\n /**\n * The Network that this SDK is associated with. Defaults to DEVNET\n * @group Client\n */\n readonly network: Network;\n\n /**\n * The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client\n * @group Client\n */\n readonly client: Client;\n\n /**\n * The optional hardcoded fullnode URL to send requests to instead of using the network\n * @group Client\n */\n readonly fullnode?: string;\n\n /**\n * The optional hardcoded faucet URL to send requests to instead of using the network\n * @group Client\n */\n readonly faucet?: string;\n\n /**\n * The optional hardcoded pepper service URL to send requests to instead of using the network\n * @group Client\n */\n readonly pepper?: string;\n\n /**\n * The optional hardcoded prover service URL to send requests to instead of using the network\n * @group Client\n */\n readonly prover?: string;\n\n /**\n * The optional hardcoded indexer URL to send requests to instead of using the network\n * @group Client\n */\n readonly indexer?: string;\n\n /**\n * Optional client configurations\n * @group Client\n */\n readonly clientConfig?: ClientConfig;\n\n /**\n * Optional specific Fullnode configurations\n * @group Client\n */\n readonly fullnodeConfig?: FullNodeConfig;\n\n /**\n * Optional specific Indexer configurations\n * @group Client\n */\n readonly indexerConfig?: IndexerConfig;\n\n /**\n * Optional specific Faucet configurations\n * @group Client\n */\n readonly faucetConfig?: FaucetConfig;\n\n /**\n * Optional specific Transaction Generation configurations\n * @group Client\n */\n readonly transactionGenerationConfig?: TransactionGenerationConfig;\n\n /**\n * Optional plugin config to override client behavior.\n * @group Client\n */\n private pluginConfig?: PluginConfig;\n\n /**\n * Initializes an instance of the Aptos client with the specified settings.\n * This allows users to configure various aspects of the client, such as network and endpoints.\n *\n * @param settings - Optional configuration settings for the Aptos client.\n * @param settings.network - The network to connect to, defaults to `Network.DEVNET`.\n * @param settings.fullnode - The fullnode endpoint to use for requests.\n * @param settings.faucet - The faucet endpoint for obtaining test tokens.\n * @param settings.pepper - The pepper used for transaction signing.\n * @param settings.prover - The prover endpoint for transaction verification.\n * @param settings.indexer - The indexer endpoint for querying blockchain data.\n * @param settings.client - Custom client settings, defaults to a standard Aptos client.\n * @param settings.clientConfig - Additional configuration for the client.\n * @param settings.fullnodeConfig - Additional configuration for the fullnode.\n * @param settings.indexerConfig - Additional configuration for the indexer.\n * @param settings.faucetConfig - Additional configuration for the faucet.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with default settings\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify the network\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n constructor(settings?: AptosSettings) {\n // If there are any endpoint overrides, they are custom networks, keep that in mind\n if (settings?.fullnode || settings?.indexer || settings?.faucet || settings?.pepper || settings?.prover) {\n if (settings?.network === Network.CUSTOM) {\n console.info(\"Note: using CUSTOM network will require queries to lookup ChainId\");\n } else if (!settings?.network) {\n throw new Error(\"Custom endpoints require a network to be specified\");\n }\n }\n\n this.network = settings?.network ?? Network.DEVNET;\n this.fullnode = settings?.fullnode;\n this.faucet = settings?.faucet;\n this.pepper = settings?.pepper;\n this.prover = settings?.prover;\n this.indexer = settings?.indexer;\n this.client = settings?.client ?? { provider: aptosClient };\n this.clientConfig = settings?.clientConfig ?? {};\n this.fullnodeConfig = settings?.fullnodeConfig ?? {};\n this.indexerConfig = settings?.indexerConfig ?? {};\n this.faucetConfig = settings?.faucetConfig ?? {};\n this.transactionGenerationConfig = settings?.transactionGenerationConfig ?? {};\n this.pluginConfig = settings?.pluginSettings\n ? {\n ...settings.pluginSettings,\n IGNORE_TRANSACTION_SUBMITTER: false,\n }\n : undefined;\n }\n\n /**\n * Returns the URL endpoint to send the request to based on the specified API type.\n * If a custom URL was provided in the configuration, that URL is returned. Otherwise, the URL endpoint is derived from the network.\n *\n * @param apiType - The type of Aptos API to get the URL for. This can be one of the following: FULLNODE, FAUCET, INDEXER, PEPPER, PROVER.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, AptosApiType } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the request URL for the FULLNODE API\n * const url = config.getRequestUrl(AptosApiType.FULLNODE);\n * console.log(\"Request URL for FULLNODE:\", url);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n getRequestUrl(apiType: AptosApiType): string {\n switch (apiType) {\n case AptosApiType.FULLNODE:\n if (this.fullnode !== undefined) return this.fullnode;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom full node url\");\n return NetworkToNodeAPI[this.network];\n case AptosApiType.FAUCET:\n if (this.faucet !== undefined) return this.faucet;\n if (this.network === Network.TESTNET) {\n throw new Error(\n \"There is no way to programmatically mint testnet APT, you must use the minting site at https://aptos.dev/network/faucet\",\n );\n }\n if (this.network === Network.MAINNET) {\n throw new Error(\"There is no mainnet faucet\");\n }\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom faucet url\");\n return NetworkToFaucetAPI[this.network];\n case AptosApiType.INDEXER:\n if (this.indexer !== undefined) return this.indexer;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom indexer url\");\n return NetworkToIndexerAPI[this.network];\n case AptosApiType.PEPPER:\n if (this.pepper !== undefined) return this.pepper;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom pepper service url\");\n return NetworkToPepperAPI[this.network];\n case AptosApiType.PROVER:\n if (this.prover !== undefined) return this.prover;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom prover service url\");\n return NetworkToProverAPI[this.network];\n default:\n throw Error(`apiType ${apiType} is not supported`);\n }\n }\n\n /**\n * Checks if the provided URL is a known pepper service endpoint.\n *\n * @param url - The URL to check against the known pepper service endpoints.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const url = \"https://example.pepper.service\"; // replace with a real pepper service URL\n *\n * // Check if the URL is a known pepper service endpoint\n * const isPepperService = config.isPepperServiceRequest(url);\n *\n * console.log(`Is the URL a known pepper service? ${isPepperService}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n isPepperServiceRequest(url: string): boolean {\n return NetworkToPepperAPI[this.network] === url;\n }\n\n /**\n * Checks if the provided URL is a known prover service endpoint.\n *\n * @param url - The URL to check against known prover service endpoints.\n * @returns A boolean indicating whether the URL is a known prover service endpoint.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * // Check if the URL is a known prover service endpoint\n * const url = \"https://prover.testnet.aptos.dev\"; // replace with a real URL if needed\n * const isProver = config.isProverServiceRequest(url);\n *\n * console.log(`Is the URL a known prover service? ${isProver}`);\n * ```\n * @group Client\n */\n isProverServiceRequest(url: string): boolean {\n return NetworkToProverAPI[this.network] === url;\n }\n\n getDefaultMaxGasAmount(): number {\n return this.transactionGenerationConfig?.defaultMaxGasAmount ?? DEFAULT_MAX_GAS_AMOUNT;\n }\n\n getDefaultTxnExpirySecFromNow(): number {\n return this.transactionGenerationConfig?.defaultTxnExpirySecFromNow ?? DEFAULT_TXN_EXP_SEC_FROM_NOW;\n }\n\n /**\n * If you have set a custom transaction submitter, you can use this to determine\n * whether to use it or not. For example, to stop using the transaction submitter:\n *\n * @example\n * ```\n * aptos.config.setIgnoreTransactionSubmitter(true);\n * ```\n *\n * @group Client\n */\n setIgnoreTransactionSubmitter(ignore: boolean) {\n if (this.pluginConfig) {\n this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER = ignore;\n }\n }\n\n /**\n * If a custom transaction submitter has been specified in the PluginConfig and\n * IGNORE_TRANSACTION_SUBMITTER is false, this will return a transaction submitter\n * that should be used instead of the default transaction submission behavior.\n */\n getTransactionSubmitter(): TransactionSubmitter | undefined {\n if (this.pluginConfig === undefined) {\n return undefined;\n }\n\n if (this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER === true) {\n return undefined;\n }\n\n return this.pluginConfig.TRANSACTION_SUBMITTER;\n }\n}\n"],"mappings":"AAGA,OAAOA,MAAiB,2BAYxB,OACE,oBAAAC,EACA,sBAAAC,EACA,uBAAAC,EACA,WAAAC,EACA,sBAAAC,EACA,sBAAAC,MACK,wBACP,OAAS,gBAAAC,EAAc,0BAAAC,EAAwB,gCAAAC,MAAoC,iBAuB5E,MAAMC,CAAY,CA+GvB,YAAYC,EAA0B,CAEpC,GAAIA,GAAU,UAAYA,GAAU,SAAWA,GAAU,QAAUA,GAAU,QAAUA,GAAU,QAC/F,GAAIA,GAAU,UAAYP,EAAQ,OAChC,QAAQ,KAAK,mEAAmE,UACvE,CAACO,GAAU,QACpB,MAAM,IAAI,MAAM,oDAAoD,EAIxE,KAAK,QAAUA,GAAU,SAAWP,EAAQ,OAC5C,KAAK,SAAWO,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUX,CAAY,EAC1D,KAAK,aAAeW,GAAU,cAAgB,CAAC,EAC/C,KAAK,eAAiBA,GAAU,gBAAkB,CAAC,EACnD,KAAK,cAAgBA,GAAU,eAAiB,CAAC,EACjD,KAAK,aAAeA,GAAU,cAAgB,CAAC,EAC/C,KAAK,4BAA8BA,GAAU,6BAA+B,CAAC,EAC7E,KAAK,aAAeA,GAAU,eAC1B,CACE,GAAGA,EAAS,eACZ,6BAA8B,EAChC,EACA,MACN,CAwBA,cAAcC,EAA+B,CAC3C,OAAQA,EAAS,CACf,KAAKL,EAAa,SAChB,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOH,EAAiB,KAAK,OAAO,EACtC,KAAKM,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,QAC3B,MAAM,IAAI,MACR,yHACF,EAEF,GAAI,KAAK,UAAYA,EAAQ,QAC3B,MAAM,IAAI,MAAM,4BAA4B,EAE9C,GAAI,KAAK,UAAYA,EAAQ,OAAQ,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOF,EAAmB,KAAK,OAAO,EACxC,KAAKK,EAAa,QAChB,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOD,EAAoB,KAAK,OAAO,EACzC,KAAKI,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,KAAKE,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOE,EAAmB,KAAK,OAAO,EACxC,QACE,MAAM,MAAM,WAAWM,CAAO,mBAAmB,CACrD,CACF,CA0BA,uBAAuBC,EAAsB,CAC3C,OAAOR,EAAmB,KAAK,OAAO,IAAMQ,CAC9C,CAuBA,uBAAuBA,EAAsB,CAC3C,OAAOP,EAAmB,KAAK,OAAO,IAAMO,CAC9C,CAEA,wBAAiC,CAC/B,OAAO,KAAK,6BAA6B,qBAAuBL,CAClE,CAEA,+BAAwC,CACtC,OAAO,KAAK,6BAA6B,4BAA8BC,CACzE,CAaA,8BAA8BK,EAAiB,CACzC,KAAK,eACP,KAAK,aAAa,6BAA+BA,EAErD,CAOA,yBAA4D,CAC1D,GAAI,KAAK,eAAiB,QAItB,KAAK,aAAa,+BAAiC,GAIvD,OAAO,KAAK,aAAa,qBAC3B,CACF","names":["aptosClient","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI","Network","NetworkToPepperAPI","NetworkToProverAPI","AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","AptosConfig","settings","apiType","url","ignore"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{transferCoinTransaction as o}from"../internal/coin";class I{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}}export{I as Coin};
1
+ import{Yc as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Coin};
2
2
  //# sourceMappingURL=coin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/coin.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AccountAddressInput } from \"../core\";\nimport { transferCoinTransaction } from \"../internal/coin\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AnyNumber, MoveStructId } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to handle all `Coin` operations.\n * @group Coin\n */\nexport class Coin {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Coin\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Generate a transfer coin transaction that can be simulated, signed, and submitted.\n * This function helps you create a transaction to transfer a specified amount of coins\n * from one account to another within the Aptos network.\n *\n * @param args The arguments for the transfer transaction.\n * @param args.sender The sender account address.\n * @param args.recipient The recipient account address.\n * @param args.amount The amount of coins to transfer.\n * @param args.coinType Optional. The coin struct type to transfer. Defaults to 0x1::aptos_coin::AptosCoin.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Generate a transfer coin transaction\n * const transaction = await aptos.transferCoinTransaction({\n * sender: \"0x1\", // replace with a real sender account address\n * recipient: \"0x2\", // replace with a real recipient account address\n * amount: 10,\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Coin\n */\n async transferCoinTransaction(args: {\n sender: AccountAddressInput;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n coinType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferCoinTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAIA,OAAS,2BAAAA,MAA+B,mBAUjC,MAAMC,CAAK,CAsBhB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAqC3C,MAAM,wBAAwBC,EAMC,CAC7B,OAAOH,EAAwB,CAAE,YAAa,KAAK,OAAQ,GAAGG,CAAK,CAAC,CACtE,CACF","names":["transferCoinTransaction","Coin","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{AccountAddress as c}from"../core";import{addDigitalAssetPropertyTransaction as p,addDigitalAssetTypedPropertyTransaction as d,burnDigitalAssetTransaction as g,createCollectionTransaction as A,freezeDigitalAssetTransferTransaction as u,getCollectionData as y,getCollectionDataByCollectionId as l,getCollectionDataByCreatorAddress as m,getCollectionDataByCreatorAddressAndCollectionName as T,getCollectionId as f,getCurrentDigitalAssetOwnership as C,getDigitalAssetActivity as I,getDigitalAssetData as O,getOwnedDigitalAssets as P,mintDigitalAssetTransaction as D,mintSoulBoundTransaction as V,removeDigitalAssetPropertyTransaction as S,setDigitalAssetDescriptionTransaction as h,setDigitalAssetNameTransaction as R,setDigitalAssetURITransaction as G,transferDigitalAssetTransaction as L,unfreezeDigitalAssetTransferTransaction as N,updateDigitalAssetPropertyTransaction as _,updateDigitalAssetTypedPropertyTransaction as w}from"../internal/digitalAsset";import{ProcessorType as e}from"../utils/const";import{waitForIndexerOnVersion as n}from"./utils";class at{constructor(t){this.config=t}async getCollectionData(t){await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR});const{creatorAddress:i,collectionName:o,options:s}=t,a=c.from(i),r={collection_name:{_eq:o},creator_address:{_eq:a.toStringLong()}};return s?.tokenStandard&&(r.token_standard={_eq:s?.tokenStandard??"v2"}),y({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),T({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),m({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),l({aptosConfig:this.config,...t})}async getCollectionId(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),f({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),O({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),C({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),P({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),I({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return A({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return D({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return L({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return V({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return g({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return u({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return N({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return h({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return R({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return G({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return p({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return _({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return d({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return w({aptosConfig:this.config,...t})}}export{at as DigitalAsset};
1
+ import{vd as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as DigitalAsset};
2
2
  //# sourceMappingURL=digitalAsset.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/digitalAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n AnyNumber,\n GetCollectionDataResponse,\n GetCurrentTokenOwnershipResponse,\n GetOwnedTokensResponse,\n GetTokenActivityResponse,\n GetTokenDataResponse,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n} from \"../types\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { Account } from \"../account\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport {\n addDigitalAssetPropertyTransaction,\n addDigitalAssetTypedPropertyTransaction,\n burnDigitalAssetTransaction,\n CreateCollectionOptions,\n createCollectionTransaction,\n freezeDigitalAssetTransferTransaction,\n getCollectionData,\n getCollectionDataByCollectionId,\n getCollectionDataByCreatorAddress,\n getCollectionDataByCreatorAddressAndCollectionName,\n getCollectionId,\n getCurrentDigitalAssetOwnership,\n getDigitalAssetActivity,\n getDigitalAssetData,\n getOwnedDigitalAssets,\n mintDigitalAssetTransaction,\n mintSoulBoundTransaction,\n PropertyType,\n PropertyValue,\n removeDigitalAssetPropertyTransaction,\n setDigitalAssetDescriptionTransaction,\n setDigitalAssetNameTransaction,\n setDigitalAssetURITransaction,\n transferDigitalAssetTransaction,\n unfreezeDigitalAssetTransferTransaction,\n updateDigitalAssetPropertyTransaction,\n updateDigitalAssetTypedPropertyTransaction,\n} from \"../internal/digitalAsset\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to query all `DigitalAsset` related queries on Aptos.\n * @group DigitalAsset\n */\nexport class DigitalAsset {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your desired network\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries data of a specific collection by the collection creator address and the collection name.\n * This function is deprecated; use `getCollectionDataByCreatorAddressAndCollectionName` instead.\n *\n * If a creator account has two collections with the same name in v1 and v2, you can pass an optional `tokenStandard` parameter\n * to query a specific standard.\n *\n * @param args - The arguments for querying the collection data.\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options - Optional parameters for the query.\n * @param args.options.tokenStandard - The token standard to query.\n * @returns GetCollectionDataResponse - The response type containing the collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Querying collection data by creator address and collection name\n * const collection = await aptos.getCollectionData({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\", // specify your collection name\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionData(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n const { creatorAddress, collectionName, options } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address.toStringLong() },\n };\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return getCollectionData({ aptosConfig: this.config, options: { where: whereCondition } });\n }\n\n /**\n * Queries data of a specific collection by the collection creator address and the collection name.\n * If a creator account has multiple collections with the same name across different versions,\n * specify the `tokenStandard` parameter to query a specific standard.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - Optional token standard to query.\n * @returns GetCollectionDataResponse - The response type containing collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching collection data by creator address and collection name\n * const collection = await aptos.getCollectionDataByCreatorAddressAndCollectionName({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\",\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: { tokenStandard: \"v2\" } // optional, specify if needed\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCreatorAddressAndCollectionName(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n return getCollectionDataByCreatorAddressAndCollectionName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves data for a specific collection created by a given creator address.\n * This function allows you to query collection data while optionally specifying a minimum ledger version and pagination options.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - Optional token standard to query.\n * @param args.options.pagination - Optional pagination arguments.\n * @returns GetCollectionDataResponse - The response type containing collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve collection data by creator address\n * const collectionData = await aptos.getCollectionDataByCreatorAddress({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * minimumLedgerVersion: 1, // specify the minimum ledger version if needed\n * options: {\n * tokenStandard: \"v2\", // specify the token standard if needed\n * pagination: { limit: 10, offset: 0 } // specify pagination options if needed\n * }\n * });\n *\n * console.log(collectionData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCreatorAddress(args: {\n creatorAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n return getCollectionDataByCreatorAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries data of a specific collection by the collection ID.\n *\n * @param args.collectionId - The ID of the collection, which is the same as the address of the collection object.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options - Optional parameters for token standard and pagination.\n * @returns GetCollectionDataResponse - The response type containing the collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching collection data by collection ID\n * const collection = await aptos.getCollectionDataByCollectionId({\n * collectionId: \"0x123\", // replace with a real collection ID\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCollectionId(args: {\n collectionId: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCollectionDataByCollectionId({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the ID of a specified collection.\n * This ID corresponds to the collection's object address in V2, while V1 does not utilize objects and lacks an address.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The token standard to query.\n * @returns The collection ID.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the collection ID for a specific creator and collection name\n * const collectionId = await aptos.getCollectionId({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\"\n * });\n *\n * console.log(\"Collection ID:\", collectionId);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionId(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg;\n }): Promise<string> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCollectionId({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves digital asset data using the address of a digital asset.\n *\n * @param args - The parameters for the request.\n * @param args.digitalAssetAddress - The address of the digital asset.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns GetTokenDataResponse containing relevant data for the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching digital asset data for a specific address\n * const digitalAsset = await aptos.getDigitalAssetData({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAsset);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getDigitalAssetData(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetTokenDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getDigitalAssetData({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current ownership data of a specified digital asset using its address.\n *\n * @param args The parameters for the request.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n *\n * @returns GetCurrentTokenOwnershipResponse containing relevant ownership data of the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the current ownership of a digital asset\n * const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAssetOwner);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCurrentDigitalAssetOwnership(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetCurrentTokenOwnershipResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCurrentDigitalAssetOwnership({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the digital assets owned by a specified address.\n *\n * @param args.ownerAddress The address of the owner.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options Optional pagination and ordering parameters for the response.\n *\n * @returns GetOwnedTokensResponse containing ownership data of the digital assets belonging to the ownerAddress.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the digital assets owned by the specified address\n * const digitalAssets = await aptos.getOwnedDigitalAssets({\n * ownerAddress: \"0x1\", // replace with a real account address\n * });\n *\n * console.log(digitalAssets);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getOwnedDigitalAssets(args: {\n ownerAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetOwnedTokensResponse[0]>;\n }): Promise<GetOwnedTokensResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getOwnedDigitalAssets({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the activity data for a specified digital asset using its address.\n *\n * @param args - The parameters for the request.\n * @param args.digitalAssetAddress - The address of the digital asset.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to sync up to before querying.\n * @param args.options - Optional pagination and ordering parameters.\n *\n * @returns A promise that resolves to the activity data related to the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the activity data for a digital asset\n * const digitalAssetActivity = await aptos.getDigitalAssetActivity({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAssetActivity);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getDigitalAssetActivity(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n }): Promise<GetTokenActivityResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getDigitalAssetActivity({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Creates a new collection within the specified account.\n *\n * @param args.creator - The account of the collection's creator.\n * @param args.description - The description of the collection.\n * @param args.name - The name of the collection.\n * @param args.uri - The URI to additional info about the collection.\n * @param args.options - Optional parameters for generating the transaction.\n *\n * The parameters below are optional:\n * @param args.maxSupply - Controls the max supply of the digital assets. Defaults to MAX_U64_BIG_INT.\n * @param args.mutableDescription - Controls mutability of the collection's description. Defaults to true.\n * @param args.mutableRoyalty - Controls mutability of the collection's royalty. Defaults to true.\n * @param args.mutableUri - Controls mutability of the collection's URI. Defaults to true.\n * @param args.mutableTokenDescription - Controls mutability of the digital asset's description. Defaults to true.\n * @param args.mutableTokenName - Controls mutability of the digital asset's name. Defaults to true.\n * @param args.mutableTokenProperties - Controls mutability of digital asset's properties. Defaults to true.\n * @param args.mutableTokenUri - Controls mutability of the digital asset's URI. Defaults to true.\n * @param args.tokensBurnableByCreator - Controls whether digital assets can be burnable by the creator. Defaults to true.\n * @param args.tokensFreezableByCreator - Controls whether digital assets can be frozen by the creator. Defaults to true.\n * @param args.royaltyNumerator - The numerator of the royalty to be paid to the creator when a digital asset is transferred.\n * Defaults to 0.\n * @param args.royaltyDenominator - The denominator of the royalty to be paid to the creator when a digital asset is\n * transferred. Defaults to 1.\n *\n * @returns A SimpleTransaction that when submitted will create the collection.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Creating a new collection transaction\n * const transaction = await aptos.createCollectionTransaction({\n * creator: Account.generate(), // Replace with a real account\n * description: \"A unique collection of digital assets.\",\n * name: \"My Digital Collection\",\n * uri: \"https://mycollection.com\",\n * });\n *\n * console.log(\"Transaction created:\", transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async createCollectionTransaction(\n args: {\n creator: Account;\n description: string;\n name: string;\n uri: string;\n options?: InputGenerateTransactionOptions;\n } & CreateCollectionOptions,\n ): Promise<SimpleTransaction> {\n return createCollectionTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Create a transaction to mint a digital asset into the creator's account within an existing collection.\n * This function helps you generate a transaction that can be simulated or submitted to the blockchain for minting a digital asset.\n *\n * @param args.creator - The creator of the collection.\n * @param args.collection - The name of the collection the digital asset belongs to.\n * @param args.description - The description of the digital asset.\n * @param args.name - The name of the digital asset.\n * @param args.uri - The URI to additional info about the digital asset.\n * @param args.propertyKeys - Optional array of property keys for the digital asset.\n * @param args.propertyTypes - Optional array of property types for the digital asset.\n * @param args.propertyValues - Optional array of property values for the digital asset.\n * @param args.options - Optional transaction generation options.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Creating a transaction to mint a digital asset\n * const transaction = await aptos.mintDigitalAssetTransaction({\n * creator: Account.generate(), // replace with a real account\n * collection: \"MyCollection\",\n * description: \"This is a digital asset.\",\n * name: \"MyDigitalAsset\",\n * uri: \"https://example.com/my-digital-asset\",\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async mintDigitalAssetTransaction(args: {\n creator: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return mintDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer ownership of a non-fungible digital asset.\n * This function allows you to transfer a digital asset only if it is not frozen, meaning the ownership transfer is not disabled.\n *\n * @param args The arguments for transferring the digital asset.\n * @param args.sender The sender account of the current digital asset owner.\n * @param args.digitalAssetAddress The address of the digital asset being transferred.\n * @param args.recipient The account address of the recipient.\n * @param args.digitalAssetType Optional. The type of the digital asset, defaults to \"0x4::token::Token\".\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Transfer a digital asset\n * const transaction = await aptos.transferDigitalAssetTransaction({\n * sender: Account.generate(), // replace with a real sender account\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * recipient: \"0x456\", // replace with a real recipient account address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async transferDigitalAssetTransaction(args: {\n sender: Account;\n digitalAssetAddress: AccountAddressInput;\n recipient: AccountAddress;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Mint a soul bound digital asset into a recipient's account.\n * This function allows you to create a unique digital asset that is bound to a specific account.\n *\n * @param args - The arguments for minting the soul bound transaction.\n * @param args.account - The account that mints the digital asset.\n * @param args.collection - The collection name that the digital asset belongs to.\n * @param args.description - The digital asset description.\n * @param args.name - The digital asset name.\n * @param args.uri - The digital asset URL.\n * @param args.recipient - The account address where the digital asset will be created.\n * @param args.propertyKeys - The property keys for storing on-chain properties.\n * @param args.propertyTypes - The type of property values.\n * @param args.propertyValues - The property values to be stored on-chain.\n * @param args.options - Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Mint a soul bound digital asset\n * const transaction = await aptos.mintSoulBoundTransaction({\n * account: Account.generate(), // Replace with a real account\n * collection: \"collectionName\",\n * description: \"collectionDescription\",\n * name: \"digitalAssetName\",\n * uri: \"digital-asset-uri.com\",\n * recipient: \"0x123\" // Replace with a real recipient account address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async mintSoulBoundTransaction(args: {\n account: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n recipient: AccountAddressInput;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return mintSoulBoundTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Burn a digital asset by its creator, allowing for the removal of a specified digital asset from the blockchain.\n *\n * @param args The arguments for burning the digital asset.\n * @param args.creator The creator account that is burning the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset to be burned.\n * @param args.digitalAssetType Optional. The type of the digital asset being burned.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const creator = Account.generate(); // Replace with a real creator account\n * const transaction = await aptos.burnDigitalAssetTransaction({\n * creator: creator,\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async burnDigitalAssetTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return burnDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Freeze the ability to transfer a specified digital asset.\n * This function allows the creator to restrict the transfer capability of a digital asset.\n *\n * @param args The arguments for freezing the digital asset transfer.\n * @param args.creator The creator account initiating the freeze.\n * @param args.digitalAssetAddress The address of the digital asset to be frozen.\n * @param args.digitalAssetType Optional. The type of the digital asset being frozen.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Freeze the digital asset transfer\n * const transaction = await aptos.freezeDigitalAssetTransaferTransaction({\n * creator: Account.generate(), // Replace with a real account if needed\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async freezeDigitalAssetTransaferTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return freezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Unfreeze the ability to transfer a digital asset.\n * This function allows the specified creator account to unfreeze the transfer of a digital asset identified by its address.\n *\n * @param args The parameters for unfreezing the digital asset transfer.\n * @param args.creator The creator account that is unfreezing the digital asset transfer.\n * @param args.digitalAssetAddress The address of the digital asset to unfreeze.\n * @param args.digitalAssetType Optional. The type of the digital asset being unfrozen.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Unfreeze the ability to transfer a digital asset\n * const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({\n * creator: Account.generate(), // replace with a real creator account\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n // TODO: Rename Transafer to Transfer\n async unfreezeDigitalAssetTransaferTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return unfreezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the digital asset description to provide additional context or information about the asset.\n *\n * @param args The parameters for setting the digital asset description.\n * @param args.creator The creator account responsible for the digital asset.\n * @param args.description The digital asset description to be set.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Set the digital asset description\n * const transaction = await aptos.setDigitalAssetDescriptionTransaction({\n * creator: Account.generate(), // replace with a real account\n * description: \"This is a digital asset description.\",\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetDescriptionTransaction(args: {\n creator: Account;\n description: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetDescriptionTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the digital asset name, allowing you to define a name for a specific digital asset on the blockchain.\n *\n * @param args The parameters for setting the digital asset name.\n * @param args.creator The creator account responsible for the transaction.\n * @param args.name The desired name for the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset, represented as a Move struct ID.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the blockchain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const creator = Account.generate(); // Generate a new account for the creator\n * const digitalAssetAddress = \"0x123\"; // replace with a real digital asset address\n *\n * // Set the digital asset name\n * const transaction = await aptos.setDigitalAssetNameTransaction({\n * creator: creator,\n * name: \"digitalAssetName\",\n * digitalAssetAddress: digitalAssetAddress,\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetNameTransaction(args: {\n creator: Account;\n name: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetNameTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the URI for a digital asset, allowing you to associate a unique identifier with the asset.\n *\n * @param args The parameters for the transaction.\n * @param args.creator The creator account initiating the transaction.\n * @param args.uri The digital asset URI to be set.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Set the URI for a digital asset\n * const transaction = await aptos.setDigitalAssetURITransaction({\n * creator: Account.generate(), // Replace with a real creator account\n * uri: \"digital-asset-uri.com\",\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetURITransaction(args: {\n creator: Account;\n uri: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetURITransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Add a digital asset property to the blockchain.\n * This function allows you to specify a new property for a digital asset, including its key, type, and value.\n *\n * @param args - The arguments for adding a digital asset property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Options for generating the transaction.\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Add a digital asset property\n * const transaction = await aptos.addDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // Replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: true,\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async addDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return addDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Remove a digital asset property from the blockchain.\n * This function allows you to delete an existing property associated with a digital asset.\n *\n * @param args The parameters required to remove the digital asset property.\n * @param args.creator The account that mints the digital asset.\n * @param args.propertyKey The property key for storing on-chain properties.\n * @param args.propertyType The type of property value.\n * @param args.propertyValue The property value to be stored on-chain.\n * @param args.digitalAssetAddress The digital asset address.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Remove a digital asset property\n * const transaction = await aptos.removeDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: true,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async removeDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return removeDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Update a digital asset property on-chain.\n *\n * @param args The parameters for updating the digital asset property.\n * @param args.creator The account that mints the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.propertyKey The property key for storing on-chain properties.\n * @param args.propertyType The type of property value.\n * @param args.propertyValue The property value to be stored on-chain.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Update a digital asset property\n * const transaction = await aptos.updateDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: false,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async updateDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return updateDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Add a typed digital asset property to the blockchain.\n * This function allows you to define and store a specific property for a digital asset, enabling better categorization and\n * management of digital assets.\n *\n * @param args - The parameters for adding the typed property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - The optional type of the digital asset.\n * @param args.options - Optional transaction generation options.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Adding a typed digital asset property\n * const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"typedKey\",\n * propertyType: \"STRING\",\n * propertyValue: \"hello\",\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async addDigitalAssetTypedPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return addDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Update a typed digital asset property on-chain.\n * This function allows you to modify the properties of a digital asset, enabling dynamic updates to its attributes.\n *\n * @param args - The arguments for updating the digital asset property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Update a typed digital asset property\n * const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"typedKey\",\n * propertyType: \"U8\",\n * propertyValue: 2,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async updateDigitalAssetTypedPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return updateDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAeA,OAAS,kBAAAA,MAA2C,UAGpD,OACE,sCAAAC,EACA,2CAAAC,EACA,+BAAAC,EAEA,+BAAAC,EACA,yCAAAC,EACA,qBAAAC,EACA,mCAAAC,EACA,qCAAAC,EACA,sDAAAC,EACA,mBAAAC,EACA,mCAAAC,EACA,2BAAAC,EACA,uBAAAC,EACA,yBAAAC,EACA,+BAAAC,EACA,4BAAAC,EAGA,yCAAAC,EACA,yCAAAC,EACA,kCAAAC,EACA,iCAAAC,EACA,mCAAAC,EACA,2CAAAC,EACA,yCAAAC,EACA,8CAAAC,MACK,2BACP,OAAS,iBAAAC,MAAqB,iBAE9B,OAAS,2BAAAC,MAA+B,UAOjC,MAAMC,EAAa,CAwBxB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAqC3C,MAAM,kBAAkBC,EAKe,CACrC,MAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EAED,KAAM,CAAE,eAAAK,EAAgB,eAAAC,EAAgB,QAAAC,CAAQ,EAAIH,EAC9CI,EAAUjC,EAAe,KAAK8B,CAAc,EAE5CI,EAAsB,CAC1B,gBAAiB,CAAE,IAAKH,CAAe,EACvC,gBAAiB,CAAE,IAAKE,EAAQ,aAAa,CAAE,CACjD,EACA,OAAID,GAAS,gBACXE,EAAe,eAAiB,CAAE,IAAKF,GAAS,eAAiB,IAAK,GAGjE1B,EAAkB,CAAE,YAAa,KAAK,OAAQ,QAAS,CAAE,MAAO4B,CAAe,CAAE,CAAC,CAC3F,CAmCA,MAAM,mDAAmDL,EAKlB,CACrC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EAEMhB,EAAmD,CAAE,YAAa,KAAK,OAAQ,GAAGoB,CAAK,CAAC,CACjG,CAoCA,MAAM,kCAAkCA,EAID,CACrC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EAEMjB,EAAkC,CAAE,YAAa,KAAK,OAAQ,GAAGqB,CAAK,CAAC,CAChF,CA6BA,MAAM,gCAAgCA,EAIC,CACrC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMlB,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGsB,CAAK,CAAC,CAC9E,CAgCA,MAAM,gBAAgBA,EAKF,CAClB,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMf,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGmB,CAAK,CAAC,CAC9D,CA6BA,MAAM,oBAAoBA,EAGQ,CAChC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMZ,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGgB,CAAK,CAAC,CAClE,CA8BA,MAAM,gCAAgCA,EAGQ,CAC5C,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMd,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGkB,CAAK,CAAC,CAC9E,CA8BA,MAAM,sBAAsBA,EAIQ,CAClC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMX,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGe,CAAK,CAAC,CACpE,CA+BA,MAAM,wBAAwBA,EAIQ,CACpC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,kBAC/B,CAAC,EACMb,EAAwB,CAAE,YAAa,KAAK,OAAQ,GAAGiB,CAAK,CAAC,CACtE,CAmDA,MAAM,4BACJA,EAO4B,CAC5B,OAAOzB,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAGyB,CAAK,CAAC,CAC1E,CAyCA,MAAM,4BAA4BA,EAUH,CAC7B,OAAOd,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAGc,CAAK,CAAC,CAC1E,CAoCA,MAAM,gCAAgCA,EAMP,CAC7B,OAAOR,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGQ,CAAK,CAAC,CAC9E,CA4CA,MAAM,yBAAyBA,EAWA,CAC7B,OAAOb,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGa,CAAK,CAAC,CACvE,CAiCA,MAAM,4BAA4BA,EAK/B,CACD,OAAO1B,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAG0B,CAAK,CAAC,CAC1E,CAkCA,MAAM,uCAAuCA,EAK1C,CACD,OAAOxB,EAAsC,CAAE,YAAa,KAAK,OAAQ,GAAGwB,CAAK,CAAC,CACpF,CAmCA,MAAM,yCAAyCA,EAK5C,CACD,OAAOP,EAAwC,CAAE,YAAa,KAAK,OAAQ,GAAGO,CAAK,CAAC,CACtF,CAmCA,MAAM,sCAAsCA,EAMzC,CACD,OAAOX,EAAsC,CAAE,YAAa,KAAK,OAAQ,GAAGW,CAAK,CAAC,CACpF,CAsCA,MAAM,+BAA+BA,EAMlC,CACD,OAAOV,EAA+B,CAAE,YAAa,KAAK,OAAQ,GAAGU,CAAK,CAAC,CAC7E,CAkCA,MAAM,8BAA8BA,EAMjC,CACD,OAAOT,EAA8B,CAAE,YAAa,KAAK,OAAQ,GAAGS,CAAK,CAAC,CAC5E,CAuCA,MAAM,mCAAmCA,EAQtC,CACD,OAAO5B,EAAmC,CAAE,YAAa,KAAK,OAAQ,GAAG4B,CAAK,CAAC,CACjF,CAwCA,MAAM,sCAAsCA,EAQzC,CACD,OAAOZ,EAAsC,CAAE,YAAa,KAAK,OAAQ,GAAGY,CAAK,CAAC,CACpF,CAuCA,MAAM,sCAAsCA,EAQzC,CACD,OAAON,EAAsC,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CACpF,CAyCA,MAAM,wCAAwCA,EAQ3C,CACD,OAAO3B,EAAwC,CAAE,YAAa,KAAK,OAAQ,GAAG2B,CAAK,CAAC,CACtF,CAwCA,MAAM,2CAA2CA,EAQ9C,CACD,OAAOL,EAA2C,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,CACzF,CACF","names":["AccountAddress","addDigitalAssetPropertyTransaction","addDigitalAssetTypedPropertyTransaction","burnDigitalAssetTransaction","createCollectionTransaction","freezeDigitalAssetTransferTransaction","getCollectionData","getCollectionDataByCollectionId","getCollectionDataByCreatorAddress","getCollectionDataByCreatorAddressAndCollectionName","getCollectionId","getCurrentDigitalAssetOwnership","getDigitalAssetActivity","getDigitalAssetData","getOwnedDigitalAssets","mintDigitalAssetTransaction","mintSoulBoundTransaction","removeDigitalAssetPropertyTransaction","setDigitalAssetDescriptionTransaction","setDigitalAssetNameTransaction","setDigitalAssetURITransaction","transferDigitalAssetTransaction","unfreezeDigitalAssetTransferTransaction","updateDigitalAssetPropertyTransaction","updateDigitalAssetTypedPropertyTransaction","ProcessorType","waitForIndexerOnVersion","DigitalAsset","config","args","creatorAddress","collectionName","options","address","whereCondition"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{fundAccount as t}from"../internal/faucet";import{waitForIndexer as r}from"../internal/transaction";import{ProcessorType as i}from"../utils";class g{constructor(o){this.config=o}async fundAccount(o){const n=await t({aptosConfig:this.config,...o});return(o.options?.waitForIndexer===void 0||o.options?.waitForIndexer)&&await r({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version),processorType:i.FUNGIBLE_ASSET_PROCESSOR}),n}}export{g as Faucet};
1
+ import{xd as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Faucet};
2
2
  //# sourceMappingURL=faucet.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/faucet.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fundAccount } from \"../internal/faucet\";\nimport { UserTransactionResponse, WaitForTransactionOptions } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexer } from \"../internal/transaction\";\nimport { ProcessorType } from \"../utils\";\n\n/**\n * A class to query all `Faucet` related queries on Aptos.\n * @group Faucet\n */\nexport class Faucet {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.DEVNET }); // specify your own network if needed\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Faucet\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * This function creates an account if it does not exist and mints the specified amount of coins into that account.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param args - The arguments for funding the account.\n * @param args.accountAddress - The address of the account to fund.\n * @param args.amount - The amount of tokens to fund the account with.\n * @param args.options - Configuration options for waiting for the transaction.\n * @returns Transaction hash of the transaction that funded the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.DEVNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fund an account with a specified amount of tokens\n * const transaction = await aptos.fundAccount({\n * accountAddress: \"0x1\", // replace with your account address\n * amount: 100,\n * });\n *\n * console.log(\"Transaction hash:\", transaction.hash);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Faucet\n */\n async fundAccount(args: {\n accountAddress: AccountAddressInput;\n amount: number;\n options?: WaitForTransactionOptions;\n }): Promise<UserTransactionResponse> {\n const fundTxn = await fundAccount({ aptosConfig: this.config, ...args });\n\n // If the user explicitly says to NOT wait by setting waitForIndexer to false, then we skip this.\n // But, by default we want to wait for the indexer.\n if (args.options?.waitForIndexer === undefined || args.options?.waitForIndexer) {\n await waitForIndexer({\n aptosConfig: this.config,\n minimumLedgerVersion: BigInt(fundTxn.version),\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n }\n\n return fundTxn;\n }\n}\n"],"mappings":"AAGA,OAAS,eAAAA,MAAmB,qBAI5B,OAAS,kBAAAC,MAAsB,0BAC/B,OAAS,iBAAAC,MAAqB,WAMvB,MAAMC,CAAO,CA0BlB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAkC3C,MAAM,YAAYC,EAImB,CACnC,MAAMC,EAAU,MAAMN,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,EAIvE,OAAIA,EAAK,SAAS,iBAAmB,QAAaA,EAAK,SAAS,iBAC9D,MAAMJ,EAAe,CACnB,YAAa,KAAK,OAClB,qBAAsB,OAAOK,EAAQ,OAAO,EAC5C,cAAeJ,EAAc,wBAC/B,CAAC,EAGII,CACT,CACF","names":["fundAccount","waitForIndexer","ProcessorType","Faucet","config","args","fundTxn"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{getCurrentFungibleAssetBalances as o,getFungibleAssetActivities as r,getFungibleAssetMetadata as n,transferFungibleAsset as a,transferFungibleAssetBetweenStores as g}from"../internal/fungibleAsset";import{ProcessorType as s}from"../utils/const";import{waitForIndexerOnVersion as t}from"./utils";import{AccountAddress as m}from"../core";class w{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await t({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:s.FUNGIBLE_ASSET_PROCESSOR}),n({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await t({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:s.FUNGIBLE_ASSET_PROCESSOR}),(await n({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await t({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:s.FUNGIBLE_ASSET_PROCESSOR}),await n({aptosConfig:this.config,options:{where:{creator_address:{_eq:m.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await t({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:s.FUNGIBLE_ASSET_PROCESSOR}),r({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await t({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:s.FUNGIBLE_ASSET_PROCESSOR}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return a({aptosConfig:this.config,...e})}async transferFungibleAssetBetweenStores(e){return g({aptosConfig:this.config,...e})}}export{w as FungibleAsset};
1
+ import{Dd as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as FungibleAsset};
2
2
  //# sourceMappingURL=fungibleAsset.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/fungibleAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n AnyNumber,\n GetCurrentFungibleAssetBalancesResponse,\n GetFungibleAssetActivitiesResponse,\n GetFungibleAssetMetadataResponse,\n PaginationArgs,\n WhereArg,\n} from \"../types\";\nimport {\n getCurrentFungibleAssetBalances,\n getFungibleAssetActivities,\n getFungibleAssetMetadata,\n transferFungibleAsset,\n transferFungibleAssetBetweenStores,\n} from \"../internal/fungibleAsset\";\nimport {\n CurrentFungibleAssetBalancesBoolExp,\n FungibleAssetActivitiesBoolExp,\n FungibleAssetMetadataBoolExp,\n} from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { Account } from \"../account\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class for querying and managing fungible asset-related operations on the Aptos blockchain.\n * @group FungibleAsset\n */\nexport class FungibleAsset {\n /**\n * Initializes a new instance of the Aptos class with the provided configuration.\n * This allows you to interact with the Aptos blockchain using the specified network settings.\n *\n * @param config - The configuration settings for connecting to the Aptos network.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own network if needed\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries all fungible asset metadata.\n *\n * @param args Optional parameters for the query.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options Optional configuration for pagination and filtering.\n *\n * @returns A list of fungible asset metadata.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching fungible asset metadata\n * const fungibleAssets = await aptos.getFungibleAssetMetadata();\n * console.log(fungibleAssets);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async getFungibleAssetMetadata(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;\n }): Promise<GetFungibleAssetMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetMetadata({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the fungible asset metadata for a specific asset type.\n * This function helps retrieve detailed information about a fungible asset based on its type.\n *\n * @param args - The parameters for the query.\n * @param args.assetType - The asset type of the fungible asset, e.g., \"0x1::aptos_coin::AptosCoin\" for Aptos Coin.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n *\n * @returns A fungible asset metadata item.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve fungible asset metadata by asset type\n * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({\n * assetType: \"0x1::aptos_coin::AptosCoin\" // replace with your asset type\n * });\n *\n * console.log(fungibleAsset);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async getFungibleAssetMetadataByAssetType(args: {\n assetType: string;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetFungibleAssetMetadataResponse[0]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n const data = await getFungibleAssetMetadata({\n aptosConfig: this.config,\n options: {\n where: {\n asset_type: { _eq: args.assetType },\n },\n },\n });\n\n return data[0];\n }\n\n /**\n * Retrieves fungible asset metadata based on the creator address.\n *\n * This function allows you to query metadata for a specific fungible asset created by a given address.\n *\n * @param args - The parameters for the query.\n * @param args.creatorAddress - The creator address of the fungible asset.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n *\n * @returns A fungible asset metadata item.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve fungible asset metadata by creator address\n * const fungibleAsset = await aptos.getFungibleAssetMetadataByCreatorAddress({\n * creatorAddress: \"0x123\", // replace with a real creator address\n * });\n *\n * console.log(fungibleAsset);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async getFungibleAssetMetadataByCreatorAddress(args: {\n creatorAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetFungibleAssetMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n const data = await getFungibleAssetMetadata({\n aptosConfig: this.config,\n options: {\n where: {\n creator_address: { _eq: AccountAddress.from(args.creatorAddress).toStringLong() },\n },\n },\n });\n\n return data;\n }\n\n /**\n * Queries all fungible asset activities and returns a list of their metadata.\n *\n * @param args Optional parameters for the query.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying.\n * @param args.options Optional configuration for pagination and filtering.\n * @returns A list of fungible asset metadata.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching fungible asset activities\n * const fungibleAssetActivities = await aptos.getFungibleAssetActivities();\n * console.log(fungibleAssetActivities);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async getFungibleAssetActivities(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;\n }): Promise<GetFungibleAssetActivitiesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetActivities({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries all fungible asset balances.\n *\n * @param args Optional parameters for the query.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying.\n * @param args.options Optional configuration for pagination and filtering.\n *\n * @returns A list of fungible asset metadata.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching current fungible asset balances\n * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances();\n *\n * console.log(fungibleAssetBalances);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async getCurrentFungibleAssetBalances(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetCurrentFungibleAssetBalancesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getCurrentFungibleAssetBalances({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer a specified amount of fungible asset from the sender's primary store to the recipient's primary store.\n * This method allows you to transfer any fungible asset, including fungible tokens.\n *\n * @param args - The arguments for the transfer operation.\n * @param args.sender - The sender account.\n * @param args.fungibleAssetMetadataAddress - The fungible asset account address. For example, if you're transferring USDT,\n * this would be the USDT address.\n * @param args.recipient - The recipient account address.\n * @param args.amount - The number of assets to transfer.\n * @param args.options - Optional parameters for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Transfer fungible asset from sender to recipient\n * const transaction = await aptos.transferFungibleAsset({\n * sender: Account.generate(), // replace with a real sender account\n * fungibleAssetMetadataAddress: \"0x123\", // replace with a real fungible asset address\n * recipient: \"0x456\", // replace with a real recipient account\n * amount: 5\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async transferFungibleAsset(args: {\n sender: Account;\n fungibleAssetMetadataAddress: AccountAddressInput;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferFungibleAsset({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer a specified amount of fungible asset from the sender's any (primary or secondary) fungible store to any (primary or secondary) fungible store.\n * This method allows you to transfer any fungible asset, including fungible tokens.\n *\n * @param args - The arguments for the transfer operation.\n * @param args.sender - The sender account initiating the transfer.\n * @param args.fromStore - The fungible store address initiating the transfer.\n * @param args.toStore - The fungible store address receiving the asset.\n * @param args.amount - The number of assets to transfer. Must be a positive number.\n * @param args.options - Optional parameters for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @throws Error if:\n * - The sender account is invalid\n * - The store addresses are invalid\n * - The amount is negative or zero\n * - The transaction fails to generate\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function transferAssets() {\n * // Transfer 100 units of the asset from senderStore to recipientStore\n * const transaction = await aptos.transferFungibleAssetBetweenStores({\n * sender: Account.generate(), // replace with a real sender account\n * fromStore: \"0x123\", // replace with a real fungible store address\n * toStore: \"0x456\", // replace with a real fungible store address\n * amount: 100\n * });\n *\n * console.log(transaction);\n * }\n *\n * transferAssets().catch(console.error);\n * ```\n * @group FungibleAsset\n */\n async transferFungibleAssetBetweenStores(args: {\n sender: Account;\n fromStore: AccountAddressInput;\n toStore: AccountAddressInput;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferFungibleAssetBetweenStores({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAWA,OACE,mCAAAA,EACA,8BAAAC,EACA,4BAAAC,EACA,yBAAAC,EACA,sCAAAC,MACK,4BAMP,OAAS,iBAAAC,MAAqB,iBAE9B,OAAS,2BAAAC,MAA+B,UAExC,OAAS,kBAAAC,MAA2C,UAQ7C,MAAMC,CAAc,CAwBzB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CA2B3C,MAAM,yBAAyBC,EAGe,CAC5C,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,GAAM,qBAC5B,cAAeL,EAAc,wBAC/B,CAAC,EACMH,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGQ,CAAK,CAAC,CACvE,CA+BA,MAAM,oCAAoCA,EAGO,CAC/C,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,GAAM,qBAC5B,cAAeL,EAAc,wBAC/B,CAAC,GACY,MAAMH,EAAyB,CAC1C,YAAa,KAAK,OAClB,QAAS,CACP,MAAO,CACL,WAAY,CAAE,IAAKQ,EAAK,SAAU,CACpC,CACF,CACF,CAAC,GAEW,CAAC,CACf,CAgCA,MAAM,yCAAyCA,EAGD,CAC5C,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,GAAM,qBAC5B,cAAeL,EAAc,wBAC/B,CAAC,EACY,MAAMH,EAAyB,CAC1C,YAAa,KAAK,OAClB,QAAS,CACP,MAAO,CACL,gBAAiB,CAAE,IAAKK,EAAe,KAAKG,EAAK,cAAc,EAAE,aAAa,CAAE,CAClF,CACF,CACF,CAAC,CAGH,CA0BA,MAAM,2BAA2BA,EAGe,CAC9C,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,GAAM,qBAC5B,cAAeL,EAAc,wBAC/B,CAAC,EACMJ,EAA2B,CAAE,YAAa,KAAK,OAAQ,GAAGS,CAAK,CAAC,CACzE,CA4BA,MAAM,gCAAgCA,EAGe,CACnD,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,GAAM,qBAC5B,cAAeL,EAAc,wBAC/B,CAAC,EACML,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGU,CAAK,CAAC,CAC9E,CAsCA,MAAM,sBAAsBA,EAMG,CAC7B,OAAOP,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGO,CAAK,CAAC,CACpE,CA4CA,MAAM,mCAAmCA,EAMV,CAC7B,OAAON,EAAmC,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CACjF,CACF","names":["getCurrentFungibleAssetBalances","getFungibleAssetActivities","getFungibleAssetMetadata","transferFungibleAsset","transferFungibleAssetBetweenStores","ProcessorType","waitForIndexerOnVersion","AccountAddress","FungibleAsset","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{getChainTopUserTransactions as e,getIndexerLastSuccessVersion as n,getLedgerInfo as s,getProcessorStatus as r,queryIndexer as t}from"../internal/general";import{getBlockByHeight as i,getBlockByVersion as a}from"../internal/transaction";import{view as c,viewJson as g}from"../internal/view";class v{constructor(o){this.config=o}async getLedgerInfo(){return s({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(o){return a({aptosConfig:this.config,...o})}async getBlockByHeight(o){return i({aptosConfig:this.config,...o})}async view(o){return c({aptosConfig:this.config,...o})}async viewJson(o){return g({aptosConfig:this.config,...o})}async getChainTopUserTransactions(o){return e({aptosConfig:this.config,...o})}async queryIndexer(o){return t({aptosConfig:this.config,...o})}async getIndexerLastSuccessVersion(){return n({aptosConfig:this.config})}async getProcessorStatus(o){return r({aptosConfig:this.config,processorType:o})}}export{v as General};
1
+ import{Ed as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as General};
2
2
  //# sourceMappingURL=general.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/general.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getChainTopUserTransactions,\n getIndexerLastSuccessVersion,\n getLedgerInfo,\n getProcessorStatus,\n queryIndexer,\n} from \"../internal/general\";\nimport { getBlockByHeight, getBlockByVersion } from \"../internal/transaction\";\nimport { view, viewJson } from \"../internal/view\";\nimport {\n AnyNumber,\n Block,\n GetChainTopUserTransactionsResponse,\n GetProcessorStatusResponse,\n GraphqlQuery,\n LedgerInfo,\n LedgerVersionArg,\n MoveValue,\n} from \"../types\";\nimport { ProcessorType } from \"../utils/const\";\nimport { InputViewFunctionData, InputViewFunctionJsonData } from \"../transactions\";\n\n/**\n * A class to query various Aptos-related information and perform operations on the Aptos blockchain.\n * @group General\n */\nexport class General {\n readonly config: AptosConfig;\n\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows users to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., TESTNET, MAINNET).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({\n * network: Network.TESTNET, // specify the network\n * nodeUrl: \"https://testnet.aptos.dev\" // specify the node URL\n * });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for the Aptos ledger information.\n *\n * @returns The Aptos Ledger Info, which includes details such as chain ID, epoch, and ledger version.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the ledger information\n * const ledgerInfo = await aptos.getLedgerInfo();\n *\n * console.log(ledgerInfo);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getLedgerInfo(): Promise<LedgerInfo> {\n return getLedgerInfo({ aptosConfig: this.config });\n }\n\n /**\n * Retrieves the chain ID of the Aptos blockchain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the chain ID\n * const chainId = await aptos.getChainId();\n * console.log(\"Chain ID:\", chainId);\n * }\n * runExample().catch(console.error);\n *\n * @returns The chain ID of the Aptos blockchain.\n * ```\n * @group General\n */\n async getChainId(): Promise<number> {\n const result = await this.getLedgerInfo();\n return result.chain_id;\n }\n\n /**\n * Retrieves block information by the specified ledger version.\n *\n * @param args - The arguments for retrieving the block.\n * @param args.ledgerVersion - The ledger version to lookup block information for.\n * @param args.options - Optional parameters for the request.\n * @param args.options.withTransactions - If set to true, include all transactions in the block.\n *\n * @returns Block information with optional transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve block information for a specific ledger version\n * const block = await aptos.getBlockByVersion({ ledgerVersion: 5 });\n * console.log(block);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getBlockByVersion(args: {\n ledgerVersion: AnyNumber;\n options?: { withTransactions?: boolean };\n }): Promise<Block> {\n return getBlockByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieve a block by its height, allowing for the inclusion of transactions if specified.\n *\n * @param args - The parameters for the block retrieval.\n * @param args.blockHeight - The block height to look up, starting at 0.\n * @param args.options - Optional settings for the retrieval.\n * @param args.options.withTransactions - If set to true, includes all transactions in the block.\n *\n * @returns The block with optional transactions included.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve the block at height 5, including transactions\n * const block = await aptos.getBlockByHeight({ blockHeight: 5, options: { withTransactions: true } });\n * console.log(block);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getBlockByHeight(args: { blockHeight: AnyNumber; options?: { withTransactions?: boolean } }): Promise<Block> {\n return getBlockByHeight({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a Move view function\n * @param args.payload Payload for the view function\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @example\n * const data = await aptos.view({\n * payload: {\n * function: \"0x1::coin::balance\",\n * typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n * functionArguments: [accountAddress],\n * }\n * })\n *\n * @returns an array of Move values\n * @group General\n */\n async view<T extends Array<MoveValue>>(args: {\n payload: InputViewFunctionData;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return view<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a Move view function with JSON, this provides compatability with the old `aptos` package\n * @param args.payload Payload for the view function\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @example\n * const data = await aptos.view({\n * payload: {\n * function: \"0x1::coin::balance\",\n * typeArguments: [\"0x1::aptos_coin::AptosCoin\"],\n * functionArguments: [accountAddress.toString()],\n * }\n * })\n *\n * @returns an array of Move values\n * @group General\n */\n async viewJson<T extends Array<MoveValue>>(args: {\n payload: InputViewFunctionJsonData;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return viewJson<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the top user transactions based on the specified limit.\n *\n * @param args - The arguments for querying top user transactions.\n * @param args.limit - The number of transactions to return.\n * @returns GetChainTopUserTransactionsResponse\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch the top user transactions with a limit of 5\n * const topUserTransactions = await aptos.getChainTopUserTransactions({ limit: 5 });\n *\n * console.log(topUserTransactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getChainTopUserTransactions(args: { limit: number }): Promise<GetChainTopUserTransactionsResponse> {\n return getChainTopUserTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves data from the Aptos Indexer using a GraphQL query.\n * This function allows you to execute complex queries to fetch specific data from the Aptos blockchain.\n *\n * @param args.query.query - A GraphQL query string.\n * @param args.query.variables - The variables for the query (optional).\n *\n * @return The provided T type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Querying the Aptos Indexer for ledger information\n * const topUserTransactions = await aptos.queryIndexer({\n * query: { query: `query MyQuery {\n * ledger_infos {\n * chain_id\n * }\n * }`}\n * });\n *\n * console.log(topUserTransactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async queryIndexer<T extends {}>(args: { query: GraphqlQuery }): Promise<T> {\n return queryIndexer<T>({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for the last successful indexer version, providing insight into the ledger version the indexer is updated to, which\n * may lag behind the full nodes.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the last successful indexer version\n * const version = await aptos.getIndexerLastSuccessVersion();\n * console.log(`Last successful indexer version: ${version}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getIndexerLastSuccessVersion(): Promise<bigint> {\n return getIndexerLastSuccessVersion({ aptosConfig: this.config });\n }\n\n /**\n * Query the processor status for a specific processor type.\n *\n * @param processorType The processor type to query.\n * @returns The status of the specified processor type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the processor status for the account transactions processor\n * const status = await aptos.getProcessorStatus(\"account_transactions_processor\");\n * console.log(status);\n * }\n * runExample().catch(console.error);\n * ```\n * @group General\n */\n async getProcessorStatus(processorType: ProcessorType): Promise<GetProcessorStatusResponse[0]> {\n return getProcessorStatus({ aptosConfig: this.config, processorType });\n }\n}\n"],"mappings":"AAIA,OACE,+BAAAA,EACA,gCAAAC,EACA,iBAAAC,EACA,sBAAAC,EACA,gBAAAC,MACK,sBACP,OAAS,oBAAAC,EAAkB,qBAAAC,MAAyB,0BACpD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,mBAkBxB,MAAMC,CAAQ,CA+BnB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAwBA,MAAM,eAAqC,CACzC,OAAOR,EAAc,CAAE,YAAa,KAAK,MAAO,CAAC,CACnD,CAuBA,MAAM,YAA8B,CAElC,OADe,MAAM,KAAK,cAAc,GAC1B,QAChB,CA4BA,MAAM,kBAAkBS,EAGL,CACjB,OAAOL,EAAkB,CACvB,YAAa,KAAK,OAClB,GAAGK,CACL,CAAC,CACH,CA4BA,MAAM,iBAAiBA,EAA4F,CACjH,OAAON,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CAC/D,CAmBA,MAAM,KAAiCA,EAGxB,CACb,OAAOJ,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGI,CAAK,CAAC,CACtD,CAmBA,MAAM,SAAqCA,EAG5B,CACb,OAAOH,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGG,CAAK,CAAC,CAC1D,CA0BA,MAAM,4BAA4BA,EAAuE,CACvG,OAAOX,EAA4B,CACjC,YAAa,KAAK,OAClB,GAAGW,CACL,CAAC,CACH,CAkCA,MAAM,aAA2BA,EAA2C,CAC1E,OAAOP,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGO,CACL,CAAC,CACH,CAsBA,MAAM,8BAAgD,CACpD,OAAOV,EAA6B,CAAE,YAAa,KAAK,MAAO,CAAC,CAClE,CAwBA,MAAM,mBAAmBW,EAAsE,CAC7F,OAAOT,EAAmB,CAAE,YAAa,KAAK,OAAQ,cAAAS,CAAc,CAAC,CACvE,CACF","names":["getChainTopUserTransactions","getIndexerLastSuccessVersion","getLedgerInfo","getProcessorStatus","queryIndexer","getBlockByHeight","getBlockByVersion","view","viewJson","General","config","args","processorType"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -5,13 +5,13 @@ import '../types/indexer.mjs';
5
5
  import '../types/generated/operations.mjs';
6
6
  import '../types/generated/types.mjs';
7
7
  import '../Ed25519Account-CPwej6wB.mjs';
8
- import './account/abstraction.mjs';
8
+ import '../core/crypto/types.mjs';
9
9
  import '../utils/apiEndpoints.mjs';
10
10
  import '../utils/const.mjs';
11
11
  import '../core/common.mjs';
12
- import '../core/crypto/types.mjs';
13
12
  import '../internal/account.mjs';
14
13
  import '../account/MultiEd25519Account.mjs';
14
+ import './account/abstraction.mjs';
15
15
  import './coin.mjs';
16
16
  import './digitalAsset.mjs';
17
17
  import '../internal/digitalAsset.mjs';
@@ -1,2 +1,2 @@
1
- export*from"./aptos";export*from"./aptosConfig";
1
+ import{te as b}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import{a}from"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{b as Aptos,a as AptosConfig};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from \"./aptos\";\nexport * from \"./aptosConfig\";\n"],"mappings":"AAGA,WAAc,UACd,WAAc","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{deriveKeylessAccount as r,getPepper as t,getProof as o,updateFederatedKeylessJwkSetTransaction as s}from"../internal/keyless";class F{constructor(e){this.config=e}async getPepper(e){return t({aptosConfig:this.config,...e})}async getProof(e){return o({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return r({aptosConfig:this.config,...e})}async updateFederatedKeylessJwkSetTransaction(e){return s({aptosConfig:this.config,...e})}}export{F as Keyless};
1
+ import{pe as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Keyless};
2
2
  //# sourceMappingURL=keyless.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { FederatedKeylessAccount } from \"../account/FederatedKeylessAccount\";\nimport { AccountAddressInput, ZeroKnowledgeSig } from \"../core\";\nimport {\n deriveKeylessAccount,\n getPepper,\n getProof,\n updateFederatedKeylessJwkSetTransaction,\n} from \"../internal/keyless\";\nimport { InputGenerateTransactionOptions, SimpleTransaction } from \"../transactions\";\nimport { HexInput } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to query all `Keyless` related queries on Aptos.\n *\n * More documentation on how to integrate Keyless Accounts see the below\n * [Aptos Keyless Integration Guide](https://aptos.dev/guides/keyless-accounts/#aptos-keyless-integration-guide).\n * @group Keyless\n */\nexport class Keyless {\n /**\n * Initializes a new instance of the Aptos class with the provided configuration.\n * This allows you to interact with the Aptos blockchain using the specified network settings.\n *\n * @param config - The configuration settings for connecting to the Aptos network.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your desired network\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Keyless\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Fetches the pepper from the Aptos pepper service API.\n *\n * @param args - The arguments for fetching the pepper.\n * @param args.jwt - JWT token.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.derivationPath - A derivation path used for creating multiple accounts per user via the BIP-44 standard. Defaults\n * to \"m/44'/637'/0'/0'/0\".\n * @returns The pepper which is a Uint8Array of length 31.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n *\n * // Fetching the pepper using the provided JWT and ephemeral key pair\n * const pepper = await aptos.getPepper({\n * jwt,\n * ephemeralKeyPair,\n * // derivationPath: \"m/44'/637'/0'/0'/0\" // specify your own if needed\n * });\n *\n * console.log(\"Fetched pepper:\", pepper);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Keyless\n */\n async getPepper(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n derivationPath?: string;\n }): Promise<Uint8Array> {\n return getPepper({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches a proof from the Aptos prover service API.\n *\n * @param args - The arguments for fetching the proof.\n * @param args.jwt - JWT token.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.pepper - The pepper used for the account. If not provided, it will be fetched from the Aptos pepper service.\n * @param args.uidKey - A key in the JWT token to use to set the uidVal in the IdCommitment.\n *\n * @returns The proof which is represented by a ZeroKnowledgeSig.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, EphemeralKeyPair, getPepper } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n *\n * // Fetch the proof using the getProof function\n * const proof = await aptos.getProof({\n * jwt,\n * ephemeralKeyPair,\n * pepper: await getPepper({}), // fetch the pepper if not provided\n * uidKey: \"sub\", // specify the uid key\n * });\n *\n * console.log(\"Fetched proof:\", proof);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Keyless\n */\n async getProof(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper?: HexInput;\n uidKey?: string;\n }): Promise<ZeroKnowledgeSig> {\n return getProof({ aptosConfig: this.config, ...args });\n }\n\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount>;\n\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<FederatedKeylessAccount>;\n\n /**\n * Derives a Keyless Account from the provided JWT token and corresponding EphemeralKeyPair. This function computes the proof\n * via the proving service and can fetch the pepper from the pepper service if not explicitly provided.\n *\n * @param args - The arguments required to derive the Keyless Account.\n * @param args.jwt - The JWT token used for deriving the account.\n * @param args.ephemeralKeyPair - The EphemeralKeyPair used to generate the nonce in the JWT token.\n * @param args.jwkAddress - The address the where the JWKs used to verify signatures are found. Setting the value derives a\n * FederatedKeylessAccount.\n * @param args.uidKey - An optional key in the JWT token to set the uidVal in the IdCommitment.\n * @param args.pepper - An optional pepper value.\n * @param args.proofFetchCallback - An optional callback function for fetching the proof in the background, allowing for a more\n * responsive user experience.\n *\n * @returns A KeylessAccount that can be used to sign transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, deriveKeylessAccount } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const jwt = \"your_jwt_token\"; // replace with a real JWT token\n * const ephemeralKeyPair = new EphemeralKeyPair(); // create a new ephemeral key pair\n *\n * // Deriving the Keyless Account\n * const keylessAccount = await deriveKeylessAccount({\n * jwt,\n * ephemeralKeyPair,\n * uidKey: \"your_uid_key\", // optional\n * pepper: \"your_pepper\", // optional\n * });\n *\n * console.log(\"Keyless Account derived:\", keylessAccount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Keyless\n */\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress?: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount | FederatedKeylessAccount> {\n return deriveKeylessAccount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * This installs a set of FederatedJWKs at an address for a given iss.\n *\n * It will fetch the JSON Web Keyset (JWK) set from the well-known endpoint and update the FederatedJWKs at the sender's address\n * to reflect it.\n *\n * @param args.sender The account that will install the JWKs\n * @param args.iss the iss claim of the federated OIDC provider.\n * @param args.jwksUrl the URL to find the corresponding JWKs. For supported IDP providers this parameter in not necessary.\n *\n * @returns The pending transaction that results from submission.\n * @group Keyless\n */\n async updateFederatedKeylessJwkSetTransaction(args: {\n sender: Account;\n iss: string;\n jwksUrl?: string;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return updateFederatedKeylessJwkSetTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAMA,OACE,wBAAAA,EACA,aAAAC,EACA,YAAAC,EACA,2CAAAC,MACK,sBAYA,MAAMC,CAAQ,CAwBnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAoC3C,MAAM,UAAUC,EAIQ,CACtB,OAAOL,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,CACxD,CAsCA,MAAM,SAASA,EAKe,CAC5B,OAAOJ,EAAS,CAAE,YAAa,KAAK,OAAQ,GAAGI,CAAK,CAAC,CACvD,CA4DA,MAAM,qBAAqBA,EAO2B,CACpD,OAAON,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CACnE,CAeA,MAAM,wCAAwCA,EAKf,CAC7B,OAAOH,EAAwC,CAAE,YAAa,KAAK,OAAQ,GAAGG,CAAK,CAAC,CACtF,CACF","names":["deriveKeylessAccount","getPepper","getProof","updateFederatedKeylessJwkSetTransaction","Keyless","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{ProcessorType as r}from"../utils";import{waitForIndexerOnVersion as o}from"./utils";import{getObjectDataByObjectAddress as t}from"../internal/object";class y{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:r.OBJECT_PROCESSOR}),t({aptosConfig:this.config,...e})}}export{y as AptosObject};
1
+ import{se as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as AptosObject};
2
2
  //# sourceMappingURL=object.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/object.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AnyNumber, GetObjectDataQueryResponse, OrderByArg, PaginationArgs } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { ProcessorType } from \"../utils\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { getObjectDataByObjectAddress } from \"../internal/object\";\n\n/**\n * A class to query all `Object` related queries on Aptos.\n * @group Object\n */\nexport class AptosObject {\n /**\n * Creates an instance of the Aptos client with the provided configuration.\n * This allows interaction with the Aptos blockchain using the specified settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., mainnet, testnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n * @param config.faucetUrl - The URL of the faucet for funding accounts (optional).\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({\n * network: Network.TESTNET, // Specify the desired network\n * nodeUrl: \"https://testnet.aptos.dev\", // Replace with your node URL\n * });\n *\n * // Create an instance of the Aptos client\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client created successfully\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Object\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Fetches the object data based on the specified object address.\n *\n * @param args.objectAddress - The object address to retrieve data for.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for.\n * @param args.options - Optional configuration options for pagination and ordering.\n *\n * @returns The object data corresponding to the provided address.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching object data by object address\n * const objectData = await aptos.getObjectDataByObjectAddress({\n * objectAddress: \"0x1\", // replace with a real object address\n * });\n *\n * console.log(objectData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Object\n */\n async getObjectDataByObjectAddress(args: {\n objectAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse[0]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.OBJECT_PROCESSOR,\n });\n return getObjectDataByObjectAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n}\n"],"mappings":"AAMA,OAAS,iBAAAA,MAAqB,WAC9B,OAAS,2BAAAC,MAA+B,UACxC,OAAS,gCAAAC,MAAoC,qBAMtC,MAAMC,CAAY,CA8BvB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CA8B3C,MAAM,6BAA6BC,EAIQ,CACzC,aAAMJ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBI,EAAK,qBAC3B,cAAeL,EAAc,gBAC/B,CAAC,EACME,EAA6B,CAClC,YAAa,KAAK,OAClB,GAAGG,CACL,CAAC,CACH,CACF","names":["ProcessorType","waitForIndexerOnVersion","getObjectDataByObjectAddress","AptosObject","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{getDelegatedStakingActivities as i,getNumberOfDelegators as s,getNumberOfDelegatorsForAllPools as t}from"../internal/staking";import{ProcessorType as o}from"../utils/const";import{waitForIndexerOnVersion as r}from"./utils";class S{constructor(e){this.config=e}async getNumberOfDelegators(e){return await r({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:o.STAKE_PROCESSOR}),s({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await r({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:o.STAKE_PROCESSOR}),t({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await r({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:o.STAKE_PROCESSOR}),i({aptosConfig:this.config,...e})}}export{S as Staking};
1
+ import{be as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Staking};
2
2
  //# sourceMappingURL=staking.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/staking.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n getDelegatedStakingActivities,\n getNumberOfDelegators,\n getNumberOfDelegatorsForAllPools,\n} from \"../internal/staking\";\nimport { AnyNumber, GetDelegatedStakingActivitiesResponse, GetNumberOfDelegatorsResponse, OrderByArg } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Staking` related queries on Aptos.\n * @group Staking\n */\nexport class Staking {\n /**\n * Creates an instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., TESTNET, MAINNET).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your network\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Staking\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries the current number of delegators in a specified pool. Throws an error if the pool is not found.\n *\n * @param args - The parameters for the query.\n * @param args.poolAddress - The address of the pool to query.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The number of delegators for the given pool.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the number of delegators for a specific pool\n * const delegators = await aptos.getNumberOfDelegators({ poolAddress: \"0x1\" }); // replace with a real pool address\n * console.log(`Number of delegators: ${delegators}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Staking\n */\n async getNumberOfDelegators(args: {\n poolAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getNumberOfDelegators({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current number of delegators across all pools.\n *\n * @param args Optional parameters for the query.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options Optional ordering options for the response.\n * @returns GetNumberOfDelegatorsForAllPoolsResponse response type containing the number of delegators per pool.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve the number of delegators for all pools\n * const delegators = await aptos.getNumberOfDelegatorsForAllPools();\n * console.log(delegators);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Staking\n */\n async getNumberOfDelegatorsForAllPools(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: OrderByArg<GetNumberOfDelegatorsResponse[0]>;\n }): Promise<GetNumberOfDelegatorsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getNumberOfDelegatorsForAllPools({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries delegated staking activities for a specific delegator and pool.\n *\n * @param args - The arguments for querying delegated staking activities.\n * @param args.delegatorAddress - The address of the delegator.\n * @param args.poolAddress - The address of the staking pool.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The response containing delegated staking activities.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get delegated staking activities for a specific delegator and pool\n * const activities = await aptos.getDelegatedStakingActivities({\n * delegatorAddress: \"0x1\", // replace with a real delegator address\n * poolAddress: \"0x2\", // replace with a real pool address\n * minimumLedgerVersion: 1, // specify your own if needed\n * });\n *\n * console.log(activities);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Staking\n */\n async getDelegatedStakingActivities(args: {\n delegatorAddress: AccountAddressInput;\n poolAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetDelegatedStakingActivitiesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getDelegatedStakingActivities({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAGA,OACE,iCAAAA,EACA,yBAAAC,EACA,oCAAAC,MACK,sBAGP,OAAS,iBAAAC,MAAqB,iBAE9B,OAAS,2BAAAC,MAA+B,UAMjC,MAAMC,CAAQ,CA0BnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CA0B3C,MAAM,sBAAsBC,EAGR,CAClB,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,GAAM,qBAC5B,cAAeJ,EAAc,eAC/B,CAAC,EACMF,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CACpE,CA0BA,MAAM,iCAAiCA,EAGI,CACzC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,GAAM,qBAC5B,cAAeJ,EAAc,eAC/B,CAAC,EACMD,EAAiC,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,CAC/E,CAgCA,MAAM,8BAA8BA,EAIe,CACjD,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,GAAM,qBAC5B,cAAeJ,EAAc,eAC/B,CAAC,EACMH,EAA8B,CAAE,YAAa,KAAK,OAAQ,GAAGO,CAAK,CAAC,CAC5E,CACF","names":["getDelegatedStakingActivities","getNumberOfDelegators","getNumberOfDelegatorsForAllPools","ProcessorType","waitForIndexerOnVersion","Staking","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{getTableItem as r,getTableItemsData as a,getTableItemsMetadata as s}from"../internal/table";import{ProcessorType as t}from"../utils";import{waitForIndexerOnVersion as o}from"./utils";class R{constructor(e){this.config=e}async getTableItem(e){return r({aptosConfig:this.config,...e})}async getTableItemsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:t.DEFAULT}),a({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:t.DEFAULT}),s({aptosConfig:this.config,...e})}}export{R as Table};
1
+ import{a}from"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Table};
2
2
  //# sourceMappingURL=table.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/table.ts"],"sourcesContent":["import { getTableItem, getTableItemsData, getTableItemsMetadata } from \"../internal/table\";\nimport {\n TableItemRequest,\n LedgerVersionArg,\n AnyNumber,\n PaginationArgs,\n WhereArg,\n OrderByArg,\n GetTableItemsDataResponse,\n GetTableItemsMetadataResponse,\n} from \"../types\";\nimport { TableItemsBoolExp, TableMetadatasBoolExp } from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Table` Aptos related queries.\n * @group Table\n */\nexport class Table {\n readonly config: AptosConfig;\n\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for a specific item in a table identified by the handle and the key for the item.\n * This function allows you to retrieve structured data from a table in the Aptos blockchain.\n *\n * @param args.handle A pointer to where that table is stored.\n * @param args.data Object that describes the table item, including key and value types.\n * @param args.data.key_type The Move type of the table key.\n * @param args.data.value_type The Move type of the table value.\n * @param args.data.key The value of the table key.\n * @param args.options.ledgerVersion The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns Table item value rendered in JSON.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve a table item from the Aptos blockchain\n * const tableItem = await aptos.getTableItem({\n * handle: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\",\n * data: {\n * key_type: \"address\", // Move type of table key\n * value_type: \"u128\", // Move type of table value\n * key: \"0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935\" // Value of table key\n * },\n * });\n *\n * console.log(tableItem);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {\n return getTableItem<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for table items data with optional filtering and pagination.\n * This function allows you to retrieve specific data from a table based on provided criteria.\n *\n * @param args - The arguments for querying table items data.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The number of items to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The criteria to order the results.\n *\n * Note: This query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve table items data with specific filtering options\n * const data = await aptos.getTableItemsData({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: {\n * table_handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" },\n * transaction_version: { _eq: \"0\" }\n * },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsDataResponse\n * @group Table\n */\n async getTableItemsData(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;\n }): Promise<GetTableItemsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsData({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for the metadata of table items, allowing for filtering and pagination.\n *\n * @param args - The parameters for the query.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The offset for pagination.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The order in which to return the items.\n *\n * Note that this query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching table items metadata with a filter condition\n * const data = await aptos.getTableItemsMetadata({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: { handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" } },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsMetadataResponse\n * @group Table\n */\n async getTableItemsMetadata(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;\n }): Promise<GetTableItemsMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsMetadata({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAAA,OAAS,gBAAAA,EAAc,qBAAAC,EAAmB,yBAAAC,MAA6B,oBAYvE,OAAS,iBAAAC,MAAqB,WAE9B,OAAS,2BAAAC,MAA+B,UAMjC,MAAMC,CAAM,CAwBjB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAuCA,MAAM,aAAgBC,EAA0F,CAC9G,OAAOP,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGO,CAAK,CAAC,CAC9D,CA4CA,MAAM,kBAAkBA,EAGe,CACrC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,OAC/B,CAAC,EACMF,EAAkB,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CAChE,CAwCA,MAAM,sBAAsBA,EAGe,CACzC,aAAMH,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBG,EAAK,qBAC3B,cAAeJ,EAAc,OAC/B,CAAC,EACMD,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,CACpE,CACF","names":["getTableItem","getTableItemsData","getTableItemsMetadata","ProcessorType","waitForIndexerOnVersion","Table","config","args"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{getGasPriceEstimation as i,getTransactionByHash as e,getTransactionByVersion as r,getTransactions as s,isTransactionPending as c,waitForTransaction as u}from"../internal/transaction";import{getSigningMessage as g,publicPackageTransaction as p,signAndSubmitAsFeePayer as m,signAndSubmitTransaction as A,signAsFeePayer as y,signTransaction as f}from"../internal/transactionSubmission";import{Build as T}from"./transactionSubmission/build";import{Simulate as h}from"./transactionSubmission/simulate";import{Submit as d}from"./transactionSubmission/submit";import{TransactionManagement as P}from"./transactionSubmission/management";import{rotateAuthKey as l,rotateAuthKeyUnverified as b}from"../internal/account";class rn{constructor(n){this.config=n,this.build=new T(this.config),this.simulate=new h(this.config),this.submit=new d(this.config),this.batch=new P(this.config)}async getTransactions(n){return s({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return i({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return l({aptosConfig:this.config,...n})}async rotateAuthKeyUnverified(n){return b({aptosConfig:this.config,...n})}sign(n){return f({...n})}signAsFeePayer(n){return y({...n})}async batchTransactionsForSingleAccount(n){try{const{sender:t,data:o,options:a}=n;this.batch.forSingleAccount({sender:t,data:o,options:a})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){return A({aptosConfig:this.config,...n})}async signAndSubmitAsFeePayer(n){return m({aptosConfig:this.config,...n})}}export{rn as Transaction};
1
+ import{ke as a}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Transaction};
2
2
  //# sourceMappingURL=transaction.mjs.map