@aptos-labs/ts-sdk 1.35.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/dist/common/{accountAddress-CuHovHdK.d.ts → accountAddress-jrha_M3l.d.ts} +1 -1
  2. package/dist/common/{chunk-RX5UBAME.js → chunk-PA2XFIP3.js} +3 -3
  3. package/dist/common/chunk-PA2XFIP3.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +99 -31
  8. package/dist/common/index.js +31 -31
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  11. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/AccountUtils.mjs +1 -1
  14. package/dist/esm/account/Ed25519Account.mjs +1 -1
  15. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  16. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  17. package/dist/esm/account/KeylessAccount.mjs +1 -1
  18. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  19. package/dist/esm/account/MultiKeyAccount.d.mts +1 -0
  20. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  21. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  22. package/dist/esm/account/index.mjs +1 -1
  23. package/dist/esm/account/utils.mjs +1 -1
  24. package/dist/esm/api/account/abstraction.mjs +1 -1
  25. package/dist/esm/api/account.mjs +1 -1
  26. package/dist/esm/api/ans.mjs +1 -1
  27. package/dist/esm/api/aptos.mjs +1 -1
  28. package/dist/esm/api/coin.mjs +1 -1
  29. package/dist/esm/api/digitalAsset.mjs +1 -1
  30. package/dist/esm/api/event.mjs +1 -1
  31. package/dist/esm/api/experimental.mjs +1 -1
  32. package/dist/esm/api/faucet.mjs +1 -1
  33. package/dist/esm/api/fungibleAsset.mjs +1 -1
  34. package/dist/esm/api/general.d.mts +2 -2
  35. package/dist/esm/api/general.mjs +1 -1
  36. package/dist/esm/api/index.mjs +1 -1
  37. package/dist/esm/api/keyless.mjs +1 -1
  38. package/dist/esm/api/object.mjs +1 -1
  39. package/dist/esm/api/staking.mjs +1 -1
  40. package/dist/esm/api/table.mjs +1 -1
  41. package/dist/esm/api/transaction.d.mts +34 -13
  42. package/dist/esm/api/transaction.mjs +1 -1
  43. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  45. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  46. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  47. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  48. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  49. package/dist/esm/api/utils.mjs +1 -1
  50. package/dist/esm/{chunk-EGCL6KA6.mjs → chunk-2N4EPY2J.mjs} +2 -2
  51. package/dist/esm/{chunk-YAGIE4GN.mjs → chunk-2OBSQ2FK.mjs} +2 -2
  52. package/dist/esm/{chunk-752TOOCA.mjs → chunk-2P27DDVV.mjs} +2 -2
  53. package/dist/esm/{chunk-RDPWCN4B.mjs → chunk-2SAOCLIU.mjs} +2 -2
  54. package/dist/esm/{chunk-44EHAKKW.mjs → chunk-36H47QOE.mjs} +2 -2
  55. package/dist/esm/{chunk-AQWKKSRN.mjs → chunk-3DHWWNJ3.mjs} +2 -2
  56. package/dist/esm/{chunk-DAJFOJ3L.mjs → chunk-4KKJ36IO.mjs} +2 -2
  57. package/dist/esm/{chunk-UJJGIPOA.mjs → chunk-4PW3JKQZ.mjs} +2 -2
  58. package/dist/esm/chunk-4QK4SKAT.mjs +2 -0
  59. package/dist/esm/{chunk-OLGEN23M.mjs.map → chunk-4QK4SKAT.mjs.map} +1 -1
  60. package/dist/esm/{chunk-B23VO5TB.mjs → chunk-4SWK3JHQ.mjs} +2 -2
  61. package/dist/esm/{chunk-XW3BXTCZ.mjs → chunk-553ZRNUL.mjs} +2 -2
  62. package/dist/esm/{chunk-ZS2IVRHT.mjs → chunk-5AD7ZF6G.mjs} +2 -2
  63. package/dist/esm/{chunk-GTVMJJQQ.mjs → chunk-5MVHOQKD.mjs} +2 -2
  64. package/dist/esm/{chunk-HKL4MFNL.mjs → chunk-5W5XV63W.mjs} +2 -2
  65. package/dist/esm/{chunk-P5CM4C2G.mjs → chunk-5WWU3WSU.mjs} +2 -2
  66. package/dist/esm/{chunk-FOEPRHAC.mjs → chunk-6FQDCTMA.mjs} +2 -2
  67. package/dist/esm/{chunk-5H5D6QVX.mjs → chunk-6IULVNLQ.mjs} +2 -2
  68. package/dist/esm/{chunk-2TRQERBL.mjs → chunk-6KI24ZRR.mjs} +2 -2
  69. package/dist/esm/{chunk-BPHCRTHD.mjs → chunk-6VGLRQBT.mjs} +2 -2
  70. package/dist/esm/{chunk-HBTJN4RJ.mjs → chunk-6YPM7TK2.mjs} +2 -2
  71. package/dist/esm/{chunk-XSBUL2WP.mjs → chunk-7HC33TEX.mjs} +2 -2
  72. package/dist/esm/{chunk-PC25RPDV.mjs → chunk-7KHKP7DY.mjs} +2 -2
  73. package/dist/esm/{chunk-MFLHAVIW.mjs → chunk-ACE3NEV6.mjs} +2 -2
  74. package/dist/esm/{chunk-CPFQUFVD.mjs → chunk-APGCD5FH.mjs} +2 -2
  75. package/dist/esm/{chunk-BHVSIRNF.mjs → chunk-CU6HQJSE.mjs} +2 -2
  76. package/dist/esm/{chunk-BHVSIRNF.mjs.map → chunk-CU6HQJSE.mjs.map} +1 -1
  77. package/dist/esm/{chunk-W4SMZ6IW.mjs → chunk-DAR3R4UP.mjs} +2 -2
  78. package/dist/esm/{chunk-3LDVJ2YK.mjs → chunk-DUJJUR7O.mjs} +2 -2
  79. package/dist/esm/{chunk-GU4MD5ST.mjs → chunk-EHTTY7EF.mjs} +2 -2
  80. package/dist/esm/{chunk-K233I26C.mjs → chunk-FCHN3LT7.mjs} +2 -2
  81. package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
  82. package/dist/esm/{chunk-YXYYII5S.mjs → chunk-GJOUTA7U.mjs} +2 -2
  83. package/dist/esm/{chunk-6IJZRG3U.mjs → chunk-HTP5ZVX5.mjs} +2 -2
  84. package/dist/esm/{chunk-6IJZRG3U.mjs.map → chunk-HTP5ZVX5.mjs.map} +1 -1
  85. package/dist/esm/{chunk-IOHESHLR.mjs → chunk-HWMMVLTP.mjs} +2 -2
  86. package/dist/esm/chunk-HWNPKEOJ.mjs +2 -0
  87. package/dist/esm/chunk-HWNPKEOJ.mjs.map +1 -0
  88. package/dist/esm/chunk-IM4O756A.mjs +2 -0
  89. package/dist/esm/chunk-IM4O756A.mjs.map +1 -0
  90. package/dist/esm/{chunk-VDYUMBOT.mjs → chunk-JA7CXAVY.mjs} +2 -2
  91. package/dist/esm/{chunk-YLUULY6G.mjs → chunk-JBARRS6K.mjs} +2 -2
  92. package/dist/esm/{chunk-SJDHW55X.mjs → chunk-JLZGYZBX.mjs} +2 -2
  93. package/dist/esm/{chunk-QYJKCRVA.mjs → chunk-JXHGJ3AA.mjs} +2 -2
  94. package/dist/esm/chunk-K4JUKMMY.mjs +2 -0
  95. package/dist/esm/{chunk-G5F5ZOH5.mjs.map → chunk-K4JUKMMY.mjs.map} +1 -1
  96. package/dist/esm/{chunk-KK5HUWF6.mjs → chunk-KBC4ECVP.mjs} +2 -2
  97. package/dist/esm/chunk-LET633ZK.mjs +2 -0
  98. package/dist/esm/{chunk-5W2ERBGY.mjs.map → chunk-LET633ZK.mjs.map} +1 -1
  99. package/dist/esm/{chunk-27ESCVVC.mjs → chunk-M2GGYCLU.mjs} +2 -2
  100. package/dist/esm/{chunk-2YKERRHD.mjs → chunk-MY2BEHYF.mjs} +2 -2
  101. package/dist/esm/{chunk-MAWGZICD.mjs → chunk-MZVVBJVV.mjs} +2 -2
  102. package/dist/esm/chunk-N73S2K2V.mjs +2 -0
  103. package/dist/esm/chunk-NIDF2LHF.mjs +2 -0
  104. package/dist/esm/chunk-NIDF2LHF.mjs.map +1 -0
  105. package/dist/esm/{chunk-YWSDONJJ.mjs → chunk-OSZWSLJA.mjs} +2 -2
  106. package/dist/esm/chunk-P265EC4T.mjs +2 -0
  107. package/dist/esm/{chunk-E5PAUR4N.mjs.map → chunk-P265EC4T.mjs.map} +1 -1
  108. package/dist/esm/{chunk-U4DEYWFT.mjs → chunk-PE7KT5ZB.mjs} +2 -2
  109. package/dist/esm/{chunk-WLDYBSOG.mjs → chunk-PICZWW35.mjs} +2 -2
  110. package/dist/esm/{chunk-US2HZFOM.mjs → chunk-Q3AVJUBL.mjs} +2 -2
  111. package/dist/esm/{chunk-GI4AR6DQ.mjs → chunk-QLEZDMIK.mjs} +2 -2
  112. package/dist/esm/{chunk-7A2KHJ3D.mjs → chunk-QXTQNFEQ.mjs} +2 -2
  113. package/dist/esm/{chunk-OPD5EKOA.mjs → chunk-R6I6Z3AA.mjs} +2 -2
  114. package/dist/esm/{chunk-T7X4GZDU.mjs → chunk-SCLWOTHD.mjs} +2 -2
  115. package/dist/esm/{chunk-HVIF6DW6.mjs → chunk-SZU5Q6CF.mjs} +2 -2
  116. package/dist/esm/{chunk-ONGH5DXZ.mjs → chunk-T3VLXADE.mjs} +2 -2
  117. package/dist/esm/{chunk-WHVCUVZP.mjs → chunk-TJICLFR2.mjs} +2 -2
  118. package/dist/esm/{chunk-PYY2RXFP.mjs → chunk-U6ZD22B5.mjs} +2 -2
  119. package/dist/esm/{chunk-WFKPVKU3.mjs → chunk-UOBDL2BZ.mjs} +2 -2
  120. package/dist/esm/chunk-UP36QQGG.mjs +4 -0
  121. package/dist/esm/{chunk-VWZEJTGP.mjs.map → chunk-UP36QQGG.mjs.map} +1 -1
  122. package/dist/esm/{chunk-2ZLFQBT2.mjs → chunk-VIXTXBYA.mjs} +2 -2
  123. package/dist/esm/{chunk-Y65PKZLK.mjs → chunk-WYV4W2IM.mjs} +2 -2
  124. package/dist/esm/{chunk-TH5JCPN2.mjs → chunk-X5ORWYVO.mjs} +2 -2
  125. package/dist/esm/{chunk-2SAYQUUX.mjs → chunk-X5UJYMJU.mjs} +2 -2
  126. package/dist/esm/chunk-X5YB74NB.mjs +2 -0
  127. package/dist/esm/{chunk-BY3XFRUM.mjs.map → chunk-X5YB74NB.mjs.map} +1 -1
  128. package/dist/esm/{chunk-QUJM5W4L.mjs → chunk-X6H4G6NE.mjs} +2 -2
  129. package/dist/esm/{chunk-BQYKFATL.mjs → chunk-XFL3B4WZ.mjs} +2 -2
  130. package/dist/esm/{chunk-67A5U2X6.mjs → chunk-XX4SFNZY.mjs} +2 -2
  131. package/dist/esm/{chunk-CPAAEEF4.mjs → chunk-YMXJ6GYE.mjs} +2 -2
  132. package/dist/esm/chunk-ZJCTELB4.mjs +2 -0
  133. package/dist/esm/chunk-ZJCTELB4.mjs.map +1 -0
  134. package/dist/esm/{chunk-GRRBXHVG.mjs → chunk-ZOY6N6UM.mjs} +2 -2
  135. package/dist/esm/{chunk-TWETGZ3W.mjs → chunk-ZVYTHOS5.mjs} +2 -2
  136. package/dist/esm/cli/index.mjs +1 -1
  137. package/dist/esm/cli/localNode.mjs +1 -1
  138. package/dist/esm/client/core.mjs +1 -1
  139. package/dist/esm/client/get.mjs +1 -1
  140. package/dist/esm/client/index.mjs +1 -1
  141. package/dist/esm/client/post.mjs +1 -1
  142. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  143. package/dist/esm/core/crypto/index.mjs +1 -1
  144. package/dist/esm/core/crypto/keyless.mjs +1 -1
  145. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  146. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  147. package/dist/esm/core/crypto/singleKey.d.mts +2 -2
  148. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  149. package/dist/esm/core/index.mjs +1 -1
  150. package/dist/esm/errors/index.mjs +1 -1
  151. package/dist/esm/index.d.mts +2 -2
  152. package/dist/esm/index.mjs +1 -1
  153. package/dist/esm/internal/abstraction.mjs +1 -1
  154. package/dist/esm/internal/account.d.mts +43 -3
  155. package/dist/esm/internal/account.mjs +1 -1
  156. package/dist/esm/internal/ans.mjs +1 -1
  157. package/dist/esm/internal/coin.mjs +1 -1
  158. package/dist/esm/internal/digitalAsset.mjs +1 -1
  159. package/dist/esm/internal/event.mjs +1 -1
  160. package/dist/esm/internal/experimental.mjs +1 -1
  161. package/dist/esm/internal/faucet.mjs +1 -1
  162. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  163. package/dist/esm/internal/general.mjs +1 -1
  164. package/dist/esm/internal/keyless.mjs +1 -1
  165. package/dist/esm/internal/object.mjs +1 -1
  166. package/dist/esm/internal/staking.mjs +1 -1
  167. package/dist/esm/internal/table.mjs +1 -1
  168. package/dist/esm/internal/transaction.mjs +1 -1
  169. package/dist/esm/internal/transactionSubmission.d.mts +3 -22
  170. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  171. package/dist/esm/internal/utils/index.d.mts +15 -0
  172. package/dist/esm/internal/utils/index.mjs +2 -0
  173. package/dist/esm/internal/utils/utils.d.mts +65 -0
  174. package/dist/esm/internal/utils/utils.mjs +2 -0
  175. package/dist/esm/internal/utils/utils.mjs.map +1 -0
  176. package/dist/esm/internal/view.mjs +1 -1
  177. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  178. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  179. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  180. package/dist/esm/transactions/index.d.mts +1 -1
  181. package/dist/esm/transactions/index.mjs +1 -1
  182. package/dist/esm/transactions/instances/index.mjs +1 -1
  183. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  184. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  185. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  186. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  187. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  188. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  189. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  190. package/dist/esm/transactions/management/index.mjs +1 -1
  191. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  192. package/dist/esm/transactions/scriptComposer/index.mjs +1 -1
  193. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  194. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  195. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  196. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +29 -18
  197. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  198. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  199. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  200. package/dist/esm/transactions/typeTag/index.d.mts +16 -0
  201. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  202. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  203. package/dist/esm/utils/helpers.d.mts +20 -1
  204. package/dist/esm/utils/helpers.mjs +1 -1
  205. package/dist/esm/utils/index.d.mts +1 -1
  206. package/dist/esm/utils/index.mjs +1 -1
  207. package/dist/esm/version.d.mts +1 -1
  208. package/dist/esm/version.mjs +1 -1
  209. package/package.json +26 -25
  210. package/src/account/MultiKeyAccount.ts +3 -2
  211. package/src/api/general.ts +2 -2
  212. package/src/api/transaction.ts +30 -9
  213. package/src/internal/account.ts +201 -59
  214. package/src/internal/transactionSubmission.ts +4 -81
  215. package/src/internal/utils/index.ts +4 -0
  216. package/src/internal/utils/utils.ts +116 -0
  217. package/src/transactions/scriptComposer/index.ts +22 -7
  218. package/src/transactions/transactionBuilder/remoteAbi.ts +106 -34
  219. package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -2
  220. package/src/transactions/typeTag/index.ts +22 -0
  221. package/src/utils/helpers.ts +22 -0
  222. package/src/version.ts +1 -1
  223. package/dist/common/chunk-RX5UBAME.js.map +0 -1
  224. package/dist/esm/chunk-53IBOHXB.mjs +0 -2
  225. package/dist/esm/chunk-53IBOHXB.mjs.map +0 -1
  226. package/dist/esm/chunk-5W2ERBGY.mjs +0 -2
  227. package/dist/esm/chunk-BY3XFRUM.mjs +0 -2
  228. package/dist/esm/chunk-CXLNTATW.mjs +0 -2
  229. package/dist/esm/chunk-E5PAUR4N.mjs +0 -2
  230. package/dist/esm/chunk-FJ5J7CVW.mjs +0 -2
  231. package/dist/esm/chunk-FJ5J7CVW.mjs.map +0 -1
  232. package/dist/esm/chunk-G5F5ZOH5.mjs +0 -2
  233. package/dist/esm/chunk-HYJQHVDZ.mjs +0 -2
  234. package/dist/esm/chunk-HYJQHVDZ.mjs.map +0 -1
  235. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  236. package/dist/esm/chunk-L6KVC7CJ.mjs +0 -2
  237. package/dist/esm/chunk-L6KVC7CJ.mjs.map +0 -1
  238. package/dist/esm/chunk-OLGEN23M.mjs +0 -2
  239. package/dist/esm/chunk-PIPDQFL2.mjs +0 -2
  240. package/dist/esm/chunk-PIPDQFL2.mjs.map +0 -1
  241. package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
  242. package/dist/esm/chunk-VWZEJTGP.mjs +0 -4
  243. package/dist/esm/chunk-W2C5KRUQ.mjs +0 -2
  244. package/dist/esm/chunk-W2C5KRUQ.mjs.map +0 -1
  245. package/dist/esm/chunk-XRVZAEQO.mjs +0 -2
  246. package/dist/esm/chunk-XRVZAEQO.mjs.map +0 -1
  247. /package/dist/esm/{chunk-EGCL6KA6.mjs.map → chunk-2N4EPY2J.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-YAGIE4GN.mjs.map → chunk-2OBSQ2FK.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-752TOOCA.mjs.map → chunk-2P27DDVV.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-RDPWCN4B.mjs.map → chunk-2SAOCLIU.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-44EHAKKW.mjs.map → chunk-36H47QOE.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-AQWKKSRN.mjs.map → chunk-3DHWWNJ3.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-DAJFOJ3L.mjs.map → chunk-4KKJ36IO.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-UJJGIPOA.mjs.map → chunk-4PW3JKQZ.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-B23VO5TB.mjs.map → chunk-4SWK3JHQ.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-XW3BXTCZ.mjs.map → chunk-553ZRNUL.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-ZS2IVRHT.mjs.map → chunk-5AD7ZF6G.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-GTVMJJQQ.mjs.map → chunk-5MVHOQKD.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-HKL4MFNL.mjs.map → chunk-5W5XV63W.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-P5CM4C2G.mjs.map → chunk-5WWU3WSU.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-FOEPRHAC.mjs.map → chunk-6FQDCTMA.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-5H5D6QVX.mjs.map → chunk-6IULVNLQ.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-2TRQERBL.mjs.map → chunk-6KI24ZRR.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-BPHCRTHD.mjs.map → chunk-6VGLRQBT.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-HBTJN4RJ.mjs.map → chunk-6YPM7TK2.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-XSBUL2WP.mjs.map → chunk-7HC33TEX.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-PC25RPDV.mjs.map → chunk-7KHKP7DY.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-MFLHAVIW.mjs.map → chunk-ACE3NEV6.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-CPFQUFVD.mjs.map → chunk-APGCD5FH.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-W4SMZ6IW.mjs.map → chunk-DAR3R4UP.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-3LDVJ2YK.mjs.map → chunk-DUJJUR7O.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-GU4MD5ST.mjs.map → chunk-EHTTY7EF.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-K233I26C.mjs.map → chunk-FCHN3LT7.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-JXCZTOYC.mjs.map → chunk-G3MHXDYA.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-YXYYII5S.mjs.map → chunk-GJOUTA7U.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-IOHESHLR.mjs.map → chunk-HWMMVLTP.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-VDYUMBOT.mjs.map → chunk-JA7CXAVY.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-YLUULY6G.mjs.map → chunk-JBARRS6K.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-SJDHW55X.mjs.map → chunk-JLZGYZBX.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-QYJKCRVA.mjs.map → chunk-JXHGJ3AA.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-KK5HUWF6.mjs.map → chunk-KBC4ECVP.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-27ESCVVC.mjs.map → chunk-M2GGYCLU.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-2YKERRHD.mjs.map → chunk-MY2BEHYF.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-MAWGZICD.mjs.map → chunk-MZVVBJVV.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-CXLNTATW.mjs.map → chunk-N73S2K2V.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-YWSDONJJ.mjs.map → chunk-OSZWSLJA.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-U4DEYWFT.mjs.map → chunk-PE7KT5ZB.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-WLDYBSOG.mjs.map → chunk-PICZWW35.mjs.map} +0 -0
  289. /package/dist/esm/{chunk-US2HZFOM.mjs.map → chunk-Q3AVJUBL.mjs.map} +0 -0
  290. /package/dist/esm/{chunk-GI4AR6DQ.mjs.map → chunk-QLEZDMIK.mjs.map} +0 -0
  291. /package/dist/esm/{chunk-7A2KHJ3D.mjs.map → chunk-QXTQNFEQ.mjs.map} +0 -0
  292. /package/dist/esm/{chunk-OPD5EKOA.mjs.map → chunk-R6I6Z3AA.mjs.map} +0 -0
  293. /package/dist/esm/{chunk-T7X4GZDU.mjs.map → chunk-SCLWOTHD.mjs.map} +0 -0
  294. /package/dist/esm/{chunk-HVIF6DW6.mjs.map → chunk-SZU5Q6CF.mjs.map} +0 -0
  295. /package/dist/esm/{chunk-ONGH5DXZ.mjs.map → chunk-T3VLXADE.mjs.map} +0 -0
  296. /package/dist/esm/{chunk-WHVCUVZP.mjs.map → chunk-TJICLFR2.mjs.map} +0 -0
  297. /package/dist/esm/{chunk-PYY2RXFP.mjs.map → chunk-U6ZD22B5.mjs.map} +0 -0
  298. /package/dist/esm/{chunk-WFKPVKU3.mjs.map → chunk-UOBDL2BZ.mjs.map} +0 -0
  299. /package/dist/esm/{chunk-2ZLFQBT2.mjs.map → chunk-VIXTXBYA.mjs.map} +0 -0
  300. /package/dist/esm/{chunk-Y65PKZLK.mjs.map → chunk-WYV4W2IM.mjs.map} +0 -0
  301. /package/dist/esm/{chunk-TH5JCPN2.mjs.map → chunk-X5ORWYVO.mjs.map} +0 -0
  302. /package/dist/esm/{chunk-2SAYQUUX.mjs.map → chunk-X5UJYMJU.mjs.map} +0 -0
  303. /package/dist/esm/{chunk-QUJM5W4L.mjs.map → chunk-X6H4G6NE.mjs.map} +0 -0
  304. /package/dist/esm/{chunk-BQYKFATL.mjs.map → chunk-XFL3B4WZ.mjs.map} +0 -0
  305. /package/dist/esm/{chunk-67A5U2X6.mjs.map → chunk-XX4SFNZY.mjs.map} +0 -0
  306. /package/dist/esm/{chunk-CPAAEEF4.mjs.map → chunk-YMXJ6GYE.mjs.map} +0 -0
  307. /package/dist/esm/{chunk-GRRBXHVG.mjs.map → chunk-ZOY6N6UM.mjs.map} +0 -0
  308. /package/dist/esm/{chunk-TWETGZ3W.mjs.map → chunk-ZVYTHOS5.mjs.map} +0 -0
  309. /package/dist/esm/{chunk-UIRAXHDH.mjs.map → internal/utils/index.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account as AccountModule } from \"../account\";\nimport { AccountAddress, PrivateKey, AccountAddressInput, createObjectAddress } from \"../core\";\nimport {\n AccountData,\n AnyNumber,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n GetObjectDataQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n MoveValue,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinsCount,\n getAccountCoinsData,\n getAccountCollectionsWithOwnedTokens,\n getAccountOwnedObjects,\n getAccountOwnedTokens,\n getAccountOwnedTokensFromCollectionAddress,\n getAccountTokensCount,\n getAccountTransactionsCount,\n getInfo,\n getModule,\n getModules,\n getResource,\n getResources,\n getTransactions,\n lookupOriginalAccountAddress,\n} from \"../internal/account\";\nimport { APTOS_COIN, APTOS_FA, ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\nimport { view } from \"../internal/view\";\nimport { isEncodedStruct, parseEncodedStruct } from \"../utils\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { AccountAbstraction } from \"./account/abstraction\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n * @group Account\n */\nexport class Account {\n abstraction: AccountAbstraction;\n\n /**\n * Creates an instance of the Aptos client with the provided configuration.\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 * // Initialize the Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET }); // specify your own network if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n constructor(readonly config: AptosConfig) {\n this.abstraction = new AccountAbstraction(config);\n }\n\n /**\n * Queries the current state for an Aptos account given its account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.accountAddress - The Aptos account address to query.\n * @returns The account 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 account information for a specific address\n * const accountInfo = await aptos.getAccountInfo({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(accountInfo);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountInfo(args: { accountAddress: AccountAddressInput }): Promise<AccountData> {\n return getInfo({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for all modules in an account given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query modules for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.\n *\n * @returns - The account modules associated with the specified 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 account modules for a specific account\n * const accountModules = await aptos.getAccountModules({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first module\n * limit: 10, // limiting to 10 modules\n * },\n * });\n *\n * console.log(accountModules);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModules(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveModuleBytecode[]> {\n return getModules({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a specific account module given an account address and module name.\n *\n * @param args.accountAddress - The Aptos account address.\n * @param args.moduleName - The name of the module.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns The account module associated with the specified account address and module name.\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 account module for a specific account address and module name\n * const module = await aptos.getAccountModule({\n * accountAddress: \"0x1\", // replace with a real account address\n * moduleName: \"MyModule\" // specify the module name\n * });\n *\n * console.log(module);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n }): Promise<MoveModuleBytecode> {\n return getModule({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries account transactions given an account address.\n * This function may call the API multiple times to auto paginate and retrieve all account transactions.\n *\n * @param args.accountAddress - The Aptos account address to query transactions for.\n * @param args.options - Optional pagination arguments.\n * @param args.options.offset - The number of transactions to start returning results from.\n * @param args.options.limit - The maximum number of results to return.\n *\n * @returns The account 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 * // Fetch transactions for a specific account\n * const transactions = await aptos.getAccountTransactions({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first transaction\n * limit: 10, // limiting to 10 transactions\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactions(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all account resources given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query resources for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Account resources.\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 account resources for a specific account address\n * const resources = await aptos.getAccountResources({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(resources);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResources(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveResource[]> {\n return getResources({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a specific account resource given an account address and resource type.\n *\n * @template T - The typed output of the resource.\n * @param args.accountAddress - The Aptos account address to query.\n * @param args.resourceType - The string representation of an on-chain Move struct type, e.g., \"0x1::aptos_coin::AptosCoin\".\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns The account resource of the specified 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 account resource for a specific account address and resource type\n * const resource = await aptos.getAccountResource({\n * accountAddress: \"0x1\", // replace with a real account address\n * resourceType: \"0x1::aptos_coin::AptosCoin\"\n * });\n *\n * console.log(resource);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return getResource<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Looks up the account address for a given authentication key, handling both rotated and non-rotated keys.\n *\n * @param args.authenticationKey - The authentication key for which to look up the account address.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Promise<AccountAddress> - The account address associated with the authentication key.\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 * // Look up the original account address for a given authentication key\n * const accountAddress = await aptos.lookupOriginalAccountAddress({\n * authenticationKey: \"0x1\", // replace with a real authentication key\n * });\n *\n * console.log(\"Original Account Address:\", accountAddress);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async lookupOriginalAccountAddress(args: {\n authenticationKey: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: LedgerVersionArg;\n }): Promise<AccountAddress> {\n return lookupOriginalAccountAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the current count of tokens owned by a specified account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address to query the token count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The current count of tokens owned by 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.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of tokens owned by the account\n * const tokensCount = await aptos.getAccountTokensCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(`Tokens Count: ${tokensCount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTokensCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTokensCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the tokens currently owned by a specified account, including NFTs and fungible tokens.\n * If desired, you can filter the results by a specific token standard.\n *\n * @param args.accountAddress The account address for which to retrieve owned tokens.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard Optional filter for the NFT standard to query for.\n * @param args.options.offset Optional number to start returning results from.\n * @param args.options.limit Optional number of results to return.\n * @param args.options.orderBy Optional order to sort the tokens by.\n * @returns An array of tokens with their respective 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 * // Get the tokens owned by a specific account\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify how many tokens to return\n * orderBy: \"created_at\", // specify the order of the results\n * },\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all current tokens of a specific collection that an account owns by the collection address.\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the tokens for.\n * @param args.collectionAddress - The address of the collection being queried.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to, before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number token to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Tokens array with the token 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 * // Get tokens owned by a specific account in a specific collection\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({\n * accountAddress: \"0x1\", // replace with a real account address\n * collectionAddress: \"0x2\", // replace with a real collection address\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokensFromCollectionAddress(args: {\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokensFromCollectionAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for all collections that an account currently has tokens for, including NFTs, fungible tokens, and soulbound tokens.\n * If you want to filter by a specific token standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the collections for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number of the collection to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Collections array with the collections 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 * // Get account collections with owned tokens for a specific account\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * tokenStandard: \"NFT\", // specify the token standard if needed\n * limit: 10, // specify the number of results to return\n * },\n * });\n *\n * console.log(accountCollectionsWithOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCollectionsWithOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountCollectionsWithOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of transactions submitted by an account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address we want to get the total count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns Current count of transactions made by an account.\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 count of transactions for a specific account\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * });\n *\n * console.log(accountTransactionsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactionsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the coins data for a specified account.\n *\n * @param args.accountAddress - The account address for which to retrieve the coin's data.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.offset - Optional. The number of coins to start returning results from.\n * @param args.options.limit - Optional. The number of results to return.\n * @param args.options.orderBy - Optional. The order to sort the coins by.\n * @param args.options.where - Optional. Filter the results by specific criteria.\n * @returns An array containing the coins data for the specified account.\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 coins data for a specific account\n * const accountCoinsData = await aptos.getAccountCoinsData({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of results to return\n * orderBy: { asset_type: \"asc\" }, // specify the order of results\n * },\n * });\n *\n * console.log(accountCoinsData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs &\n OrderByArg<GetAccountCoinsDataResponse[0]> &\n WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetAccountCoinsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsData({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the current count of an account's coins aggregated across all types.\n *\n * @param args The parameters for the account coins count query.\n * @param args.accountAddress The account address we want to get the total count for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current count of the aggregated coins for the specified account.\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 account coins count for a specific account\n * const accountCoinsCount = await aptos.getAccountCoinsCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account Coins Count:\", accountCoinsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current amount of APT for a specified account. If the account does not exist, it will return 0.\n *\n * @param args The arguments for the account query.\n * @param args.accountAddress The account address for which to retrieve the APT amount.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current amount of APT for the specified account.\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 APT amount for a specific account\n * const accountAPTAmount = await aptos.getAccountAPTAmount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account APT Amount:\", accountAPTAmount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountAPTAmount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n return this.getAccountCoinAmount({ coinType: APTOS_COIN, faMetadataAddress: APTOS_FA, ...args });\n }\n\n /**\n * Queries the current amount of a specified coin held by an account.\n *\n * @param args The parameters for querying the account's coin amount.\n * @param args.accountAddress The account address to query for the coin amount.\n * @param args.coinType The coin type to query. Note: If not provided, it may be automatically populated if `faMetadataAddress`\n * is specified.\n * @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically\n * populated if `coinType` is specified.\n * @param args.minimumLedgerVersion Not used anymore, here for backward compatibility\n * see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, will be removed in the near future.\n * Optional ledger version to sync up to before querying.\n * @returns The current amount of the specified coin held by 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.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Query the account's coin amount for a specific coin type\n * const accountCoinAmount = await aptos.getAccountCoinAmount({\n * accountAddress: \"0x1\", // replace with a real account address\n * coinType: \"0x1::aptos_coin::AptosCoin\" // specify the coin type\n * });\n *\n * console.log(`Account coin amount: ${accountCoinAmount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType?: MoveStructId;\n faMetadataAddress?: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n const { accountAddress, coinType, faMetadataAddress, minimumLedgerVersion } = args;\n\n if (minimumLedgerVersion) {\n // eslint-disable-next-line no-console\n console.warn(\n `minimumLedgerVersion is not used anymore, here for backward \n compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, \n will be removed in the near future`,\n );\n }\n // Attempt to populate the CoinType field if the FA address is provided.\n // We cannot do this internally due to dependency cycles issue.\n let coinAssetType: MoveStructId | undefined = coinType;\n if (coinType === undefined && faMetadataAddress !== undefined) {\n coinAssetType = await memoizeAsync(\n async () => {\n try {\n const pairedCoinTypeStruct = (\n await view({\n aptosConfig: this.config,\n payload: { function: \"0x1::coin::paired_coin\", functionArguments: [faMetadataAddress] },\n })\n ).at(0) as { vec: MoveValue[] };\n\n // Check if the Option has a value, and if so, parse the struct\n if (pairedCoinTypeStruct.vec.length > 0 && isEncodedStruct(pairedCoinTypeStruct.vec[0])) {\n return parseEncodedStruct(pairedCoinTypeStruct.vec[0]) as MoveStructId;\n }\n } catch (error) {\n /* No paired coin type found */\n }\n return undefined;\n },\n `coin-mapping-${faMetadataAddress.toString()}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n }\n\n let faAddress: string;\n\n if (coinType !== undefined && faMetadataAddress !== undefined) {\n faAddress = AccountAddress.from(faMetadataAddress).toStringLong();\n } else if (coinType !== undefined && faMetadataAddress === undefined) {\n // TODO Move to a separate function as defined in the AIP for coin migration\n if (coinType === APTOS_COIN) {\n faAddress = AccountAddress.A.toStringLong();\n } else {\n faAddress = createObjectAddress(AccountAddress.A, coinType).toStringLong();\n }\n } else if (coinType === undefined && faMetadataAddress !== undefined) {\n const addr = AccountAddress.from(faMetadataAddress);\n faAddress = addr.toStringLong();\n if (addr === AccountAddress.A) {\n coinAssetType = APTOS_COIN;\n }\n // The paired CoinType should be populated outside of this function in another\n // async call. We cannot do this internally due to dependency cycles issue.\n } else {\n throw new Error(\"Either coinType, faMetadataAddress, or both must be provided\");\n }\n\n // When there is a coin mapping, use that first, otherwise use the fungible asset address\n // TODO: This function's signature at the top, returns number, but it could be greater than can be represented\n if (coinAssetType !== undefined) {\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::coin::balance\",\n typeArguments: [coinAssetType],\n functionArguments: [accountAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::primary_fungible_store::balance\",\n typeArguments: [\"0x1::object::ObjectCore\"],\n functionArguments: [accountAddress, faAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n\n /**\n * Queries an account's owned objects.\n *\n * @param args.accountAddress The account address we want to get the objects for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.offset The starting position to start returning results from.\n * @param args.options.limit The number of results to return.\n * @param args.options.orderBy The order to sort the objects by.\n * @returns Objects array with the object 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 * // Get the objects owned by the specified account\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: {\n * offset: 0, // optional, specify if needed\n * limit: 10, // optional, specify if needed\n * orderBy: \"created_at\", // optional, specify if needed\n * },\n * });\n *\n * console.log(accountOwnedObjects);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getAccountOwnedObjects({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Derives an account by providing a private key. This function resolves the provided private key type and derives the public\n * key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and auth key using the SingleKey\n * scheme locally.\n * If the privateKey is an ED25519 type, it looks up the authentication key on chain to determine whether it is a Legacy ED25519\n * key or a Unified ED25519 key, and then derives the account based on that.\n *\n * @param args - The arguments for deriving the account.\n * @param args.privateKey - An account private key.\n * @returns The derived Account type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519PrivateKey } 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 * // Deriving an account from a private key\n * const account = await aptos.deriveAccountFromPrivateKey({\n * privateKey: new Ed25519PrivateKey(\"0x123\") // replace with a real private key\n * });\n *\n * console.log(account);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async deriveAccountFromPrivateKey(args: { privateKey: PrivateKey }): Promise<AccountModule> {\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"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","names":["Account","config","AccountAbstraction","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","waitForIndexerOnVersion","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","APTOS_COIN","APTOS_FA","accountAddress","coinType","faMetadataAddress","minimumLedgerVersion","coinAssetType","memoizeAsync","pairedCoinTypeStruct","view","isEncodedStruct","parseEncodedStruct","faAddress","AccountAddress","createObjectAddress","addr","balanceStr","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
