@aptos-labs/ts-sdk 1.27.1 → 1.28.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 (288) hide show
  1. package/dist/common/{accountAddress-LOYE4_sG.d.ts → accountAddress-OVl7-qVN.d.ts} +2 -1
  2. package/dist/common/chunk-HBPH2AD3.js +2 -0
  3. package/dist/common/chunk-HBPH2AD3.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 +51 -5
  8. package/dist/common/index.js +27 -27
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/account/Account.mjs +1 -1
  11. package/dist/esm/account/Ed25519Account.mjs +1 -1
  12. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  13. package/dist/esm/account/KeylessAccount.mjs +1 -1
  14. package/dist/esm/account/MultiKeyAccount.d.mts +2 -1
  15. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  16. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  17. package/dist/esm/account/index.mjs +1 -1
  18. package/dist/esm/api/account.d.mts +2 -1
  19. package/dist/esm/api/account.mjs +1 -1
  20. package/dist/esm/api/ans.mjs +1 -1
  21. package/dist/esm/api/aptos.mjs +1 -1
  22. package/dist/esm/api/aptosConfig.mjs +1 -1
  23. package/dist/esm/api/coin.mjs +1 -1
  24. package/dist/esm/api/digitalAsset.mjs +1 -1
  25. package/dist/esm/api/event.mjs +1 -1
  26. package/dist/esm/api/faucet.mjs +1 -1
  27. package/dist/esm/api/fungibleAsset.mjs +1 -1
  28. package/dist/esm/api/general.mjs +1 -1
  29. package/dist/esm/api/index.mjs +1 -1
  30. package/dist/esm/api/keyless.mjs +1 -1
  31. package/dist/esm/api/object.mjs +1 -1
  32. package/dist/esm/api/staking.mjs +1 -1
  33. package/dist/esm/api/table.mjs +1 -1
  34. package/dist/esm/api/transaction.mjs +1 -1
  35. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  39. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  40. package/dist/esm/api/utils.mjs +1 -1
  41. package/dist/esm/bcs/index.d.mts +1 -1
  42. package/dist/esm/bcs/index.mjs +1 -1
  43. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  44. package/dist/esm/bcs/serializable/moveStructs.d.mts +10 -1
  45. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  46. package/dist/esm/{chunk-NCWD4NA3.mjs → chunk-2CAGPXCX.mjs} +2 -2
  47. package/dist/esm/{chunk-Q67DUNMI.mjs → chunk-2XYA7NOU.mjs} +2 -2
  48. package/dist/esm/{chunk-2N2VEGT6.mjs → chunk-3F3FCWT5.mjs} +2 -2
  49. package/dist/esm/{chunk-3SPU4V2B.mjs → chunk-3GOJQ5JD.mjs} +2 -2
  50. package/dist/esm/{chunk-G7UNU5GI.mjs → chunk-3HTSCV3R.mjs} +2 -2
  51. package/dist/esm/{chunk-H33YIMTU.mjs → chunk-4ENUSVZB.mjs} +2 -2
  52. package/dist/esm/chunk-52HZTDBB.mjs +2 -0
  53. package/dist/esm/chunk-52HZTDBB.mjs.map +1 -0
  54. package/dist/esm/{chunk-76HTG7Z7.mjs → chunk-53DBMWMU.mjs} +2 -2
  55. package/dist/esm/{chunk-I5XQKNOK.mjs → chunk-54QUDAAC.mjs} +2 -2
  56. package/dist/esm/{chunk-7AIKM3UF.mjs → chunk-56F7EYFE.mjs} +2 -2
  57. package/dist/esm/{chunk-JKNTGRSQ.mjs → chunk-5L3UXSQI.mjs} +2 -2
  58. package/dist/esm/{chunk-PY4TS34X.mjs → chunk-5P7MXLZA.mjs} +2 -2
  59. package/dist/esm/{chunk-6BYVG7H4.mjs → chunk-5TBIWC7N.mjs} +2 -2
  60. package/dist/esm/{chunk-ZQFFRZJ4.mjs → chunk-6CHBLB3V.mjs} +2 -2
  61. package/dist/esm/{chunk-NRRADUK4.mjs → chunk-AVSM2BJR.mjs} +2 -2
  62. package/dist/esm/{chunk-52KPINA4.mjs → chunk-B5NYEWNM.mjs} +2 -2
  63. package/dist/esm/{chunk-74YFNJ7A.mjs → chunk-BIGX2RJL.mjs} +2 -2
  64. package/dist/esm/chunk-DCNBMUKN.mjs +2 -0
  65. package/dist/esm/chunk-DCNBMUKN.mjs.map +1 -0
  66. package/dist/esm/{chunk-AYX5JMB4.mjs → chunk-DVIRUFCY.mjs} +2 -2
  67. package/dist/esm/{chunk-UV7M72QD.mjs → chunk-EJMPY5MF.mjs} +2 -2
  68. package/dist/esm/{chunk-F7NVDHR2.mjs → chunk-EQSON7Y5.mjs} +2 -2
  69. package/dist/esm/{chunk-GNFEBKFV.mjs → chunk-EXMQBH3I.mjs} +2 -2
  70. package/dist/esm/chunk-EXP5STXZ.mjs +2 -0
  71. package/dist/esm/chunk-EXP5STXZ.mjs.map +1 -0
  72. package/dist/esm/{chunk-UO52TECC.mjs → chunk-F5PNGH44.mjs} +2 -2
  73. package/dist/esm/chunk-G773HST5.mjs +2 -0
  74. package/dist/esm/chunk-G773HST5.mjs.map +1 -0
  75. package/dist/esm/{chunk-FOHGSNYZ.mjs → chunk-GGPA6QTN.mjs} +2 -2
  76. package/dist/esm/{chunk-QV6EZL2G.mjs → chunk-GKERWKMB.mjs} +2 -2
  77. package/dist/esm/{chunk-Y3HLYCF3.mjs → chunk-GR4PHW7K.mjs} +2 -2
  78. package/dist/esm/{chunk-MLL54PYO.mjs → chunk-HAT5S2XX.mjs} +2 -2
  79. package/dist/esm/{chunk-MLL54PYO.mjs.map → chunk-HAT5S2XX.mjs.map} +1 -1
  80. package/dist/esm/{chunk-ZXPBRVOA.mjs → chunk-HBQLX5QF.mjs} +2 -2
  81. package/dist/esm/{chunk-RA3YPQG2.mjs → chunk-IVOEXGOG.mjs} +2 -2
  82. package/dist/esm/{chunk-5L3PLK3W.mjs → chunk-JOROI7FE.mjs} +2 -2
  83. package/dist/esm/chunk-JUNVPIW4.mjs +2 -0
  84. package/dist/esm/chunk-JUNVPIW4.mjs.map +1 -0
  85. package/dist/esm/{chunk-T2NJUIOQ.mjs → chunk-KRIIRH5L.mjs} +2 -2
  86. package/dist/esm/{chunk-7Y3MRBG6.mjs → chunk-LFUBUXHD.mjs} +2 -2
  87. package/dist/esm/{chunk-YXITAP46.mjs → chunk-LJZPPBTH.mjs} +2 -2
  88. package/dist/esm/{chunk-5IUXBOS5.mjs → chunk-LS6G4DZV.mjs} +2 -2
  89. package/dist/esm/{chunk-GXTEJ7NO.mjs → chunk-MNVDBUF3.mjs} +2 -2
  90. package/dist/esm/{chunk-ORXEFE6X.mjs → chunk-NBO2BDDZ.mjs} +2 -2
  91. package/dist/esm/{chunk-2CC67KW5.mjs → chunk-NDJKEFNU.mjs} +2 -2
  92. package/dist/esm/{chunk-A4T373F3.mjs → chunk-NKDHR2DA.mjs} +2 -2
  93. package/dist/esm/{chunk-FNT3VLRD.mjs → chunk-NPFW6ZFY.mjs} +2 -2
  94. package/dist/esm/{chunk-KEN2VRIM.mjs → chunk-OPTI3MH2.mjs} +2 -2
  95. package/dist/esm/{chunk-QE5OL6KN.mjs → chunk-ORGMRM5K.mjs} +2 -2
  96. package/dist/esm/{chunk-SONTIUAM.mjs → chunk-OTNGLTKS.mjs} +2 -2
  97. package/dist/esm/{chunk-CTJX4CUF.mjs → chunk-P2EKDA7R.mjs} +2 -2
  98. package/dist/esm/{chunk-GHKMF253.mjs → chunk-PDNA4H34.mjs} +2 -2
  99. package/dist/esm/{chunk-ECKJI2TV.mjs → chunk-QQHA2Y46.mjs} +2 -2
  100. package/dist/esm/chunk-QQU4IQ27.mjs +2 -0
  101. package/dist/esm/chunk-QQU4IQ27.mjs.map +1 -0
  102. package/dist/esm/{chunk-WHW4Z7TK.mjs → chunk-SCYGW3VV.mjs} +2 -2
  103. package/dist/esm/{chunk-3NRBTP3S.mjs → chunk-SUAA25UP.mjs} +2 -2
  104. package/dist/esm/{chunk-YY2XW5R4.mjs → chunk-T53MZO2U.mjs} +2 -2
  105. package/dist/esm/chunk-UAL27G6B.mjs +2 -0
  106. package/dist/esm/chunk-UAL27G6B.mjs.map +1 -0
  107. package/dist/esm/{chunk-MEKXPGK7.mjs → chunk-VQVNUN5Y.mjs} +2 -2
  108. package/dist/esm/{chunk-WFOYGJS5.mjs → chunk-VTEZ6TBO.mjs} +2 -2
  109. package/dist/esm/{chunk-OEOUZFHD.mjs → chunk-VYXJ7FUF.mjs} +2 -2
  110. package/dist/esm/{chunk-4ZMI5G5L.mjs → chunk-VYXS7TLB.mjs} +2 -2
  111. package/dist/esm/{chunk-HKMG3LZX.mjs → chunk-WLZYSLHP.mjs} +2 -2
  112. package/dist/esm/{chunk-6ERHGCK2.mjs → chunk-WX6P3Q4I.mjs} +2 -2
  113. package/dist/esm/{chunk-USOIC4HO.mjs → chunk-WYQLUB4H.mjs} +2 -2
  114. package/dist/esm/{chunk-HHU7UCFI.mjs → chunk-XSTCHOUI.mjs} +2 -2
  115. package/dist/esm/chunk-XSTCHOUI.mjs.map +1 -0
  116. package/dist/esm/{chunk-ZZRSKHWS.mjs → chunk-YFMFXRJX.mjs} +2 -2
  117. package/dist/esm/{chunk-PO33LVUF.mjs → chunk-YPQZJ72F.mjs} +2 -2
  118. package/dist/esm/chunk-Z2AJWV6D.mjs +2 -0
  119. package/dist/esm/chunk-Z2AJWV6D.mjs.map +1 -0
  120. package/dist/esm/{chunk-HRIYZBXY.mjs → chunk-ZNC3FRSK.mjs} +2 -2
  121. package/dist/esm/{chunk-NU55IEL4.mjs → chunk-ZWX3NHGU.mjs} +2 -2
  122. package/dist/esm/chunk-ZXVQ2OBJ.mjs +2 -0
  123. package/dist/esm/{chunk-ZEYOFDIO.mjs.map → chunk-ZXVQ2OBJ.mjs.map} +1 -1
  124. package/dist/esm/cli/index.mjs +1 -1
  125. package/dist/esm/cli/localNode.mjs +1 -1
  126. package/dist/esm/cli/move.mjs +1 -1
  127. package/dist/esm/client/core.mjs +1 -1
  128. package/dist/esm/client/get.mjs +1 -1
  129. package/dist/esm/client/index.mjs +1 -1
  130. package/dist/esm/client/post.mjs +1 -1
  131. package/dist/esm/client/types.mjs +1 -1
  132. package/dist/esm/core/account/index.mjs +1 -1
  133. package/dist/esm/core/account/utils/address.mjs +1 -1
  134. package/dist/esm/core/account/utils/index.mjs +1 -1
  135. package/dist/esm/core/accountAddress.mjs +1 -1
  136. package/dist/esm/core/authenticationKey.mjs +1 -1
  137. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  138. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  139. package/dist/esm/core/crypto/index.mjs +1 -1
  140. package/dist/esm/core/crypto/keyless.mjs +1 -1
  141. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  142. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  143. package/dist/esm/core/crypto/proof.mjs +1 -1
  144. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  145. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  146. package/dist/esm/core/crypto/signature.mjs +1 -1
  147. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  148. package/dist/esm/core/index.mjs +1 -1
  149. package/dist/esm/index.d.mts +3 -3
  150. package/dist/esm/index.mjs +1 -1
  151. package/dist/esm/internal/account.mjs +1 -1
  152. package/dist/esm/internal/ans.mjs +1 -1
  153. package/dist/esm/internal/coin.mjs +1 -1
  154. package/dist/esm/internal/digitalAsset.mjs +1 -1
  155. package/dist/esm/internal/event.mjs +1 -1
  156. package/dist/esm/internal/faucet.mjs +1 -1
  157. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  158. package/dist/esm/internal/general.mjs +1 -1
  159. package/dist/esm/internal/keyless.mjs +1 -1
  160. package/dist/esm/internal/object.mjs +1 -1
  161. package/dist/esm/internal/staking.mjs +1 -1
  162. package/dist/esm/internal/table.mjs +1 -1
  163. package/dist/esm/internal/transaction.mjs +1 -1
  164. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  165. package/dist/esm/internal/view.mjs +1 -1
  166. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  167. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  168. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  169. package/dist/esm/transactions/index.mjs +1 -1
  170. package/dist/esm/transactions/instances/index.mjs +1 -1
  171. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  172. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  173. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  174. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  175. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  176. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  177. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  178. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  179. package/dist/esm/transactions/management/index.mjs +1 -1
  180. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  181. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  182. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  183. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  184. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  185. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  186. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  187. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  188. package/dist/esm/transactions/types.d.mts +2 -2
  189. package/dist/esm/types/index.d.mts +2 -1
  190. package/dist/esm/types/index.mjs +1 -1
  191. package/dist/esm/utils/const.d.mts +2 -1
  192. package/dist/esm/utils/const.mjs +1 -1
  193. package/dist/esm/utils/helpers.d.mts +41 -1
  194. package/dist/esm/utils/helpers.mjs +1 -1
  195. package/dist/esm/utils/index.d.mts +2 -2
  196. package/dist/esm/utils/index.mjs +1 -1
  197. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  198. package/dist/esm/version.d.mts +1 -1
  199. package/dist/esm/version.mjs +1 -1
  200. package/package.json +1 -1
  201. package/src/account/MultiKeyAccount.ts +4 -4
  202. package/src/api/account.ts +31 -4
  203. package/src/bcs/serializable/moveStructs.ts +41 -8
  204. package/src/cli/move.ts +1 -1
  205. package/src/internal/account.ts +6 -5
  206. package/src/internal/event.ts +10 -3
  207. package/src/transactions/instances/transactionPayload.ts +3 -1
  208. package/src/transactions/types.ts +4 -2
  209. package/src/types/index.ts +1 -0
  210. package/src/utils/const.ts +1 -0
  211. package/src/utils/helpers.ts +70 -0
  212. package/src/version.ts +1 -1
  213. package/dist/common/chunk-J4IUXT5W.js +0 -2
  214. package/dist/common/chunk-J4IUXT5W.js.map +0 -1
  215. package/dist/esm/chunk-4SDUQ7AS.mjs +0 -2
  216. package/dist/esm/chunk-4SDUQ7AS.mjs.map +0 -1
  217. package/dist/esm/chunk-EZIF26UH.mjs +0 -2
  218. package/dist/esm/chunk-EZIF26UH.mjs.map +0 -1
  219. package/dist/esm/chunk-HHU7UCFI.mjs.map +0 -1
  220. package/dist/esm/chunk-KMJ6TF6Y.mjs +0 -2
  221. package/dist/esm/chunk-KMJ6TF6Y.mjs.map +0 -1
  222. package/dist/esm/chunk-L36ZHC7J.mjs +0 -2
  223. package/dist/esm/chunk-L36ZHC7J.mjs.map +0 -1
  224. package/dist/esm/chunk-LDTF3ABK.mjs +0 -2
  225. package/dist/esm/chunk-LDTF3ABK.mjs.map +0 -1
  226. package/dist/esm/chunk-THRXIXIO.mjs +0 -2
  227. package/dist/esm/chunk-THRXIXIO.mjs.map +0 -1
  228. package/dist/esm/chunk-WABFFJGI.mjs +0 -2
  229. package/dist/esm/chunk-WABFFJGI.mjs.map +0 -1
  230. package/dist/esm/chunk-ZEYOFDIO.mjs +0 -2
  231. package/dist/esm/chunk-ZOMXBB6Z.mjs +0 -2
  232. package/dist/esm/chunk-ZOMXBB6Z.mjs.map +0 -1
  233. /package/dist/esm/{chunk-NCWD4NA3.mjs.map → chunk-2CAGPXCX.mjs.map} +0 -0
  234. /package/dist/esm/{chunk-Q67DUNMI.mjs.map → chunk-2XYA7NOU.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-2N2VEGT6.mjs.map → chunk-3F3FCWT5.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-3SPU4V2B.mjs.map → chunk-3GOJQ5JD.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-G7UNU5GI.mjs.map → chunk-3HTSCV3R.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-H33YIMTU.mjs.map → chunk-4ENUSVZB.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-76HTG7Z7.mjs.map → chunk-53DBMWMU.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-I5XQKNOK.mjs.map → chunk-54QUDAAC.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-7AIKM3UF.mjs.map → chunk-56F7EYFE.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-JKNTGRSQ.mjs.map → chunk-5L3UXSQI.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-PY4TS34X.mjs.map → chunk-5P7MXLZA.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-6BYVG7H4.mjs.map → chunk-5TBIWC7N.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-ZQFFRZJ4.mjs.map → chunk-6CHBLB3V.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-NRRADUK4.mjs.map → chunk-AVSM2BJR.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-52KPINA4.mjs.map → chunk-B5NYEWNM.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-74YFNJ7A.mjs.map → chunk-BIGX2RJL.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-AYX5JMB4.mjs.map → chunk-DVIRUFCY.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-UV7M72QD.mjs.map → chunk-EJMPY5MF.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-F7NVDHR2.mjs.map → chunk-EQSON7Y5.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-GNFEBKFV.mjs.map → chunk-EXMQBH3I.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-UO52TECC.mjs.map → chunk-F5PNGH44.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-FOHGSNYZ.mjs.map → chunk-GGPA6QTN.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-QV6EZL2G.mjs.map → chunk-GKERWKMB.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-Y3HLYCF3.mjs.map → chunk-GR4PHW7K.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-ZXPBRVOA.mjs.map → chunk-HBQLX5QF.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-RA3YPQG2.mjs.map → chunk-IVOEXGOG.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-5L3PLK3W.mjs.map → chunk-JOROI7FE.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-T2NJUIOQ.mjs.map → chunk-KRIIRH5L.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-7Y3MRBG6.mjs.map → chunk-LFUBUXHD.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-YXITAP46.mjs.map → chunk-LJZPPBTH.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-5IUXBOS5.mjs.map → chunk-LS6G4DZV.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-GXTEJ7NO.mjs.map → chunk-MNVDBUF3.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-ORXEFE6X.mjs.map → chunk-NBO2BDDZ.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-2CC67KW5.mjs.map → chunk-NDJKEFNU.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-A4T373F3.mjs.map → chunk-NKDHR2DA.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-FNT3VLRD.mjs.map → chunk-NPFW6ZFY.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-KEN2VRIM.mjs.map → chunk-OPTI3MH2.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-QE5OL6KN.mjs.map → chunk-ORGMRM5K.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-SONTIUAM.mjs.map → chunk-OTNGLTKS.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-CTJX4CUF.mjs.map → chunk-P2EKDA7R.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-GHKMF253.mjs.map → chunk-PDNA4H34.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-ECKJI2TV.mjs.map → chunk-QQHA2Y46.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-WHW4Z7TK.mjs.map → chunk-SCYGW3VV.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-3NRBTP3S.mjs.map → chunk-SUAA25UP.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-YY2XW5R4.mjs.map → chunk-T53MZO2U.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-MEKXPGK7.mjs.map → chunk-VQVNUN5Y.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-WFOYGJS5.mjs.map → chunk-VTEZ6TBO.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-OEOUZFHD.mjs.map → chunk-VYXJ7FUF.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-4ZMI5G5L.mjs.map → chunk-VYXS7TLB.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-HKMG3LZX.mjs.map → chunk-WLZYSLHP.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-6ERHGCK2.mjs.map → chunk-WX6P3Q4I.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-USOIC4HO.mjs.map → chunk-WYQLUB4H.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-ZZRSKHWS.mjs.map → chunk-YFMFXRJX.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-PO33LVUF.mjs.map → chunk-YPQZJ72F.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-HRIYZBXY.mjs.map → chunk-ZNC3FRSK.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-NU55IEL4.mjs.map → chunk-ZWX3NHGU.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{e as o}from"../../chunk-F7NVDHR2.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-YY2XW5R4.mjs";import"../../chunk-AYX5JMB4.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-G7UNU5GI.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-HHU7UCFI.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-EZIF26UH.mjs";import"../../chunk-RA3YPQG2.mjs";import"../../chunk-ECKJI2TV.mjs";import"../../chunk-3SPU4V2B.mjs";import"../../chunk-ZZRSKHWS.mjs";import"../../chunk-JKNTGRSQ.mjs";import"../../chunk-3NRBTP3S.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-HKMG3LZX.mjs";import"../../chunk-QV6EZL2G.mjs";import"../../chunk-ZXPBRVOA.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-Y3HLYCF3.mjs";import"../../chunk-76HTG7Z7.mjs";import"../../chunk-GXTEJ7NO.mjs";import"../../chunk-LDTF3ABK.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-Q67DUNMI.mjs";import"../../chunk-MEKXPGK7.mjs";import"../../chunk-UO52TECC.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-6ERHGCK2.mjs";import"../../chunk-NU55IEL4.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-4ZMI5G5L.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-SONTIUAM.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-I5XQKNOK.mjs";import"../../chunk-5IUXBOS5.mjs";import"../../chunk-GNFEBKFV.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-ZOMXBB6Z.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-THRXIXIO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-ZEYOFDIO.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
1
+ import{e as o}from"../../chunk-EQSON7Y5.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-T53MZO2U.mjs";import"../../chunk-DVIRUFCY.mjs";import"../../chunk-3HTSCV3R.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-XSTCHOUI.mjs";import"../../chunk-VQVNUN5Y.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F5PNGH44.mjs";import"../../chunk-OTNGLTKS.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-3GOJQ5JD.mjs";import"../../chunk-5L3UXSQI.mjs";import"../../chunk-52HZTDBB.mjs";import"../../chunk-IVOEXGOG.mjs";import"../../chunk-QQHA2Y46.mjs";import"../../chunk-YFMFXRJX.mjs";import"../../chunk-SUAA25UP.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-WLZYSLHP.mjs";import"../../chunk-GKERWKMB.mjs";import"../../chunk-HBQLX5QF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GR4PHW7K.mjs";import"../../chunk-53DBMWMU.mjs";import"../../chunk-MNVDBUF3.mjs";import"../../chunk-Z2AJWV6D.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-2XYA7NOU.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-WX6P3Q4I.mjs";import"../../chunk-ZWX3NHGU.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-VYXS7TLB.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-54QUDAAC.mjs";import"../../chunk-LS6G4DZV.mjs";import"../../chunk-EXMQBH3I.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-QQU4IQ27.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-G773HST5.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
2
2
  //# sourceMappingURL=sign.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-2N2VEGT6.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-F7NVDHR2.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-YY2XW5R4.mjs";import"../../chunk-AYX5JMB4.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-G7UNU5GI.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-HHU7UCFI.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-EZIF26UH.mjs";import"../../chunk-RA3YPQG2.mjs";import"../../chunk-ECKJI2TV.mjs";import"../../chunk-3SPU4V2B.mjs";import"../../chunk-ZZRSKHWS.mjs";import"../../chunk-JKNTGRSQ.mjs";import"../../chunk-3NRBTP3S.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-HKMG3LZX.mjs";import"../../chunk-QV6EZL2G.mjs";import"../../chunk-ZXPBRVOA.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-Y3HLYCF3.mjs";import"../../chunk-76HTG7Z7.mjs";import"../../chunk-GXTEJ7NO.mjs";import"../../chunk-LDTF3ABK.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-Q67DUNMI.mjs";import"../../chunk-MEKXPGK7.mjs";import"../../chunk-UO52TECC.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-6ERHGCK2.mjs";import"../../chunk-NU55IEL4.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-4ZMI5G5L.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-SONTIUAM.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-I5XQKNOK.mjs";import"../../chunk-5IUXBOS5.mjs";import"../../chunk-GNFEBKFV.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-ZOMXBB6Z.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-THRXIXIO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-ZEYOFDIO.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-3F3FCWT5.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-EQSON7Y5.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-T53MZO2U.mjs";import"../../chunk-DVIRUFCY.mjs";import"../../chunk-3HTSCV3R.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-XSTCHOUI.mjs";import"../../chunk-VQVNUN5Y.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F5PNGH44.mjs";import"../../chunk-OTNGLTKS.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-3GOJQ5JD.mjs";import"../../chunk-5L3UXSQI.mjs";import"../../chunk-52HZTDBB.mjs";import"../../chunk-IVOEXGOG.mjs";import"../../chunk-QQHA2Y46.mjs";import"../../chunk-YFMFXRJX.mjs";import"../../chunk-SUAA25UP.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-WLZYSLHP.mjs";import"../../chunk-GKERWKMB.mjs";import"../../chunk-HBQLX5QF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GR4PHW7K.mjs";import"../../chunk-53DBMWMU.mjs";import"../../chunk-MNVDBUF3.mjs";import"../../chunk-Z2AJWV6D.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-2XYA7NOU.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-WX6P3Q4I.mjs";import"../../chunk-ZWX3NHGU.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-VYXS7TLB.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-54QUDAAC.mjs";import"../../chunk-LS6G4DZV.mjs";import"../../chunk-EXMQBH3I.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-QQU4IQ27.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-G773HST5.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-ZQFFRZJ4.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-F7NVDHR2.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-YY2XW5R4.mjs";import"../../chunk-AYX5JMB4.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-G7UNU5GI.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-HHU7UCFI.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-EZIF26UH.mjs";import"../../chunk-RA3YPQG2.mjs";import"../../chunk-ECKJI2TV.mjs";import"../../chunk-3SPU4V2B.mjs";import"../../chunk-ZZRSKHWS.mjs";import"../../chunk-JKNTGRSQ.mjs";import"../../chunk-3NRBTP3S.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-HKMG3LZX.mjs";import"../../chunk-QV6EZL2G.mjs";import"../../chunk-ZXPBRVOA.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-Y3HLYCF3.mjs";import"../../chunk-76HTG7Z7.mjs";import"../../chunk-GXTEJ7NO.mjs";import"../../chunk-LDTF3ABK.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-Q67DUNMI.mjs";import"../../chunk-MEKXPGK7.mjs";import"../../chunk-UO52TECC.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-6ERHGCK2.mjs";import"../../chunk-NU55IEL4.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-4ZMI5G5L.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-SONTIUAM.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-I5XQKNOK.mjs";import"../../chunk-5IUXBOS5.mjs";import"../../chunk-GNFEBKFV.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-ZOMXBB6Z.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-THRXIXIO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-ZEYOFDIO.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-6CHBLB3V.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-EQSON7Y5.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-T53MZO2U.mjs";import"../../chunk-DVIRUFCY.mjs";import"../../chunk-3HTSCV3R.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-XSTCHOUI.mjs";import"../../chunk-VQVNUN5Y.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-F5PNGH44.mjs";import"../../chunk-OTNGLTKS.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-3GOJQ5JD.mjs";import"../../chunk-5L3UXSQI.mjs";import"../../chunk-52HZTDBB.mjs";import"../../chunk-IVOEXGOG.mjs";import"../../chunk-QQHA2Y46.mjs";import"../../chunk-YFMFXRJX.mjs";import"../../chunk-SUAA25UP.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-WLZYSLHP.mjs";import"../../chunk-GKERWKMB.mjs";import"../../chunk-HBQLX5QF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GR4PHW7K.mjs";import"../../chunk-53DBMWMU.mjs";import"../../chunk-MNVDBUF3.mjs";import"../../chunk-Z2AJWV6D.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-2XYA7NOU.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-WX6P3Q4I.mjs";import"../../chunk-ZWX3NHGU.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-VYXS7TLB.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-ZXYTLPP6.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-54QUDAAC.mjs";import"../../chunk-LS6G4DZV.mjs";import"../../chunk-EXMQBH3I.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-QQU4IQ27.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-G773HST5.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-PY4TS34X.mjs";import"../chunk-UO52TECC.mjs";import"../chunk-SONTIUAM.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-I5XQKNOK.mjs";import"../chunk-5IUXBOS5.mjs";import"../chunk-GNFEBKFV.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-ZOMXBB6Z.mjs";import"../chunk-TDGQGILY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-THRXIXIO.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-ZEYOFDIO.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-L36ZHC7J.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-5P7MXLZA.mjs";import"../chunk-F5PNGH44.mjs";import"../chunk-OTNGLTKS.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-54QUDAAC.mjs";import"../chunk-LS6G4DZV.mjs";import"../chunk-EXMQBH3I.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-TDGQGILY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-QQU4IQ27.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-G773HST5.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -3,7 +3,7 @@ export { Serializable, Serializer, ensureBoolean, outOfRangeErrorMessage, valida
3
3
  export { EntryFunctionBytes } from './serializable/entryFunctionBytes.mjs';
4
4
  export { FixedBytes } from './serializable/fixedBytes.mjs';
5
5
  export { Bool, U128, U16, U256, U32, U64, U8 } from './serializable/movePrimitives.mjs';
6
- export { MoveOption, MoveString, MoveVector } from './serializable/moveStructs.mjs';
6
+ export { MoveOption, MoveString, MoveVector, Serialized } from './serializable/moveStructs.mjs';
7
7
  import '../types/index.mjs';
8
8
  import '../utils/apiEndpoints.mjs';
9
9
  import '../types/indexer.mjs';
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-P5V7OZNN.mjs";import{a as g}from"../chunk-H6YNXJNF.mjs";import{a as p,b as q,c as r}from"../chunk-KMJ6TF6Y.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-YPHH6CAO.mjs";import"../chunk-THRXIXIO.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-KEYAPEAX.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-P5V7OZNN.mjs";import{a as g}from"../chunk-H6YNXJNF.mjs";import{a as p,b as q,c as r,d as s}from"../chunk-QQU4IQ27.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-YPHH6CAO.mjs";import"../chunk-G773HST5.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-KEYAPEAX.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,s as MoveOption,r as MoveString,p as MoveVector,b as Serializable,q as Serialized,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"../../chunk-YPHH6CAO.mjs";import"../../chunk-THRXIXIO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
1
+ import{a,b,c,d,e,f,g}from"../../chunk-YPHH6CAO.mjs";import"../../chunk-G773HST5.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
2
2
  //# sourceMappingURL=movePrimitives.mjs.map
@@ -149,6 +149,15 @@ declare class MoveVector<T extends Serializable & EntryFunctionArgument> extends
149
149
  */
150
150
  static deserialize<T extends Serializable & EntryFunctionArgument>(deserializer: Deserializer, cls: Deserializable<T>): MoveVector<T>;
151
151
  }
