@aptos-labs/ts-sdk 1.28.0-zeta.1 → 1.28.0-zeta.4

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 (156) hide show
  1. package/dist/common/index.js +3 -3
  2. package/dist/common/index.js.map +1 -1
  3. package/dist/esm/account/Account.mjs +1 -1
  4. package/dist/esm/account/Ed25519Account.mjs +1 -1
  5. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  6. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  7. package/dist/esm/account/KeylessAccount.mjs +1 -1
  8. package/dist/esm/account/KeylessAccountCommon.mjs +1 -1
  9. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  10. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  11. package/dist/esm/account/index.mjs +1 -1
  12. package/dist/esm/api/account.mjs +1 -1
  13. package/dist/esm/api/ans.mjs +1 -1
  14. package/dist/esm/api/aptos.mjs +1 -1
  15. package/dist/esm/api/coin.mjs +1 -1
  16. package/dist/esm/api/digitalAsset.mjs +1 -1
  17. package/dist/esm/api/event.mjs +1 -1
  18. package/dist/esm/api/faucet.mjs +1 -1
  19. package/dist/esm/api/fungibleAsset.mjs +1 -1
  20. package/dist/esm/api/general.mjs +1 -1
  21. package/dist/esm/api/index.mjs +1 -1
  22. package/dist/esm/api/keyless.mjs +1 -1
  23. package/dist/esm/api/object.mjs +1 -1
  24. package/dist/esm/api/staking.mjs +1 -1
  25. package/dist/esm/api/table.mjs +1 -1
  26. package/dist/esm/api/transaction.mjs +1 -1
  27. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  29. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  31. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  32. package/dist/esm/api/utils.mjs +1 -1
  33. package/dist/esm/{chunk-SYKVA363.mjs → chunk-2XSLXHVJ.mjs} +2 -2
  34. package/dist/esm/{chunk-5HWJ3SN4.mjs → chunk-3QFDWOUG.mjs} +2 -2
  35. package/dist/esm/chunk-45ILXL6K.mjs +2 -0
  36. package/dist/esm/chunk-45ILXL6K.mjs.map +1 -0
  37. package/dist/esm/{chunk-VVWBJKEA.mjs → chunk-4X4ODN6K.mjs} +2 -2
  38. package/dist/esm/{chunk-KBIYKNM2.mjs → chunk-5JRPODDO.mjs} +2 -2
  39. package/dist/esm/{chunk-RLGIYYI7.mjs → chunk-5MZJD6SA.mjs} +2 -2
  40. package/dist/esm/{chunk-2MDJ763P.mjs → chunk-7WCH4LAM.mjs} +2 -2
  41. package/dist/esm/{chunk-CSNIVFPZ.mjs → chunk-ABAIELQE.mjs} +2 -2
  42. package/dist/esm/{chunk-G6HZPSZ3.mjs → chunk-AGTINH7K.mjs} +2 -2
  43. package/dist/esm/{chunk-S7KCJQOA.mjs → chunk-ASQ2YBOR.mjs} +2 -2
  44. package/dist/esm/{chunk-UYYQZDVB.mjs → chunk-CUDIVR4U.mjs} +2 -2
  45. package/dist/esm/{chunk-CBRVPQV6.mjs → chunk-ETQA37EP.mjs} +2 -2
  46. package/dist/esm/{chunk-3XX3675G.mjs → chunk-F7R7ICUR.mjs} +2 -2
  47. package/dist/esm/{chunk-MYRN7MDF.mjs → chunk-FLNLQ7K5.mjs} +2 -2
  48. package/dist/esm/{chunk-U72MLMGP.mjs → chunk-GUVL374I.mjs} +2 -2
  49. package/dist/esm/{chunk-QIOBANW2.mjs → chunk-HIJU5HEA.mjs} +2 -2
  50. package/dist/esm/{chunk-YBZI6U43.mjs → chunk-HOQCND6F.mjs} +2 -2
  51. package/dist/esm/{chunk-ADLWXCGV.mjs → chunk-HQUG3XLS.mjs} +2 -2
  52. package/dist/esm/{chunk-PEYLPXU6.mjs → chunk-IEH7ILF3.mjs} +2 -2
  53. package/dist/esm/{chunk-6LC7ZJEI.mjs → chunk-JRLMKLB3.mjs} +2 -2
  54. package/dist/esm/{chunk-4QVGK2KD.mjs → chunk-KHYFJBKG.mjs} +2 -2
  55. package/dist/esm/{chunk-J3PN353M.mjs → chunk-LKN324IO.mjs} +2 -2
  56. package/dist/esm/{chunk-PBMXWRZG.mjs → chunk-MYF2VRVN.mjs} +2 -2
  57. package/dist/esm/{chunk-2Z6HETKH.mjs → chunk-OKEP5IEO.mjs} +2 -2
  58. package/dist/esm/{chunk-B2RQPJYZ.mjs → chunk-QD7BJPKU.mjs} +2 -2
  59. package/dist/esm/{chunk-ELPTV7ZG.mjs → chunk-THSR4POE.mjs} +2 -2
  60. package/dist/esm/{chunk-MZB3J6CV.mjs → chunk-UEGCC3OP.mjs} +2 -2
  61. package/dist/esm/{chunk-YNLAYIFQ.mjs → chunk-VBR46X5M.mjs} +2 -2
  62. package/dist/esm/{chunk-QUTP2ACU.mjs → chunk-VZKENIJR.mjs} +2 -2
  63. package/dist/esm/{chunk-KSOKGREZ.mjs → chunk-WBDJI34Y.mjs} +2 -2
  64. package/dist/esm/{chunk-E5LYYWAS.mjs → chunk-WV7HZQ2V.mjs} +2 -2
  65. package/dist/esm/{chunk-OVI2RY5L.mjs → chunk-X26OHQZO.mjs} +2 -2
  66. package/dist/esm/{chunk-QQGCMXIV.mjs → chunk-XUJXTPLV.mjs} +2 -2
  67. package/dist/esm/{chunk-LY7ZRAJT.mjs → chunk-YRXUBXIJ.mjs} +2 -2
  68. package/dist/esm/{chunk-P4FYT4LC.mjs → chunk-YTVABX3A.mjs} +2 -2
  69. package/dist/esm/{chunk-W2KQ2TSH.mjs → chunk-Z56T4OGM.mjs} +2 -2
  70. package/dist/esm/client/core.mjs +1 -1
  71. package/dist/esm/client/get.mjs +1 -1
  72. package/dist/esm/client/index.mjs +1 -1
  73. package/dist/esm/client/post.mjs +1 -1
  74. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  75. package/dist/esm/core/crypto/index.mjs +1 -1
  76. package/dist/esm/core/crypto/keyless.mjs +1 -1
  77. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  78. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  79. package/dist/esm/core/index.mjs +1 -1
  80. package/dist/esm/index.mjs +1 -1
  81. package/dist/esm/internal/account.mjs +1 -1
  82. package/dist/esm/internal/ans.mjs +1 -1
  83. package/dist/esm/internal/coin.mjs +1 -1
  84. package/dist/esm/internal/digitalAsset.mjs +1 -1
  85. package/dist/esm/internal/event.mjs +1 -1
  86. package/dist/esm/internal/faucet.mjs +1 -1
  87. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  88. package/dist/esm/internal/general.mjs +1 -1
  89. package/dist/esm/internal/keyless.mjs +1 -1
  90. package/dist/esm/internal/object.mjs +1 -1
  91. package/dist/esm/internal/staking.mjs +1 -1
  92. package/dist/esm/internal/table.mjs +1 -1
  93. package/dist/esm/internal/transaction.mjs +1 -1
  94. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  95. package/dist/esm/internal/view.mjs +1 -1
  96. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  97. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  98. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  99. package/dist/esm/transactions/index.mjs +1 -1
  100. package/dist/esm/transactions/instances/index.mjs +1 -1
  101. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  102. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  103. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  104. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  105. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  106. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  107. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  108. package/dist/esm/transactions/management/index.mjs +1 -1
  109. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  110. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  111. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  112. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  113. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  114. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  115. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  116. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  117. package/dist/esm/utils/index.mjs +1 -1
  118. package/package.json +1 -1
  119. package/src/internal/keyless.ts +5 -4
  120. package/dist/esm/chunk-MSK4O4KB.mjs +0 -2
  121. package/dist/esm/chunk-MSK4O4KB.mjs.map +0 -1
  122. /package/dist/esm/{chunk-SYKVA363.mjs.map → chunk-2XSLXHVJ.mjs.map} +0 -0
  123. /package/dist/esm/{chunk-5HWJ3SN4.mjs.map → chunk-3QFDWOUG.mjs.map} +0 -0
  124. /package/dist/esm/{chunk-VVWBJKEA.mjs.map → chunk-4X4ODN6K.mjs.map} +0 -0
  125. /package/dist/esm/{chunk-KBIYKNM2.mjs.map → chunk-5JRPODDO.mjs.map} +0 -0
  126. /package/dist/esm/{chunk-RLGIYYI7.mjs.map → chunk-5MZJD6SA.mjs.map} +0 -0
  127. /package/dist/esm/{chunk-2MDJ763P.mjs.map → chunk-7WCH4LAM.mjs.map} +0 -0
  128. /package/dist/esm/{chunk-CSNIVFPZ.mjs.map → chunk-ABAIELQE.mjs.map} +0 -0
  129. /package/dist/esm/{chunk-G6HZPSZ3.mjs.map → chunk-AGTINH7K.mjs.map} +0 -0
  130. /package/dist/esm/{chunk-S7KCJQOA.mjs.map → chunk-ASQ2YBOR.mjs.map} +0 -0
  131. /package/dist/esm/{chunk-UYYQZDVB.mjs.map → chunk-CUDIVR4U.mjs.map} +0 -0
  132. /package/dist/esm/{chunk-CBRVPQV6.mjs.map → chunk-ETQA37EP.mjs.map} +0 -0
  133. /package/dist/esm/{chunk-3XX3675G.mjs.map → chunk-F7R7ICUR.mjs.map} +0 -0
  134. /package/dist/esm/{chunk-MYRN7MDF.mjs.map → chunk-FLNLQ7K5.mjs.map} +0 -0
  135. /package/dist/esm/{chunk-U72MLMGP.mjs.map → chunk-GUVL374I.mjs.map} +0 -0
  136. /package/dist/esm/{chunk-QIOBANW2.mjs.map → chunk-HIJU5HEA.mjs.map} +0 -0
  137. /package/dist/esm/{chunk-YBZI6U43.mjs.map → chunk-HOQCND6F.mjs.map} +0 -0
  138. /package/dist/esm/{chunk-ADLWXCGV.mjs.map → chunk-HQUG3XLS.mjs.map} +0 -0
  139. /package/dist/esm/{chunk-PEYLPXU6.mjs.map → chunk-IEH7ILF3.mjs.map} +0 -0
  140. /package/dist/esm/{chunk-6LC7ZJEI.mjs.map → chunk-JRLMKLB3.mjs.map} +0 -0
  141. /package/dist/esm/{chunk-4QVGK2KD.mjs.map → chunk-KHYFJBKG.mjs.map} +0 -0
  142. /package/dist/esm/{chunk-J3PN353M.mjs.map → chunk-LKN324IO.mjs.map} +0 -0
  143. /package/dist/esm/{chunk-PBMXWRZG.mjs.map → chunk-MYF2VRVN.mjs.map} +0 -0
  144. /package/dist/esm/{chunk-2Z6HETKH.mjs.map → chunk-OKEP5IEO.mjs.map} +0 -0
  145. /package/dist/esm/{chunk-B2RQPJYZ.mjs.map → chunk-QD7BJPKU.mjs.map} +0 -0
  146. /package/dist/esm/{chunk-ELPTV7ZG.mjs.map → chunk-THSR4POE.mjs.map} +0 -0
  147. /package/dist/esm/{chunk-MZB3J6CV.mjs.map → chunk-UEGCC3OP.mjs.map} +0 -0
  148. /package/dist/esm/{chunk-YNLAYIFQ.mjs.map → chunk-VBR46X5M.mjs.map} +0 -0
  149. /package/dist/esm/{chunk-QUTP2ACU.mjs.map → chunk-VZKENIJR.mjs.map} +0 -0
  150. /package/dist/esm/{chunk-KSOKGREZ.mjs.map → chunk-WBDJI34Y.mjs.map} +0 -0
  151. /package/dist/esm/{chunk-E5LYYWAS.mjs.map → chunk-WV7HZQ2V.mjs.map} +0 -0
  152. /package/dist/esm/{chunk-OVI2RY5L.mjs.map → chunk-X26OHQZO.mjs.map} +0 -0
  153. /package/dist/esm/{chunk-QQGCMXIV.mjs.map → chunk-XUJXTPLV.mjs.map} +0 -0
  154. /package/dist/esm/{chunk-LY7ZRAJT.mjs.map → chunk-YRXUBXIJ.mjs.map} +0 -0
  155. /package/dist/esm/{chunk-P4FYT4LC.mjs.map → chunk-YTVABX3A.mjs.map} +0 -0
  156. /package/dist/esm/{chunk-W2KQ2TSH.mjs.map → chunk-Z56T4OGM.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{e as o}from"../../chunk-YNLAYIFQ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QIOBANW2.mjs";import"../../chunk-5HWJ3SN4.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-G6HZPSZ3.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-W2KQ2TSH.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-PEYLPXU6.mjs";import"../../chunk-PBMXWRZG.mjs";import"../../chunk-YBZI6U43.mjs";import"../../chunk-UYYQZDVB.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
1
+ import{e as o}from"../../chunk-VBR46X5M.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-HIJU5HEA.mjs";import"../../chunk-3QFDWOUG.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-AGTINH7K.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-Z56T4OGM.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-IEH7ILF3.mjs";import"../../chunk-MYF2VRVN.mjs";import"../../chunk-HOQCND6F.mjs";import"../../chunk-CUDIVR4U.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
2
2
  //# sourceMappingURL=sign.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-3XX3675G.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-YNLAYIFQ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QIOBANW2.mjs";import"../../chunk-5HWJ3SN4.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-G6HZPSZ3.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-W2KQ2TSH.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-PEYLPXU6.mjs";import"../../chunk-PBMXWRZG.mjs";import"../../chunk-YBZI6U43.mjs";import"../../chunk-UYYQZDVB.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-F7R7ICUR.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-VBR46X5M.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-HIJU5HEA.mjs";import"../../chunk-3QFDWOUG.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-AGTINH7K.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-Z56T4OGM.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-IEH7ILF3.mjs";import"../../chunk-MYF2VRVN.mjs";import"../../chunk-HOQCND6F.mjs";import"../../chunk-CUDIVR4U.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-ELPTV7ZG.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-YNLAYIFQ.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-QIOBANW2.mjs";import"../../chunk-5HWJ3SN4.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-G6HZPSZ3.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-W2KQ2TSH.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-PEYLPXU6.mjs";import"../../chunk-PBMXWRZG.mjs";import"../../chunk-YBZI6U43.mjs";import"../../chunk-UYYQZDVB.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-THSR4POE.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-VBR46X5M.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-HIJU5HEA.mjs";import"../../chunk-3QFDWOUG.mjs";import"../../chunk-BQPQLOIW.mjs";import"../../chunk-AZ642ORV.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-K7ZPRL7C.mjs";import"../../chunk-GX2II7H4.mjs";import"../../chunk-AGTINH7K.mjs";import"../../chunk-J45FMNYT.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-GAEAYY44.mjs";import"../../chunk-Z56T4OGM.mjs";import"../../chunk-5RNKD3GW.mjs";import"../../chunk-NOVJ2ROD.mjs";import"../../chunk-NGIPNL7N.mjs";import"../../chunk-IEH7ILF3.mjs";import"../../chunk-MYF2VRVN.mjs";import"../../chunk-HOQCND6F.mjs";import"../../chunk-CUDIVR4U.mjs";import"../../chunk-E2WOZVJX.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-7BPKOPP7.mjs";import"../../chunk-YACGA3YS.mjs";import"../../chunk-OOVNFKA6.mjs";import"../../chunk-GKRIMGKW.mjs";import"../../chunk-ND23H3AK.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-SVO6PVAX.mjs";import"../../chunk-5FPWLBZT.mjs";import"../../chunk-SP4PT77Z.mjs";import"../../chunk-ZASN3QQQ.mjs";import"../../chunk-BC5BEOKM.mjs";import"../../chunk-UW5TIZFE.mjs";import"../../chunk-5HI4R3A2.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-SHOPSMRK.mjs";import"../../chunk-IA4RELOH.mjs";import"../../chunk-FDD6WNN6.mjs";import"../../chunk-FDTLBR6D.mjs";import"../../chunk-ASQIKTEF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-QTTDBQAJ.mjs";import"../../chunk-ZAHUEAGT.mjs";import"../../chunk-DYMN66K5.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-N6EC72OZ.mjs";import"../../chunk-4I6IUAHQ.mjs";import"../../chunk-7T5CUI2H.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-FOLCONSQ.mjs";import"../../chunk-QP2A5ISX.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-3CE63FFN.mjs";import"../../chunk-EDVGFSB5.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-H3TJNBHX.mjs";import"../../chunk-FTBXTZM2.mjs";import"../../chunk-AT2A7OZD.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-BSUYPXRD.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-YELQZVBK.mjs";import"../../chunk-CDIKSNSU.mjs";import"../../chunk-TVWAYKEP.mjs";import"../../chunk-E7VSBBQM.mjs";import"../../chunk-23J256KA.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-KEYAPEAX.mjs";import"../../chunk-ZZIMFLVT.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-3TSO6PDV.mjs";import"../../chunk-UAL27G6B.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-5VQK4F5X.mjs";import"../../chunk-EXP5STXZ.mjs";import"../../chunk-ZXVQ2OBJ.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-RLGIYYI7.mjs";import"../chunk-G6HZPSZ3.mjs";import"../chunk-J45FMNYT.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-H3TJNBHX.mjs";import"../chunk-FTBXTZM2.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-3TSO6PDV.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-5VQK4F5X.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-5MZJD6SA.mjs";import"../chunk-AGTINH7K.mjs";import"../chunk-J45FMNYT.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-H3TJNBHX.mjs";import"../chunk-FTBXTZM2.mjs";import"../chunk-AT2A7OZD.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BSUYPXRD.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YELQZVBK.mjs";import"../chunk-CDIKSNSU.mjs";import"../chunk-TVWAYKEP.mjs";import"../chunk-E7VSBBQM.mjs";import"../chunk-23J256KA.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KEYAPEAX.mjs";import"../chunk-ZZIMFLVT.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-3TSO6PDV.mjs";import"../chunk-UAL27G6B.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-5VQK4F5X.mjs";import"../chunk-EXP5STXZ.mjs";import"../chunk-ZXVQ2OBJ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-P4FYT4LC.mjs";import{a as A}from"./chunk-3XX3675G.mjs";import{a as T}from"./chunk-ELPTV7ZG.mjs";import{a as y}from"./chunk-4QVGK2KD.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-YNLAYIFQ.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-G6HZPSZ3.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return a({...n})}signAsFeePayer(n){let{signer:t,transaction:o}=n;if(!o.feePayerAddress)throw new Error(`Transaction ${o} is not a Fee Payer transaction`);return o.feePayerAddress=t.accountAddress,a({signer:t,transaction:o})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:o,options:P}=n;this.batch.forSingleAccount({sender:t,data:o,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:o}=n;return m({aptosConfig:this.config,signer:t,transaction:o})}};export{h as a};
2
- //# sourceMappingURL=chunk-SYKVA363.mjs.map
1
+ import{a as d}from"./chunk-YTVABX3A.mjs";import{a as A}from"./chunk-F7R7ICUR.mjs";import{a as T}from"./chunk-THSR4POE.mjs";import{a as y}from"./chunk-KHYFJBKG.mjs";import{d as g,e as a,h as m,i as p,j as f}from"./chunk-VBR46X5M.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-AGTINH7K.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return a({...n})}signAsFeePayer(n){let{signer:t,transaction:o}=n;if(!o.feePayerAddress)throw new Error(`Transaction ${o} is not a Fee Payer transaction`);return o.feePayerAddress=t.accountAddress,a({signer:t,transaction:o})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:o,options:P}=n;this.batch.forSingleAccount({sender:t,data:o,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:o}=n;return m({aptosConfig:this.config,signer:t,transaction:o})}};export{h as a};
2
+ //# sourceMappingURL=chunk-2XSLXHVJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as l}from"./chunk-AZ642ORV.mjs";import{a as k,b as c,d as A,e as g,f as P,g as z,h as D,i as m,j as L,l as R,m as X,n as q,o as H,p as J,q as K,s as i,t as Q}from"./chunk-BQPQLOIW.mjs";import{c as j}from"./chunk-K7ZPRL7C.mjs";import{b as S,c as I,d as x,e as M,f as O,g as C,h as _,i as V,n as G}from"./chunk-5FPWLBZT.mjs";import{b as d}from"./chunk-EDVGFSB5.mjs";import{a as y,c as F,d as s}from"./chunk-YELQZVBK.mjs";import{a as w,b as h,c as B,d as E,e as v,f as $,g as b}from"./chunk-E7VSBBQM.mjs";var Y=new TextEncoder;function sn(n){return n?.map(e=>c(e)?l(e):e)??[]}async function W(n,e,t,u){let r=await j({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(o=>o.name===t)}async function fn(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let o=Q(r),T=[];for(let f=o;f<r.params.length;f+=1)T.push(l(r.params[f],{allowGenerics:!0}));return{signers:o,typeParameters:r.generic_type_params,parameters:T}}async function on(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let o=[];for(let f=0;f<r.params.length;f+=1)o.push(l(r.params[f],{allowGenerics:!0}));let T=[];for(let f=0;f<r.return.length;f+=1)T.push(l(r.return[f],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:o,returnTypes:T}}function cn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let o=e.parameters[u];return U(t,o,u,r)}function U(n,e,t,u){return z(n)?(p(e,n,t),n):Z(n,e,t,u)}function Z(n,e,t,u){if(e.isBool()){if(k(n))return new w(n);if(c(n)){if(n==="true")return new w(!0);if(n==="false")return new w(!1)}i("boolean",t)}if(e.isAddress()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){let r=A(n);if(r!==void 0)return new h(r);i("number | string",t)}if(e.isU16()){let r=A(n);if(r!==void 0)return new B(r);i("number | string",t)}if(e.isU32()){let r=A(n);if(r!==void 0)return new E(r);i("number | string",t)}if(e.isU64()){if(g(n))return new v(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return U(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return y.U8(Y.encode(n));if(n instanceof Uint8Array)return y.U8(n);if(n instanceof ArrayBuffer)return y.U8(new Uint8Array(n))}if(Array.isArray(n))return new y(n.map(r=>U(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new F(n);i("string",t)}if(e.isObject()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isOption()){if(P(n)){let r=e.value.typeArgs[0];return r instanceof S?new s(null):r instanceof V?new s(null):r instanceof I?new s(null):r instanceof x?new s(null):r instanceof M?new s(null):r instanceof O?new s(null):r instanceof C?new s(null):r instanceof _?new s(null):new s(null)}return new s(U(n,e.value.typeArgs[0],t,u))}throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function p(n,e,t){if(n.isBool()){if(D(e))return;i("Bool",t)}if(n.isAddress()){if(m(e))return;i("AccountAddress",t)}if(n.isU8()){if(R(e))return;i("U8",t)}if(n.isU16()){if(X(e))return;i("U16",t)}if(n.isU32()){if(q(e))return;i("U32",t)}if(n.isU64()){if(H(e))return;i("U64",t)}if(n.isU128()){if(J(e))return;i("U128",t)}if(n.isU256()){if(K(e))return;i("U256",t)}if(n.isVector()){if(e instanceof y){e.values.length>0&&p(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof G){if(n.isString()){if(L(e))return;i("MoveString",t)}if(n.isObject()){if(m(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof s){e.value!==void 0&&p(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{sn as a,W as b,fn as c,on as d,cn as e,U as f};
2
- //# sourceMappingURL=chunk-5HWJ3SN4.mjs.map
1
+ import{a as k,b as c,d as A,e as g,f as P,g as z,h as D,i as m,j as L,l as R,m as X,n as q,o as H,p as J,q as K,s as i,t as Q}from"./chunk-BQPQLOIW.mjs";import{c as l}from"./chunk-AZ642ORV.mjs";import{c as j}from"./chunk-K7ZPRL7C.mjs";import{b as S,c as I,d as x,e as M,f as O,g as C,h as _,i as V,n as G}from"./chunk-5FPWLBZT.mjs";import{b as d}from"./chunk-EDVGFSB5.mjs";import{a as y,c as F,d as s}from"./chunk-YELQZVBK.mjs";import{a as w,b as h,c as B,d as E,e as v,f as $,g as b}from"./chunk-E7VSBBQM.mjs";var Y=new TextEncoder;function sn(n){return n?.map(e=>c(e)?l(e):e)??[]}async function W(n,e,t,u){let r=await j({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(o=>o.name===t)}async function fn(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let o=Q(r),T=[];for(let f=o;f<r.params.length;f+=1)T.push(l(r.params[f],{allowGenerics:!0}));return{signers:o,typeParameters:r.generic_type_params,parameters:T}}async function on(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let o=[];for(let f=0;f<r.params.length;f+=1)o.push(l(r.params[f],{allowGenerics:!0}));let T=[];for(let f=0;f<r.return.length;f+=1)T.push(l(r.return[f],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:o,returnTypes:T}}function cn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let o=e.parameters[u];return U(t,o,u,r)}function U(n,e,t,u){return z(n)?(p(e,n,t),n):Z(n,e,t,u)}function Z(n,e,t,u){if(e.isBool()){if(k(n))return new w(n);if(c(n)){if(n==="true")return new w(!0);if(n==="false")return new w(!1)}i("boolean",t)}if(e.isAddress()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){let r=A(n);if(r!==void 0)return new h(r);i("number | string",t)}if(e.isU16()){let r=A(n);if(r!==void 0)return new B(r);i("number | string",t)}if(e.isU32()){let r=A(n);if(r!==void 0)return new E(r);i("number | string",t)}if(e.isU64()){if(g(n))return new v(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return U(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return y.U8(Y.encode(n));if(n instanceof Uint8Array)return y.U8(n);if(n instanceof ArrayBuffer)return y.U8(new Uint8Array(n))}if(Array.isArray(n))return new y(n.map(r=>U(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new F(n);i("string",t)}if(e.isObject()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isOption()){if(P(n)){let r=e.value.typeArgs[0];return r instanceof S?new s(null):r instanceof V?new s(null):r instanceof I?new s(null):r instanceof x?new s(null):r instanceof M?new s(null):r instanceof O?new s(null):r instanceof C?new s(null):r instanceof _?new s(null):new s(null)}return new s(U(n,e.value.typeArgs[0],t,u))}throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function p(n,e,t){if(n.isBool()){if(D(e))return;i("Bool",t)}if(n.isAddress()){if(m(e))return;i("AccountAddress",t)}if(n.isU8()){if(R(e))return;i("U8",t)}if(n.isU16()){if(X(e))return;i("U16",t)}if(n.isU32()){if(q(e))return;i("U32",t)}if(n.isU64()){if(H(e))return;i("U64",t)}if(n.isU128()){if(J(e))return;i("U128",t)}if(n.isU256()){if(K(e))return;i("U256",t)}if(n.isVector()){if(e instanceof y){e.values.length>0&&p(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof G){if(n.isString()){if(L(e))return;i("MoveString",t)}if(n.isObject()){if(m(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof s){e.value!==void 0&&p(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{sn as a,W as b,fn as c,on as d,cn as e,U as f};
2
+ //# sourceMappingURL=chunk-3QFDWOUG.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-VBR46X5M.mjs";import{g}from"./chunk-K7ZPRL7C.mjs";import{a as S}from"./chunk-IEH7ILF3.mjs";import{a as f}from"./chunk-MYF2VRVN.mjs";import{a as b}from"./chunk-ZAHUEAGT.mjs";import{i as w,l as K,m as k,n as A,p as x}from"./chunk-DYMN66K5.mjs";import{b as m}from"./chunk-4I6IUAHQ.mjs";import{e as P,f as h}from"./chunk-FTBXTZM2.mjs";import{a as u}from"./chunk-YELQZVBK.mjs";import{b as c}from"./chunk-AOCNYMMX.mjs";async function _(r){let{aptosConfig:s,jwt:p,ephemeralKeyPair:e,uidKey:i="sub",derivationPath:n}=r,o={jwt_b64:p,epk:e.getPublicKey().bcsToHex().toStringWithoutPrefix(),exp_date_secs:e.expiryDateSecs,epk_blinder:c.fromHexInput(e.blinder).toStringWithoutPrefix(),uid_key:i,derivation_path:n},{data:t}=await P({aptosConfig:s,path:"fetch",body:o,originMethod:"getPepper",overrides:{WITH_CREDENTIALS:!1}});return c.fromHexInput(t.pepper).toUint8Array()}async function v(r){let{aptosConfig:s,jwt:p,ephemeralKeyPair:e,pepper:i=await _(r),uidKey:n="sub"}=r;if(c.fromHexInput(i).toUint8Array().length!==f.PEPPER_LENGTH)throw new Error(`Pepper needs to be ${f.PEPPER_LENGTH} bytes`);let{maxExpHorizonSecs:o}=await x({aptosConfig:s}),t={jwt_b64:p,epk:e.getPublicKey().bcsToHex().toStringWithoutPrefix(),epk_blinder:c.fromHexInput(e.blinder).toStringWithoutPrefix(),exp_date_secs:e.expiryDateSecs,exp_horizon_secs:999999999999,pepper:c.fromHexInput(i).toStringWithoutPrefix(),uid_key:n,use_insecure_test_jwk:!0};console.log(JSON.stringify(t));let{data:a}=await h({aptosConfig:s,path:"prove",body:t,originMethod:"getProof",overrides:{WITH_CREDENTIALS:!1}});console.log(JSON.stringify(a));let d=a.proof,l=new K({a:d.a,b:d.b,c:d.c});return new A({proof:new k(l,0),trainingWheelsSignature:m.fromHex(a.training_wheels_signature),expHorizonSecs:o})}async function G(r){let{aptosConfig:s,jwt:p,jwkAddress:e,uidKey:i,proofFetchCallback:n,pepper:o=await _(r)}=r,t=v({...r,pepper:o}),a=n?t:await t;if(e!==void 0){let y=b.fromJwtAndPepper({jwt:p,pepper:o,jwkAddress:e,uidKey:i}),j=await g({aptosConfig:s,authenticationKey:y.authKey().derivedAddress()});return S.create({...r,address:j,proof:a,pepper:o,proofFetchCallback:n,jwkAddress:e})}let d=w.fromJwtAndPepper({jwt:p,pepper:o,uidKey:i}),l=await g({aptosConfig:s,authenticationKey:d.authKey().derivedAddress()});return f.create({...r,address:l,proof:a,pepper:o,proofFetchCallback:n})}async function L(r){let{aptosConfig:s,sender:p,iss:e}=r,i=r.jwksUrl??(e.endsWith("/")?`${e}.well-known/jwks.json`:`${e}/.well-known/jwks.json`),n=await fetch(i);if(!n.ok)throw new Error(`Failed to fetch JWKS: ${n.status} ${n.statusText}`);let o=await n.json();return C({aptosConfig:s,sender:p.accountAddress,data:{function:"0x1::jwks::update_federated_jwk_set",functionArguments:[e,u.MoveString(o.keys.map(t=>t.kid)),u.MoveString(o.keys.map(t=>t.alg)),u.MoveString(o.keys.map(t=>t.e)),u.MoveString(o.keys.map(t=>t.n))]}})}export{_ as a,v as b,G as c,L as d};
2
+ //# sourceMappingURL=chunk-45ILXL6K.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/keyless}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * keyless namespace and without having a dependency cycle error.\n */\nimport { jwtDecode, JwtPayload } from \"jwt-decode\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { postAptosPepperService, postAptosProvingService } from \"../client\";\nimport {\n AccountAddressInput,\n EphemeralSignature,\n Groth16Zkp,\n Hex,\n KeylessPublicKey,\n ZeroKnowledgeSig,\n ZkProof,\n getKeylessConfig,\n} from \"../core\";\nimport { HexInput, ZkpVariant } from \"../types\";\nimport { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from \"../account\";\nimport { PepperFetchRequest, PepperFetchResponse, ProverRequest, ProverResponse } from \"../types/keyless\";\nimport { lookupOriginalAccountAddress } from \"./account\";\nimport { FederatedKeylessPublicKey } from \"../core/crypto/federatedKeyless\";\nimport { FederatedKeylessAccount } from \"../account/FederatedKeylessAccount\";\nimport { MoveVector } from \"../bcs\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { SimpleTransaction } from \"../transactions\";\n\nexport async function getPepper(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n uidKey?: string;\n derivationPath?: string;\n}): Promise<Uint8Array> {\n const { aptosConfig, jwt, ephemeralKeyPair, uidKey = \"sub\", derivationPath } = args;\n\n const body = {\n jwt_b64: jwt,\n epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),\n exp_date_secs: ephemeralKeyPair.expiryDateSecs,\n epk_blinder: Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),\n uid_key: uidKey,\n derivation_path: derivationPath,\n };\n const { data } = await postAptosPepperService<PepperFetchRequest, PepperFetchResponse>({\n aptosConfig,\n path: \"fetch\",\n body,\n originMethod: \"getPepper\",\n overrides: { WITH_CREDENTIALS: false },\n });\n return Hex.fromHexInput(data.pepper).toUint8Array();\n}\n\nexport async function getProof(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n pepper?: HexInput;\n uidKey?: string;\n}): Promise<ZeroKnowledgeSig> {\n const { aptosConfig, jwt, ephemeralKeyPair, pepper = await getPepper(args), uidKey = \"sub\" } = args;\n if (Hex.fromHexInput(pepper).toUint8Array().length !== KeylessAccount.PEPPER_LENGTH) {\n throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);\n }\n const { maxExpHorizonSecs } = await getKeylessConfig({ aptosConfig });\n // if (maxExpHorizonSecs < ephemeralKeyPair.expiryDateSecs - jwtDecode<JwtPayload>(jwt).iat!) {\n // throw Error(`The EphemeralKeyPair is too long lived. It's lifespan must be less than ${maxExpHorizonSecs}`);\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: ephemeralKeyPair.expiryDateSecs,\n exp_horizon_secs: 999_999_999_999,\n pepper: Hex.fromHexInput(pepper).toStringWithoutPrefix(),\n uid_key: uidKey,\n use_insecure_test_jwk: true,\n };\n\n console.log(JSON.stringify(json))\n\n const { data } = await postAptosProvingService<ProverRequest, ProverResponse>({\n aptosConfig,\n path: \"prove\",\n body: json,\n originMethod: \"getProof\",\n overrides: { WITH_CREDENTIALS: false },\n });\n\n console.log(JSON.stringify(data))\n\n const proofPoints = data.proof;\n const groth16Zkp = new Groth16Zkp({\n a: proofPoints.a,\n b: proofPoints.b,\n c: proofPoints.c,\n });\n\n const signedProof = new ZeroKnowledgeSig({\n proof: new ZkProof(groth16Zkp, ZkpVariant.Groth16),\n trainingWheelsSignature: EphemeralSignature.fromHex(data.training_wheels_signature),\n expHorizonSecs: maxExpHorizonSecs,\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 proofFetchCallback?: ProofFetchCallback;\n}): Promise<KeylessAccount>;\n\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<FederatedKeylessAccount>;\n\nexport async function deriveKeylessAccount(args: {\n aptosConfig: AptosConfig;\n jwt: string;\n ephemeralKeyPair: EphemeralKeyPair;\n jwkAddress?: AccountAddressInput;\n uidKey?: string;\n pepper?: HexInput;\n proofFetchCallback?: ProofFetchCallback;\n}): Promise<KeylessAccount | FederatedKeylessAccount> {\n const { aptosConfig, jwt, jwkAddress, uidKey, proofFetchCallback, pepper = await getPepper(args) } = args;\n const proofPromise = getProof({ ...args, pepper });\n // If a callback is provided, pass in the proof as a promise to KeylessAccount.create. This will make the proof be fetched in the\n // background and the callback will handle the outcome of the fetch. This allows the developer to not have to block on the proof fetch\n // allowing for faster rendering of UX.\n //\n // If no callback is provided, the just await the proof fetch and continue syncronously.\n const proof = proofFetchCallback ? proofPromise : await proofPromise;\n\n // Look up the original address to handle key rotations and then instantiate the account.\n if (jwkAddress !== undefined) {\n const publicKey = FederatedKeylessPublicKey.fromJwtAndPepper({ jwt, pepper, jwkAddress, uidKey });\n const address = await lookupOriginalAccountAddress({\n aptosConfig,\n authenticationKey: publicKey.authKey().derivedAddress(),\n });\n\n return FederatedKeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback, jwkAddress });\n }\n\n const publicKey = KeylessPublicKey.fromJwtAndPepper({ jwt, pepper, uidKey });\n const address = await lookupOriginalAccountAddress({\n aptosConfig,\n authenticationKey: publicKey.authKey().derivedAddress(),\n });\n return KeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback });\n}\n\ninterface JWK {\n kty: string; // Key type\n kid: string; // Key ID\n alg: string; // Algorithm used with the key\n n: string; // Modulus (for RSA keys)\n e: string; // Exponent (for RSA keys)\n}\n\ninterface JWKS {\n keys: JWK[];\n}\n\nexport async function updateFederatedKeylessJwkSetTransaction(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n iss: string;\n jwksUrl?: string;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, iss } = args;\n const jwksUrl = args.jwksUrl ?? (iss.endsWith(\"/\") ? `${iss}.well-known/jwks.json` : `${iss}/.well-known/jwks.json`);\n const response = await fetch(jwksUrl);\n if (!response.ok) {\n throw new Error(`Failed to fetch JWKS: ${response.status} ${response.statusText}`);\n }\n const jwks: JWKS = await response.json();\n return generateTransaction({\n aptosConfig,\n sender: sender.accountAddress,\n data: {\n function: \"0x1::jwks::update_federated_jwk_set\",\n functionArguments: [\n iss,\n MoveVector.MoveString(jwks.keys.map((key) => key.kid)),\n MoveVector.MoveString(jwks.keys.map((key) => key.alg)),\n MoveVector.MoveString(jwks.keys.map((key) => key.e)),\n MoveVector.MoveString(jwks.keys.map((key) => key.n)),\n ],\n },\n });\n}\n"],"mappings":"wbAgCA,eAAsBA,EAAUC,EAMR,CACtB,GAAM,CAAE,YAAAC,EAAa,IAAAC,EAAK,iBAAAC,EAAkB,OAAAC,EAAS,MAAO,eAAAC,CAAe,EAAIL,EAEzEM,EAAO,CACX,QAASJ,EACT,IAAKC,EAAiB,aAAa,EAAE,SAAS,EAAE,sBAAsB,EACtE,cAAeA,EAAiB,eAChC,YAAaI,EAAI,aAAaJ,EAAiB,OAAO,EAAE,sBAAsB,EAC9E,QAASC,EACT,gBAAiBC,CACnB,EACM,CAAE,KAAAG,CAAK,EAAI,MAAMC,EAAgE,CACrF,YAAAR,EACA,KAAM,QACN,KAAAK,EACA,aAAc,YACd,UAAW,CAAE,iBAAkB,EAAM,CACvC,CAAC,EACD,OAAOC,EAAI,aAAaC,EAAK,MAAM,EAAE,aAAa,CACpD,CAEA,eAAsBE,EAASV,EAMD,CAC5B,GAAM,CAAE,YAAAC,EAAa,IAAAC,EAAK,iBAAAC,EAAkB,OAAAQ,EAAS,MAAMZ,EAAUC,CAAI,EAAG,OAAAI,EAAS,KAAM,EAAIJ,EAC/F,GAAIO,EAAI,aAAaI,CAAM,EAAE,aAAa,EAAE,SAAWC,EAAe,cACpE,MAAM,IAAI,MAAM,sBAAsBA,EAAe,aAAa,QAAQ,EAE5E,GAAM,CAAE,kBAAAC,CAAkB,EAAI,MAAMC,EAAiB,CAAE,YAAAb,CAAY,CAAC,EAI9Dc,EAAO,CACX,QAASb,EACT,IAAKC,EAAiB,aAAa,EAAE,SAAS,EAAE,sBAAsB,EACtE,YAAaI,EAAI,aAAaJ,EAAiB,OAAO,EAAE,sBAAsB,EAC9E,cAAeA,EAAiB,eAChC,iBAAkB,aAClB,OAAQI,EAAI,aAAaI,CAAM,EAAE,sBAAsB,EACvD,QAASP,EACT,sBAAuB,EACzB,EAEA,QAAQ,IAAI,KAAK,UAAUW,CAAI,CAAC,EAEhC,GAAM,CAAE,KAAAP,CAAK,EAAI,MAAMQ,EAAuD,CAC5E,YAAAf,EACA,KAAM,QACN,KAAMc,EACN,aAAc,WACd,UAAW,CAAE,iBAAkB,EAAM,CACvC,CAAC,EAED,QAAQ,IAAI,KAAK,UAAUP,CAAI,CAAC,EAEhC,IAAMS,EAAcT,EAAK,MACnBU,EAAa,IAAIC,EAAW,CAChC,EAAGF,EAAY,EACf,EAAGA,EAAY,EACf,EAAGA,EAAY,CACjB,CAAC,EAOD,OALoB,IAAIG,EAAiB,CACvC,MAAO,IAAIC,EAAQH,GAA8B,EACjD,wBAAyBI,EAAmB,QAAQd,EAAK,yBAAyB,EAClF,eAAgBK,CAClB,CAAC,CAEH,CAqBA,eAAsBU,EAAqBvB,EAQW,CACpD,GAAM,CAAE,YAAAC,EAAa,IAAAC,EAAK,WAAAsB,EAAY,OAAApB,EAAQ,mBAAAqB,EAAoB,OAAAd,EAAS,MAAMZ,EAAUC,CAAI,CAAE,EAAIA,EAC/F0B,EAAehB,EAAS,CAAE,GAAGV,EAAM,OAAAW,CAAO,CAAC,EAM3CgB,EAAQF,EAAqBC,EAAe,MAAMA,EAGxD,GAAIF,IAAe,OAAW,CAC5B,IAAMI,EAAYC,EAA0B,iBAAiB,CAAE,IAAA3B,EAAK,OAAAS,EAAQ,WAAAa,EAAY,OAAApB,CAAO,CAAC,EAC1F0B,EAAU,MAAMC,EAA6B,CACjD,YAAA9B,EACA,kBAAmB2B,EAAU,QAAQ,EAAE,eAAe,CACxD,CAAC,EAED,OAAOI,EAAwB,OAAO,CAAE,GAAGhC,EAAM,QAAA8B,EAAS,MAAAH,EAAO,OAAAhB,EAAQ,mBAAAc,EAAoB,WAAAD,CAAW,CAAC,CAC3G,CAEA,IAAMI,EAAYK,EAAiB,iBAAiB,CAAE,IAAA/B,EAAK,OAAAS,EAAQ,OAAAP,CAAO,CAAC,EACrE0B,EAAU,MAAMC,EAA6B,CACjD,YAAA9B,EACA,kBAAmB2B,EAAU,QAAQ,EAAE,eAAe,CACxD,CAAC,EACD,OAAOhB,EAAe,OAAO,CAAE,GAAGZ,EAAM,QAAA8B,EAAS,MAAAH,EAAO,OAAAhB,EAAQ,mBAAAc,CAAmB,CAAC,CACtF,CAcA,eAAsBS,EAAwClC,EAK/B,CAC7B,GAAM,CAAE,YAAAC,EAAa,OAAAkC,EAAQ,IAAAC,CAAI,EAAIpC,EAC/BqC,EAAUrC,EAAK,UAAYoC,EAAI,SAAS,GAAG,EAAI,GAAGA,CAAG,wBAA0B,GAAGA,CAAG,0BACrFE,EAAW,MAAM,MAAMD,CAAO,EACpC,GAAI,CAACC,EAAS,GACZ,MAAM,IAAI,MAAM,yBAAyBA,EAAS,MAAM,IAAIA,EAAS,UAAU,EAAE,EAEnF,IAAMC,EAAa,MAAMD,EAAS,KAAK,EACvC,OAAOE,EAAoB,CACzB,YAAAvC,EACA,OAAQkC,EAAO,eACf,KAAM,CACJ,SAAU,sCACV,kBAAmB,CACjBC,EACAK,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,GAAG,CAAC,EACrDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,GAAG,CAAC,EACrDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,CAAC,CAAC,EACnDD,EAAW,WAAWF,EAAK,KAAK,IAAKG,GAAQA,EAAI,CAAC,CAAC,CACrD,CACF,CACF,CAAC,CACH","names":["getPepper","args","aptosConfig","jwt","ephemeralKeyPair","uidKey","derivationPath","body","Hex","data","postAptosPepperService","getProof","pepper","KeylessAccount","maxExpHorizonSecs","getKeylessConfig","json","postAptosProvingService","proofPoints","groth16Zkp","Groth16Zkp","ZeroKnowledgeSig","ZkProof","EphemeralSignature","deriveKeylessAccount","jwkAddress","proofFetchCallback","proofPromise","proof","publicKey","FederatedKeylessPublicKey","address","lookupOriginalAccountAddress","FederatedKeylessAccount","KeylessPublicKey","updateFederatedKeylessJwkSetTransaction","sender","iss","jwksUrl","response","jwks","generateTransaction","MoveVector","key"]}
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-G6HZPSZ3.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";import{d as c}from"./chunk-FTBXTZM2.mjs";import{d as r}from"./chunk-EXP5STXZ.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
- //# sourceMappingURL=chunk-VVWBJKEA.mjs.map
1
+ import{g as e}from"./chunk-AGTINH7K.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";import{d as c}from"./chunk-FTBXTZM2.mjs";import{d as r}from"./chunk-EXP5STXZ.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
+ //# sourceMappingURL=chunk-4X4ODN6K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-LY7ZRAJT.mjs";import{a as m}from"./chunk-YNLAYIFQ.mjs";import{c as A}from"./chunk-J45FMNYT.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-EDVGFSB5.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",O="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",v={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:O,custom:null,devnet:null};function d(e){let t=v[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,O as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
- //# sourceMappingURL=chunk-KBIYKNM2.mjs.map
1
+ import{a as g}from"./chunk-YRXUBXIJ.mjs";import{a as m}from"./chunk-VBR46X5M.mjs";import{c as A}from"./chunk-J45FMNYT.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-EDVGFSB5.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",O="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",v={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:O,custom:null,devnet:null};function d(e){let t=v[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,O as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
+ //# sourceMappingURL=chunk-5JRPODDO.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-G6HZPSZ3.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-RLGIYYI7.mjs.map
1
+ import{h as e}from"./chunk-AGTINH7K.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-5MZJD6SA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-U72MLMGP.mjs";import{a as e}from"./chunk-RLGIYYI7.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";var L=class{constructor(t){this.config=t}async getCollectionData(t){await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"});let{creatorAddress:N,collectionName:_,options:n}=t,w=s.from(N),r={collection_name:{_eq:_},creator_address:{_eq:w.toStringLong()}};return n?.tokenStandard&&(r.token_standard={_eq:n?.tokenStandard??"v2"}),d({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),u({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),A({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),y({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),o({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return p({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return m({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return l({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return T({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return f({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return C({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return I({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return O({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return P({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return D({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return V({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return h({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return R({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return G({aptosConfig:this.config,...t})}};export{L as a};
2
- //# sourceMappingURL=chunk-2MDJ763P.mjs.map
1
+ import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-GUVL374I.mjs";import{a as e}from"./chunk-5MZJD6SA.mjs";import{b as s}from"./chunk-EDVGFSB5.mjs";var L=class{constructor(t){this.config=t}async getCollectionData(t){await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"});let{creatorAddress:N,collectionName:_,options:n}=t,w=s.from(N),r={collection_name:{_eq:_},creator_address:{_eq:w.toStringLong()}};return n?.tokenStandard&&(r.token_standard={_eq:n?.tokenStandard??"v2"}),d({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),u({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),A({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),y({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),o({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return p({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return m({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return l({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return T({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return f({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return C({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return I({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return O({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return P({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return D({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return V({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return h({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return R({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return G({aptosConfig:this.config,...t})}};export{L as a};
2
+ //# sourceMappingURL=chunk-7WCH4LAM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-QQGCMXIV.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-CSNIVFPZ.mjs.map
1
+ import{a as o}from"./chunk-XUJXTPLV.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-ABAIELQE.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as x,f as B}from"./chunk-J45FMNYT.mjs";import{a as k}from"./chunk-AH44UPM4.mjs";import{b as f,d as A}from"./chunk-H3TJNBHX.mjs";import{a as d}from"./chunk-UAL27G6B.mjs";import{a as b}from"./chunk-3TSO6PDV.mjs";import{d as C}from"./chunk-EXP5STXZ.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function G(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function W(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function O(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function q(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function z(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),e=BigInt(-1);for(;e<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(t,s){super(t);this.lastSubmittedTransaction=s}},T=class extends Error{constructor(t,s){super(t);this.transaction=s}};async function U(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function X(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,G as b,W as c,y as d,O as e,R as f,q as g,z as h,m as i,T as j,U as k,X as l};
2
- //# sourceMappingURL=chunk-G6HZPSZ3.mjs.map
1
+ import{e as x,f as B}from"./chunk-J45FMNYT.mjs";import{a as k}from"./chunk-AH44UPM4.mjs";import{b as f,d as A}from"./chunk-H3TJNBHX.mjs";import{a as b}from"./chunk-3TSO6PDV.mjs";import{a as d}from"./chunk-UAL27G6B.mjs";import{d as C}from"./chunk-EXP5STXZ.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function G(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function W(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function O(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function q(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function z(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),e=BigInt(-1);for(;e<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(t,s){super(t);this.lastSubmittedTransaction=s}},T=class extends Error{constructor(t,s){super(t);this.transaction=s}};async function U(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function X(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,G as b,W as c,y as d,O as e,R as f,q as g,z as h,m as i,T as j,U as k,X as l};
2
+ //# sourceMappingURL=chunk-AGTINH7K.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-TKQEC2WD.mjs";import{a as n}from"./chunk-RLGIYYI7.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
- //# sourceMappingURL=chunk-S7KCJQOA.mjs.map
1
+ import{a as o,b as r,c as t,d as s}from"./chunk-TKQEC2WD.mjs";import{a as n}from"./chunk-5MZJD6SA.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
+ //# sourceMappingURL=chunk-ASQ2YBOR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w,b as S}from"./chunk-E2WOZVJX.mjs";import{d as h}from"./chunk-BC5BEOKM.mjs";import{a,b as c}from"./chunk-ASQIKTEF.mjs";import{i as m,j as g,k as P,n as K}from"./chunk-DYMN66K5.mjs";import{b as d}from"./chunk-EDVGFSB5.mjs";import{d as y}from"./chunk-UAL27G6B.mjs";import{a as n}from"./chunk-ZZIMFLVT.mjs";import{b as f}from"./chunk-AOCNYMMX.mjs";import H from"eventemitter3";var o=class o extends n{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:A,aud:b,pepper:x,proof:s,proofFetchCallback:l,jwt:T}=e;if(this.ephemeralKeyPair=t,this.publicKey=m.create(e),this.accountAddress=r?d.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=A,this.aud=b,this.jwt=T,this.emitter=new H,this.proofOrPromise=s,s instanceof K)this.proof=s;else{if(l===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async v=>{await l(v),this.emitter.removeAllListeners()}),this.init(s)}this.signingScheme=2;let u=f.fromHexInput(x).toUint8Array();if(u.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=u}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new c(this.sign(e)),t=new a(this.publicKey);return new h(t,r)}signTransactionWithAuthenticator(e){let r=new c(this.signTransaction(e)),t=new a(this.publicKey);return new h(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new g({jwtHeader:y(this.jwt.split(".")[0]),ephemeralCertificate:new P(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=w(e),i=new p(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}};o.PEPPER_LENGTH=31;var F=o,p=class extends n{constructor(e,r){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=r}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return S(this.bcsToBytes(),this.domainSeparator)}};export{F as a,p as b};
2
- //# sourceMappingURL=chunk-UYYQZDVB.mjs.map
1
+ import{a as w,b as S}from"./chunk-E2WOZVJX.mjs";import{d as h}from"./chunk-BC5BEOKM.mjs";import{a,b as c}from"./chunk-ASQIKTEF.mjs";import{i as m,j as g,k as P,n as K}from"./chunk-DYMN66K5.mjs";import{b as d}from"./chunk-EDVGFSB5.mjs";import{a as n}from"./chunk-ZZIMFLVT.mjs";import{b as f}from"./chunk-AOCNYMMX.mjs";import{d as y}from"./chunk-UAL27G6B.mjs";import H from"eventemitter3";var o=class o extends n{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:A,aud:b,pepper:x,proof:s,proofFetchCallback:l,jwt:T}=e;if(this.ephemeralKeyPair=t,this.publicKey=m.create(e),this.accountAddress=r?d.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=A,this.aud=b,this.jwt=T,this.emitter=new H,this.proofOrPromise=s,s instanceof K)this.proof=s;else{if(l===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async v=>{await l(v),this.emitter.removeAllListeners()}),this.init(s)}this.signingScheme=2;let u=f.fromHexInput(x).toUint8Array();if(u.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=u}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new c(this.sign(e)),t=new a(this.publicKey);return new h(t,r)}signTransactionWithAuthenticator(e){let r=new c(this.signTransaction(e)),t=new a(this.publicKey);return new h(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new g({jwtHeader:y(this.jwt.split(".")[0]),ephemeralCertificate:new P(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=w(e),i=new p(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}};o.PEPPER_LENGTH=31;var F=o,p=class extends n{constructor(e,r){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=e,this.proof=r}serialize(e){e.serializeFixedBytes(this.transaction.bcsToBytes()),e.serializeOption(this.proof)}hash(){return S(this.bcsToBytes(),this.domainSeparator)}};export{F as a,p as b};
2
+ //# sourceMappingURL=chunk-CUDIVR4U.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as t,c as o,d as s}from"./chunk-MSK4O4KB.mjs";var i=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return t({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}async updateFederatedKeylessJwkSetTransaction(e){return s({aptosConfig:this.config,...e})}};export{i as a};
2
- //# sourceMappingURL=chunk-CBRVPQV6.mjs.map
1
+ import{a as r,b as t,c as o,d as s}from"./chunk-45ILXL6K.mjs";var i=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return t({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}async updateFederatedKeylessJwkSetTransaction(e){return s({aptosConfig:this.config,...e})}};export{i as a};
2
+ //# sourceMappingURL=chunk-ETQA37EP.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-YNLAYIFQ.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-3XX3675G.mjs.map
1
+ import{b as s}from"./chunk-6EMN3BOV.mjs";import{f as r}from"./chunk-VBR46X5M.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-F7R7ICUR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-VVWBJKEA.mjs";import{h as r}from"./chunk-G6HZPSZ3.mjs";var i=class{constructor(o){this.config=o}async fundAccount(o){let n=await t({aptosConfig:this.config,...o});return(o.options?.waitForIndexer===void 0||o.options?.waitForIndexer)&&await r({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version),processorType:"fungible_asset_processor"}),n}};export{i as a};
2
- //# sourceMappingURL=chunk-MYRN7MDF.mjs.map
1
+ import{a as t}from"./chunk-4X4ODN6K.mjs";import{h as r}from"./chunk-AGTINH7K.mjs";var i=class{constructor(o){this.config=o}async fundAccount(o){let n=await t({aptosConfig:this.config,...o});return(o.options?.waitForIndexer===void 0||o.options?.waitForIndexer)&&await r({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version),processorType:"fungible_asset_processor"}),n}};export{i as a};
2
+ //# sourceMappingURL=chunk-FLNLQ7K5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-YNLAYIFQ.mjs";import{f as M}from"./chunk-5HWJ3SN4.mjs";import{c as R}from"./chunk-AZ642ORV.mjs";import{c as k}from"./chunk-J45FMNYT.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-5FPWLBZT.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as _,c as d}from"./chunk-YELQZVBK.mjs";import{a as T,e as D}from"./chunk-E7VSBBQM.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
2
- //# sourceMappingURL=chunk-U72MLMGP.mjs.map
1
+ import{a as u}from"./chunk-VBR46X5M.mjs";import{f as M}from"./chunk-3QFDWOUG.mjs";import{c as R}from"./chunk-AZ642ORV.mjs";import{c as k}from"./chunk-J45FMNYT.mjs";import{A as V,m as O,y as q,z as G}from"./chunk-VHNX2NUR.mjs";import{b as w,f as h,i as x,l as A,m as f,n as i,q as p,s as y}from"./chunk-5FPWLBZT.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as _,c as d}from"./chunk-YELQZVBK.mjs";import{a as T,e as D}from"./chunk-E7VSBBQM.mjs";import{d as E}from"./chunk-56CNRT2K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},l="0x4::token::Token";async function It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await k({aptosConfig:o,query:{query:V,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await k({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function bt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},s={query:G,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function St(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},s={query:q,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await k({aptosConfig:o,query:s,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var F={typeParameters:[],parameters:[new i(p()),new h,new i(p()),new i(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new h,new h]};async function Dt(t){let{aptosConfig:o,options:n,creator:e}=t;return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new d(t.description),new D(t.maxSupply??E),new d(t.name),new d(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new D(t.royaltyNumerator??0),new D(t.royaltyDenominator??1)],abi:F},options:n})}async function v(t){let{aptosConfig:o,options:n}=t,e=n?.where;n?.tokenStandard&&(e.token_standard={_eq:n?.tokenStandard??"v2"});let r={query:O,variables:{where_condition:e,offset:n?.offset,limit:n?.limit}};return(await k({aptosConfig:o,query:r,originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,s=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:s.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...r,where:a}})}async function vt(t){let{aptosConfig:o,creatorAddress:n,options:e}=t,s={creator_address:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function xt(t){let{aptosConfig:o,collectionId:n,options:e}=t,s={collection_id:{_eq:c.from(n).toStringLong()}};return e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard??"v2"}),v({aptosConfig:o,options:{...e,where:s}})}async function Gt(t){let{creatorAddress:o,collectionName:n,options:e,aptosConfig:r}=t,s=c.from(o),a={collection_name:{_eq:n},creator_address:{_eq:s.toStringLong()}};return e?.tokenStandard&&(a.token_standard={_eq:e?.tokenStandard??"v2"}),(await v({aptosConfig:r,options:{where:a}})).collection_id}var N={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8())]};async function Bt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:s,name:a,uri:m,propertyKeys:g,propertyTypes:P,propertyValues:I}=t,b=P?.map(S=>C[S]);return u({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new d(r),new d(s),new d(a),new d(m),_.MoveString(g??[]),_.MoveString(b??[]),K(I??[],b??[])],abi:N},options:n})}var Q={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new x]};async function Et(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[s??l],functionArguments:[c.from(e),c.from(r)],abi:Q},options:a})}var Y={typeParameters:[],parameters:[new i(p()),new i(p()),new i(p()),new i(p()),new f(new i(p())),new f(new i(p())),new f(f.u8()),new x]};async function Ot(t){let{aptosConfig:o,account:n,collection:e,description:r,name:s,uri:a,recipient:m,propertyKeys:g,propertyTypes:P,propertyValues:I,options:b}=t;if(g?.length!==I?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==I?.length)throw new Error("Property types and property values counts do not match");let S=P?.map(U=>C[U]);return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,s,a,_.MoveString(g??[]),_.MoveString(S??[]),K(I??[],S??[]),m],abi:Y},options:b})}var L={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??l],functionArguments:[c.from(e)],abi:L},options:s})}var z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Vt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:z},options:s})}var j={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0)))]};async function Rt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:s}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??l],functionArguments:[e],abi:j},options:s})}var W={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Mt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:W},options:a})}var X={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Kt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Ut(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),_.U8(B(s,C[r]))],abi:J},options:g})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p())]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:s,options:a}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[s??l],functionArguments:[c.from(r),new d(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new i(y(new A(0))),new i(p()),new i(p()),f.u8()]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[m??l],functionArguments:[c.from(a),new d(e),new d(C[r]),B(s,C[r])],abi:$},options:g})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Yt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:tt},options:g})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new i(y(new A(0))),new i(p()),new A(1)]};async function Lt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:s,digitalAssetAddress:a,digitalAssetType:m,options:g}=t;return u({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[m??l,C[r]],functionArguments:[c.from(a),new d(e),s],abi:et},options:g})}function K(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=R(o);return M(t,n,0,[]).bcsToBytes()}export{It as a,Pt as b,bt as c,St as d,Dt as e,v as f,ht as g,vt as h,xt as i,Gt as j,Bt as k,Et as l,Ot as m,qt as n,Vt as o,Rt as p,Mt as q,Kt as r,Ut as s,Ft as t,Nt as u,Qt as v,Yt as w,Lt as x};
2
+ //# sourceMappingURL=chunk-GUVL374I.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l,c as an,d as rn,e as R}from"./chunk-5HWJ3SN4.mjs";import{r as en,u as y}from"./chunk-BQPQLOIW.mjs";import{a as nn}from"./chunk-K7ZPRL7C.mjs";import{b as tn}from"./chunk-G6HZPSZ3.mjs";import{a as Y}from"./chunk-J45FMNYT.mjs";import{a as Q}from"./chunk-7BPKOPP7.mjs";import{a as A}from"./chunk-OOVNFKA6.mjs";import{a as J}from"./chunk-GKRIMGKW.mjs";import{a as L,c as Z,d as j}from"./chunk-ND23H3AK.mjs";import{c as O,d as V,e as q,f as x,g as H,h as X,i as z}from"./chunk-SVO6PVAX.mjs";import{b as E,d as B,e as F,f as D}from"./chunk-ZASN3QQQ.mjs";import{a as k,b as p,d as g}from"./chunk-BC5BEOKM.mjs";import{a as v}from"./chunk-UW5TIZFE.mjs";import{a as S,b}from"./chunk-ASQIKTEF.mjs";import{a as N}from"./chunk-QTTDBQAJ.mjs";import{a as K}from"./chunk-ZAHUEAGT.mjs";import{i as P,j as _}from"./chunk-DYMN66K5.mjs";import{b as $,d as M}from"./chunk-7T5CUI2H.mjs";import{b as u}from"./chunk-EDVGFSB5.mjs";import{a as C}from"./chunk-AH44UPM4.mjs";import{a as U}from"./chunk-BSUYPXRD.mjs";import{b as w}from"./chunk-AOCNYMMX.mjs";import{g as I}from"./chunk-5VQK4F5X.mjs";import{b as W,c as G}from"./chunk-EXP5STXZ.mjs";import{sha3_256 as mn}from"@noble/hashes/sha3";async function vn(n){if(en(n))return fn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:an});return An({...n,abi:a})}function An(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(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=x.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new q(new X(s,new z(c)))}return new V(c)}async function On(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:rn});return yn({abi:a,...n})}function yn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(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 x.build(`${e}::${i}`,a,r,o)}function fn(n){return new O(new H(w.fromHexInput(n.bytecode).toUint8Array(),l(n.typeArguments),n.functionArguments))}async function pn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>I[t.network]?{chainId:I[t.network]}:{chainId:(await Y({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await tn({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await nn({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},h]=await Promise.all([o(),c(),s()]),{maxGasAmount:cn,gasUnitPrice:un,expireTimestamp:dn}={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 L(u.from(e),BigInt(h),i,BigInt(cn),BigInt(un),BigInt(dn),new v(d))}async function Vn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await pn({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 Q(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new J(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function qn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=T(t);if(e.feePayerAddress){let c=new j(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(h=>T(h)));let d=T(a),m=new F(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new Z(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>T(m));let d=new B(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof p)o=new E(r.public_key,r.signature);else if(r instanceof g)o=new D(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function T(n){let e=P.isInstance(n)||K.isInstance(n)||N.isInstance(n)?new S(n):n,i=new M(new Uint8Array(64));if($.isInstance(e))return new p(e,i);if(S.isInstance(e))return P.isInstance(e.publicKey)?new g(e,new b(_.getSimulationSignature())):new g(e,new b(i));throw new Error("Unsupported public key")}function gn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=U(k,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 F(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 B(a,t.secondarySignerAddresses,i)}else a instanceof p?r=new E(a.public_key,a.signature):r=new D(a);return new A(t.rawTransaction,r).bcsToBytes()}function on(n){let t=mn.create();for(let e of n)t.update(e);return t.digest()}var ln=on(["APTOS::Transaction"]);function Hn(n){let t=gn(n);return new w(on([ln,new Uint8Array([0]),t])).toString()}async function sn({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:C(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{vn as a,An as b,On as c,yn as d,pn as e,Vn as f,qn as g,T as h,gn as i,on as j,Hn as k};
2
- //# sourceMappingURL=chunk-QIOBANW2.mjs.map
1
+ import{a as l,c as an,d as rn,e as R}from"./chunk-3QFDWOUG.mjs";import{r as en,u as y}from"./chunk-BQPQLOIW.mjs";import{a as nn}from"./chunk-K7ZPRL7C.mjs";import{b as tn}from"./chunk-AGTINH7K.mjs";import{a as Y}from"./chunk-J45FMNYT.mjs";import{a as Q}from"./chunk-7BPKOPP7.mjs";import{a as A}from"./chunk-OOVNFKA6.mjs";import{a as J}from"./chunk-GKRIMGKW.mjs";import{a as L,c as Z,d as j}from"./chunk-ND23H3AK.mjs";import{c as O,d as V,e as q,f as x,g as H,h as X,i as z}from"./chunk-SVO6PVAX.mjs";import{b as E,d as B,e as F,f as D}from"./chunk-ZASN3QQQ.mjs";import{a as k,b as p,d as g}from"./chunk-BC5BEOKM.mjs";import{a as v}from"./chunk-UW5TIZFE.mjs";import{a as S,b}from"./chunk-ASQIKTEF.mjs";import{a as N}from"./chunk-QTTDBQAJ.mjs";import{a as K}from"./chunk-ZAHUEAGT.mjs";import{i as P,j as _}from"./chunk-DYMN66K5.mjs";import{b as $,d as M}from"./chunk-7T5CUI2H.mjs";import{b as u}from"./chunk-EDVGFSB5.mjs";import{a as C}from"./chunk-AH44UPM4.mjs";import{a as U}from"./chunk-BSUYPXRD.mjs";import{b as w}from"./chunk-AOCNYMMX.mjs";import{g as I}from"./chunk-5VQK4F5X.mjs";import{b as W,c as G}from"./chunk-EXP5STXZ.mjs";import{sha3_256 as mn}from"@noble/hashes/sha3";async function vn(n){if(en(n))return fn(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:an});return An({...n,abi:a})}function An(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(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=x.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new q(new X(s,new z(c)))}return new V(c)}async function On(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await sn({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:rn});return yn({abi:a,...n})}function yn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=l(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 x.build(`${e}::${i}`,a,r,o)}function fn(n){return new O(new H(w.fromHexInput(n.bytecode).toUint8Array(),l(n.typeArguments),n.functionArguments))}async function pn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>I[t.network]?{chainId:I[t.network]}:{chainId:(await Y({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await tn({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await nn({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},h]=await Promise.all([o(),c(),s()]),{maxGasAmount:cn,gasUnitPrice:un,expireTimestamp:dn}={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 L(u.from(e),BigInt(h),i,BigInt(cn),BigInt(un),BigInt(dn),new v(d))}async function Vn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await pn({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 Q(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new J(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function qn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=T(t);if(e.feePayerAddress){let c=new j(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(h=>T(h)));let d=T(a),m=new F(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new Z(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>T(m));let d=new B(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof p)o=new E(r.public_key,r.signature);else if(r instanceof g)o=new D(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function T(n){let e=P.isInstance(n)||K.isInstance(n)||N.isInstance(n)?new S(n):n,i=new M(new Uint8Array(64));if($.isInstance(e))return new p(e,i);if(S.isInstance(e))return P.isInstance(e.publicKey)?new g(e,new b(_.getSimulationSignature())):new g(e,new b(i));throw new Error("Unsupported public key")}function gn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=U(k,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 F(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 B(a,t.secondarySignerAddresses,i)}else a instanceof p?r=new E(a.public_key,a.signature):r=new D(a);return new A(t.rawTransaction,r).bcsToBytes()}function on(n){let t=mn.create();for(let e of n)t.update(e);return t.digest()}var ln=on(["APTOS::Transaction"]);function Hn(n){let t=gn(n);return new w(on([ln,new Uint8Array([0]),t])).toString()}async function sn({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:C(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{vn as a,An as b,On as c,yn as d,pn as e,Vn as f,qn as g,T as h,gn as i,on as j,Hn as k};
2
+ //# sourceMappingURL=chunk-HIJU5HEA.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as h,c as d,e as m}from"./chunk-IVVWQKCF.mjs";import{a as c,b as u}from"./chunk-4I6IUAHQ.mjs";import{c as s}from"./chunk-7T5CUI2H.mjs";import{b,c as K}from"./chunk-UAL27G6B.mjs";import{a as l}from"./chunk-KEYAPEAX.mjs";import{a as y}from"./chunk-ZZIMFLVT.mjs";import{b as p}from"./chunk-AOCNYMMX.mjs";import{randomBytes as E}from"@noble/hashes/utils";var S=1209600,i=class i extends y{constructor(e){super();let{privateKey:r,expiryDateSecs:a,blinder:n}=e;this.privateKey=r,this.publicKey=new c(r.publicKey()),this.expiryDateSecs=a||K(b()+S),this.blinder=n!==void 0?p.fromHexInput(n).toUint8Array():v();let t=h(this.publicKey.bcsToBytes(),93);t.push(BigInt(this.expiryDateSecs)),t.push(d(this.blinder));let x=m(t);this.nonce=x.toString()}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(),a;switch(r){case 0:a=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let n=e.deserializeU64(),t=e.deserializeFixedBytes(31);return new i({privateKey:a,expiryDateSecs:Number(n),blinder:t})}static fromBytes(e){return i.deserialize(new l(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new u(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var o=i;function v(){return E(o.BLINDER_LENGTH)}export{o as a};
2
- //# sourceMappingURL=chunk-YBZI6U43.mjs.map
1
+ import{b as h,c as d,e as m}from"./chunk-IVVWQKCF.mjs";import{a as c,b as u}from"./chunk-4I6IUAHQ.mjs";import{c as s}from"./chunk-7T5CUI2H.mjs";import{a as l}from"./chunk-KEYAPEAX.mjs";import{a as y}from"./chunk-ZZIMFLVT.mjs";import{b as p}from"./chunk-AOCNYMMX.mjs";import{b,c as K}from"./chunk-UAL27G6B.mjs";import{randomBytes as E}from"@noble/hashes/utils";var S=1209600,i=class i extends y{constructor(e){super();let{privateKey:r,expiryDateSecs:a,blinder:n}=e;this.privateKey=r,this.publicKey=new c(r.publicKey()),this.expiryDateSecs=a||K(b()+S),this.blinder=n!==void 0?p.fromHexInput(n).toUint8Array():v();let t=h(this.publicKey.bcsToBytes(),93);t.push(BigInt(this.expiryDateSecs)),t.push(d(this.blinder));let x=m(t);this.nonce=x.toString()}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(),a;switch(r){case 0:a=s.deserialize(e);break;default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}let n=e.deserializeU64(),t=e.deserializeFixedBytes(31);return new i({privateKey:a,expiryDateSecs:Number(n),blinder:t})}static fromBytes(e){return i.deserialize(new l(e))}static generate(e){let r;switch(e?.scheme){case 0:default:r=s.generate()}return new i({privateKey:r,expiryDateSecs:e?.expiryDateSecs})}sign(e){if(this.isExpired())throw new Error("EphemeralKeyPair has expired");return new u(this.privateKey.sign(e))}};i.BLINDER_LENGTH=31;var o=i;function v(){return E(o.BLINDER_LENGTH)}export{o as a};
2
+ //# sourceMappingURL=chunk-HOQCND6F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-YSVXROOO.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-YNLAYIFQ.mjs";import{g as u}from"./chunk-G6HZPSZ3.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
- //# sourceMappingURL=chunk-ADLWXCGV.mjs.map
1
+ import{a as l}from"./chunk-YSVXROOO.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-VBR46X5M.mjs";import{g as u}from"./chunk-AGTINH7K.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
+ //# sourceMappingURL=chunk-HQUG3XLS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-YBZI6U43.mjs";import{a as m}from"./chunk-UYYQZDVB.mjs";import{a as y}from"./chunk-ZAHUEAGT.mjs";import{n as u}from"./chunk-DYMN66K5.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as p}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as P}from"jwt-decode";var K=class o extends m{constructor(e){super(e);this.publicKey=y.create(e)}serialize(e){if(this.proof===void 0)throw new Error("Connot serialize - proof undefined");e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.publicKey.jwkAddress.serialize(e),this.ephemeralKeyPair.serialize(e),this.proof.serialize(e)}static deserialize(e){let s=e.deserializeStr(),i=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),d=f.deserialize(e),n=u.deserialize(e);return o.create({proof:n,pepper:r,jwkAddress:a,uidKey:i,jwt:s,ephemeralKeyPair:d})}static fromBytes(e){return o.deserialize(new p(e))}static create(e){let{address:s,proof:i,jwt:r,ephemeralKeyPair:a,pepper:d,jwkAddress:n,uidKey:l="sub",proofFetchCallback:w}=e,t=P(r),h=t.iss;if(typeof t.aud!="string")throw new Error("aud was not found or an array of values");let A=t.aud,g=t[l];return new o({address:s,proof:i,ephemeralKeyPair:a,iss:h,uidKey:l,uidVal:g,aud:A,pepper:d,jwkAddress:c.from(n),jwt:r,proofFetchCallback:w})}};export{K as a};
2
- //# sourceMappingURL=chunk-PEYLPXU6.mjs.map
1
+ import{a as f}from"./chunk-HOQCND6F.mjs";import{a as m}from"./chunk-CUDIVR4U.mjs";import{a as y}from"./chunk-ZAHUEAGT.mjs";import{n as u}from"./chunk-DYMN66K5.mjs";import{b as c}from"./chunk-EDVGFSB5.mjs";import{a as p}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as P}from"jwt-decode";var K=class o extends m{constructor(e){super(e);this.publicKey=y.create(e)}serialize(e){if(this.proof===void 0)throw new Error("Connot serialize - proof undefined");e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.publicKey.jwkAddress.serialize(e),this.ephemeralKeyPair.serialize(e),this.proof.serialize(e)}static deserialize(e){let s=e.deserializeStr(),i=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),d=f.deserialize(e),n=u.deserialize(e);return o.create({proof:n,pepper:r,jwkAddress:a,uidKey:i,jwt:s,ephemeralKeyPair:d})}static fromBytes(e){return o.deserialize(new p(e))}static create(e){let{address:s,proof:i,jwt:r,ephemeralKeyPair:a,pepper:d,jwkAddress:n,uidKey:l="sub",proofFetchCallback:w}=e,t=P(r),h=t.iss;if(typeof t.aud!="string")throw new Error("aud was not found or an array of values");let A=t.aud,g=t[l];return new o({address:s,proof:i,ephemeralKeyPair:a,iss:h,uidKey:l,uidVal:g,aud:A,pepper:d,jwkAddress:c.from(n),jwt:r,proofFetchCallback:w})}};export{K as a};
2
+ //# sourceMappingURL=chunk-IEH7ILF3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-QUTP2ACU.mjs";import{a as y}from"./chunk-OVI2RY5L.mjs";import{a as m}from"./chunk-SYKVA363.mjs";import{a}from"./chunk-2MDJ763P.mjs";import{a as c}from"./chunk-S7KCJQOA.mjs";import{a as l}from"./chunk-MYRN7MDF.mjs";import{a as f}from"./chunk-E5LYYWAS.mjs";import{a as g}from"./chunk-KSOKGREZ.mjs";import{a as u}from"./chunk-CBRVPQV6.mjs";import{a as A}from"./chunk-J3PN353M.mjs";import{a as s}from"./chunk-B2RQPJYZ.mjs";import{a as p}from"./chunk-MZB3J6CV.mjs";import{a as d}from"./chunk-VTEOS4PS.mjs";import{a as r}from"./chunk-CSNIVFPZ.mjs";var t=class{constructor(n){this.config=new d(n),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new h(this.config),this.transaction=new m(this.config),this.table=new y(this.config),this.keyless=new u(this.config),this.object=new A(this.config)}};function e(b,n,w){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...j){return this[w][i](...j)},Object.defineProperty(b.prototype,i,o))})}e(t,s,"account");e(t,p,"ans");e(t,r,"coin");e(t,a,"digitalAsset");e(t,c,"event");e(t,l,"faucet");e(t,f,"fungibleAsset");e(t,g,"general");e(t,h,"staking");e(t,m,"transaction");e(t,y,"table");e(t,u,"keyless");e(t,A,"object");export{t as a};
2
- //# sourceMappingURL=chunk-6LC7ZJEI.mjs.map
1
+ import{a as h}from"./chunk-VZKENIJR.mjs";import{a as y}from"./chunk-X26OHQZO.mjs";import{a as m}from"./chunk-2XSLXHVJ.mjs";import{a}from"./chunk-7WCH4LAM.mjs";import{a as c}from"./chunk-ASQ2YBOR.mjs";import{a as l}from"./chunk-FLNLQ7K5.mjs";import{a as f}from"./chunk-WV7HZQ2V.mjs";import{a as g}from"./chunk-WBDJI34Y.mjs";import{a as u}from"./chunk-ETQA37EP.mjs";import{a as A}from"./chunk-LKN324IO.mjs";import{a as s}from"./chunk-QD7BJPKU.mjs";import{a as p}from"./chunk-UEGCC3OP.mjs";import{a as d}from"./chunk-VTEOS4PS.mjs";import{a as r}from"./chunk-ABAIELQE.mjs";var t=class{constructor(n){this.config=new d(n),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new h(this.config),this.transaction=new m(this.config),this.table=new y(this.config),this.keyless=new u(this.config),this.object=new A(this.config)}};function e(b,n,w){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...j){return this[w][i](...j)},Object.defineProperty(b.prototype,i,o))})}e(t,s,"account");e(t,p,"ans");e(t,r,"coin");e(t,a,"digitalAsset");e(t,c,"event");e(t,l,"faucet");e(t,f,"fungibleAsset");e(t,g,"general");e(t,h,"staking");e(t,m,"transaction");e(t,y,"table");e(t,u,"keyless");e(t,A,"object");export{t as a};
2
+ //# sourceMappingURL=chunk-JRLMKLB3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-YNLAYIFQ.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
- //# sourceMappingURL=chunk-4QVGK2KD.mjs.map
1
+ import{a as t}from"./chunk-VBR46X5M.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
+ //# sourceMappingURL=chunk-KHYFJBKG.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-S3I4THN5.mjs";import{a as r}from"./chunk-RLGIYYI7.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-J3PN353M.mjs.map
1
+ import{b as o}from"./chunk-S3I4THN5.mjs";import{a as r}from"./chunk-5MZJD6SA.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-LKN324IO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-YBZI6U43.mjs";import{a as u}from"./chunk-UYYQZDVB.mjs";import{n as l}from"./chunk-DYMN66K5.mjs";import{a as d}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as K}from"jwt-decode";var f=class t extends u{constructor(e){super(e)}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let i=e.deserializeStr(),s=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),n=l.deserialize(e);return t.create({proof:n,pepper:r,uidKey:s,jwt:i,ephemeralKeyPair:a})}static fromBytes(e){return t.deserialize(new d(e))}static create(e){let{address:i,proof:s,jwt:r,ephemeralKeyPair:a,pepper:n,uidKey:p="sub",proofFetchCallback:m}=e,o=K(r),y=o.iss;if(typeof o.aud!="string")throw new Error("aud was not found or an array of values");let h=o.aud,w=o[p];return new t({address:i,proof:s,ephemeralKeyPair:a,iss:y,uidKey:p,uidVal:w,aud:h,pepper:n,jwt:r,proofFetchCallback:m})}};export{f as a};
2
- //# sourceMappingURL=chunk-PBMXWRZG.mjs.map
1
+ import{a as c}from"./chunk-HOQCND6F.mjs";import{a as u}from"./chunk-CUDIVR4U.mjs";import{n as l}from"./chunk-DYMN66K5.mjs";import{a as d}from"./chunk-KEYAPEAX.mjs";import{jwtDecode as K}from"jwt-decode";var f=class t extends u{constructor(e){super(e)}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let i=e.deserializeStr(),s=e.deserializeStr(),r=e.deserializeFixedBytes(31),a=c.deserialize(e),n=l.deserialize(e);return t.create({proof:n,pepper:r,uidKey:s,jwt:i,ephemeralKeyPair:a})}static fromBytes(e){return t.deserialize(new d(e))}static create(e){let{address:i,proof:s,jwt:r,ephemeralKeyPair:a,pepper:n,uidKey:p="sub",proofFetchCallback:m}=e,o=K(r),y=o.iss;if(typeof o.aud!="string")throw new Error("aud was not found or an array of values");let h=o.aud,w=o[p];return new t({address:i,proof:s,ephemeralKeyPair:a,iss:y,uidKey:p,uidVal:w,aud:h,pepper:n,jwt:r,proofFetchCallback:m})}};export{f as a};
2
+ //# sourceMappingURL=chunk-MYF2VRVN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-YNLAYIFQ.mjs";import{c as p}from"./chunk-AZ642ORV.mjs";import{c as o}from"./chunk-J45FMNYT.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-5FPWLBZT.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:[{constraints:[]}],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-2Z6HETKH.mjs.map
1
+ import{a as c}from"./chunk-VBR46X5M.mjs";import{c as p}from"./chunk-AZ642ORV.mjs";import{c as o}from"./chunk-J45FMNYT.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-5FPWLBZT.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:[{constraints:[]}],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-OKEP5IEO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-RLGIYYI7.mjs";import{a as I}from"./chunk-LY7ZRAJT.mjs";import{a as A,b as a,c as g,d as m,e as p,f,g as y,h as C,i as T,j as O,k as l,l as P,m as R,n as V,o as L,p as h,q as S}from"./chunk-K7ZPRL7C.mjs";import{g as u,h as d}from"./chunk-UAL27G6B.mjs";import{e as i,f as c}from"./chunk-EXP5STXZ.mjs";var w=class{constructor(e){this.config=e}async getAccountInfo(e){return A({aptosConfig:this.config,...e})}async getAccountModules(e){return a({aptosConfig:this.config,...e})}async getAccountModule(e){return g({aptosConfig:this.config,...e})}async getAccountTransactions(e){return m({aptosConfig:this.config,...e})}async getAccountResources(e){return p({aptosConfig:this.config,...e})}async getAccountResource(e){return f({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return y({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),C({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),T({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),O({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),l({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),P({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),V({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),L({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:i,faMetadataAddress:c,...e})}async getAccountCoinAmount(e){let{coinType:t,faMetadataAddress:s}=e;await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"});let r=t;if(t===void 0&&s!==void 0)try{let o=(await I({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[s]}})).at(0);o.vec.length>0&&d(o.vec[0])&&(r=u(o.vec[0]))}catch{}return R({aptosConfig:this.config,...e,coinType:r})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),h({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return S({aptosConfig:this.config,...e})}};export{w as a};
2
- //# sourceMappingURL=chunk-B2RQPJYZ.mjs.map
1
+ import{a as n}from"./chunk-5MZJD6SA.mjs";import{a as I}from"./chunk-YRXUBXIJ.mjs";import{a as A,b as a,c as g,d as m,e as p,f,g as y,h as C,i as T,j as O,k as l,l as P,m as R,n as V,o as L,p as h,q as S}from"./chunk-K7ZPRL7C.mjs";import{g as u,h as d}from"./chunk-UAL27G6B.mjs";import{e as i,f as c}from"./chunk-EXP5STXZ.mjs";var w=class{constructor(e){this.config=e}async getAccountInfo(e){return A({aptosConfig:this.config,...e})}async getAccountModules(e){return a({aptosConfig:this.config,...e})}async getAccountModule(e){return g({aptosConfig:this.config,...e})}async getAccountTransactions(e){return m({aptosConfig:this.config,...e})}async getAccountResources(e){return p({aptosConfig:this.config,...e})}async getAccountResource(e){return f({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return y({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),C({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),T({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),O({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),l({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),P({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),V({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),L({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:i,faMetadataAddress:c,...e})}async getAccountCoinAmount(e){let{coinType:t,faMetadataAddress:s}=e;await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"});let r=t;if(t===void 0&&s!==void 0)try{let o=(await I({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[s]}})).at(0);o.vec.length>0&&d(o.vec[0])&&(r=u(o.vec[0]))}catch{}return R({aptosConfig:this.config,...e,coinType:r})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),h({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return S({aptosConfig:this.config,...e})}};export{w as a};
2
+ //# sourceMappingURL=chunk-QD7BJPKU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-YNLAYIFQ.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-ELPTV7ZG.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-VBR46X5M.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-THSR4POE.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e,i as s,j as t,k as o,l as r,m as i,n as a,o as m,p as c,q as g,r as u,s as p,t as d}from"./chunk-KBIYKNM2.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-MZB3J6CV.mjs.map
1
+ import{h as e,i as s,j as t,k as o,l as r,m as i,n as a,o as m,p as c,q as g,r as u,s as p,t as d}from"./chunk-5JRPODDO.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-UEGCC3OP.mjs.map