@aptos-labs/ts-sdk 1.13.1-zeta.1 → 1.13.1-zeta.3

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 (276) hide show
  1. package/dist/common/index.d.ts +1 -1
  2. package/dist/common/index.js +4 -4
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/account/Account.mjs +1 -1
  5. package/dist/esm/account/Ed25519Account.mjs +1 -1
  6. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  7. package/dist/esm/account/KeylessAccount.d.mts +1 -0
  8. package/dist/esm/account/KeylessAccount.mjs +1 -1
  9. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  10. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  11. package/dist/esm/account/index.mjs +1 -1
  12. package/dist/esm/api/account.d.mts +1 -1
  13. package/dist/esm/api/account.mjs +1 -1
  14. package/dist/esm/api/ans.mjs +1 -1
  15. package/dist/esm/api/aptos.mjs +1 -1
  16. package/dist/esm/api/aptosConfig.mjs +1 -1
  17. package/dist/esm/api/coin.d.mts +2 -2
  18. package/dist/esm/api/coin.mjs +1 -1
  19. package/dist/esm/api/digitalAsset.d.mts +2 -2
  20. package/dist/esm/api/digitalAsset.mjs +1 -1
  21. package/dist/esm/api/event.d.mts +1 -1
  22. package/dist/esm/api/event.mjs +1 -1
  23. package/dist/esm/api/faucet.mjs +1 -1
  24. package/dist/esm/api/fungibleAsset.d.mts +1 -1
  25. package/dist/esm/api/fungibleAsset.mjs +1 -1
  26. package/dist/esm/api/general.d.mts +2 -2
  27. package/dist/esm/api/general.mjs +1 -1
  28. package/dist/esm/api/index.mjs +1 -1
  29. package/dist/esm/api/keyless.d.mts +0 -1
  30. package/dist/esm/api/keyless.mjs +1 -1
  31. package/dist/esm/api/staking.d.mts +2 -2
  32. package/dist/esm/api/staking.mjs +1 -1
  33. package/dist/esm/api/transaction.d.mts +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.mjs +1 -1
  42. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  43. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  44. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  45. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  46. package/dist/esm/bcs/serializer.mjs +1 -1
  47. package/dist/esm/{chunk-C2HDZYYQ.mjs → chunk-22CDTJSF.mjs} +2 -2
  48. package/dist/esm/{chunk-NKSAU5OX.mjs → chunk-3AC5TPYW.mjs} +2 -2
  49. package/dist/esm/{chunk-7EQOLMEJ.mjs → chunk-3FVRXELT.mjs} +2 -2
  50. package/dist/esm/{chunk-Q225PZMV.mjs → chunk-3VGX3TXH.mjs} +2 -2
  51. package/dist/esm/{chunk-BIU5KNPT.mjs → chunk-4CLRAOCB.mjs} +2 -2
  52. package/dist/esm/{chunk-I657KZIO.mjs → chunk-4EBHV35B.mjs} +2 -2
  53. package/dist/esm/{chunk-EGTGR3R4.mjs → chunk-4OT5OXVG.mjs} +2 -2
  54. package/dist/esm/{chunk-RBDX3YWC.mjs → chunk-4P3VIMVM.mjs} +2 -2
  55. package/dist/esm/{chunk-AE7X4LVG.mjs → chunk-4X4HJL3N.mjs} +2 -2
  56. package/dist/esm/{chunk-534GCQ37.mjs → chunk-5EQXQFGY.mjs} +2 -2
  57. package/dist/esm/{chunk-Y5DMKMLF.mjs → chunk-5JRZCLBY.mjs} +2 -2
  58. package/dist/esm/{chunk-NMYQ2LMC.mjs → chunk-5UYYCW5V.mjs} +2 -2
  59. package/dist/esm/{chunk-Y4VKIX2V.mjs → chunk-5VSMDXZ6.mjs} +2 -2
  60. package/dist/esm/{chunk-Y4VKIX2V.mjs.map → chunk-5VSMDXZ6.mjs.map} +1 -1
  61. package/dist/esm/{chunk-KFKE46CF.mjs → chunk-5WBDOSJO.mjs} +2 -2
  62. package/dist/esm/{chunk-ND5A52N4.mjs → chunk-6GQAHQGW.mjs} +2 -2
  63. package/dist/esm/{chunk-YMVFNEBO.mjs → chunk-6LTGQWJQ.mjs} +2 -2
  64. package/dist/esm/{chunk-VVJEWB26.mjs → chunk-6RBUXB5I.mjs} +2 -2
  65. package/dist/esm/{chunk-S5YUB2BI.mjs → chunk-6SIZZAWU.mjs} +2 -2
  66. package/dist/esm/{chunk-B645DPPF.mjs → chunk-7FNHL6LU.mjs} +2 -2
  67. package/dist/esm/{chunk-JYFKKB34.mjs → chunk-7STYQ5ZE.mjs} +2 -2
  68. package/dist/esm/{chunk-G4QU37E6.mjs → chunk-A4DVDNSM.mjs} +2 -2
  69. package/dist/esm/{chunk-VSWIMQAB.mjs → chunk-ACFXTTRJ.mjs} +2 -2
  70. package/dist/esm/{chunk-CW7JVCSV.mjs → chunk-AVCNFBZ6.mjs} +2 -2
  71. package/dist/esm/{chunk-UZHVGPGH.mjs → chunk-C3L4ETUF.mjs} +2 -2
  72. package/dist/esm/{chunk-GVZZTEYV.mjs → chunk-C5VCRT5G.mjs} +2 -2
  73. package/dist/esm/{chunk-HZC6A3QL.mjs → chunk-COW5IGYC.mjs} +2 -2
  74. package/dist/esm/{chunk-TCMSBGBS.mjs → chunk-CQJ4WN7M.mjs} +2 -2
  75. package/dist/esm/{chunk-OF256KD5.mjs → chunk-CYIEYPXQ.mjs} +2 -2
  76. package/dist/esm/chunk-DDZGSI33.mjs +2 -0
  77. package/dist/esm/{chunk-CFJEOZMV.mjs.map → chunk-DDZGSI33.mjs.map} +1 -1
  78. package/dist/esm/{chunk-PCLBZIT4.mjs → chunk-DIX5DLNP.mjs} +2 -2
  79. package/dist/esm/{chunk-35ZI4WOQ.mjs → chunk-EB7AI4B4.mjs} +2 -2
  80. package/dist/esm/{chunk-FB6T6ZQP.mjs → chunk-EXRFZC3C.mjs} +2 -2
  81. package/dist/esm/{chunk-OQKD5SSG.mjs → chunk-FCJLWZWL.mjs} +2 -2
  82. package/dist/esm/{chunk-3FL3NLZ6.mjs → chunk-FFKQCXTQ.mjs} +2 -2
  83. package/dist/esm/chunk-GFW5KSAZ.mjs +2 -0
  84. package/dist/esm/{chunk-COLCWAPL.mjs.map → chunk-GFW5KSAZ.mjs.map} +1 -1
  85. package/dist/esm/{chunk-VG2J3UTS.mjs → chunk-GY5C3NFK.mjs} +2 -2
  86. package/dist/esm/{chunk-XI4LX4EC.mjs → chunk-HGZGTBA4.mjs} +2 -2
  87. package/dist/esm/{chunk-JP6UNRLO.mjs → chunk-HWTQJARL.mjs} +2 -2
  88. package/dist/esm/{chunk-6DA64TSG.mjs → chunk-IHCL7UWQ.mjs} +2 -2
  89. package/dist/esm/{chunk-P2JP6PSD.mjs → chunk-IJBPBDYK.mjs} +2 -2
  90. package/dist/esm/{chunk-7YMBWSKN.mjs → chunk-INS2SYOV.mjs} +2 -2
  91. package/dist/esm/{chunk-6YDD6LGX.mjs → chunk-IOPG2AU7.mjs} +2 -2
  92. package/dist/esm/{chunk-HZFOKUQZ.mjs → chunk-JH7BYJ4C.mjs} +2 -2
  93. package/dist/esm/{chunk-VSPQRNEG.mjs → chunk-KXZSBE7W.mjs} +2 -2
  94. package/dist/esm/{chunk-2OTMSEHI.mjs → chunk-LYUXOW2M.mjs} +2 -2
  95. package/dist/esm/{chunk-QEKSGA7S.mjs → chunk-MDENCOVF.mjs} +2 -2
  96. package/dist/esm/{chunk-RM7D2ITN.mjs → chunk-MGOHPDX4.mjs} +2 -2
  97. package/dist/esm/{chunk-D2DIZHP3.mjs → chunk-MP5ROJ2O.mjs} +2 -2
  98. package/dist/esm/{chunk-MRCVSUJQ.mjs → chunk-MWUJCP27.mjs} +2 -2
  99. package/dist/esm/{chunk-WAWBXQ6B.mjs → chunk-NNRRPXQF.mjs} +2 -2
  100. package/dist/esm/{chunk-YGWIVUJP.mjs → chunk-NSF64TWI.mjs} +2 -2
  101. package/dist/esm/{chunk-5GIWRESN.mjs → chunk-NUR3TCTI.mjs} +2 -2
  102. package/dist/esm/{chunk-QFK75K2K.mjs → chunk-OGOHKIIA.mjs} +2 -2
  103. package/dist/esm/{chunk-IVBYTTN7.mjs → chunk-PFFAQZHT.mjs} +2 -2
  104. package/dist/esm/{chunk-QBWI223M.mjs → chunk-PHYMHZJW.mjs} +2 -2
  105. package/dist/esm/{chunk-5TNUDFLP.mjs → chunk-QXI5L5MN.mjs} +2 -2
  106. package/dist/esm/{chunk-YIIDPNGQ.mjs → chunk-RIJEDN6X.mjs} +2 -2
  107. package/dist/esm/{chunk-W2MKEIHI.mjs → chunk-RYFIXEOV.mjs} +2 -2
  108. package/dist/esm/{chunk-UMFYNNCG.mjs → chunk-SEJ2XNM7.mjs} +2 -2
  109. package/dist/esm/{chunk-KX5ESZO7.mjs → chunk-STYDBDYL.mjs} +2 -2
  110. package/dist/esm/{chunk-N35ARFH3.mjs → chunk-SVSVP4FM.mjs} +2 -2
  111. package/dist/esm/{chunk-U7EZI5D5.mjs → chunk-T23OVRNF.mjs} +2 -2
  112. package/dist/esm/{chunk-WR5L4STD.mjs → chunk-TE7AJKSU.mjs} +2 -2
  113. package/dist/esm/{chunk-52DBSOFA.mjs → chunk-TVRJ3M7B.mjs} +2 -2
  114. package/dist/esm/{chunk-IO2NZ5PR.mjs → chunk-U2XWRAPL.mjs} +2 -2
  115. package/dist/esm/{chunk-UAFAZSOH.mjs → chunk-U6XKW7OK.mjs} +2 -2
  116. package/dist/esm/{chunk-MUEDPI2Z.mjs → chunk-UKOX55K4.mjs} +2 -2
  117. package/dist/esm/{chunk-3OA7CG6N.mjs → chunk-US26M7LP.mjs} +2 -2
  118. package/dist/esm/{chunk-3OA7CG6N.mjs.map → chunk-US26M7LP.mjs.map} +1 -1
  119. package/dist/esm/{chunk-LB4KMZNQ.mjs → chunk-VJ2W4HR4.mjs} +2 -2
  120. package/dist/esm/{chunk-T7TIIAWK.mjs → chunk-VLRFXWPH.mjs} +2 -2
  121. package/dist/esm/{chunk-ED6PYTNG.mjs → chunk-W4EQGTSE.mjs} +2 -2
  122. package/dist/esm/{chunk-SQNDWIVJ.mjs → chunk-WL4HOO3M.mjs} +2 -2
  123. package/dist/esm/{chunk-ORMDVSRG.mjs → chunk-WP7YNQOI.mjs} +2 -2
  124. package/dist/esm/{chunk-ASRAJ24P.mjs → chunk-WXRK2AKZ.mjs} +2 -2
  125. package/dist/esm/{chunk-PSTPEDI3.mjs → chunk-WYLZXOER.mjs} +2 -2
  126. package/dist/esm/{chunk-SC7NXRMV.mjs → chunk-XM3VKHID.mjs} +2 -2
  127. package/dist/esm/{chunk-M3VGAYMW.mjs → chunk-XM7P5CUO.mjs} +2 -2
  128. package/dist/esm/{chunk-WZCUABDL.mjs → chunk-ZNEBMSNC.mjs} +2 -2
  129. package/dist/esm/client/core.mjs +1 -1
  130. package/dist/esm/client/get.mjs +1 -1
  131. package/dist/esm/client/index.mjs +1 -1
  132. package/dist/esm/client/post.mjs +1 -1
  133. package/dist/esm/core/account/index.mjs +1 -1
  134. package/dist/esm/core/account/utils/address.mjs +1 -1
  135. package/dist/esm/core/account/utils/index.mjs +1 -1
  136. package/dist/esm/core/accountAddress.mjs +1 -1
  137. package/dist/esm/core/authenticationKey.mjs +1 -1
  138. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  139. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  140. package/dist/esm/core/crypto/index.mjs +1 -1
  141. package/dist/esm/core/crypto/keyless.mjs +1 -1
  142. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  143. package/dist/esm/core/crypto/multiKey.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.mjs +1 -1
  150. package/dist/esm/internal/account.d.mts +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.d.mts +3 -3
  154. package/dist/esm/internal/coin.mjs +1 -1
  155. package/dist/esm/internal/digitalAsset.mjs +1 -1
  156. package/dist/esm/internal/event.d.mts +1 -1
  157. package/dist/esm/internal/event.mjs +1 -1
  158. package/dist/esm/internal/faucet.d.mts +3 -3
  159. package/dist/esm/internal/faucet.mjs +1 -1
  160. package/dist/esm/internal/fungibleAsset.d.mts +1 -1
  161. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  162. package/dist/esm/internal/general.mjs +1 -1
  163. package/dist/esm/internal/keyless.mjs +1 -1
  164. package/dist/esm/internal/staking.mjs +1 -1
  165. package/dist/esm/internal/transaction.mjs +1 -1
  166. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  167. package/dist/esm/internal/view.mjs +1 -1
  168. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  169. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  170. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  171. package/dist/esm/transactions/index.mjs +1 -1
  172. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  173. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  174. package/dist/esm/transactions/instances/index.mjs +1 -1
  175. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  176. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  177. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  178. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  179. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  180. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  181. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  182. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  183. package/dist/esm/transactions/management/index.mjs +1 -1
  184. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  185. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  186. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  187. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  188. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  189. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  190. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  191. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  192. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  193. package/dist/esm/utils/index.mjs +1 -1
  194. package/dist/esm/version.d.mts +1 -1
  195. package/dist/esm/version.mjs +1 -1
  196. package/package.json +1 -1
  197. package/src/account/KeylessAccount.ts +4 -0
  198. package/src/api/keyless.ts +0 -1
  199. package/src/utils/apiEndpoints.ts +1 -1
  200. package/src/version.ts +1 -1
  201. package/dist/esm/chunk-CFJEOZMV.mjs +0 -2
  202. package/dist/esm/chunk-COLCWAPL.mjs +0 -2
  203. /package/dist/esm/{chunk-C2HDZYYQ.mjs.map → chunk-22CDTJSF.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-NKSAU5OX.mjs.map → chunk-3AC5TPYW.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-7EQOLMEJ.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-Q225PZMV.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-BIU5KNPT.mjs.map → chunk-4CLRAOCB.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-I657KZIO.mjs.map → chunk-4EBHV35B.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-EGTGR3R4.mjs.map → chunk-4OT5OXVG.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-RBDX3YWC.mjs.map → chunk-4P3VIMVM.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-AE7X4LVG.mjs.map → chunk-4X4HJL3N.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-534GCQ37.mjs.map → chunk-5EQXQFGY.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-Y5DMKMLF.mjs.map → chunk-5JRZCLBY.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-NMYQ2LMC.mjs.map → chunk-5UYYCW5V.mjs.map} +0 -0
  215. /package/dist/esm/{chunk-KFKE46CF.mjs.map → chunk-5WBDOSJO.mjs.map} +0 -0
  216. /package/dist/esm/{chunk-ND5A52N4.mjs.map → chunk-6GQAHQGW.mjs.map} +0 -0
  217. /package/dist/esm/{chunk-YMVFNEBO.mjs.map → chunk-6LTGQWJQ.mjs.map} +0 -0
  218. /package/dist/esm/{chunk-VVJEWB26.mjs.map → chunk-6RBUXB5I.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-S5YUB2BI.mjs.map → chunk-6SIZZAWU.mjs.map} +0 -0
  220. /package/dist/esm/{chunk-B645DPPF.mjs.map → chunk-7FNHL6LU.mjs.map} +0 -0
  221. /package/dist/esm/{chunk-JYFKKB34.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
  222. /package/dist/esm/{chunk-G4QU37E6.mjs.map → chunk-A4DVDNSM.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-VSWIMQAB.mjs.map → chunk-ACFXTTRJ.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-CW7JVCSV.mjs.map → chunk-AVCNFBZ6.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-UZHVGPGH.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-GVZZTEYV.mjs.map → chunk-C5VCRT5G.mjs.map} +0 -0
  227. /package/dist/esm/{chunk-HZC6A3QL.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
  228. /package/dist/esm/{chunk-TCMSBGBS.mjs.map → chunk-CQJ4WN7M.mjs.map} +0 -0
  229. /package/dist/esm/{chunk-OF256KD5.mjs.map → chunk-CYIEYPXQ.mjs.map} +0 -0
  230. /package/dist/esm/{chunk-PCLBZIT4.mjs.map → chunk-DIX5DLNP.mjs.map} +0 -0
  231. /package/dist/esm/{chunk-35ZI4WOQ.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
  232. /package/dist/esm/{chunk-FB6T6ZQP.mjs.map → chunk-EXRFZC3C.mjs.map} +0 -0
  233. /package/dist/esm/{chunk-OQKD5SSG.mjs.map → chunk-FCJLWZWL.mjs.map} +0 -0
  234. /package/dist/esm/{chunk-3FL3NLZ6.mjs.map → chunk-FFKQCXTQ.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-VG2J3UTS.mjs.map → chunk-GY5C3NFK.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-XI4LX4EC.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-JP6UNRLO.mjs.map → chunk-HWTQJARL.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-6DA64TSG.mjs.map → chunk-IHCL7UWQ.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-P2JP6PSD.mjs.map → chunk-IJBPBDYK.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-7YMBWSKN.mjs.map → chunk-INS2SYOV.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-6YDD6LGX.mjs.map → chunk-IOPG2AU7.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-HZFOKUQZ.mjs.map → chunk-JH7BYJ4C.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-VSPQRNEG.mjs.map → chunk-KXZSBE7W.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-2OTMSEHI.mjs.map → chunk-LYUXOW2M.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-QEKSGA7S.mjs.map → chunk-MDENCOVF.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-RM7D2ITN.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-D2DIZHP3.mjs.map → chunk-MP5ROJ2O.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-MRCVSUJQ.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-WAWBXQ6B.mjs.map → chunk-NNRRPXQF.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-YGWIVUJP.mjs.map → chunk-NSF64TWI.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-5GIWRESN.mjs.map → chunk-NUR3TCTI.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-QFK75K2K.mjs.map → chunk-OGOHKIIA.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-IVBYTTN7.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-QBWI223M.mjs.map → chunk-PHYMHZJW.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-5TNUDFLP.mjs.map → chunk-QXI5L5MN.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-YIIDPNGQ.mjs.map → chunk-RIJEDN6X.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-W2MKEIHI.mjs.map → chunk-RYFIXEOV.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-UMFYNNCG.mjs.map → chunk-SEJ2XNM7.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-KX5ESZO7.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-N35ARFH3.mjs.map → chunk-SVSVP4FM.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-U7EZI5D5.mjs.map → chunk-T23OVRNF.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-WR5L4STD.mjs.map → chunk-TE7AJKSU.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-52DBSOFA.mjs.map → chunk-TVRJ3M7B.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-IO2NZ5PR.mjs.map → chunk-U2XWRAPL.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-UAFAZSOH.mjs.map → chunk-U6XKW7OK.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-MUEDPI2Z.mjs.map → chunk-UKOX55K4.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-LB4KMZNQ.mjs.map → chunk-VJ2W4HR4.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-T7TIIAWK.mjs.map → chunk-VLRFXWPH.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-ED6PYTNG.mjs.map → chunk-W4EQGTSE.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-SQNDWIVJ.mjs.map → chunk-WL4HOO3M.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-ORMDVSRG.mjs.map → chunk-WP7YNQOI.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-ASRAJ24P.mjs.map → chunk-WXRK2AKZ.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-PSTPEDI3.mjs.map → chunk-WYLZXOER.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-SC7NXRMV.mjs.map → chunk-XM3VKHID.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-M3VGAYMW.mjs.map → chunk-XM7P5CUO.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-WZCUABDL.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-7EQOLMEJ.mjs";import{a as r}from"./chunk-52DBSOFA.mjs";var t=class l extends r{constructor(e){super();this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
2
- //# sourceMappingURL=chunk-UZHVGPGH.mjs.map
1
+ import{a as i}from"./chunk-3FVRXELT.mjs";import{a as r}from"./chunk-TVRJ3M7B.mjs";var t=class l extends r{constructor(e){super();this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
2
+ //# sourceMappingURL=chunk-C3L4ETUF.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-OQKD5SSG.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-GVZZTEYV.mjs.map
1
+ import{h as e}from"./chunk-FCJLWZWL.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-C5VCRT5G.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-52DBSOFA.mjs";import{b as r}from"./chunk-AOCNYMMX.mjs";var t=class extends e{toString(){let n=this.toUint8Array();return r.fromHexInput(n).toString()}},a=class extends t{};export{t as a,a as b};
2
- //# sourceMappingURL=chunk-HZC6A3QL.mjs.map
1
+ import{a as e}from"./chunk-TVRJ3M7B.mjs";import{b as r}from"./chunk-AOCNYMMX.mjs";var t=class extends e{toString(){let n=this.toUint8Array();return r.fromHexInput(n).toString()}},a=class extends t{};export{t as a,a as b};
2
+ //# sourceMappingURL=chunk-COW5IGYC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-KX5ESZO7.mjs";import{a as c}from"./chunk-TJDC5PWD.mjs";import{b as p}from"./chunk-HZC6A3QL.mjs";import{g as d,k as f,l as h}from"./chunk-S5HG2QUD.mjs";import{a as m}from"./chunk-JYFKKB34.mjs";import{a as g}from"./chunk-52DBSOFA.mjs";import{b as n}from"./chunk-AOCNYMMX.mjs";import{ed25519 as o}from"@noble/curves/ed25519";var K=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16],i=class i extends p{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==i.LENGTH)throw new Error(`PublicKey length should be ${i.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:a}=e;if(!(a instanceof y))return!1;let u=c(t),S=n.fromHexInput(u).toUint8Array(),v=a.toUint8Array(),U=this.key.toUint8Array();return a.isCanonicalSignature()?o.verify(v,S,U):!1}authKey(){return m.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new i(t)}static isPublicKey(e){return e instanceof i}};i.LENGTH=32;var l=i,r=class r extends g{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=t}static generate(){let e=o.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!d(e))throw new Error(`Invalid derivation path ${e}`);return new r(f(e,r.SLIP_0010_SEED,h(t)))}publicKey(){let e=o.getPublicKey(this.signingKey.toUint8Array());return new l(e)}sign(e){let t=c(e),a=n.fromHexInput(t).toUint8Array(),u=o.sign(a,this.signingKey.toUint8Array());return new y(u)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.signingKey.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var H=r,s=class s extends A{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==s.LENGTH)throw new Error(`Signature length should be ${s.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new s(t)}isCanonicalSignature(){let e=this.toUint8Array().slice(32);for(let t=e.length-1;t>=0;t-=1){if(e[t]<K[t])return!0;if(e[t]>K[t])return!1}return!1}};s.LENGTH=64;var y=s;export{l as a,H as b,y as c};
2
- //# sourceMappingURL=chunk-TCMSBGBS.mjs.map
1
+ import{a as c}from"./chunk-TJDC5PWD.mjs";import{b as p}from"./chunk-COW5IGYC.mjs";import{a as A}from"./chunk-STYDBDYL.mjs";import{g as d,k as f,l as h}from"./chunk-S5HG2QUD.mjs";import{a as m}from"./chunk-7STYQ5ZE.mjs";import{a as g}from"./chunk-TVRJ3M7B.mjs";import{b as n}from"./chunk-AOCNYMMX.mjs";import{ed25519 as o}from"@noble/curves/ed25519";var K=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16],i=class i extends p{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==i.LENGTH)throw new Error(`PublicKey length should be ${i.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:a}=e;if(!(a instanceof y))return!1;let u=c(t),S=n.fromHexInput(u).toUint8Array(),v=a.toUint8Array(),U=this.key.toUint8Array();return a.isCanonicalSignature()?o.verify(v,S,U):!1}authKey(){return m.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new i(t)}static isPublicKey(e){return e instanceof i}};i.LENGTH=32;var l=i,r=class r extends g{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=t}static generate(){let e=o.utils.randomPrivateKey();return new r(e)}static fromDerivationPath(e,t){if(!d(e))throw new Error(`Invalid derivation path ${e}`);return new r(f(e,r.SLIP_0010_SEED,h(t)))}publicKey(){let e=o.getPublicKey(this.signingKey.toUint8Array());return new l(e)}sign(e){let t=c(e),a=n.fromHexInput(t).toUint8Array(),u=o.sign(a,this.signingKey.toUint8Array());return new y(u)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.signingKey.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var H=r,s=class s extends A{constructor(e){super();let t=n.fromHexInput(e);if(t.toUint8Array().length!==s.LENGTH)throw new Error(`Signature length should be ${s.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new s(t)}isCanonicalSignature(){let e=this.toUint8Array().slice(32);for(let t=e.length-1;t>=0;t-=1){if(e[t]<K[t])return!0;if(e[t]>K[t])return!1}return!1}};s.LENGTH=64;var y=s;export{l as a,H as b,y as c};
2
+ //# sourceMappingURL=chunk-CQJ4WN7M.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t,c as n}from"./chunk-TCMSBGBS.mjs";import{a as l}from"./chunk-KX5ESZO7.mjs";import{a as u}from"./chunk-HZC6A3QL.mjs";import{a as s}from"./chunk-6IFMQ5AS.mjs";import{b as o}from"./chunk-AOCNYMMX.mjs";var c=class i extends u{constructor(e){super();let r=e.constructor.name;switch(r){case t.name:this.publicKey=e,this.variant=0;break;default:throw new Error(`Unsupported key for EphemeralPublicKey - ${r}`)}}toUint8Array(){return this.bcsToBytes()}toString(){return this.bcsToHex().toString()}verifySignature(e){let{message:r,signature:a}=e;return this.publicKey.verifySignature({message:r,signature:a})}serialize(e){if(this.publicKey instanceof t)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(t.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}}static isPublicKey(e){return e instanceof i}isEd25519(){return this.publicKey instanceof t}},p=class i extends l{constructor(e){super();let r=e.constructor.name;switch(r){case n.name:this.signature=e;break;default:throw new Error(`Unsupported signature for EphemeralSignature - ${r}`)}}toUint8Array(){return this.signature.toUint8Array()}toString(){return this.signature.toString()}static fromHex(e){let r=o.fromHexInput(e),a=new s(r.toUint8Array());return i.deserialize(a)}serialize(e){if(this.signature instanceof n)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Unknown signature type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(n.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralSignature: ${r}`)}}};export{c as a,p as b};
2
- //# sourceMappingURL=chunk-OF256KD5.mjs.map
1
+ import{a as t,c as n}from"./chunk-CQJ4WN7M.mjs";import{a as u}from"./chunk-COW5IGYC.mjs";import{a as l}from"./chunk-STYDBDYL.mjs";import{b as o}from"./chunk-AOCNYMMX.mjs";import{a as s}from"./chunk-6IFMQ5AS.mjs";var c=class i extends u{constructor(e){super();let r=e.constructor.name;switch(r){case t.name:this.publicKey=e,this.variant=0;break;default:throw new Error(`Unsupported key for EphemeralPublicKey - ${r}`)}}toUint8Array(){return this.bcsToBytes()}toString(){return this.bcsToHex().toString()}verifySignature(e){let{message:r,signature:a}=e;return this.publicKey.verifySignature({message:r,signature:a})}serialize(e){if(this.publicKey instanceof t)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(t.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}}static isPublicKey(e){return e instanceof i}isEd25519(){return this.publicKey instanceof t}},p=class i extends l{constructor(e){super();let r=e.constructor.name;switch(r){case n.name:this.signature=e;break;default:throw new Error(`Unsupported signature for EphemeralSignature - ${r}`)}}toUint8Array(){return this.signature.toUint8Array()}toString(){return this.signature.toString()}static fromHex(e){let r=o.fromHexInput(e),a=new s(r.toUint8Array());return i.deserialize(a)}serialize(e){if(this.signature instanceof n)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Unknown signature type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(n.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralSignature: ${r}`)}}};export{c as a,p as b};
2
+ //# sourceMappingURL=chunk-CYIEYPXQ.mjs.map
@@ -0,0 +1,2 @@
1
+ var t="1.13.1-zeta.3";export{t as a};
2
+ //# sourceMappingURL=chunk-DDZGSI33.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.13.1-zeta.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.13.1-zeta.3\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-BIU5KNPT.mjs";import{a as o,b as s,c as t,d as r,e as n,f as i,h as a,i as g}from"./chunk-WAWBXQ6B.mjs";var p=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return c({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return n({aptosConfig:this.config,...e})}async queryIndexer(e){return i({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return a({aptosConfig:this.config})}async getProcessorStatus(e){return g({aptosConfig:this.config,processorType:e})}};export{p as a};
2
- //# sourceMappingURL=chunk-PCLBZIT4.mjs.map
1
+ import{a as c}from"./chunk-4CLRAOCB.mjs";import{a as o,b as s,c as t,d as r,e as n,f as i,h as a,i as g}from"./chunk-NNRRPXQF.mjs";var p=class{constructor(e){this.config=e}async getLedgerInfo(){return o({aptosConfig:this.config})}async getChainId(){return(await this.getLedgerInfo()).chain_id}async getBlockByVersion(e){return s({aptosConfig:this.config,...e})}async getBlockByHeight(e){return t({aptosConfig:this.config,...e})}async getTableItem(e){return r({aptosConfig:this.config,...e})}async view(e){return c({aptosConfig:this.config,...e})}async getChainTopUserTransactions(e){return n({aptosConfig:this.config,...e})}async queryIndexer(e){return i({aptosConfig:this.config,...e})}async getIndexerLastSuccessVersion(){return a({aptosConfig:this.config})}async getProcessorStatus(e){return g({aptosConfig:this.config,processorType:e})}};export{p as a};
2
+ //# sourceMappingURL=chunk-DIX5DLNP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l,b as s,c as u,d as c,e as d,f as m,g as U}from"./chunk-VVJEWB26.mjs";import{a as o}from"./chunk-52DBSOFA.mjs";import{b as z}from"./chunk-AOCNYMMX.mjs";var t=class n extends o{constructor(e){super();this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(!(this.values[0]instanceof s)&&this.values[0]!==void 0)throw new Error("Script function arguments only accept u8 vectors");e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let i=z.fromHexInput(e);r=Array.from(i.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type");return new n(r.map(i=>new s(i)))}static U16(e){return new n(e.map(r=>new u(r)))}static U32(e){return new n(e.map(r=>new c(r)))}static U64(e){return new n(e.map(r=>new d(r)))}static U128(e){return new n(e.map(r=>new m(r)))}static U256(e){return new n(e.map(r=>new U(r)))}static Bool(e){return new n(e.map(r=>new l(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),y=new Array;for(let w=0;w<i;w+=1)y.push(r.deserialize(e));return new n(y)}},a=class n extends o{constructor(e){super();this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=this.bcsToBytes().slice(1);t.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},f=class n extends o{constructor(e){super();typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new n(e!=null?new s(e):void 0)}static U16(e){return new n(e!=null?new u(e):void 0)}static U32(e){return new n(e!=null?new c(e):void 0)}static U64(e){return new n(e!=null?new d(e):void 0)}static U128(e){return new n(e!=null?new m(e):void 0)}static U256(e){return new n(e!=null?new U(e):void 0)}static Bool(e){return new n(e!=null?new l(e):void 0)}static MoveString(e){return new n(e!=null?new a(e):void 0)}static deserialize(e,r){let i=t.deserialize(e,r);return new n(i.values[0])}};export{t as a,a as b,f as c};
2
- //# sourceMappingURL=chunk-35ZI4WOQ.mjs.map
1
+ import{a as l,b as s,c as u,d as c,e as d,f as m,g as U}from"./chunk-6RBUXB5I.mjs";import{a as o}from"./chunk-TVRJ3M7B.mjs";import{b as z}from"./chunk-AOCNYMMX.mjs";var t=class n extends o{constructor(e){super();this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(!(this.values[0]instanceof s)&&this.values[0]!==void 0)throw new Error("Script function arguments only accept u8 vectors");e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let i=z.fromHexInput(e);r=Array.from(i.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type");return new n(r.map(i=>new s(i)))}static U16(e){return new n(e.map(r=>new u(r)))}static U32(e){return new n(e.map(r=>new c(r)))}static U64(e){return new n(e.map(r=>new d(r)))}static U128(e){return new n(e.map(r=>new m(r)))}static U256(e){return new n(e.map(r=>new U(r)))}static Bool(e){return new n(e.map(r=>new l(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),y=new Array;for(let w=0;w<i;w+=1)y.push(r.deserialize(e));return new n(y)}},a=class n extends o{constructor(e){super();this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=this.bcsToBytes().slice(1);t.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},f=class n extends o{constructor(e){super();typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new n(e!=null?new s(e):void 0)}static U16(e){return new n(e!=null?new u(e):void 0)}static U32(e){return new n(e!=null?new c(e):void 0)}static U64(e){return new n(e!=null?new d(e):void 0)}static U128(e){return new n(e!=null?new m(e):void 0)}static U256(e){return new n(e!=null?new U(e):void 0)}static Bool(e){return new n(e!=null?new l(e):void 0)}static MoveString(e){return new n(e!=null?new a(e):void 0)}static deserialize(e,r){let i=t.deserialize(e,r);return new n(i.values[0])}};export{t as a,a as b,f as c};
2
+ //# sourceMappingURL=chunk-EB7AI4B4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-C2HDZYYQ.mjs";import{a as g,b as _}from"./chunk-WR5L4STD.mjs";import{a as p,c as b}from"./chunk-TCMSBGBS.mjs";import{b as o}from"./chunk-U7EZI5D5.mjs";import{a as h}from"./chunk-52DBSOFA.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
2
- //# sourceMappingURL=chunk-FB6T6ZQP.mjs.map
1
+ import{a as n}from"./chunk-22CDTJSF.mjs";import{a as g,b as _}from"./chunk-TE7AJKSU.mjs";import{a as p,c as b}from"./chunk-CQJ4WN7M.mjs";import{b as o}from"./chunk-T23OVRNF.mjs";import{a as h}from"./chunk-TVRJ3M7B.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
2
+ //# sourceMappingURL=chunk-EXRFZC3C.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-3JPVQHOR.mjs";import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-WAWBXQ6B.mjs";import{b as c,d as A}from"./chunk-IO2NZ5PR.mjs";import{a as C}from"./chunk-6FBKUTGF.mjs";import{d as w}from"./chunk-YE5B2S5L.mjs";async function v(s){let{aptosConfig:n,options:t}=s;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function D(s){let{aptosConfig:n}=s;return R(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function N(s){let{aptosConfig:n,ledgerVersion:t}=s,{data:o}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return o}async function T(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return o}async function G(s){let{aptosConfig:n,transactionHash:t}=s;try{return(await T({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(o){if(o?.status===404)return!0;throw o}}async function b(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return o}async function W(s){let{aptosConfig:n,transactionHash:t,options:o}=s,r=o?.timeoutSecs??20,u=o?.checkSuccess??!0,a=!0,p=0,e,g,m=200,E=1.5;function d(i){if(!(i instanceof C)||(g=i,i.status!==404&&i.status>=400&&i.status<500))throw i}try{e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(i){d(i)}if(a){let i=Date.now();try{e=await b({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(l){d(l)}p=(Date.now()-i)/1e3}for(;a&&!(p>=r);){try{if(e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction",!a)break}catch(i){d(i)}await h(m),p+=m/1e3,m*=E}if(e===void 0)throw g||new f(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new f(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!u)return e;if(!e.success)throw new y(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function O(s){let{aptosConfig:n,processorType:t}=s,o=BigInt(s.minimumLedgerVersion),r=3e3,u=new Date().getTime(),a=BigInt(-1);for(;a<o;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?a=await x({aptosConfig:n}):a=(await P({aptosConfig:n,processorType:t})).last_success_version,a>=o)break;await h(200)}}var f=class extends Error{constructor(t,o){super(t);this.lastSubmittedTransaction=o}},y=class extends Error{constructor(t,o){super(t);this.transaction=o}};export{v as a,D as b,N as c,T as d,G as e,b as f,W as g,O as h,f as i,y as j};
2
- //# sourceMappingURL=chunk-OQKD5SSG.mjs.map
1
+ import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-NNRRPXQF.mjs";import{a as h}from"./chunk-3JPVQHOR.mjs";import{b as c,d as A}from"./chunk-U2XWRAPL.mjs";import{a as C}from"./chunk-6FBKUTGF.mjs";import{d as w}from"./chunk-YE5B2S5L.mjs";async function v(s){let{aptosConfig:n,options:t}=s;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function D(s){let{aptosConfig:n}=s;return R(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function N(s){let{aptosConfig:n,ledgerVersion:t}=s,{data:o}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return o}async function T(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return o}async function G(s){let{aptosConfig:n,transactionHash:t}=s;try{return(await T({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(o){if(o?.status===404)return!0;throw o}}async function b(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return o}async function W(s){let{aptosConfig:n,transactionHash:t,options:o}=s,r=o?.timeoutSecs??20,u=o?.checkSuccess??!0,a=!0,p=0,e,g,m=200,E=1.5;function d(i){if(!(i instanceof C)||(g=i,i.status!==404&&i.status>=400&&i.status<500))throw i}try{e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(i){d(i)}if(a){let i=Date.now();try{e=await b({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(l){d(l)}p=(Date.now()-i)/1e3}for(;a&&!(p>=r);){try{if(e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction",!a)break}catch(i){d(i)}await h(m),p+=m/1e3,m*=E}if(e===void 0)throw g||new f(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new f(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!u)return e;if(!e.success)throw new y(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function O(s){let{aptosConfig:n,processorType:t}=s,o=BigInt(s.minimumLedgerVersion),r=3e3,u=new Date().getTime(),a=BigInt(-1);for(;a<o;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?a=await x({aptosConfig:n}):a=(await P({aptosConfig:n,processorType:t})).last_success_version,a>=o)break;await h(200)}}var f=class extends Error{constructor(t,o){super(t);this.lastSubmittedTransaction=o}},y=class extends Error{constructor(t,o){super(t);this.transaction=o}};export{v as a,D as b,N as c,T as d,G as e,b as f,W as g,O as h,f as i,y as j};
2
+ //# sourceMappingURL=chunk-FCJLWZWL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ED6PYTNG.mjs";import{b as a}from"./chunk-U7EZI5D5.mjs";import{a as i}from"./chunk-52DBSOFA.mjs";var o=class t extends i{constructor(e,r){super();this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
2
- //# sourceMappingURL=chunk-3FL3NLZ6.mjs.map
1
+ import{a as n}from"./chunk-W4EQGTSE.mjs";import{b as a}from"./chunk-T23OVRNF.mjs";import{a as i}from"./chunk-TVRJ3M7B.mjs";var o=class t extends i{constructor(e,r){super();this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-FFKQCXTQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as j}from"./chunk-U6XKW7OK.mjs";import{a as g,b as I}from"./chunk-6SIZZAWU.mjs";import{d as x}from"./chunk-22CDTJSF.mjs";import{a as E,b as T}from"./chunk-INS2SYOV.mjs";import{i as w,j as K,k as y,m as A,n as b,o as l}from"./chunk-4X4HJL3N.mjs";import{k as S}from"./chunk-S5HG2QUD.mjs";import{b as P}from"./chunk-T23OVRNF.mjs";import{b as h}from"./chunk-TVRJ3M7B.mjs";import{b as u}from"./chunk-AOCNYMMX.mjs";import{a as f}from"./chunk-6IFMQ5AS.mjs";import{jwtDecode as O}from"jwt-decode";import{decode as B}from"base-64";function F(D){let e=D.replace(/-/g,"+").replace(/_/g,"/"),r=e+"==".substring(0,(3-e.length%3)%3);return B(r)}var o=class o{constructor(e){let{address:r,ephemeralKeyPair:t,iss:n,uidKey:a,uidVal:i,aud:s,pepper:p,proofFetcherOrData:c,jwt:d}=e;this.ephemeralKeyPair=t;let z=K(e);this.publicKey=new w(n,z),this.accountAddress=r?P.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=a,this.uidVal=i,this.aud=s,this.jwt=d,c instanceof Promise?(this.proof=c,this.initialize(c)):this.proof=c,this.signingScheme=2;let m=u.fromHexInput(p).toUint8Array();if(m.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=m}async serialize(e){e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),(await this.proof).serialize(e)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),n=e.deserializeFixedBytes(31),a=j.deserialize(e),i=A.deserialize(e);return o.fromJWTAndProof({proofFetcherOrData:i,pepper:n,uidKey:t,jwt:r,ephemeralKeyPair:a})}async bcsToBytes(){let e=new h;return await this.serialize(e),e.toUint8Array()}async bcsToHex(){let e=await this.bcsToBytes();return u.fromHexInput(e)}async initialize(e){try{this.proof=await e}catch{throw new Error("Failed to fetch proof")}}signWithAuthenticator(e){let r=g(e),t=new T(this.sign(r.bcsToBytes())),n=new E(this.publicKey);return new x(n,t)}async waitForProofFetch(){this.proof instanceof Promise&&await this.proof}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair,t=Math.floor(new Date().getTime()/1e3);if(r<t)throw new Error("Ephemeral key pair is expired.");if(this.proof instanceof Promise)throw new Error("Failed to fetch proof.");let n=this.jwt.split(".")[0],a=this.ephemeralKeyPair.publicKey,i=new h;i.serializeFixedBytes(u.fromHexInput(e).toUint8Array()),i.serializeOption(this.proof.proof);let s=I(i.toUint8Array(),"APTOS::TransactionAndProof"),p=this.ephemeralKeyPair.sign(s);return new l({jwtHeader:F(n),openIdSignatureOrZkProof:new y(this.proof),expiryDateSecs:r,ephemeralPublicKey:a,ephemeralSignature:p})}signTransaction(e){let r=g(e);return this.sign(r.bcsToBytes())}signWithOpenIdSignature(e){let[r,t,n]=this.jwt.split("."),a=new b({jwtSignature:n,jwtPayloadJson:t,uidKey:this.uidKey,epkBlinder:this.ephemeralKeyPair.blinder,pepper:this.pepper}),{expiryDateSecs:i}=this.ephemeralKeyPair,s=this.ephemeralKeyPair.publicKey,p=this.ephemeralKeyPair.sign(e);return new l({jwtHeader:r,openIdSignatureOrZkProof:new y(a),expiryDateSecs:i,ephemeralPublicKey:s,ephemeralSignature:p})}verifySignature(e){return!0}static fromBytes(e){return o.deserialize(new f(e))}static fromJWTAndProof(e){let{proofFetcherOrData:r,jwt:t,ephemeralKeyPair:n,pepper:a}=e,i=e.uidKey??"sub",s=O(t),p=s.iss;if(typeof s.aud!="string")throw new Error("aud was not found or an array of values");let c=s.aud,d=s[i];return new o({proofFetcherOrData:r,ephemeralKeyPair:n,iss:p,uidKey:i,uidVal:d,aud:c,pepper:a,jwt:t})}static fromDerivationPath(e,r){return S(e,o.SLIP_0010_SEED,r)}};o.PEPPER_LENGTH=31,o.SLIP_0010_SEED="32 bytes";var H=o;export{H as a};
2
+ //# sourceMappingURL=chunk-GFW5KSAZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/account/KeylessAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { JwtPayload, jwtDecode } from \"jwt-decode\";\nimport { decode } from \"base-64\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\nimport {\n AnyPublicKey,\n AnySignature,\n KeylessPublicKey,\n KeylessSignature,\n OpenIdSignature,\n OpenIdSignatureOrZkProof,\n Signature,\n SignedGroth16Signature,\n computeAddressSeed,\n fromDerivationPath as fromDerivationPathInner,\n} from \"../core/crypto\";\n\nimport { Account } from \"./Account\";\nimport { EphemeralKeyPair } from \"./EphemeralKeyPair\";\nimport { Hex } from \"../core/hex\";\nimport { AccountAuthenticatorSingleKey } from \"../transactions/authenticator/account\";\nimport { Deserializer, Serializer } from \"../bcs\";\nimport { deriveTransactionType, generateSigningMessage } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction } from \"../transactions/types\";\n\nfunction base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n\n // Decode the base64 string using the base-64 library\n const decodedString = decode(paddedBase64);\n\n return decodedString;\n}\n\nexport class KeylessAccount implements Account {\n static readonly PEPPER_LENGTH: number = 31;\n\n static readonly SLIP_0010_SEED: string = \"32 bytes\";\n\n publicKey: KeylessPublicKey;\n\n ephemeralKeyPair: EphemeralKeyPair;\n\n uidKey: string;\n\n uidVal: string;\n\n aud: string;\n\n pepper: Uint8Array;\n\n accountAddress: AccountAddress;\n\n proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;\n\n signingScheme: SigningScheme;\n\n jwt: string;\n\n constructor(args: {\n address?: AccountAddress;\n ephemeralKeyPair: EphemeralKeyPair;\n iss: string;\n uidKey: string;\n uidVal: string;\n aud: string;\n pepper: HexInput;\n proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;\n jwt: string;\n }) {\n const { address, ephemeralKeyPair, iss, uidKey, uidVal, aud, pepper, proofFetcherOrData, jwt } = args;\n this.ephemeralKeyPair = ephemeralKeyPair;\n const addressSeed = computeAddressSeed(args);\n this.publicKey = new KeylessPublicKey(iss, addressSeed);\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n this.uidKey = uidKey;\n this.uidVal = uidVal;\n this.aud = aud;\n this.jwt = jwt;\n if (proofFetcherOrData instanceof Promise) {\n this.proof = proofFetcherOrData;\n this.initialize(proofFetcherOrData);\n } else {\n this.proof = proofFetcherOrData;\n }\n\n this.signingScheme = SigningScheme.SingleKey;\n const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();\n if (pepperBytes.length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper length in bytes should be ${KeylessAccount.PEPPER_LENGTH}`);\n }\n this.pepper = pepperBytes;\n }\n\n async serialize(serializer: Serializer): Promise<void> {\n serializer.serializeStr(this.jwt);\n serializer.serializeStr(this.uidKey);\n serializer.serializeFixedBytes(this.pepper);\n this.ephemeralKeyPair.serialize(serializer);\n const proof = await this.proof;\n proof.serialize(serializer);\n }\n\n static deserialize(deserializer: Deserializer): KeylessAccount {\n const jwt = deserializer.deserializeStr();\n const uidKey = deserializer.deserializeStr();\n const pepper = deserializer.deserializeFixedBytes(31);\n const ephemeralKeyPair = EphemeralKeyPair.deserialize(deserializer);\n const proof = SignedGroth16Signature.deserialize(deserializer);\n return KeylessAccount.fromJWTAndProof({\n proofFetcherOrData: proof,\n pepper,\n uidKey,\n jwt,\n ephemeralKeyPair,\n });\n }\n\n async bcsToBytes(): Promise<Uint8Array> {\n const serializer = new Serializer();\n await this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n async bcsToHex(): Promise<Hex> {\n const bcsBytes = await this.bcsToBytes();\n return Hex.fromHexInput(bcsBytes);\n }\n\n private async initialize(promise: Promise<SignedGroth16Signature>) {\n try {\n this.proof = await promise;\n } catch (error) {\n throw new Error(\"Failed to fetch proof\");\n }\n }\n\n signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {\n const raw = deriveTransactionType(transaction);\n const signature = new AnySignature(this.sign(raw.bcsToBytes()));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n async waitForProofFetch() {\n if (this.proof instanceof Promise) {\n await this.proof;\n }\n }\n\n sign(data: HexInput): Signature {\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const currentTimeInSeconds = Math.floor(new Date().getTime() / 1000);\n if (expiryDateSecs < currentTimeInSeconds) {\n throw new Error(\"Ephemeral key pair is expired.\");\n }\n if (this.proof instanceof Promise) {\n throw new Error(\"Failed to fetch proof.\");\n }\n const jwtHeader = this.jwt.split(\".\")[0];\n const ephemeralPublicKey = this.ephemeralKeyPair.publicKey;\n\n const serializer = new Serializer();\n serializer.serializeFixedBytes(Hex.fromHexInput(data).toUint8Array());\n serializer.serializeOption(this.proof.proof);\n const signMess = generateSigningMessage(serializer.toUint8Array(), \"APTOS::TransactionAndProof\");\n\n const ephemeralSignature = this.ephemeralKeyPair.sign(signMess);\n\n return new KeylessSignature({\n jwtHeader: base64UrlDecode(jwtHeader),\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(this.proof),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n signTransaction(transaction: AnyRawTransaction): Signature {\n const raw = deriveTransactionType(transaction);\n return this.sign(raw.bcsToBytes());\n }\n\n signWithOpenIdSignature(data: HexInput): Signature {\n const [jwtHeader, jwtPayload, jwtSignature] = this.jwt.split(\".\");\n const openIdSig = new OpenIdSignature({\n jwtSignature,\n jwtPayloadJson: jwtPayload,\n uidKey: this.uidKey,\n epkBlinder: this.ephemeralKeyPair.blinder,\n pepper: this.pepper,\n });\n\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const ephemeralPublicKey = this.ephemeralKeyPair.publicKey;\n const ephemeralSignature = this.ephemeralKeyPair.sign(data);\n return new KeylessSignature({\n jwtHeader,\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(openIdSig),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n verifySignature(args: { message: HexInput; signature: Signature }): boolean {\n return true;\n }\n\n static fromJWTAndProof(args: {\n proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper: HexInput;\n uidKey?: string;\n }): KeylessAccount {\n const { proofFetcherOrData, jwt, ephemeralKeyPair, pepper } = args;\n const uidKey = args.uidKey ?? \"sub\";\n\n const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);\n const iss = jwtPayload.iss!;\n if (typeof jwtPayload.aud !== \"string\") {\n throw new Error(\"aud was not found or an array of values\");\n }\n const aud = jwtPayload.aud!;\n const uidVal = jwtPayload[uidKey];\n return new KeylessAccount({\n proofFetcherOrData,\n ephemeralKeyPair,\n iss,\n uidKey,\n uidVal,\n aud,\n pepper,\n jwt,\n });\n }\n\n static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array {\n return fromDerivationPathInner(path, KeylessAccount.SLIP_0010_SEED, seed);\n }\n}\n"],"mappings":"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","names":["jwtDecode","decode","base64UrlDecode","base64Url","base64","paddedBase64","decode","_KeylessAccount","args","address","ephemeralKeyPair","iss","uidKey","uidVal","aud","pepper","proofFetcherOrData","jwt","addressSeed","computeAddressSeed","KeylessPublicKey","AccountAddress","pepperBytes","Hex","serializer","deserializer","EphemeralKeyPair","proof","SignedGroth16Signature","Serializer","bcsBytes","promise","transaction","raw","deriveTransactionType","signature","AnySignature","publicKey","AnyPublicKey","AccountAuthenticatorSingleKey","data","expiryDateSecs","currentTimeInSeconds","jwtHeader","ephemeralPublicKey","signMess","generateSigningMessage","ephemeralSignature","KeylessSignature","OpenIdSignatureOrZkProof","jwtPayload","jwtSignature","openIdSig","OpenIdSignature","jwtDecode","path","seed","fromDerivationPath","KeylessAccount"]}
1
+ {"version":3,"sources":["../../src/account/KeylessAccount.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { JwtPayload, jwtDecode } from \"jwt-decode\";\nimport { decode } from \"base-64\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\nimport {\n AnyPublicKey,\n AnySignature,\n KeylessPublicKey,\n KeylessSignature,\n OpenIdSignature,\n OpenIdSignatureOrZkProof,\n Signature,\n SignedGroth16Signature,\n computeAddressSeed,\n fromDerivationPath as fromDerivationPathInner,\n} from \"../core/crypto\";\n\nimport { Account } from \"./Account\";\nimport { EphemeralKeyPair } from \"./EphemeralKeyPair\";\nimport { Hex } from \"../core/hex\";\nimport { AccountAuthenticatorSingleKey } from \"../transactions/authenticator/account\";\nimport { Deserializer, Serializer } from \"../bcs\";\nimport { deriveTransactionType, generateSigningMessage } from \"../transactions/transactionBuilder/signingMessage\";\nimport { AnyRawTransaction } from \"../transactions/types\";\n\nfunction base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n\n // Decode the base64 string using the base-64 library\n const decodedString = decode(paddedBase64);\n\n return decodedString;\n}\n\nexport class KeylessAccount implements Account {\n static readonly PEPPER_LENGTH: number = 31;\n\n static readonly SLIP_0010_SEED: string = \"32 bytes\";\n\n publicKey: KeylessPublicKey;\n\n ephemeralKeyPair: EphemeralKeyPair;\n\n uidKey: string;\n\n uidVal: string;\n\n aud: string;\n\n pepper: Uint8Array;\n\n accountAddress: AccountAddress;\n\n proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;\n\n signingScheme: SigningScheme;\n\n jwt: string;\n\n constructor(args: {\n address?: AccountAddress;\n ephemeralKeyPair: EphemeralKeyPair;\n iss: string;\n uidKey: string;\n uidVal: string;\n aud: string;\n pepper: HexInput;\n proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;\n jwt: string;\n }) {\n const { address, ephemeralKeyPair, iss, uidKey, uidVal, aud, pepper, proofFetcherOrData, jwt } = args;\n this.ephemeralKeyPair = ephemeralKeyPair;\n const addressSeed = computeAddressSeed(args);\n this.publicKey = new KeylessPublicKey(iss, addressSeed);\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n this.uidKey = uidKey;\n this.uidVal = uidVal;\n this.aud = aud;\n this.jwt = jwt;\n if (proofFetcherOrData instanceof Promise) {\n this.proof = proofFetcherOrData;\n this.initialize(proofFetcherOrData);\n } else {\n this.proof = proofFetcherOrData;\n }\n\n this.signingScheme = SigningScheme.SingleKey;\n const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();\n if (pepperBytes.length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper length in bytes should be ${KeylessAccount.PEPPER_LENGTH}`);\n }\n this.pepper = pepperBytes;\n }\n\n async serialize(serializer: Serializer): Promise<void> {\n serializer.serializeStr(this.jwt);\n serializer.serializeStr(this.uidKey);\n serializer.serializeFixedBytes(this.pepper);\n this.ephemeralKeyPair.serialize(serializer);\n const proof = await this.proof;\n proof.serialize(serializer);\n }\n\n static deserialize(deserializer: Deserializer): KeylessAccount {\n const jwt = deserializer.deserializeStr();\n const uidKey = deserializer.deserializeStr();\n const pepper = deserializer.deserializeFixedBytes(31);\n const ephemeralKeyPair = EphemeralKeyPair.deserialize(deserializer);\n const proof = SignedGroth16Signature.deserialize(deserializer);\n return KeylessAccount.fromJWTAndProof({\n proofFetcherOrData: proof,\n pepper,\n uidKey,\n jwt,\n ephemeralKeyPair,\n });\n }\n\n async bcsToBytes(): Promise<Uint8Array> {\n const serializer = new Serializer();\n await this.serialize(serializer);\n return serializer.toUint8Array();\n }\n\n async bcsToHex(): Promise<Hex> {\n const bcsBytes = await this.bcsToBytes();\n return Hex.fromHexInput(bcsBytes);\n }\n\n private async initialize(promise: Promise<SignedGroth16Signature>) {\n try {\n this.proof = await promise;\n } catch (error) {\n throw new Error(\"Failed to fetch proof\");\n }\n }\n\n signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey {\n const raw = deriveTransactionType(transaction);\n const signature = new AnySignature(this.sign(raw.bcsToBytes()));\n const publicKey = new AnyPublicKey(this.publicKey);\n return new AccountAuthenticatorSingleKey(publicKey, signature);\n }\n\n async waitForProofFetch() {\n if (this.proof instanceof Promise) {\n await this.proof;\n }\n }\n\n sign(data: HexInput): Signature {\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const currentTimeInSeconds = Math.floor(new Date().getTime() / 1000);\n if (expiryDateSecs < currentTimeInSeconds) {\n throw new Error(\"Ephemeral key pair is expired.\");\n }\n if (this.proof instanceof Promise) {\n throw new Error(\"Failed to fetch proof.\");\n }\n const jwtHeader = this.jwt.split(\".\")[0];\n const ephemeralPublicKey = this.ephemeralKeyPair.publicKey;\n\n const serializer = new Serializer();\n serializer.serializeFixedBytes(Hex.fromHexInput(data).toUint8Array());\n serializer.serializeOption(this.proof.proof);\n const signMess = generateSigningMessage(serializer.toUint8Array(), \"APTOS::TransactionAndProof\");\n\n const ephemeralSignature = this.ephemeralKeyPair.sign(signMess);\n\n return new KeylessSignature({\n jwtHeader: base64UrlDecode(jwtHeader),\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(this.proof),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n signTransaction(transaction: AnyRawTransaction): Signature {\n const raw = deriveTransactionType(transaction);\n return this.sign(raw.bcsToBytes());\n }\n\n signWithOpenIdSignature(data: HexInput): Signature {\n const [jwtHeader, jwtPayload, jwtSignature] = this.jwt.split(\".\");\n const openIdSig = new OpenIdSignature({\n jwtSignature,\n jwtPayloadJson: jwtPayload,\n uidKey: this.uidKey,\n epkBlinder: this.ephemeralKeyPair.blinder,\n pepper: this.pepper,\n });\n\n const { expiryDateSecs } = this.ephemeralKeyPair;\n const ephemeralPublicKey = this.ephemeralKeyPair.publicKey;\n const ephemeralSignature = this.ephemeralKeyPair.sign(data);\n return new KeylessSignature({\n jwtHeader,\n openIdSignatureOrZkProof: new OpenIdSignatureOrZkProof(openIdSig),\n expiryDateSecs,\n ephemeralPublicKey,\n ephemeralSignature,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n verifySignature(args: { message: HexInput; signature: Signature }): boolean {\n return true;\n }\n\n static fromBytes(bytes: Uint8Array): KeylessAccount {\n return KeylessAccount.deserialize(new Deserializer(bytes));\n }\n\n static fromJWTAndProof(args: {\n proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper: HexInput;\n uidKey?: string;\n }): KeylessAccount {\n const { proofFetcherOrData, jwt, ephemeralKeyPair, pepper } = args;\n const uidKey = args.uidKey ?? \"sub\";\n\n const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);\n const iss = jwtPayload.iss!;\n if (typeof jwtPayload.aud !== \"string\") {\n throw new Error(\"aud was not found or an array of values\");\n }\n const aud = jwtPayload.aud!;\n const uidVal = jwtPayload[uidKey];\n return new KeylessAccount({\n proofFetcherOrData,\n ephemeralKeyPair,\n iss,\n uidKey,\n uidVal,\n aud,\n pepper,\n jwt,\n });\n }\n\n static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array {\n return fromDerivationPathInner(path, KeylessAccount.SLIP_0010_SEED, seed);\n }\n}\n"],"mappings":"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","names":["jwtDecode","decode","base64UrlDecode","base64Url","base64","paddedBase64","decode","_KeylessAccount","args","address","ephemeralKeyPair","iss","uidKey","uidVal","aud","pepper","proofFetcherOrData","jwt","addressSeed","computeAddressSeed","KeylessPublicKey","AccountAddress","pepperBytes","Hex","serializer","deserializer","EphemeralKeyPair","proof","SignedGroth16Signature","Serializer","bcsBytes","promise","transaction","raw","deriveTransactionType","signature","AnySignature","publicKey","AnyPublicKey","AccountAuthenticatorSingleKey","data","expiryDateSecs","currentTimeInSeconds","jwtHeader","ephemeralPublicKey","signMess","generateSigningMessage","ephemeralSignature","KeylessSignature","OpenIdSignatureOrZkProof","jwtPayload","jwtSignature","openIdSig","OpenIdSignature","bytes","Deserializer","jwtDecode","path","seed","fromDerivationPath","KeylessAccount"]}
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-COLCWAPL.mjs";import{e as u}from"./chunk-C2HDZYYQ.mjs";import{a as o,b as r}from"./chunk-QEKSGA7S.mjs";var g=class c{constructor(t){let{multiKey:i,signers:s}=t;this.publicKey=i,this.signers=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let e=[];for(let n of s)e.push(this.publicKey.getIndex(n.publicKey));this.signaturesBitmap=this.publicKey.createBitmap({bits:e})}static fromPublicKeysAndSigners(t){let{publicKeys:i,signaturesRequired:s,signers:e}=t,n=new o({publicKeys:i,signaturesRequired:s});return new c({multiKey:n,signers:e})}static isMultiKeySigner(t){return t instanceof c}signWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}async waitForProofFetch(){let t=this.signers.filter(i=>i instanceof a);await Promise.all(t.filter(i=>i.proof instanceof Promise).map(i=>i.proof))}sign(t){let i=[];for(let s of this.signers)i.push(s.sign(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}signTransaction(t){let i=[];for(let s of this.signers)i.push(s.signTransaction(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}verifySignature(t){return!0}};export{g as a};
2
- //# sourceMappingURL=chunk-VG2J3UTS.mjs.map
1
+ import{a}from"./chunk-GFW5KSAZ.mjs";import{e as u}from"./chunk-22CDTJSF.mjs";import{a as o,b as r}from"./chunk-MDENCOVF.mjs";var g=class c{constructor(t){let{multiKey:i,signers:s}=t;this.publicKey=i,this.signers=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let e=[];for(let n of s)e.push(this.publicKey.getIndex(n.publicKey));this.signaturesBitmap=this.publicKey.createBitmap({bits:e})}static fromPublicKeysAndSigners(t){let{publicKeys:i,signaturesRequired:s,signers:e}=t,n=new o({publicKeys:i,signaturesRequired:s});return new c({multiKey:n,signers:e})}static isMultiKeySigner(t){return t instanceof c}signWithAuthenticator(t){return new u(this.publicKey,this.signTransaction(t))}async waitForProofFetch(){let t=this.signers.filter(i=>i instanceof a);await Promise.all(t.filter(i=>i.proof instanceof Promise).map(i=>i.proof))}sign(t){let i=[];for(let s of this.signers)i.push(s.sign(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}signTransaction(t){let i=[];for(let s of this.signers)i.push(s.signTransaction(t));return new r({signatures:i,bitmap:this.signaturesBitmap})}verifySignature(t){return!0}};export{g as a};
2
+ //# sourceMappingURL=chunk-GY5C3NFK.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-U7EZI5D5.mjs";import{sha3_256 as n}from"@noble/hashes/sha3";var d=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,254]);return new c(n(o))},f=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,255]);return new c(n(o))},a=(e,r,t)=>{let s=`${r}::${t}`;return d(e,s)};export{d as a,f as b,a as c};
2
- //# sourceMappingURL=chunk-XI4LX4EC.mjs.map
1
+ import{b as c}from"./chunk-T23OVRNF.mjs";import{sha3_256 as n}from"@noble/hashes/sha3";var d=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,254]);return new c(n(o))},f=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,255]);return new c(n(o))},a=(e,r,t)=>{let s=`${r}::${t}`;return d(e,s)};export{d as a,f as b,a as c};
2
+ //# sourceMappingURL=chunk-HGZGTBA4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6FBKUTGF.mjs";import{a as R}from"./chunk-CFJEOZMV.mjs";var c={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"};async function l(s,i){let{url:u,method:n,body:d,contentType:p,params:t,overrides:e,originMethod:o}=s,r={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${R}`,"content-type":p??"application/json","x-aptos-typescript-sdk-origin-method":o};return e?.AUTH_TOKEN&&(r.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(r.Authorization=`Bearer ${e?.API_KEY}`),i.provider({url:u,method:n,body:d,params:t,headers:r,overrides:e})}async function N(s,i,u){let{url:n,path:d}=s,p=d?`${n}/${d}`:n,t=await l({...s,url:p},i.client),e={status:t.status,statusText:t.statusText,data:t.data,headers:t.headers,config:t.config,request:t.request,url:p};if(e.status===401)throw new a(s,e,`Error: ${e.data}`);if(u==="Indexer"){let r=e.data;if(r.errors)throw new a(s,e,`Indexer error: ${r.errors[0].message}`??`Indexer unhandled Error ${t.status} : ${t.statusText}`);e.data=r.data}if(e.status>=200&&e.status<300)return e;if(e.status>=500)throw new a(s,e,`${t.data}`);if(i.isPepperServiceRequest(n))throw new a(s,e,`${t.data}`);let o;throw e&&e.data&&"message"in e.data&&"error_code"in e.data?o=JSON.stringify(e.data):e.status in c?o=c[e.status]:o=`Unhandled Error ${e.status} : ${e.statusText}`,new a(s,e,`${u} error: ${o}`)}export{l as a,N as b};
2
- //# sourceMappingURL=chunk-JP6UNRLO.mjs.map
1
+ import{a}from"./chunk-6FBKUTGF.mjs";import{a as R}from"./chunk-DDZGSI33.mjs";var c={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"};async function l(s,i){let{url:u,method:n,body:d,contentType:p,params:t,overrides:e,originMethod:o}=s,r={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${R}`,"content-type":p??"application/json","x-aptos-typescript-sdk-origin-method":o};return e?.AUTH_TOKEN&&(r.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(r.Authorization=`Bearer ${e?.API_KEY}`),i.provider({url:u,method:n,body:d,params:t,headers:r,overrides:e})}async function N(s,i,u){let{url:n,path:d}=s,p=d?`${n}/${d}`:n,t=await l({...s,url:p},i.client),e={status:t.status,statusText:t.statusText,data:t.data,headers:t.headers,config:t.config,request:t.request,url:p};if(e.status===401)throw new a(s,e,`Error: ${e.data}`);if(u==="Indexer"){let r=e.data;if(r.errors)throw new a(s,e,`Indexer error: ${r.errors[0].message}`??`Indexer unhandled Error ${t.status} : ${t.statusText}`);e.data=r.data}if(e.status>=200&&e.status<300)return e;if(e.status>=500)throw new a(s,e,`${t.data}`);if(i.isPepperServiceRequest(n))throw new a(s,e,`${t.data}`);let o;throw e&&e.data&&"message"in e.data&&"error_code"in e.data?o=JSON.stringify(e.data):e.status in c?o=c[e.status]:o=`Unhandled Error ${e.status} : ${e.statusText}`,new a(s,e,`${u} error: ${o}`)}export{l as a,N as b};
2
+ //# sourceMappingURL=chunk-HWTQJARL.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as a}from"./chunk-WAWBXQ6B.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";import{b as p}from"./chunk-U7EZI5D5.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
- //# sourceMappingURL=chunk-6DA64TSG.mjs.map
1
+ import{f as a}from"./chunk-NNRRPXQF.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";import{b as p}from"./chunk-T23OVRNF.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
+ //# sourceMappingURL=chunk-IHCL7UWQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ASRAJ24P.mjs";import{h as t}from"./chunk-OQKD5SSG.mjs";var r=class{constructor(o){this.config=o}async fundAccount(o){let n=await i({aptosConfig:this.config,...o});return o.options?.waitForIndexer!==!1&&await t({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version)}),n}};export{r as a};
2
- //# sourceMappingURL=chunk-P2JP6PSD.mjs.map
1
+ import{a as i}from"./chunk-WXRK2AKZ.mjs";import{h as t}from"./chunk-FCJLWZWL.mjs";var r=class{constructor(o){this.config=o}async fundAccount(o){let n=await i({aptosConfig:this.config,...o});return o.options?.waitForIndexer!==!1&&await t({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version)}),n}};export{r as a};
2
+ //# sourceMappingURL=chunk-IJBPBDYK.mjs.map
@@ -1,2 +1,2 @@
1
- import{i as o,o as l}from"./chunk-AE7X4LVG.mjs";import{a,c}from"./chunk-B645DPPF.mjs";import{a as n,c as s}from"./chunk-TCMSBGBS.mjs";import{a as p}from"./chunk-KX5ESZO7.mjs";import{b}from"./chunk-HZC6A3QL.mjs";import{a as y}from"./chunk-JYFKKB34.mjs";var f=class t extends b{constructor(e){super();if(this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof u?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return y.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},u=class t extends p{constructor(e){super();if(this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{f as a,u as b};
2
- //# sourceMappingURL=chunk-7YMBWSKN.mjs.map
1
+ import{i as o,o as l}from"./chunk-4X4HJL3N.mjs";import{a,c}from"./chunk-7FNHL6LU.mjs";import{a as n,c as s}from"./chunk-CQJ4WN7M.mjs";import{b}from"./chunk-COW5IGYC.mjs";import{a as p}from"./chunk-STYDBDYL.mjs";import{a as y}from"./chunk-7STYQ5ZE.mjs";var f=class t extends b{constructor(e){super();if(this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof u?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return y.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},u=class t extends p{constructor(e){super();if(this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{f as a,u as b};
2
+ //# sourceMappingURL=chunk-INS2SYOV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-BIU5KNPT.mjs";import{a as m}from"./chunk-D2DIZHP3.mjs";import{f as A}from"./chunk-WAWBXQ6B.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";import{b as w}from"./chunk-U7EZI5D5.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 E(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[n,t,...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(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null,randomnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),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:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
2
- //# sourceMappingURL=chunk-6YDD6LGX.mjs.map
1
+ import{a as g}from"./chunk-4CLRAOCB.mjs";import{a as m}from"./chunk-MP5ROJ2O.mjs";import{f as A}from"./chunk-NNRRPXQF.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";import{b as w}from"./chunk-T23OVRNF.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 E(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[n,t,...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(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null,randomnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),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:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
2
+ //# sourceMappingURL=chunk-IOPG2AU7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as s,c as r,d as i,e as o,f as a,g as c,h as p,i as d,j as g,k as u,l as A,m as y,n as l,o as m,p as T,q as f,r as I,s as C,t as O,u as P,v as D}from"./chunk-VSWIMQAB.mjs";import{a as e}from"./chunk-GVZZTEYV.mjs";var V=class{constructor(t){this.config=t}async getCollectionData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),p({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),n({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),s({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),r({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return o({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return d({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return g({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return u({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return A({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return y({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return l({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return m({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return T({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return f({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return I({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return C({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return O({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return P({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return D({aptosConfig:this.config,...t})}};export{V as a};
2
- //# sourceMappingURL=chunk-HZFOKUQZ.mjs.map
1
+ import{a as e}from"./chunk-C5VCRT5G.mjs";import{a as n,b as s,c as r,d as i,e as o,f as a,g as c,h as p,i as d,j as g,k as u,l as A,m as y,n as l,o as m,p as T,q as f,r as I,s as C,t as O,u as P,v as D}from"./chunk-ACFXTTRJ.mjs";var V=class{constructor(t){this.config=t}async getCollectionData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),p({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),n({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),s({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),r({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return o({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return d({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return g({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return u({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return A({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return y({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return l({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return m({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return T({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return f({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return I({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return C({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return O({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return P({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return D({aptosConfig:this.config,...t})}};export{V as a};
2
+ //# sourceMappingURL=chunk-JH7BYJ4C.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-YGWIVUJP.mjs";import{a as A}from"./chunk-YIIDPNGQ.mjs";import{a as T}from"./chunk-I657KZIO.mjs";import{a as y}from"./chunk-MUEDPI2Z.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-D2DIZHP3.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-OQKD5SSG.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-VSPQRNEG.mjs.map
1
+ import{a as y}from"./chunk-UKOX55K4.mjs";import{a as d}from"./chunk-NSF64TWI.mjs";import{a as A}from"./chunk-RIJEDN6X.mjs";import{a as T}from"./chunk-4EBHV35B.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-MP5ROJ2O.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-FCJLWZWL.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-KXZSBE7W.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as n}from"./chunk-WAWBXQ6B.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";import{b as s}from"./chunk-U7EZI5D5.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
- //# sourceMappingURL=chunk-2OTMSEHI.mjs.map
1
+ import{f as n}from"./chunk-NNRRPXQF.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";import{b as s}from"./chunk-T23OVRNF.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
+ //# sourceMappingURL=chunk-LYUXOW2M.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u,b as l}from"./chunk-7YMBWSKN.mjs";import{a as f}from"./chunk-KX5ESZO7.mjs";import{b as g}from"./chunk-HZC6A3QL.mjs";import{a as m}from"./chunk-JYFKKB34.mjs";function p(y){let o=y;return o-=o>>1&1431655765,o=(o&858993459)+(o>>2&858993459),(o+(o>>4)&252645135)*16843009>>24}var d=class y extends g{constructor(e){super();let{publicKeys:i,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(i.length<t)throw new Error(`Provided ${i.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=i.map(r=>r instanceof u?r:new u(r)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let i=e.deserializeVector(u),t=e.deserializeU8();return new y({publicKeys:i,signaturesRequired:t})}createBitmap(e){let{bits:i}=e,t=128,r=new Uint8Array([0,0,0,0]),s=new Set;return i.forEach((n,c)=>{if(c+1>this.publicKeys.length)throw new Error(`Signature index ${c+1} is out of public keys range, ${this.publicKeys.length}.`);if(s.has(n))throw new Error(`Duplicate bit ${n} detected.`);s.add(n);let h=Math.floor(n/8),b=r[h];b|=t>>n%8,r[h]=b}),r}getIndex(e){let i=e instanceof u?e:new u(e),t=this.publicKeys.findIndex(r=>r.toString()===i.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},a=class a extends f{constructor(e){super();let{signatures:i,bitmap:t}=e;if(i.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=i.map(s=>s instanceof l?s:new l(s)),!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}let r=this.bitmap.reduce((s,n)=>s+p(n),0);if(r!==this.signatures.length)throw new Error(`Expecting ${r} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:i}=e,t=128,r=new Uint8Array([0,0,0,0]),s=new Set;return i.forEach(n=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(s.has(n))throw new Error("Duplicate bits detected.");s.add(n);let c=Math.floor(n/8),h=r[c];h|=t>>n%8,r[c]=h}),r}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let i=e.deserializeBytes(),t=i.reduce((s,n)=>s+p(n),0),r=[];for(let s=0;s<t;s+=1){let n=l.deserialize(e);r.push(n)}return new a({signatures:r,bitmap:i})}};a.BITMAP_LEN=4,a.MAX_SIGNATURES_SUPPORTED=a.BITMAP_LEN*8;var A=a;export{d as a,A as b};
2
- //# sourceMappingURL=chunk-QEKSGA7S.mjs.map
1
+ import{a as u,b as l}from"./chunk-INS2SYOV.mjs";import{b as g}from"./chunk-COW5IGYC.mjs";import{a as f}from"./chunk-STYDBDYL.mjs";import{a as m}from"./chunk-7STYQ5ZE.mjs";function p(y){let o=y;return o-=o>>1&1431655765,o=(o&858993459)+(o>>2&858993459),(o+(o>>4)&252645135)*16843009>>24}var d=class y extends g{constructor(e){super();let{publicKeys:i,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(i.length<t)throw new Error(`Provided ${i.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=i.map(r=>r instanceof u?r:new u(r)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let i=e.deserializeVector(u),t=e.deserializeU8();return new y({publicKeys:i,signaturesRequired:t})}createBitmap(e){let{bits:i}=e,t=128,r=new Uint8Array([0,0,0,0]),s=new Set;return i.forEach((n,c)=>{if(c+1>this.publicKeys.length)throw new Error(`Signature index ${c+1} is out of public keys range, ${this.publicKeys.length}.`);if(s.has(n))throw new Error(`Duplicate bit ${n} detected.`);s.add(n);let h=Math.floor(n/8),b=r[h];b|=t>>n%8,r[h]=b}),r}getIndex(e){let i=e instanceof u?e:new u(e),t=this.publicKeys.findIndex(r=>r.toString()===i.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},a=class a extends f{constructor(e){super();let{signatures:i,bitmap:t}=e;if(i.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=i.map(s=>s instanceof l?s:new l(s)),!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}let r=this.bitmap.reduce((s,n)=>s+p(n),0);if(r!==this.signatures.length)throw new Error(`Expecting ${r} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:i}=e,t=128,r=new Uint8Array([0,0,0,0]),s=new Set;return i.forEach(n=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(s.has(n))throw new Error("Duplicate bits detected.");s.add(n);let c=Math.floor(n/8),h=r[c];h|=t>>n%8,r[c]=h}),r}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let i=e.deserializeBytes(),t=i.reduce((s,n)=>s+p(n),0),r=[];for(let s=0;s<t;s+=1){let n=l.deserialize(e);r.push(n)}return new a({signatures:r,bitmap:i})}};a.BITMAP_LEN=4,a.MAX_SIGNATURES_SUPPORTED=a.BITMAP_LEN*8;var A=a;export{d as a,A as b};
2
+ //# sourceMappingURL=chunk-MDENCOVF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-52DBSOFA.mjs";var r=class t extends e{constructor(i){super();this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
2
- //# sourceMappingURL=chunk-RM7D2ITN.mjs.map
1
+ import{a as e}from"./chunk-TVRJ3M7B.mjs";var r=class t extends e{constructor(i){super();this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
2
+ //# sourceMappingURL=chunk-MGOHPDX4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g,f as d,g as b,i as S}from"./chunk-SQNDWIVJ.mjs";import{a as C}from"./chunk-SC7NXRMV.mjs";import{b as f}from"./chunk-UMFYNNCG.mjs";import{a as P}from"./chunk-YMVFNEBO.mjs";import{a as w}from"./chunk-VG2J3UTS.mjs";import{a as I}from"./chunk-COLCWAPL.mjs";import{d as l}from"./chunk-S5YUB2BI.mjs";import{a as T}from"./chunk-5GIWRESN.mjs";import{c as A,m as s}from"./chunk-Q225PZMV.mjs";import{a as r}from"./chunk-35ZI4WOQ.mjs";import{b as y}from"./chunk-VVJEWB26.mjs";import{b as p}from"./chunk-U7EZI5D5.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.signWithAuthenticator(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 f({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 f({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 A,s.u8(),new A,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-D2DIZHP3.mjs.map
1
+ import{a as g,f as d,g as b,i as S}from"./chunk-WL4HOO3M.mjs";import{a as C}from"./chunk-XM3VKHID.mjs";import{b as f}from"./chunk-SEJ2XNM7.mjs";import{a as P}from"./chunk-6LTGQWJQ.mjs";import{a as w}from"./chunk-GY5C3NFK.mjs";import{a as I}from"./chunk-GFW5KSAZ.mjs";import{d as l}from"./chunk-6SIZZAWU.mjs";import{a as T}from"./chunk-NUR3TCTI.mjs";import{c as A,m as s}from"./chunk-3VGX3TXH.mjs";import{a as r}from"./chunk-EB7AI4B4.mjs";import{b as y}from"./chunk-6RBUXB5I.mjs";import{b as p}from"./chunk-T23OVRNF.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.signWithAuthenticator(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 f({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 f({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 A,s.u8(),new A,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-MP5ROJ2O.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-52DBSOFA.mjs";var r=class a extends i{constructor(e){super();this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let s=e.deserializeU8();return new a(s)}};export{r as a};
2
- //# sourceMappingURL=chunk-MRCVSUJQ.mjs.map
1
+ import{a as i}from"./chunk-TVRJ3M7B.mjs";var r=class a extends i{constructor(e){super();this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let s=e.deserializeU8();return new a(s)}};export{r as a};
2
+ //# sourceMappingURL=chunk-MWUJCP27.mjs.map
@@ -1,2 +1,2 @@
1
- import{m as g,v as a}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-IO2NZ5PR.mjs";import{b as p,c}from"./chunk-UMFYNNCG.mjs";async function h(o){let{aptosConfig:t}=o,{data:e}=await n({aptosConfig:t,originMethod:"getLedgerInfo",path:""});return e}async function l(o){let{aptosConfig:t,ledgerVersion:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByVersion",path:`blocks/by_version/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function C(o){let{aptosConfig:t,blockHeight:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByHeight",path:`blocks/by_height/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function m(o){let{aptosConfig:t,handle:e,data:s,options:r}=o;return(await p({aptosConfig:t,originMethod:"getTableItem",path:`tables/${e}/item`,params:{ledger_version:r?.ledgerVersion},body:s})).data}async function T(o){let{aptosConfig:t,limit:e}=o;return(await i({aptosConfig:t,query:{query:g,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function i(o){let{aptosConfig:t,query:e,originMethod:s}=o,{data:r}=await c({aptosConfig:t,originMethod:s??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function f(o){let{aptosConfig:t}=o;return(await i({aptosConfig:t,query:{query:a},originMethod:"getProcessorStatuses"})).processor_status}async function q(o){let t=await f({aptosConfig:o.aptosConfig});return BigInt(t[0].last_success_version)}async function b(o){let{aptosConfig:t,processorType:e}=o;return(await i({aptosConfig:t,query:{query:a,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{h as a,l as b,C as c,m as d,T as e,i as f,f as g,q as h,b as i};
2
- //# sourceMappingURL=chunk-WAWBXQ6B.mjs.map
1
+ import{m as g,v as a}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-U2XWRAPL.mjs";import{b as p,c}from"./chunk-SEJ2XNM7.mjs";async function h(o){let{aptosConfig:t}=o,{data:e}=await n({aptosConfig:t,originMethod:"getLedgerInfo",path:""});return e}async function l(o){let{aptosConfig:t,ledgerVersion:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByVersion",path:`blocks/by_version/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function C(o){let{aptosConfig:t,blockHeight:e,options:s}=o,{data:r}=await n({aptosConfig:t,originMethod:"getBlockByHeight",path:`blocks/by_height/${e}`,params:{with_transactions:s?.withTransactions}});return r}async function m(o){let{aptosConfig:t,handle:e,data:s,options:r}=o;return(await p({aptosConfig:t,originMethod:"getTableItem",path:`tables/${e}/item`,params:{ledger_version:r?.ledgerVersion},body:s})).data}async function T(o){let{aptosConfig:t,limit:e}=o;return(await i({aptosConfig:t,query:{query:g,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function i(o){let{aptosConfig:t,query:e,originMethod:s}=o,{data:r}=await c({aptosConfig:t,originMethod:s??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function f(o){let{aptosConfig:t}=o;return(await i({aptosConfig:t,query:{query:a},originMethod:"getProcessorStatuses"})).processor_status}async function q(o){let t=await f({aptosConfig:o.aptosConfig});return BigInt(t[0].last_success_version)}async function b(o){let{aptosConfig:t,processorType:e}=o;return(await i({aptosConfig:t,query:{query:a,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{h as a,l as b,C as c,m as d,T as e,i as f,f as g,q as h,b as i};
2
+ //# sourceMappingURL=chunk-NNRRPXQF.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-NKSAU5OX.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
- //# sourceMappingURL=chunk-YGWIVUJP.mjs.map
1
+ import{c as a}from"./chunk-3AC5TPYW.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
+ //# sourceMappingURL=chunk-NSF64TWI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u,b as r}from"./chunk-35ZI4WOQ.mjs";import{e as t}from"./chunk-VVJEWB26.mjs";import{b as o}from"./chunk-U7EZI5D5.mjs";import{a as i}from"./chunk-52DBSOFA.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
- //# sourceMappingURL=chunk-5GIWRESN.mjs.map
1
+ import{a as u,b as r}from"./chunk-EB7AI4B4.mjs";import{e as t}from"./chunk-6RBUXB5I.mjs";import{b as o}from"./chunk-T23OVRNF.mjs";import{a as i}from"./chunk-TVRJ3M7B.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
+ //# sourceMappingURL=chunk-NUR3TCTI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-T7TIIAWK.mjs";import{c as A}from"./chunk-IVBYTTN7.mjs";import{c as I}from"./chunk-SC7NXRMV.mjs";import{n as p}from"./chunk-Q225PZMV.mjs";import{a as o,b as S,c as T}from"./chunk-35ZI4WOQ.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-VVJEWB26.mjs";import{b as U}from"./chunk-U7EZI5D5.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await I({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(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 f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(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 f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(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 l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(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 S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(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 m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof p){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
- //# sourceMappingURL=chunk-QFK75K2K.mjs.map
1
+ import{c as A}from"./chunk-PFFAQZHT.mjs";import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-VLRFXWPH.mjs";import{c as I}from"./chunk-XM3VKHID.mjs";import{n as p}from"./chunk-3VGX3TXH.mjs";import{a as o,b as S,c as T}from"./chunk-EB7AI4B4.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-6RBUXB5I.mjs";import{b as U}from"./chunk-T23OVRNF.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await I({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(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 f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(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 f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(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 l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(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 S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(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 m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof p){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
+ //# sourceMappingURL=chunk-OGOHKIIA.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as l,c as f,d as x,e as v,f as U,g as A,h as P,i as C,j as y,k as E,l as b,m as I,n as G,o as M}from"./chunk-Q225PZMV.mjs";import{a as d}from"./chunk-RM7D2ITN.mjs";import{b as w}from"./chunk-U7EZI5D5.mjs";function N(e){return!!e.match(/^[_a-zA-Z0-9]+$/)}function V(e){return!!e.match(/\s/)}function $(e){return!!e.match(/^T[0-9]+$/)}function F(e,n){let i=n;for(;i<e.length;i+=1){let c=e[i];if(!V(c))break}return i}var S=(t=>(t.InvalidTypeTag="unknown type",t.UnexpectedGenericType="unexpected generic type",t.UnexpectedTypeArgumentClose="unexpected '>'",t.UnexpectedWhitespaceCharacter="unexpected whitespace character",t.UnexpectedComma="unexpected ','",t.TypeArgumentCountMismatch="type argument count doesn't match expected amount",t.MissingTypeArgumentClose="no matching '>' for '<'",t.UnexpectedPrimitiveTypeArguments="primitive types not expected to have type arguments",t.UnexpectedVectorTypeArgumentCount="vector type expected to have exactly one type argument",t.UnexpectedStructFormat="unexpected struct format, must be of the form 0xaddress::module_name::struct_name",t.InvalidModuleNameCharacter="module name must only contain alphanumeric or '_' characters",t.InvalidStructNameCharacter="struct name must only contain alphanumeric or '_' characters",t))(S||{}),r=class extends Error{constructor(n,i){super(`Failed to parse typeTag '${n}', ${i}`)}};function Z(e,n){let i=n?.allowGenerics??!1,c=[],o=[],p=[],T=0,a="",u=1;for(;T<e.length;){let g=e[T];if(g==="<")c.push({savedExpectedTypes:u,savedStr:a,savedTypes:p}),a="",p=[],u=1;else if(g===">"){if(a!==""){let _=m(a,o,i);p.push(_)}let s=c.pop();if(s===void 0)throw new r(e,"unexpected '>'");if(u!==p.length)throw new r(e,"type argument count doesn't match expected amount");let{savedStr:h,savedTypes:t,savedExpectedTypes:W}=s;o=p,p=t,a=h,u=W}else if(g===","){if(a.length!==0){let s=m(a,o,i);o=[],p.push(s),a="",u+=1}}else if(V(g)){let s=!1;if(a.length!==0){let t=m(a,o,i);o=[],p.push(t),a="",s=!0}T=F(e,T);let h=e[T];if(T<e.length&&s&&h!==","&&h!==">")throw new r(e,"unexpected whitespace character");continue}else a+=g;T+=1}if(c.length>0)throw new r(e,"no matching '>' for '<'");switch(p.length){case 0:return m(a,o,i);case 1:if(a==="")return p[0];throw new r(e,"unexpected ','");default:throw new r(e,"unexpected whitespace character")}}function m(e,n,i){switch(e){case"&signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new E(new y);case"signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new y;case"bool":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new l;case"address":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new C;case"u8":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new f;case"u16":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new x;case"u32":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new v;case"u64":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new U;case"u128":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new A;case"u256":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new P;case"vector":if(n.length!==1)throw new r(e,"vector type expected to have exactly one type argument");return new I(n[0]);default:if($(e)){if(i)return new b(Number(e.split("T")[1]));throw new r(e,"unexpected generic type")}if(!e.match(/:/))throw new r(e,"unknown type");let c=e.split("::");if(c.length!==3)throw new r(e,"unexpected struct format, must be of the form 0xaddress::module_name::struct_name");if(!N(c[1]))throw new r(e,"module name must only contain alphanumeric or '_' characters");if(!N(c[2]))throw new r(e,"struct name must only contain alphanumeric or '_' characters");return new G(new M(w.fromString(c[0]),new d(c[1]),new d(c[2]),n))}}export{S as a,r as b,Z as c};
2
- //# sourceMappingURL=chunk-IVBYTTN7.mjs.map
1
+ import{b as l,c as f,d as x,e as v,f as U,g as A,h as P,i as C,j as y,k as E,l as b,m as I,n as G,o as M}from"./chunk-3VGX3TXH.mjs";import{a as d}from"./chunk-MGOHPDX4.mjs";import{b as w}from"./chunk-T23OVRNF.mjs";function N(e){return!!e.match(/^[_a-zA-Z0-9]+$/)}function V(e){return!!e.match(/\s/)}function $(e){return!!e.match(/^T[0-9]+$/)}function F(e,n){let i=n;for(;i<e.length;i+=1){let c=e[i];if(!V(c))break}return i}var S=(t=>(t.InvalidTypeTag="unknown type",t.UnexpectedGenericType="unexpected generic type",t.UnexpectedTypeArgumentClose="unexpected '>'",t.UnexpectedWhitespaceCharacter="unexpected whitespace character",t.UnexpectedComma="unexpected ','",t.TypeArgumentCountMismatch="type argument count doesn't match expected amount",t.MissingTypeArgumentClose="no matching '>' for '<'",t.UnexpectedPrimitiveTypeArguments="primitive types not expected to have type arguments",t.UnexpectedVectorTypeArgumentCount="vector type expected to have exactly one type argument",t.UnexpectedStructFormat="unexpected struct format, must be of the form 0xaddress::module_name::struct_name",t.InvalidModuleNameCharacter="module name must only contain alphanumeric or '_' characters",t.InvalidStructNameCharacter="struct name must only contain alphanumeric or '_' characters",t))(S||{}),r=class extends Error{constructor(n,i){super(`Failed to parse typeTag '${n}', ${i}`)}};function Z(e,n){let i=n?.allowGenerics??!1,c=[],o=[],p=[],T=0,a="",u=1;for(;T<e.length;){let g=e[T];if(g==="<")c.push({savedExpectedTypes:u,savedStr:a,savedTypes:p}),a="",p=[],u=1;else if(g===">"){if(a!==""){let _=m(a,o,i);p.push(_)}let s=c.pop();if(s===void 0)throw new r(e,"unexpected '>'");if(u!==p.length)throw new r(e,"type argument count doesn't match expected amount");let{savedStr:h,savedTypes:t,savedExpectedTypes:W}=s;o=p,p=t,a=h,u=W}else if(g===","){if(a.length!==0){let s=m(a,o,i);o=[],p.push(s),a="",u+=1}}else if(V(g)){let s=!1;if(a.length!==0){let t=m(a,o,i);o=[],p.push(t),a="",s=!0}T=F(e,T);let h=e[T];if(T<e.length&&s&&h!==","&&h!==">")throw new r(e,"unexpected whitespace character");continue}else a+=g;T+=1}if(c.length>0)throw new r(e,"no matching '>' for '<'");switch(p.length){case 0:return m(a,o,i);case 1:if(a==="")return p[0];throw new r(e,"unexpected ','");default:throw new r(e,"unexpected whitespace character")}}function m(e,n,i){switch(e){case"&signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new E(new y);case"signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new y;case"bool":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new l;case"address":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new C;case"u8":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new f;case"u16":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new x;case"u32":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new v;case"u64":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new U;case"u128":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new A;case"u256":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new P;case"vector":if(n.length!==1)throw new r(e,"vector type expected to have exactly one type argument");return new I(n[0]);default:if($(e)){if(i)return new b(Number(e.split("T")[1]));throw new r(e,"unexpected generic type")}if(!e.match(/:/))throw new r(e,"unknown type");let c=e.split("::");if(c.length!==3)throw new r(e,"unexpected struct format, must be of the form 0xaddress::module_name::struct_name");if(!N(c[1]))throw new r(e,"module name must only contain alphanumeric or '_' characters");if(!N(c[2]))throw new r(e,"struct name must only contain alphanumeric or '_' characters");return new G(new M(w.fromString(c[0]),new d(c[1]),new d(c[2]),n))}}export{S as a,r as b,Z as c};
2
+ //# sourceMappingURL=chunk-PFFAQZHT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-2OTMSEHI.mjs";import{a as o}from"./chunk-GVZZTEYV.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-QBWI223M.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-LYUXOW2M.mjs";import{a as o}from"./chunk-C5VCRT5G.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-PHYMHZJW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ED6PYTNG.mjs";import{b as i}from"./chunk-U7EZI5D5.mjs";import{a as d}from"./chunk-52DBSOFA.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-5TNUDFLP.mjs.map
1
+ import{a as n}from"./chunk-W4EQGTSE.mjs";import{b as i}from"./chunk-T23OVRNF.mjs";import{a as d}from"./chunk-TVRJ3M7B.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-QXI5L5MN.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-D2DIZHP3.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-YIIDPNGQ.mjs.map
1
+ import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-MP5ROJ2O.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-RIJEDN6X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-P2JP6PSD.mjs";import{a as g}from"./chunk-LB4KMZNQ.mjs";import{a as l}from"./chunk-PCLBZIT4.mjs";import{a as h}from"./chunk-3OA7CG6N.mjs";import{a as y}from"./chunk-QBWI223M.mjs";import{a as u}from"./chunk-VSPQRNEG.mjs";import{a as s}from"./chunk-G4QU37E6.mjs";import{a as p}from"./chunk-M3VGAYMW.mjs";import{a as A}from"./chunk-ND5A52N4.mjs";import{a as r}from"./chunk-Y5DMKMLF.mjs";import{a}from"./chunk-HZFOKUQZ.mjs";import{a as c}from"./chunk-KFKE46CF.mjs";var t=class{constructor(e){this.config=new A(e),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new l(this.config),this.staking=new y(this.config),this.transaction=new u(this.config),this.keyless=new h(this.config)}};function n(m,e,d){Object.getOwnPropertyNames(e.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&(o.value=function(...w){return this[d][i](...w)},Object.defineProperty(m.prototype,i,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,f,"faucet");n(t,g,"fungibleAsset");n(t,l,"general");n(t,y,"staking");n(t,u,"transaction");n(t,h,"keyless");export{t as a};
2
- //# sourceMappingURL=chunk-W2MKEIHI.mjs.map
1
+ import{a as h}from"./chunk-US26M7LP.mjs";import{a as y}from"./chunk-PHYMHZJW.mjs";import{a as u}from"./chunk-KXZSBE7W.mjs";import{a as A}from"./chunk-6GQAHQGW.mjs";import{a as r}from"./chunk-5JRZCLBY.mjs";import{a}from"./chunk-JH7BYJ4C.mjs";import{a as c}from"./chunk-5WBDOSJO.mjs";import{a as f}from"./chunk-IJBPBDYK.mjs";import{a as g}from"./chunk-VJ2W4HR4.mjs";import{a as l}from"./chunk-DIX5DLNP.mjs";import{a as s}from"./chunk-A4DVDNSM.mjs";import{a as p}from"./chunk-XM7P5CUO.mjs";var t=class{constructor(e){this.config=new A(e),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new l(this.config),this.staking=new y(this.config),this.transaction=new u(this.config),this.keyless=new h(this.config)}};function n(m,e,d){Object.getOwnPropertyNames(e.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&(o.value=function(...w){return this[d][i](...w)},Object.defineProperty(m.prototype,i,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,f,"faucet");n(t,g,"fungibleAsset");n(t,l,"general");n(t,y,"staking");n(t,u,"transaction");n(t,h,"keyless");export{t as a};
2
+ //# sourceMappingURL=chunk-RYFIXEOV.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-JP6UNRLO.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
2
- //# sourceMappingURL=chunk-UMFYNNCG.mjs.map
1
+ import{b as p}from"./chunk-HWTQJARL.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
2
+ //# sourceMappingURL=chunk-SEJ2XNM7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-52DBSOFA.mjs";import{b as t}from"./chunk-AOCNYMMX.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
2
- //# sourceMappingURL=chunk-KX5ESZO7.mjs.map
1
+ import{a as r}from"./chunk-TVRJ3M7B.mjs";import{b as t}from"./chunk-AOCNYMMX.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
2
+ //# sourceMappingURL=chunk-STYDBDYL.mjs.map