152
+ declare class Serialized extends Serializable implements TransactionArgument {
153
+ readonly value: Uint8Array;
154
+ constructor(value: HexInput);
155
+ serialize(serializer: Serializer): void;
156
+ serializeForEntryFunction(serializer: Serializer): void;
157
+ serializeForScriptFunction(serializer: Serializer): void;
158
+ static deserialize(deserializer: Deserializer): Serialized;
159
+ toMoveVector<T extends Serializable & EntryFunctionArgument>(cls: Deserializable<T>): MoveVector<T>;
160
+ }
152
161
  declare class MoveString extends Serializable implements TransactionArgument {
153
162
  value: string;
154
163
  constructor(value: string);
@@ -281,4 +290,4 @@ declare class MoveOption<T extends Serializable & EntryFunctionArgument> extends
281
290
  static deserialize<U extends Serializable & EntryFunctionArgument>(deserializer: Deserializer, cls: Deserializable<U>): MoveOption<U>;
282
291
  }
283
292
 
284
- export { MoveOption, MoveString, MoveVector };
293
+ export { MoveOption, MoveString, MoveVector, Serialized };
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-THRXIXIO.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
1
+ import{a,b,c,d}from"../../chunk-QQU4IQ27.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-G773HST5.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{d as MoveOption,c as MoveString,a as MoveVector,b as Serialized};
2
2
  //# sourceMappingURL=moveStructs.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-UO52TECC.mjs";import{b as s}from"./chunk-OHRL766V.mjs";import{d as c}from"./chunk-5IUXBOS5.mjs";import{d as r}from"./chunk-L36ZHC7J.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-NCWD4NA3.mjs.map
