@aptos-labs/ts-sdk 1.13.3-zeta.0 → 1.13.3-zeta.1

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 (214) hide show
  1. package/dist/common/index.d.ts +24 -4
  2. package/dist/common/index.js +11 -11
  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.d.mts +1 -0
  7. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  8. package/dist/esm/account/KeylessAccount.d.mts +23 -4
  9. package/dist/esm/account/KeylessAccount.mjs +1 -1
  10. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  11. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  12. package/dist/esm/account/index.d.mts +2 -1
  13. package/dist/esm/account/index.mjs +1 -1
  14. package/dist/esm/api/account.mjs +1 -1
  15. package/dist/esm/api/ans.mjs +1 -1
  16. package/dist/esm/api/aptos.mjs +1 -1
  17. package/dist/esm/api/coin.mjs +1 -1
  18. package/dist/esm/api/digitalAsset.mjs +1 -1
  19. package/dist/esm/api/event.mjs +1 -1
  20. package/dist/esm/api/faucet.mjs +1 -1
  21. package/dist/esm/api/fungibleAsset.mjs +1 -1
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.mjs +1 -1
  24. package/dist/esm/api/keyless.d.mts +3 -1
  25. package/dist/esm/api/keyless.mjs +1 -1
  26. package/dist/esm/api/staking.mjs +1 -1
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  29. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  31. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  33. package/dist/esm/api/utils.mjs +1 -1
  34. package/dist/esm/bcs/index.mjs +1 -1
  35. package/dist/esm/{chunk-TJPWYYNO.mjs → chunk-2Q6K4CLJ.mjs} +2 -2
  36. package/dist/esm/{chunk-HFLWASAB.mjs → chunk-33WBJV5U.mjs} +2 -2
  37. package/dist/esm/{chunk-DKLA4F3P.mjs → chunk-37CYBCWS.mjs} +2 -2
  38. package/dist/esm/{chunk-R6PFLI3Z.mjs → chunk-3QHRPREO.mjs} +2 -2
  39. package/dist/esm/{chunk-J2IIPYZG.mjs → chunk-3YNRBMPS.mjs} +2 -2
  40. package/dist/esm/{chunk-EQKI6NJR.mjs → chunk-4XB3D2ZD.mjs} +2 -2
  41. package/dist/esm/{chunk-X56CTMYB.mjs → chunk-5QBTBH64.mjs} +2 -2
  42. package/dist/esm/{chunk-U72H6EST.mjs → chunk-6CQH7JPF.mjs} +2 -2
  43. package/dist/esm/{chunk-QHIQLTBS.mjs → chunk-6J3CB3DN.mjs} +2 -2
  44. package/dist/esm/{chunk-HURQZGUZ.mjs → chunk-6M6XXPQQ.mjs} +2 -2
  45. package/dist/esm/{chunk-CQJ4WN7M.mjs → chunk-7JNPSNL6.mjs} +2 -2
  46. package/dist/esm/{chunk-LDMEIVL6.mjs → chunk-A7L2Z5DW.mjs} +2 -2
  47. package/dist/esm/{chunk-7XHVF3ZX.mjs → chunk-CHQ6IKE3.mjs} +2 -2
  48. package/dist/esm/{chunk-3LQPAGL6.mjs → chunk-DIBNAYZ2.mjs} +2 -2
  49. package/dist/esm/chunk-DMKFITUM.mjs +2 -0
  50. package/dist/esm/chunk-DMKFITUM.mjs.map +1 -0
  51. package/dist/esm/{chunk-2SD6JLIU.mjs → chunk-DOCYCNXV.mjs} +2 -2
  52. package/dist/esm/{chunk-KCVBUZ6L.mjs → chunk-DX62SMGM.mjs} +2 -2
  53. package/dist/esm/chunk-EFRNRARV.mjs +2 -0
  54. package/dist/esm/chunk-EFRNRARV.mjs.map +1 -0
  55. package/dist/esm/{chunk-WO2KROQ6.mjs → chunk-EKOIHFAW.mjs} +2 -2
  56. package/dist/esm/{chunk-6NZNCDDW.mjs → chunk-GI52SX32.mjs} +2 -2
  57. package/dist/esm/{chunk-CN37OHFT.mjs → chunk-GKCO5PQJ.mjs} +2 -2
  58. package/dist/esm/{chunk-TBG3MIIE.mjs → chunk-HJULFJXF.mjs} +2 -2
  59. package/dist/esm/{chunk-AKGASNN4.mjs → chunk-IM32PZOD.mjs} +2 -2
  60. package/dist/esm/chunk-IOVRZ2CA.mjs +2 -0
  61. package/dist/esm/chunk-IOVRZ2CA.mjs.map +1 -0
  62. package/dist/esm/{chunk-LX7N4NUS.mjs → chunk-ITEV72BZ.mjs} +2 -2
  63. package/dist/esm/{chunk-274CXZ6R.mjs → chunk-KFJMLLOA.mjs} +2 -2
  64. package/dist/esm/{chunk-F6QCHPVS.mjs → chunk-KGJITNRZ.mjs} +2 -2
  65. package/dist/esm/{chunk-XEXWFQNP.mjs → chunk-KOCKKI4F.mjs} +2 -2
  66. package/dist/esm/{chunk-H6BRBIMG.mjs → chunk-LV7OW245.mjs} +2 -2
  67. package/dist/esm/{chunk-SNQJV7MF.mjs → chunk-MJGZJL3W.mjs} +2 -2
  68. package/dist/esm/{chunk-QMIEBNTP.mjs → chunk-NPNAKSCR.mjs} +2 -2
  69. package/dist/esm/{chunk-JOYJUVSE.mjs → chunk-NWLZDI2I.mjs} +2 -2
  70. package/dist/esm/{chunk-3PGVEOWR.mjs → chunk-ODTNF2YP.mjs} +2 -2
  71. package/dist/esm/{chunk-N4B6S6FK.mjs → chunk-OKG6X5TX.mjs} +2 -2
  72. package/dist/esm/{chunk-JEUAQVXW.mjs → chunk-OYTLWUQT.mjs} +2 -2
  73. package/dist/esm/chunk-P5VCS2F5.mjs +2 -0
  74. package/dist/esm/chunk-P5VCS2F5.mjs.map +1 -0
  75. package/dist/esm/{chunk-7FNHL6LU.mjs → chunk-PTIZKRON.mjs} +2 -2
  76. package/dist/esm/{chunk-SRLCFTZR.mjs → chunk-R4UIPTBH.mjs} +2 -2
  77. package/dist/esm/{chunk-7MPJPZ73.mjs → chunk-R7BAM2G6.mjs} +2 -2
  78. package/dist/esm/{chunk-T3W5USZC.mjs → chunk-RDNPWCZ4.mjs} +2 -2
  79. package/dist/esm/{chunk-NMVZP3Q2.mjs → chunk-SA7MZPM3.mjs} +2 -2
  80. package/dist/esm/{chunk-Q7TGZJT4.mjs → chunk-T7JIGO3O.mjs} +2 -2
  81. package/dist/esm/{chunk-3CIA6J5L.mjs → chunk-TFJCMFKE.mjs} +2 -2
  82. package/dist/esm/{chunk-QXVGXZJX.mjs → chunk-TV64AINP.mjs} +2 -2
  83. package/dist/esm/{chunk-H3LMPXEM.mjs → chunk-UKJUHLZW.mjs} +2 -2
  84. package/dist/esm/{chunk-RPXN7HGR.mjs → chunk-VTX77UM3.mjs} +2 -2
  85. package/dist/esm/{chunk-E4Z5IEZP.mjs → chunk-WPVBC4JS.mjs} +2 -2
  86. package/dist/esm/{chunk-6NMHAFIO.mjs → chunk-WTVN3XGK.mjs} +2 -2
  87. package/dist/esm/chunk-X7GVXVT4.mjs +2 -0
  88. package/dist/esm/{chunk-YGHLXEB4.mjs.map → chunk-X7GVXVT4.mjs.map} +1 -1
  89. package/dist/esm/{chunk-TE7AJKSU.mjs → chunk-XHPLLMR5.mjs} +2 -2
  90. package/dist/esm/{chunk-APEBWN6Q.mjs → chunk-YGB7MEH3.mjs} +2 -2
  91. package/dist/esm/{chunk-HQWIGPYQ.mjs → chunk-YH6UKGIX.mjs} +2 -2
  92. package/dist/esm/{chunk-KNHI66FK.mjs → chunk-YI7FZPIK.mjs} +2 -2
  93. package/dist/esm/{chunk-E36GTDEB.mjs → chunk-ZGTJMNZG.mjs} +2 -2
  94. package/dist/esm/client/core.mjs +1 -1
  95. package/dist/esm/client/get.mjs +1 -1
  96. package/dist/esm/client/index.mjs +1 -1
  97. package/dist/esm/client/post.mjs +1 -1
  98. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  99. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  100. package/dist/esm/core/crypto/index.mjs +1 -1
  101. package/dist/esm/core/crypto/keyless.mjs +1 -1
  102. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  103. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  104. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  105. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  106. package/dist/esm/core/crypto/signature.mjs +1 -1
  107. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  108. package/dist/esm/core/index.mjs +1 -1
  109. package/dist/esm/index.d.mts +2 -2
  110. package/dist/esm/index.mjs +1 -1
  111. package/dist/esm/internal/account.mjs +1 -1
  112. package/dist/esm/internal/ans.mjs +1 -1
  113. package/dist/esm/internal/coin.mjs +1 -1
  114. package/dist/esm/internal/digitalAsset.mjs +1 -1
  115. package/dist/esm/internal/event.mjs +1 -1
  116. package/dist/esm/internal/faucet.mjs +1 -1
  117. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  118. package/dist/esm/internal/general.mjs +1 -1
  119. package/dist/esm/internal/keyless.d.mts +3 -1
  120. package/dist/esm/internal/keyless.mjs +1 -1
  121. package/dist/esm/internal/staking.mjs +1 -1
  122. package/dist/esm/internal/transaction.mjs +1 -1
  123. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  124. package/dist/esm/internal/view.mjs +1 -1
  125. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  126. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  127. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  128. package/dist/esm/transactions/index.mjs +1 -1
  129. package/dist/esm/transactions/instances/index.mjs +1 -1
  130. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  131. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  132. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  133. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  134. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  135. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  136. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  137. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  138. package/dist/esm/transactions/management/index.mjs +1 -1
  139. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  140. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  141. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  142. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  143. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  144. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  145. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  146. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  147. package/dist/esm/utils/index.mjs +1 -1
  148. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  149. package/dist/esm/version.d.mts +1 -1
  150. package/dist/esm/version.mjs +1 -1
  151. package/package.json +1 -1
  152. package/src/account/EphemeralKeyPair.ts +8 -0
  153. package/src/account/KeylessAccount.ts +70 -11
  154. package/src/api/keyless.ts +2 -1
  155. package/src/internal/keyless.ts +7 -4
  156. package/src/version.ts +1 -1
  157. package/dist/esm/chunk-2M7KHFEG.mjs +0 -2
  158. package/dist/esm/chunk-2M7KHFEG.mjs.map +0 -1
  159. package/dist/esm/chunk-NNA5VEB2.mjs +0 -2
  160. package/dist/esm/chunk-NNA5VEB2.mjs.map +0 -1
  161. package/dist/esm/chunk-PLPCOELE.mjs +0 -2
  162. package/dist/esm/chunk-PLPCOELE.mjs.map +0 -1
  163. package/dist/esm/chunk-W76IQV5K.mjs +0 -2
  164. package/dist/esm/chunk-W76IQV5K.mjs.map +0 -1
  165. package/dist/esm/chunk-YGHLXEB4.mjs +0 -2
  166. /package/dist/esm/{chunk-TJPWYYNO.mjs.map → chunk-2Q6K4CLJ.mjs.map} +0 -0
  167. /package/dist/esm/{chunk-HFLWASAB.mjs.map → chunk-33WBJV5U.mjs.map} +0 -0
  168. /package/dist/esm/{chunk-DKLA4F3P.mjs.map → chunk-37CYBCWS.mjs.map} +0 -0
  169. /package/dist/esm/{chunk-R6PFLI3Z.mjs.map → chunk-3QHRPREO.mjs.map} +0 -0
  170. /package/dist/esm/{chunk-J2IIPYZG.mjs.map → chunk-3YNRBMPS.mjs.map} +0 -0
  171. /package/dist/esm/{chunk-EQKI6NJR.mjs.map → chunk-4XB3D2ZD.mjs.map} +0 -0
  172. /package/dist/esm/{chunk-X56CTMYB.mjs.map → chunk-5QBTBH64.mjs.map} +0 -0
  173. /package/dist/esm/{chunk-U72H6EST.mjs.map → chunk-6CQH7JPF.mjs.map} +0 -0
  174. /package/dist/esm/{chunk-QHIQLTBS.mjs.map → chunk-6J3CB3DN.mjs.map} +0 -0
  175. /package/dist/esm/{chunk-HURQZGUZ.mjs.map → chunk-6M6XXPQQ.mjs.map} +0 -0
  176. /package/dist/esm/{chunk-CQJ4WN7M.mjs.map → chunk-7JNPSNL6.mjs.map} +0 -0
  177. /package/dist/esm/{chunk-LDMEIVL6.mjs.map → chunk-A7L2Z5DW.mjs.map} +0 -0
  178. /package/dist/esm/{chunk-7XHVF3ZX.mjs.map → chunk-CHQ6IKE3.mjs.map} +0 -0
  179. /package/dist/esm/{chunk-3LQPAGL6.mjs.map → chunk-DIBNAYZ2.mjs.map} +0 -0
  180. /package/dist/esm/{chunk-2SD6JLIU.mjs.map → chunk-DOCYCNXV.mjs.map} +0 -0
  181. /package/dist/esm/{chunk-KCVBUZ6L.mjs.map → chunk-DX62SMGM.mjs.map} +0 -0
  182. /package/dist/esm/{chunk-WO2KROQ6.mjs.map → chunk-EKOIHFAW.mjs.map} +0 -0
  183. /package/dist/esm/{chunk-6NZNCDDW.mjs.map → chunk-GI52SX32.mjs.map} +0 -0
  184. /package/dist/esm/{chunk-CN37OHFT.mjs.map → chunk-GKCO5PQJ.mjs.map} +0 -0
  185. /package/dist/esm/{chunk-TBG3MIIE.mjs.map → chunk-HJULFJXF.mjs.map} +0 -0
  186. /package/dist/esm/{chunk-AKGASNN4.mjs.map → chunk-IM32PZOD.mjs.map} +0 -0
  187. /package/dist/esm/{chunk-LX7N4NUS.mjs.map → chunk-ITEV72BZ.mjs.map} +0 -0
  188. /package/dist/esm/{chunk-274CXZ6R.mjs.map → chunk-KFJMLLOA.mjs.map} +0 -0
  189. /package/dist/esm/{chunk-F6QCHPVS.mjs.map → chunk-KGJITNRZ.mjs.map} +0 -0
  190. /package/dist/esm/{chunk-XEXWFQNP.mjs.map → chunk-KOCKKI4F.mjs.map} +0 -0
  191. /package/dist/esm/{chunk-H6BRBIMG.mjs.map → chunk-LV7OW245.mjs.map} +0 -0
  192. /package/dist/esm/{chunk-SNQJV7MF.mjs.map → chunk-MJGZJL3W.mjs.map} +0 -0
  193. /package/dist/esm/{chunk-QMIEBNTP.mjs.map → chunk-NPNAKSCR.mjs.map} +0 -0
  194. /package/dist/esm/{chunk-JOYJUVSE.mjs.map → chunk-NWLZDI2I.mjs.map} +0 -0
  195. /package/dist/esm/{chunk-3PGVEOWR.mjs.map → chunk-ODTNF2YP.mjs.map} +0 -0
  196. /package/dist/esm/{chunk-N4B6S6FK.mjs.map → chunk-OKG6X5TX.mjs.map} +0 -0
  197. /package/dist/esm/{chunk-JEUAQVXW.mjs.map → chunk-OYTLWUQT.mjs.map} +0 -0
  198. /package/dist/esm/{chunk-7FNHL6LU.mjs.map → chunk-PTIZKRON.mjs.map} +0 -0
  199. /package/dist/esm/{chunk-SRLCFTZR.mjs.map → chunk-R4UIPTBH.mjs.map} +0 -0
  200. /package/dist/esm/{chunk-7MPJPZ73.mjs.map → chunk-R7BAM2G6.mjs.map} +0 -0
  201. /package/dist/esm/{chunk-T3W5USZC.mjs.map → chunk-RDNPWCZ4.mjs.map} +0 -0
  202. /package/dist/esm/{chunk-NMVZP3Q2.mjs.map → chunk-SA7MZPM3.mjs.map} +0 -0
  203. /package/dist/esm/{chunk-Q7TGZJT4.mjs.map → chunk-T7JIGO3O.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-3CIA6J5L.mjs.map → chunk-TFJCMFKE.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-QXVGXZJX.mjs.map → chunk-TV64AINP.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-H3LMPXEM.mjs.map → chunk-UKJUHLZW.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-RPXN7HGR.mjs.map → chunk-VTX77UM3.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-E4Z5IEZP.mjs.map → chunk-WPVBC4JS.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-6NMHAFIO.mjs.map → chunk-WTVN3XGK.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-TE7AJKSU.mjs.map → chunk-XHPLLMR5.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-APEBWN6Q.mjs.map → chunk-YGB7MEH3.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-HQWIGPYQ.mjs.map → chunk-YH6UKGIX.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-KNHI66FK.mjs.map → chunk-YI7FZPIK.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-E36GTDEB.mjs.map → chunk-ZGTJMNZG.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{e as o}from"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
1
+ import{e as o}from"../../chunk-VTX77UM3.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-6J3CB3DN.mjs";import"../../chunk-3YNRBMPS.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-TV64AINP.mjs";import"../../chunk-GI52SX32.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-YGB7MEH3.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-SA7MZPM3.mjs";import"../../chunk-CHQ6IKE3.mjs";import"../../chunk-EKOIHFAW.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-YH6UKGIX.mjs";import"../../chunk-P5VCS2F5.mjs";import"../../chunk-DMKFITUM.mjs";import"../../chunk-X7GVXVT4.mjs";import"../../chunk-37CYBCWS.mjs";import"../../chunk-2Q6K4CLJ.mjs";import"../../chunk-ITEV72BZ.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-5QBTBH64.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-ZGTJMNZG.mjs";import"../../chunk-WPVBC4JS.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KGJITNRZ.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-6M6XXPQQ.mjs";import"../../chunk-PTIZKRON.mjs";import"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-R7BAM2G6.mjs";import"../../chunk-XHPLLMR5.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
2
2
  //# sourceMappingURL=sign.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-274CXZ6R.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-KFJMLLOA.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-VTX77UM3.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-6J3CB3DN.mjs";import"../../chunk-3YNRBMPS.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-TV64AINP.mjs";import"../../chunk-GI52SX32.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-YGB7MEH3.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-SA7MZPM3.mjs";import"../../chunk-CHQ6IKE3.mjs";import"../../chunk-EKOIHFAW.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-YH6UKGIX.mjs";import"../../chunk-P5VCS2F5.mjs";import"../../chunk-DMKFITUM.mjs";import"../../chunk-X7GVXVT4.mjs";import"../../chunk-37CYBCWS.mjs";import"../../chunk-2Q6K4CLJ.mjs";import"../../chunk-ITEV72BZ.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-5QBTBH64.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-ZGTJMNZG.mjs";import"../../chunk-WPVBC4JS.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KGJITNRZ.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-6M6XXPQQ.mjs";import"../../chunk-PTIZKRON.mjs";import"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-R7BAM2G6.mjs";import"../../chunk-XHPLLMR5.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-H6BRBIMG.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-RPXN7HGR.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QHIQLTBS.mjs";import"../../chunk-J2IIPYZG.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-QXVGXZJX.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-6NZNCDDW.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-APEBWN6Q.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-NMVZP3Q2.mjs";import"../../chunk-7XHVF3ZX.mjs";import"../../chunk-WO2KROQ6.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-YGHLXEB4.mjs";import"../../chunk-DKLA4F3P.mjs";import"../../chunk-LX7N4NUS.mjs";import"../../chunk-HQWIGPYQ.mjs";import"../../chunk-2M7KHFEG.mjs";import"../../chunk-W76IQV5K.mjs";import"../../chunk-TJPWYYNO.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-X56CTMYB.mjs";import"../../chunk-E36GTDEB.mjs";import"../../chunk-E4Z5IEZP.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-TE7AJKSU.mjs";import"../../chunk-F6QCHPVS.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-HURQZGUZ.mjs";import"../../chunk-7FNHL6LU.mjs";import"../../chunk-6NMHAFIO.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-7MPJPZ73.mjs";import"../../chunk-CQJ4WN7M.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-LV7OW245.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-VTX77UM3.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-6J3CB3DN.mjs";import"../../chunk-3YNRBMPS.mjs";import"../../chunk-PFFAQZHT.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-7H3HRFVM.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-TV64AINP.mjs";import"../../chunk-GI52SX32.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-YGB7MEH3.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-SA7MZPM3.mjs";import"../../chunk-CHQ6IKE3.mjs";import"../../chunk-EKOIHFAW.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-5VSMDXZ6.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-YH6UKGIX.mjs";import"../../chunk-P5VCS2F5.mjs";import"../../chunk-DMKFITUM.mjs";import"../../chunk-X7GVXVT4.mjs";import"../../chunk-37CYBCWS.mjs";import"../../chunk-2Q6K4CLJ.mjs";import"../../chunk-ITEV72BZ.mjs";import"../../chunk-2YDIOWRJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-W637YAND.mjs";import"../../chunk-NC5HHEEM.mjs";import"../../chunk-5QBTBH64.mjs";import"../../chunk-MKUAW7KW.mjs";import"../../chunk-Z2ZR4PTF.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-IEZO4PIG.mjs";import"../../chunk-3VGX3TXH.mjs";import"../../chunk-MWUJCP27.mjs";import"../../chunk-ZNEBMSNC.mjs";import"../../chunk-MGOHPDX4.mjs";import"../../chunk-ZGTJMNZG.mjs";import"../../chunk-WPVBC4JS.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-YE5B2S5L.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KGJITNRZ.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-6M6XXPQQ.mjs";import"../../chunk-PTIZKRON.mjs";import"../../chunk-WTVN3XGK.mjs";import"../../chunk-FLYEALDB.mjs";import"../../chunk-R7BAM2G6.mjs";import"../../chunk-XHPLLMR5.mjs";import"../../chunk-7JNPSNL6.mjs";import"../../chunk-COW5IGYC.mjs";import"../../chunk-STYDBDYL.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-S5HG2QUD.mjs";import"../../chunk-7STYQ5ZE.mjs";import"../../chunk-T23OVRNF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-C3L4ETUF.mjs";import"../../chunk-3FVRXELT.mjs";import"../../chunk-EB7AI4B4.mjs";import"../../chunk-6RBUXB5I.mjs";import"../../chunk-OKRUEVF3.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-TVRJ3M7B.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-HFLWASAB.mjs";import"../chunk-6NZNCDDW.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-APEBWN6Q.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-NMVZP3Q2.mjs";import"../chunk-7XHVF3ZX.mjs";import"../chunk-WO2KROQ6.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-YGHLXEB4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-33WBJV5U.mjs";import"../chunk-GI52SX32.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-YGB7MEH3.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-SA7MZPM3.mjs";import"../chunk-CHQ6IKE3.mjs";import"../chunk-EKOIHFAW.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-5VSMDXZ6.mjs";import"../chunk-X7GVXVT4.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-C3L4ETUF.mjs";import"../chunk-3FVRXELT.mjs";import"../chunk-EB7AI4B4.mjs";import"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-C3L4ETUF.mjs";import{a as g}from"../chunk-3FVRXELT.mjs";import{a as p,b as q,c as r}from"../chunk-EB7AI4B4.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-6RBUXB5I.mjs";import{a}from"../chunk-6IFMQ5AS.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-C3L4ETUF.mjs";import{a as g}from"../chunk-3FVRXELT.mjs";import{a as p,b as q,c as r}from"../chunk-EB7AI4B4.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-6RBUXB5I.mjs";import"../chunk-OKRUEVF3.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-6IFMQ5AS.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-TVRJ3M7B.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-2YDIOWRJ.mjs";import{d as p}from"./chunk-E4Z5IEZP.mjs";import{a as y,b as u}from"./chunk-HURQZGUZ.mjs";import{b as a}from"./chunk-7FNHL6LU.mjs";import{b as i}from"./chunk-CQJ4WN7M.mjs";import{b as g}from"./chunk-T23OVRNF.mjs";var m=class o{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new y(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new o({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:c}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,c);break;case 2:n=a.fromDerivationPath(t,c);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new o({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let r=this.sign(s(e));return new p(this.publicKey,r)}sign(e){return new u(this.privateKey.sign(e))}signTransaction(e){return this.sign(s(e))}};export{m as a};
2
- //# sourceMappingURL=chunk-TJPWYYNO.mjs.map
1
+ import{d as s}from"./chunk-2YDIOWRJ.mjs";import{d as p}from"./chunk-WPVBC4JS.mjs";import{a as y,b as u}from"./chunk-6M6XXPQQ.mjs";import{b as a}from"./chunk-PTIZKRON.mjs";import{b as i}from"./chunk-7JNPSNL6.mjs";import{b as g}from"./chunk-T23OVRNF.mjs";var m=class o{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new y(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new o({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:c}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,c);break;case 2:n=a.fromDerivationPath(t,c);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new o({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let r=this.sign(s(e));return new p(this.publicKey,r)}sign(e){return new u(this.privateKey.sign(e))}signTransaction(e){return this.sign(s(e))}};export{m as a};
2
+ //# sourceMappingURL=chunk-2Q6K4CLJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-6NZNCDDW.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-HFLWASAB.mjs.map
1
+ import{h as e}from"./chunk-GI52SX32.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-33WBJV5U.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-LX7N4NUS.mjs";import{a as c}from"./chunk-TJPWYYNO.mjs";import{b as i}from"./chunk-CQJ4WN7M.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
- //# sourceMappingURL=chunk-DKLA4F3P.mjs.map
1
+ import{a as c}from"./chunk-2Q6K4CLJ.mjs";import{a as n}from"./chunk-ITEV72BZ.mjs";import{b as i}from"./chunk-7JNPSNL6.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
+ //# sourceMappingURL=chunk-37CYBCWS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-SNQJV7MF.mjs";import{a as m}from"./chunk-RPXN7HGR.mjs";import{f as A}from"./chunk-APEBWN6Q.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-R6PFLI3Z.mjs.map
1
+ import{a as m}from"./chunk-VTX77UM3.mjs";import{a as g}from"./chunk-MJGZJL3W.mjs";import{f as A}from"./chunk-YGB7MEH3.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-3QHRPREO.mjs.map
@@ -1,2 +1,2 @@
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-7H3HRFVM.mjs";import{c as I}from"./chunk-QXVGXZJX.mjs";import{n as p}from"./chunk-3VGX3TXH.mjs";import{b as U}from"./chunk-T23OVRNF.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";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-J2IIPYZG.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-7H3HRFVM.mjs";import{c as I}from"./chunk-TV64AINP.mjs";import{n as p}from"./chunk-3VGX3TXH.mjs";import{b as U}from"./chunk-T23OVRNF.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";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-3YNRBMPS.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-R6PFLI3Z.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
- //# sourceMappingURL=chunk-EQKI6NJR.mjs.map
1
+ import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-3QHRPREO.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
+ //# sourceMappingURL=chunk-4XB3D2ZD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-E36GTDEB.mjs";import{a as i}from"./chunk-Z2ZR4PTF.mjs";import{a as r}from"./chunk-TVRJ3M7B.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
- //# sourceMappingURL=chunk-X56CTMYB.mjs.map
1
+ import{a as i}from"./chunk-Z2ZR4PTF.mjs";import{a as e}from"./chunk-ZGTJMNZG.mjs";import{a as r}from"./chunk-TVRJ3M7B.mjs";var n=class o extends r{constructor(t,a){super();this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
+ //# sourceMappingURL=chunk-5QBTBH64.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-Q7TGZJT4.mjs";import{a as o}from"./chunk-HFLWASAB.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-U72H6EST.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-T7JIGO3O.mjs";import{a as o}from"./chunk-33WBJV5U.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-6CQH7JPF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as D,c as Y,d as nn,e as R}from"./chunk-J2IIPYZG.mjs";import{q as Q,t as y}from"./chunk-7H3HRFVM.mjs";import{a as j}from"./chunk-QXVGXZJX.mjs";import{b as J}from"./chunk-6NZNCDDW.mjs";import{a as Z}from"./chunk-AH44UPM4.mjs";import{a as L}from"./chunk-APEBWN6Q.mjs";import{a as z}from"./chunk-ROXFCLDT.mjs";import{g as F}from"./chunk-5VSMDXZ6.mjs";import{a as X}from"./chunk-W637YAND.mjs";import{a as A}from"./chunk-X56CTMYB.mjs";import{b as E,d as p,e as l,f as B}from"./chunk-E36GTDEB.mjs";import{a as N,b as g,d as P}from"./chunk-E4Z5IEZP.mjs";import{a as H}from"./chunk-MKUAW7KW.mjs";import{a as K,c as b,d as x}from"./chunk-Z2ZR4PTF.mjs";import{c as C,d as k,e as v,f as S,g as O,h as V,i as q}from"./chunk-IEZO4PIG.mjs";import{a as U}from"./chunk-MWUJCP27.mjs";import{b as W,c as G}from"./chunk-YE5B2S5L.mjs";import{a as _,b as $}from"./chunk-HURQZGUZ.mjs";import{a as M,c as I}from"./chunk-CQJ4WN7M.mjs";import{b as u}from"./chunk-T23OVRNF.mjs";import{b as h}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as sn}from"@noble/hashes/sha3";async function Un(n){if(Q(n))return dn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await en({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:Y});return cn({...n,abi:a})}function cn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>R(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=S.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new v(new V(s,new q(c)))}return new k(c)}async function Cn(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await en({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:nn});return un({abi:a,...n})}function un(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>R(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return S.build(`${e}::${i}`,a,r,o)}function dn(n){return new C(new O(h.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function An(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>F[t.network]?{chainId:F[t.network]}:{chainId:(await L({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await J({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await j({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await f()}catch{return 0}else return f()},[{chainId:d},{gasEstimate:m},T]=await Promise.all([o(),c(),s()]),{maxGasAmount:an,gasUnitPrice:rn,expireTimestamp:on}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(m),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new K(u.from(e),BigInt(T),i,BigInt(an),BigInt(rn),BigInt(on),new U(d))}async function kn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await An({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new X(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new H(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function vn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=w(t);if(e.feePayerAddress){let c=new x(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(T=>w(T)));let d=w(a),m=new l(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new b(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>w(m));let d=new p(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof g)o=new E(r.public_key,r.signature);else if(r instanceof P)o=new B(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function w(n){return n instanceof _?new P(n,new $(new I(new Uint8Array(64)))):new g(new M(n.toUint8Array()),new I(new Uint8Array(64)))}function mn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=z(N,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new l(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new p(a,t.secondarySignerAddresses,i)}else a instanceof g?r=new E(a.public_key,a.signature):r=new B(a);return new A(t.rawTransaction,r).bcsToBytes()}function tn(n){let t=sn.create();for(let e of n)t.update(e);return t.digest()}var yn=tn(["APTOS::Transaction"]);function On(n){let t=mn(n);return new h(tn([yn,new Uint8Array([0]),t])).toString()}function Vn(n,t,e,i){if(n instanceof x){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");let a=new l(t,n.secondary_signer_addresses,i??[],{address:n.fee_payer_address,authenticator:e});return new A(n.raw_txn,a).bcsToBytes()}if(n instanceof b){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");let a=new p(t,n.secondary_signer_addresses,i??[]);return new A(n.raw_txn,a).bcsToBytes()}throw new Error(`Cannot prepare multi signers transaction to submission, ${typeof n} transaction is not supported`)}async function en({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:Z(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{Un as a,cn as b,Cn as c,un as d,An as e,kn as f,vn as g,w as h,mn as i,tn as j,On as k,Vn as l};
2
- //# sourceMappingURL=chunk-QHIQLTBS.mjs.map
1
+ import{a as D,c as Y,d as nn,e as R}from"./chunk-3YNRBMPS.mjs";import{q as Q,t as y}from"./chunk-7H3HRFVM.mjs";import{a as j}from"./chunk-TV64AINP.mjs";import{b as J}from"./chunk-GI52SX32.mjs";import{a as Z}from"./chunk-AH44UPM4.mjs";import{a as L}from"./chunk-YGB7MEH3.mjs";import{a as z}from"./chunk-ROXFCLDT.mjs";import{g as F}from"./chunk-5VSMDXZ6.mjs";import{a as X}from"./chunk-W637YAND.mjs";import{a as A}from"./chunk-5QBTBH64.mjs";import{a as H}from"./chunk-MKUAW7KW.mjs";import{a as K,c as b,d as x}from"./chunk-Z2ZR4PTF.mjs";import{c as C,d as k,e as v,f as S,g as O,h as V,i as q}from"./chunk-IEZO4PIG.mjs";import{a as U}from"./chunk-MWUJCP27.mjs";import{b as E,d as p,e as l,f as B}from"./chunk-ZGTJMNZG.mjs";import{a as N,b as g,d as P}from"./chunk-WPVBC4JS.mjs";import{b as W,c as G}from"./chunk-YE5B2S5L.mjs";import{a as _,b as $}from"./chunk-6M6XXPQQ.mjs";import{a as M,c as I}from"./chunk-7JNPSNL6.mjs";import{b as u}from"./chunk-T23OVRNF.mjs";import{b as h}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as sn}from"@noble/hashes/sha3";async function Un(n){if(Q(n))return dn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await en({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:Y});return cn({...n,abi:a})}function cn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>R(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=S.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new v(new V(s,new q(c)))}return new k(c)}async function Cn(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await en({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:nn});return un({abi:a,...n})}function un(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>R(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return S.build(`${e}::${i}`,a,r,o)}function dn(n){return new C(new O(h.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function An(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>F[t.network]?{chainId:F[t.network]}:{chainId:(await L({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await J({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await j({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await f()}catch{return 0}else return f()},[{chainId:d},{gasEstimate:m},T]=await Promise.all([o(),c(),s()]),{maxGasAmount:an,gasUnitPrice:rn,expireTimestamp:on}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(m),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new K(u.from(e),BigInt(T),i,BigInt(an),BigInt(rn),BigInt(on),new U(d))}async function kn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await An({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new X(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new H(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function vn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=w(t);if(e.feePayerAddress){let c=new x(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(T=>w(T)));let d=w(a),m=new l(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new b(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>w(m));let d=new p(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof g)o=new E(r.public_key,r.signature);else if(r instanceof P)o=new B(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function w(n){return n instanceof _?new P(n,new $(new I(new Uint8Array(64)))):new g(new M(n.toUint8Array()),new I(new Uint8Array(64)))}function mn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=z(N,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new l(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new p(a,t.secondarySignerAddresses,i)}else a instanceof g?r=new E(a.public_key,a.signature):r=new B(a);return new A(t.rawTransaction,r).bcsToBytes()}function tn(n){let t=sn.create();for(let e of n)t.update(e);return t.digest()}var yn=tn(["APTOS::Transaction"]);function On(n){let t=mn(n);return new h(tn([yn,new Uint8Array([0]),t])).toString()}function Vn(n,t,e,i){if(n instanceof x){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");let a=new l(t,n.secondary_signer_addresses,i??[],{address:n.fee_payer_address,authenticator:e});return new A(n.raw_txn,a).bcsToBytes()}if(n instanceof b){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");let a=new p(t,n.secondary_signer_addresses,i??[]);return new A(n.raw_txn,a).bcsToBytes()}throw new Error(`Cannot prepare multi signers transaction to submission, ${typeof n} transaction is not supported`)}async function en({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:Z(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{Un as a,cn as b,Cn as c,un as d,An as e,kn as f,vn as g,w as h,mn as i,tn as j,On as k,Vn as l};
2
+ //# sourceMappingURL=chunk-6J3CB3DN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,c}from"./chunk-7FNHL6LU.mjs";import{i as o,o as l}from"./chunk-6NMHAFIO.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-HURQZGUZ.mjs.map
1
+ import{a,c}from"./chunk-PTIZKRON.mjs";import{i as o,o as l}from"./chunk-WTVN3XGK.mjs";import{a as n,c as s}from"./chunk-7JNPSNL6.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-6M6XXPQQ.mjs.map
@@ -1,2 +1,2 @@
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
+ import{b as p}from"./chunk-COW5IGYC.mjs";import{a as A}from"./chunk-STYDBDYL.mjs";import{a as c}from"./chunk-TJDC5PWD.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-7JNPSNL6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-RPXN7HGR.mjs";import{f as t,i as o}from"./chunk-3VGX3TXH.mjs";import{e as n}from"./chunk-YE5B2S5L.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
- //# sourceMappingURL=chunk-LDMEIVL6.mjs.map
1
+ import{a as r}from"./chunk-VTX77UM3.mjs";import{f as t,i as o}from"./chunk-3VGX3TXH.mjs";import{e as n}from"./chunk-YE5B2S5L.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
+ //# sourceMappingURL=chunk-A7L2Z5DW.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-WO2KROQ6.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-7XHVF3ZX.mjs.map
1
+ import{b as p}from"./chunk-EKOIHFAW.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-CHQ6IKE3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-XEXWFQNP.mjs";import{h as t}from"./chunk-6NZNCDDW.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-3LQPAGL6.mjs.map
1
+ import{a as i}from"./chunk-KOCKKI4F.mjs";import{h as t}from"./chunk-GI52SX32.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-DIBNAYZ2.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as d}from"./chunk-WTVN3XGK.mjs";import{b as u,c as h,e as m}from"./chunk-FLYEALDB.mjs";import{a as p,b as y}from"./chunk-R7BAM2G6.mjs";import{b as s}from"./chunk-7JNPSNL6.mjs";import{a as o}from"./chunk-6IFMQ5AS.mjs";import{a as l}from"./chunk-TVRJ3M7B.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";import{randomBytes as g}from"@noble/hashes/utils";var b=class i extends l{constructor(e){super();let{privateKey:r,expiryDateSecs:n,blinder:a}=e;this.privateKey=r,this.publicKey=new p(r.publicKey()),this.expiryDateSecs=n||BigInt(f(x()+d)),this.blinder=a!==void 0?c.fromHexInput(a).toUint8Array():S(),this.nonce=this.generateNonce()}getPublicKey(){return this.publicKey}isExpired(){return Math.floor(Date.now()/1e3)>this.expiryDateSecs}serialize(e){e.serializeU32AsUleb128(this.publicKey.variant),e.serializeBytes(this.privateKey.toUint8Array()),e.serializeU64(this.expiryDateSecs),e.serializeFixedBytes(this.blinder)}static deserialize(e){let r=e.deserializeUleb128AsU32(),n;switch(r){case 0:n=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let a=e.deserializeU64(),K=e.deserializeFixedBytes(31);return new i({privateKey:n,expiryDateSecs:a,blinder:K})}static fromBytes(e){return i.deserialize(new o(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r})}generateNonce(){let e=u(this.publicKey.bcsToBytes(),93);return e.push(BigInt(this.expiryDateSecs)),e.push(h(this.blinder)),m(e).toString()}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new y(this.privateKey.sign(e))}};function S(){return g(31)}function x(){return Math.floor(new Date().getTime()/1e3)}function f(i){let t=new Date(i*1e3);return t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),Math.floor(t.getTime()/1e3)}export{b as a};
2
+ //# sourceMappingURL=chunk-DMKFITUM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/account/EphemeralKeyPair.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { randomBytes } from \"@noble/hashes/utils\";\n\nimport {\n EPK_HORIZON_SECS,\n Ed25519PrivateKey,\n EphemeralPublicKey,\n EphemeralSignature,\n PrivateKey,\n} from \"../core/crypto\";\nimport { Hex } from \"../core/hex\";\nimport { bytesToBigIntLE, padAndPackBytesWithLen, poseidonHash } from \"../core/crypto/poseidon\";\nimport { EphemeralPublicKeyVariant, HexInput, SigningSchemeInput } from \"../types\";\nimport { Deserializer, Serializable, Serializer } from \"../bcs\";\n\nexport class EphemeralKeyPair extends Serializable {\n readonly blinder: Uint8Array;\n\n readonly expiryDateSecs: bigint | number;\n\n readonly nonce: string;\n\n private privateKey: PrivateKey;\n\n private publicKey: EphemeralPublicKey;\n\n constructor(args: { privateKey: PrivateKey; expiryDateSecs?: bigint | number; blinder?: HexInput }) {\n super();\n const { privateKey, expiryDateSecs, blinder } = args;\n this.privateKey = privateKey;\n this.publicKey = new EphemeralPublicKey(privateKey.publicKey());\n this.expiryDateSecs = expiryDateSecs || BigInt(floorToWholeHour(currentTimeInSeconds() + EPK_HORIZON_SECS));\n this.blinder = blinder !== undefined ? Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();\n this.nonce = this.generateNonce();\n }\n\n getPublicKey(): EphemeralPublicKey {\n return this.publicKey;\n }\n\n isExpired(): boolean {\n const currentTimeSecs: number = Math.floor(Date.now() / 1000);\n return currentTimeSecs > this.expiryDateSecs;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(this.publicKey.variant);\n serializer.serializeBytes(this.privateKey.toUint8Array());\n serializer.serializeU64(this.expiryDateSecs);\n serializer.serializeFixedBytes(this.blinder);\n }\n\n static deserialize(deserializer: Deserializer): EphemeralKeyPair {\n const variantIndex = deserializer.deserializeUleb128AsU32();\n let privateKey: PrivateKey;\n switch (variantIndex) {\n case EphemeralPublicKeyVariant.Ed25519:\n privateKey = Ed25519PrivateKey.deserialize(deserializer);\n break;\n default:\n throw new Error(`Unknown variant index for EphemeralPublicKey: ${variantIndex}`);\n }\n const expiryDateSecs = deserializer.deserializeU64();\n const blinder = deserializer.deserializeFixedBytes(31);\n return new EphemeralKeyPair({ privateKey, expiryDateSecs, blinder });\n }\n\n static fromBytes(bytes: Uint8Array): EphemeralKeyPair {\n return EphemeralKeyPair.deserialize(new Deserializer(bytes));\n }\n\n static generate(args?: { scheme: SigningSchemeInput }): EphemeralKeyPair {\n let privateKey: PrivateKey;\n\n switch (args?.scheme) {\n case SigningSchemeInput.Ed25519:\n default:\n privateKey = Ed25519PrivateKey.generate();\n }\n\n return new EphemeralKeyPair({ privateKey });\n }\n\n generateNonce(): string {\n const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);\n fields.push(BigInt(this.expiryDateSecs));\n fields.push(bytesToBigIntLE(this.blinder));\n const nonceHash = poseidonHash(fields);\n return nonceHash.toString();\n }\n\n /**\n * Sign the given message with the private key.\n * *\n * @param data in HexInput format\n * @returns EphemeralSignature\n */\n sign(data: HexInput): EphemeralSignature {\n if (this.isExpired()) {\n throw new Error(\"EphemeralKeyPair has expired\")\n }\n return new EphemeralSignature(this.privateKey.sign(data));\n }\n}\n\nfunction generateBlinder(): Uint8Array {\n return randomBytes(31);\n}\n\nfunction currentTimeInSeconds(): number {\n return Math.floor(new Date().getTime() / 1000);\n}\n\nfunction floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n"],"mappings":"oTAGA,OAAS,eAAAA,MAAmB,sBAcrB,IAAMC,EAAN,MAAMC,UAAyBC,CAAa,CAWjD,YAAYC,EAAwF,CAClG,MAAM,EACN,GAAM,CAAE,WAAAC,EAAY,eAAAC,EAAgB,QAAAC,CAAQ,EAAIH,EAChD,KAAK,WAAaC,EAClB,KAAK,UAAY,IAAIG,EAAmBH,EAAW,UAAU,CAAC,EAC9D,KAAK,eAAiBC,GAAkB,OAAOG,EAAiBC,EAAqB,EAAIC,CAAgB,CAAC,EAC1G,KAAK,QAAUJ,IAAY,OAAYK,EAAI,aAAaL,CAAO,EAAE,aAAa,EAAIM,EAAgB,EAClG,KAAK,MAAQ,KAAK,cAAc,CAClC,CAEA,cAAmC,CACjC,OAAO,KAAK,SACd,CAEA,WAAqB,CAEnB,OADgC,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EACnC,KAAK,cAChC,CAEA,UAAUC,EAA8B,CACtCA,EAAW,sBAAsB,KAAK,UAAU,OAAO,EACvDA,EAAW,eAAe,KAAK,WAAW,aAAa,CAAC,EACxDA,EAAW,aAAa,KAAK,cAAc,EAC3CA,EAAW,oBAAoB,KAAK,OAAO,CAC7C,CAEA,OAAO,YAAYC,EAA8C,CAC/D,IAAMC,EAAeD,EAAa,wBAAwB,EACtDV,EACJ,OAAQW,EAAc,CACpB,OACEX,EAAaY,EAAkB,YAAYF,CAAY,EACvD,MACF,QACE,MAAM,IAAI,MAAM,iDAAiDC,CAAY,EAAE,CACnF,CACA,IAAMV,EAAiBS,EAAa,eAAe,EAC7CR,EAAUQ,EAAa,sBAAsB,EAAE,EACrD,OAAO,IAAIb,EAAiB,CAAE,WAAAG,EAAY,eAAAC,EAAgB,QAAAC,CAAQ,CAAC,CACrE,CAEA,OAAO,UAAUW,EAAqC,CACpD,OAAOhB,EAAiB,YAAY,IAAIiB,EAAaD,CAAK,CAAC,CAC7D,CAEA,OAAO,SAASd,EAAyD,CACvE,IAAIC,EAEJ,OAAQD,GAAM,OAAQ,CACpB,OACA,QACEC,EAAaY,EAAkB,SAAS,CAC5C,CAEA,OAAO,IAAIf,EAAiB,CAAE,WAAAG,CAAW,CAAC,CAC5C,CAEA,eAAwB,CACtB,IAAMe,EAASC,EAAuB,KAAK,UAAU,WAAW,EAAG,EAAE,EACrE,OAAAD,EAAO,KAAK,OAAO,KAAK,cAAc,CAAC,EACvCA,EAAO,KAAKE,EAAgB,KAAK,OAAO,CAAC,EACvBC,EAAaH,CAAM,EACpB,SAAS,CAC5B,CAQA,KAAKI,EAAoC,CACvC,GAAI,KAAK,UAAU,EACjB,MAAM,IAAI,MAAM,8BAA8B,EAEhD,OAAO,IAAIC,EAAmB,KAAK,WAAW,KAAKD,CAAI,CAAC,CAC1D,CACF,EAEA,SAASX,GAA8B,CACrC,OAAOa,EAAY,EAAE,CACvB,CAEA,SAAShB,GAA+B,CACtC,OAAO,KAAK,MAAM,IAAI,KAAK,EAAE,QAAQ,EAAI,GAAI,CAC/C,CAEA,SAASD,EAAiBkB,EAAoC,CAC5D,IAAMC,EAAO,IAAI,KAAKD,EAAqB,GAAI,EAE/C,OAAAC,EAAK,WAAW,CAAC,EACjBA,EAAK,WAAW,CAAC,EACjBA,EAAK,gBAAgB,CAAC,EACf,KAAK,MAAMA,EAAK,QAAQ,EAAI,GAAI,CACzC","names":["randomBytes","EphemeralKeyPair","_EphemeralKeyPair","Serializable","args","privateKey","expiryDateSecs","blinder","EphemeralPublicKey","floorToWholeHour","currentTimeInSeconds","EPK_HORIZON_SECS","Hex","generateBlinder","serializer","deserializer","variantIndex","Ed25519PrivateKey","bytes","Deserializer","fields","padAndPackBytesWithLen","bytesToBigIntLE","poseidonHash","data","EphemeralSignature","randomBytes","timestampInSeconds","date"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-QXVGXZJX.mjs";import{a as e}from"./chunk-3JPVQHOR.mjs";var n=()=>Math.floor(Date.now()/1e3),r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
2
- //# sourceMappingURL=chunk-2SD6JLIU.mjs.map
1
+ import{a as s}from"./chunk-TV64AINP.mjs";import{a as e}from"./chunk-3JPVQHOR.mjs";var n=()=>Math.floor(Date.now()/1e3),r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
2
+ //# sourceMappingURL=chunk-DOCYCNXV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as t,c as n,d as o}from"./chunk-TBG3MIIE.mjs";import{a as s}from"./chunk-HFLWASAB.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
- //# sourceMappingURL=chunk-KCVBUZ6L.mjs.map
1
+ import{a as i,b as t,c as n,d as o}from"./chunk-HJULFJXF.mjs";import{a as s}from"./chunk-33WBJV5U.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
+ //# sourceMappingURL=chunk-DX62SMGM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as r,c as o}from"./chunk-IOVRZ2CA.mjs";var t=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-EFRNRARV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { deriveKeylessAccount, getPepper } from \"../internal/keyless\";\nimport { HexInput } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to query all `OIDB` related queries on Aptos.\n */\nexport class Keyless {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * TODO\n *\n * @param args.jwt jwt token\n * @returns The pepper\n */\n async getPepper(args: { jwt: string; ephemeralKeyPair: EphemeralKeyPair }): Promise<Uint8Array> {\n return getPepper({ aptosConfig: this.config, ...args });\n }\n\n async deriveKeylessAccount(args: {\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n extraFieldKey?: string;\n proofFetchCallback?: ProofFetchCallback;\n }): Promise<KeylessAccount> {\n return deriveKeylessAccount({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"gDAWO,IAAMA,EAAN,KAAc,CACnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAQ3C,MAAM,UAAUC,EAAgF,CAC9F,OAAOC,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CACxD,CAEA,MAAM,qBAAqBA,EAOC,CAC1B,OAAOE,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACnE,CACF","names":["Keyless","config","args","getPepper","deriveKeylessAccount"]}
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6FBKUTGF.mjs";import{a as R}from"./chunk-YGHLXEB4.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-WO2KROQ6.mjs.map
1
+ import{a}from"./chunk-6FBKUTGF.mjs";import{a as R}from"./chunk-X7GVXVT4.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-EKOIHFAW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-APEBWN6Q.mjs";import{a as h}from"./chunk-3JPVQHOR.mjs";import{b as c,d as A}from"./chunk-NMVZP3Q2.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-6NZNCDDW.mjs.map
1
+ import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-YGB7MEH3.mjs";import{a as h}from"./chunk-3JPVQHOR.mjs";import{b as c,d as A}from"./chunk-SA7MZPM3.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-GI52SX32.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-JEUAQVXW.mjs";import{a as e}from"./chunk-HFLWASAB.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-CN37OHFT.mjs.map
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-OYTLWUQT.mjs";import{a as e}from"./chunk-33WBJV5U.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-GKCO5PQJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-RPXN7HGR.mjs";import{c as p}from"./chunk-PFFAQZHT.mjs";import{f as o}from"./chunk-APEBWN6Q.mjs";import{o as u,r as g,s as A}from"./chunk-S4SEFF4K.mjs";import{f as a,i as r}from"./chunk-3VGX3TXH.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
- //# sourceMappingURL=chunk-TBG3MIIE.mjs.map
1
+ import{a as c}from"./chunk-VTX77UM3.mjs";import{c as p}from"./chunk-PFFAQZHT.mjs";import{f as o}from"./chunk-YGB7MEH3.mjs";import{o as u,r as g,s as A}from"./chunk-S4SEFF4K.mjs";import{f as a,i as r}from"./chunk-3VGX3TXH.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
+ //# sourceMappingURL=chunk-HJULFJXF.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-N4B6S6FK.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-AKGASNN4.mjs.map
1
+ import{c as a}from"./chunk-OKG6X5TX.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-IM32PZOD.mjs.map
@@ -0,0 +1,2 @@
1
+ import{c as E}from"./chunk-SA7MZPM3.mjs";import{e as b,f as x}from"./chunk-CHQ6IKE3.mjs";import{a as l}from"./chunk-P5VCS2F5.mjs";import{a as m,l as h,m as A}from"./chunk-WTVN3XGK.mjs";import{b as S}from"./chunk-R7BAM2G6.mjs";import{c as d}from"./chunk-S5HG2QUD.mjs";import{b as _}from"./chunk-TVRJ3M7B.mjs";import{b as a}from"./chunk-AOCNYMMX.mjs";import{jwtDecode as K}from"jwt-decode";import{bls12_381 as p}from"@noble/curves/bls12-381";var v="APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST";function w(e){return new TextEncoder().encode(e)}var I=p.G2.hashToCurve(w("APTOS_KEYLESS_PEPPER_PINKAS_VUF_SECRET_KEY_BASE"),{DST:v}).toAffine();function C(e){let{jwt:i,uidKey:t}=e,r=K(i),o=new _;o.serializeStr(r.iss),o.serializeStr(r.aud),o.serializeStr(r[t||"sub"]),o.serializeStr(t||"sub");let s=o.toUint8Array(),n=p.G1.hashToCurve(s,{DST:"APTOS_PEPPER_SERVICE_BLS12381_VUF_DST"}).toAffine();return p.G1.ProjectivePoint.fromAffine(n)}async function F(e){let{aptosConfig:i,pepperInput:t,pepperBase:r}=e,{data:o}=await E({aptosConfig:i,path:"vrf-pub-key",originMethod:"getPepper"}),s=p.G2.ProjectivePoint.fromHex(o.vrf_public_key_hex_string);return p.verifyShortSignature(r,t,s)}async function j(e){let{aptosConfig:i,jwt:t,ephemeralKeyPair:r,uidKey:o,verify:s}=e,{derivationPath:n}=e,c={jwt_b64:t,epk:r.getPublicKey().bcsToHex().toStringWithoutPrefix(),exp_date_secs:Number(r.expiryDateSecs),epk_blinder:a.fromHexInput(r.blinder).toStringWithoutPrefix(),uid_key:o},{data:f}=await b({aptosConfig:i,path:"fetch",body:c,originMethod:"getPepper",overrides:{WITH_CREDENTIALS:!1}}),P=a.fromHexInput(f.signature).toUint8Array();if(s&&!F({aptosConfig:i,pepperBase:P,pepperInput:C(e)}))throw new Error("Unable to verify");let u=p.pairing(p.G1.ProjectivePoint.fromHex(P),p.G2.ProjectivePoint.fromAffine(I));return n===void 0&&(n=d),l.fromDerivationPath(n,p.fields.Fp12.toBytes(u)).slice(0,31)}async function k(e){let{aptosConfig:i,jwt:t,ephemeralKeyPair:r,pepper:o,uidKey:s,extraFieldKey:n}=e,c=K(t),f;if(n){let T=c[n];f=`"${n}":"${T}",`}let P={jwt_b64:t,epk:r.getPublicKey().bcsToHex().toStringWithoutPrefix(),epk_blinder:a.fromHexInput(r.blinder).toStringWithoutPrefix(),exp_date_secs:Number(r.expiryDateSecs),exp_horizon_secs:m,pepper:a.fromHexInput(o).toStringWithoutPrefix(),extra_field:n,uid_key:s||"sub"},{data:u}=await x({aptosConfig:i,path:"prove",body:P,originMethod:"getProof",overrides:{WITH_CREDENTIALS:!1}}),y=u.proof,g=new h({a:y.a,b:y.b,c:y.c});return new A({proof:g,extraField:f,trainingWheelsSignature:S.fromHex(u.training_wheels_signature)})}async function O(e){let{proofFetchCallback:i}=e,{pepper:t}=e;if(t===void 0)t=await j(e);else if(a.fromHexInput(t).toUint8Array().length!==31)throw new Error("Pepper needs to be 31 bytes");let r=k({...e,pepper:t}),o=i?r:await r;return l.fromJWTAndProof({...e,proof:o,pepper:t,proofFetchCallback:i})}export{j as a,k as b,O as c};
2
+ //# sourceMappingURL=chunk-IOVRZ2CA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/keyless.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/oidb}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * faucet namespace and without having a dependency cycle error.\n */\nimport { jwtDecode } from \"jwt-decode\";\nimport { bls12_381 as bls } from \"@noble/curves/bls12-381\";\nimport { ProjPointType } from \"@noble/curves/abstract/weierstrass\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { getAptosPepperService, postAptosPepperService, postAptosProvingService } from \"../client\";\nimport {\n APTOS_BIP44_DEFAULT_DERIVATION_PATH,\n EPK_HORIZON_SECS,\n EphemeralSignature,\n Groth16Zkp,\n Hex,\n SignedGroth16Signature,\n} from \"../core\";\nimport { HexInput } from \"../types\";\nimport { Serializer } from \"../bcs\";\nimport { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { PepperFetchResponse, ProverResponse } from \"../types/keyless\";\n\nconst APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST = \"APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST\";\n\nfunction stringToUint8Array(str: string): Uint8Array {\n const encoder = new TextEncoder();\n return encoder.encode(str);\n}\n\nconst PINKAS_VUF_SECRET_KEY_BASE_AFFINE = bls.G2.hashToCurve(\n stringToUint8Array(\"APTOS_KEYLESS_PEPPER_PINKAS_VUF_SECRET_KEY_BASE\"),\n { DST: APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST },\n).toAffine();\n\nfunction getPepperInput(args: { jwt: string; uidKey?: string }): ProjPointType<bigint> {\n const { jwt, uidKey } = args;\n const jwtPayload = jwtDecode<{ [key: string]: string }>(jwt);\n const serializer = new Serializer();\n serializer.serializeStr(jwtPayload.iss);\n serializer.serializeStr(jwtPayload.aud);\n serializer.serializeStr(jwtPayload[uidKey || \"sub\"]);\n serializer.serializeStr(uidKey || \"sub\");\n const serial = serializer.toUint8Array();\n const msg = bls.G1.hashToCurve(serial, { DST: \"APTOS_PEPPER_SERVICE_BLS12381_VUF_DST\" }).toAffine();\n const pp = bls.G1.ProjectivePoint.fromAffine(msg);\n return pp;\n}\n\nasync function verifyPepperBase(args: {\n aptosConfig: AptosConfig;\n pepperInput: ProjPointType<bigint>;\n pepperBase: Uint8Array;\n}): Promise<boolean> {\n const { aptosConfig, pepperInput, pepperBase } = args;\n const { data: pubKeyResponse } = await getAptosPepperService<any, { vrf_public_key_hex_string: string }>({\n aptosConfig,\n path: \"vrf-pub-key\",\n originMethod: \"getPepper\",\n });\n const publicKeyFromService = bls.G2.ProjectivePoint.fromHex(pubKeyResponse.vrf_public_key_hex_string);\n return bls.verifyShortSignature(pepperBase, pepperInput, publicKeyFromService);\n}\n\nexport async function getPepper(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n derivationPath?: string;\n verify?: boolean;\n}): Promise<Uint8Array> {\n const { aptosConfig, jwt, ephemeralKeyPair, uidKey, verify } = args;\n let { derivationPath } = args;\n\n const body = {\n jwt_b64: jwt,\n epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),\n exp_date_secs: Number(ephemeralKeyPair.expiryDateSecs),\n epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),\n uid_key: uidKey,\n };\n const { data } = await postAptosPepperService<any, PepperFetchResponse>({\n aptosConfig,\n path: \"fetch\",\n body,\n originMethod: \"getPepper\",\n overrides: { WITH_CREDENTIALS: false },\n });\n const pepperBase = Hex.fromHexInput(data.signature).toUint8Array();\n\n if (verify) {\n const pepperVerified = verifyPepperBase({ aptosConfig, pepperBase, pepperInput: getPepperInput(args) });\n if (!pepperVerified) {\n throw new Error(\"Unable to verify\");\n }\n }\n // This takes the BLS VUF H(m)^sk and transforms it into a Pinkas VUF e(H(m), g_3^sk), where g_3 is the base of the secret key (computed pseudo-randomly via hash-to-curve).\n // This gives us the freedom of either decentralizing the pepper service as a BLS-based MPC or on top of the validators, by reusing the Pinkas WVUF-based randomness infrastructure.\n const newPepperBase = bls.pairing(\n bls.G1.ProjectivePoint.fromHex(pepperBase),\n bls.G2.ProjectivePoint.fromAffine(PINKAS_VUF_SECRET_KEY_BASE_AFFINE),\n );\n\n if (derivationPath === undefined) {\n derivationPath = APTOS_BIP44_DEFAULT_DERIVATION_PATH;\n }\n const pepper = KeylessAccount.fromDerivationPath(derivationPath, bls.fields.Fp12.toBytes(newPepperBase));\n return pepper.slice(0, 31);\n}\n\nexport async function getProof(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper: HexInput;\n uidKey?: string;\n extraFieldKey?: string;\n}): Promise<SignedGroth16Signature> {\n const { aptosConfig, jwt, ephemeralKeyPair, pepper, uidKey, extraFieldKey } = args;\n const jwtPayload = jwtDecode<{ [key: string]: string }>(jwt);\n let extraField;\n if (extraFieldKey) {\n const extraFieldVal = jwtPayload[extraFieldKey];\n extraField = `\"${extraFieldKey}\":\"${extraFieldVal}\",`;\n }\n const json = {\n jwt_b64: jwt,\n epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),\n epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),\n exp_date_secs: Number(ephemeralKeyPair.expiryDateSecs),\n exp_horizon_secs: EPK_HORIZON_SECS,\n pepper: Hex.fromHexInput(pepper).toStringWithoutPrefix(),\n extra_field: extraFieldKey,\n uid_key: uidKey || \"sub\",\n };\n\n const { data } = await postAptosProvingService<any, ProverResponse>({\n aptosConfig,\n path: \"prove\",\n body: json,\n originMethod: \"getProof\",\n overrides: { WITH_CREDENTIALS: false },\n });\n\n const proofPoints = data.proof;\n const proof = new Groth16Zkp({\n a: proofPoints.a,\n b: proofPoints.b,\n c: proofPoints.c,\n });\n\n const signedProof = new SignedGroth16Signature({\n proof,\n extraField,\n trainingWheelsSignature: EphemeralSignature.fromHex(data.training_wheels_signature),\n });\n return signedProof;\n}\n\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n pepper?: HexInput;\n extraFieldKey?: string;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<KeylessAccount> {\n const { proofFetchCallback } = args;\n let { pepper } = args;\n if (pepper === undefined) {\n pepper = await getPepper(args);\n } else if (Hex.fromHexInput(pepper).toUint8Array().length !== 31) {\n throw new Error(\"Pepper needs to be 31 bytes\");\n }\n\n const proofPromise = getProof({ ...args, pepper });\n const proof = proofFetchCallback ? proofPromise : await proofPromise;\n\n const keylessAccount = KeylessAccount.fromJWTAndProof({ ...args, proof, pepper, proofFetchCallback });\n\n return keylessAccount;\n}\n"],"mappings":"6VASA,OAAS,aAAAA,MAAiB,aAC1B,OAAS,aAAaC,MAAW,0BAiBjC,IAAMC,EAAsC,sCAE5C,SAASC,EAAmBC,EAAyB,CAEnD,OADgB,IAAI,YAAY,EACjB,OAAOA,CAAG,CAC3B,CAEA,IAAMC,EAAoCC,EAAI,GAAG,YAC/CH,EAAmB,iDAAiD,EACpE,CAAE,IAAKD,CAAoC,CAC7C,EAAE,SAAS,EAEX,SAASK,EAAeC,EAA+D,CACrF,GAAM,CAAE,IAAAC,EAAK,OAAAC,CAAO,EAAIF,EAClBG,EAAaC,EAAqCH,CAAG,EACrDI,EAAa,IAAIC,EACvBD,EAAW,aAAaF,EAAW,GAAG,EACtCE,EAAW,aAAaF,EAAW,GAAG,EACtCE,EAAW,aAAaF,EAAWD,GAAU,KAAK,CAAC,EACnDG,EAAW,aAAaH,GAAU,KAAK,EACvC,IAAMK,EAASF,EAAW,aAAa,EACjCG,EAAMV,EAAI,GAAG,YAAYS,EAAQ,CAAE,IAAK,uCAAwC,CAAC,EAAE,SAAS,EAElG,OADWT,EAAI,GAAG,gBAAgB,WAAWU,CAAG,CAElD,CAEA,eAAeC,EAAiBT,EAIX,CACnB,GAAM,CAAE,YAAAU,EAAa,YAAAC,EAAa,WAAAC,CAAW,EAAIZ,EAC3C,CAAE,KAAMa,CAAe,EAAI,MAAMC,EAAkE,CACvG,YAAAJ,EACA,KAAM,cACN,aAAc,WAChB,CAAC,EACKK,EAAuBjB,EAAI,GAAG,gBAAgB,QAAQe,EAAe,yBAAyB,EACpG,OAAOf,EAAI,qBAAqBc,EAAYD,EAAaI,CAAoB,CAC/E,CAEA,eAAsBC,EAAUhB,EAOR,CACtB,GAAM,CAAE,YAAAU,EAAa,IAAAT,EAAK,iBAAAgB,EAAkB,OAAAf,EAAQ,OAAAgB,CAAO,EAAIlB,EAC3D,CAAE,eAAAmB,CAAe,EAAInB,EAEnBoB,EAAO,CACX,QAASnB,EACT,IAAKgB,EAAiB,aAAa,EAAE,SAAS,EAAE,sBAAsB,EACtE,cAAe,OAAOA,EAAiB,cAAc,EACrD,YAAaI,EAAI,aAAaJ,EAAiB,OAAO,EAAE,sBAAsB,EAC9E,QAASf,CACX,EACM,CAAE,KAAAoB,CAAK,EAAI,MAAMC,EAAiD,CACtE,YAAAb,EACA,KAAM,QACN,KAAAU,EACA,aAAc,YACd,UAAW,CAAE,iBAAkB,EAAM,CACvC,CAAC,EACKR,EAAaS,EAAI,aAAaC,EAAK,SAAS,EAAE,aAAa,EAEjE,GAAIJ,GAEE,CADmBT,EAAiB,CAAE,YAAAC,EAAa,WAAAE,EAAY,YAAab,EAAeC,CAAI,CAAE,CAAC,EAEpG,MAAM,IAAI,MAAM,kBAAkB,EAKtC,IAAMwB,EAAgB1B,EAAI,QACxBA,EAAI,GAAG,gBAAgB,QAAQc,CAAU,EACzCd,EAAI,GAAG,gBAAgB,WAAWD,CAAiC,CACrE,EAEA,OAAIsB,IAAmB,SACrBA,EAAiBM,GAEJC,EAAe,mBAAmBP,EAAgBrB,EAAI,OAAO,KAAK,QAAQ0B,CAAa,CAAC,EACzF,MAAM,EAAG,EAAE,CAC3B,CAEA,eAAsBG,EAAS3B,EAOK,CAClC,GAAM,CAAE,YAAAU,EAAa,IAAAT,EAAK,iBAAAgB,EAAkB,OAAAW,EAAQ,OAAA1B,EAAQ,cAAA2B,CAAc,EAAI7B,EACxEG,EAAaC,EAAqCH,CAAG,EACvD6B,EACJ,GAAID,EAAe,CACjB,IAAME,EAAgB5B,EAAW0B,CAAa,EAC9CC,EAAa,IAAID,CAAa,MAAME,CAAa,IACnD,CACA,IAAMC,EAAO,CACX,QAAS/B,EACT,IAAKgB,EAAiB,aAAa,EAAE,SAAS,EAAE,sBAAsB,EACtE,YAAaI,EAAI,aAAaJ,EAAiB,OAAO,EAAE,sBAAsB,EAC9E,cAAe,OAAOA,EAAiB,cAAc,EACrD,iBAAkBgB,EAClB,OAAQZ,EAAI,aAAaO,CAAM,EAAE,sBAAsB,EACvD,YAAaC,EACb,QAAS3B,GAAU,KACrB,EAEM,CAAE,KAAAoB,CAAK,EAAI,MAAMY,EAA6C,CAClE,YAAAxB,EACA,KAAM,QACN,KAAMsB,EACN,aAAc,WACd,UAAW,CAAE,iBAAkB,EAAM,CACvC,CAAC,EAEKG,EAAcb,EAAK,MACnBc,EAAQ,IAAIC,EAAW,CAC3B,EAAGF,EAAY,EACf,EAAGA,EAAY,EACf,EAAGA,EAAY,CACjB,CAAC,EAOD,OALoB,IAAIG,EAAuB,CAC7C,MAAAF,EACA,WAAAN,EACA,wBAAyBS,EAAmB,QAAQjB,EAAK,yBAAyB,CACpF,CAAC,CAEH,CAEA,eAAsBkB,EAAqBxC,EAQf,CAC1B,GAAM,CAAE,mBAAAyC,CAAmB,EAAIzC,EAC3B,CAAE,OAAA4B,CAAO,EAAI5B,EACjB,GAAI4B,IAAW,OACbA,EAAS,MAAMZ,EAAUhB,CAAI,UACpBqB,EAAI,aAAaO,CAAM,EAAE,aAAa,EAAE,SAAW,GAC5D,MAAM,IAAI,MAAM,6BAA6B,EAG/C,IAAMc,EAAef,EAAS,CAAE,GAAG3B,EAAM,OAAA4B,CAAO,CAAC,EAC3CQ,EAAQK,EAAqBC,EAAe,MAAMA,EAItD,OAFqBhB,EAAe,gBAAgB,CAAE,GAAG1B,EAAM,MAAAoC,EAAO,OAAAR,EAAQ,mBAAAa,CAAmB,CAAC,CAGtG","names":["jwtDecode","bls","APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST","stringToUint8Array","str","PINKAS_VUF_SECRET_KEY_BASE_AFFINE","bls","getPepperInput","args","jwt","uidKey","jwtPayload","jwtDecode","serializer","Serializer","serial","msg","verifyPepperBase","aptosConfig","pepperInput","pepperBase","pubKeyResponse","getAptosPepperService","publicKeyFromService","getPepper","ephemeralKeyPair","verify","derivationPath","body","Hex","data","postAptosPepperService","newPepperBase","APTOS_BIP44_DEFAULT_DERIVATION_PATH","KeylessAccount","getProof","pepper","extraFieldKey","extraField","extraFieldVal","json","EPK_HORIZON_SECS","postAptosProvingService","proofPoints","proof","Groth16Zkp","SignedGroth16Signature","EphemeralSignature","deriveKeylessAccount","proofFetchCallback","proofPromise"]}
@@ -1,2 +1,2 @@
1
- import{d as i}from"./chunk-2YDIOWRJ.mjs";import{b as o}from"./chunk-E4Z5IEZP.mjs";import{b as n}from"./chunk-CQJ4WN7M.mjs";import{b as a}from"./chunk-T23OVRNF.mjs";var c=class s{constructor(e){this.signingScheme=0;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=r.publicKey(),this.accountAddress=t?a.from(t):this.publicKey.authKey().derivedAddress()}static generate(){let e=n.generate();return new s({privateKey:e})}static fromDerivationPath(e){let{path:r,mnemonic:t}=e,u=n.fromDerivationPath(r,t);return new s({privateKey:u})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let r=this.privateKey.sign(i(e));return new o(this.publicKey,r)}sign(e){return this.privateKey.sign(e)}signTransaction(e){return this.sign(i(e))}};export{c as a};
2
- //# sourceMappingURL=chunk-LX7N4NUS.mjs.map
1
+ import{d as i}from"./chunk-2YDIOWRJ.mjs";import{b as o}from"./chunk-WPVBC4JS.mjs";import{b as n}from"./chunk-7JNPSNL6.mjs";import{b as a}from"./chunk-T23OVRNF.mjs";var c=class s{constructor(e){this.signingScheme=0;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=r.publicKey(),this.accountAddress=t?a.from(t):this.publicKey.authKey().derivedAddress()}static generate(){let e=n.generate();return new s({privateKey:e})}static fromDerivationPath(e){let{path:r,mnemonic:t}=e,u=n.fromDerivationPath(r,t);return new s({privateKey:u})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let r=this.privateKey.sign(i(e));return new o(this.publicKey,r)}sign(e){return this.privateKey.sign(e)}signTransaction(e){return this.sign(i(e))}};export{c as a};
2
+ //# sourceMappingURL=chunk-ITEV72BZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-RPXN7HGR.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-274CXZ6R.mjs.map
1
+ import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-VTX77UM3.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-KFJMLLOA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u,b as l}from"./chunk-HURQZGUZ.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-F6QCHPVS.mjs.map
1
+ import{a as u,b as l}from"./chunk-6M6XXPQQ.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-KGJITNRZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-6NZNCDDW.mjs";import{d as c}from"./chunk-7XHVF3ZX.mjs";import{d as r}from"./chunk-YE5B2S5L.mjs";import{b as s}from"./chunk-T23OVRNF.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
- //# sourceMappingURL=chunk-XEXWFQNP.mjs.map
1
+ import{g as e}from"./chunk-GI52SX32.mjs";import{d as c}from"./chunk-CHQ6IKE3.mjs";import{d as r}from"./chunk-YE5B2S5L.mjs";import{b as s}from"./chunk-T23OVRNF.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
+ //# sourceMappingURL=chunk-KOCKKI4F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-RPXN7HGR.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-H6BRBIMG.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-VTX77UM3.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-LV7OW245.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as r}from"./chunk-QHIQLTBS.mjs";import{b as i}from"./chunk-7XHVF3ZX.mjs";import{b as t}from"./chunk-TVRJ3M7B.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new t;p.serialize(e);let l=e.toUint8Array(),{data:d}=await i({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
2
- //# sourceMappingURL=chunk-SNQJV7MF.mjs.map
1
+ import{c as r}from"./chunk-6J3CB3DN.mjs";import{b as i}from"./chunk-CHQ6IKE3.mjs";import{b as t}from"./chunk-TVRJ3M7B.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new t;p.serialize(e);let l=e.toUint8Array(),{data:d}=await i({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
2
+ //# sourceMappingURL=chunk-MJGZJL3W.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-LDMEIVL6.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
- //# sourceMappingURL=chunk-QMIEBNTP.mjs.map
1
+ import{a as o}from"./chunk-A7L2Z5DW.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
+ //# sourceMappingURL=chunk-NPNAKSCR.mjs.map