@aptos-labs/ts-sdk 1.35.0-zeta.2 → 1.36.0-zeta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (596) hide show
  1. package/dist/common/{accountAddress-Ce4Cv60D.d.ts → accountAddress-C685VEzA.d.ts} +11 -99
  2. package/dist/common/chunk-5GUWOXQG.js +4 -0
  3. package/dist/common/chunk-5GUWOXQG.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -486
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +9105 -8699
  8. package/dist/common/index.js +436 -18333
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-D4j3_WIS.d.mts → Ed25519Account-6KGApCPu.d.mts} +3 -3
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +23 -13
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -75
  13. package/dist/esm/account/AbstractedAccount.d.mts +10 -10
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -74
  15. package/dist/esm/account/Account.d.mts +6 -6
  16. package/dist/esm/account/Account.mjs +1 -72
  17. package/dist/esm/account/AccountUtils.d.mts +11 -10
  18. package/dist/esm/account/AccountUtils.mjs +1 -78
  19. package/dist/esm/account/Ed25519Account.d.mts +5 -5
  20. package/dist/esm/account/Ed25519Account.mjs +1 -70
  21. package/dist/esm/account/EphemeralKeyPair.d.mts +3 -1
  22. package/dist/esm/account/EphemeralKeyPair.mjs +1 -50
  23. package/dist/esm/account/FederatedKeylessAccount.d.mts +12 -11
  24. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -72
  25. package/dist/esm/account/KeylessAccount.d.mts +12 -11
  26. package/dist/esm/account/KeylessAccount.mjs +1 -72
  27. package/dist/esm/account/MultiEd25519Account.d.mts +9 -9
  28. package/dist/esm/account/MultiEd25519Account.mjs +1 -70
  29. package/dist/esm/account/MultiKeyAccount.d.mts +34 -12
  30. package/dist/esm/account/MultiKeyAccount.mjs +1 -74
  31. package/dist/esm/account/SingleKeyAccount.d.mts +5 -5
  32. package/dist/esm/account/SingleKeyAccount.mjs +1 -72
  33. package/dist/esm/account/index.d.mts +7 -6
  34. package/dist/esm/account/index.mjs +1 -119
  35. package/dist/esm/account/utils.mjs +1 -54
  36. package/dist/esm/api/account/abstraction.d.mts +9 -9
  37. package/dist/esm/api/account/abstraction.mjs +1 -101
  38. package/dist/esm/api/account.d.mts +4 -20
  39. package/dist/esm/api/account.mjs +1 -105
  40. package/dist/esm/api/ans.d.mts +13 -13
  41. package/dist/esm/api/ans.mjs +1 -101
  42. package/dist/esm/api/aptos.d.mts +6 -5
  43. package/dist/esm/api/aptos.mjs +1 -139
  44. package/dist/esm/api/aptosConfig.mjs +1 -9
  45. package/dist/esm/api/coin.d.mts +9 -9
  46. package/dist/esm/api/coin.mjs +1 -100
  47. package/dist/esm/api/digitalAsset.d.mts +5 -5
  48. package/dist/esm/api/digitalAsset.mjs +1 -101
  49. package/dist/esm/api/event.mjs +1 -59
  50. package/dist/esm/api/experimental.d.mts +7 -7
  51. package/dist/esm/api/experimental.mjs +1 -85
  52. package/dist/esm/api/faucet.mjs +1 -58
  53. package/dist/esm/api/fungibleAsset.d.mts +13 -13
  54. package/dist/esm/api/fungibleAsset.mjs +1 -101
  55. package/dist/esm/api/general.d.mts +7 -7
  56. package/dist/esm/api/general.mjs +1 -85
  57. package/dist/esm/api/index.d.mts +6 -5
  58. package/dist/esm/api/index.mjs +1 -143
  59. package/dist/esm/api/keyless.d.mts +20 -19
  60. package/dist/esm/api/keyless.mjs +1 -102
  61. package/dist/esm/api/object.mjs +1 -59
  62. package/dist/esm/api/staking.mjs +1 -59
  63. package/dist/esm/api/table.mjs +1 -38
  64. package/dist/esm/api/transaction.d.mts +4 -4
  65. package/dist/esm/api/transaction.mjs +1 -110
  66. package/dist/esm/api/transactionSubmission/build.d.mts +9 -9
  67. package/dist/esm/api/transactionSubmission/build.mjs +1 -99
  68. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
  69. package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
  70. package/dist/esm/api/transactionSubmission/management.mjs +1 -105
  71. package/dist/esm/api/transactionSubmission/sign.d.mts +3 -3
  72. package/dist/esm/api/transactionSubmission/sign.mjs +1 -218
  73. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  74. package/dist/esm/api/transactionSubmission/simulate.d.mts +9 -9
  75. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -100
  76. package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
  77. package/dist/esm/api/transactionSubmission/submit.mjs +1 -100
  78. package/dist/esm/api/utils.mjs +1 -36
  79. package/dist/esm/bcs/consts.mjs +1 -17
  80. package/dist/esm/bcs/deserializer.mjs +1 -10
  81. package/dist/esm/bcs/index.mjs +1 -60
  82. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
  83. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
  84. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -26
  85. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -22
  86. package/dist/esm/bcs/serializer.mjs +1 -18
  87. package/dist/esm/chunk-2V636AYW.mjs +2 -0
  88. package/dist/esm/{chunk-3IWV2Q3K.mjs.map → chunk-2V636AYW.mjs.map} +1 -1
  89. package/dist/esm/chunk-35CO4BP4.mjs +2 -0
  90. package/dist/esm/chunk-35CO4BP4.mjs.map +1 -0
  91. package/dist/esm/chunk-35DKMW7Q.mjs +2 -0
  92. package/dist/esm/{chunk-GUA5YTIK.mjs.map → chunk-35DKMW7Q.mjs.map} +1 -1
  93. package/dist/esm/chunk-3EUHEZND.mjs +2 -0
  94. package/dist/esm/{chunk-G34CJDST.mjs.map → chunk-3EUHEZND.mjs.map} +1 -1
  95. package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
  96. package/dist/esm/{chunk-G4NBRMZ2.mjs.map → chunk-3OLFJ65O.mjs.map} +1 -1
  97. package/dist/esm/chunk-3RVAGHAA.mjs +2 -0
  98. package/dist/esm/{chunk-XQFUKBY7.mjs.map → chunk-3RVAGHAA.mjs.map} +1 -1
  99. package/dist/esm/chunk-4RXKALLC.mjs +2 -0
  100. package/dist/esm/{chunk-SFLQPB72.mjs.map → chunk-4RXKALLC.mjs.map} +1 -1
  101. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  102. package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
  103. package/dist/esm/chunk-6KE4JZD6.mjs +2 -0
  104. package/dist/esm/chunk-6KE4JZD6.mjs.map +1 -0
  105. package/dist/esm/chunk-7CRQNXR5.mjs +2 -0
  106. package/dist/esm/{chunk-YU65LNIC.mjs.map → chunk-7CRQNXR5.mjs.map} +1 -1
  107. package/dist/esm/chunk-7YTGBTWH.mjs +2 -0
  108. package/dist/esm/chunk-7YTGBTWH.mjs.map +1 -0
  109. package/dist/esm/chunk-A3VO773Q.mjs +2 -0
  110. package/dist/esm/{chunk-KLUO6XPE.mjs.map → chunk-A3VO773Q.mjs.map} +1 -1
  111. package/dist/esm/chunk-A5L76YP7.mjs +2 -0
  112. package/dist/esm/{chunk-PT2QHUB6.mjs.map → chunk-A5L76YP7.mjs.map} +1 -1
  113. package/dist/esm/chunk-AEGA5N2W.mjs +2 -0
  114. package/dist/esm/{chunk-QJ6CGH7N.mjs.map → chunk-AEGA5N2W.mjs.map} +1 -1
  115. package/dist/esm/chunk-AIPHJFJL.mjs +2 -0
  116. package/dist/esm/{chunk-6I37A76G.mjs.map → chunk-AIPHJFJL.mjs.map} +1 -1
  117. package/dist/esm/chunk-BMPHQ3E7.mjs +2 -0
  118. package/dist/esm/{chunk-MWXBQ6HR.mjs.map → chunk-BMPHQ3E7.mjs.map} +1 -1
  119. package/dist/esm/chunk-C3Q23D22.mjs +2 -0
  120. package/dist/esm/{chunk-F7W7KS5C.mjs.map → chunk-C3Q23D22.mjs.map} +1 -1
  121. package/dist/esm/chunk-CWL7ZA3P.mjs +2 -0
  122. package/dist/esm/{chunk-6T3V5LXK.mjs.map → chunk-CWL7ZA3P.mjs.map} +1 -1
  123. package/dist/esm/chunk-DOVH6HPL.mjs +2 -0
  124. package/dist/esm/{chunk-THWEBWUC.mjs.map → chunk-DOVH6HPL.mjs.map} +1 -1
  125. package/dist/esm/chunk-EODSU3YN.mjs +2 -0
  126. package/dist/esm/{chunk-WXQUBQK4.mjs.map → chunk-EODSU3YN.mjs.map} +1 -1
  127. package/dist/esm/chunk-ERLDXTIY.mjs +2 -0
  128. package/dist/esm/{chunk-6ASWESA2.mjs.map → chunk-ERLDXTIY.mjs.map} +1 -1
  129. package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
  130. package/dist/esm/{chunk-APM7OSLS.mjs.map → chunk-GOXRBEIJ.mjs.map} +1 -1
  131. package/dist/esm/chunk-HHWJHOFZ.mjs +2 -0
  132. package/dist/esm/{chunk-KSK3XIGF.mjs.map → chunk-HHWJHOFZ.mjs.map} +1 -1
  133. package/dist/esm/chunk-IF4UU2MT.mjs +2 -0
  134. package/dist/esm/{chunk-QPT4BSAB.mjs.map → chunk-IF4UU2MT.mjs.map} +1 -1
  135. package/dist/esm/chunk-IMTC3J2M.mjs +2 -0
  136. package/dist/esm/{chunk-LJRNGZMY.mjs.map → chunk-IMTC3J2M.mjs.map} +1 -1
  137. package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
  138. package/dist/esm/chunk-KSLLV3ZC.mjs +2 -0
  139. package/dist/esm/{chunk-OFUNBTK4.mjs.map → chunk-KSLLV3ZC.mjs.map} +1 -1
  140. package/dist/esm/chunk-KXVD52Y6.mjs +2 -0
  141. package/dist/esm/{chunk-YT7V6AVJ.mjs.map → chunk-KXVD52Y6.mjs.map} +1 -1
  142. package/dist/esm/chunk-LGC2JORV.mjs +2 -0
  143. package/dist/esm/chunk-LGC2JORV.mjs.map +1 -0
  144. package/dist/esm/chunk-LQOSHBB7.mjs +4 -0
  145. package/dist/esm/{chunk-CXLXUSCG.mjs.map → chunk-LQOSHBB7.mjs.map} +1 -1
  146. package/dist/esm/chunk-LS3IDL2N.mjs +2 -0
  147. package/dist/esm/{chunk-MYEYZ7PF.mjs.map → chunk-LS3IDL2N.mjs.map} +1 -1
  148. package/dist/esm/chunk-MIW45ADL.mjs +2 -0
  149. package/dist/esm/chunk-MIW45ADL.mjs.map +1 -0
  150. package/dist/esm/chunk-NFPNWY6Z.mjs +4 -0
  151. package/dist/esm/chunk-NFPNWY6Z.mjs.map +1 -0
  152. package/dist/esm/chunk-PDAWVDI7.mjs +2 -0
  153. package/dist/esm/{chunk-MFFBZ43D.mjs.map → chunk-PDAWVDI7.mjs.map} +1 -1
  154. package/dist/esm/chunk-PSZYS4RG.mjs +2 -0
  155. package/dist/esm/{chunk-YK66QBML.mjs.map → chunk-PSZYS4RG.mjs.map} +1 -1
  156. package/dist/esm/chunk-R6QCPXQG.mjs +2 -0
  157. package/dist/esm/{chunk-SQNS4SFV.mjs.map → chunk-R6QCPXQG.mjs.map} +1 -1
  158. package/dist/esm/chunk-RIINVEZA.mjs +2 -0
  159. package/dist/esm/{chunk-Y3ENAKRC.mjs.map → chunk-RIINVEZA.mjs.map} +1 -1
  160. package/dist/esm/chunk-RJ7F4JDV.mjs +2 -0
  161. package/dist/esm/chunk-RJ7F4JDV.mjs.map +1 -0
  162. package/dist/esm/chunk-RXHER6EA.mjs +2 -0
  163. package/dist/esm/{chunk-C7T6GW5P.mjs.map → chunk-RXHER6EA.mjs.map} +1 -1
  164. package/dist/esm/chunk-RXMLONF7.mjs +2 -0
  165. package/dist/esm/{chunk-BU43ZFDJ.mjs.map → chunk-RXMLONF7.mjs.map} +1 -1
  166. package/dist/esm/chunk-TBY3VMMV.mjs +2 -0
  167. package/dist/esm/chunk-TBY3VMMV.mjs.map +1 -0
  168. package/dist/esm/chunk-TKXEVD7A.mjs +2 -0
  169. package/dist/esm/{chunk-QSYWLSSN.mjs.map → chunk-TKXEVD7A.mjs.map} +1 -1
  170. package/dist/esm/chunk-TNWABITK.mjs +2 -0
  171. package/dist/esm/{chunk-FRLS4GRM.mjs.map → chunk-TNWABITK.mjs.map} +1 -1
  172. package/dist/esm/chunk-TTY5GFMN.mjs +2 -0
  173. package/dist/esm/{chunk-PKUXOBIV.mjs.map → chunk-TTY5GFMN.mjs.map} +1 -1
  174. package/dist/esm/chunk-VHNX2NUR.mjs +473 -0
  175. package/dist/esm/chunk-VHNX2NUR.mjs.map +1 -0
  176. package/dist/esm/chunk-VHY6ZATX.mjs +2 -0
  177. package/dist/esm/{chunk-BDM6FBUO.mjs.map → chunk-VHY6ZATX.mjs.map} +1 -1
  178. package/dist/esm/chunk-W4BSN6SK.mjs +2 -0
  179. package/dist/esm/{chunk-ZWCTF3NQ.mjs.map → chunk-W4BSN6SK.mjs.map} +1 -1
  180. package/dist/esm/chunk-WB26DWOY.mjs +7 -0
  181. package/dist/esm/chunk-WB26DWOY.mjs.map +1 -0
  182. package/dist/esm/chunk-X5YB74NB.mjs +2 -0
  183. package/dist/esm/{chunk-I25AX6PQ.mjs.map → chunk-X5YB74NB.mjs.map} +1 -1
  184. package/dist/esm/chunk-XLDMPCLF.mjs +2 -0
  185. package/dist/esm/{chunk-WLTQHGIJ.mjs.map → chunk-XLDMPCLF.mjs.map} +1 -1
  186. package/dist/esm/chunk-YOZBVVKL.mjs +2 -0
  187. package/dist/esm/{chunk-BEYIOC2H.mjs.map → chunk-YOZBVVKL.mjs.map} +1 -1
  188. package/dist/esm/chunk-ZD2TY5N3.mjs +2 -0
  189. package/dist/esm/{chunk-NUT2VOX2.mjs.map → chunk-ZD2TY5N3.mjs.map} +1 -1
  190. package/dist/esm/chunk-ZELTLAUN.mjs +2 -0
  191. package/dist/esm/chunk-ZELTLAUN.mjs.map +1 -0
  192. package/dist/esm/cli/index.mjs +1 -20
  193. package/dist/esm/cli/localNode.mjs +1 -16
  194. package/dist/esm/cli/move.mjs +1 -7
  195. package/dist/esm/client/core.mjs +1 -34
  196. package/dist/esm/client/get.mjs +1 -41
  197. package/dist/esm/client/index.mjs +1 -69
  198. package/dist/esm/client/post.mjs +1 -43
  199. package/dist/esm/core/account/index.mjs +1 -21
  200. package/dist/esm/core/account/utils/address.mjs +1 -19
  201. package/dist/esm/core/account/utils/index.mjs +1 -20
  202. package/dist/esm/core/accountAddress.mjs +1 -16
  203. package/dist/esm/core/authenticationKey.d.mts +3 -1
  204. package/dist/esm/core/authenticationKey.mjs +1 -15
  205. package/dist/esm/core/common.mjs +1 -7
  206. package/dist/esm/core/crypto/abstraction.d.mts +4 -1
  207. package/dist/esm/core/crypto/abstraction.mjs +1 -26
  208. package/dist/esm/core/crypto/ed25519.d.mts +18 -1
  209. package/dist/esm/core/crypto/ed25519.mjs +1 -33
  210. package/dist/esm/core/crypto/ephemeral.d.mts +8 -1
  211. package/dist/esm/core/crypto/ephemeral.mjs +1 -30
  212. package/dist/esm/core/crypto/federatedKeyless.d.mts +11 -87
  213. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -44
  214. package/dist/esm/core/crypto/hdKey.mjs +1 -25
  215. package/dist/esm/core/crypto/index.d.mts +8 -6
  216. package/dist/esm/core/crypto/index.mjs +1 -173
  217. package/dist/esm/core/crypto/keyless.d.mts +13 -586
  218. package/dist/esm/core/crypto/keyless.mjs +1 -83
  219. package/dist/esm/core/crypto/multiEd25519.d.mts +14 -4
  220. package/dist/esm/core/crypto/multiEd25519.mjs +1 -50
  221. package/dist/esm/core/crypto/multiKey.d.mts +39 -3
  222. package/dist/esm/core/crypto/multiKey.mjs +1 -51
  223. package/dist/esm/core/crypto/poseidon.mjs +1 -15
  224. package/dist/esm/core/crypto/privateKey.d.mts +3 -1
  225. package/dist/esm/core/crypto/privateKey.mjs +1 -12
  226. package/dist/esm/core/crypto/proof.mjs +1 -20
  227. package/dist/esm/core/crypto/publicKey.d.mts +3 -1
  228. package/dist/esm/core/crypto/publicKey.mjs +1 -22
  229. package/dist/esm/core/crypto/secp256k1.d.mts +26 -2
  230. package/dist/esm/core/crypto/secp256k1.mjs +1 -29
  231. package/dist/esm/core/crypto/signature.mjs +1 -20
  232. package/dist/esm/core/crypto/singleKey.d.mts +27 -5
  233. package/dist/esm/core/crypto/singleKey.mjs +1 -48
  234. package/dist/esm/core/crypto/utils.mjs +1 -9
  235. package/dist/esm/core/hex.mjs +1 -12
  236. package/dist/esm/core/index.d.mts +8 -6
  237. package/dist/esm/core/index.mjs +1 -202
  238. package/dist/esm/errors/index.d.mts +10 -2
  239. package/dist/esm/errors/index.mjs +1 -25
  240. package/dist/esm/federatedKeyless-Qe_j8OqV.d.mts +875 -0
  241. package/dist/esm/index.d.mts +11 -10
  242. package/dist/esm/index.mjs +1 -798
  243. package/dist/esm/internal/abstraction.d.mts +9 -9
  244. package/dist/esm/internal/abstraction.mjs +1 -103
  245. package/dist/esm/internal/account.d.mts +7 -24
  246. package/dist/esm/internal/account.mjs +1 -142
  247. package/dist/esm/internal/ans.d.mts +13 -13
  248. package/dist/esm/internal/ans.mjs +1 -138
  249. package/dist/esm/internal/coin.d.mts +7 -7
  250. package/dist/esm/internal/coin.mjs +1 -99
  251. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  252. package/dist/esm/internal/digitalAsset.mjs +1 -145
  253. package/dist/esm/internal/event.mjs +1 -62
  254. package/dist/esm/internal/experimental.d.mts +7 -7
  255. package/dist/esm/internal/experimental.mjs +1 -84
  256. package/dist/esm/internal/faucet.mjs +1 -57
  257. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  258. package/dist/esm/internal/fungibleAsset.mjs +1 -105
  259. package/dist/esm/internal/general.mjs +1 -43
  260. package/dist/esm/internal/keyless.d.mts +10 -20
  261. package/dist/esm/internal/keyless.mjs +1 -107
  262. package/dist/esm/internal/object.mjs +1 -58
  263. package/dist/esm/internal/staking.mjs +1 -60
  264. package/dist/esm/internal/table.mjs +1 -38
  265. package/dist/esm/internal/transaction.mjs +1 -57
  266. package/dist/esm/internal/transactionSubmission.d.mts +6 -6
  267. package/dist/esm/internal/transactionSubmission.mjs +1 -118
  268. package/dist/esm/internal/utils/index.mjs +1 -38
  269. package/dist/esm/internal/utils/utils.mjs +1 -37
  270. package/dist/esm/internal/view.d.mts +7 -7
  271. package/dist/esm/internal/view.mjs +1 -86
  272. package/dist/esm/{publicKey-BMtGNNLg.d.mts → publicKey-pDHBAZlT.d.mts} +27 -1
  273. package/dist/esm/transactions/authenticator/account.d.mts +3 -1
  274. package/dist/esm/transactions/authenticator/account.mjs +1 -67
  275. package/dist/esm/transactions/authenticator/index.d.mts +3 -1
  276. package/dist/esm/transactions/authenticator/index.mjs +1 -82
  277. package/dist/esm/transactions/authenticator/transaction.d.mts +4 -2
  278. package/dist/esm/transactions/authenticator/transaction.mjs +1 -66
  279. package/dist/esm/transactions/index.d.mts +4 -4
  280. package/dist/esm/transactions/index.mjs +1 -296
  281. package/dist/esm/transactions/instances/chainId.mjs +1 -11
  282. package/dist/esm/transactions/instances/identifier.mjs +1 -11
  283. package/dist/esm/transactions/instances/index.d.mts +4 -2
  284. package/dist/esm/transactions/instances/index.mjs +1 -114
  285. package/dist/esm/transactions/instances/moduleId.mjs +1 -55
  286. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -60
  287. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -65
  288. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +3 -1
  289. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -21
  290. package/dist/esm/transactions/instances/signedTransaction.d.mts +3 -1
  291. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -63
  292. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -60
  293. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  294. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -73
  295. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  296. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -101
  297. package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
  298. package/dist/esm/transactions/management/index.d.mts +2 -2
  299. package/dist/esm/transactions/management/index.mjs +1 -111
  300. package/dist/esm/transactions/management/transactionWorker.d.mts +3 -3
  301. package/dist/esm/transactions/management/transactionWorker.mjs +1 -107
  302. package/dist/esm/transactions/scriptComposer/index.d.mts +7 -7
  303. package/dist/esm/transactions/scriptComposer/index.mjs +1 -80
  304. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +8 -8
  305. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -92
  306. package/dist/esm/transactions/transactionBuilder/index.d.mts +8 -8
  307. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -166
  308. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +34 -23
  309. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -74
  310. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +7 -7
  311. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -75
  312. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +8 -8
  313. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -97
  314. package/dist/esm/transactions/typeTag/index.d.mts +16 -0
  315. package/dist/esm/transactions/typeTag/index.mjs +1 -91
  316. package/dist/esm/transactions/typeTag/parser.mjs +1 -60
  317. package/dist/esm/transactions/types.d.mts +5 -5
  318. package/dist/esm/transactions/types.mjs +1 -1
  319. package/dist/esm/types/abstraction.mjs +1 -7
  320. package/dist/esm/types/generated/operations.d.mts +10 -63
  321. package/dist/esm/types/generated/queries.d.mts +2 -10
  322. package/dist/esm/types/generated/queries.mjs +1 -69
  323. package/dist/esm/types/generated/types.d.mts +1054 -824
  324. package/dist/esm/types/generated/types.mjs +1 -774
  325. package/dist/esm/types/generated/types.mjs.map +1 -1
  326. package/dist/esm/types/index.d.mts +2 -2
  327. package/dist/esm/types/index.mjs +1 -82
  328. package/dist/esm/types/indexer.d.mts +2 -14
  329. package/dist/esm/types/indexer.mjs +1 -1
  330. package/dist/esm/types/keyless.d.mts +1 -1
  331. package/dist/esm/types/types.d.mts +3 -58
  332. package/dist/esm/types/types.mjs +1 -77
  333. package/dist/esm/utils/apiEndpoints.mjs +1 -21
  334. package/dist/esm/utils/const.d.mts +1 -1
  335. package/dist/esm/utils/const.mjs +1 -25
  336. package/dist/esm/utils/helpers.d.mts +2 -1
  337. package/dist/esm/utils/helpers.mjs +1 -37
  338. package/dist/esm/utils/index.d.mts +1 -1
  339. package/dist/esm/utils/index.mjs +1 -88
  340. package/dist/esm/utils/memoize.mjs +1 -9
  341. package/dist/esm/utils/normalizeBundle.mjs +1 -20
  342. package/dist/esm/version.d.mts +1 -1
  343. package/dist/esm/version.mjs +1 -7
  344. package/package.json +3 -3
  345. package/src/account/AbstractKeylessAccount.ts +33 -49
  346. package/src/account/MultiKeyAccount.ts +23 -16
  347. package/src/api/account.ts +2 -56
  348. package/src/cli/localNode.ts +6 -15
  349. package/src/core/crypto/abstraction.ts +6 -1
  350. package/src/core/crypto/ed25519.ts +19 -1
  351. package/src/core/crypto/ephemeral.ts +9 -0
  352. package/src/core/crypto/federatedKeyless.ts +40 -4
  353. package/src/core/crypto/index.ts +4 -3
  354. package/src/core/crypto/keyless.ts +577 -17
  355. package/src/core/crypto/multiEd25519.ts +11 -3
  356. package/src/core/crypto/multiKey.ts +74 -4
  357. package/src/core/crypto/publicKey.ts +28 -0
  358. package/src/core/crypto/secp256k1.ts +25 -2
  359. package/src/core/crypto/singleKey.ts +32 -7
  360. package/src/errors/index.ts +50 -0
  361. package/src/internal/account.ts +2 -395
  362. package/src/internal/keyless.ts +9 -17
  363. package/src/transactions/scriptComposer/index.ts +19 -6
  364. package/src/transactions/transactionBuilder/remoteAbi.ts +107 -35
  365. package/src/transactions/typeTag/index.ts +22 -0
  366. package/src/types/codegen.yaml +1 -1
  367. package/src/types/generated/operations.ts +8 -69
  368. package/src/types/generated/queries.ts +0 -111
  369. package/src/types/generated/types.ts +1159 -951
  370. package/src/types/indexer.ts +0 -16
  371. package/src/types/keyless.ts +1 -1
  372. package/src/types/types.ts +3 -62
  373. package/src/utils/const.ts +1 -1
  374. package/src/utils/helpers.ts +11 -0
  375. package/src/version.ts +1 -1
  376. package/dist/common/chunk-JMOQXLED.js +0 -1305
  377. package/dist/common/chunk-JMOQXLED.js.map +0 -1
  378. package/dist/esm/chunk-2FTF6J7F.mjs +0 -97
  379. package/dist/esm/chunk-2FTF6J7F.mjs.map +0 -1
  380. package/dist/esm/chunk-2HL7JEFC.mjs +0 -829
  381. package/dist/esm/chunk-2HL7JEFC.mjs.map +0 -1
  382. package/dist/esm/chunk-2WBJAKBO.mjs +0 -53
  383. package/dist/esm/chunk-2WBJAKBO.mjs.map +0 -1
  384. package/dist/esm/chunk-32UQAST6.mjs +0 -296
  385. package/dist/esm/chunk-32UQAST6.mjs.map +0 -1
  386. package/dist/esm/chunk-3DAVHDK4.mjs +0 -195
  387. package/dist/esm/chunk-3DAVHDK4.mjs.map +0 -1
  388. package/dist/esm/chunk-3IWV2Q3K.mjs +0 -12
  389. package/dist/esm/chunk-3TUV6YMI.mjs +0 -305
  390. package/dist/esm/chunk-3TUV6YMI.mjs.map +0 -1
  391. package/dist/esm/chunk-4NMDYPUD.mjs +0 -1
  392. package/dist/esm/chunk-56UCIGTO.mjs +0 -21
  393. package/dist/esm/chunk-56UCIGTO.mjs.map +0 -1
  394. package/dist/esm/chunk-5ORUQZAR.mjs +0 -100
  395. package/dist/esm/chunk-5ORUQZAR.mjs.map +0 -1
  396. package/dist/esm/chunk-5QHMFYVL.mjs +0 -42
  397. package/dist/esm/chunk-5QHMFYVL.mjs.map +0 -1
  398. package/dist/esm/chunk-62LC4PPC.mjs +0 -128
  399. package/dist/esm/chunk-62LC4PPC.mjs.map +0 -1
  400. package/dist/esm/chunk-6ASWESA2.mjs +0 -77
  401. package/dist/esm/chunk-6I37A76G.mjs +0 -29
  402. package/dist/esm/chunk-6OFCIXWS.mjs +0 -379
  403. package/dist/esm/chunk-6OFCIXWS.mjs.map +0 -1
  404. package/dist/esm/chunk-6SNGKTWE.mjs +0 -91
  405. package/dist/esm/chunk-6SNGKTWE.mjs.map +0 -1
  406. package/dist/esm/chunk-6T3V5LXK.mjs +0 -119
  407. package/dist/esm/chunk-7F32C225.mjs +0 -219
  408. package/dist/esm/chunk-7F32C225.mjs.map +0 -1
  409. package/dist/esm/chunk-7WW735TU.mjs +0 -276
  410. package/dist/esm/chunk-7WW735TU.mjs.map +0 -1
  411. package/dist/esm/chunk-A33OBGVN.mjs +0 -1014
  412. package/dist/esm/chunk-A33OBGVN.mjs.map +0 -1
  413. package/dist/esm/chunk-A7LYGPFL.mjs +0 -208
  414. package/dist/esm/chunk-A7LYGPFL.mjs.map +0 -1
  415. package/dist/esm/chunk-AGKEC2IM.mjs +0 -250
  416. package/dist/esm/chunk-AGKEC2IM.mjs.map +0 -1
  417. package/dist/esm/chunk-AKXCFBYF.mjs +0 -49
  418. package/dist/esm/chunk-AKXCFBYF.mjs.map +0 -1
  419. package/dist/esm/chunk-APM7OSLS.mjs +0 -122
  420. package/dist/esm/chunk-BDM6FBUO.mjs +0 -198
  421. package/dist/esm/chunk-BEYIOC2H.mjs +0 -34
  422. package/dist/esm/chunk-BMM72IIP.mjs +0 -250
  423. package/dist/esm/chunk-BMM72IIP.mjs.map +0 -1
  424. package/dist/esm/chunk-BSCOVLWS.mjs +0 -1
  425. package/dist/esm/chunk-BSCOVLWS.mjs.map +0 -1
  426. package/dist/esm/chunk-BU43ZFDJ.mjs +0 -281
  427. package/dist/esm/chunk-C7EEG6SW.mjs +0 -689
  428. package/dist/esm/chunk-C7EEG6SW.mjs.map +0 -1
  429. package/dist/esm/chunk-C7T6GW5P.mjs +0 -376
  430. package/dist/esm/chunk-CXLXUSCG.mjs +0 -417
  431. package/dist/esm/chunk-D4MW64RH.mjs +0 -188
  432. package/dist/esm/chunk-D4MW64RH.mjs.map +0 -1
  433. package/dist/esm/chunk-D6RXVCE3.mjs +0 -86
  434. package/dist/esm/chunk-D6RXVCE3.mjs.map +0 -1
  435. package/dist/esm/chunk-DDZGHA66.mjs +0 -495
  436. package/dist/esm/chunk-DDZGHA66.mjs.map +0 -1
  437. package/dist/esm/chunk-DGDZNHUJ.mjs +0 -72
  438. package/dist/esm/chunk-DGDZNHUJ.mjs.map +0 -1
  439. package/dist/esm/chunk-DMFRIING.mjs +0 -286
  440. package/dist/esm/chunk-DMFRIING.mjs.map +0 -1
  441. package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
  442. package/dist/esm/chunk-E7FWVXGX.mjs.map +0 -1
  443. package/dist/esm/chunk-EBFKT35C.mjs +0 -66
  444. package/dist/esm/chunk-EBFKT35C.mjs.map +0 -1
  445. package/dist/esm/chunk-ECTX2FGD.mjs +0 -355
  446. package/dist/esm/chunk-ECTX2FGD.mjs.map +0 -1
  447. package/dist/esm/chunk-EPTUAWRA.mjs +0 -895
  448. package/dist/esm/chunk-EPTUAWRA.mjs.map +0 -1
  449. package/dist/esm/chunk-F4VI7BNX.mjs +0 -58
  450. package/dist/esm/chunk-F4VI7BNX.mjs.map +0 -1
  451. package/dist/esm/chunk-F7W7KS5C.mjs +0 -52
  452. package/dist/esm/chunk-FDMI4BUL.mjs +0 -611
  453. package/dist/esm/chunk-FDMI4BUL.mjs.map +0 -1
  454. package/dist/esm/chunk-FMNMYKYH.mjs +0 -71
  455. package/dist/esm/chunk-FMNMYKYH.mjs.map +0 -1
  456. package/dist/esm/chunk-FRLS4GRM.mjs +0 -62
  457. package/dist/esm/chunk-G34CJDST.mjs +0 -139
  458. package/dist/esm/chunk-G4NBRMZ2.mjs +0 -7
  459. package/dist/esm/chunk-G6R77JKO.mjs +0 -121
  460. package/dist/esm/chunk-G6R77JKO.mjs.map +0 -1
  461. package/dist/esm/chunk-G7BB6K4B.mjs +0 -167
  462. package/dist/esm/chunk-G7BB6K4B.mjs.map +0 -1
  463. package/dist/esm/chunk-GCQK2S5Q.mjs +0 -43
  464. package/dist/esm/chunk-GCQK2S5Q.mjs.map +0 -1
  465. package/dist/esm/chunk-GFPEB22G.mjs +0 -1
  466. package/dist/esm/chunk-GFPEB22G.mjs.map +0 -1
  467. package/dist/esm/chunk-GUA5YTIK.mjs +0 -362
  468. package/dist/esm/chunk-HBXBODME.mjs +0 -84
  469. package/dist/esm/chunk-HBXBODME.mjs.map +0 -1
  470. package/dist/esm/chunk-HEZ2ZYZA.mjs +0 -1
  471. package/dist/esm/chunk-HEZ2ZYZA.mjs.map +0 -1
  472. package/dist/esm/chunk-HKQY5GXT.mjs +0 -231
  473. package/dist/esm/chunk-HKQY5GXT.mjs.map +0 -1
  474. package/dist/esm/chunk-HL337SEM.mjs +0 -219
  475. package/dist/esm/chunk-HL337SEM.mjs.map +0 -1
  476. package/dist/esm/chunk-HQDHSKVS.mjs +0 -74
  477. package/dist/esm/chunk-HQDHSKVS.mjs.map +0 -1
  478. package/dist/esm/chunk-I25AX6PQ.mjs +0 -7
  479. package/dist/esm/chunk-I5G7XFGT.mjs +0 -86
  480. package/dist/esm/chunk-I5G7XFGT.mjs.map +0 -1
  481. package/dist/esm/chunk-IHYTP2EW.mjs +0 -1
  482. package/dist/esm/chunk-IHYTP2EW.mjs.map +0 -1
  483. package/dist/esm/chunk-IJ7XCPP3.mjs +0 -480
  484. package/dist/esm/chunk-IJ7XCPP3.mjs.map +0 -1
  485. package/dist/esm/chunk-ILTEOGFF.mjs +0 -407
  486. package/dist/esm/chunk-ILTEOGFF.mjs.map +0 -1
  487. package/dist/esm/chunk-IP7GATDH.mjs +0 -322
  488. package/dist/esm/chunk-IP7GATDH.mjs.map +0 -1
  489. package/dist/esm/chunk-IPUAVRGL.mjs +0 -248
  490. package/dist/esm/chunk-IPUAVRGL.mjs.map +0 -1
  491. package/dist/esm/chunk-IQVHXOD3.mjs +0 -192
  492. package/dist/esm/chunk-IQVHXOD3.mjs.map +0 -1
  493. package/dist/esm/chunk-JAZJE3OR.mjs +0 -45
  494. package/dist/esm/chunk-JAZJE3OR.mjs.map +0 -1
  495. package/dist/esm/chunk-JEVGHYEP.mjs +0 -162
  496. package/dist/esm/chunk-JEVGHYEP.mjs.map +0 -1
  497. package/dist/esm/chunk-JFMFZ2IL.mjs +0 -147
  498. package/dist/esm/chunk-JFMFZ2IL.mjs.map +0 -1
  499. package/dist/esm/chunk-JQIRRM7G.mjs +0 -195
  500. package/dist/esm/chunk-JQIRRM7G.mjs.map +0 -1
  501. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  502. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  503. package/dist/esm/chunk-K5OCDM3W.mjs +0 -207
  504. package/dist/esm/chunk-K5OCDM3W.mjs.map +0 -1
  505. package/dist/esm/chunk-KLUO6XPE.mjs +0 -33
  506. package/dist/esm/chunk-KSK3XIGF.mjs +0 -502
  507. package/dist/esm/chunk-KW64NP2F.mjs +0 -71
  508. package/dist/esm/chunk-KW64NP2F.mjs.map +0 -1
  509. package/dist/esm/chunk-LJRNGZMY.mjs +0 -10
  510. package/dist/esm/chunk-MFFBZ43D.mjs +0 -45
  511. package/dist/esm/chunk-MWXBQ6HR.mjs +0 -15
  512. package/dist/esm/chunk-MYEYZ7PF.mjs +0 -46
  513. package/dist/esm/chunk-NUT2VOX2.mjs +0 -317
  514. package/dist/esm/chunk-OFUNBTK4.mjs +0 -169
  515. package/dist/esm/chunk-ORCQEMJL.mjs +0 -51
  516. package/dist/esm/chunk-ORCQEMJL.mjs.map +0 -1
  517. package/dist/esm/chunk-PGFEUN7K.mjs +0 -129
  518. package/dist/esm/chunk-PGFEUN7K.mjs.map +0 -1
  519. package/dist/esm/chunk-PKUXOBIV.mjs +0 -138
  520. package/dist/esm/chunk-PT2QHUB6.mjs +0 -96
  521. package/dist/esm/chunk-QJ6CGH7N.mjs +0 -71
  522. package/dist/esm/chunk-QPT4BSAB.mjs +0 -20
  523. package/dist/esm/chunk-QSYWLSSN.mjs +0 -216
  524. package/dist/esm/chunk-QYNYDQE3.mjs +0 -288
  525. package/dist/esm/chunk-QYNYDQE3.mjs.map +0 -1
  526. package/dist/esm/chunk-R45SPK6Q.mjs +0 -61
  527. package/dist/esm/chunk-R45SPK6Q.mjs.map +0 -1
  528. package/dist/esm/chunk-R4JTQQBX.mjs +0 -37
  529. package/dist/esm/chunk-R4JTQQBX.mjs.map +0 -1
  530. package/dist/esm/chunk-RCXGTN36.mjs +0 -58
  531. package/dist/esm/chunk-RCXGTN36.mjs.map +0 -1
  532. package/dist/esm/chunk-RMMOF53Q.mjs +0 -1
  533. package/dist/esm/chunk-RMMOF53Q.mjs.map +0 -1
  534. package/dist/esm/chunk-RQS33JAS.mjs +0 -77
  535. package/dist/esm/chunk-RQS33JAS.mjs.map +0 -1
  536. package/dist/esm/chunk-SAWN7RJP.mjs +0 -15
  537. package/dist/esm/chunk-SAWN7RJP.mjs.map +0 -1
  538. package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
  539. package/dist/esm/chunk-SFLQPB72.mjs +0 -63
  540. package/dist/esm/chunk-SPI2HO3E.mjs +0 -177
  541. package/dist/esm/chunk-SPI2HO3E.mjs.map +0 -1
  542. package/dist/esm/chunk-SPVJXZL5.mjs +0 -865
  543. package/dist/esm/chunk-SPVJXZL5.mjs.map +0 -1
  544. package/dist/esm/chunk-SQNS4SFV.mjs +0 -232
  545. package/dist/esm/chunk-SRXIHVZE.mjs +0 -50
  546. package/dist/esm/chunk-SRXIHVZE.mjs.map +0 -1
  547. package/dist/esm/chunk-T4BFWV46.mjs +0 -63
  548. package/dist/esm/chunk-T4BFWV46.mjs.map +0 -1
  549. package/dist/esm/chunk-T573PCIR.mjs +0 -700
  550. package/dist/esm/chunk-T573PCIR.mjs.map +0 -1
  551. package/dist/esm/chunk-TDLL7QX5.mjs +0 -239
  552. package/dist/esm/chunk-TDLL7QX5.mjs.map +0 -1
  553. package/dist/esm/chunk-TFW6N66T.mjs +0 -415
  554. package/dist/esm/chunk-TFW6N66T.mjs.map +0 -1
  555. package/dist/esm/chunk-THWEBWUC.mjs +0 -20
  556. package/dist/esm/chunk-TJDF4CXI.mjs +0 -513
  557. package/dist/esm/chunk-TJDF4CXI.mjs.map +0 -1
  558. package/dist/esm/chunk-TL4Z4KHK.mjs +0 -70
  559. package/dist/esm/chunk-TL4Z4KHK.mjs.map +0 -1
  560. package/dist/esm/chunk-UGFIWCJQ.mjs +0 -130
  561. package/dist/esm/chunk-UGFIWCJQ.mjs.map +0 -1
  562. package/dist/esm/chunk-UGKZQUGE.mjs +0 -367
  563. package/dist/esm/chunk-UGKZQUGE.mjs.map +0 -1
  564. package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
  565. package/dist/esm/chunk-UIRAXHDH.mjs.map +0 -1
  566. package/dist/esm/chunk-UK7SPHIE.mjs +0 -420
  567. package/dist/esm/chunk-UK7SPHIE.mjs.map +0 -1
  568. package/dist/esm/chunk-UOHCJOXI.mjs +0 -150
  569. package/dist/esm/chunk-UOHCJOXI.mjs.map +0 -1
  570. package/dist/esm/chunk-WHSS6I7T.mjs +0 -90
  571. package/dist/esm/chunk-WHSS6I7T.mjs.map +0 -1
  572. package/dist/esm/chunk-WLTQHGIJ.mjs +0 -177
  573. package/dist/esm/chunk-WUM247HF.mjs +0 -125
  574. package/dist/esm/chunk-WUM247HF.mjs.map +0 -1
  575. package/dist/esm/chunk-WXQUBQK4.mjs +0 -19
  576. package/dist/esm/chunk-X4N5BN3S.mjs +0 -40
  577. package/dist/esm/chunk-X4N5BN3S.mjs.map +0 -1
  578. package/dist/esm/chunk-XIBOO3WF.mjs +0 -168
  579. package/dist/esm/chunk-XIBOO3WF.mjs.map +0 -1
  580. package/dist/esm/chunk-XQFUKBY7.mjs +0 -136
  581. package/dist/esm/chunk-XX6C2QGI.mjs +0 -160
  582. package/dist/esm/chunk-XX6C2QGI.mjs.map +0 -1
  583. package/dist/esm/chunk-Y3ENAKRC.mjs +0 -73
  584. package/dist/esm/chunk-Y3M32DIB.mjs +0 -79
  585. package/dist/esm/chunk-Y3M32DIB.mjs.map +0 -1
  586. package/dist/esm/chunk-YK66QBML.mjs +0 -89
  587. package/dist/esm/chunk-YT7V6AVJ.mjs +0 -66
  588. package/dist/esm/chunk-YU65LNIC.mjs +0 -72
  589. package/dist/esm/chunk-ZRBUAZZD.mjs +0 -36
  590. package/dist/esm/chunk-ZRBUAZZD.mjs.map +0 -1
  591. package/dist/esm/chunk-ZWCTF3NQ.mjs +0 -25
  592. package/src/internal/queries/getAccountAddressForAuthKey.graphql +0 -8
  593. package/src/internal/queries/getAuthKeysForPublicKey.graphql +0 -9
  594. package/src/internal/queries/getMultiKeyForAuthKey.graphql +0 -9
  595. package/src/internal/queries/getSignatures.graphql +0 -13
  596. /package/dist/esm/{chunk-4NMDYPUD.mjs.map → chunk-KDMSOCZY.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ import{b as a}from"./chunk-ZELTLAUN.mjs";var l=(t=>(t[t.API_ERROR=0]="API_ERROR",t[t.EXTERNAL_API_ERROR=1]="EXTERNAL_API_ERROR",t[t.SESSION_EXPIRED=2]="SESSION_EXPIRED",t[t.INVALID_STATE=3]="INVALID_STATE",t[t.INVALID_SIGNATURE=4]="INVALID_SIGNATURE",t[t.UNKNOWN=5]="UNKNOWN",t))(l||{}),O=(s=>(s.REAUTHENTICATE="Re-authentiate to continue using your keyless account",s.REAUTHENTICATE_UNSURE="Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support",s.UPDATE_REQUEST_PARAMS="Update the invalid request parameters and reauthenticate.",s.RATE_LIMIT_EXCEEDED="Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest.",s.SERVER_ERROR="Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.CALL_PRECHECK="Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing.",s.REINSTANTIATE="Try instantiating the account again. Avoid manipulating the account object directly",s.JOIN_SUPPORT_GROUP="For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s.UNKNOWN="Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx",s))(O||{}),u=(e=>(e[e.EPHEMERAL_KEY_PAIR_EXPIRED=0]="EPHEMERAL_KEY_PAIR_EXPIRED",e[e.PROOF_NOT_FOUND=1]="PROOF_NOT_FOUND",e[e.ASYNC_PROOF_FETCH_FAILED=2]="ASYNC_PROOF_FETCH_FAILED",e[e.INVALID_PROOF_VERIFICATION_FAILED=3]="INVALID_PROOF_VERIFICATION_FAILED",e[e.INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND=4]="INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND",e[e.INVALID_JWT_SIG=5]="INVALID_JWT_SIG",e[e.INVALID_JWT_JWK_NOT_FOUND=6]="INVALID_JWT_JWK_NOT_FOUND",e[e.INVALID_JWT_ISS_NOT_RECOGNIZED=7]="INVALID_JWT_ISS_NOT_RECOGNIZED",e[e.INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED=8]="INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED",e[e.INVALID_TW_SIG_VERIFICATION_FAILED=9]="INVALID_TW_SIG_VERIFICATION_FAILED",e[e.INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND=10]="INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND",e[e.INVALID_EXPIRY_HORIZON=11]="INVALID_EXPIRY_HORIZON",e[e.JWT_PARSING_ERROR=12]="JWT_PARSING_ERROR",e[e.JWK_FETCH_FAILED=13]="JWK_FETCH_FAILED",e[e.JWK_FETCH_FAILED_FEDERATED=14]="JWK_FETCH_FAILED_FEDERATED",e[e.RATE_LIMIT_EXCEEDED=15]="RATE_LIMIT_EXCEEDED",e[e.PEPPER_SERVICE_INTERNAL_ERROR=16]="PEPPER_SERVICE_INTERNAL_ERROR",e[e.PEPPER_SERVICE_BAD_REQUEST=17]="PEPPER_SERVICE_BAD_REQUEST",e[e.PEPPER_SERVICE_OTHER=18]="PEPPER_SERVICE_OTHER",e[e.PROVER_SERVICE_INTERNAL_ERROR=19]="PROVER_SERVICE_INTERNAL_ERROR",e[e.PROVER_SERVICE_BAD_REQUEST=20]="PROVER_SERVICE_BAD_REQUEST",e[e.PROVER_SERVICE_OTHER=21]="PROVER_SERVICE_OTHER",e[e.FULL_NODE_CONFIG_LOOKUP_ERROR=22]="FULL_NODE_CONFIG_LOOKUP_ERROR",e[e.FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR=23]="FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR",e[e.FULL_NODE_JWKS_LOOKUP_ERROR=24]="FULL_NODE_JWKS_LOOKUP_ERROR",e[e.FULL_NODE_OTHER=25]="FULL_NODE_OTHER",e[e.SIGNATURE_TYPE_INVALID=26]="SIGNATURE_TYPE_INVALID",e[e.SIGNATURE_EXPIRED=27]="SIGNATURE_EXPIRED",e[e.MAX_EXPIRY_HORIZON_EXCEEDED=28]="MAX_EXPIRY_HORIZON_EXCEEDED",e[e.EPHEMERAL_SIGNATURE_VERIFICATION_FAILED=29]="EPHEMERAL_SIGNATURE_VERIFICATION_FAILED",e[e.TRAINING_WHEELS_SIGNATURE_MISSING=30]="TRAINING_WHEELS_SIGNATURE_MISSING",e[e.TRAINING_WHEELS_SIGNATURE_VERIFICATION_FAILED=31]="TRAINING_WHEELS_SIGNATURE_VERIFICATION_FAILED",e[e.PROOF_VERIFICATION_FAILED=32]="PROOF_VERIFICATION_FAILED",e[e.UNKNOWN=33]="UNKNOWN",e))(u||{}),A={0:["The ephemeral keypair has expired.",2,"Re-authentiate to continue using your keyless account"],1:["The required proof could not be found.",3,"Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing."],2:["The required proof failed to fetch.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],3:["The provided proof is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],4:["The verification key used to authenticate was updated.",2,"Re-authentiate to continue using your keyless account"],5:["The JWK was found, but JWT failed verification",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],6:["The JWK required to verify the JWT could not be found. The JWK may have been rotated out.",2,"Re-authentiate to continue using your keyless account"],7:["The JWT issuer is not recognized.",3,"Update the invalid request parameters and reauthenticate."],8:["The JWT issuer is not supported by the Federated Keyless ",0,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],9:["The training wheels signature is invalid.",3,"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support"],10:["The public key used to verify the training wheels signature was not found.",2,"Re-authentiate to continue using your keyless account"],11:["The expiry horizon is invalid.",2,"Re-authentiate to continue using your keyless account"],13:["Failed to fetch JWKS.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],14:["Failed to fetch JWKS for Federated Keyless provider.",1,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],15:["Rate limit exceeded. Too many requests in a short period.",0,"Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest."],16:["Internal error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],17:["Bad request sent to Pepper service.",0,"Update the invalid request parameters and reauthenticate."],18:["Unknown error from Pepper service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],19:["Internal error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],20:["Bad request sent to Prover service.",0,"Update the invalid request parameters and reauthenticate."],21:["Unknown error from Prover service.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],12:["Error when parsing JWT. This should never happen. Join https://t.me/+h5CN-W35yUFiYzkx for support",3,"Try instantiating the account again. Avoid manipulating the account object directly"],22:["Error when looking up on-chain keyless configuration.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],23:["Error when looking up on-chain verification key.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],24:["Error when looking up on-chain JWKS.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],25:["Unknown error from full node.",0,"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],26:["The signature is not a valid Keyless signature.",4,"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"],27:["The ephemeral key pair used to sign the message has expired.",4,"Re-authentiate to continue using your keyless account"],28:["The expiry horizon on the signature exceeds the maximum allowed value.",4,"Re-authentiate to continue using your keyless account"],29:["Failed to verify the ephemeral signature with the ephemeral public key.",4,"Re-authentiate to continue using your keyless account"],30:["The training wheels signature is missing but is required by the Keyless configuration.",4,"Re-authentiate to continue using your keyless account"],31:["Failed to verify the training wheels signature with the training wheels public key.",4,"Re-authentiate to continue using your keyless account"],32:["The proof verification failed.",4,"Re-authentiate to continue using your keyless account"],33:["An unknown error has occurred.",5,"Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx"]},N=class _ extends Error{constructor(o){let{innerError:r,category:E,resolutionTip:i,type:R,message:t=A[R][0],details:I}=o;super(t),this.name="KeylessError",this.innerError=r,this.category=E,this.resolutionTip=i,this.type=R,this.details=I,this.message=_.constructMessage(t,i,r,I)}static constructMessage(o,r,E,i){let R=`
2
+ Message: ${o}`;return i&&(R+=`
3
+ Details: ${i}`),E instanceof T?R+=`
4
+ AptosApiError: ${E.message}`:E!==void 0&&(R+=`
5
+ Error: ${a(E)}`),R+=`
6
+ KeylessErrorResolutionTip: ${r}`,R}static fromErrorType(o){let{error:r,type:E,details:i}=o,[R,t,I]=A[E];return new _({message:R,details:i,innerError:r,category:t,resolutionTip:I,type:E})}},T=class extends Error{constructor({apiType:o,aptosRequest:r,aptosResponse:E}){super(S({apiType:o,aptosRequest:r,aptosResponse:E})),this.name="AptosApiError",this.url=E.url,this.status=E.status,this.statusText=E.statusText,this.data=E.data,this.request=r}};function S({apiType:_,aptosRequest:o,aptosResponse:r}){let E=r.headers?.traceparent?.split("-")[1],i=E?`(trace_id:${E}) `:"",R=`Request to [${_}]: ${o.method} ${r.url??o.url} ${i}failed with`;return _==="Indexer"&&r.data?.errors?.[0]?.message!=null?`${R}: ${r.data.errors[0].message}`:r.data?.message!=null&&r.data?.error_code!=null?`${R}: ${JSON.stringify(r.data)}`:`${R} status: ${r.statusText}(code:${r.status}) and response body: ${P(r.data)}`}var n=400;function P(_){let o=JSON.stringify(_);return o.length<=n?o:`truncated(original_size:${o.length}): ${o.slice(0,n/2)}...${o.slice(-n/2)}`}export{l as a,O as b,u as c,N as d,T as e};
7
+ //# sourceMappingURL=chunk-WB26DWOY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/errors/index.ts"],"sourcesContent":["import { AptosApiType } from \"../utils/const\";\nimport { getErrorMessage } from \"../utils/helpers\";\nimport { AptosRequest, AptosResponse } from \"../types\";\n\nexport enum KeylessErrorCategory {\n API_ERROR,\n EXTERNAL_API_ERROR,\n SESSION_EXPIRED,\n INVALID_STATE,\n INVALID_SIGNATURE,\n UNKNOWN,\n}\n\nexport enum KeylessErrorResolutionTip {\n REAUTHENTICATE = \"Re-authentiate to continue using your keyless account\",\n // eslint-disable-next-line max-len\n REAUTHENTICATE_UNSURE = \"Try re-authentiating. If the error persists join the telegram group at https://t.me/+h5CN-W35yUFiYzkx for further support\",\n UPDATE_REQUEST_PARAMS = \"Update the invalid request parameters and reauthenticate.\",\n // eslint-disable-next-line max-len\n RATE_LIMIT_EXCEEDED = \"Cache the keyless account and reuse it to avoid making too many requests. Keyless accounts are valid until either the EphemeralKeyPair expires, when the JWK is rotated, or when the proof verifying key is changed, whichever comes soonest.\",\n // eslint-disable-next-line max-len\n SERVER_ERROR = \"Try again later. See aptosApiError error for more context. For additional support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx\",\n // eslint-disable-next-line max-len\n CALL_PRECHECK = \"Call `await account.checkKeylessAccountValidity()` to wait for asyncronous changes and check for account validity before signing or serializing.\",\n REINSTANTIATE = \"Try instantiating the account again. Avoid manipulating the account object directly\",\n JOIN_SUPPORT_GROUP = \"For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx\",\n UNKNOWN = \"Error unknown. For support join the telegram group at https://t.me/+h5CN-W35yUFiYzkx\",\n}\n\nexport enum KeylessErrorType {\n EPHEMERAL_KEY_PAIR_EXPIRED,\n\n PROOF_NOT_FOUND,\n\n ASYNC_PROOF_FETCH_FAILED,\n\n INVALID_PROOF_VERIFICATION_FAILED,\n\n INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND,\n\n INVALID_JWT_SIG,\n\n INVALID_JWT_JWK_NOT_FOUND,\n\n INVALID_JWT_ISS_NOT_RECOGNIZED,\n\n INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED,\n\n INVALID_TW_SIG_VERIFICATION_FAILED,\n\n INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND,\n\n INVALID_EXPIRY_HORIZON,\n\n JWT_PARSING_ERROR,\n\n JWK_FETCH_FAILED,\n\n JWK_FETCH_FAILED_FEDERATED,\n\n RATE_LIMIT_EXCEEDED,\n\n PEPPER_SERVICE_INTERNAL_ERROR,\n\n PEPPER_SERVICE_BAD_REQUEST,\n\n PEPPER_SERVICE_OTHER,\n\n PROVER_SERVICE_INTERNAL_ERROR,\n\n PROVER_SERVICE_BAD_REQUEST,\n\n PROVER_SERVICE_OTHER,\n\n FULL_NODE_CONFIG_LOOKUP_ERROR,\n\n FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR,\n\n FULL_NODE_JWKS_LOOKUP_ERROR,\n\n FULL_NODE_OTHER,\n\n SIGNATURE_TYPE_INVALID,\n\n SIGNATURE_EXPIRED,\n\n MAX_EXPIRY_HORIZON_EXCEEDED,\n\n EPHEMERAL_SIGNATURE_VERIFICATION_FAILED,\n\n TRAINING_WHEELS_SIGNATURE_MISSING,\n\n TRAINING_WHEELS_SIGNATURE_VERIFICATION_FAILED,\n\n PROOF_VERIFICATION_FAILED,\n\n UNKNOWN,\n}\n\nconst KeylessErrors: { [key in KeylessErrorType]: [string, KeylessErrorCategory, KeylessErrorResolutionTip] } = {\n [KeylessErrorType.EPHEMERAL_KEY_PAIR_EXPIRED]: [\n \"The ephemeral keypair has expired.\",\n KeylessErrorCategory.SESSION_EXPIRED,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.PROOF_NOT_FOUND]: [\n \"The required proof could not be found.\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.CALL_PRECHECK,\n ],\n [KeylessErrorType.ASYNC_PROOF_FETCH_FAILED]: [\n \"The required proof failed to fetch.\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.REAUTHENTICATE_UNSURE,\n ],\n [KeylessErrorType.INVALID_PROOF_VERIFICATION_FAILED]: [\n \"The provided proof is invalid.\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.REAUTHENTICATE_UNSURE,\n ],\n [KeylessErrorType.INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND]: [\n \"The verification key used to authenticate was updated.\",\n KeylessErrorCategory.SESSION_EXPIRED,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.INVALID_JWT_SIG]: [\n \"The JWK was found, but JWT failed verification\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.REAUTHENTICATE_UNSURE,\n ],\n [KeylessErrorType.INVALID_JWT_JWK_NOT_FOUND]: [\n \"The JWK required to verify the JWT could not be found. The JWK may have been rotated out.\",\n KeylessErrorCategory.SESSION_EXPIRED,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.INVALID_JWT_ISS_NOT_RECOGNIZED]: [\n \"The JWT issuer is not recognized.\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.UPDATE_REQUEST_PARAMS,\n ],\n [KeylessErrorType.INVALID_JWT_FEDERATED_ISS_NOT_SUPPORTED]: [\n \"The JWT issuer is not supported by the Federated Keyless \",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.REAUTHENTICATE_UNSURE,\n ],\n [KeylessErrorType.INVALID_TW_SIG_VERIFICATION_FAILED]: [\n \"The training wheels signature is invalid.\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.REAUTHENTICATE_UNSURE,\n ],\n [KeylessErrorType.INVALID_TW_SIG_PUBLIC_KEY_NOT_FOUND]: [\n \"The public key used to verify the training wheels signature was not found.\",\n KeylessErrorCategory.SESSION_EXPIRED,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.INVALID_EXPIRY_HORIZON]: [\n \"The expiry horizon is invalid.\",\n KeylessErrorCategory.SESSION_EXPIRED,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.JWK_FETCH_FAILED]: [\n \"Failed to fetch JWKS.\",\n KeylessErrorCategory.EXTERNAL_API_ERROR,\n KeylessErrorResolutionTip.JOIN_SUPPORT_GROUP,\n ],\n [KeylessErrorType.JWK_FETCH_FAILED_FEDERATED]: [\n \"Failed to fetch JWKS for Federated Keyless provider.\",\n KeylessErrorCategory.EXTERNAL_API_ERROR,\n KeylessErrorResolutionTip.JOIN_SUPPORT_GROUP,\n ],\n [KeylessErrorType.RATE_LIMIT_EXCEEDED]: [\n \"Rate limit exceeded. Too many requests in a short period.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.RATE_LIMIT_EXCEEDED,\n ],\n [KeylessErrorType.PEPPER_SERVICE_INTERNAL_ERROR]: [\n \"Internal error from Pepper service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.PEPPER_SERVICE_BAD_REQUEST]: [\n \"Bad request sent to Pepper service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.UPDATE_REQUEST_PARAMS,\n ],\n [KeylessErrorType.PEPPER_SERVICE_OTHER]: [\n \"Unknown error from Pepper service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.PROVER_SERVICE_INTERNAL_ERROR]: [\n \"Internal error from Prover service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.PROVER_SERVICE_BAD_REQUEST]: [\n \"Bad request sent to Prover service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.UPDATE_REQUEST_PARAMS,\n ],\n [KeylessErrorType.PROVER_SERVICE_OTHER]: [\n \"Unknown error from Prover service.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.JWT_PARSING_ERROR]: [\n \"Error when parsing JWT. This should never happen. Join https://t.me/+h5CN-W35yUFiYzkx for support\",\n KeylessErrorCategory.INVALID_STATE,\n KeylessErrorResolutionTip.REINSTANTIATE,\n ],\n [KeylessErrorType.FULL_NODE_CONFIG_LOOKUP_ERROR]: [\n \"Error when looking up on-chain keyless configuration.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.FULL_NODE_VERIFICATION_KEY_LOOKUP_ERROR]: [\n \"Error when looking up on-chain verification key.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.FULL_NODE_JWKS_LOOKUP_ERROR]: [\n \"Error when looking up on-chain JWKS.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.FULL_NODE_OTHER]: [\n \"Unknown error from full node.\",\n KeylessErrorCategory.API_ERROR,\n KeylessErrorResolutionTip.SERVER_ERROR,\n ],\n [KeylessErrorType.SIGNATURE_TYPE_INVALID]: [\n \"The signature is not a valid Keyless signature.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.JOIN_SUPPORT_GROUP,\n ],\n [KeylessErrorType.SIGNATURE_EXPIRED]: [\n \"The ephemeral key pair used to sign the message has expired.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.MAX_EXPIRY_HORIZON_EXCEEDED]: [\n \"The expiry horizon on the signature exceeds the maximum allowed value.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.EPHEMERAL_SIGNATURE_VERIFICATION_FAILED]: [\n \"Failed to verify the ephemeral signature with the ephemeral public key.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.TRAINING_WHEELS_SIGNATURE_MISSING]: [\n \"The training wheels signature is missing but is required by the Keyless configuration.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.TRAINING_WHEELS_SIGNATURE_VERIFICATION_FAILED]: [\n \"Failed to verify the training wheels signature with the training wheels public key.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.PROOF_VERIFICATION_FAILED]: [\n \"The proof verification failed.\",\n KeylessErrorCategory.INVALID_SIGNATURE,\n KeylessErrorResolutionTip.REAUTHENTICATE,\n ],\n [KeylessErrorType.UNKNOWN]: [\n \"An unknown error has occurred.\",\n KeylessErrorCategory.UNKNOWN,\n KeylessErrorResolutionTip.UNKNOWN,\n ],\n};\n\nexport class KeylessError extends Error {\n readonly innerError?: unknown;\n\n readonly category: KeylessErrorCategory;\n\n readonly resolutionTip: KeylessErrorResolutionTip;\n\n readonly type: KeylessErrorType;\n\n readonly details?: string;\n\n /** @internal this constructor is for sdk internal use - do not instantiate outside of the SDK codebase */\n constructor(args: {\n innerError?: unknown;\n category: KeylessErrorCategory;\n resolutionTip: KeylessErrorResolutionTip;\n type: KeylessErrorType;\n message?: string;\n details?: string;\n }) {\n const { innerError, category, resolutionTip, type, message = KeylessErrors[type][0], details } = args;\n super(message);\n this.name = \"KeylessError\";\n this.innerError = innerError;\n this.category = category;\n this.resolutionTip = resolutionTip;\n this.type = type;\n this.details = details;\n this.message = KeylessError.constructMessage(message, resolutionTip, innerError, details);\n }\n\n static constructMessage(\n message: string,\n tip: KeylessErrorResolutionTip,\n innerError?: unknown,\n details?: string,\n ): string {\n let result = `\\nMessage: ${message}`;\n if (details) {\n result += `\\nDetails: ${details}`;\n }\n if (innerError instanceof AptosApiError) {\n result += `\\nAptosApiError: ${innerError.message}`;\n } else if (innerError !== undefined) {\n result += `\\nError: ${getErrorMessage(innerError)}`;\n }\n result += `\\nKeylessErrorResolutionTip: ${tip}`;\n return result;\n }\n\n /**\n * Static constructor that creates a KeylessError instance using the KeylessErrors constant\n * @param args.type The type of KeylessError\n * @param args.aptosApiError optional AptosApiError supplied for api errors\n * @param args.details optional details to include in the error message\n * @returns A new KeylessError instance\n */\n static fromErrorType(args: { type: KeylessErrorType; error?: unknown; details?: string }): KeylessError {\n const { error, type, details } = args;\n\n const [message, category, resolutionTip] = KeylessErrors[type];\n return new KeylessError({\n message,\n details,\n innerError: error,\n category,\n resolutionTip,\n type,\n });\n }\n}\n\n/**\n * Options for handling errors in the Aptos API.\n */\ntype AptosApiErrorOpts = {\n apiType: AptosApiType;\n aptosRequest: AptosRequest;\n aptosResponse: AptosResponse<any, any>;\n};\n\n/**\n * Represents an error returned from the Aptos API.\n * This class encapsulates the details of the error, including the request URL, response status, and additional data.\n *\n * @param name - The name of the error, which is always \"AptosApiError\".\n * @param url - The URL to which the request was made.\n * @param status - The HTTP response status code (e.g., 400).\n * @param statusText - The message associated with the response status.\n * @param data - The response data returned from the API.\n * @param request - The original AptosRequest that triggered the error.\n */\nexport class AptosApiError extends Error {\n readonly url: string;\n\n readonly status: number;\n\n readonly statusText: string;\n\n readonly data: any;\n\n readonly request: AptosRequest;\n\n /**\n * Constructs an instance of AptosApiError with relevant error details.\n *\n * @param opts - The options for creating the AptosApiError.\n * @param opts.apiType - The type of API that generated the error.\n * @param opts.aptosRequest - The request object that caused the error.\n * @param opts.aptosResponse - The response object containing error details.\n *\n * @internal This constructor is for SDK internal use - do not instantiate outside the SDK codebase.\n */\n constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts) {\n super(deriveErrorMessage({ apiType, aptosRequest, aptosResponse }));\n\n this.name = \"AptosApiError\";\n this.url = aptosResponse.url;\n this.status = aptosResponse.status;\n this.statusText = aptosResponse.statusText;\n this.data = aptosResponse.data;\n this.request = aptosRequest;\n }\n}\n\n/**\n * Derives an error message from the Aptos API response, providing context for debugging.\n * This function helps in understanding the nature of the error encountered during an API request.\n *\n * @param {AptosApiErrorOpts} opts - The options for deriving the error message.\n * @param {AptosApiType} opts.apiType - The type of API being called.\n * @param {AptosRequest} opts.aptosRequest - The original request made to the Aptos API.\n * @param {AptosResponse} opts.aptosResponse - The response received from the Aptos API.\n */\nfunction deriveErrorMessage({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts): string {\n // eslint-disable-next-line max-len\n // extract the W3C trace_id from the response headers if it exists. Some services set this in the response, and it's useful for debugging.\n // See https://www.w3.org/TR/trace-context/#relationship-between-the-headers .\n const traceId = aptosResponse.headers?.traceparent?.split(\"-\")[1];\n const traceIdString = traceId ? `(trace_id:${traceId}) ` : \"\";\n\n const errorPrelude: string = `Request to [${apiType}]: ${aptosRequest.method} ${\n aptosResponse.url ?? aptosRequest.url\n } ${traceIdString}failed with`;\n\n // handle graphql responses from indexer api and extract the error message of the first error\n if (apiType === AptosApiType.INDEXER && aptosResponse.data?.errors?.[0]?.message != null) {\n return `${errorPrelude}: ${aptosResponse.data.errors[0].message}`;\n }\n\n // Received well-known structured error response body - simply serialize and return it.\n // We don't need http status codes etc. in this case.\n if (aptosResponse.data?.message != null && aptosResponse.data?.error_code != null) {\n return `${errorPrelude}: ${JSON.stringify(aptosResponse.data)}`;\n }\n\n // This is the generic/catch-all case. We received some response from the API, but it doesn't appear to be a well-known structure.\n // We print http status codes and the response body (after some trimming),\n // in the hope that this gives enough context what went wrong without printing overly huge messages.\n return `${errorPrelude} status: ${aptosResponse.statusText}(code:${\n aptosResponse.status\n }) and response body: ${serializeAnyPayloadForErrorMessage(aptosResponse.data)}`;\n}\n\nconst SERIALIZED_PAYLOAD_TRIM_TO_MAX_LENGTH = 400;\n\n/**\n * This function accepts a payload of any type (probably an object) and serializes it to a string\n * Since we don't know the type or size of the payload, and we don't want to add a huge object in full to the error message\n * we limit the to the first 200 and last 200 characters of the serialized payload and put a \"...\" in the middle.\n * @param payload - The payload to serialize, which can be of any type.\n *\n * @returns A string representation of the serialized payload, potentially truncated.\n */\nfunction serializeAnyPayloadForErrorMessage(payload: any): string {\n const serializedPayload = JSON.stringify(payload);\n if (serializedPayload.length <= SERIALIZED_PAYLOAD_TRIM_TO_MAX_LENGTH) {\n return serializedPayload;\n }\n return `truncated(original_size:${serializedPayload.length}): ${serializedPayload.slice(\n 0,\n SERIALIZED_PAYLOAD_TRIM_TO_MAX_LENGTH / 2,\n )}...${serializedPayload.slice(-SERIALIZED_PAYLOAD_TRIM_TO_MAX_LENGTH / 2)}`;\n}\n"],"mappings":"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","names":["KeylessErrorCategory","KeylessErrorResolutionTip","KeylessErrorType","KeylessErrors","KeylessError","_KeylessError","args","innerError","category","resolutionTip","type","message","details","tip","result","AptosApiError","getErrorMessage","error","apiType","aptosRequest","aptosResponse","deriveErrorMessage","traceId","traceIdString","errorPrelude","serializeAnyPayloadForErrorMessage","SERIALIZED_PAYLOAD_TRIM_TO_MAX_LENGTH","payload","serializedPayload"]}
@@ -0,0 +1,2 @@
1
+ var o="1.36.0";export{o as a};
2
+ //# sourceMappingURL=chunk-X5YB74NB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.35.0\";\n"],"mappings":";AAQO,IAAM,UAAU;","names":[]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.36.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -0,0 +1,2 @@
1
+ import{a as o,b as r,c as s}from"./chunk-KXVD52Y6.mjs";import{a as t}from"./chunk-EODSU3YN.mjs";var a=class{constructor(e){this.config=e}async getTableItem(e){return o({aptosConfig:this.config,...e})}async getTableItemsData(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),r({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),s({aptosConfig:this.config,...e})}};export{a};
2
+ //# sourceMappingURL=chunk-XLDMPCLF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/table.ts"],"sourcesContent":["import { getTableItem, getTableItemsData, getTableItemsMetadata } from \"../internal/table\";\nimport {\n TableItemRequest,\n LedgerVersionArg,\n AnyNumber,\n PaginationArgs,\n WhereArg,\n OrderByArg,\n GetTableItemsDataResponse,\n GetTableItemsMetadataResponse,\n} from \"../types\";\nimport { TableItemsBoolExp, TableMetadatasBoolExp } from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Table` Aptos related queries.\n * @group Table\n */\nexport class Table {\n readonly config: AptosConfig;\n\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for a specific item in a table identified by the handle and the key for the item.\n * This function allows you to retrieve structured data from a table in the Aptos blockchain.\n *\n * @param args.handle A pointer to where that table is stored.\n * @param args.data Object that describes the table item, including key and value types.\n * @param args.data.key_type The Move type of the table key.\n * @param args.data.value_type The Move type of the table value.\n * @param args.data.key The value of the table key.\n * @param args.options.ledgerVersion The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns Table item value rendered in JSON.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve a table item from the Aptos blockchain\n * const tableItem = await aptos.getTableItem({\n * handle: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\",\n * data: {\n * key_type: \"address\", // Move type of table key\n * value_type: \"u128\", // Move type of table value\n * key: \"0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935\" // Value of table key\n * },\n * });\n *\n * console.log(tableItem);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {\n return getTableItem<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for table items data with optional filtering and pagination.\n * This function allows you to retrieve specific data from a table based on provided criteria.\n *\n * @param args - The arguments for querying table items data.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The number of items to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The criteria to order the results.\n *\n * Note: This query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve table items data with specific filtering options\n * const data = await aptos.getTableItemsData({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: {\n * table_handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" },\n * transaction_version: { _eq: \"0\" }\n * },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsDataResponse\n * @group Table\n */\n async getTableItemsData(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;\n }): Promise<GetTableItemsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsData({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for the metadata of table items, allowing for filtering and pagination.\n *\n * @param args - The parameters for the query.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The offset for pagination.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The order in which to return the items.\n *\n * Note that this query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching table items metadata with a filter condition\n * const data = await aptos.getTableItemsMetadata({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: { handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" } },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsMetadataResponse\n * @group Table\n */\n async getTableItemsMetadata(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;\n }): Promise<GetTableItemsMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsMetadata({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":";;;;;;;;;;AAoBO,IAAM,QAAN,MAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBjB,YAAY,QAAqB;AAC/B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuCA,MAAM,aAAgB,MAA0F;AAC9G,WAAO,aAAgB,EAAE,aAAa,KAAK,QAAQ,GAAG,KAAK,CAAC;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4CA,MAAM,kBAAkB,MAGe;AACrC,UAAM,wBAAwB;AAAA,MAC5B,QAAQ,KAAK;AAAA,MACb,sBAAsB,KAAK;AAAA,MAC3B;AAAA,IACF,CAAC;AACD,WAAO,kBAAkB,EAAE,aAAa,KAAK,QAAQ,GAAG,KAAK,CAAC;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwCA,MAAM,sBAAsB,MAGe;AACzC,UAAM,wBAAwB;AAAA,MAC5B,QAAQ,KAAK;AAAA,MACb,sBAAsB,KAAK;AAAA,MAC3B;AAAA,IACF,CAAC;AACD,WAAO,sBAAsB,EAAE,aAAa,KAAK,QAAQ,GAAG,KAAK,CAAC;AAAA,EACpE;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/api/table.ts"],"sourcesContent":["import { getTableItem, getTableItemsData, getTableItemsMetadata } from \"../internal/table\";\nimport {\n TableItemRequest,\n LedgerVersionArg,\n AnyNumber,\n PaginationArgs,\n WhereArg,\n OrderByArg,\n GetTableItemsDataResponse,\n GetTableItemsMetadataResponse,\n} from \"../types\";\nimport { TableItemsBoolExp, TableMetadatasBoolExp } from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Table` Aptos related queries.\n * @group Table\n */\nexport class Table {\n readonly config: AptosConfig;\n\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n /**\n * Queries for a specific item in a table identified by the handle and the key for the item.\n * This function allows you to retrieve structured data from a table in the Aptos blockchain.\n *\n * @param args.handle A pointer to where that table is stored.\n * @param args.data Object that describes the table item, including key and value types.\n * @param args.data.key_type The Move type of the table key.\n * @param args.data.value_type The Move type of the table value.\n * @param args.data.key The value of the table key.\n * @param args.options.ledgerVersion The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns Table item value rendered in JSON.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve a table item from the Aptos blockchain\n * const tableItem = await aptos.getTableItem({\n * handle: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\",\n * data: {\n * key_type: \"address\", // Move type of table key\n * value_type: \"u128\", // Move type of table value\n * key: \"0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935\" // Value of table key\n * },\n * });\n *\n * console.log(tableItem);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Table\n */\n async getTableItem<T>(args: { handle: string; data: TableItemRequest; options?: LedgerVersionArg }): Promise<T> {\n return getTableItem<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for table items data with optional filtering and pagination.\n * This function allows you to retrieve specific data from a table based on provided criteria.\n *\n * @param args - The arguments for querying table items data.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The number of items to skip before starting to collect the result set.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The criteria to order the results.\n *\n * Note: This query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve table items data with specific filtering options\n * const data = await aptos.getTableItemsData({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: {\n * table_handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" },\n * transaction_version: { _eq: \"0\" }\n * },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsDataResponse\n * @group Table\n */\n async getTableItemsData(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;\n }): Promise<GetTableItemsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsData({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for the metadata of table items, allowing for filtering and pagination.\n *\n * @param args - The parameters for the query.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to wait for before querying.\n * @param args.options - Optional parameters for pagination and filtering.\n * @param args.options.where - Conditions to filter the response.\n * @param args.options.offset - The offset for pagination.\n * @param args.options.limit - The maximum number of items to return.\n * @param args.options.orderBy - The order in which to return the items.\n *\n * Note that this query calls the indexer server.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching table items metadata with a filter condition\n * const data = await aptos.getTableItemsMetadata({\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * options: {\n * where: { handle: { _eq: \"0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca\" } },\n * limit: 10, // specify your own limit if needed\n * },\n * });\n *\n * console.log(data);\n * }\n * runExample().catch(console.error);\n * ```\n *\n * @returns GetTableItemsMetadataResponse\n * @group Table\n */\n async getTableItemsMetadata(args: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;\n }): Promise<GetTableItemsMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getTableItemsMetadata({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"gGAoBO,IAAMA,EAAN,KAAY,CAwBjB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAuCA,MAAM,aAAgBC,EAA0F,CAC9G,OAAOC,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CAC9D,CA4CA,MAAM,kBAAkBA,EAGe,CACrC,aAAME,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBF,EAAK,qBAC3B,iCACF,CAAC,EACMG,EAAkB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAChE,CAwCA,MAAM,sBAAsBA,EAGe,CACzC,aAAME,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBF,EAAK,qBAC3B,iCACF,CAAC,EACMI,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CACpE,CACF","names":["Table","config","args","getTableItem","waitForIndexerOnVersion","getTableItemsData","getTableItemsMetadata"]}
@@ -0,0 +1,2 @@
1
+ var n=new Map;function m(r,e,t){return async(...s)=>{if(n.has(e)){let{value:i,timestamp:u}=n.get(e);if(t===void 0||Date.now()-u<=t)return i}let a=await r(...s);return n.set(e,{value:a,timestamp:Date.now()}),a}}function o(r,e,t){return(...s)=>{if(n.has(e)){let{value:i,timestamp:u}=n.get(e);if(t===void 0||Date.now()-u<=t)return i}let a=r(...s);return n.set(e,{value:a,timestamp:Date.now()}),a}}export{m as a,o as b};
2
+ //# sourceMappingURL=chunk-YOZBVVKL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/memoize.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The global cache Map shared across all functions. Must keep care to ensure that the\n * cache keys are unique across all functions.\n * @group Implementation\n * @category Utils\n */\nconst cache = new Map<string, { value: any; timestamp: number }>();\n\n/**\n * A memoize higher-order function to cache the response of an async function.\n * This function helps to improve performance by avoiding repeated calls to the same async function with the same arguments\n * within a specified time-to-live (TTL).\n *\n * @param func The async function to cache the result of.\n * @param key The cache key used to store the result.\n * @param ttlMs The time-to-live in milliseconds for cached data.\n * @returns The cached or latest result.\n * @group Implementation\n * @category Utils\n */\nexport function memoizeAsync<T>(\n func: (...args: any[]) => Promise<T>,\n key: string,\n ttlMs?: number,\n): (...args: any[]) => Promise<T> {\n return async (...args: any[]) => {\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const { value, timestamp } = cache.get(key)!;\n if (ttlMs === undefined || Date.now() - timestamp <= ttlMs) {\n return value;\n }\n }\n\n // If not cached or TTL expired, compute the result\n const result = await func(...args);\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: Date.now() });\n\n return result;\n };\n}\n\n/**\n * Caches the result of a function call to improve performance on subsequent calls with the same arguments.\n *\n * @param key - The key to cache on, all accesses by this key will return the cached value.\n * @param func - The function whose result will be cached.\n * @param ttlMs - The time-to-live in milliseconds for cached data.\n * @returns A memoized version of the provided function that returns the cached result if available and within TTL.\n * @group Implementation\n * @category Utils\n */\nexport function memoize<T>(func: (...args: any[]) => T, key: string, ttlMs?: number): (...args: any[]) => T {\n return (...args: any[]) => {\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const { value, timestamp } = cache.get(key)!;\n if (ttlMs === undefined || Date.now() - timestamp <= ttlMs) {\n return value;\n }\n }\n\n // If not cached or TTL expired, compute the result\n const result = func(...args);\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: Date.now() });\n\n return result;\n };\n}\n"],"mappings":";AASA,IAAM,QAAQ,oBAAI,IAA+C;AAc1D,SAAS,aACd,MACA,KACA,OACgC;AAChC,SAAO,UAAU,SAAgB;AAE/B,QAAI,MAAM,IAAI,GAAG,GAAG;AAClB,YAAM,EAAE,OAAO,UAAU,IAAI,MAAM,IAAI,GAAG;AAC1C,UAAI,UAAU,UAAa,KAAK,IAAI,IAAI,aAAa,OAAO;AAC1D,eAAO;AAAA,MACT;AAAA,IACF;AAGA,UAAM,SAAS,MAAM,KAAK,GAAG,IAAI;AAGjC,UAAM,IAAI,KAAK,EAAE,OAAO,QAAQ,WAAW,KAAK,IAAI,EAAE,CAAC;AAEvD,WAAO;AAAA,EACT;AACF;AAYO,SAAS,QAAW,MAA6B,KAAa,OAAuC;AAC1G,SAAO,IAAI,SAAgB;AAEzB,QAAI,MAAM,IAAI,GAAG,GAAG;AAClB,YAAM,EAAE,OAAO,UAAU,IAAI,MAAM,IAAI,GAAG;AAC1C,UAAI,UAAU,UAAa,KAAK,IAAI,IAAI,aAAa,OAAO;AAC1D,eAAO;AAAA,MACT;AAAA,IACF;AAGA,UAAM,SAAS,KAAK,GAAG,IAAI;AAG3B,UAAM,IAAI,KAAK,EAAE,OAAO,QAAQ,WAAW,KAAK,IAAI,EAAE,CAAC;AAEvD,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/memoize.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The global cache Map shared across all functions. Must keep care to ensure that the\n * cache keys are unique across all functions.\n * @group Implementation\n * @category Utils\n */\nconst cache = new Map<string, { value: any; timestamp: number }>();\n\n/**\n * A memoize higher-order function to cache the response of an async function.\n * This function helps to improve performance by avoiding repeated calls to the same async function with the same arguments\n * within a specified time-to-live (TTL).\n *\n * @param func The async function to cache the result of.\n * @param key The cache key used to store the result.\n * @param ttlMs The time-to-live in milliseconds for cached data.\n * @returns The cached or latest result.\n * @group Implementation\n * @category Utils\n */\nexport function memoizeAsync<T>(\n func: (...args: any[]) => Promise<T>,\n key: string,\n ttlMs?: number,\n): (...args: any[]) => Promise<T> {\n return async (...args: any[]) => {\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const { value, timestamp } = cache.get(key)!;\n if (ttlMs === undefined || Date.now() - timestamp <= ttlMs) {\n return value;\n }\n }\n\n // If not cached or TTL expired, compute the result\n const result = await func(...args);\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: Date.now() });\n\n return result;\n };\n}\n\n/**\n * Caches the result of a function call to improve performance on subsequent calls with the same arguments.\n *\n * @param key - The key to cache on, all accesses by this key will return the cached value.\n * @param func - The function whose result will be cached.\n * @param ttlMs - The time-to-live in milliseconds for cached data.\n * @returns A memoized version of the provided function that returns the cached result if available and within TTL.\n * @group Implementation\n * @category Utils\n */\nexport function memoize<T>(func: (...args: any[]) => T, key: string, ttlMs?: number): (...args: any[]) => T {\n return (...args: any[]) => {\n // Check if the cached result exists and is within TTL\n if (cache.has(key)) {\n const { value, timestamp } = cache.get(key)!;\n if (ttlMs === undefined || Date.now() - timestamp <= ttlMs) {\n return value;\n }\n }\n\n // If not cached or TTL expired, compute the result\n const result = func(...args);\n\n // Cache the result with a timestamp\n cache.set(key, { value: result, timestamp: Date.now() });\n\n return result;\n };\n}\n"],"mappings":"AASA,IAAMA,EAAQ,IAAI,IAcX,SAASC,EACdC,EACAC,EACAC,EACgC,CAChC,MAAO,UAAUC,IAAgB,CAE/B,GAAIL,EAAM,IAAIG,CAAG,EAAG,CAClB,GAAM,CAAE,MAAAG,EAAO,UAAAC,CAAU,EAAIP,EAAM,IAAIG,CAAG,EAC1C,GAAIC,IAAU,QAAa,KAAK,IAAI,EAAIG,GAAaH,EACnD,OAAOE,CAEX,CAGA,IAAME,EAAS,MAAMN,EAAK,GAAGG,CAAI,EAGjC,OAAAL,EAAM,IAAIG,EAAK,CAAE,MAAOK,EAAQ,UAAW,KAAK,IAAI,CAAE,CAAC,EAEhDA,CACT,CACF,CAYO,SAASC,EAAWP,EAA6BC,EAAaC,EAAuC,CAC1G,MAAO,IAAIC,IAAgB,CAEzB,GAAIL,EAAM,IAAIG,CAAG,EAAG,CAClB,GAAM,CAAE,MAAAG,EAAO,UAAAC,CAAU,EAAIP,EAAM,IAAIG,CAAG,EAC1C,GAAIC,IAAU,QAAa,KAAK,IAAI,EAAIG,GAAaH,EACnD,OAAOE,CAEX,CAGA,IAAME,EAASN,EAAK,GAAGG,CAAI,EAG3B,OAAAL,EAAM,IAAIG,EAAK,CAAE,MAAOK,EAAQ,UAAW,KAAK,IAAI,CAAE,CAAC,EAEhDA,CACT,CACF","names":["cache","memoizeAsync","func","key","ttlMs","args","value","timestamp","result","memoize"]}
@@ -0,0 +1,2 @@
1
+ import{b as s}from"./chunk-VHY6ZATX.mjs";import{c as r}from"./chunk-56CNRT2K.mjs";var a=class d{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}static fromHex(e){let i=s.hexInputToUint8Array(e);return new d(i)}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let i=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,i}remaining(){return this.buffer.byteLength-this.offset}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOptionStr(){return this.deserializeOption("string")}deserializeOption(e,i){if(this.deserializeBool()){if(e==="string")return this.deserializeStr();if(e==="bytes")return this.deserializeBytes();if(e==="fixedBytes"){if(i===void 0)throw new Error("Fixed bytes length not provided");return this.deserializeFixedBytes(i)}return this.deserialize(e)}}deserializeBytes(){let e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}deserializeFixedBytes(e){return new Uint8Array(this.read(e))}deserializeBool(){let e=new Uint8Array(this.read(1))[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return new DataView(this.read(1)).getUint8(0)}deserializeU16(){return new DataView(this.read(2)).getUint16(0,!0)}deserializeU32(){return new DataView(this.read(4)).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),i=this.deserializeU32();return BigInt(BigInt(i)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),i=this.deserializeU64();return BigInt(i<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),i=this.deserializeU128();return BigInt(i<<BigInt(128)|e)}deserializeUleb128AsU32(){let e=BigInt(0),i=0;for(;e<r;){let t=this.deserializeU8();if(e|=BigInt(t&127)<<BigInt(i),!(t&128))break;i+=7}if(e>r)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let i=this.deserializeUleb128AsU32(),t=new Array;for(let n=0;n<i;n+=1)t.push(this.deserialize(e));return t}};export{a};
2
+ //# sourceMappingURL=chunk-ZD2TY5N3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/bcs/deserializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable no-bitwise */\nimport { MAX_U32_NUMBER } from \"./consts\";\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256, HexInput } from \"../types\";\nimport { Hex } from \"../core/hex\";\n\n/**\n * This interface exists to define Deserializable<T> inputs for functions that\n * deserialize a byte buffer into a type T.\n * It is not intended to be implemented or extended, because Typescript has no support\n * for static methods in interfaces.\n *\n * @template T - The type that this will deserialize into.\n * @group Implementation\n * @category BCS\n */\nexport interface Deserializable<T> {\n /**\n * Deserializes the buffered bytes into an instance of the specified class type.\n * This function provides an alternative syntax for deserialization, allowing users to call\n * `deserializer.deserialize(MyClass)` instead of `MyClass.deserialize(deserializer)`.\n *\n * @param deserializer - The deserializer instance with the buffered bytes.\n * @returns The deserialized value of class type T.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * ```\n * @group Implementation\n * @category BCS\n */\n deserialize(deserializer: Deserializer): T;\n}\n\n/**\n * A class that provides methods for deserializing various data types from a byte buffer.\n * It supports deserialization of primitive types, strings, and complex objects using a BCS (Binary Common Serialization) layout.\n * @group Implementation\n * @category BCS\n */\nexport class Deserializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n /**\n * Creates a new instance of the class with a copy of the provided data buffer.\n * This prevents outside mutation of the buffer.\n *\n * @param data - The data to be copied into the internal buffer as a Uint8Array.\n * @group Implementation\n * @category BCS\n */\n constructor(data: Uint8Array) {\n // copies data to prevent outside mutation of buffer.\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n\n static fromHex(hex: HexInput): Deserializer {\n const data = Hex.hexInputToUint8Array(hex);\n return new Deserializer(data);\n }\n\n /**\n * Reads a specified number of bytes from the buffer and advances the offset.\n *\n * @param length - The number of bytes to read from the buffer.\n * @throws Throws an error if the read operation exceeds the buffer's length.\n * @group Implementation\n * @category BCS\n */\n private read(length: number): ArrayBuffer {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n\n const bytes = this.buffer.slice(this.offset, this.offset + length);\n this.offset += length;\n return bytes;\n }\n\n /**\n * Returns the number of bytes remaining in the buffer.\n *\n * This information is useful to determine if there's more data to be read.\n *\n * @returns The number of bytes remaining in the buffer.\n * @group Implementation\n * @category BCS\n */\n remaining(): number {\n return this.buffer.byteLength - this.offset;\n }\n\n /**\n * Deserializes a UTF-8 encoded string from a byte array. It first reads the length of the string in bytes,\n * followed by the actual byte content, and decodes it into a string.\n *\n * BCS layout for \"string\": string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n *\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeStr() === \"1234abcd\");\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeStr(): string {\n const value = this.deserializeBytes();\n const textDecoder = new TextDecoder();\n return textDecoder.decode(value);\n }\n\n /**\n * @deprecated use `deserializeOption(\"string\")` instead.\n *\n * The BCS layout for Optional<String> is 0 if none, else 1 followed by the string length and string content.\n * @returns The deserialized string if it exists, otherwise undefined.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00]));\n * assert(deserializer.deserializeOptionStr() === undefined);\n * const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeOptionStr() === \"1234abcd\");\n * ```\n */\n deserializeOptionStr(): string | undefined {\n return this.deserializeOption(\"string\");\n }\n\n /**\n * Deserializes an optional value from the buffer.\n *\n * The BCS layout for Optional<T> starts with a boolean byte (0 if none, 1 if some),\n * followed by the value if present.\n *\n * @template T - The type of the value to deserialize\n * @param type - Either a Deserializable class or one of the string literals: \"string\", \"bytes\", or \"fixedBytes\"\n * @param len - Required length when type is \"fixedBytes\", ignored otherwise\n * @returns The deserialized value if present, undefined otherwise\n *\n * @throws {Error} When \"fixedBytes\" is specified without a length\n *\n * @example\n * ```typescript\n * // Deserialize an optional string\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 97, 98, 99]));\n * const optStr = deserializer.deserializeOption(\"string\");\n * // optStr === \"abc\"\n *\n * // Deserialize an optional custom type\n * const deserializer = new Deserializer(new Uint8Array([0]));\n * const optValue = deserializer.deserializeOption(MyClass);\n * // optValue === undefined\n *\n * // Deserialize optional bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 1, 2, 3]));\n * const optBytes = deserializer.deserializeOption(\"bytes\");\n * // optBytes === Uint8Array[1, 2, 3]\n *\n * // Deserialize optional fixed bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 1, 2, 3, 4]));\n * const optBytes = deserializer.deserializeOption(\"fixedBytes\", 4);\n * // optBytes === Uint8Array[1, 2, 3, 4]\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeOption(type: \"string\"): string | undefined;\n deserializeOption(type: \"bytes\"): Uint8Array | undefined;\n deserializeOption(type: \"fixedBytes\", len: number): Uint8Array | undefined;\n deserializeOption<T>(type: Deserializable<T>): T | undefined;\n deserializeOption<T>(\n type: Deserializable<T> | \"string\" | \"bytes\" | \"fixedBytes\",\n len?: number,\n ): T | string | Uint8Array | undefined {\n const exists = this.deserializeBool();\n if (!exists) return undefined;\n\n if (type === \"string\") {\n return this.deserializeStr();\n }\n if (type === \"bytes\") {\n return this.deserializeBytes();\n }\n if (type === \"fixedBytes\") {\n if (len === undefined) {\n throw new Error(\"Fixed bytes length not provided\");\n }\n return this.deserializeFixedBytes(len);\n }\n\n return this.deserialize(type);\n }\n\n /**\n * Deserializes an array of bytes.\n *\n * The BCS layout for \"bytes\" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer\n * encoded as a uleb128 integer, indicating the length of the bytes array.\n *\n * @returns {Uint8Array} The deserialized array of bytes.\n * @group Implementation\n * @category BCS\n */\n deserializeBytes(): Uint8Array {\n const len = this.deserializeUleb128AsU32();\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes an array of bytes of a specified length.\n *\n * @param len - The number of bytes to read from the source.\n * @group Implementation\n * @category BCS\n */\n deserializeFixedBytes(len: number): Uint8Array {\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes a boolean value from a byte stream.\n *\n * The BCS layout for a boolean uses one byte, where \"0x01\" represents true and \"0x00\" represents false.\n * An error is thrown if the byte value is not valid.\n *\n * @returns The deserialized boolean value.\n * @throws Throws an error if the boolean value is invalid.\n * @group Implementation\n * @category BCS\n */\n deserializeBool(): boolean {\n const bool = new Uint8Array(this.read(1))[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n\n /**\n * Deserializes a uint8 number from the binary data.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n *\n * @returns {number} The deserialized uint8 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU8(): Uint8 {\n return new DataView(this.read(1)).getUint8(0);\n }\n\n /**\n * Deserializes a uint16 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint16\": Two bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU16(): Uint16 {\n return new DataView(this.read(2)).getUint16(0, true);\n }\n\n /**\n * Deserializes a uint32 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint32\": Four bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU32(): Uint32 {\n return new DataView(this.read(4)).getUint32(0, true);\n }\n\n /**\n * Deserializes a uint64 number.\n *\n * This function combines two 32-bit values to return a 64-bit unsigned integer in little-endian representation.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU64(): Uint64 {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values and return (little endian)\n return BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n }\n\n /**\n * Deserializes a uint128 number from its binary representation.\n * This function combines two 64-bit values to return a single uint128 value in little-endian format.\n *\n * @returns {BigInt} The deserialized uint128 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU128(): Uint128 {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values and return (little endian)\n return BigInt((high << BigInt(64)) | low);\n }\n\n /**\n * Deserializes a uint256 number from its binary representation.\n *\n * The BCS layout for \"uint256\" consists of thirty-two bytes in little-endian format.\n *\n * @returns {BigInt} The deserialized uint256 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU256(): Uint256 {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values and return (little endian)\n return BigInt((high << BigInt(128)) | low);\n }\n\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.\n *\n * @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.\n * @returns {number} The deserialized uint32 value.\n * @group Implementation\n * @category BCS\n */\n deserializeUleb128AsU32(): Uint32 {\n let value: bigint = BigInt(0);\n let shift = 0;\n\n while (value < MAX_U32_NUMBER) {\n const byte = this.deserializeU8();\n value |= BigInt(byte & 0x7f) << BigInt(shift);\n\n if ((byte & 0x80) === 0) {\n break;\n }\n shift += 7;\n }\n\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n return Number(value);\n }\n\n /**\n * Helper function that primarily exists to support alternative syntax for deserialization.\n * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use\n * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.\n *\n * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n * @group Implementation\n * @category BCS\n */\n deserialize<T>(cls: Deserializable<T>): T {\n // NOTE: `deserialize` in `cls.deserialize(this)` here is a static method defined in `cls`,\n // It is separate from the `deserialize` instance method defined here in Deserializer.\n return cls.deserialize(this);\n }\n\n /**\n * Deserializes an array of BCS Deserializable values given an existing Deserializer instance with a loaded byte buffer.\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n * @returns An array of deserialized values of type T.\n * @example\n * // serialize a vector of addresses\n * const addresses = new Array<AccountAddress>(\n * AccountAddress.from(\"0x1\"),\n * AccountAddress.from(\"0x2\"),\n * AccountAddress.from(\"0xa\"),\n * AccountAddress.from(\"0xb\"),\n * );\n * const serializer = new Serializer();\n * serializer.serializeVector(addresses);\n * const serializedBytes = serializer.toUint8Array();\n *\n * // deserialize the bytes into an array of addresses\n * const deserializer = new Deserializer(serializedBytes);\n * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);\n * // deserializedAddresses is now an array of AccountAddress instances\n * @group Implementation\n * @category BCS\n */\n deserializeVector<T>(cls: Deserializable<T>): Array<T> {\n const length = this.deserializeUleb128AsU32();\n const vector = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n vector.push(this.deserialize(cls));\n }\n return vector;\n }\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../src/bcs/deserializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable no-bitwise */\nimport { MAX_U32_NUMBER } from \"./consts\";\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256, HexInput } from \"../types\";\nimport { Hex } from \"../core/hex\";\n\n/**\n * This interface exists to define Deserializable<T> inputs for functions that\n * deserialize a byte buffer into a type T.\n * It is not intended to be implemented or extended, because Typescript has no support\n * for static methods in interfaces.\n *\n * @template T - The type that this will deserialize into.\n * @group Implementation\n * @category BCS\n */\nexport interface Deserializable<T> {\n /**\n * Deserializes the buffered bytes into an instance of the specified class type.\n * This function provides an alternative syntax for deserialization, allowing users to call\n * `deserializer.deserialize(MyClass)` instead of `MyClass.deserialize(deserializer)`.\n *\n * @param deserializer - The deserializer instance with the buffered bytes.\n * @returns The deserialized value of class type T.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * ```\n * @group Implementation\n * @category BCS\n */\n deserialize(deserializer: Deserializer): T;\n}\n\n/**\n * A class that provides methods for deserializing various data types from a byte buffer.\n * It supports deserialization of primitive types, strings, and complex objects using a BCS (Binary Common Serialization) layout.\n * @group Implementation\n * @category BCS\n */\nexport class Deserializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n /**\n * Creates a new instance of the class with a copy of the provided data buffer.\n * This prevents outside mutation of the buffer.\n *\n * @param data - The data to be copied into the internal buffer as a Uint8Array.\n * @group Implementation\n * @category BCS\n */\n constructor(data: Uint8Array) {\n // copies data to prevent outside mutation of buffer.\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n\n static fromHex(hex: HexInput): Deserializer {\n const data = Hex.hexInputToUint8Array(hex);\n return new Deserializer(data);\n }\n\n /**\n * Reads a specified number of bytes from the buffer and advances the offset.\n *\n * @param length - The number of bytes to read from the buffer.\n * @throws Throws an error if the read operation exceeds the buffer's length.\n * @group Implementation\n * @category BCS\n */\n private read(length: number): ArrayBuffer {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n\n const bytes = this.buffer.slice(this.offset, this.offset + length);\n this.offset += length;\n return bytes;\n }\n\n /**\n * Returns the number of bytes remaining in the buffer.\n *\n * This information is useful to determine if there's more data to be read.\n *\n * @returns The number of bytes remaining in the buffer.\n * @group Implementation\n * @category BCS\n */\n remaining(): number {\n return this.buffer.byteLength - this.offset;\n }\n\n /**\n * Deserializes a UTF-8 encoded string from a byte array. It first reads the length of the string in bytes,\n * followed by the actual byte content, and decodes it into a string.\n *\n * BCS layout for \"string\": string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n *\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeStr() === \"1234abcd\");\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeStr(): string {\n const value = this.deserializeBytes();\n const textDecoder = new TextDecoder();\n return textDecoder.decode(value);\n }\n\n /**\n * @deprecated use `deserializeOption(\"string\")` instead.\n *\n * The BCS layout for Optional<String> is 0 if none, else 1 followed by the string length and string content.\n * @returns The deserialized string if it exists, otherwise undefined.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00]));\n * assert(deserializer.deserializeOptionStr() === undefined);\n * const deserializer = new Deserializer(new Uint8Array([1, 8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeOptionStr() === \"1234abcd\");\n * ```\n */\n deserializeOptionStr(): string | undefined {\n return this.deserializeOption(\"string\");\n }\n\n /**\n * Deserializes an optional value from the buffer.\n *\n * The BCS layout for Optional<T> starts with a boolean byte (0 if none, 1 if some),\n * followed by the value if present.\n *\n * @template T - The type of the value to deserialize\n * @param type - Either a Deserializable class or one of the string literals: \"string\", \"bytes\", or \"fixedBytes\"\n * @param len - Required length when type is \"fixedBytes\", ignored otherwise\n * @returns The deserialized value if present, undefined otherwise\n *\n * @throws {Error} When \"fixedBytes\" is specified without a length\n *\n * @example\n * ```typescript\n * // Deserialize an optional string\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 97, 98, 99]));\n * const optStr = deserializer.deserializeOption(\"string\");\n * // optStr === \"abc\"\n *\n * // Deserialize an optional custom type\n * const deserializer = new Deserializer(new Uint8Array([0]));\n * const optValue = deserializer.deserializeOption(MyClass);\n * // optValue === undefined\n *\n * // Deserialize optional bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 1, 2, 3]));\n * const optBytes = deserializer.deserializeOption(\"bytes\");\n * // optBytes === Uint8Array[1, 2, 3]\n *\n * // Deserialize optional fixed bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 1, 2, 3, 4]));\n * const optBytes = deserializer.deserializeOption(\"fixedBytes\", 4);\n * // optBytes === Uint8Array[1, 2, 3, 4]\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeOption(type: \"string\"): string | undefined;\n deserializeOption(type: \"bytes\"): Uint8Array | undefined;\n deserializeOption(type: \"fixedBytes\", len: number): Uint8Array | undefined;\n deserializeOption<T>(type: Deserializable<T>): T | undefined;\n deserializeOption<T>(\n type: Deserializable<T> | \"string\" | \"bytes\" | \"fixedBytes\",\n len?: number,\n ): T | string | Uint8Array | undefined {\n const exists = this.deserializeBool();\n if (!exists) return undefined;\n\n if (type === \"string\") {\n return this.deserializeStr();\n }\n if (type === \"bytes\") {\n return this.deserializeBytes();\n }\n if (type === \"fixedBytes\") {\n if (len === undefined) {\n throw new Error(\"Fixed bytes length not provided\");\n }\n return this.deserializeFixedBytes(len);\n }\n\n return this.deserialize(type);\n }\n\n /**\n * Deserializes an array of bytes.\n *\n * The BCS layout for \"bytes\" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer\n * encoded as a uleb128 integer, indicating the length of the bytes array.\n *\n * @returns {Uint8Array} The deserialized array of bytes.\n * @group Implementation\n * @category BCS\n */\n deserializeBytes(): Uint8Array {\n const len = this.deserializeUleb128AsU32();\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes an array of bytes of a specified length.\n *\n * @param len - The number of bytes to read from the source.\n * @group Implementation\n * @category BCS\n */\n deserializeFixedBytes(len: number): Uint8Array {\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes a boolean value from a byte stream.\n *\n * The BCS layout for a boolean uses one byte, where \"0x01\" represents true and \"0x00\" represents false.\n * An error is thrown if the byte value is not valid.\n *\n * @returns The deserialized boolean value.\n * @throws Throws an error if the boolean value is invalid.\n * @group Implementation\n * @category BCS\n */\n deserializeBool(): boolean {\n const bool = new Uint8Array(this.read(1))[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n\n /**\n * Deserializes a uint8 number from the binary data.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n *\n * @returns {number} The deserialized uint8 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU8(): Uint8 {\n return new DataView(this.read(1)).getUint8(0);\n }\n\n /**\n * Deserializes a uint16 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint16\": Two bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU16(): Uint16 {\n return new DataView(this.read(2)).getUint16(0, true);\n }\n\n /**\n * Deserializes a uint32 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint32\": Four bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU32(): Uint32 {\n return new DataView(this.read(4)).getUint32(0, true);\n }\n\n /**\n * Deserializes a uint64 number.\n *\n * This function combines two 32-bit values to return a 64-bit unsigned integer in little-endian representation.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n * @group Implementation\n * @category BCS\n */\n deserializeU64(): Uint64 {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values and return (little endian)\n return BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n }\n\n /**\n * Deserializes a uint128 number from its binary representation.\n * This function combines two 64-bit values to return a single uint128 value in little-endian format.\n *\n * @returns {BigInt} The deserialized uint128 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU128(): Uint128 {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values and return (little endian)\n return BigInt((high << BigInt(64)) | low);\n }\n\n /**\n * Deserializes a uint256 number from its binary representation.\n *\n * The BCS layout for \"uint256\" consists of thirty-two bytes in little-endian format.\n *\n * @returns {BigInt} The deserialized uint256 number.\n * @group Implementation\n * @category BCS\n */\n deserializeU256(): Uint256 {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values and return (little endian)\n return BigInt((high << BigInt(128)) | low);\n }\n\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.\n *\n * @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.\n * @returns {number} The deserialized uint32 value.\n * @group Implementation\n * @category BCS\n */\n deserializeUleb128AsU32(): Uint32 {\n let value: bigint = BigInt(0);\n let shift = 0;\n\n while (value < MAX_U32_NUMBER) {\n const byte = this.deserializeU8();\n value |= BigInt(byte & 0x7f) << BigInt(shift);\n\n if ((byte & 0x80) === 0) {\n break;\n }\n shift += 7;\n }\n\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n return Number(value);\n }\n\n /**\n * Helper function that primarily exists to support alternative syntax for deserialization.\n * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use\n * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.\n *\n * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n * @group Implementation\n * @category BCS\n */\n deserialize<T>(cls: Deserializable<T>): T {\n // NOTE: `deserialize` in `cls.deserialize(this)` here is a static method defined in `cls`,\n // It is separate from the `deserialize` instance method defined here in Deserializer.\n return cls.deserialize(this);\n }\n\n /**\n * Deserializes an array of BCS Deserializable values given an existing Deserializer instance with a loaded byte buffer.\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n * @returns An array of deserialized values of type T.\n * @example\n * // serialize a vector of addresses\n * const addresses = new Array<AccountAddress>(\n * AccountAddress.from(\"0x1\"),\n * AccountAddress.from(\"0x2\"),\n * AccountAddress.from(\"0xa\"),\n * AccountAddress.from(\"0xb\"),\n * );\n * const serializer = new Serializer();\n * serializer.serializeVector(addresses);\n * const serializedBytes = serializer.toUint8Array();\n *\n * // deserialize the bytes into an array of addresses\n * const deserializer = new Deserializer(serializedBytes);\n * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);\n * // deserializedAddresses is now an array of AccountAddress instances\n * @group Implementation\n * @category BCS\n */\n deserializeVector<T>(cls: Deserializable<T>): Array<T> {\n const length = this.deserializeUleb128AsU32();\n const vector = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n vector.push(this.deserialize(cls));\n }\n return vector;\n }\n}\n"],"mappings":"kFA6CO,IAAMA,EAAN,MAAMC,CAAa,CAaxB,YAAYC,EAAkB,CAE5B,KAAK,OAAS,IAAI,YAAYA,EAAK,MAAM,EACzC,IAAI,WAAW,KAAK,MAAM,EAAE,IAAIA,EAAM,CAAC,EACvC,KAAK,OAAS,CAChB,CAEA,OAAO,QAAQC,EAA6B,CAC1C,IAAMD,EAAOE,EAAI,qBAAqBD,CAAG,EACzC,OAAO,IAAIF,EAAaC,CAAI,CAC9B,CAUQ,KAAKG,EAA6B,CACxC,GAAI,KAAK,OAASA,EAAS,KAAK,OAAO,WACrC,MAAM,IAAI,MAAM,8BAA8B,EAGhD,IAAMC,EAAQ,KAAK,OAAO,MAAM,KAAK,OAAQ,KAAK,OAASD,CAAM,EACjE,YAAK,QAAUA,EACRC,CACT,CAWA,WAAoB,CAClB,OAAO,KAAK,OAAO,WAAa,KAAK,MACvC,CAiBA,gBAAyB,CACvB,IAAMC,EAAQ,KAAK,iBAAiB,EAEpC,OADoB,IAAI,YAAY,EACjB,OAAOA,CAAK,CACjC,CAeA,sBAA2C,CACzC,OAAO,KAAK,kBAAkB,QAAQ,CACxC,CA4CA,kBACEC,EACAC,EACqC,CAErC,GADe,KAAK,gBAAgB,EAGpC,IAAID,IAAS,SACX,OAAO,KAAK,eAAe,EAE7B,GAAIA,IAAS,QACX,OAAO,KAAK,iBAAiB,EAE/B,GAAIA,IAAS,aAAc,CACzB,GAAIC,IAAQ,OACV,MAAM,IAAI,MAAM,iCAAiC,EAEnD,OAAO,KAAK,sBAAsBA,CAAG,CACvC,CAEA,OAAO,KAAK,YAAYD,CAAI,EAC9B,CAYA,kBAA+B,CAC7B,IAAMC,EAAM,KAAK,wBAAwB,EACzC,OAAO,IAAI,WAAW,KAAK,KAAKA,CAAG,CAAC,CACtC,CASA,sBAAsBA,EAAyB,CAC7C,OAAO,IAAI,WAAW,KAAK,KAAKA,CAAG,CAAC,CACtC,CAaA,iBAA2B,CACzB,IAAMC,EAAO,IAAI,WAAW,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,EAC3C,GAAIA,IAAS,GAAKA,IAAS,EACzB,MAAM,IAAI,MAAM,uBAAuB,EAEzC,OAAOA,IAAS,CAClB,CAWA,eAAuB,CACrB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAC9C,CAcA,gBAAyB,CACvB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,UAAU,EAAG,EAAI,CACrD,CAcA,gBAAyB,CACvB,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,EAAE,UAAU,EAAG,EAAI,CACrD,CAcA,gBAAyB,CACvB,IAAMC,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQ,OAAOA,CAAI,GAAK,OAAO,EAAE,EAAK,OAAOD,CAAG,CAAC,CAC1D,CAUA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,eAAe,EAC1BC,EAAO,KAAK,eAAe,EAGjC,OAAO,OAAQA,GAAQ,OAAO,EAAE,EAAKD,CAAG,CAC1C,CAWA,iBAA2B,CACzB,IAAMA,EAAM,KAAK,gBAAgB,EAC3BC,EAAO,KAAK,gBAAgB,EAGlC,OAAO,OAAQA,GAAQ,OAAO,GAAG,EAAKD,CAAG,CAC3C,CAYA,yBAAkC,CAChC,IAAIJ,EAAgB,OAAO,CAAC,EACxBM,EAAQ,EAEZ,KAAON,EAAQO,GAAgB,CAC7B,IAAMC,EAAO,KAAK,cAAc,EAGhC,GAFAR,GAAS,OAAOQ,EAAO,GAAI,GAAK,OAAOF,CAAK,EAEvC,EAAAE,EAAO,KACV,MAEFF,GAAS,CACX,CAEA,GAAIN,EAAQO,EACV,MAAM,IAAI,MAAM,qDAAqD,EAGvE,OAAO,OAAOP,CAAK,CACrB,CAiBA,YAAeS,EAA2B,CAGxC,OAAOA,EAAI,YAAY,IAAI,CAC7B,CA0BA,kBAAqBA,EAAkC,CACrD,IAAMX,EAAS,KAAK,wBAAwB,EACtCY,EAAS,IAAI,MACnB,QAASC,EAAI,EAAGA,EAAIb,EAAQa,GAAK,EAC/BD,EAAO,KAAK,KAAK,YAAYD,CAAG,CAAC,EAEnC,OAAOC,CACT,CACF","names":["Deserializer","_Deserializer","data","hex","Hex","length","bytes","value","type","len","bool","low","high","shift","MAX_U32_NUMBER","byte","cls","vector","i"]}
@@ -0,0 +1,2 @@
1
+ import{b as s}from"./chunk-LQOSHBB7.mjs";import{decode as c}from"js-base64";async function m(n){return new Promise(e=>{setTimeout(e,n)})}function l(n){return n instanceof Error?n.message:String(n)}var g=()=>Math.floor(Date.now()/1e3);function p(n){let e=new Date(n*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function f(n){let e=n.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return c(t)}function _(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4!==0;)e+="=";return new Uint8Array(Buffer.from(e,"base64"))}var b=(n,e)=>n*10**e,h=(n,e)=>n/10**e,i=n=>{let e="";for(let t=2;t<n.length;t+=2)e+=String.fromCharCode(parseInt(n.substring(t,t+2),16));return e},x=n=>{let{account_address:e,module_name:t,struct_name:r}=n,o=i(t),a=i(r);return`${e}::${o}::${a}`},y=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null&&"account_address"in n&&"module_name"in n&&"struct_name"in n&&typeof n.account_address=="string"&&typeof n.module_name=="string"&&typeof n.struct_name=="string";function A(n){let e=n.split("::");if(e.length!==3)throw new Error(`Invalid function ${n}`);let t=e[0],r=e[1],o=e[2];return{moduleAddress:t,moduleName:r,functionName:o}}function S(n){let e=n.split("::");return e.length===3&&s.isValid({input:e[0]}).valid}function w(n,e=6,t=5){return`${n.slice(0,e)}...${n.slice(-t)}`}export{m as a,l as b,g as c,p as d,f as e,_ as f,b as g,h,x as i,y as j,A as k,S as l,w as m};
2
+ //# sourceMappingURL=chunk-ZELTLAUN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/helpers.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\nimport { MoveFunctionId, MoveStructId } from \"../types\";\nimport { AccountAddress } from \"../core/accountAddress\";\n\n/**\n * Sleep for the specified amount of time in milliseconds.\n * This function can be used to introduce delays in asynchronous operations.\n *\n * @param timeMs - The time in milliseconds to sleep.\n * @group Implementation\n * @category Utils\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\n/**\n * Get the error message from an unknown error.\n *\n * @param error The error to get the message from\n * @returns The error message\n * @group Implementation\n * @category Utils\n */\nexport function getErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/**\n * @group Implementation\n * @category Utils\n */\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\n/**\n * Floors the given timestamp to the nearest whole hour.\n * This function is useful for normalizing timestamps to hourly intervals.\n *\n * @param timestampInSeconds - The timestamp in seconds to be floored.\n * @group Implementation\n * @category Utils\n */\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\n/**\n * Decodes a base64 URL-encoded string into its original form.\n * This function is useful for converting base64 URL-encoded data back to a readable format.\n *\n * @param base64Url - The base64 URL-encoded string to decode.\n * @returns The decoded string.\n * @group Implementation\n * @category Utils\n */\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n\nexport function base64UrlToBytes(base64Url: string): Uint8Array {\n // Convert Base64Url to Base64\n let base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Add padding if needed\n while (base64.length % 4 !== 0) {\n base64 += \"=\";\n }\n // Use Buffer to convert base64 to Uint8Array\n return new Uint8Array(Buffer.from(base64, \"base64\"));\n}\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * a human-readable amount format to the smallest unit format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n * @group Implementation\n * @category Utils\n */\nexport const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * the smallest unit format to a human-readable amount format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n * @group Implementation\n * @category Utils\n */\nexport const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;\n\n/**\n * Convert a hex string to an ascii string with the `0x` prefix.\n *\n * `0x6170746f735f636f696e` --> `aptos_coin`\n *\n * @param hex The hex string to convert (e.g. `0x6170746f735f636f696e`)\n * @returns The ascii string\n * @group Implementation\n * @category Utils\n */\nconst hexToAscii = (hex: string) => {\n let str = \"\";\n for (let n = 2; n < hex.length; n += 2) {\n str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));\n }\n return str;\n};\n\n/**\n * Convert an encoded struct to a MoveStructId.\n *\n * @example\n * const structObj = {\n * account_address: \"0x1\",\n * module_name: \"0x6170746f735f636f696e\",\n * struct_name: \"0x4170746f73436f696e\",\n * };\n * // structId is \"0x1::aptos_coin::AptosCoin\"\n * const structId = parseEncodedStruct(structObj);\n *\n * @param structObj The struct with account_address, module_name, and struct_name properties\n * @returns The MoveStructId\n * @group Implementation\n * @category Utils\n */\nexport const parseEncodedStruct = (structObj: {\n account_address: string;\n module_name: string;\n struct_name: string;\n}): MoveStructId => {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { account_address, module_name, struct_name } = structObj;\n const moduleName = hexToAscii(module_name);\n const structName = hexToAscii(struct_name);\n return `${account_address}::${moduleName}::${structName}`;\n};\n\n/**\n * Determines whether the given object is an encoded struct type with the following properties:\n * - account_address: string\n * - module_name: string\n * - struct_name: string\n *\n * @param structObj The object to check\n * @returns Whether the object is an encoded struct type\n * @group Implementation\n * @category Utils\n */\nexport const isEncodedStruct = (\n structObj: any,\n): structObj is {\n account_address: string;\n module_name: string;\n struct_name: string;\n} =>\n typeof structObj === \"object\" &&\n !Array.isArray(structObj) &&\n structObj !== null &&\n \"account_address\" in structObj &&\n \"module_name\" in structObj &&\n \"struct_name\" in structObj &&\n typeof structObj.account_address === \"string\" &&\n typeof structObj.module_name === \"string\" &&\n typeof structObj.struct_name === \"string\";\n\n/**\n * Splits a function identifier into its constituent parts: module address, module name, and function name.\n * This function helps in validating and extracting details from a function identifier string.\n *\n * @param functionArg - The function identifier string in the format \"moduleAddress::moduleName::functionName\".\n * @returns An object containing the module address, module name, and function name.\n * @throws Error if the function identifier does not contain exactly three parts.\n * @group Implementation\n * @category Transactions\n */\nexport function getFunctionParts(functionArg: MoveFunctionId) {\n const funcNameParts = functionArg.split(\"::\");\n if (funcNameParts.length !== 3) {\n throw new Error(`Invalid function ${functionArg}`);\n }\n const moduleAddress = funcNameParts[0];\n const moduleName = funcNameParts[1];\n const functionName = funcNameParts[2];\n return { moduleAddress, moduleName, functionName };\n}\n\n/**\n * Validates the provided function information.\n *\n * @param functionInfo - The function information to validate.\n * @returns Whether the function information is valid.\n * @group Implementation\n * @category Utils\n */\nexport function isValidFunctionInfo(functionInfo: string): boolean {\n const parts = functionInfo.split(\"::\");\n return parts.length === 3 && AccountAddress.isValid({ input: parts[0] }).valid;\n}\n\n/**\n * Truncates the provided wallet address at the middle with an ellipsis.\n *\n * @param address - The wallet address to truncate.\n * @param start - The number of characters to show at the beginning of the address.\n * @param end - The number of characters to show at the end of the address.\n * @returns The truncated address.\n * @group Implementation\n * @category Utils\n */\nexport function truncateAddress(address: string, start: number = 6, end: number = 5) {\n return `${address.slice(0, start)}...${address.slice(-end)}`;\n}\n"],"mappings":"yCAGA,OAAS,UAAAA,MAAc,YAYvB,eAAsBC,EAAMC,EAA+B,CACzD,OAAO,IAAI,QAASC,GAAY,CAC9B,WAAWA,EAASD,CAAM,CAC5B,CAAC,CACH,CAUO,SAASE,EAAgBC,EAAwB,CACtD,OAAOA,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,CAC9D,CAMO,IAAMC,EAAe,IAAM,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAUvD,SAASC,EAAiBC,EAAoC,CACnE,IAAMC,EAAO,IAAI,KAAKD,EAAqB,GAAI,EAE/C,OAAAC,EAAK,WAAW,CAAC,EACjBA,EAAK,WAAW,CAAC,EACjBA,EAAK,gBAAgB,CAAC,EACf,KAAK,MAAMA,EAAK,QAAQ,EAAI,GAAI,CACzC,CAWO,SAASC,EAAgBC,EAA2B,CAEzD,IAAMC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAEvDE,EAAeD,EAAS,KAAK,UAAU,GAAI,EAAKA,EAAO,OAAS,GAAM,CAAC,EAE7E,OADsBE,EAAOD,CAAY,CAE3C,CAEO,SAASE,EAAiBJ,EAA+B,CAE9D,IAAIC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAE3D,KAAOC,EAAO,OAAS,IAAM,GAC3BA,GAAU,IAGZ,OAAO,IAAI,WAAW,OAAO,KAAKA,EAAQ,QAAQ,CAAC,CACrD,CAeO,IAAMI,EAA0C,CAACC,EAAeC,IAAoBD,EAAQ,IAAMC,EAe5FC,EAA0C,CAACF,EAAeC,IAAoBD,EAAQ,IAAMC,EAYnGE,EAAcC,GAAgB,CAClC,IAAIC,EAAM,GACV,QAASC,EAAI,EAAGA,EAAIF,EAAI,OAAQE,GAAK,EACnCD,GAAO,OAAO,aAAa,SAASD,EAAI,UAAUE,EAAGA,EAAI,CAAC,EAAG,EAAE,CAAC,EAElE,OAAOD,CACT,EAmBaE,EAAsBC,GAIf,CAElB,GAAM,CAAE,gBAAAC,EAAiB,YAAAC,EAAa,YAAAC,CAAY,EAAIH,EAChDI,EAAaT,EAAWO,CAAW,EACnCG,EAAaV,EAAWQ,CAAW,EACzC,MAAO,GAAGF,CAAe,KAAKG,CAAU,KAAKC,CAAU,EACzD,EAaaC,EACXN,GAMA,OAAOA,GAAc,UACrB,CAAC,MAAM,QAAQA,CAAS,GACxBA,IAAc,MACd,oBAAqBA,GACrB,gBAAiBA,GACjB,gBAAiBA,GACjB,OAAOA,EAAU,iBAAoB,UACrC,OAAOA,EAAU,aAAgB,UACjC,OAAOA,EAAU,aAAgB,SAY5B,SAASO,EAAiBC,EAA6B,CAC5D,IAAMC,EAAgBD,EAAY,MAAM,IAAI,EAC5C,GAAIC,EAAc,SAAW,EAC3B,MAAM,IAAI,MAAM,oBAAoBD,CAAW,EAAE,EAEnD,IAAME,EAAgBD,EAAc,CAAC,EAC/BL,EAAaK,EAAc,CAAC,EAC5BE,EAAeF,EAAc,CAAC,EACpC,MAAO,CAAE,cAAAC,EAAe,WAAAN,EAAY,aAAAO,CAAa,CACnD,CAUO,SAASC,EAAoBC,EAA+B,CACjE,IAAMC,EAAQD,EAAa,MAAM,IAAI,EACrC,OAAOC,EAAM,SAAW,GAAKC,EAAe,QAAQ,CAAE,MAAOD,EAAM,CAAC,CAAE,CAAC,EAAE,KAC3E,CAYO,SAASE,EAAgBC,EAAiBC,EAAgB,EAAGC,EAAc,EAAG,CACnF,MAAO,GAAGF,EAAQ,MAAM,EAAGC,CAAK,CAAC,MAAMD,EAAQ,MAAM,CAACE,CAAG,CAAC,EAC5D","names":["decode","sleep","timeMs","resolve","getErrorMessage","error","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64","decode","base64UrlToBytes","convertAmountFromHumanReadableToOnChain","value","decimal","convertAmountFromOnChainToHumanReadable","hexToAscii","hex","str","n","parseEncodedStruct","structObj","account_address","module_name","struct_name","moduleName","structName","isEncodedStruct","getFunctionParts","functionArg","funcNameParts","moduleAddress","functionName","isValidFunctionInfo","functionInfo","parts","AccountAddress","truncateAddress","address","start","end"]}
@@ -1,21 +1,2 @@
1
- import {
2
- LocalNode
3
- } from "../chunk-PGFEUN7K.mjs";
4
- import {
5
- Move
6
- } from "../chunk-GUA5YTIK.mjs";
7
- import "../chunk-RQS33JAS.mjs";
8
- import "../chunk-CXLXUSCG.mjs";
9
- import "../chunk-G4NBRMZ2.mjs";
10
- import "../chunk-SQNS4SFV.mjs";
11
- import "../chunk-4WPQQPUF.mjs";
12
- import "../chunk-C7T6GW5P.mjs";
13
- import "../chunk-BDM6FBUO.mjs";
14
- import "../chunk-QPT4BSAB.mjs";
15
- import "../chunk-SBB4YEPT.mjs";
16
- import "../chunk-SAWN7RJP.mjs";
17
- export {
18
- LocalNode,
19
- Move
20
- };
1
+ import{a as o}from"../chunk-35CO4BP4.mjs";import{a as r}from"../chunk-35DKMW7Q.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{o as LocalNode,r as Move};
21
2
  //# sourceMappingURL=index.mjs.map
@@ -1,17 +1,2 @@
1
- import {
2
- LocalNode
3
- } from "../chunk-PGFEUN7K.mjs";
4
- import "../chunk-RQS33JAS.mjs";
5
- import "../chunk-CXLXUSCG.mjs";
6
- import "../chunk-G4NBRMZ2.mjs";
7
- import "../chunk-SQNS4SFV.mjs";
8
- import "../chunk-4WPQQPUF.mjs";
9
- import "../chunk-C7T6GW5P.mjs";
10
- import "../chunk-BDM6FBUO.mjs";
11
- import "../chunk-QPT4BSAB.mjs";
12
- import "../chunk-SBB4YEPT.mjs";
13
- import "../chunk-SAWN7RJP.mjs";
14
- export {
15
- LocalNode
16
- };
1
+ import{a}from"../chunk-35CO4BP4.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as LocalNode};
17
2
  //# sourceMappingURL=localNode.mjs.map
@@ -1,8 +1,2 @@
1
- import {
2
- Move
3
- } from "../chunk-GUA5YTIK.mjs";
4
- import "../chunk-SAWN7RJP.mjs";
5
- export {
6
- Move
7
- };
1
+ import{a}from"../chunk-35DKMW7Q.mjs";import"../chunk-KDMSOCZY.mjs";export{a as Move};
8
2
  //# sourceMappingURL=move.mjs.map
@@ -1,35 +1,2 @@
1
- import {
2
- aptosBinaryRequest,
3
- aptosRequest,
4
- binaryRequest,
5
- request
6
- } from "../chunk-G34CJDST.mjs";
7
- import "../chunk-HGLO5LDS.mjs";
8
- import "../chunk-MWXBQ6HR.mjs";
9
- import "../chunk-32UQAST6.mjs";
10
- import "../chunk-RQS33JAS.mjs";
11
- import "../chunk-CXLXUSCG.mjs";
12
- import "../chunk-FZY4PMEE.mjs";
13
- import "../chunk-KSK3XIGF.mjs";
14
- import "../chunk-QSYWLSSN.mjs";
15
- import "../chunk-6ASWESA2.mjs";
16
- import "../chunk-Y3ENAKRC.mjs";
17
- import "../chunk-G4NBRMZ2.mjs";
18
- import "../chunk-SQNS4SFV.mjs";
19
- import "../chunk-4WPQQPUF.mjs";
20
- import "../chunk-NUT2VOX2.mjs";
21
- import "../chunk-C7T6GW5P.mjs";
22
- import "../chunk-BDM6FBUO.mjs";
23
- import "../chunk-QPT4BSAB.mjs";
24
- import "../chunk-SBB4YEPT.mjs";
25
- import "../chunk-SFLQPB72.mjs";
26
- import "../chunk-5QHMFYVL.mjs";
27
- import "../chunk-I25AX6PQ.mjs";
28
- import "../chunk-SAWN7RJP.mjs";
29
- export {
30
- aptosBinaryRequest,
31
- aptosRequest,
32
- binaryRequest,
33
- request
34
- };
1
+ import{a,b,c,d}from"../chunk-3EUHEZND.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-WB26DWOY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,a as request};
35
2
  //# sourceMappingURL=core.mjs.map
@@ -1,42 +1,2 @@
1
- import {
2
- get,
3
- getAptosFullNode,
4
- getAptosPepperService,
5
- getBinary,
6
- getBinaryAptosFullNode,
7
- paginateWithCursor,
8
- paginateWithObfuscatedCursor
9
- } from "../chunk-XQFUKBY7.mjs";
10
- import "../chunk-G34CJDST.mjs";
11
- import "../chunk-HGLO5LDS.mjs";
12
- import "../chunk-MWXBQ6HR.mjs";
13
- import "../chunk-32UQAST6.mjs";
14
- import "../chunk-RQS33JAS.mjs";
15
- import "../chunk-CXLXUSCG.mjs";
16
- import "../chunk-FZY4PMEE.mjs";
17
- import "../chunk-KSK3XIGF.mjs";
18
- import "../chunk-QSYWLSSN.mjs";
19
- import "../chunk-6ASWESA2.mjs";
20
- import "../chunk-Y3ENAKRC.mjs";
21
- import "../chunk-G4NBRMZ2.mjs";
22
- import "../chunk-SQNS4SFV.mjs";
23
- import "../chunk-4WPQQPUF.mjs";
24
- import "../chunk-NUT2VOX2.mjs";
25
- import "../chunk-C7T6GW5P.mjs";
26
- import "../chunk-BDM6FBUO.mjs";
27
- import "../chunk-QPT4BSAB.mjs";
28
- import "../chunk-SBB4YEPT.mjs";
29
- import "../chunk-SFLQPB72.mjs";
30
- import "../chunk-5QHMFYVL.mjs";
31
- import "../chunk-I25AX6PQ.mjs";
32
- import "../chunk-SAWN7RJP.mjs";
33
- export {
34
- get,
35
- getAptosFullNode,
36
- getAptosPepperService,
37
- getBinary,
38
- getBinaryAptosFullNode,
39
- paginateWithCursor,
40
- paginateWithObfuscatedCursor
41
- };
1
+ import{a,b,c,d,e,f,g}from"../chunk-3RVAGHAA.mjs";import"../chunk-3EUHEZND.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-WB26DWOY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{a as get,c as getAptosFullNode,e as getAptosPepperService,b as getBinary,d as getBinaryAptosFullNode,f as paginateWithCursor,g as paginateWithObfuscatedCursor};
42
2
  //# sourceMappingURL=get.mjs.map
@@ -1,70 +1,2 @@
1
- import "../chunk-7ECCT6PK.mjs";
2
- import {
3
- post,
4
- postAptosFaucet,
5
- postAptosFullNode,
6
- postAptosIndexer,
7
- postAptosPepperService,
8
- postAptosProvingService,
9
- postBinary,
10
- postBinaryAptosFullNode
11
- } from "../chunk-6T3V5LXK.mjs";
12
- import {
13
- get,
14
- getAptosFullNode,
15
- getAptosPepperService,
16
- getBinary,
17
- getBinaryAptosFullNode,
18
- paginateWithCursor,
19
- paginateWithObfuscatedCursor
20
- } from "../chunk-XQFUKBY7.mjs";
21
- import {
22
- aptosBinaryRequest,
23
- aptosRequest,
24
- binaryRequest,
25
- request
26
- } from "../chunk-G34CJDST.mjs";
27
- import "../chunk-HGLO5LDS.mjs";
28
- import "../chunk-MWXBQ6HR.mjs";
29
- import "../chunk-32UQAST6.mjs";
30
- import "../chunk-RQS33JAS.mjs";
31
- import "../chunk-CXLXUSCG.mjs";
32
- import "../chunk-FZY4PMEE.mjs";
33
- import "../chunk-KSK3XIGF.mjs";
34
- import "../chunk-QSYWLSSN.mjs";
35
- import "../chunk-6ASWESA2.mjs";
36
- import "../chunk-Y3ENAKRC.mjs";
37
- import "../chunk-G4NBRMZ2.mjs";
38
- import "../chunk-SQNS4SFV.mjs";
39
- import "../chunk-4WPQQPUF.mjs";
40
- import "../chunk-NUT2VOX2.mjs";
41
- import "../chunk-C7T6GW5P.mjs";
42
- import "../chunk-BDM6FBUO.mjs";
43
- import "../chunk-QPT4BSAB.mjs";
44
- import "../chunk-SBB4YEPT.mjs";
45
- import "../chunk-SFLQPB72.mjs";
46
- import "../chunk-5QHMFYVL.mjs";
47
- import "../chunk-I25AX6PQ.mjs";
48
- import "../chunk-SAWN7RJP.mjs";
49
- export {
50
- aptosBinaryRequest,
51
- aptosRequest,
52
- binaryRequest,
53
- get,
54
- getAptosFullNode,
55
- getAptosPepperService,
56
- getBinary,
57
- getBinaryAptosFullNode,
58
- paginateWithCursor,
59
- paginateWithObfuscatedCursor,
60
- post,
61
- postAptosFaucet,
62
- postAptosFullNode,
63
- postAptosIndexer,
64
- postAptosPepperService,
65
- postAptosProvingService,
66
- postBinary,
67
- postBinaryAptosFullNode,
68
- request
69
- };
1
+ import"../chunk-7ECCT6PK.mjs";import{a as l,b as m,c as n,d as o,e as p,f as q,g as r,h as s}from"../chunk-CWL7ZA3P.mjs";import{a as e,b as f,c as g,d as h,e as i,f as j,g as k}from"../chunk-3RVAGHAA.mjs";import{a,b,c,d}from"../chunk-3EUHEZND.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-WB26DWOY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{d as aptosBinaryRequest,c as aptosRequest,b as binaryRequest,e as get,g as getAptosFullNode,i as getAptosPepperService,f as getBinary,h as getBinaryAptosFullNode,j as paginateWithCursor,k as paginateWithObfuscatedCursor,l as post,q as postAptosFaucet,n as postAptosFullNode,p as postAptosIndexer,r as postAptosPepperService,s as postAptosProvingService,m as postBinary,o as postBinaryAptosFullNode,a as request};
70
2
  //# sourceMappingURL=index.mjs.map
@@ -1,44 +1,2 @@
1
- import {
2
- post,
3
- postAptosFaucet,
4
- postAptosFullNode,
5
- postAptosIndexer,
6
- postAptosPepperService,
7
- postAptosProvingService,
8
- postBinary,
9
- postBinaryAptosFullNode
10
- } from "../chunk-6T3V5LXK.mjs";
11
- import "../chunk-G34CJDST.mjs";
12
- import "../chunk-HGLO5LDS.mjs";
13
- import "../chunk-MWXBQ6HR.mjs";
14
- import "../chunk-32UQAST6.mjs";
15
- import "../chunk-RQS33JAS.mjs";
16
- import "../chunk-CXLXUSCG.mjs";
17
- import "../chunk-FZY4PMEE.mjs";
18
- import "../chunk-KSK3XIGF.mjs";
19
- import "../chunk-QSYWLSSN.mjs";
20
- import "../chunk-6ASWESA2.mjs";
21
- import "../chunk-Y3ENAKRC.mjs";
22
- import "../chunk-G4NBRMZ2.mjs";
23
- import "../chunk-SQNS4SFV.mjs";
24
- import "../chunk-4WPQQPUF.mjs";
25
- import "../chunk-NUT2VOX2.mjs";
26
- import "../chunk-C7T6GW5P.mjs";
27
- import "../chunk-BDM6FBUO.mjs";
28
- import "../chunk-QPT4BSAB.mjs";
29
- import "../chunk-SBB4YEPT.mjs";
30
- import "../chunk-SFLQPB72.mjs";
31
- import "../chunk-5QHMFYVL.mjs";
32
- import "../chunk-I25AX6PQ.mjs";
33
- import "../chunk-SAWN7RJP.mjs";
34
- export {
35
- post,
36
- postAptosFaucet,
37
- postAptosFullNode,
38
- postAptosIndexer,
39
- postAptosPepperService,
40
- postAptosProvingService,
41
- postBinary,
42
- postBinaryAptosFullNode
43
- };
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-CWL7ZA3P.mjs";import"../chunk-3EUHEZND.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-BMPHQ3E7.mjs";import"../chunk-WB26DWOY.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-HHWJHOFZ.mjs";import"../chunk-TKXEVD7A.mjs";import"../chunk-ERLDXTIY.mjs";import"../chunk-RIINVEZA.mjs";import"../chunk-ZD2TY5N3.mjs";import"../chunk-ZELTLAUN.mjs";import"../chunk-LQOSHBB7.mjs";import"../chunk-3OLFJ65O.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-R6QCPXQG.mjs";import"../chunk-RXHER6EA.mjs";import"../chunk-VHY6ZATX.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-RJ7F4JDV.mjs";import"../chunk-X5YB74NB.mjs";import"../chunk-KDMSOCZY.mjs";export{a as post,f as postAptosFaucet,c as postAptosFullNode,e as postAptosIndexer,g as postAptosPepperService,h as postAptosProvingService,b as postBinary,d as postBinaryAptosFullNode};
44
2
  //# sourceMappingURL=post.mjs.map
@@ -1,22 +1,2 @@
1
- import "../../chunk-NECL5FCQ.mjs";
2
- import "../../chunk-4QMXOWHP.mjs";
3
- import {
4
- createObjectAddress,
5
- createResourceAddress,
6
- createTokenAddress
7
- } from "../../chunk-6I37A76G.mjs";
8
- import "../../chunk-CXLXUSCG.mjs";
9
- import "../../chunk-G4NBRMZ2.mjs";
10
- import "../../chunk-SQNS4SFV.mjs";
11
- import "../../chunk-4WPQQPUF.mjs";
12
- import "../../chunk-C7T6GW5P.mjs";
13
- import "../../chunk-BDM6FBUO.mjs";
14
- import "../../chunk-QPT4BSAB.mjs";
15
- import "../../chunk-SBB4YEPT.mjs";
16
- import "../../chunk-SAWN7RJP.mjs";
17
- export {
18
- createObjectAddress,
19
- createResourceAddress,
20
- createTokenAddress
21
- };
1
+ import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../chunk-AIPHJFJL.mjs";import"../../chunk-LQOSHBB7.mjs";import"../../chunk-3OLFJ65O.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-R6QCPXQG.mjs";import"../../chunk-RXHER6EA.mjs";import"../../chunk-VHY6ZATX.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
22
2
  //# sourceMappingURL=index.mjs.map