1
+ import{g as e}from"./chunk-F5PNGH44.mjs";import{b as s}from"./chunk-OHRL766V.mjs";import{d as c}from"./chunk-LS6G4DZV.mjs";import{d as r}from"./chunk-EXP5STXZ.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-2CAGPXCX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d,b}from"./chunk-UWPO7WWS.mjs";import{a as h,b as z}from"./chunk-6ERHGCK2.mjs";import{a as p,b as g}from"./chunk-NU55IEL4.mjs";import{b as o,d as y}from"./chunk-Q7MD4V7H.mjs";import{a as c}from"./chunk-A63SMUOU.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
- //# sourceMappingURL=chunk-Q67DUNMI.mjs.map
1
+ import{a as d,b}from"./chunk-UWPO7WWS.mjs";import{a as h,b as z}from"./chunk-WX6P3Q4I.mjs";import{a as p,b as g}from"./chunk-ZWX3NHGU.mjs";import{b as o,d as y}from"./chunk-Q7MD4V7H.mjs";import{a as c}from"./chunk-A63SMUOU.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
+ //# sourceMappingURL=chunk-2XYA7NOU.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-F7NVDHR2.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var i=class{constructor(n){this.config=n}async simple(n){return r({aptosConfig:this.config,...n})}async multiAgent(n){return r({aptosConfig:this.config,...n})}};o([s],i.prototype,"simple",1),o([s],i.prototype,"multiAgent",1);export{i as a};
2
- //# sourceMappingURL=chunk-2N2VEGT6.mjs.map
1
+ import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-EQSON7Y5.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var i=class{constructor(n){this.config=n}async simple(n){return r({aptosConfig:this.config,...n})}async multiAgent(n){return r({aptosConfig:this.config,...n})}};o([s],i.prototype,"simple",1),o([s],i.prototype,"multiAgent",1);export{i as a};
2
+ //# sourceMappingURL=chunk-3F3FCWT5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-ZZRSKHWS.mjs";import{a as n}from"./chunk-JKNTGRSQ.mjs";import{c as i}from"./chunk-Q7MD4V7H.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
- //# sourceMappingURL=chunk-3SPU4V2B.mjs.map
1
+ import{a as n}from"./chunk-5L3UXSQI.mjs";import{a as c}from"./chunk-YFMFXRJX.mjs";import{c as i}from"./chunk-Q7MD4V7H.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
+ //# sourceMappingURL=chunk-3GOJQ5JD.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as g}from"./chunk-OHRL766V.mjs";import{a as r}from"./chunk-H6YNXJNF.mjs";import{a as y,b as a,c as f}from"./chunk-KMJ6TF6Y.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as m}from"./chunk-YPHH6CAO.mjs";function D(n){return typeof n=="boolean"}function l(n){return typeof n=="string"}function d(n){return typeof n=="number"}function P(n){if(d(n))return n;if(l(n)&&n!=="")return Number.parseInt(n,10)}function w(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function G(n){return n==null}function $(n){return T(n)||B(n)||U(n)||b(n)||I(n)||v(n)||h(n)||E(n)||x(n)||S(n)||n instanceof y||n instanceof f}function T(n){return n instanceof i}function E(n){return n instanceof g}function x(n){return n instanceof a}function S(n){return n instanceof r}function B(n){return n instanceof o}function U(n){return n instanceof u}function b(n){return n instanceof s}function I(n){return n instanceof c}function v(n){return n instanceof p}function h(n){return n instanceof m}function O(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],A=t[2];return{moduleAddress:e,moduleName:F,functionName:A}}export{D as a,l as b,d as c,P as d,w as e,G as f,$ as g,T as h,E as i,x as j,S as k,B as l,U as m,b as n,I as o,v as p,h as q,O as r,R as s,W as t,L as u};
2
- //# sourceMappingURL=chunk-G7UNU5GI.mjs.map
1
+ import{b as g}from"./chunk-OHRL766V.mjs";import{a as r}from"./chunk-H6YNXJNF.mjs";import{a as y,c as a,d as f}from"./chunk-QQU4IQ27.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as m}from"./chunk-YPHH6CAO.mjs";function D(n){return typeof n=="boolean"}function l(n){return typeof n=="string"}function d(n){return typeof n=="number"}function P(n){if(d(n))return n;if(l(n)&&n!=="")return Number.parseInt(n,10)}function w(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function G(n){return n==null}function $(n){return T(n)||B(n)||U(n)||b(n)||I(n)||v(n)||h(n)||E(n)||x(n)||S(n)||n instanceof y||n instanceof f}function T(n){return n instanceof i}function E(n){return n instanceof g}function x(n){return n instanceof a}function S(n){return n instanceof r}function B(n){return n instanceof o}function U(n){return n instanceof u}function b(n){return n instanceof s}function I(n){return n instanceof c}function v(n){return n instanceof p}function h(n){return n instanceof m}function O(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],A=t[2];return{moduleAddress:e,moduleName:F,functionName:A}}export{D as a,l as b,d as c,P as d,w as e,G as f,$ as g,T as h,E as i,x as j,S as k,B as l,U as m,b as n,I as o,v as p,h as q,O as r,R as s,W as t,L as u};
2
+ //# sourceMappingURL=chunk-3HTSCV3R.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t,b as n,c as o,d as r}from"./chunk-WFOYGJS5.mjs";import{a as s}from"./chunk-PY4TS34X.mjs";import{b as i}from"./chunk-OHRL766V.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
2
- //# sourceMappingURL=chunk-H33YIMTU.mjs.map
1
+ import{a as t,b as n,c as o,d as r}from"./chunk-VTEZ6TBO.mjs";import{a as s}from"./chunk-5P7MXLZA.mjs";import{b as i}from"./chunk-OHRL766V.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
2
+ //# sourceMappingURL=chunk-4ENUSVZB.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as p}from"./chunk-IVOEXGOG.mjs";import{e as a}from"./chunk-2XYA7NOU.mjs";import{a as l,b as o}from"./chunk-WX6P3Q4I.mjs";import{b as y}from"./chunk-OHRL766V.mjs";var m=class g{constructor(i){let{multiKey:t,signers:e,address:c}=i;this.publicKey=t,this.signingScheme=3,this.accountAddress=c?y.from(c):this.publicKey.authKey().derivedAddress();let s=[];for(let n of e)s.push(this.publicKey.getIndex(n.publicKey));let r=e.map((n,u)=>[n,s[u]]);r.sort((n,u)=>n[1]-u[1]),this.signers=r.map(n=>n[0]),this.signerIndicies=r.map(n=>n[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:s})}static fromPublicKeysAndSigners(i){let{publicKeys:t,signaturesRequired:e,signers:c}=i,s=new l({publicKeys:t,signaturesRequired:e});return new g({multiKey:s,signers:c})}static isMultiKeySigner(i){return i instanceof g}signWithAuthenticator(i){return new a(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new a(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let t=this.signers.filter(e=>e instanceof p).map(async e=>e.waitForProofFetch());await Promise.all(t)}sign(i){let t=[];for(let e of this.signers)t.push(e.sign(i));return new o({signatures:t,bitmap:this.signaturesBitmap})}signTransaction(i){let t=[];for(let e of this.signers)t.push(e.signTransaction(i));return new o({signatures:t,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:t,signature:e}=i;if(!this.signerIndicies.every((s,r)=>r===0||s>=this.signerIndicies[r-1]))return!1;for(let s=0;s<e.signatures.length;s+=1){let r=e.signatures[s];if(!this.publicKey.publicKeys[this.signerIndicies[s]].verifySignature({message:t,signature:r}))return!1}return!0}};export{m as a};
2
+ //# sourceMappingURL=chunk-52HZTDBB.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 { 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 { KeylessAccount } from \"./KeylessAccount\";\n\nexport interface VerifyMultiKeySignatureArgs {\n message: HexInput;\n signature: MultiKeySignature;\n}\n\n/**\n * Signer implementation for the MultiKey authentication scheme.\n *\n * This accounts to use a M of N signing scheme. M and N are specified in the {@link MultiKey}\n * It signs messages via the array of M number of Accounts that individually correspond to a public key in the {@link MultiKey}.\n *\n * Note: Generating a signer instance does not create the account on-chain.\n */\nexport class MultiKeyAccount implements Account {\n /**\n * Public key associated with the account\n */\n readonly publicKey: MultiKey;\n\n /**\n * Account address associated with the account\n */\n readonly accountAddress: AccountAddress;\n\n /**\n * Signing scheme used to sign transactions\n */\n readonly signingScheme: SigningScheme;\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 or greater\n * than this.publicKey.signaturesRequired\n */\n readonly signers: Account[];\n\n /**\n * An array of indicies 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 */\n readonly signerIndicies: number[];\n\n readonly signaturesBitmap: Uint8Array;\n\n /**\n * constructor for MultiKeyAccount\n *\n * @param args.multiKey the multikey of the account which consists of N public keys and a number M which is\n * the number of required signatures.\n * @param args.signers an array of M signers that will be used to sign the transaction\n * @returns MultiKeyAccount\n */\n constructor(args: { multiKey: MultiKey; signers: Account[]; address?: AccountAddressInput }) {\n const { multiKey, signers, address } = args;\n\n this.publicKey = multiKey;\n this.signingScheme = SigningScheme.MultiKey;\n\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n\n // Get the index of each respective signer in the bitmap\n const bitPositions: number[] = [];\n for (const signer of signers) {\n bitPositions.push(this.publicKey.getIndex(signer.publicKey));\n }\n // Zip signers and bit positions and sort signers by bit positions in order\n // to ensure the signature is signed in ascending order according to the bitmap.\n // Authentication on chain will fail otherwise.\n const signersAndBitPosition: [Account, number][] = signers.map((signer, index) => [signer, bitPositions[index]]);\n signersAndBitPosition.sort((a, b) => a[1] - b[1]);\n this.signers = signersAndBitPosition.map((value) => value[0]);\n this.signerIndicies = signersAndBitPosition.map((value) => value[1]);\n this.signaturesBitmap = this.publicKey.createBitmap({ bits: bitPositions });\n }\n\n /**\n * Static constructor for MultiKeyAccount\n *\n * @param args.publicKeys the N public keys of the MultiKeyAccount\n * @param args.signaturesRequired the number of signatures required\n * @param args.signers an array of M signers that will be used to sign the transaction\n * @returns MultiKeyAccount\n */\n static fromPublicKeysAndSigners(args: {\n publicKeys: PublicKey[];\n signaturesRequired: number;\n signers: Account[];\n }): MultiKeyAccount {\n const { publicKeys, signaturesRequired, signers } = args;\n const multiKey = new MultiKey({ publicKeys, signaturesRequired });\n return new MultiKeyAccount({ multiKey, signers });\n }\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.\n * @param message the signing message, as binary input\n * @return the AccountAuthenticator containing the signature, together with the account's public key\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.\n * @param transaction the raw transaction\n * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key\n */\n signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey {\n return new AccountAuthenticatorMultiKey(this.publicKey, this.signTransaction(transaction));\n }\n\n /**\n * Waits for any proofs on any KeylessAccount signers to be fetched. If the proof is fetched a syncronously, call this\n * to ensure signing with the KeylessAccount does not fail as the proof must be ready.\n * @return\n */\n async waitForProofFetch() {\n const keylessSigners = this.signers.filter((signer) => signer instanceof KeylessAccount) as KeylessAccount[];\n const promises = keylessSigners.map(async (signer) => signer.waitForProofFetch());\n await Promise.all(promises);\n }\n\n /**\n * Sign the given message using the MultiKeyAccount's signers\n * @param message in HexInput format\n * @returns MultiKeySignature\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 * @param transaction the transaction to be signed\n * @returns MultiKeySignature\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 key.\n *\n * @param args.message raw message data in HexInput format\n * @param args.signatures signed message MultiKeySignature\n * @returns boolean\n */\n verifySignature(args: VerifyMultiKeySignatureArgs): boolean {\n const { message, signature } = args;\n const isSignerIndiciesSorted = this.signerIndicies.every(\n (value, i) => i === 0 || value >= this.signerIndicies[i - 1],\n );\n if (!isSignerIndiciesSorted) {\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":"2KAwBO,IAAMA,EAAN,MAAMC,CAAmC,CAuC9C,YAAYC,EAAiF,CAC3F,GAAM,CAAE,SAAAC,EAAU,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EAEvC,KAAK,UAAYC,EACjB,KAAK,cAAgB,EAErB,KAAK,eAAiBE,EAAUC,EAAe,KAAKD,CAAO,EAAI,KAAK,UAAU,QAAQ,EAAE,eAAe,EAGvG,IAAME,EAAyB,CAAC,EAChC,QAAWC,KAAUJ,EACnBG,EAAa,KAAK,KAAK,UAAU,SAASC,EAAO,SAAS,CAAC,EAK7D,IAAMC,EAA6CL,EAAQ,IAAI,CAACI,EAAQE,IAAU,CAACF,EAAQD,EAAaG,CAAK,CAAC,CAAC,EAC/GD,EAAsB,KAAK,CAACE,EAAGC,IAAMD,EAAE,CAAC,EAAIC,EAAE,CAAC,CAAC,EAChD,KAAK,QAAUH,EAAsB,IAAKI,GAAUA,EAAM,CAAC,CAAC,EAC5D,KAAK,eAAiBJ,EAAsB,IAAKI,GAAUA,EAAM,CAAC,CAAC,EACnE,KAAK,iBAAmB,KAAK,UAAU,aAAa,CAAE,KAAMN,CAAa,CAAC,CAC5E,CAUA,OAAO,yBAAyBL,EAIZ,CAClB,GAAM,CAAE,WAAAY,EAAY,mBAAAC,EAAoB,QAAAX,CAAQ,EAAIF,EAC9CC,EAAW,IAAIa,EAAS,CAAE,WAAAF,EAAY,mBAAAC,CAAmB,CAAC,EAChE,OAAO,IAAId,EAAgB,CAAE,SAAAE,EAAU,QAAAC,CAAQ,CAAC,CAClD,CAEA,OAAO,iBAAiBa,EAA8C,CACpE,OAAOA,aAAmBhB,CAC5B,CAOA,sBAAsBiB,EAAiD,CACrE,OAAO,IAAIC,EAA6B,KAAK,UAAW,KAAK,KAAKD,CAAO,CAAC,CAC5E,CAOA,iCAAiCE,EAA8D,CAC7F,OAAO,IAAID,EAA6B,KAAK,UAAW,KAAK,gBAAgBC,CAAW,CAAC,CAC3F,CAOA,MAAM,mBAAoB,CAExB,IAAMC,EADiB,KAAK,QAAQ,OAAQb,GAAWA,aAAkBc,CAAc,EACvD,IAAI,MAAOd,GAAWA,EAAO,kBAAkB,CAAC,EAChF,MAAM,QAAQ,IAAIa,CAAQ,CAC5B,CAOA,KAAKE,EAAmC,CACtC,IAAMC,EAAa,CAAC,EACpB,QAAWhB,KAAU,KAAK,QACxBgB,EAAW,KAAKhB,EAAO,KAAKe,CAAI,CAAC,EAEnC,OAAO,IAAIE,EAAkB,CAAE,WAAAD,EAAY,OAAQ,KAAK,gBAAiB,CAAC,CAC5E,CAOA,gBAAgBJ,EAAmD,CACjE,IAAMI,EAAa,CAAC,EACpB,QAAWhB,KAAU,KAAK,QACxBgB,EAAW,KAAKhB,EAAO,gBAAgBY,CAAW,CAAC,EAErD,OAAO,IAAIK,EAAkB,CAAE,WAAAD,EAAY,OAAQ,KAAK,gBAAiB,CAAC,CAC5E,CASA,gBAAgBtB,EAA4C,CAC1D,GAAM,CAAE,QAAAgB,EAAS,UAAAQ,CAAU,EAAIxB,EAI/B,GAAI,CAH2B,KAAK,eAAe,MACjD,CAACW,EAAOc,IAAMA,IAAM,GAAKd,GAAS,KAAK,eAAec,EAAI,CAAC,CAC7D,EAEE,MAAO,GAET,QAASA,EAAI,EAAGA,EAAID,EAAU,WAAW,OAAQC,GAAK,EAAG,CACvD,IAAMC,EAAkBF,EAAU,WAAWC,CAAC,EAE9C,GAAI,CADc,KAAK,UAAU,WAAW,KAAK,eAAeA,CAAC,CAAC,EACnD,gBAAgB,CAAE,QAAAT,EAAS,UAAWU,CAAgB,CAAC,EACpE,MAAO,EAEX,CACA,MAAO,EACT,CACF","names":["MultiKeyAccount","_MultiKeyAccount","args","multiKey","signers","address","AccountAddress","bitPositions","signer","signersAndBitPosition","index","a","b","value","publicKeys","signaturesRequired","MultiKey","account","message","AccountAuthenticatorMultiKey","transaction","promises","KeylessAccount","data","signatures","MultiKeySignature","signature","i","singleSignature"]}
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-GXTEJ7NO.mjs";import{b as i}from"./chunk-OHRL766V.mjs";import{a as d}from"./chunk-A63SMUOU.mjs";var o=class t extends d{constructor(e,s,r){super(),this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let s=n.deserialize(e),r=e.deserializeVector(i),c=e.deserializeBool(),a;return c&&(a=i.deserialize(e)),new t(s,r,a)}};export{o as a};
2
- //# sourceMappingURL=chunk-76HTG7Z7.mjs.map
1
+ import{a as n}from"./chunk-MNVDBUF3.mjs";import{b as i}from"./chunk-OHRL766V.mjs";import{a as d}from"./chunk-A63SMUOU.mjs";var o=class t extends d{constructor(e,s,r){super(),this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let s=n.deserialize(e),r=e.deserializeVector(i),c=e.deserializeBool(),a;return c&&(a=i.deserialize(e)),new t(s,r,a)}};export{o as a};
2
+ //# sourceMappingURL=chunk-53DBMWMU.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-GNFEBKFV.mjs";async function r(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:R,type:d}=e,u=t.getRequestUrl(d);return p({url:u,method:"GET",originMethod:R,path:a,contentType:o,acceptType:i,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function m(e){let{aptosConfig:t}=e;return r({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){return r({...e,type:"Pepper"})}async function A(e){let t=[],s,n=e.params;do{let o=await r({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{r as a,m as b,y as c,A as d};
2
- //# sourceMappingURL=chunk-I5XQKNOK.mjs.map
1
+ import{b as p}from"./chunk-EXMQBH3I.mjs";async function r(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:R,type:d}=e,u=t.getRequestUrl(d);return p({url:u,method:"GET",originMethod:R,path:a,contentType:o,acceptType:i,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function m(e){let{aptosConfig:t}=e;return r({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){return r({...e,type:"Pepper"})}async function A(e){let t=[],s,n=e.params;do{let o=await r({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{r as a,m as b,y as c,A as d};
2
+ //# sourceMappingURL=chunk-54QUDAAC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-KEN2VRIM.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
- //# sourceMappingURL=chunk-7AIKM3UF.mjs.map
1
+ import{a as o}from"./chunk-OPTI3MH2.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
+ //# sourceMappingURL=chunk-56F7EYFE.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as o}from"./chunk-3NRBTP3S.mjs";import{b as i}from"./chunk-Q67DUNMI.mjs";import{c as n}from"./chunk-Q7MD4V7H.mjs";import{b as s}from"./chunk-OHRL766V.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
2
- //# sourceMappingURL=chunk-JKNTGRSQ.mjs.map
1
+ import{d as o}from"./chunk-SUAA25UP.mjs";import{b as i}from"./chunk-2XYA7NOU.mjs";import{c as n}from"./chunk-Q7MD4V7H.mjs";import{b as s}from"./chunk-OHRL766V.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
2
+ //# sourceMappingURL=chunk-5L3UXSQI.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-UO52TECC.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
- //# sourceMappingURL=chunk-PY4TS34X.mjs.map
1
+ import{h as e}from"./chunk-F5PNGH44.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
+ //# sourceMappingURL=chunk-5P7MXLZA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-A4T373F3.mjs";import{a as o}from"./chunk-PY4TS34X.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-6BYVG7H4.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-NKDHR2DA.mjs";import{a as o}from"./chunk-5P7MXLZA.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-5TBIWC7N.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-F7NVDHR2.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-ZQFFRZJ4.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-EQSON7Y5.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-6CHBLB3V.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-ORXEFE6X.mjs";import{a as m}from"./chunk-F7NVDHR2.mjs";import{b as w}from"./chunk-OHRL766V.mjs";import{c as A}from"./chunk-SONTIUAM.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",O="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",v={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:O,custom:null,devnet:null};function d(e){let t=v[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,O as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
- //# sourceMappingURL=chunk-NRRADUK4.mjs.map
1
+ import{a as g}from"./chunk-NBO2BDDZ.mjs";import{a as m}from"./chunk-EQSON7Y5.mjs";import{c as A}from"./chunk-OTNGLTKS.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-OHRL766V.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",O="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",v={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:O,custom:null,devnet:null};function d(e){let t=v[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,O as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
+ //# sourceMappingURL=chunk-AVSM2BJR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ZOMXBB6Z.mjs";import{spawn as n}from"child_process";import l from"tree-kill";import{platform as p}from"os";var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}async stop(){await new Promise((t,s)=>{this.process?.pid&&l(this.process.pid,r=>{r?s(r):t(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let t="npx",s=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=p(),e;r==="win32"?e=n(t,s,{shell:!0}):e=n(t,s),this.process=e,e.stderr?.on("data",o=>{let a=o.toString();console.log(a)}),e.stdout?.on("data",o=>{let a=o.toString();console.log(a)})}async waitUntilProcessIsUp(){let t=await this.checkIfProcessIsUp(),s=Date.now()/1e3,r=s;for(;!t&&s+this.MAXIMUM_WAIT_TIME_SEC>r;)await i(1e3),t=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!t)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch{return!1}}};export{c as a};
2
- //# sourceMappingURL=chunk-52KPINA4.mjs.map
1
+ import{a as i}from"./chunk-UAL27G6B.mjs";import{spawn as n}from"child_process";import l from"tree-kill";import{platform as p}from"os";var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}async stop(){await new Promise((t,s)=>{this.process?.pid&&l(this.process.pid,r=>{r?s(r):t(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let t="npx",s=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=p(),e;r==="win32"?e=n(t,s,{shell:!0}):e=n(t,s),this.process=e,e.stderr?.on("data",o=>{let a=o.toString();console.log(a)}),e.stdout?.on("data",o=>{let a=o.toString();console.log(a)})}async waitUntilProcessIsUp(){let t=await this.checkIfProcessIsUp(),s=Date.now()/1e3,r=s;for(;!t&&s+this.MAXIMUM_WAIT_TIME_SEC>r;)await i(1e3),t=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!t)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch{return!1}}};export{c as a};
2
+ //# sourceMappingURL=chunk-B5NYEWNM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-2N2VEGT6.mjs";import{a as T}from"./chunk-ZQFFRZJ4.mjs";import{a as y}from"./chunk-UV7M72QD.mjs";import{a as d}from"./chunk-FNT3VLRD.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-F7NVDHR2.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-UO52TECC.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return a({...n})}signAsFeePayer(n){let{signer:t,transaction:o}=n;if(!o.feePayerAddress)throw new Error(`Transaction ${o} is not a Fee Payer transaction`);return o.feePayerAddress=t.accountAddress,a({signer:t,transaction:o})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:o,options:P}=n;this.batch.forSingleAccount({sender:t,data:o,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:o}=n;return m({aptosConfig:this.config,signer:t,transaction:o})}};export{h as a};
2
- //# sourceMappingURL=chunk-74YFNJ7A.mjs.map
1
+ import{a as A}from"./chunk-3F3FCWT5.mjs";import{a as T}from"./chunk-6CHBLB3V.mjs";import{a as y}from"./chunk-EJMPY5MF.mjs";import{a as d}from"./chunk-NPFW6ZFY.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-EQSON7Y5.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-F5PNGH44.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return a({...n})}signAsFeePayer(n){let{signer:t,transaction:o}=n;if(!o.feePayerAddress)throw new Error(`Transaction ${o} is not a Fee Payer transaction`);return o.feePayerAddress=t.accountAddress,a({signer:t,transaction:o})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:o,options:P}=n;this.batch.forSingleAccount({sender:t,data:o,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:o}=n;return m({aptosConfig:this.config,signer:t,transaction:o})}};export{h as a};
2
+ //# sourceMappingURL=chunk-BIGX2RJL.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as I}from"./chunk-NBO2BDDZ.mjs";import{a as A,b as a,c as g,d as m,e as p,f,g as y,h as C,i as T,j as O,k as l,l as P,m as R,n as V,o as L,p as h,q as S}from"./chunk-XSTCHOUI.mjs";import{a as n}from"./chunk-5P7MXLZA.mjs";import{g as u,h as d}from"./chunk-UAL27G6B.mjs";import{e as i,f as c}from"./chunk-EXP5STXZ.mjs";var w=class{constructor(e){this.config=e}async getAccountInfo(e){return A({aptosConfig:this.config,...e})}async getAccountModules(e){return a({aptosConfig:this.config,...e})}async getAccountModule(e){return g({aptosConfig:this.config,...e})}async getAccountTransactions(e){return m({aptosConfig:this.config,...e})}async getAccountResources(e){return p({aptosConfig:this.config,...e})}async getAccountResource(e){return f({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return y({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),C({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),T({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),O({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),l({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),P({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),V({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),L({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:i,faMetadataAddress:c,...e})}async getAccountCoinAmount(e){let{coinType:t,faMetadataAddress:s}=e;await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"});let r=t;if(t===void 0&&s!==void 0)try{let o=(await I({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[s]}})).at(0);o.vec.length>0&&d(o.vec[0])&&(r=u(o.vec[0]))}catch{}return R({aptosConfig:this.config,...e,coinType:r})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),h({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return S({aptosConfig:this.config,...e})}};export{w as a};
2
+ //# sourceMappingURL=chunk-DCNBMUKN.mjs.map
@@ -0,0 +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 } 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 getAccountCoinAmount,\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\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n */\nexport class Account {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries the current state for an Aptos account given its account address\n *\n * @param args.accountAddress Aptos account address\n *\n * @returns The account data\n *\n * @example An example of the returned account\n * ```\n * {\n * sequence_number: \"1\",\n * authentication_key: \"0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69\"\n * }\n * ```\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 *\n * Note: In order to get all account modules, this function may call the API\n * multiple times as it auto paginates.\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number module to start returning results from\n * @param args.options.limit The 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 *\n * @returns Account modules\n */\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 account address and module name\n *\n * @param args.accountAddress 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 Account module\n *\n * @example\n * const module = await aptos.getAccountModule({accountAddress:\"0x456\"})\n * // An example of an account module response\n * ```\n * {\n * bytecode: \"0xa11ceb0b0600000006010002030206050807070f0d081c200\",\n * abi: { address: \"0x1\" }\n * }\n * ```\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 *\n * Note: In order to get all account transactions, this function may call the API\n * multiple times as it auto paginates.\n *\n * @example\n * const transactions = await aptos.getAccountTransactions({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number transaction to start returning results from\n * @param args.options.limit The number of results to return\n *\n * @returns The account transactions\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 *\n * Note: In order to get all account resources, this function may call the API\n * multiple times as it auto paginates.\n *\n * @example\n * const resources = await aptos.getAccountResources({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress Aptos account address\n * @param args.options.offset The number resource to start returning results from\n * @param args.options.limit The 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 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 account address and resource type. Note that the default is `any` in order\n * to allow for ease of accessing properties of the object.\n *\n * @type The typed output of the resource\n * @param args.accountAddress Aptos account address\n * @param args.resourceType String representation of an on-chain Move struct type, i.e \"0x1::aptos_coin::AptosCoin\"\n * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version\n *\n * @returns Account resource\n *\n * @example\n * const resource = await aptos.getAccountResource({accountAddress:\"0x456\"})\n *\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\n *\n * This handles both if the account's authentication key has been rotated or not.\n *\n * @example\n * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})\n *\n * @param args.authenticationKey The authentication key\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 accountAddress associated with the authentication key\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 an account\n *\n * @example\n * const tokensCount = await aptos.getAccountTokensCount({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress The account address\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current count of tokens owned by the 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 account's current owned tokens.\n *\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 param\n *\n * @example\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:\"0x456\"})\n *\n * @param args.accountAddress The account address we want to get the tokens 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 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 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 *\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 param\n *\n * @example\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:\"0x123\", collectionAddress:\"0x456\"})\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 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.\n *\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 param\n *\n * @example\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:\"0x123\"})\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 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 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 * @example\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:\"0x123\"})\n *\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 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 * Queries an account's coins data\n *\n * @example\n * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:\"0x123\"})\n *\n * @param args.accountAddress The account address we want to get the coins data for\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options.offset optional. The number coin 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\n * @returns Array with the coins data\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 * Queries the current count of an account's coins aggregated\n *\n * @example\n * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:\"0x123\"})\n *\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 the aggregated count of all account's coins\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 * Queries the account's APT amount\n *\n * @example\n * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:\"0x123\"})\n *\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 amount of account's APT\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 account's coin amount by the coin type\n *\n * @example\n * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:\"0x123\", coinType:\"0x1::aptos_coin::AptosCoin\"})\n *\n * @param args.accountAddress The account address we want to get the total count for\n * @param args.coinType The coin type to query.\n * Note: faMetadataAddress will automatically fill this in if not provided when migrated to fungible assets\n * @param args.faMetadataAddress The fungible asset metadata address to query.\n * Note: coinType will automatically fill this in if not provided when migrated to fungible assets\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns Current amount of account's coin\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType?: MoveStructId;\n faMetadataAddress?: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n const { coinType, faMetadataAddress } = args;\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\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 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 coinAssetType = parseEncodedStruct(pairedCoinTypeStruct.vec[0]);\n }\n } catch (error) {\n /* No paired coin type found */\n }\n }\n\n return getAccountCoinAmount({ aptosConfig: this.config, ...args, coinType: coinAssetType });\n }\n\n /**\n * Queries an account's owned objects\n *\n * @example\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:\"0x123\"})\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 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.\n * This functions resolves the provided private key type and derives the public key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and\n * auth key using the SingleKey scheme locally.\n *\n * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve\n * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based\n * on that.\n *\n * @example\n * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey(\"0x123\")})\n *\n * @param args.privateKey An account private key\n * @returns Account type\n */\n async deriveAccountFromPrivateKey(args: { privateKey: PrivateKey }): Promise<AccountModule> {\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"sUAqDO,IAAMA,EAAN,KAAc,CACnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAiB3C,MAAM,eAAeC,EAAqE,CACxF,OAAOC,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACtD,CAgBA,MAAM,kBAAkBA,EAGU,CAChC,OAAOE,EAAW,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACzD,CAqBA,MAAM,iBAAiBA,EAIS,CAC9B,OAAOG,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CACxD,CAiBA,MAAM,uBAAuBA,EAGM,CACjC,OAAOI,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGJ,CACL,CAAC,CACH,CAiBA,MAAM,oBAAoBA,EAGE,CAC1B,OAAOK,EAAa,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CAC3D,CAiBA,MAAM,mBAAuCA,EAI9B,CACb,OAAOM,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGN,CAAK,CAAC,CAC7D,CAeA,MAAM,6BAA6BA,EAIP,CAC1B,OAAOO,EAA6B,CAAE,YAAa,KAAK,OAAQ,GAAGP,CAAK,CAAC,CAC3E,CAYA,MAAM,sBAAsBA,EAGR,CAClB,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,8CACF,CAAC,EACMS,EAAsB,CAC3B,YAAa,KAAK,OAClB,GAAGT,CACL,CAAC,CACH,CAmBA,MAAM,sBAAsBA,EAIoB,CAC9C,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,kCACF,CAAC,EACMU,EAAsB,CAC3B,YAAa,KAAK,OAClB,GAAGV,CACL,CAAC,CACH,CAoBA,MAAM,2CAA2CA,EAKQ,CACvD,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,kCACF,CAAC,EACMW,EAA2C,CAChD,YAAa,KAAK,OAClB,GAAGX,CACL,CAAC,CACH,CAmBA,MAAM,qCAAqCA,EAIc,CACvD,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,kCACF,CAAC,EACMY,EAAqC,CAC1C,YAAa,KAAK,OAClB,GAAGZ,CACL,CAAC,CACH,CAYA,MAAM,4BAA4BA,EAGd,CAClB,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,8CACF,CAAC,EACMa,EAA4B,CACjC,YAAa,KAAK,OAClB,GAAGb,CACL,CAAC,CACH,CAgBA,MAAM,oBAAoBA,EAMe,CACvC,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,wCACF,CAAC,EACMc,EAAoB,CACzB,YAAa,KAAK,OAClB,GAAGd,CACL,CAAC,CACH,CAYA,MAAM,qBAAqBA,EAGP,CAClB,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,wCACF,CAAC,EACMe,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGf,CAAK,CAAC,CACnE,CAYA,MAAM,oBAAoBA,EAGN,CAClB,OAAO,KAAK,qBAAqB,CAAE,SAAUgB,EAAY,kBAAmBC,EAAU,GAAGjB,CAAK,CAAC,CACjG,CAgBA,MAAM,qBAAqBA,EAKP,CAClB,GAAM,CAAE,SAAAkB,EAAU,kBAAAC,CAAkB,EAAInB,EACxC,MAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,wCACF,CAAC,EAID,IAAIoB,EAA0CF,EAC9C,GAAIA,IAAa,QAAaC,IAAsB,OAClD,GAAI,CACF,IAAME,GACJ,MAAMC,EAAK,CACT,YAAa,KAAK,OAClB,QAAS,CAAE,SAAU,yBAA0B,kBAAmB,CAACH,CAAiB,CAAE,CACxF,CAAC,GACD,GAAG,CAAC,EAGFE,EAAqB,IAAI,OAAS,GAAKE,EAAgBF,EAAqB,IAAI,CAAC,CAAC,IACpFD,EAAgBI,EAAmBH,EAAqB,IAAI,CAAC,CAAC,EAElE,MAAgB,CAEhB,CAGF,OAAOI,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGzB,EAAM,SAAUoB,CAAc,CAAC,CAC5F,CAeA,MAAM,uBAAuBpB,EAIW,CACtC,aAAMQ,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBR,EAAK,qBAC3B,iCACF,CAAC,EACM0B,EAAuB,CAC5B,YAAa,KAAK,OAClB,GAAG1B,CACL,CAAC,CACH,CAmBA,MAAM,4BAA4BA,EAA0D,CAC1F,OAAO2B,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAG3B,CAAK,CAAC,CAC1E,CACF","names":["Account","config","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","waitForIndexerOnVersion","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","APTOS_COIN","APTOS_FA","coinType","faMetadataAddress","coinAssetType","pairedCoinTypeStruct","view","isEncodedStruct","parseEncodedStruct","getAccountCoinAmount","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
@@ -1,2 +1,2 @@
1
- import{c as l}from"./chunk-NWOMSL6K.mjs";import{a as k,b as c,d as A,e as g,f as P,g as z,h as D,i as m,j as L,l as R,m as X,n as q,o as H,p as J,q as K,s as i,t as Q}from"./chunk-G7UNU5GI.mjs";import{c as j}from"./chunk-HHU7UCFI.mjs";import{b as S,c as I,d as x,e as M,f as O,g as C,h as _,i as V,n as G}from"./chunk-SUJLWCRN.mjs";import{b as d}from"./chunk-OHRL766V.mjs";import{a as y,b as F,c as s}from"./chunk-KMJ6TF6Y.mjs";import{a as w,b as h,c as B,d as E,e as v,f as $,g as b}from"./chunk-YPHH6CAO.mjs";var Y=new TextEncoder;function sn(n){return n?.map(e=>c(e)?l(e):e)??[]}async function W(n,e,t,u){let r=await j({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(o=>o.name===t)}async function fn(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let o=Q(r),T=[];for(let f=o;f<r.params.length;f+=1)T.push(l(r.params[f],{allowGenerics:!0}));return{signers:o,typeParameters:r.generic_type_params,parameters:T}}async function on(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let o=[];for(let f=0;f<r.params.length;f+=1)o.push(l(r.params[f],{allowGenerics:!0}));let T=[];for(let f=0;f<r.return.length;f+=1)T.push(l(r.return[f],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:o,returnTypes:T}}function cn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let o=e.parameters[u];return U(t,o,u,r)}function U(n,e,t,u){return z(n)?(p(e,n,t),n):Z(n,e,t,u)}function Z(n,e,t,u){if(e.isBool()){if(k(n))return new w(n);if(c(n)){if(n==="true")return new w(!0);if(n==="false")return new w(!1)}i("boolean",t)}if(e.isAddress()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){let r=A(n);if(r!==void 0)return new h(r);i("number | string",t)}if(e.isU16()){let r=A(n);if(r!==void 0)return new B(r);i("number | string",t)}if(e.isU32()){let r=A(n);if(r!==void 0)return new E(r);i("number | string",t)}if(e.isU64()){if(g(n))return new v(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return U(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return y.U8(Y.encode(n));if(n instanceof Uint8Array)return y.U8(n);if(n instanceof ArrayBuffer)return y.U8(new Uint8Array(n))}if(Array.isArray(n))return new y(n.map(r=>U(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new F(n);i("string",t)}if(e.isObject()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isOption()){if(P(n)){let r=e.value.typeArgs[0];return r instanceof S?new s(null):r instanceof V?new s(null):r instanceof I?new s(null):r instanceof x?new s(null):r instanceof M?new s(null):r instanceof O?new s(null):r instanceof C?new s(null):r instanceof _?new s(null):new s(null)}return new s(U(n,e.value.typeArgs[0],t,u))}throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function p(n,e,t){if(n.isBool()){if(D(e))return;i("Bool",t)}if(n.isAddress()){if(m(e))return;i("AccountAddress",t)}if(n.isU8()){if(R(e))return;i("U8",t)}if(n.isU16()){if(X(e))return;i("U16",t)}if(n.isU32()){if(q(e))return;i("U32",t)}if(n.isU64()){if(H(e))return;i("U64",t)}if(n.isU128()){if(J(e))return;i("U128",t)}if(n.isU256()){if(K(e))return;i("U256",t)}if(n.isVector()){if(e instanceof y){e.values.length>0&&p(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof G){if(n.isString()){if(L(e))return;i("MoveString",t)}if(n.isObject()){if(m(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof s){e.value!==void 0&&p(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{sn as a,W as b,fn as c,on as d,cn as e,U as f};
2
- //# sourceMappingURL=chunk-AYX5JMB4.mjs.map
1
+ import{a as k,b as c,d as A,e as g,f as P,g as z,h as D,i as m,j as L,l as R,m as X,n as q,o as H,p as J,q as K,s as i,t as Q}from"./chunk-3HTSCV3R.mjs";import{c as l}from"./chunk-NWOMSL6K.mjs";import{c as j}from"./chunk-XSTCHOUI.mjs";import{b as S,c as I,d as x,e as M,f as O,g as C,h as _,i as V,n as G}from"./chunk-SUJLWCRN.mjs";import{b as d}from"./chunk-OHRL766V.mjs";import{a as y,c as F,d as s}from"./chunk-QQU4IQ27.mjs";import{a as w,b as h,c as B,d as E,e as v,f as $,g as b}from"./chunk-YPHH6CAO.mjs";var Y=new TextEncoder;function sn(n){return n?.map(e=>c(e)?l(e):e)??[]}async function W(n,e,t,u){let r=await j({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(o=>o.name===t)}async function fn(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let o=Q(r),T=[];for(let f=o;f<r.params.length;f+=1)T.push(l(r.params[f],{allowGenerics:!0}));return{signers:o,typeParameters:r.generic_type_params,parameters:T}}async function on(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let o=[];for(let f=0;f<r.params.length;f+=1)o.push(l(r.params[f],{allowGenerics:!0}));let T=[];for(let f=0;f<r.return.length;f+=1)T.push(l(r.return[f],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:o,returnTypes:T}}function cn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let o=e.parameters[u];return U(t,o,u,r)}function U(n,e,t,u){return z(n)?(p(e,n,t),n):Z(n,e,t,u)}function Z(n,e,t,u){if(e.isBool()){if(k(n))return new w(n);if(c(n)){if(n==="true")return new w(!0);if(n==="false")return new w(!1)}i("boolean",t)}if(e.isAddress()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){let r=A(n);if(r!==void 0)return new h(r);i("number | string",t)}if(e.isU16()){let r=A(n);if(r!==void 0)return new B(r);i("number | string",t)}if(e.isU32()){let r=A(n);if(r!==void 0)return new E(r);i("number | string",t)}if(e.isU64()){if(g(n))return new v(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return U(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return y.U8(Y.encode(n));if(n instanceof Uint8Array)return y.U8(n);if(n instanceof ArrayBuffer)return y.U8(new Uint8Array(n))}if(Array.isArray(n))return new y(n.map(r=>U(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new F(n);i("string",t)}if(e.isObject()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isOption()){if(P(n)){let r=e.value.typeArgs[0];return r instanceof S?new s(null):r instanceof V?new s(null):r instanceof I?new s(null):r instanceof x?new s(null):r instanceof M?new s(null):r instanceof O?new s(null):r instanceof C?new s(null):r instanceof _?new s(null):new s(null)}return new s(U(n,e.value.typeArgs[0],t,u))}throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function p(n,e,t){if(n.isBool()){if(D(e))return;i("Bool",t)}if(n.isAddress()){if(m(e))return;i("AccountAddress",t)}if(n.isU8()){if(R(e))return;i("U8",t)}if(n.isU16()){if(X(e))return;i("U16",t)}if(n.isU32()){if(q(e))return;i("U32",t)}if(n.isU64()){if(H(e))return;i("U64",t)}if(n.isU128()){if(J(e))return;i("U128",t)}if(n.isU256()){if(K(e))return;i("U256",t)}if(n.isVector()){if(e instanceof y){e.values.length>0&&p(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof G){if(n.isString()){if(L(e))return;i("MoveString",t)}if(n.isObject()){if(m(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof s){e.value!==void 0&&p(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{sn as a,W as b,fn as c,on as d,cn as e,U as f};
2
+ //# sourceMappingURL=chunk-DVIRUFCY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-F7NVDHR2.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
- //# sourceMappingURL=chunk-UV7M72QD.mjs.map
1
+ import{a as t}from"./chunk-EQSON7Y5.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
+ //# sourceMappingURL=chunk-EJMPY5MF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g,f as d,g as b,i as S}from"./chunk-YY2XW5R4.mjs";import{a as C}from"./chunk-HHU7UCFI.mjs";import{a as w}from"./chunk-EZIF26UH.mjs";import{a as I}from"./chunk-RA3YPQG2.mjs";import{a as P}from"./chunk-3SPU4V2B.mjs";import{d as l}from"./chunk-3NRBTP3S.mjs";import{a as T}from"./chunk-HKMG3LZX.mjs";import{c as f,m as s}from"./chunk-SUJLWCRN.mjs";import{b as p}from"./chunk-OHRL766V.mjs";import{b as A}from"./chunk-5IUXBOS5.mjs";import{a as r}from"./chunk-KMJ6TF6Y.mjs";import{b as y}from"./chunk-YPHH6CAO.mjs";async function h(t){let a=await D(t);return G(t,a)}async function D(t){let{aptosConfig:a,data:n}=t,e,o;return"bytecode"in n?o=await g(n):"multisigAddress"in n?(e={aptosConfig:a,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)):(e={aptosConfig:a,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)),o}async function G(t,a){let{aptosConfig:n,sender:e,options:o}=t,i;if(K(t)&&(i=p.ZERO.toString()),U(t)){let{secondarySignerAddresses:c}=t;return d({aptosConfig:n,sender:e,payload:a,options:o,secondarySignerAddresses:c,feePayerAddress:i})}return d({aptosConfig:n,sender:e,payload:a,options:o,feePayerAddress:i})}function K(t){return t.withFeePayer===!0}function U(t){return"secondarySignerAddresses"in t}function Y(t){let{transaction:a}=t;return l(a)}function _(t){let{signer:a,transaction:n}=t;return a.signTransactionWithAuthenticator(n)}async function $(t){let{aptosConfig:a,transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}=t,u=b({transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}),{data:m}=await A({aptosConfig:a,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return m}async function B(t){let{aptosConfig:a}=t,n=S({...t}),{data:e}=await A({aptosConfig:a,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return e}async function M(t){let{aptosConfig:a,signer:n,transaction:e}=t;(n instanceof I||n instanceof w)&&await n.waitForProofFetch();let o=_({signer:n,transaction:e});return B({aptosConfig:a,transaction:e,senderAuthenticator:o})}var N={typeParameters:[],parameters:[s.u8(),new s(s.u8())]};async function nn(t){let{aptosConfig:a,account:n,metadataBytes:e,moduleBytecode:o,options:i}=t,c=o.map(u=>r.U8(u));return h({aptosConfig:a,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[r.U8(e),new r(c)],abi:N},options:i})}var F={typeParameters:[],parameters:[new f,s.u8(),new f,s.u8(),s.u8(),s.u8()]};async function tn(t){let{aptosConfig:a,fromAccount:n,toNewPrivateKey:e}=t,o=await C({aptosConfig:a,accountAddress:n.accountAddress}),i=P.fromPrivateKey({privateKey:e,legacy:!0}),u=new T({sequenceNumber:BigInt(o.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(o.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),m=n.sign(u),R=i.sign(u),x=await h({aptosConfig:a,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new y(n.signingScheme),r.U8(n.publicKey.toUint8Array()),new y(i.signingScheme),r.U8(i.publicKey.toUint8Array()),r.U8(m.toUint8Array()),r.U8(R.toUint8Array())],abi:F}});return M({aptosConfig:a,signer:n,transaction:x})}export{h as a,D as b,G as c,Y as d,_ as e,$ as f,B as g,M as h,nn as i,tn as j};
2
- //# sourceMappingURL=chunk-F7NVDHR2.mjs.map
1
+ import{a as g,f as d,g as b,i as S}from"./chunk-T53MZO2U.mjs";import{a as C}from"./chunk-XSTCHOUI.mjs";import{a as P}from"./chunk-3GOJQ5JD.mjs";import{a as w}from"./chunk-52HZTDBB.mjs";import{a as I}from"./chunk-IVOEXGOG.mjs";import{d as l}from"./chunk-SUAA25UP.mjs";import{a as T}from"./chunk-WLZYSLHP.mjs";import{c as f,m as s}from"./chunk-SUJLWCRN.mjs";import{b as p}from"./chunk-OHRL766V.mjs";import{b as A}from"./chunk-LS6G4DZV.mjs";import{a as r}from"./chunk-QQU4IQ27.mjs";import{b as y}from"./chunk-YPHH6CAO.mjs";async function h(t){let a=await D(t);return G(t,a)}async function D(t){let{aptosConfig:a,data:n}=t,e,o;return"bytecode"in n?o=await g(n):"multisigAddress"in n?(e={aptosConfig:a,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)):(e={aptosConfig:a,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)),o}async function G(t,a){let{aptosConfig:n,sender:e,options:o}=t,i;if(K(t)&&(i=p.ZERO.toString()),U(t)){let{secondarySignerAddresses:c}=t;return d({aptosConfig:n,sender:e,payload:a,options:o,secondarySignerAddresses:c,feePayerAddress:i})}return d({aptosConfig:n,sender:e,payload:a,options:o,feePayerAddress:i})}function K(t){return t.withFeePayer===!0}function U(t){return"secondarySignerAddresses"in t}function Y(t){let{transaction:a}=t;return l(a)}function _(t){let{signer:a,transaction:n}=t;return a.signTransactionWithAuthenticator(n)}async function $(t){let{aptosConfig:a,transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}=t,u=b({transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}),{data:m}=await A({aptosConfig:a,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return m}async function B(t){let{aptosConfig:a}=t,n=S({...t}),{data:e}=await A({aptosConfig:a,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return e}async function M(t){let{aptosConfig:a,signer:n,transaction:e}=t;(n instanceof I||n instanceof w)&&await n.waitForProofFetch();let o=_({signer:n,transaction:e});return B({aptosConfig:a,transaction:e,senderAuthenticator:o})}var N={typeParameters:[],parameters:[s.u8(),new s(s.u8())]};async function nn(t){let{aptosConfig:a,account:n,metadataBytes:e,moduleBytecode:o,options:i}=t,c=o.map(u=>r.U8(u));return h({aptosConfig:a,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[r.U8(e),new r(c)],abi:N},options:i})}var F={typeParameters:[],parameters:[new f,s.u8(),new f,s.u8(),s.u8(),s.u8()]};async function tn(t){let{aptosConfig:a,fromAccount:n,toNewPrivateKey:e}=t,o=await C({aptosConfig:a,accountAddress:n.accountAddress}),i=P.fromPrivateKey({privateKey:e,legacy:!0}),u=new T({sequenceNumber:BigInt(o.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(o.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),m=n.sign(u),R=i.sign(u),x=await h({aptosConfig:a,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new y(n.signingScheme),r.U8(n.publicKey.toUint8Array()),new y(i.signingScheme),r.U8(i.publicKey.toUint8Array()),r.U8(m.toUint8Array()),r.U8(R.toUint8Array())],abi:F}});return M({aptosConfig:a,signer:n,transaction:x})}export{h as a,D as b,G as c,Y as d,_ as e,$ as f,B as g,M as h,nn as i,tn as j};
2
+ //# sourceMappingURL=chunk-EQSON7Y5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-TDGQGILY.mjs";import{a as d}from"./chunk-ZEYOFDIO.mjs";async function A(s,u){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:R}=s,p={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${d}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":R};return e?.AUTH_TOKEN&&(p.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(p.Authorization=`Bearer ${e?.API_KEY}`),u.provider({url:t,method:n,body:i,params:o,headers:p,overrides:e})}async function y(s,u,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},u.client),e={status:o.status,statusText:o.statusText,data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let R=e.data;if(R.errors)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});e.data=R.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new r({apiType:t,aptosRequest:s,aptosResponse:e})}export{A as a,y as b};
2
- //# sourceMappingURL=chunk-GNFEBKFV.mjs.map
1
+ import{a as r}from"./chunk-TDGQGILY.mjs";import{a as d}from"./chunk-ZXVQ2OBJ.mjs";async function A(s,u){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:R}=s,p={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${d}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":R};return e?.AUTH_TOKEN&&(p.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(p.Authorization=`Bearer ${e?.API_KEY}`),u.provider({url:t,method:n,body:i,params:o,headers:p,overrides:e})}async function y(s,u,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},u.client),e={status:o.status,statusText:o.statusText,data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let R=e.data;if(R.errors)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});e.data=R.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new r({apiType:t,aptosRequest:s,aptosResponse:e})}export{A as a,y as b};
2
+ //# sourceMappingURL=chunk-EXMQBH3I.mjs.map
@@ -0,0 +1,2 @@
1
+ var S=(O=>(O.FULLNODE="Fullnode",O.INDEXER="Indexer",O.FAUCET="Faucet",O.PEPPER="Pepper",O.PROVER="Prover",O))(S||{}),t=2e5,R=20,n=20,o="0x1::aptos_coin::AptosCoin",A="0x000000000000000000000000000000000000000000000000000000000000000a",T="APTOS::RawTransaction",a="APTOS::RawTransactionWithData",E=(_=>(_.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",_.DEFAULT="default_processor",_.EVENTS_PROCESSOR="events_processor",_.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",_.STAKE_PROCESSOR="stake_processor",_.TOKEN_V2_PROCESSOR="token_v2_processor",_.USER_TRANSACTION_PROCESSOR="user_transaction_processor",_.OBJECT_PROCESSOR="objects_processor",_))(E||{});export{S as a,t as b,R as c,n as d,o as e,A as f,T as g,a as h,E as i};
2
+ //# sourceMappingURL=chunk-EXP5STXZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Type of API endpoint for request routing\n */\nexport enum AptosApiType {\n FULLNODE = \"Fullnode\",\n INDEXER = \"Indexer\",\n FAUCET = \"Faucet\",\n PEPPER = \"Pepper\",\n PROVER = \"Prover\",\n}\n\n/**\n * The default max gas amount when none is given.\n *\n * This is the maximum number of gas units that will be used by a transaction before being rejected.\n *\n * Note that max gas amount varies based on the transaction. A larger transaction will go over this\n * default gas amount, and the value will need to be changed for the specific transaction.\n */\nexport const DEFAULT_MAX_GAS_AMOUNT = 200000;\n\n/**\n * The default transaction expiration seconds from now.\n *\n * This time is how long until the blockchain nodes will reject the transaction.\n *\n * Note that the transaction expiration time varies based on network connection and network load. It may need to be\n * increased for the transaction to be processed.\n */\nexport const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\n\n/**\n * The default number of seconds to wait for a transaction to be processed.\n *\n * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for\n * the results of the transaction. It may take longer based on network connection and network load.\n */\nexport const DEFAULT_TXN_TIMEOUT_SEC = 20;\n\n/**\n * The default gas currency for the network.\n */\nexport const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\nexport const APTOS_FA = \"0x000000000000000000000000000000000000000000000000000000000000000a\";\n\nexport const RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\nexport const RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\n\n/**\n * The list of supported Processor types for our indexer api.\n *\n * These can be found from the processor_status table in the indexer database.\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}\n */\nexport enum ProcessorType {\n ACCOUNT_TRANSACTION_PROCESSOR = \"account_transactions_processor\",\n DEFAULT = \"default_processor\",\n EVENTS_PROCESSOR = \"events_processor\",\n // Fungible asset processor also handles coins\n FUNGIBLE_ASSET_PROCESSOR = \"fungible_asset_processor\",\n STAKE_PROCESSOR = \"stake_processor\",\n // Token V2 processor replaces Token processor (not only for digital assets)\n TOKEN_V2_PROCESSOR = \"token_v2_processor\",\n USER_TRANSACTION_PROCESSOR = \"user_transaction_processor\",\n OBJECT_PROCESSOR = \"objects_processor\",\n}\n"],"mappings":"AAMO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SALCA,OAAA,IAgBCC,EAAyB,IAUzBC,EAA+B,GAQ/BC,EAA0B,GAK1BC,EAAa,6BACbC,EAAW,qEAEXC,EAAuB,wBACvBC,EAAiC,gCAQlCC,OACVA,EAAA,8BAAgC,iCAChCA,EAAA,QAAU,oBACVA,EAAA,iBAAmB,mBAEnBA,EAAA,yBAA2B,2BAC3BA,EAAA,gBAAkB,kBAElBA,EAAA,mBAAqB,qBACrBA,EAAA,2BAA6B,6BAC7BA,EAAA,iBAAmB,oBAVTA,OAAA","names":["AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","DEFAULT_TXN_TIMEOUT_SEC","APTOS_COIN","APTOS_FA","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","ProcessorType"]}
@@ -1,2 +1,2 @@
1
- import{e as x,f as B}from"./chunk-SONTIUAM.mjs";import{a as k}from"./chunk-AH44UPM4.mjs";import{b as f,d as A}from"./chunk-I5XQKNOK.mjs";import{a as d}from"./chunk-ZOMXBB6Z.mjs";import{a as b}from"./chunk-TDGQGILY.mjs";import{d as C}from"./chunk-L36ZHC7J.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 G(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 W(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 O(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 q(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 z(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 U(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 X(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,G as b,W as c,y as d,O as e,R as f,q as g,z as h,m as i,T as j,U as k,X as l};
2
- //# sourceMappingURL=chunk-UO52TECC.mjs.map
1
+ import{e as x,f as B}from"./chunk-OTNGLTKS.mjs";import{a as k}from"./chunk-AH44UPM4.mjs";import{b as f,d as A}from"./chunk-54QUDAAC.mjs";import{a as b}from"./chunk-TDGQGILY.mjs";import{a as d}from"./chunk-UAL27G6B.mjs";import{d as C}from"./chunk-EXP5STXZ.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 G(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 W(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 O(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 q(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 z(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 U(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 X(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,G as b,W as c,y as d,O as e,R as f,q as g,z as h,m as i,T as j,U as k,X as l};
2
+ //# sourceMappingURL=chunk-F5PNGH44.mjs.map