1
+ {"version":3,"sources":["../../src/api/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account as AccountModule } from \"../account\";\nimport { AccountAddress, PrivateKey, AccountAddressInput, createObjectAddress } from \"../core\";\nimport {\n AccountData,\n AnyNumber,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n GetObjectDataQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n MoveValue,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinsCount,\n getAccountCoinsData,\n getAccountCollectionsWithOwnedTokens,\n getAccountOwnedObjects,\n getAccountOwnedTokens,\n getAccountOwnedTokensFromCollectionAddress,\n getAccountTokensCount,\n getAccountTransactionsCount,\n getInfo,\n getModule,\n getModules,\n getResource,\n getResources,\n getTransactions,\n lookupOriginalAccountAddress,\n} from \"../internal/account\";\nimport { APTOS_COIN, APTOS_FA, ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\nimport { view } from \"../internal/view\";\nimport { isEncodedStruct, parseEncodedStruct } from \"../utils\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { AccountAbstraction } from \"./account/abstraction\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n * @group Account\n */\nexport class Account {\n abstraction: AccountAbstraction;\n\n /**\n * Creates an instance of the Aptos client with the provided configuration.\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 * // Initialize the Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET }); // specify your own network if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n constructor(readonly config: AptosConfig) {\n this.abstraction = new AccountAbstraction(config);\n }\n\n /**\n * Queries the current state for an Aptos account given its account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.accountAddress - The Aptos account address to query.\n * @returns The account 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 account information for a specific address\n * const accountInfo = await aptos.getAccountInfo({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(accountInfo);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountInfo(args: { accountAddress: AccountAddressInput }): Promise<AccountData> {\n return getInfo({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for all modules in an account given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query modules for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.\n *\n * @returns - The account modules associated with the specified 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 account modules for a specific account\n * const accountModules = await aptos.getAccountModules({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first module\n * limit: 10, // limiting to 10 modules\n * },\n * });\n *\n * console.log(accountModules);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModules(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveModuleBytecode[]> {\n return getModules({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a specific account module given an account address and module name.\n *\n * @param args.accountAddress - The Aptos account address.\n * @param args.moduleName - The name of the module.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns The account module associated with the specified account address and module name.\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 account module for a specific account address and module name\n * const module = await aptos.getAccountModule({\n * accountAddress: \"0x1\", // replace with a real account address\n * moduleName: \"MyModule\" // specify the module name\n * });\n *\n * console.log(module);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n }): Promise<MoveModuleBytecode> {\n return getModule({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries account transactions given an account address.\n * This function may call the API multiple times to auto paginate and retrieve all account transactions.\n *\n * @param args.accountAddress - The Aptos account address to query transactions for.\n * @param args.options - Optional pagination arguments.\n * @param args.options.offset - The number of transactions to start returning results from.\n * @param args.options.limit - The maximum number of results to return.\n *\n * @returns The account 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 * // Fetch transactions for a specific account\n * const transactions = await aptos.getAccountTransactions({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first transaction\n * limit: 10, // limiting to 10 transactions\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactions(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all account resources given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query resources for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Account resources.\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 account resources for a specific account address\n * const resources = await aptos.getAccountResources({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(resources);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResources(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveResource[]> {\n return getResources({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a specific account resource given an account address and resource type.\n *\n * @template T - The typed output of the resource.\n * @param args.accountAddress - The Aptos account address to query.\n * @param args.resourceType - The string representation of an on-chain Move struct type, e.g., \"0x1::aptos_coin::AptosCoin\".\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns The account resource of the specified 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 account resource for a specific account address and resource type\n * const resource = await aptos.getAccountResource({\n * accountAddress: \"0x1\", // replace with a real account address\n * resourceType: \"0x1::aptos_coin::AptosCoin\"\n * });\n *\n * console.log(resource);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return getResource<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Looks up the account address for a given authentication key, handling both rotated and non-rotated keys.\n *\n * @param args.authenticationKey - The authentication key for which to look up the account address.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Promise<AccountAddress> - The account address associated with the authentication key.\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 * // Look up the original account address for a given authentication key\n * const accountAddress = await aptos.lookupOriginalAccountAddress({\n * authenticationKey: \"0x1\", // replace with a real authentication key\n * });\n *\n * console.log(\"Original Account Address:\", accountAddress);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async lookupOriginalAccountAddress(args: {\n authenticationKey: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: LedgerVersionArg;\n }): Promise<AccountAddress> {\n return lookupOriginalAccountAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the current count of tokens owned by a specified account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address to query the token count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The current count of tokens owned by 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.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of tokens owned by the account\n * const tokensCount = await aptos.getAccountTokensCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(`Tokens Count: ${tokensCount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTokensCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTokensCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the tokens currently owned by a specified account, including NFTs and fungible tokens.\n * If desired, you can filter the results by a specific token standard.\n *\n * @param args.accountAddress The account address for which to retrieve owned tokens.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard Optional filter for the NFT standard to query for.\n * @param args.options.offset Optional number to start returning results from.\n * @param args.options.limit Optional number of results to return.\n * @param args.options.orderBy Optional order to sort the tokens by.\n * @returns An array of tokens with their respective 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 * // Get the tokens owned by a specific account\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify how many tokens to return\n * orderBy: \"created_at\", // specify the order of the results\n * },\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all current tokens of a specific collection that an account owns by the collection address.\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the tokens for.\n * @param args.collectionAddress - The address of the collection being queried.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to, before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number token to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Tokens array with the token 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 * // Get tokens owned by a specific account in a specific collection\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({\n * accountAddress: \"0x1\", // replace with a real account address\n * collectionAddress: \"0x2\", // replace with a real collection address\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokensFromCollectionAddress(args: {\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokensFromCollectionAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for all collections that an account currently has tokens for, including NFTs, fungible tokens, and soulbound tokens.\n * If you want to filter by a specific token standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the collections for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number of the collection to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Collections array with the collections 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 * // Get account collections with owned tokens for a specific account\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * tokenStandard: \"NFT\", // specify the token standard if needed\n * limit: 10, // specify the number of results to return\n * },\n * });\n *\n * console.log(accountCollectionsWithOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCollectionsWithOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountCollectionsWithOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of transactions submitted by an account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address we want to get the total count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns Current count of transactions made by an account.\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 count of transactions for a specific account\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * });\n *\n * console.log(accountTransactionsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactionsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the coins data for a specified account.\n *\n * @param args.accountAddress - The account address for which to retrieve the coin's data.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.offset - Optional. The number of coins to start returning results from.\n * @param args.options.limit - Optional. The number of results to return.\n * @param args.options.orderBy - Optional. The order to sort the coins by.\n * @param args.options.where - Optional. Filter the results by specific criteria.\n * @returns An array containing the coins data for the specified account.\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 coins data for a specific account\n * const accountCoinsData = await aptos.getAccountCoinsData({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of results to return\n * orderBy: { asset_type: \"asc\" }, // specify the order of results\n * },\n * });\n *\n * console.log(accountCoinsData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs &\n OrderByArg<GetAccountCoinsDataResponse[0]> &\n WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetAccountCoinsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsData({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the current count of an account's coins aggregated across all types.\n *\n * @param args The parameters for the account coins count query.\n * @param args.accountAddress The account address we want to get the total count for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current count of the aggregated coins for the specified account.\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 account coins count for a specific account\n * const accountCoinsCount = await aptos.getAccountCoinsCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account Coins Count:\", accountCoinsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current amount of APT for a specified account. If the account does not exist, it will return 0.\n *\n * @param args The arguments for the account query.\n * @param args.accountAddress The account address for which to retrieve the APT amount.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current amount of APT for the specified account.\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 APT amount for a specific account\n * const accountAPTAmount = await aptos.getAccountAPTAmount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account APT Amount:\", accountAPTAmount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountAPTAmount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n return this.getAccountCoinAmount({ coinType: APTOS_COIN, faMetadataAddress: APTOS_FA, ...args });\n }\n\n /**\n * Queries the current amount of a specified coin held by an account.\n *\n * @param args The parameters for querying the account's coin amount.\n * @param args.accountAddress The account address to query for the coin amount.\n * @param args.coinType The coin type to query. Note: If not provided, it may be automatically populated if `faMetadataAddress`\n * is specified.\n * @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically\n * populated if `coinType` is specified.\n * @param args.minimumLedgerVersion Not used anymore, here for backward compatibility\n * see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, will be removed in the near future.\n * Optional ledger version to sync up to before querying.\n * @returns The current amount of the specified coin held by 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.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Query the account's coin amount for a specific coin type\n * const accountCoinAmount = await aptos.getAccountCoinAmount({\n * accountAddress: \"0x1\", // replace with a real account address\n * coinType: \"0x1::aptos_coin::AptosCoin\" // specify the coin type\n * });\n *\n * console.log(`Account coin amount: ${accountCoinAmount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType?: MoveStructId;\n faMetadataAddress?: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n const { accountAddress, coinType, faMetadataAddress, minimumLedgerVersion } = args;\n\n if (minimumLedgerVersion) {\n // eslint-disable-next-line no-console\n console.warn(\n `minimumLedgerVersion is not used anymore, here for backward \n compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, \n will be removed in the near future`,\n );\n }\n // Attempt to populate the CoinType field if the FA address is provided.\n // We cannot do this internally due to dependency cycles issue.\n let coinAssetType: MoveStructId | undefined = coinType;\n if (coinType === undefined && faMetadataAddress !== undefined) {\n coinAssetType = await memoizeAsync(\n async () => {\n try {\n const pairedCoinTypeStruct = (\n await view({\n aptosConfig: this.config,\n payload: { function: \"0x1::coin::paired_coin\", functionArguments: [faMetadataAddress] },\n })\n ).at(0) as { vec: MoveValue[] };\n\n // Check if the Option has a value, and if so, parse the struct\n if (pairedCoinTypeStruct.vec.length > 0 && isEncodedStruct(pairedCoinTypeStruct.vec[0])) {\n return parseEncodedStruct(pairedCoinTypeStruct.vec[0]) as MoveStructId;\n }\n } catch (error) {\n /* No paired coin type found */\n }\n return undefined;\n },\n `coin-mapping-${faMetadataAddress.toString()}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n }\n\n let faAddress: string;\n\n if (coinType !== undefined && faMetadataAddress !== undefined) {\n faAddress = AccountAddress.from(faMetadataAddress).toStringLong();\n } else if (coinType !== undefined && faMetadataAddress === undefined) {\n // TODO Move to a separate function as defined in the AIP for coin migration\n if (coinType === APTOS_COIN) {\n faAddress = AccountAddress.A.toStringLong();\n } else {\n faAddress = createObjectAddress(AccountAddress.A, coinType).toStringLong();\n }\n } else if (coinType === undefined && faMetadataAddress !== undefined) {\n const addr = AccountAddress.from(faMetadataAddress);\n faAddress = addr.toStringLong();\n if (addr === AccountAddress.A) {\n coinAssetType = APTOS_COIN;\n }\n // The paired CoinType should be populated outside of this function in another\n // async call. We cannot do this internally due to dependency cycles issue.\n } else {\n throw new Error(\"Either coinType, faMetadataAddress, or both must be provided\");\n }\n\n // When there is a coin mapping, use that first, otherwise use the fungible asset address\n // TODO: This function's signature at the top, returns number, but it could be greater than can be represented\n if (coinAssetType !== undefined) {\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::coin::balance\",\n typeArguments: [coinAssetType],\n functionArguments: [accountAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::primary_fungible_store::balance\",\n typeArguments: [\"0x1::object::ObjectCore\"],\n functionArguments: [accountAddress, faAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n\n /**\n * Queries an account's owned objects.\n *\n * @param args.accountAddress The account address we want to get the objects for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.offset The starting position to start returning results from.\n * @param args.options.limit The number of results to return.\n * @param args.options.orderBy The order to sort the objects by.\n * @returns Objects array with the object 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 * // Get the objects owned by the specified account\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: {\n * offset: 0, // optional, specify if needed\n * limit: 10, // optional, specify if needed\n * orderBy: \"created_at\", // optional, specify if needed\n * },\n * });\n *\n * console.log(accountOwnedObjects);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getAccountOwnedObjects({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Derives an account by providing a private key. This function resolves the provided private key type and derives the public\n * key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and auth key using the SingleKey\n * scheme locally.\n * If the privateKey is an ED25519 type, it looks up the authentication key on chain to determine whether it is a Legacy ED25519\n * key or a Unified ED25519 key, and then derives the account based on that.\n *\n * @param args - The arguments for deriving the account.\n * @param args.privateKey - An account private key.\n * @returns The derived Account type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519PrivateKey } 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 * // Deriving an account from a private key\n * const account = await aptos.deriveAccountFromPrivateKey({\n * privateKey: new Ed25519PrivateKey(\"0x123\") // replace with a real private key\n * });\n *\n * console.log(account);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async deriveAccountFromPrivateKey(args: { privateKey: PrivateKey }): Promise<AccountModule> {\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"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","names":["Account","config","AccountAbstraction","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","waitForIndexerOnVersion","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","APTOS_COIN","APTOS_FA","accountAddress","coinType","faMetadataAddress","minimumLedgerVersion","coinAssetType","memoizeAsync","pairedCoinTypeStruct","view","isEncodedStruct","parseEncodedStruct","faAddress","AccountAddress","createObjectAddress","addr","balanceStr","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-6IJZRG3U.mjs";import{a as b}from"./chunk-U4DEYWFT.mjs";import{a as A}from"./chunk-Y65PKZLK.mjs";import{a as h}from"./chunk-3LDVJ2YK.mjs";import{a as u}from"./chunk-IOHESHLR.mjs";import{a as y}from"./chunk-L6KVC7CJ.mjs";import{a as x}from"./chunk-KSLLV3ZC.mjs";import{a}from"./chunk-DAJFOJ3L.mjs";import{a as c}from"./chunk-WLDYBSOG.mjs";import{a as l}from"./chunk-EGCL6KA6.mjs";import{a as d}from"./chunk-CXLNTATW.mjs";import{a as f}from"./chunk-UJJGIPOA.mjs";import{a as g}from"./chunk-QYJKCRVA.mjs";import{a as r}from"./chunk-VWZEJTGP.mjs";import{a as s}from"./chunk-AQWKKSRN.mjs";import{a as m}from"./chunk-VDYUMBOT.mjs";var t=class{constructor(n){this.config=new x(n),this.account=new r(this.config),this.abstraction=new s(this.config),this.ans=new m(this.config),this.coin=new a(this.config),this.digitalAsset=new c(this.config),this.event=new l(this.config),this.experimental=new d(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new p(this.config),this.staking=new h(this.config),this.transaction=new y(this.config),this.table=new u(this.config),this.keyless=new b(this.config),this.object=new A(this.config)}};function e(w,n,j){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...k){return this[j][i](...k)},Object.defineProperty(w.prototype,i,o))})}e(t,r,"account");e(t,s,"abstraction");e(t,m,"ans");e(t,a,"coin");e(t,c,"digitalAsset");e(t,l,"event");e(t,d,"experimental");e(t,f,"faucet");e(t,g,"fungibleAsset");e(t,p,"general");e(t,h,"staking");e(t,y,"transaction");e(t,u,"table");e(t,b,"keyless");e(t,A,"object");export{t as a};
2
- //# sourceMappingURL=chunk-2ZLFQBT2.mjs.map
1
+ import{a as y}from"./chunk-NIDF2LHF.mjs";import{a as f}from"./chunk-4PW3JKQZ.mjs";import{a as g}from"./chunk-JXHGJ3AA.mjs";import{a as p}from"./chunk-HTP5ZVX5.mjs";import{a as b}from"./chunk-PE7KT5ZB.mjs";import{a as A}from"./chunk-WYV4W2IM.mjs";import{a as h}from"./chunk-DUJJUR7O.mjs";import{a as u}from"./chunk-HWMMVLTP.mjs";import{a as r}from"./chunk-UP36QQGG.mjs";import{a as s}from"./chunk-3DHWWNJ3.mjs";import{a as m}from"./chunk-JA7CXAVY.mjs";import{a as x}from"./chunk-KSLLV3ZC.mjs";import{a}from"./chunk-4KKJ36IO.mjs";import{a as c}from"./chunk-PICZWW35.mjs";import{a as l}from"./chunk-2N4EPY2J.mjs";import{a as d}from"./chunk-N73S2K2V.mjs";var t=class{constructor(n){this.config=new x(n),this.account=new r(this.config),this.abstraction=new s(this.config),this.ans=new m(this.config),this.coin=new a(this.config),this.digitalAsset=new c(this.config),this.event=new l(this.config),this.experimental=new d(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new p(this.config),this.staking=new h(this.config),this.transaction=new y(this.config),this.table=new u(this.config),this.keyless=new b(this.config),this.object=new A(this.config)}};function e(w,n,j){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...k){return this[j][i](...k)},Object.defineProperty(w.prototype,i,o))})}e(t,r,"account");e(t,s,"abstraction");e(t,m,"ans");e(t,a,"coin");e(t,c,"digitalAsset");e(t,l,"event");e(t,d,"experimental");e(t,f,"faucet");e(t,g,"fungibleAsset");e(t,p,"general");e(t,h,"staking");e(t,y,"transaction");e(t,u,"table");e(t,b,"keyless");e(t,A,"object");export{t as a};
2
+ //# sourceMappingURL=chunk-VIXTXBYA.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-K233I26C.mjs";import{a as r}from"./chunk-MFLHAVIW.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-Y65PKZLK.mjs.map
1
+ import{b as o}from"./chunk-FCHN3LT7.mjs";import{a as r}from"./chunk-ACE3NEV6.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-WYV4W2IM.mjs.map
@@ -1,7 +1,7 @@
1
- import{b as T}from"./chunk-BHVSIRNF.mjs";var N=(r=>(r[r.API_ERROR=0]="API_ERROR",r[r.EXTERNAL_API_ERROR=1]="EXTERNAL_API_ERROR",r[r.SESSION_EXPIRED=2]="SESSION_EXPIRED",r[r.INVALID_STATE=3]="INVALID_STATE",r[r.UNKNOWN=4]="UNKNOWN",r))(N||{}),l=(s=>(s.REAUTHENTICATE="Re-authentiate to continue using your keyless account",s.REAUTHENTICATE_UNSURE="Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support",s.UPDATE_REQUEST_PARAMS="Update the invalid request parameters and reauthenticate.",s.RATE_LIMIT_EXCEEDED="Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest.",s.SERVER_ERROR="Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.CALL_PRECHECK="Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing.",s.REINSTANTIATE="Try instantiating the account again. Avoid manipulating the account object directly",s.JOIN_SUPPORT_GROUP="For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.UNKNOWN="Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s))(l||{}),u=(e=>(e[e.EPHEMERAL_KEY_PAIR_EXPIRED=0]="EPHEMERAL_KEY_PAIR_EXPIRED",e[e.PROOF_NOT_FOUND=1]="PROOF_NOT_FOUND",e[e.ASYNC_PROOF_FETCH_FAILED=2]="ASYNC_PROOF_FETCH_FAILED",e[e.INVALID_PROOF_VERIFICATION_FAILED=3]="INVALID_PROOF_VERIFICATION_FAILED",e[e.INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND=4]="INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND",e[e.INVALID_JWT_SIG=5]="INVALID_JWT_SIG",e[e.INVALID_JWT_JWK_NOT_FOUND=6]="INVALID_JWT_JWK_NOT_FOUND",e[e.INVALID_JWT_ISS_NOT_RECOGNIZED=7]="INVALID_JWT_ISS_NOT_RECOGNIZED",e[e.INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED=8]="INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED",e[e.INVALID_TW_SIG_VERIFICATION_FAILED=9]="INVALID_TW_SIG_VERIFICATION_FAILED",e[e.INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND=10]="INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND",e[e.INVALID_EXPIRY_HORIZON=11]="INVALID_EXPIRY_HORIZON",e[e.JWT_PARSING_ERROR=12]="JWT_PARSING_ERROR",e[e.JWK_FETCH_FAILED=13]="JWK_FETCH_FAILED",e[e.JWK_FETCH_FAILED_FEDERATED=14]="JWK_FETCH_FAILED_FEDERATED",e[e.RATE_LIMIT_EXCEEDED=15]="RATE_LIMIT_EXCEEDED",e[e.PEPPER_SERVICE_INTERNAL_ERROR=16]="PEPPER_SERVICE_INTERNAL_ERROR",e[e.PEPPER_SERVICE_BAD_REQUEST=17]="PEPPER_SERVICE_BAD_REQUEST",e[e.PEPPER_SERVICE_OTHER=18]="PEPPER_SERVICE_OTHER",e[e.PROVER_SERVICE_INTERNAL_ERROR=19]="PROVER_SERVICE_INTERNAL_ERROR",e[e.PROVER_SERVICE_BAD_REQUEST=20]="PROVER_SERVICE_BAD_REQUEST",e[e.PROVER_SERVICE_OTHER=21]="PROVER_SERVICE_OTHER",e[e.FULL_NODE_CONFIG_LOOKUP_ERROR=22]="FULL_NODE_CONFIG_LOOKUP_ERROR",e[e.FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR=23]="FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR",e[e.FULL_NODE_JWKS_LOOKUP_ERROR=24]="FULL_NODE_JWKS_LOOKUP_ERROR",e[e.FULL_NODE_OTHER=25]="FULL_NODE_OTHER",e[e.UNKNOWN=26]="UNKNOWN",e))(u||{}),A={0:["The ephemeral keypair has expired.",2,"Re-authentiate to continue using your keyless account"],1:["The required proof could not be found.",3,"Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing."],2:["The required proof failed to fetch.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],3:["The provided proof is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],4:["The verification key used to authenticate was updated.",2,"Re-authentiate to continue using your keyless account"],5:["The JWK was found, but JWT failed verification",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],6:["The JWK required to verify the JWT could not be found. The JWK may have been rotated out.",2,"Re-authentiate to continue using your keyless account"],7:["The JWT issuer is not recognized.",3,"Update the invalid request parameters and reauthenticate."],8:["The JWT issuer is not supported by the Federated Keyless ",0,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],9:["The training wheels signature is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],10:["The public key used to verify the training wheels signature was not found.",2,"Re-authentiate to continue using your keyless account"],11:["The expiry horizon is invalid.",2,"Re-authentiate to continue using your keyless account"],13:["Failed to fetch JWKS.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],14:["Failed to fetch JWKS for Federated Keyless provider.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],15:["Rate limit exceeded. Too many requests in a short period.",0,"Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest."],16:["Internal error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],17:["Bad request sent to Pepper service.",0,"Update the invalid request parameters and reauthenticate."],18:["Unknown error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],19:["Internal error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],20:["Bad request sent to Prover service.",0,"Update the invalid request parameters and reauthenticate."],21:["Unknown error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],12:["Error when parsing JWT. This should never happen. Join https://t.me/+h5CN-W35yUFiYzkx for support",3,"Try instantiating the account again. Avoid manipulating the account object directly"],22:["Error when looking up on-chain keyless configuration.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],23:["Error when looking up on-chain verification key.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],24:["Error when looking up on-chain JWKS.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],25:["Unknown error from full node.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],26:["An unknown error has occurred.",4,"Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"]},O=class i extends Error{constructor(o){let{innerError:E,category:t,resolutionTip:R,type:r,message:_=A[r][0],details:n}=o;super(_),this.name="KeylessError",this.innerError=E,this.category=t,this.resolutionTip=R,this.type=r,this.details=n,this.message=i.constructMessage(_,R,E,n)}static constructMessage(o,E,t,R){let r=`
1
+ import{b as T}from"./chunk-CU6HQJSE.mjs";var N=(r=>(r[r.API_ERROR=0]="API_ERROR",r[r.EXTERNAL_API_ERROR=1]="EXTERNAL_API_ERROR",r[r.SESSION_EXPIRED=2]="SESSION_EXPIRED",r[r.INVALID_STATE=3]="INVALID_STATE",r[r.UNKNOWN=4]="UNKNOWN",r))(N||{}),l=(s=>(s.REAUTHENTICATE="Re-authentiate to continue using your keyless account",s.REAUTHENTICATE_UNSURE="Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support",s.UPDATE_REQUEST_PARAMS="Update the invalid request parameters and reauthenticate.",s.RATE_LIMIT_EXCEEDED="Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest.",s.SERVER_ERROR="Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.CALL_PRECHECK="Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing.",s.REINSTANTIATE="Try instantiating the account again. Avoid manipulating the account object directly",s.JOIN_SUPPORT_GROUP="For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.UNKNOWN="Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s))(l||{}),u=(e=>(e[e.EPHEMERAL_KEY_PAIR_EXPIRED=0]="EPHEMERAL_KEY_PAIR_EXPIRED",e[e.PROOF_NOT_FOUND=1]="PROOF_NOT_FOUND",e[e.ASYNC_PROOF_FETCH_FAILED=2]="ASYNC_PROOF_FETCH_FAILED",e[e.INVALID_PROOF_VERIFICATION_FAILED=3]="INVALID_PROOF_VERIFICATION_FAILED",e[e.INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND=4]="INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND",e[e.INVALID_JWT_SIG=5]="INVALID_JWT_SIG",e[e.INVALID_JWT_JWK_NOT_FOUND=6]="INVALID_JWT_JWK_NOT_FOUND",e[e.INVALID_JWT_ISS_NOT_RECOGNIZED=7]="INVALID_JWT_ISS_NOT_RECOGNIZED",e[e.INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED=8]="INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED",e[e.INVALID_TW_SIG_VERIFICATION_FAILED=9]="INVALID_TW_SIG_VERIFICATION_FAILED",e[e.INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND=10]="INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND",e[e.INVALID_EXPIRY_HORIZON=11]="INVALID_EXPIRY_HORIZON",e[e.JWT_PARSING_ERROR=12]="JWT_PARSING_ERROR",e[e.JWK_FETCH_FAILED=13]="JWK_FETCH_FAILED",e[e.JWK_FETCH_FAILED_FEDERATED=14]="JWK_FETCH_FAILED_FEDERATED",e[e.RATE_LIMIT_EXCEEDED=15]="RATE_LIMIT_EXCEEDED",e[e.PEPPER_SERVICE_INTERNAL_ERROR=16]="PEPPER_SERVICE_INTERNAL_ERROR",e[e.PEPPER_SERVICE_BAD_REQUEST=17]="PEPPER_SERVICE_BAD_REQUEST",e[e.PEPPER_SERVICE_OTHER=18]="PEPPER_SERVICE_OTHER",e[e.PROVER_SERVICE_INTERNAL_ERROR=19]="PROVER_SERVICE_INTERNAL_ERROR",e[e.PROVER_SERVICE_BAD_REQUEST=20]="PROVER_SERVICE_BAD_REQUEST",e[e.PROVER_SERVICE_OTHER=21]="PROVER_SERVICE_OTHER",e[e.FULL_NODE_CONFIG_LOOKUP_ERROR=22]="FULL_NODE_CONFIG_LOOKUP_ERROR",e[e.FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR=23]="FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR",e[e.FULL_NODE_JWKS_LOOKUP_ERROR=24]="FULL_NODE_JWKS_LOOKUP_ERROR",e[e.FULL_NODE_OTHER=25]="FULL_NODE_OTHER",e[e.UNKNOWN=26]="UNKNOWN",e))(u||{}),A={0:["The ephemeral keypair has expired.",2,"Re-authentiate to continue using your keyless account"],1:["The required proof could not be found.",3,"Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing."],2:["The required proof failed to fetch.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],3:["The provided proof is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],4:["The verification key used to authenticate was updated.",2,"Re-authentiate to continue using your keyless account"],5:["The JWK was found, but JWT failed verification",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],6:["The JWK required to verify the JWT could not be found. The JWK may have been rotated out.",2,"Re-authentiate to continue using your keyless account"],7:["The JWT issuer is not recognized.",3,"Update the invalid request parameters and reauthenticate."],8:["The JWT issuer is not supported by the Federated Keyless ",0,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],9:["The training wheels signature is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],10:["The public key used to verify the training wheels signature was not found.",2,"Re-authentiate to continue using your keyless account"],11:["The expiry horizon is invalid.",2,"Re-authentiate to continue using your keyless account"],13:["Failed to fetch JWKS.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],14:["Failed to fetch JWKS for Federated Keyless provider.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],15:["Rate limit exceeded. Too many requests in a short period.",0,"Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest."],16:["Internal error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],17:["Bad request sent to Pepper service.",0,"Update the invalid request parameters and reauthenticate."],18:["Unknown error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],19:["Internal error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],20:["Bad request sent to Prover service.",0,"Update the invalid request parameters and reauthenticate."],21:["Unknown error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],12:["Error when parsing JWT. This should never happen. Join https://t.me/+h5CN-W35yUFiYzkx for support",3,"Try instantiating the account again. Avoid manipulating the account object directly"],22:["Error when looking up on-chain keyless configuration.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],23:["Error when looking up on-chain verification key.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],24:["Error when looking up on-chain JWKS.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],25:["Unknown error from full node.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],26:["An unknown error has occurred.",4,"Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"]},O=class i extends Error{constructor(o){let{innerError:E,category:t,resolutionTip:R,type:r,message:_=A[r][0],details:n}=o;super(_),this.name="KeylessError",this.innerError=E,this.category=t,this.resolutionTip=R,this.type=r,this.details=n,this.message=i.constructMessage(_,R,E,n)}static constructMessage(o,E,t,R){let r=`
2
2
  Message: ${o}`;return R&&(r+=`
3
3
  Details: ${R}`),t instanceof I?r+=`
4
4
  AptosApiError: ${t.message}`:t!==void 0&&(r+=`
5
5
  Error: ${T(t)}`),r+=`
6
6
  KeylessErrorResolutionTip: ${E}`,r}static fromErrorType(o){let{error:E,type:t,details:R}=o,[r,_,n]=A[t];return new i({message:r,details:R,innerError:E,category:_,resolutionTip:n,type:t})}},I=class extends Error{constructor({apiType:o,aptosRequest:E,aptosResponse:t}){super(P({apiType:o,aptosRequest:E,aptosResponse:t})),this.name="AptosApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.data=t.data,this.request=E}};function P({apiType:i,aptosRequest:o,aptosResponse:E}){let t=E.headers?.traceparent?.split("-")[1],R=t?`(trace_id:${t}) `:"",r=`Request to [${i}]: ${o.method} ${E.url??o.url} ${R}failed with`;return i==="Indexer"&&E.data?.errors?.[0]?.message!=null?`${r}: ${E.data.errors[0].message}`:E.data?.message!=null&&E.data?.error_code!=null?`${r}: ${JSON.stringify(E.data)}`:`${r} status: ${E.statusText}(code:${E.status}) and response body: ${S(E.data)}`}var a=400;function S(i){let o=JSON.stringify(i);return o.length<=a?o:`truncated(original_size:${o.length}): ${o.slice(0,a/2)}...${o.slice(-a/2)}`}export{N as a,l as b,u as c,O as d,I as e};
7
- //# sourceMappingURL=chunk-TH5JCPN2.mjs.map
7
+ //# sourceMappingURL=chunk-X5ORWYVO.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as g}from"./chunk-P5CM4C2G.mjs";import{c as u}from"./chunk-BPHCRTHD.mjs";import{b as d}from"./chunk-WFKPVKU3.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";var l=class{constructor(t){this.signingScheme=1;let{signers:e,publicKey:r,address:a}=t;if(this.publicKey=r,this.accountAddress=a?c.from(a):this.publicKey.authKey().derivedAddress(),r.threshold>e.length)throw new Error(`Not enough signers provided to satisfy the required signatures. Need ${r.threshold} signers, but only ${e.length} provided`);if(r.threshold<e.length)throw new Error(`More signers provided than required. Need ${r.threshold} signers, but ${e.length} provided`);let n=[];for(let i of e)n.push(this.publicKey.getIndex(i.publicKey()));let s=e.map((i,o)=>[i,n[o]]);s.sort((i,o)=>i[1]-o[1]),this.signers=s.map(i=>i[0]),this.signerIndices=s.map(i=>i[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:n})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new u(this.publicKey,this.sign(t))}signTransactionWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}sign(t){let e=[];for(let r of this.signers)e.push(r.sign(t));return new d({signatures:e,bitmap:this.signaturesBitmap})}signTransaction(t){return this.sign(g(t))}};export{l as a};
2
- //# sourceMappingURL=chunk-2SAYQUUX.mjs.map
1
+ import{d as g}from"./chunk-5WWU3WSU.mjs";import{c as u}from"./chunk-6VGLRQBT.mjs";import{b as d}from"./chunk-UOBDL2BZ.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";var l=class{constructor(t){this.signingScheme=1;let{signers:e,publicKey:r,address:a}=t;if(this.publicKey=r,this.accountAddress=a?c.from(a):this.publicKey.authKey().derivedAddress(),r.threshold>e.length)throw new Error(`Not enough signers provided to satisfy the required signatures. Need ${r.threshold} signers, but only ${e.length} provided`);if(r.threshold<e.length)throw new Error(`More signers provided than required. Need ${r.threshold} signers, but ${e.length} provided`);let n=[];for(let i of e)n.push(this.publicKey.getIndex(i.publicKey()));let s=e.map((i,o)=>[i,n[o]]);s.sort((i,o)=>i[1]-o[1]),this.signers=s.map(i=>i[0]),this.signerIndices=s.map(i=>i[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:n})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new u(this.publicKey,this.sign(t))}signTransactionWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}sign(t){let e=[];for(let r of this.signers)e.push(r.sign(t));return new d({signatures:e,bitmap:this.signaturesBitmap})}signTransaction(t){return this.sign(g(t))}};export{l as a};
2
+ //# sourceMappingURL=chunk-X5UJYMJU.mjs.map
@@ -0,0 +1,2 @@
1
+ var o="1.36.0";export{o as a};
2
+ //# sourceMappingURL=chunk-X5YB74NB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.35.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.36.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{a as u,b}from"./chunk-2TRQERBL.mjs";import{b as p}from"./chunk-H4YAL2IL.mjs";import{a as g}from"./chunk-A3VO773Q.mjs";import{a as m}from"./chunk-TTY5GFMN.mjs";function S(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var h=class extends p{constructor(e){super(),this.publicKeys=e.publicKeys}createBitmap(e){let{bits:t}=e,r=128,i=new Uint8Array([0,0,0,0]),a=new Set;return t.forEach((n,o)=>{if(o+1>this.publicKeys.length)throw new Error(`Signature index ${o+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=r>>n%8,i[c]=y}),i}getIndex(e){let t=this.publicKeys.findIndex(r=>r.toString()===e.toString());if(t!==-1)return t;throw new Error(`Public key ${e} not found in multi key set ${this.publicKeys}`)}},f=class l extends h{constructor(e){let{publicKeys:t,signaturesRequired:r}=e;if(super({publicKeys:t}),r<1)throw new Error("The number of required signatures needs to be greater than 0");if(t.length<r)throw new Error(`Provided ${t.length} public keys is smaller than the ${r} required signatures`);this.publicKeys=t.map(i=>i instanceof u?i:new u(i)),this.signaturesRequired=r}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let t=e.deserializeVector(u),r=e.deserializeU8();return new l({publicKeys:t,signaturesRequired:r})}getIndex(e){let t=e instanceof u?e:new u(e);return super.getIndex(t)}static isInstance(e){return"publicKeys"in e&&"signaturesRequired"in e}},s=class s extends g{constructor(e){super();let{signatures:t,bitmap:r}=e;if(t.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=t.map(a=>a instanceof b?a:new b(a)),!(r instanceof Uint8Array))this.bitmap=s.createBitmap({bits:r});else{if(r.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=r}let i=this.bitmap.reduce((a,n)=>a+S(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:t}=e,r=128,i=new Uint8Array([0,0,0,0]),a=new Set;return t.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let o=Math.floor(n/8),c=i[o];c|=r>>n%8,i[o]=c}),i}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let t=e.deserializeVector(b),r=e.deserializeBytes();return new s({signatures:t,bitmap:r})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var d=s;export{h as a,f as b,d as c};
2
- //# sourceMappingURL=chunk-QUJM5W4L.mjs.map
1
+ import{a as u,b}from"./chunk-6KI24ZRR.mjs";import{b as p}from"./chunk-H4YAL2IL.mjs";import{a as g}from"./chunk-A3VO773Q.mjs";import{a as m}from"./chunk-TTY5GFMN.mjs";function S(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var h=class extends p{constructor(e){super(),this.publicKeys=e.publicKeys}createBitmap(e){let{bits:t}=e,r=128,i=new Uint8Array([0,0,0,0]),a=new Set;return t.forEach((n,o)=>{if(o+1>this.publicKeys.length)throw new Error(`Signature index ${o+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=r>>n%8,i[c]=y}),i}getIndex(e){let t=this.publicKeys.findIndex(r=>r.toString()===e.toString());if(t!==-1)return t;throw new Error(`Public key ${e} not found in multi key set ${this.publicKeys}`)}},f=class l extends h{constructor(e){let{publicKeys:t,signaturesRequired:r}=e;if(super({publicKeys:t}),r<1)throw new Error("The number of required signatures needs to be greater than 0");if(t.length<r)throw new Error(`Provided ${t.length} public keys is smaller than the ${r} required signatures`);this.publicKeys=t.map(i=>i instanceof u?i:new u(i)),this.signaturesRequired=r}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let t=e.deserializeVector(u),r=e.deserializeU8();return new l({publicKeys:t,signaturesRequired:r})}getIndex(e){let t=e instanceof u?e:new u(e);return super.getIndex(t)}static isInstance(e){return"publicKeys"in e&&"signaturesRequired"in e}},s=class s extends g{constructor(e){super();let{signatures:t,bitmap:r}=e;if(t.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=t.map(a=>a instanceof b?a:new b(a)),!(r instanceof Uint8Array))this.bitmap=s.createBitmap({bits:r});else{if(r.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=r}let i=this.bitmap.reduce((a,n)=>a+S(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:t}=e,r=128,i=new Uint8Array([0,0,0,0]),a=new Set;return t.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let o=Math.floor(n/8),c=i[o];c|=r>>n%8,i[o]=c}),i}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let t=e.deserializeVector(b),r=e.deserializeBytes();return new s({signatures:t,bitmap:r})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var d=s;export{h as a,f as b,d as c};
2
+ //# sourceMappingURL=chunk-X6H4G6NE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-BPHCRTHD.mjs";import{a as g,b}from"./chunk-WFKPVKU3.mjs";import{b as y,d as p}from"./chunk-7OUPEQRN.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";import{a as h}from"./chunk-RXHER6EA.mjs";var n=class extends h{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${t}`)}}isEd25519(){return this instanceof o}isMultiEd25519(){return this instanceof d}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof l}isSingleSender(){return this instanceof A}},o=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=y.deserialize(e),s=p.deserialize(e);return new r(t,s)}},d=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=g.deserialize(e),s=b.deserialize(e);return new r(t,s)}},u=class r extends n{constructor(e,t,s){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i);return new r(t,s,a)}},l=class r extends n{constructor(e,t,s,a){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i),_=c.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new r(t,s,a,S)}},A=class r extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let t=i.deserialize(e);return new r(t)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
- //# sourceMappingURL=chunk-BQYKFATL.mjs.map
1
+ import{a as i}from"./chunk-6VGLRQBT.mjs";import{a as g,b}from"./chunk-UOBDL2BZ.mjs";import{b as y,d as p}from"./chunk-7OUPEQRN.mjs";import{b as c}from"./chunk-LQOSHBB7.mjs";import{a as h}from"./chunk-RXHER6EA.mjs";var n=class extends h{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${t}`)}}isEd25519(){return this instanceof o}isMultiEd25519(){return this instanceof d}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof l}isSingleSender(){return this instanceof A}},o=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=y.deserialize(e),s=p.deserialize(e);return new r(t,s)}},d=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=g.deserialize(e),s=b.deserialize(e);return new r(t,s)}},u=class r extends n{constructor(e,t,s){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i);return new r(t,s,a)}},l=class r extends n{constructor(e,t,s,a){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i),_=c.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new r(t,s,a,S)}},A=class r extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let t=i.deserialize(e);return new r(t)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
+ //# sourceMappingURL=chunk-XFL3B4WZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-GRRBXHVG.mjs";import{f as c}from"./chunk-752TOOCA.mjs";import{d as r}from"./chunk-RJ7F4JDV.mjs";import{b as s}from"./chunk-LQOSHBB7.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
- //# sourceMappingURL=chunk-67A5U2X6.mjs.map
1
+ import{g as e}from"./chunk-ZOY6N6UM.mjs";import{f as c}from"./chunk-2P27DDVV.mjs";import{d as r}from"./chunk-RJ7F4JDV.mjs";import{b as s}from"./chunk-LQOSHBB7.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
+ //# sourceMappingURL=chunk-XX4SFNZY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as O,b as _}from"./chunk-P5CM4C2G.mjs";import{d as A}from"./chunk-BPHCRTHD.mjs";import{a as R}from"./chunk-5H5D6QVX.mjs";import{a as u,b as w}from"./chunk-2TRQERBL.mjs";import{a as I}from"./chunk-XW3BXTCZ.mjs";import{i as b,j as T,k as x,n as P,q as v,s as k}from"./chunk-HVIF6DW6.mjs";import{d as r}from"./chunk-TH5JCPN2.mjs";import{e as F}from"./chunk-BHVSIRNF.mjs";import{b as g}from"./chunk-LQOSHBB7.mjs";import{a as m}from"./chunk-RXHER6EA.mjs";import{b as y}from"./chunk-VHY6ZATX.mjs";import D from"eventemitter3";import{jwtDecode as W}from"jwt-decode";function ne(f){return f!=null&&typeof f.checkKeylessAccountValidity=="function"}var p=class p extends m{constructor(e){super();this.signingScheme=2;let{address:i,ephemeralKeyPair:t,publicKey:o,uidKey:l,uidVal:n,aud:c,pepper:s,proof:a,proofFetchCallback:h,jwt:d,verificationKeyHash:K}=e;if(this.ephemeralKeyPair=t,this.publicKey=o,this.accountAddress=i?g.from(i):this.publicKey.authKey().derivedAddress(),this.uidKey=l,this.uidVal=n,this.aud=c,this.jwt=d,this.emitter=new D,this.proofOrPromise=a,a instanceof P)this.proof=a;else{if(h===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async C=>{await h(C),this.emitter.removeAllListeners()}),this.init(a)}let S=y.fromHexInput(s).toUint8Array();if(S.length!==p.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${p.PEPPER_LENGTH}`);if(this.pepper=S,K!==void 0){if(y.hexInputToUint8Array(K).length!==32)throw new Error("verificationKeyHash must be 32 bytes");this.verificationKeyHash=y.hexInputToUint8Array(K)}}getAnyPublicKey(){return new u(this.publicKey)}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(i){i instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:i.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(this.accountAddress.serialize(e),e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Cannot serialize - proof undefined");this.proof.serialize(e),e.serializeOption(this.verificationKeyHash,32)}static partialDeserialize(e){let i=g.deserialize(e),t=e.deserializeStr(),o=e.deserializeStr(),l=e.deserializeFixedBytes(31),n=R.deserialize(e),c=P.deserialize(e),s=e.deserializeOption("fixedBytes",32);return{address:i,jwt:t,uidKey:o,pepper:l,ephemeralKeyPair:n,proof:c,verificationKeyHash:s}}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let i=new w(this.sign(e)),t=new u(this.publicKey);return new A(t,i)}signTransactionWithAuthenticator(e){let i=new w(this.signTransaction(e)),t=new u(this.publicKey);return new A(t,i)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}async checkKeylessAccountValidity(e){if(this.isExpired())throw r.fromErrorType({type:0});if(await this.waitForProofFetch(),this.proof===void 0)throw r.fromErrorType({type:2});let i=W(this.jwt,{header:!0});if(i.kid===void 0)throw r.fromErrorType({type:12,details:"checkKeylessAccountValidity failed. JWT is missing 'kid' in header. This should never happen."});if(this.verificationKeyHash!==void 0){let{verificationKey:t}=await v({aptosConfig:e});if(y.hexInputToString(t.hash())!==y.hexInputToString(this.verificationKeyHash))throw r.fromErrorType({type:4})}else console.warn("[Aptos SDK] The verification key hash was not set. Proof may be invalid if the verification key has rotated.");await p.fetchJWK({aptosConfig:e,publicKey:this.publicKey,kid:i.kid})}sign(e){let{expiryDateSecs:i}=this.ephemeralKeyPair;if(this.isExpired())throw r.fromErrorType({type:0});if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let t=this.ephemeralKeyPair.getPublicKey(),o=this.ephemeralKeyPair.sign(e);return new T({jwtHeader:F(this.jwt.split(".")[0]),ephemeralCertificate:new x(this.proof,0),expiryDateSecs:i,ephemeralPublicKey:t,ephemeralSignature:o})}signTransaction(e){if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let i=O(e),o=new E(i,this.proof.proof).hash();return this.sign(o)}verifySignature(e){let{message:i,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:i,signature:t.ephemeralSignature}))}static async fetchJWK(e){let{aptosConfig:i,publicKey:t,kid:o}=e,l=t instanceof b?t:t.keylessPublicKey,{iss:n}=l,c,s=t instanceof I?t.jwkAddress:void 0;try{c=await k({aptosConfig:i,jwkAddr:s})}catch(d){throw r.fromErrorType({type:24,error:d,details:`Failed to fetch ${s?"Federated":"Patched"}JWKs ${s?`for address ${s}`:"0x1"}`})}let a=c.get(n);if(a===void 0)throw r.fromErrorType({type:7,details:`JWKs for issuer ${n} not found.`});let h=a.find(d=>d.kid===o);if(h===void 0)throw r.fromErrorType({type:6,details:`JWK with kid '${o}' for issuer '${n}' not found.`});return h}};p.PEPPER_LENGTH=31;var H=p,E=class extends m{constructor(e,i){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=i}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return _(this.bcsToBytes(),this.domainSeparator)}};export{ne as a,H as b,E as c};
2
- //# sourceMappingURL=chunk-CPAAEEF4.mjs.map
1
+ import{a as O,b as _}from"./chunk-5WWU3WSU.mjs";import{d as A}from"./chunk-6VGLRQBT.mjs";import{a as R}from"./chunk-6IULVNLQ.mjs";import{a as u,b as w}from"./chunk-6KI24ZRR.mjs";import{a as I}from"./chunk-553ZRNUL.mjs";import{i as b,j as T,k as x,n as P,q as v,s as k}from"./chunk-SZU5Q6CF.mjs";import{d as r}from"./chunk-X5ORWYVO.mjs";import{e as F}from"./chunk-CU6HQJSE.mjs";import{b as g}from"./chunk-LQOSHBB7.mjs";import{a as m}from"./chunk-RXHER6EA.mjs";import{b as y}from"./chunk-VHY6ZATX.mjs";import D from"eventemitter3";import{jwtDecode as W}from"jwt-decode";function ne(f){return f!=null&&typeof f.checkKeylessAccountValidity=="function"}var p=class p extends m{constructor(e){super();this.signingScheme=2;let{address:i,ephemeralKeyPair:t,publicKey:o,uidKey:l,uidVal:n,aud:c,pepper:s,proof:a,proofFetchCallback:h,jwt:d,verificationKeyHash:K}=e;if(this.ephemeralKeyPair=t,this.publicKey=o,this.accountAddress=i?g.from(i):this.publicKey.authKey().derivedAddress(),this.uidKey=l,this.uidVal=n,this.aud=c,this.jwt=d,this.emitter=new D,this.proofOrPromise=a,a instanceof P)this.proof=a;else{if(h===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async C=>{await h(C),this.emitter.removeAllListeners()}),this.init(a)}let S=y.fromHexInput(s).toUint8Array();if(S.length!==p.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${p.PEPPER_LENGTH}`);if(this.pepper=S,K!==void 0){if(y.hexInputToUint8Array(K).length!==32)throw new Error("verificationKeyHash must be 32 bytes");this.verificationKeyHash=y.hexInputToUint8Array(K)}}getAnyPublicKey(){return new u(this.publicKey)}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(i){i instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:i.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(this.accountAddress.serialize(e),e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Cannot serialize - proof undefined");this.proof.serialize(e),e.serializeOption(this.verificationKeyHash,32)}static partialDeserialize(e){let i=g.deserialize(e),t=e.deserializeStr(),o=e.deserializeStr(),l=e.deserializeFixedBytes(31),n=R.deserialize(e),c=P.deserialize(e),s=e.deserializeOption("fixedBytes",32);return{address:i,jwt:t,uidKey:o,pepper:l,ephemeralKeyPair:n,proof:c,verificationKeyHash:s}}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let i=new w(this.sign(e)),t=new u(this.publicKey);return new A(t,i)}signTransactionWithAuthenticator(e){let i=new w(this.signTransaction(e)),t=new u(this.publicKey);return new A(t,i)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}async checkKeylessAccountValidity(e){if(this.isExpired())throw r.fromErrorType({type:0});if(await this.waitForProofFetch(),this.proof===void 0)throw r.fromErrorType({type:2});let i=W(this.jwt,{header:!0});if(i.kid===void 0)throw r.fromErrorType({type:12,details:"checkKeylessAccountValidity failed. JWT is missing 'kid' in header. This should never happen."});if(this.verificationKeyHash!==void 0){let{verificationKey:t}=await v({aptosConfig:e});if(y.hexInputToString(t.hash())!==y.hexInputToString(this.verificationKeyHash))throw r.fromErrorType({type:4})}else console.warn("[Aptos SDK] The verification key hash was not set. Proof may be invalid if the verification key has rotated.");await p.fetchJWK({aptosConfig:e,publicKey:this.publicKey,kid:i.kid})}sign(e){let{expiryDateSecs:i}=this.ephemeralKeyPair;if(this.isExpired())throw r.fromErrorType({type:0});if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let t=this.ephemeralKeyPair.getPublicKey(),o=this.ephemeralKeyPair.sign(e);return new T({jwtHeader:F(this.jwt.split(".")[0]),ephemeralCertificate:new x(this.proof,0),expiryDateSecs:i,ephemeralPublicKey:t,ephemeralSignature:o})}signTransaction(e){if(this.proof===void 0)throw r.fromErrorType({type:1,details:"Proof not found - make sure to call `await account.checkKeylessAccountValidity()` before signing."});let i=O(e),o=new E(i,this.proof.proof).hash();return this.sign(o)}verifySignature(e){let{message:i,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:i,signature:t.ephemeralSignature}))}static async fetchJWK(e){let{aptosConfig:i,publicKey:t,kid:o}=e,l=t instanceof b?t:t.keylessPublicKey,{iss:n}=l,c,s=t instanceof I?t.jwkAddress:void 0;try{c=await k({aptosConfig:i,jwkAddr:s})}catch(d){throw r.fromErrorType({type:24,error:d,details:`Failed to fetch ${s?"Federated":"Patched"}JWKs ${s?`for address ${s}`:"0x1"}`})}let a=c.get(n);if(a===void 0)throw r.fromErrorType({type:7,details:`JWKs for issuer ${n} not found.`});let h=a.find(d=>d.kid===o);if(h===void 0)throw r.fromErrorType({type:6,details:`JWK with kid '${o}' for issuer '${n}' not found.`});return h}};p.PEPPER_LENGTH=31;var H=p,E=class extends m{constructor(e,i){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=i}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return _(this.bcsToBytes(),this.domainSeparator)}};export{ne as a,H as b,E as c};
2
+ //# sourceMappingURL=chunk-YMXJ6GYE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as g}from"./chunk-YMXJ6GYE.mjs";import{b as m}from"./chunk-TJICLFR2.mjs";import{a as p}from"./chunk-MZVVBJVV.mjs";import{e as a}from"./chunk-6VGLRQBT.mjs";import{b as d,c as u}from"./chunk-X6H4G6NE.mjs";import{b as y}from"./chunk-LQOSHBB7.mjs";var A=class l{constructor(e){this.signingScheme=3;let{multiKey:i,address:s}=e,n=e.signers.map(t=>t instanceof p?m.fromEd25519Account(t):t);if(i.signaturesRequired>n.length)throw new Error(`Not enough signers provided to satisfy the required signatures. Need ${i.signaturesRequired} signers, but only ${n.length} provided`);if(i.signaturesRequired<n.length)throw new Error(`More signers provided than required. Need ${i.signaturesRequired} signers, but ${n.length} provided`);this.publicKey=i,this.accountAddress=s?y.from(s):this.publicKey.authKey().derivedAddress();let r=[];for(let t of n)r.push(this.publicKey.getIndex(t.getAnyPublicKey()));let o=n.map((t,c)=>[t,r[c]]);o.sort((t,c)=>t[1]-c[1]),this.signers=o.map(t=>t[0]),this.signerIndicies=o.map(t=>t[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:r})}static fromPublicKeysAndSigners(e){let{address:i,publicKeys:s,signaturesRequired:n,signers:r}=e,o=new d({publicKeys:s,signaturesRequired:n});return new l({multiKey:o,signers:r,address:i})}static isMultiKeySigner(e){return e instanceof l}signWithAuthenticator(e){return new a(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new a(this.publicKey,this.signTransaction(e))}async waitForProofFetch(){let i=this.signers.filter(s=>s instanceof g).map(async s=>s.waitForProofFetch());await Promise.all(i)}async checkKeylessAccountValidity(e){let s=this.signers.filter(n=>n instanceof g).map(n=>n.checkKeylessAccountValidity(e));await Promise.all(s)}sign(e){let i=[];for(let s of this.signers)i.push(s.sign(e));return new u({signatures:i,bitmap:this.signaturesBitmap})}signTransaction(e){let i=[];for(let s of this.signers)i.push(s.signTransaction(e));return new u({signatures:i,bitmap:this.signaturesBitmap})}verifySignature(e){let{message:i,signature:s}=e;if(!this.signerIndicies.every((r,o)=>o===0||r>=this.signerIndicies[o-1]))return!1;for(let r=0;r<s.signatures.length;r+=1){let o=s.signatures[r];if(!this.publicKey.publicKeys[this.signerIndicies[r]].verifySignature({message:i,signature:o}))return!1}return!0}};export{A as a};
2
+ //# sourceMappingURL=chunk-ZJCTELB4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/account/MultiKeyAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Account } from \"./Account\";\nimport { MultiKey, MultiKeySignature, PublicKey } from \"../core/crypto\";\nimport { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAuthenticatorMultiKey } from \"../transactions/authenticator/account\";\nimport { AnyRawTransaction } from \"../transactions/types\";\nimport { AbstractKeylessAccount, KeylessSigner } from \"./AbstractKeylessAccount\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { SingleKeyAccount, SingleKeySigner, SingleKeySignerOrLegacyEd25519Account } from \"./SingleKeyAccount\";\nimport { Ed25519Account } from \"./Ed25519Account\";\n\n/**\n * Arguments required to verify a multi-key signature against a given message.\n *\n * @param message - The original message that was signed.\n * @param signature - The multi-key signature to be verified.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\nexport interface VerifyMultiKeySignatureArgs {\n message: HexInput;\n signature: MultiKeySignature;\n}\n\n/**\n * Signer implementation for the MultiKey authentication scheme.\n *\n * This account utilizes an M of N signing scheme, where M and N are specified in the {@link MultiKey}.\n * It signs messages using an array of M accounts, each corresponding to a public key in the {@link MultiKey}.\n *\n * Note: Generating a signer instance does not create the account on-chain.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\nexport class MultiKeyAccount implements Account, KeylessSigner {\n /**\n * Public key associated with the account\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly publicKey: MultiKey;\n\n /**\n * Account address associated with the account\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly accountAddress: AccountAddress;\n\n /**\n * Signing scheme used to sign transactions\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly signingScheme: SigningScheme = SigningScheme.MultiKey;\n\n /**\n * The signers used to sign messages. These signers should correspond to public keys in the\n * MultiKeyAccount's public key. The number of signers should be equal to this.publicKey.signaturesRequired.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n readonly signers: Account[];\n\n /**\n * An array of indices where for signer[i], signerIndicies[i] is the index of the corresponding public key in\n * publicKey.publicKeys. Used to derive the right public key to use for verification.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n // TODO: Rename Indicies to Indices\n readonly signerIndicies: number[];\n\n readonly signaturesBitmap: Uint8Array;\n\n /**\n * Constructs a MultiKeyAccount instance, which requires multiple signatures for transactions.\n *\n * @param args - The arguments for creating a MultiKeyAccount.\n * @param args.multiKey - The multikey of the account consisting of N public keys and a number M representing the required signatures.\n * @param args.signers - An array of M signers that will be used to sign the transaction.\n * @param args.address - An optional account address input. If not provided, the derived address from the public key will be used.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n constructor(args: {\n multiKey: MultiKey;\n signers: SingleKeySignerOrLegacyEd25519Account[];\n address?: AccountAddressInput;\n }) {\n const { multiKey, address } = args;\n\n const signers: SingleKeySigner[] = args.signers.map((signer) =>\n signer instanceof Ed25519Account ? SingleKeyAccount.fromEd25519Account(signer) : signer,\n );\n\n if (multiKey.signaturesRequired > signers.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Not enough signers provided to satisfy the required signatures. Need ${multiKey.signaturesRequired} signers, but only ${signers.length} provided`,\n );\n } else if (multiKey.signaturesRequired < signers.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `More signers provided than required. Need ${multiKey.signaturesRequired} signers, but ${signers.length} provided`,\n );\n }\n\n this.publicKey = multiKey;\n\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n\n // For each signer, find its corresponding position in the MultiKey's public keys array\n const bitPositions: number[] = [];\n for (const signer of signers) {\n bitPositions.push(this.publicKey.getIndex(signer.getAnyPublicKey()));\n }\n\n // Create pairs of [signer, position] and sort them by position\n // This sorting is critical because:\n // 1. The on-chain verification expects signatures to be in ascending order by bit position\n // 2. The bitmap must match the order of signatures when verifying\n const signersAndBitPosition: [Account, number][] = signers.map((signer, index) => [signer, bitPositions[index]]);\n signersAndBitPosition.sort((a, b) => a[1] - b[1]);\n\n // Extract the sorted signers and their positions into separate arrays\n this.signers = signersAndBitPosition.map((value) => value[0]);\n this.signerIndicies = signersAndBitPosition.map((value) => value[1]);\n\n // Create a bitmap representing which public keys from the MultiKey are being used\n // This bitmap is used during signature verification to identify which public keys\n // should be used to verify each signature\n this.signaturesBitmap = this.publicKey.createBitmap({ bits: bitPositions });\n }\n\n /**\n * Static constructor to create a MultiKeyAccount using the provided public keys and signers.\n *\n * @param args - The arguments for creating a MultiKeyAccount.\n * @param args.publicKeys - The N public keys of the MultiKeyAccount.\n * @param args.signaturesRequired - The number of signatures required to authorize a transaction.\n * @param args.signers - An array of M signers that will be used to sign the transaction.\n * @returns MultiKeyAccount - The newly created MultiKeyAccount.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n static fromPublicKeysAndSigners(args: {\n address?: AccountAddressInput;\n publicKeys: PublicKey[];\n signaturesRequired: number;\n signers: SingleKeySignerOrLegacyEd25519Account[];\n }): MultiKeyAccount {\n const { address, publicKeys, signaturesRequired, signers } = args;\n const multiKey = new MultiKey({ publicKeys, signaturesRequired });\n return new MultiKeyAccount({ multiKey, signers, address });\n }\n\n /**\n * Determines if the provided account is a multi-key account.\n *\n * @param account - The account to check.\n * @returns A boolean indicating whether the account is a multi-key account.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n static isMultiKeySigner(account: Account): account is MultiKeyAccount {\n return account instanceof MultiKeyAccount;\n }\n\n /**\n * Sign a message using the account's signers and return an AccountAuthenticator containing the signature along with the\n * account's public key.\n * @param message - The signing message, represented as binary input in hexadecimal format.\n * @returns An instance of AccountAuthenticatorMultiKey that includes the signature and the public key.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n signWithAuthenticator(message: HexInput): AccountAuthenticatorMultiKey {\n return new AccountAuthenticatorMultiKey(this.publicKey, this.sign(message));\n }\n\n /**\n * Sign a transaction using the account's signers, returning an AccountAuthenticator that contains the signature and the\n * account's public key.\n * @param transaction - The raw transaction to be signed.\n * @returns An AccountAuthenticatorMultiKey containing the signature of the transaction along with the account's public key.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey {\n return new AccountAuthenticatorMultiKey(this.publicKey, this.signTransaction(transaction));\n }\n\n /**\n * Waits for any proofs on KeylessAccount signers to be fetched. This ensures that signing with the KeylessAccount does not\n * fail due to missing proofs.\n * @return {Promise<void>} A promise that resolves when all proofs have been fetched.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n async waitForProofFetch(): Promise<void> {\n const keylessSigners = this.signers.filter(\n (signer) => signer instanceof AbstractKeylessAccount,\n ) as AbstractKeylessAccount[];\n const promises = keylessSigners.map(async (signer) => signer.waitForProofFetch());\n await Promise.all(promises);\n }\n\n /**\n * Validates that the Keyless Account can be used to sign transactions.\n * @return\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n async checkKeylessAccountValidity(aptosConfig: AptosConfig): Promise<void> {\n const keylessSigners = this.signers.filter(\n (signer) => signer instanceof AbstractKeylessAccount,\n ) as AbstractKeylessAccount[];\n const promises = keylessSigners.map((signer) => signer.checkKeylessAccountValidity(aptosConfig));\n await Promise.all(promises);\n }\n\n /**\n * Sign the given message using the MultiKeyAccount's signers\n * @param data - The data to be signed in HexInput format.\n * @returns MultiKeySignature\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n sign(data: HexInput): MultiKeySignature {\n const signatures = [];\n for (const signer of this.signers) {\n signatures.push(signer.sign(data));\n }\n return new MultiKeySignature({ signatures, bitmap: this.signaturesBitmap });\n }\n\n /**\n * Sign the given transaction using the MultiKeyAccount's signers.\n * This function aggregates signatures from all signers associated with the MultiKeyAccount.\n *\n * @param transaction - The transaction to be signed.\n * @returns MultiKeySignature - An object containing the aggregated signatures and a bitmap of the signatures.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n signTransaction(transaction: AnyRawTransaction): MultiKeySignature {\n const signatures = [];\n for (const signer of this.signers) {\n signatures.push(signer.signTransaction(transaction));\n }\n return new MultiKeySignature({ signatures, bitmap: this.signaturesBitmap });\n }\n\n /**\n * Verify the given message and signature with the public keys.\n *\n * This function checks if the provided signatures are valid for the given message using the corresponding public keys.\n *\n * @param args - The arguments for verifying the signature.\n * @param args.message - The raw message data in HexInput format.\n * @param args.signature - The signed message MultiKeySignature containing multiple signatures.\n * @returns A boolean indicating whether the signatures are valid for the message.\n * @group Implementation\n * @category Account (On-Chain Model)\n */\n verifySignature(args: VerifyMultiKeySignatureArgs): boolean {\n const { message, signature } = args;\n const isSignerIndicesSorted = this.signerIndicies.every(\n (value, i) => i === 0 || value >= this.signerIndicies[i - 1],\n );\n if (!isSignerIndicesSorted) {\n return false;\n }\n for (let i = 0; i < signature.signatures.length; i += 1) {\n const singleSignature = signature.signatures[i];\n const publicKey = this.publicKey.publicKeys[this.signerIndicies[i]];\n if (!publicKey.verifySignature({ message, signature: singleSignature })) {\n return false;\n }\n }\n return true;\n }\n}\n"],"mappings":"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","names":["MultiKeyAccount","_MultiKeyAccount","args","multiKey","address","signers","signer","Ed25519Account","SingleKeyAccount","AccountAddress","bitPositions","signersAndBitPosition","index","a","b","value","publicKeys","signaturesRequired","MultiKey","account","message","AccountAuthenticatorMultiKey","transaction","promises","AbstractKeylessAccount","aptosConfig","data","signatures","MultiKeySignature","signature","i","singleSignature"]}
@@ -1,2 +1,2 @@
1
- import{e as x,f as B}from"./chunk-KK5HUWF6.mjs";import{a as k}from"./chunk-YOZBVVKL.mjs";import{c as f,f as A}from"./chunk-SJDHW55X.mjs";import{e as b}from"./chunk-TH5JCPN2.mjs";import{d as C}from"./chunk-RJ7F4JDV.mjs";import{a as d}from"./chunk-BHVSIRNF.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function W(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function O(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function q(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function z(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function U(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),e=BigInt(-1);for(;e<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(n,t){super(n),this.lastSubmittedTransaction=t}},T=class extends Error{constructor(n,t){super(n),this.transaction=t}};async function X(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function j(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,W as b,O as c,y as d,q as e,R as f,z as g,U as h,m as i,T as j,X as k,j as l};
2
- //# sourceMappingURL=chunk-GRRBXHVG.mjs.map
1
+ import{e as x,f as B}from"./chunk-KBC4ECVP.mjs";import{a as k}from"./chunk-YOZBVVKL.mjs";import{c as f,f as A}from"./chunk-JLZGYZBX.mjs";import{e as b}from"./chunk-X5ORWYVO.mjs";import{d as C}from"./chunk-RJ7F4JDV.mjs";import{a as d}from"./chunk-CU6HQJSE.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function W(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function O(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function q(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function z(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function U(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),e=BigInt(-1);for(;e<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(n,t){super(n),this.lastSubmittedTransaction=t}},T=class extends Error{constructor(n,t){super(n),this.transaction=t}};async function X(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function j(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,W as b,O as c,y as d,q as e,R as f,z as g,U as h,m as i,T as j,X as k,j as l};
2
+ //# sourceMappingURL=chunk-ZOY6N6UM.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as u}from"./chunk-TH5JCPN2.mjs";import{a as f}from"./chunk-BY3XFRUM.mjs";async function p(s,R){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:r}=s,d={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${f}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":r};return e?.AUTH_TOKEN&&(d.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(d.Authorization=`Bearer ${e?.API_KEY}`),R.provider({url:t,method:n,body:i,params:o,headers:d,overrides:e})}async function A(s,R){if(R.binaryProvider===void 0)throw new Error("Binary provider is not provided");let{url:t,method:n,body:i,contentType:a,acceptType:o,params:e,overrides:r,originMethod:d}=s,c={...r?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${f}`,"content-type":a??"application/json",accept:o??"application/x-bcs","x-aptos-typescript-sdk-origin-method":d};return r?.AUTH_TOKEN&&(c.Authorization=`Bearer ${r?.AUTH_TOKEN}`),r?.API_KEY&&(c.Authorization=`Bearer ${r?.API_KEY}`),R.binaryProvider({acceptType:"application/x-bcs",url:t,method:n,body:i,params:e,headers:c,overrides:r})}async function B(s,R,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await p({...s,url:a},R.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let r=e.data;if(r.errors)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});e.data=r.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new u({apiType:t,aptosRequest:s,aptosResponse:e})}async function b(s,R,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},R.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let r=e.data;if(r.errors)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});e.data=r.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new u({apiType:t,aptosRequest:s,aptosResponse:e})}export{p as a,A as b,B as c,b as d};
2
- //# sourceMappingURL=chunk-TWETGZ3W.mjs.map
1
+ import{e as u}from"./chunk-X5ORWYVO.mjs";import{a as f}from"./chunk-X5YB74NB.mjs";async function p(s,R){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:r}=s,d={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${f}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":r};return e?.AUTH_TOKEN&&(d.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(d.Authorization=`Bearer ${e?.API_KEY}`),R.provider({url:t,method:n,body:i,params:o,headers:d,overrides:e})}async function A(s,R){if(R.binaryProvider===void 0)throw new Error("Binary provider is not provided");let{url:t,method:n,body:i,contentType:a,acceptType:o,params:e,overrides:r,originMethod:d}=s,c={...r?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${f}`,"content-type":a??"application/json",accept:o??"application/x-bcs","x-aptos-typescript-sdk-origin-method":d};return r?.AUTH_TOKEN&&(c.Authorization=`Bearer ${r?.AUTH_TOKEN}`),r?.API_KEY&&(c.Authorization=`Bearer ${r?.API_KEY}`),R.binaryProvider({acceptType:"application/x-bcs",url:t,method:n,body:i,params:e,headers:c,overrides:r})}async function B(s,R,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await p({...s,url:a},R.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let r=e.data;if(r.errors)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});e.data=r.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new u({apiType:t,aptosRequest:s,aptosResponse:e})}async function b(s,R,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},R.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let r=e.data;if(r.errors)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});e.data=r.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new u({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new u({apiType:t,aptosRequest:s,aptosResponse:e})}export{p as a,A as b,B as c,b as d};
2
+ //# sourceMappingURL=chunk-ZVYTHOS5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"../chunk-US2HZFOM.mjs";import{a as r}from"../chunk-35DKMW7Q.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{o as LocalNode,r as Move};
1
+ import{a as o}from"../chunk-Q3AVJUBL.mjs";import{a as r}from"../chunk-35DKMW7Q.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{o as LocalNode,r as Move};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-US2HZFOM.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as LocalNode};
1
+ import{a}from"../chunk-Q3AVJUBL.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as LocalNode};
2
2
  //# sourceMappingURL=localNode.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d}from"../chunk-TWETGZ3W.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-TH5JCPN2.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BY3XFRUM.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,a as request};
1
+ import{a,b,c,d}from"../chunk-ZVYTHOS5.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-X5ORWYVO.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,a as request};
2
2
  //# sourceMappingURL=core.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"../chunk-SJDHW55X.mjs";import"../chunk-TWETGZ3W.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-TH5JCPN2.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BY3XFRUM.mjs";import"../chunk-KDMSOCZY.mjs";export{a as get,c as getAptosFullNode,e as getAptosPepperService,b as getBinary,d as getBinaryAptosFullNode,f as paginateWithCursor,g as paginateWithObfuscatedCursor};
1
+ import{a,b,c,d,e,f,g}from"../chunk-JLZGYZBX.mjs";import"../chunk-ZVYTHOS5.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-X5ORWYVO.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{a as get,c as getAptosFullNode,e as getAptosPepperService,b as getBinary,d as getBinaryAptosFullNode,f as paginateWithCursor,g as paginateWithObfuscatedCursor};
2
2
  //# sourceMappingURL=get.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-7ECCT6PK.mjs";import{a as e,b as f,c as g,d as h,e as i,f as j,g as k}from"../chunk-SJDHW55X.mjs";import{a as l,b as m,c as n,d as o,e as p,f as q,g as r,h as s}from"../chunk-752TOOCA.mjs";import{a,b,c,d}from"../chunk-TWETGZ3W.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-TH5JCPN2.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BY3XFRUM.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,e as get,g as getAptosFullNode,i as getAptosPepperService,f as getBinary,h as getBinaryAptosFullNode,j as paginateWithCursor,k as paginateWithObfuscatedCursor,l as post,q as postAptosFaucet,n as postAptosFullNode,p as postAptosIndexer,r as postAptosPepperService,s as postAptosProvingService,m as postBinary,o as postBinaryAptosFullNode,a as request};
1
+ import"../chunk-7ECCT6PK.mjs";import{a as l,b as m,c as n,d as o,e as p,f as q,g as r,h as s}from"../chunk-2P27DDVV.mjs";import{a as e,b as f,c as g,d as h,e as i,f as j,g as k}from"../chunk-JLZGYZBX.mjs";import{a,b,c,d}from"../chunk-ZVYTHOS5.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-X5ORWYVO.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,e as get,g as getAptosFullNode,i as getAptosPepperService,f as getBinary,h as getBinaryAptosFullNode,j as paginateWithCursor,k as paginateWithObfuscatedCursor,l as post,q as postAptosFaucet,n as postAptosFullNode,p as postAptosIndexer,r as postAptosPepperService,s as postAptosProvingService,m as postBinary,o as postBinaryAptosFullNode,a as request};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h}from"../chunk-752TOOCA.mjs";import"../chunk-TWETGZ3W.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-TH5JCPN2.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-BHVSIRNF.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BY3XFRUM.mjs";import"../chunk-KDMSOCZY.mjs";export{a as post,f as postAptosFaucet,c as postAptosFullNode,e as postAptosIndexer,g as postAptosPepperService,h as postAptosProvingService,b as postBinary,d as postBinaryAptosFullNode};
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-2P27DDVV.mjs";import"../chunk-ZVYTHOS5.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-X5ORWYVO.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-CU6HQJSE.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{a as post,f as postAptosFaucet,c as postAptosFullNode,e as postAptosIndexer,g as postAptosPepperService,h as postAptosProvingService,b as postBinary,d as postBinaryAptosFullNode};
2
2
  //# sourceMappingURL=post.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-XW3BXTCZ.mjs";import"../../chunk-HVIF6DW6.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-2V636AYW.mjs";import"../../chunk-PWGTRRSJ.mjs";import"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-7CRQNXR5.mjs";import"../../chunk-H4YAL2IL.mjs";import"../../chunk-A3VO773Q.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-SJDHW55X.mjs";import"../../chunk-752TOOCA.mjs";import"../../chunk-TWETGZ3W.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-TH5JCPN2.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-BHVSIRNF.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BY3XFRUM.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as FederatedKeylessPublicKey};
1
+ import{a}from"../../chunk-553ZRNUL.mjs";import"../../chunk-SZU5Q6CF.mjs";import"../../chunk-2V636AYW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-PWGTRRSJ.mjs";import"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-7CRQNXR5.mjs";import"../../chunk-H4YAL2IL.mjs";import"../../chunk-A3VO773Q.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-2P27DDVV.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-JLZGYZBX.mjs";import"../../chunk-ZVYTHOS5.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-X5ORWYVO.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-CU6HQJSE.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-X5YB74NB.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as FederatedKeylessPublicKey};
2
2
  //# sourceMappingURL=federatedKeyless.mjs.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-HEZ2ZYZA.mjs";import{a as ba,b as ca}from"../../chunk-WFKPVKU3.mjs";import{a as _,b as $,c as aa}from"../../chunk-QUJM5W4L.mjs";import{a as Y,b as Z}from"../../chunk-2TRQERBL.mjs";import{a as s,b as t,c as u}from"../../chunk-JNNFNYDO.mjs";import{a as X}from"../../chunk-XW3BXTCZ.mjs";import{a as C,b as D,c as E,d as F,e as G,f as H,g as I,h as J,i as K,j as L,k as M,l as N,m as O,n as P,o as Q,p as R,q as S,r as T,s as U,t as V,u as W}from"../../chunk-HVIF6DW6.mjs";import{a as x,b as y,c as z,d as A,e as B}from"../../chunk-GOXRBEIJ.mjs";import"../../chunk-2V636AYW.mjs";import{a as v,b as w}from"../../chunk-PWGTRRSJ.mjs";import{a as o,b as p,c as q,d as r}from"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-C3Q23D22.mjs";import{a as k}from"../../chunk-7CRQNXR5.mjs";import{a as l,b as m}from"../../chunk-H4YAL2IL.mjs";import{a as n}from"../../chunk-A3VO773Q.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-SJDHW55X.mjs";import"../../chunk-752TOOCA.mjs";import"../../chunk-TWETGZ3W.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-TH5JCPN2.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-BHVSIRNF.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BY3XFRUM.mjs";import"../../chunk-KDMSOCZY.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,_ as AbstractMultiKey,m as AccountPublicKey,Y as AnyPublicKey,Z as AnySignature,h as CKDPriv,C as EPK_HORIZON_SECS,q as Ed25519PrivateKey,p as Ed25519PublicKey,r as Ed25519Signature,M as EphemeralCertificate,v as EphemeralPublicKey,w as EphemeralSignature,X as FederatedKeylessPublicKey,R as Groth16VerificationKey,N as Groth16Zkp,d as HARDENED_OFFSET,c as KeyType,Q as KeylessConfiguration,K as KeylessPublicKey,L as KeylessSignature,D as MAX_AUD_VAL_BYTES,J as MAX_COMMITED_EPK_BYTES,H as MAX_EXTRA_FIELD_BYTES,G as MAX_ISS_VAL_BYTES,I as MAX_JWT_HEADER_B64_BYTES,E as MAX_UID_KEY_BYTES,F as MAX_UID_VAL_BYTES,V as MoveJWK,ba as MultiEd25519PublicKey,ca as MultiEd25519Signature,$ as MultiKey,aa as MultiKeySignature,k as PrivateKey,l as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,n as Signature,P as ZeroKnowledgeSig,O as ZkProof,A as bigIntToBytesLE,z as bytesToBigIntLE,g as deriveKey,T as getIssAudAndUidVal,S as getKeylessConfig,U as getKeylessJWKs,x as hashStrToField,o as isCanonicalEd25519Signature,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,y as padAndPackBytesWithLen,W as parseJwtHeader,B as poseidonHash,i as splitPath};
1
+ import"../../chunk-HEZ2ZYZA.mjs";import{a as ba,b as ca}from"../../chunk-UOBDL2BZ.mjs";import{a as _,b as $,c as aa}from"../../chunk-X6H4G6NE.mjs";import{a as Y,b as Z}from"../../chunk-6KI24ZRR.mjs";import{a as s,b as t,c as u}from"../../chunk-JNNFNYDO.mjs";import{a as X}from"../../chunk-553ZRNUL.mjs";import{a as C,b as D,c as E,d as F,e as G,f as H,g as I,h as J,i as K,j as L,k as M,l as N,m as O,n as P,o as Q,p as R,q as S,r as T,s as U,t as V,u as W}from"../../chunk-SZU5Q6CF.mjs";import"../../chunk-2V636AYW.mjs";import{a as x,b as y,c as z,d as A,e as B}from"../../chunk-GOXRBEIJ.mjs";import{a as v,b as w}from"../../chunk-PWGTRRSJ.mjs";import{a as o,b as p,c as q,d as r}from"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-C3Q23D22.mjs";import{a as k}from"../../chunk-7CRQNXR5.mjs";import{a as l,b as m}from"../../chunk-H4YAL2IL.mjs";import{a as n}from"../../chunk-A3VO773Q.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-2P27DDVV.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-JLZGYZBX.mjs";import"../../chunk-ZVYTHOS5.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-X5ORWYVO.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-CU6HQJSE.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-X5YB74NB.mjs";import"../../chunk-KDMSOCZY.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,_ as AbstractMultiKey,m as AccountPublicKey,Y as AnyPublicKey,Z as AnySignature,h as CKDPriv,C as EPK_HORIZON_SECS,q as Ed25519PrivateKey,p as Ed25519PublicKey,r as Ed25519Signature,M as EphemeralCertificate,v as EphemeralPublicKey,w as EphemeralSignature,X as FederatedKeylessPublicKey,R as Groth16VerificationKey,N as Groth16Zkp,d as HARDENED_OFFSET,c as KeyType,Q as KeylessConfiguration,K as KeylessPublicKey,L as KeylessSignature,D as MAX_AUD_VAL_BYTES,J as MAX_COMMITED_EPK_BYTES,H as MAX_EXTRA_FIELD_BYTES,G as MAX_ISS_VAL_BYTES,I as MAX_JWT_HEADER_B64_BYTES,E as MAX_UID_KEY_BYTES,F as MAX_UID_VAL_BYTES,V as MoveJWK,ba as MultiEd25519PublicKey,ca as MultiEd25519Signature,$ as MultiKey,aa as MultiKeySignature,k as PrivateKey,l as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,n as Signature,P as ZeroKnowledgeSig,O as ZkProof,A as bigIntToBytesLE,z as bytesToBigIntLE,g as deriveKey,T as getIssAudAndUidVal,S as getKeylessConfig,U as getKeylessJWKs,x as hashStrToField,o as isCanonicalEd25519Signature,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,y as padAndPackBytesWithLen,W as parseJwtHeader,B as poseidonHash,i as splitPath};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../../chunk-HVIF6DW6.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-2V636AYW.mjs";import"../../chunk-PWGTRRSJ.mjs";import"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-7CRQNXR5.mjs";import"../../chunk-H4YAL2IL.mjs";import"../../chunk-A3VO773Q.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-SJDHW55X.mjs";import"../../chunk-752TOOCA.mjs";import"../../chunk-TWETGZ3W.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-TH5JCPN2.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-BHVSIRNF.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-BY3XFRUM.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as EPK_HORIZON_SECS,k as EphemeralCertificate,p as Groth16VerificationKey,l as Groth16Zkp,o as KeylessConfiguration,i as KeylessPublicKey,j as KeylessSignature,b as MAX_AUD_VAL_BYTES,h as MAX_COMMITED_EPK_BYTES,f as MAX_EXTRA_FIELD_BYTES,e as MAX_ISS_VAL_BYTES,g as MAX_JWT_HEADER_B64_BYTES,c as MAX_UID_KEY_BYTES,d as MAX_UID_VAL_BYTES,t as MoveJWK,n as ZeroKnowledgeSig,m as ZkProof,r as getIssAudAndUidVal,q as getKeylessConfig,s as getKeylessJWKs,u as parseJwtHeader};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../../chunk-SZU5Q6CF.mjs";import"../../chunk-2V636AYW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-PWGTRRSJ.mjs";import"../../chunk-7OUPEQRN.mjs";import"../../chunk-DOVH6HPL.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-7CRQNXR5.mjs";import"../../chunk-H4YAL2IL.mjs";import"../../chunk-A3VO773Q.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-2P27DDVV.mjs";import"../../chunk-TTY5GFMN.mjs";import"../../chunk-JLZGYZBX.mjs";import"../../chunk-ZVYTHOS5.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BMPHQ3E7.mjs";import"../../chunk-4RXKALLC.mjs";import"../../chunk-X5ORWYVO.mjs";import"../../chunk-RJ7F4JDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-ERLDXTIY.mjs";import"../../chunk-RIINVEZA.mjs";import"../../chunk-HHWJHOFZ.mjs";import"../../chunk-TKXEVD7A.mjs";import"../../chunk-ZD2TY5N3.mjs";import"../../chunk-CU6HQJSE.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-X5YB74NB.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as EPK_HORIZON_SECS,k as EphemeralCertificate,p as Groth16VerificationKey,l as Groth16Zkp,o as KeylessConfiguration,i as KeylessPublicKey,j as KeylessSignature,b as MAX_AUD_VAL_BYTES,h as MAX_COMMITED_EPK_BYTES,f as MAX_EXTRA_FIELD_BYTES,e as MAX_ISS_VAL_BYTES,g as MAX_JWT_HEADER_B64_BYTES,c as MAX_UID_KEY_BYTES,d as MAX_UID_VAL_BYTES,t as MoveJWK,n as ZeroKnowledgeSig,m as ZkProof,r as getIssAudAndUidVal,q as getKeylessConfig,s as getKeylessJWKs,u as parseJwtHeader};
2
2
  //# sourceMappingURL=keyless.mjs.map