@aptos-labs/ts-sdk 3.1.2 → 4.0.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 (645) hide show
  1. package/dist/common/{account-Bb5REyaT.d.ts → account-D4dsN-1K.d.ts} +1 -1
  2. package/dist/common/chunk-MU4IJVW5.js +1390 -0
  3. package/dist/common/chunk-MU4IJVW5.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +480 -1
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +598 -511
  8. package/dist/common/index.js +19842 -451
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/account/AbstractKeylessAccount.mjs +66 -1
  11. package/dist/esm/account/AbstractedAccount.mjs +62 -1
  12. package/dist/esm/account/Account.mjs +62 -1
  13. package/dist/esm/account/AccountUtils.mjs +62 -1
  14. package/dist/esm/account/DerivableAbstractedAccount.mjs +62 -1
  15. package/dist/esm/account/Ed25519Account.mjs +62 -1
  16. package/dist/esm/account/EphemeralKeyPair.mjs +62 -1
  17. package/dist/esm/account/FederatedKeylessAccount.mjs +62 -1
  18. package/dist/esm/account/KeylessAccount.mjs +62 -1
  19. package/dist/esm/account/MultiEd25519Account.mjs +62 -1
  20. package/dist/esm/account/MultiKeyAccount.mjs +62 -1
  21. package/dist/esm/account/SingleKeyAccount.mjs +64 -1
  22. package/dist/esm/account/index.mjs +90 -1
  23. package/dist/esm/account/utils.mjs +62 -1
  24. package/dist/esm/api/account/abstraction.mjs +62 -1
  25. package/dist/esm/api/account.d.mts +1 -0
  26. package/dist/esm/api/account.mjs +62 -1
  27. package/dist/esm/api/ans.mjs +62 -1
  28. package/dist/esm/api/aptos.d.mts +3 -4
  29. package/dist/esm/api/aptos.mjs +62 -1
  30. package/dist/esm/api/aptosConfig.mjs +9 -1
  31. package/dist/esm/api/coin.mjs +62 -1
  32. package/dist/esm/api/digitalAsset.mjs +62 -1
  33. package/dist/esm/api/faucet.mjs +62 -1
  34. package/dist/esm/api/fungibleAsset.mjs +62 -1
  35. package/dist/esm/api/general.mjs +62 -1
  36. package/dist/esm/api/index.d.mts +2 -1
  37. package/dist/esm/api/index.mjs +67 -1
  38. package/dist/esm/api/keyless.mjs +62 -1
  39. package/dist/esm/api/manager.d.mts +313 -0
  40. package/dist/esm/api/manager.mjs +63 -0
  41. package/dist/esm/api/object.mjs +62 -1
  42. package/dist/esm/api/staking.mjs +62 -1
  43. package/dist/esm/api/table.mjs +39 -1
  44. package/dist/esm/api/transaction.d.mts +56 -36
  45. package/dist/esm/api/transaction.mjs +62 -1
  46. package/dist/esm/api/transactionSubmission/build.mjs +62 -1
  47. package/dist/esm/api/transactionSubmission/helpers.mjs +9 -1
  48. package/dist/esm/api/transactionSubmission/management.mjs +62 -1
  49. package/dist/esm/api/transactionSubmission/sign.mjs +182 -1
  50. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  51. package/dist/esm/api/transactionSubmission/simulate.mjs +62 -1
  52. package/dist/esm/api/transactionSubmission/submit.mjs +62 -1
  53. package/dist/esm/api/utils.mjs +37 -1
  54. package/dist/esm/bcs/consts.mjs +17 -1
  55. package/dist/esm/bcs/deserializer.mjs +10 -1
  56. package/dist/esm/bcs/index.mjs +60 -1
  57. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +12 -1
  58. package/dist/esm/bcs/serializable/fixedBytes.mjs +11 -1
  59. package/dist/esm/bcs/serializable/movePrimitives.mjs +26 -1
  60. package/dist/esm/bcs/serializable/moveStructs.mjs +22 -1
  61. package/dist/esm/bcs/serializer.mjs +18 -1
  62. package/dist/esm/chunk-2EQWS4BO.mjs +15 -0
  63. package/dist/esm/{chunk-HPQMAP7O.mjs.map → chunk-2EQWS4BO.mjs.map} +1 -1
  64. package/dist/esm/chunk-3WEOSEUE.mjs +221 -0
  65. package/dist/esm/{chunk-Y7ZQTLH4.mjs.map → chunk-3WEOSEUE.mjs.map} +1 -1
  66. package/dist/esm/chunk-4OAWQT57.mjs +281 -0
  67. package/dist/esm/{chunk-DW6WLD2B.mjs.map → chunk-4OAWQT57.mjs.map} +1 -1
  68. package/dist/esm/chunk-53SXUNRK.mjs +12 -0
  69. package/dist/esm/{chunk-OYUW6ZN2.mjs.map → chunk-53SXUNRK.mjs.map} +1 -1
  70. package/dist/esm/chunk-55VEYGKK.mjs +46 -0
  71. package/dist/esm/{chunk-OYH2T6V5.mjs.map → chunk-55VEYGKK.mjs.map} +1 -1
  72. package/dist/esm/chunk-6ZZZXQX5.mjs +138 -0
  73. package/dist/esm/{chunk-6PKBXYG3.mjs.map → chunk-6ZZZXQX5.mjs.map} +1 -1
  74. package/dist/esm/chunk-A4IKXI43.mjs +339 -0
  75. package/dist/esm/{chunk-6Y6ZO7TS.mjs.map → chunk-A4IKXI43.mjs.map} +1 -1
  76. package/dist/esm/{chunk-UL777LTI.mjs → chunk-A5FS7NAD.mjs} +380 -31
  77. package/dist/esm/{chunk-UL777LTI.mjs.map → chunk-A5FS7NAD.mjs.map} +1 -1
  78. package/dist/esm/chunk-APM7OSLS.mjs +122 -0
  79. package/dist/esm/{chunk-GOXRBEIJ.mjs.map → chunk-APM7OSLS.mjs.map} +1 -1
  80. package/dist/esm/chunk-BEYIOC2H.mjs +34 -0
  81. package/dist/esm/{chunk-YOZBVVKL.mjs.map → chunk-BEYIOC2H.mjs.map} +1 -1
  82. package/dist/esm/chunk-BQCCGCK4.mjs +22 -0
  83. package/dist/esm/{chunk-QREVMGQZ.mjs.map → chunk-BQCCGCK4.mjs.map} +1 -1
  84. package/dist/esm/chunk-CYKMZPCW.mjs +71 -0
  85. package/dist/esm/{chunk-XIQFX5FV.mjs.map → chunk-CYKMZPCW.mjs.map} +1 -1
  86. package/dist/esm/chunk-DTLPTPJW.mjs +7 -0
  87. package/dist/esm/{chunk-4R4AI5RT.mjs.map → chunk-DTLPTPJW.mjs.map} +1 -1
  88. package/dist/esm/chunk-DUYTCDXO.mjs +29 -0
  89. package/dist/esm/{chunk-BUUV6B4P.mjs.map → chunk-DUYTCDXO.mjs.map} +1 -1
  90. package/dist/esm/chunk-EPKBDH2H.mjs +177 -0
  91. package/dist/esm/{chunk-AQQEQB35.mjs.map → chunk-EPKBDH2H.mjs.map} +1 -1
  92. package/dist/esm/chunk-F7W7KS5C.mjs +52 -0
  93. package/dist/esm/{chunk-C3Q23D22.mjs.map → chunk-F7W7KS5C.mjs.map} +1 -1
  94. package/dist/esm/chunk-FHHBIGGL.mjs +43 -0
  95. package/dist/esm/{chunk-JCFTAG5Z.mjs.map → chunk-FHHBIGGL.mjs.map} +1 -1
  96. package/dist/esm/chunk-FJJ3KCPC.mjs +376 -0
  97. package/dist/esm/{chunk-NJN3EAOM.mjs.map → chunk-FJJ3KCPC.mjs.map} +1 -1
  98. package/dist/esm/chunk-GHQTJGG6.mjs +196 -0
  99. package/dist/esm/{chunk-STY74NUA.mjs.map → chunk-GHQTJGG6.mjs.map} +1 -1
  100. package/dist/esm/chunk-GREMFKLA.mjs +84 -0
  101. package/dist/esm/{chunk-PQS3II2E.mjs.map → chunk-GREMFKLA.mjs.map} +1 -1
  102. package/dist/esm/chunk-GUA5YTIK.mjs +362 -0
  103. package/dist/esm/{chunk-35DKMW7Q.mjs.map → chunk-GUA5YTIK.mjs.map} +1 -1
  104. package/dist/esm/chunk-HKXZMGVA.mjs +73 -0
  105. package/dist/esm/{chunk-WLUXOUZH.mjs.map → chunk-HKXZMGVA.mjs.map} +1 -1
  106. package/dist/esm/chunk-HXS6ZS4S.mjs +16311 -0
  107. package/dist/esm/chunk-HXS6ZS4S.mjs.map +1 -0
  108. package/dist/esm/chunk-IBRCEHIR.mjs +77 -0
  109. package/dist/esm/{chunk-IXYGZ57N.mjs.map → chunk-IBRCEHIR.mjs.map} +1 -1
  110. package/dist/esm/chunk-ITS22VZT.mjs +48 -0
  111. package/dist/esm/{chunk-BYINW7I2.mjs.map → chunk-ITS22VZT.mjs.map} +1 -1
  112. package/dist/esm/chunk-KJY6HBMF.mjs +114 -0
  113. package/dist/esm/{chunk-NII5Q32W.mjs.map → chunk-KJY6HBMF.mjs.map} +1 -1
  114. package/dist/esm/chunk-MOQKSDHO.mjs +33 -0
  115. package/dist/esm/{chunk-Z6KQX6VX.mjs.map → chunk-MOQKSDHO.mjs.map} +1 -1
  116. package/dist/esm/chunk-NATYEXGE.mjs +45 -0
  117. package/dist/esm/{chunk-PRUQZNAP.mjs.map → chunk-NATYEXGE.mjs.map} +1 -1
  118. package/dist/esm/chunk-O3EP3HB3.mjs +257 -0
  119. package/dist/esm/{chunk-IJE2LVZG.mjs.map → chunk-O3EP3HB3.mjs.map} +1 -1
  120. package/dist/esm/chunk-ORIVGO5I.mjs +73 -0
  121. package/dist/esm/{chunk-E6IUB35J.mjs.map → chunk-ORIVGO5I.mjs.map} +1 -1
  122. package/dist/esm/chunk-OWG3TOG6.mjs +11 -0
  123. package/dist/esm/{chunk-KJH4KKG6.mjs.map → chunk-OWG3TOG6.mjs.map} +1 -1
  124. package/dist/esm/chunk-P6RWWRGG.mjs +440 -0
  125. package/dist/esm/{chunk-GYVSI3TS.mjs.map → chunk-P6RWWRGG.mjs.map} +1 -1
  126. package/dist/esm/chunk-PT2QHUB6.mjs +96 -0
  127. package/dist/esm/{chunk-A5L76YP7.mjs.map → chunk-PT2QHUB6.mjs.map} +1 -1
  128. package/dist/esm/chunk-Q5W46UAQ.mjs +123 -0
  129. package/dist/esm/{chunk-ZMT2M6YT.mjs.map → chunk-Q5W46UAQ.mjs.map} +1 -1
  130. package/dist/esm/chunk-QIM243UU.mjs +89 -0
  131. package/dist/esm/{chunk-THUSLDD6.mjs.map → chunk-QIM243UU.mjs.map} +1 -1
  132. package/dist/esm/chunk-QPT4BSAB.mjs +20 -0
  133. package/dist/esm/{chunk-IF4UU2MT.mjs.map → chunk-QPT4BSAB.mjs.map} +1 -1
  134. package/dist/esm/chunk-SAWN7RJP.mjs +15 -0
  135. package/dist/esm/chunk-SBB4YEPT.mjs +17 -0
  136. package/dist/esm/{chunk-56CNRT2K.mjs.map → chunk-SBB4YEPT.mjs.map} +1 -1
  137. package/dist/esm/chunk-SCWOUBOV.mjs +101 -0
  138. package/dist/esm/{chunk-YFFDF22R.mjs.map → chunk-SCWOUBOV.mjs.map} +1 -1
  139. package/dist/esm/chunk-SFLQPB72.mjs +63 -0
  140. package/dist/esm/{chunk-4RXKALLC.mjs.map → chunk-SFLQPB72.mjs.map} +1 -1
  141. package/dist/esm/chunk-SQ3VDIBO.mjs +47 -0
  142. package/dist/esm/{chunk-RFQFTIOA.mjs.map → chunk-SQ3VDIBO.mjs.map} +1 -1
  143. package/dist/esm/chunk-TPJY5GTS.mjs +502 -0
  144. package/dist/esm/{chunk-6MWXV62C.mjs.map → chunk-TPJY5GTS.mjs.map} +1 -1
  145. package/dist/esm/chunk-TSXVHRQB.mjs +216 -0
  146. package/dist/esm/{chunk-C6JRJNK3.mjs.map → chunk-TSXVHRQB.mjs.map} +1 -1
  147. package/dist/esm/chunk-UAXZDOSV.mjs +19 -0
  148. package/dist/esm/{chunk-GRB6YSIT.mjs.map → chunk-UAXZDOSV.mjs.map} +1 -1
  149. package/dist/esm/chunk-UKXKN5YN.mjs +72 -0
  150. package/dist/esm/{chunk-ROT6S6BM.mjs.map → chunk-UKXKN5YN.mjs.map} +1 -1
  151. package/dist/esm/chunk-WZD3K77H.mjs +53 -0
  152. package/dist/esm/{chunk-FBCXUC7J.mjs.map → chunk-WZD3K77H.mjs.map} +1 -1
  153. package/dist/esm/chunk-XBBBLYRH.mjs +66 -0
  154. package/dist/esm/{chunk-QQEK2GJC.mjs.map → chunk-XBBBLYRH.mjs.map} +1 -1
  155. package/dist/esm/chunk-YJJUYS67.mjs +329 -0
  156. package/dist/esm/{chunk-UCBUUH5M.mjs.map → chunk-YJJUYS67.mjs.map} +1 -1
  157. package/dist/esm/cli/index.mjs +21 -1
  158. package/dist/esm/cli/localNode.mjs +17 -1
  159. package/dist/esm/cli/move.mjs +7 -1
  160. package/dist/esm/client/core.mjs +31 -1
  161. package/dist/esm/client/get.mjs +40 -1
  162. package/dist/esm/client/index.mjs +60 -1
  163. package/dist/esm/client/post.mjs +40 -1
  164. package/dist/esm/core/account/index.mjs +21 -1
  165. package/dist/esm/core/account/utils/address.mjs +19 -1
  166. package/dist/esm/core/account/utils/index.mjs +20 -1
  167. package/dist/esm/core/accountAddress.mjs +16 -1
  168. package/dist/esm/core/authenticationKey.mjs +15 -1
  169. package/dist/esm/core/common.mjs +7 -1
  170. package/dist/esm/core/crypto/abstraction.mjs +26 -1
  171. package/dist/esm/core/crypto/deserializationUtils.mjs +64 -1
  172. package/dist/esm/core/crypto/ed25519.mjs +68 -1
  173. package/dist/esm/core/crypto/ephemeral.mjs +64 -1
  174. package/dist/esm/core/crypto/federatedKeyless.mjs +62 -1
  175. package/dist/esm/core/crypto/hdKey.mjs +25 -1
  176. package/dist/esm/core/crypto/index.mjs +196 -1
  177. package/dist/esm/core/crypto/keyless.mjs +110 -1
  178. package/dist/esm/core/crypto/multiEd25519.mjs +64 -1
  179. package/dist/esm/core/crypto/multiKey.mjs +66 -1
  180. package/dist/esm/core/crypto/poseidon.mjs +15 -1
  181. package/dist/esm/core/crypto/privateKey.mjs +12 -1
  182. package/dist/esm/core/crypto/proof.mjs +20 -1
  183. package/dist/esm/core/crypto/publicKey.mjs +22 -1
  184. package/dist/esm/core/crypto/secp256k1.mjs +66 -1
  185. package/dist/esm/core/crypto/signature.mjs +20 -1
  186. package/dist/esm/core/crypto/singleKey.mjs +64 -1
  187. package/dist/esm/core/crypto/types.mjs +1 -1
  188. package/dist/esm/core/crypto/utils.d.mts +5 -2
  189. package/dist/esm/core/crypto/utils.mjs +66 -1
  190. package/dist/esm/core/hex.mjs +12 -1
  191. package/dist/esm/core/index.mjs +221 -1
  192. package/dist/esm/errors/index.mjs +26 -1
  193. package/dist/esm/index.d.mts +1 -1
  194. package/dist/esm/index.mjs +716 -1
  195. package/dist/esm/internal/abstraction.mjs +66 -1
  196. package/dist/esm/internal/account.d.mts +27 -21
  197. package/dist/esm/internal/account.mjs +108 -1
  198. package/dist/esm/internal/ans.d.mts +19 -8
  199. package/dist/esm/internal/ans.mjs +100 -1
  200. package/dist/esm/internal/coin.mjs +62 -1
  201. package/dist/esm/internal/digitalAsset.mjs +108 -1
  202. package/dist/esm/internal/faucet.mjs +62 -1
  203. package/dist/esm/internal/fungibleAsset.mjs +70 -1
  204. package/dist/esm/internal/general.mjs +44 -1
  205. package/dist/esm/internal/keyless.mjs +68 -1
  206. package/dist/esm/internal/object.mjs +64 -1
  207. package/dist/esm/internal/staking.mjs +66 -1
  208. package/dist/esm/internal/table.mjs +39 -1
  209. package/dist/esm/internal/transaction.mjs +58 -1
  210. package/dist/esm/internal/transactionSubmission.mjs +82 -1
  211. package/dist/esm/internal/utils/index.mjs +37 -1
  212. package/dist/esm/internal/utils/utils.mjs +36 -1
  213. package/dist/esm/internal/view.mjs +64 -1
  214. package/dist/esm/transactions/authenticator/account.mjs +74 -1
  215. package/dist/esm/transactions/authenticator/index.mjs +86 -1
  216. package/dist/esm/transactions/authenticator/transaction.mjs +72 -1
  217. package/dist/esm/transactions/index.mjs +277 -1
  218. package/dist/esm/transactions/instances/chainId.mjs +11 -1
  219. package/dist/esm/transactions/instances/identifier.mjs +11 -1
  220. package/dist/esm/transactions/instances/index.mjs +119 -1
  221. package/dist/esm/transactions/instances/moduleId.mjs +62 -1
  222. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +62 -1
  223. package/dist/esm/transactions/instances/rawTransaction.mjs +68 -1
  224. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +21 -1
  225. package/dist/esm/transactions/instances/signedTransaction.mjs +62 -1
  226. package/dist/esm/transactions/instances/simpleTransaction.mjs +62 -1
  227. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  228. package/dist/esm/transactions/instances/transactionPayload.mjs +94 -1
  229. package/dist/esm/transactions/management/accountSequenceNumber.mjs +62 -1
  230. package/dist/esm/transactions/management/asyncQueue.mjs +9 -1
  231. package/dist/esm/transactions/management/index.mjs +68 -1
  232. package/dist/esm/transactions/management/transactionWorker.mjs +66 -1
  233. package/dist/esm/transactions/transactionBuilder/helpers.mjs +100 -1
  234. package/dist/esm/transactions/transactionBuilder/index.mjs +148 -1
  235. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +76 -1
  236. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +68 -1
  237. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +84 -1
  238. package/dist/esm/transactions/typeTag/index.mjs +98 -1
  239. package/dist/esm/transactions/typeTag/parser.mjs +66 -1
  240. package/dist/esm/transactions/types.mjs +1 -1
  241. package/dist/esm/types/abstraction.mjs +7 -1
  242. package/dist/esm/types/generated/queries.mjs +65 -1
  243. package/dist/esm/types/generated/types.mjs +758 -1
  244. package/dist/esm/types/generated/types.mjs.map +1 -1
  245. package/dist/esm/types/index.mjs +83 -1
  246. package/dist/esm/types/indexer.d.mts +1 -1
  247. package/dist/esm/types/indexer.mjs +1 -1
  248. package/dist/esm/types/types.mjs +81 -1
  249. package/dist/esm/utils/apiEndpoints.mjs +21 -1
  250. package/dist/esm/utils/const.mjs +25 -1
  251. package/dist/esm/utils/helpers.mjs +42 -1
  252. package/dist/esm/utils/index.mjs +93 -1
  253. package/dist/esm/utils/memoize.mjs +9 -1
  254. package/dist/esm/utils/normalizeBundle.mjs +20 -1
  255. package/dist/esm/version.d.mts +1 -1
  256. package/dist/esm/version.mjs +7 -1
  257. package/package.json +1 -1
  258. package/src/api/aptos.ts +10 -9
  259. package/src/api/index.ts +1 -0
  260. package/src/api/manager.ts +872 -0
  261. package/src/api/transaction.ts +59 -36
  262. package/src/core/crypto/utils.ts +38 -1
  263. package/src/internal/account.ts +36 -83
  264. package/src/internal/ans.ts +19 -8
  265. package/src/internal/move/jwks/build/jwk/BuildInfo.yaml +56 -0
  266. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/account.mv +0 -0
  267. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator.mv +0 -0
  268. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_factory.mv +0 -0
  269. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_v2.mv +0 -0
  270. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_account.mv +0 -0
  271. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_coin.mv +0 -0
  272. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_governance.mv +0 -0
  273. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/block.mv +0 -0
  274. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_id.mv +0 -0
  275. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_status.mv +0 -0
  276. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/code.mv +0 -0
  277. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/coin.mv +0 -0
  278. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/config_buffer.mv +0 -0
  279. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/consensus_config.mv +0 -0
  280. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/create_signer.mv +0 -0
  281. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/delegation_pool.mv +0 -0
  282. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dispatchable_fungible_asset.mv +0 -0
  283. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dkg.mv +0 -0
  284. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/event.mv +0 -0
  285. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/execution_config.mv +0 -0
  286. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/function_info.mv +0 -0
  287. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/fungible_asset.mv +0 -0
  288. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/gas_schedule.mv +0 -0
  289. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/genesis.mv +0 -0
  290. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/governance_proposal.mv +0 -0
  291. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/guid.mv +0 -0
  292. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwk_consensus_config.mv +0 -0
  293. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwks.mv +0 -0
  294. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/keyless_account.mv +0 -0
  295. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/managed_coin.mv +0 -0
  296. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/multisig_account.mv +0 -0
  297. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object.mv +0 -0
  298. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object_code_deployment.mv +0 -0
  299. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/optional_aggregator.mv +0 -0
  300. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/primary_fungible_store.mv +0 -0
  301. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness.mv +0 -0
  302. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_api_v0_config.mv +0 -0
  303. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config.mv +0 -0
  304. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config_seqnum.mv +0 -0
  305. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration.mv +0 -0
  306. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_state.mv +0 -0
  307. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_with_dkg.mv +0 -0
  308. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/resource_account.mv +0 -0
  309. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/stake.mv +0 -0
  310. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_config.mv +0 -0
  311. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_contract.mv +0 -0
  312. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_proxy.mv +0 -0
  313. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/state_storage.mv +0 -0
  314. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/storage_gas.mv +0 -0
  315. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/system_addresses.mv +0 -0
  316. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/timestamp.mv +0 -0
  317. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_context.mv +0 -0
  318. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_fee.mv +0 -0
  319. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_validation.mv +0 -0
  320. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/util.mv +0 -0
  321. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/validator_consensus_info.mv +0 -0
  322. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/version.mv +0 -0
  323. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/vesting.mv +0 -0
  324. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/voting.mv +0 -0
  325. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/any.mv +0 -0
  326. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/aptos_hash.mv +0 -0
  327. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/big_vector.mv +0 -0
  328. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381.mv +0 -0
  329. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381_algebra.mv +0 -0
  330. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bn254_algebra.mv +0 -0
  331. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/capability.mv +0 -0
  332. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/comparator.mv +0 -0
  333. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/copyable_any.mv +0 -0
  334. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/crypto_algebra.mv +0 -0
  335. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/debug.mv +0 -0
  336. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ed25519.mv +0 -0
  337. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/fixed_point64.mv +0 -0
  338. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/from_bcs.mv +0 -0
  339. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math128.mv +0 -0
  340. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math64.mv +0 -0
  341. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed.mv +0 -0
  342. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed64.mv +0 -0
  343. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/multi_ed25519.mv +0 -0
  344. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64.mv +0 -0
  345. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64_unbound.mv +0 -0
  346. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255.mv +0 -0
  347. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_bulletproofs.mv +0 -0
  348. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_elgamal.mv +0 -0
  349. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_pedersen.mv +0 -0
  350. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/secp256k1.mv +0 -0
  351. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/simple_map.mv +0 -0
  352. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_table.mv +0 -0
  353. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_vector.mv +0 -0
  354. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/string_utils.mv +0 -0
  355. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table.mv +0 -0
  356. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table_with_length.mv +0 -0
  357. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/type_info.mv +0 -0
  358. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/acl.mv +0 -0
  359. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bcs.mv +0 -0
  360. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bit_vector.mv +0 -0
  361. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/error.mv +0 -0
  362. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/features.mv +0 -0
  363. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/fixed_point32.mv +0 -0
  364. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/hash.mv +0 -0
  365. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/option.mv +0 -0
  366. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/signer.mv +0 -0
  367. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/string.mv +0 -0
  368. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/vector.mv +0 -0
  369. package/src/internal/move/jwks/build/jwk/bytecode_scripts/main.mv +0 -0
  370. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/account.mvsm +0 -0
  371. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator.mvsm +0 -0
  372. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_factory.mvsm +0 -0
  373. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_v2.mvsm +0 -0
  374. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_account.mvsm +0 -0
  375. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_coin.mvsm +0 -0
  376. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_governance.mvsm +0 -0
  377. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/block.mvsm +0 -0
  378. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_id.mvsm +0 -0
  379. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_status.mvsm +0 -0
  380. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/code.mvsm +0 -0
  381. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/coin.mvsm +0 -0
  382. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/config_buffer.mvsm +0 -0
  383. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/consensus_config.mvsm +0 -0
  384. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/create_signer.mvsm +0 -0
  385. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/delegation_pool.mvsm +0 -0
  386. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dispatchable_fungible_asset.mvsm +0 -0
  387. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dkg.mvsm +0 -0
  388. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/event.mvsm +0 -0
  389. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/execution_config.mvsm +0 -0
  390. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/function_info.mvsm +0 -0
  391. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/fungible_asset.mvsm +0 -0
  392. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/gas_schedule.mvsm +0 -0
  393. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/genesis.mvsm +0 -0
  394. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/governance_proposal.mvsm +0 -0
  395. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/guid.mvsm +0 -0
  396. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwk_consensus_config.mvsm +0 -0
  397. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwks.mvsm +0 -0
  398. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/keyless_account.mvsm +0 -0
  399. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/managed_coin.mvsm +0 -0
  400. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/multisig_account.mvsm +0 -0
  401. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object.mvsm +0 -0
  402. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object_code_deployment.mvsm +0 -0
  403. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/optional_aggregator.mvsm +0 -0
  404. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/primary_fungible_store.mvsm +0 -0
  405. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness.mvsm +0 -0
  406. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_api_v0_config.mvsm +0 -0
  407. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config.mvsm +0 -0
  408. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config_seqnum.mvsm +0 -0
  409. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration.mvsm +0 -0
  410. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_state.mvsm +0 -0
  411. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_with_dkg.mvsm +0 -0
  412. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/resource_account.mvsm +0 -0
  413. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/stake.mvsm +0 -0
  414. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_config.mvsm +0 -0
  415. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_contract.mvsm +0 -0
  416. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_proxy.mvsm +0 -0
  417. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/state_storage.mvsm +0 -0
  418. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/storage_gas.mvsm +0 -0
  419. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/system_addresses.mvsm +0 -0
  420. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/timestamp.mvsm +0 -0
  421. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_context.mvsm +0 -0
  422. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_fee.mvsm +0 -0
  423. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_validation.mvsm +0 -0
  424. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/util.mvsm +0 -0
  425. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/validator_consensus_info.mvsm +0 -0
  426. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/version.mvsm +0 -0
  427. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/vesting.mvsm +0 -0
  428. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/voting.mvsm +0 -0
  429. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/any.mvsm +0 -0
  430. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/aptos_hash.mvsm +0 -0
  431. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/big_vector.mvsm +0 -0
  432. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381.mvsm +0 -0
  433. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381_algebra.mvsm +0 -0
  434. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bn254_algebra.mvsm +0 -0
  435. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/capability.mvsm +0 -0
  436. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/comparator.mvsm +0 -0
  437. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/copyable_any.mvsm +0 -0
  438. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/crypto_algebra.mvsm +0 -0
  439. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/debug.mvsm +0 -0
  440. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ed25519.mvsm +0 -0
  441. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/fixed_point64.mvsm +0 -0
  442. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/from_bcs.mvsm +0 -0
  443. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math128.mvsm +0 -0
  444. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math64.mvsm +0 -0
  445. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed.mvsm +0 -0
  446. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed64.mvsm +0 -0
  447. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/multi_ed25519.mvsm +0 -0
  448. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64.mvsm +0 -0
  449. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64_unbound.mvsm +0 -0
  450. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255.mvsm +0 -0
  451. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_bulletproofs.mvsm +0 -0
  452. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_elgamal.mvsm +0 -0
  453. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_pedersen.mvsm +0 -0
  454. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/secp256k1.mvsm +0 -0
  455. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/simple_map.mvsm +0 -0
  456. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_table.mvsm +0 -0
  457. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_vector.mvsm +0 -0
  458. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/string_utils.mvsm +0 -0
  459. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table.mvsm +0 -0
  460. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table_with_length.mvsm +0 -0
  461. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/type_info.mvsm +0 -0
  462. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/acl.mvsm +0 -0
  463. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bcs.mvsm +0 -0
  464. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bit_vector.mvsm +0 -0
  465. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/error.mvsm +0 -0
  466. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/features.mvsm +0 -0
  467. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/fixed_point32.mvsm +0 -0
  468. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/hash.mvsm +0 -0
  469. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/option.mvsm +0 -0
  470. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/signer.mvsm +0 -0
  471. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/string.mvsm +0 -0
  472. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/vector.mvsm +0 -0
  473. package/src/internal/move/jwks/build/jwk/source_maps/main.mvsm +0 -0
  474. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/account.move +1533 -0
  475. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator.move +48 -0
  476. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_factory.move +66 -0
  477. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_v2.move +280 -0
  478. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_account.move +443 -0
  479. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_coin.move +204 -0
  480. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_governance.move +1387 -0
  481. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/block.move +394 -0
  482. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_id.move +41 -0
  483. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_status.move +48 -0
  484. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/code.move +367 -0
  485. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/coin.move +2214 -0
  486. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/config_buffer.move +101 -0
  487. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/consensus_config.move +77 -0
  488. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/create_signer.move +21 -0
  489. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/delegation_pool.move +5568 -0
  490. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dispatchable_fungible_asset.move +228 -0
  491. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dkg.move +121 -0
  492. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/event.move +92 -0
  493. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/execution_config.move +66 -0
  494. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/function_info.move +100 -0
  495. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/fungible_asset.move +1566 -0
  496. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/gas_schedule.move +176 -0
  497. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/genesis.move +550 -0
  498. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/governance_proposal.move +23 -0
  499. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/guid.move +68 -0
  500. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwk_consensus_config.move +148 -0
  501. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwks.move +817 -0
  502. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/keyless_account.move +312 -0
  503. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/managed_coin.move +205 -0
  504. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/multisig_account.move +2477 -0
  505. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object.move +1073 -0
  506. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object_code_deployment.move +147 -0
  507. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/optional_aggregator.move +295 -0
  508. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/primary_fungible_store.move +405 -0
  509. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness.move +574 -0
  510. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_api_v0_config.move +57 -0
  511. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config.move +153 -0
  512. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config_seqnum.move +49 -0
  513. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration.move +237 -0
  514. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_state.move +132 -0
  515. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_with_dkg.move +69 -0
  516. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/resource_account.move +267 -0
  517. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/stake.move +3286 -0
  518. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_config.move +686 -0
  519. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_contract.move +1618 -0
  520. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_proxy.move +228 -0
  521. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/state_storage.move +90 -0
  522. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/storage_gas.move +622 -0
  523. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/system_addresses.move +82 -0
  524. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/timestamp.move +88 -0
  525. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_context.move +262 -0
  526. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_fee.move +457 -0
  527. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_validation.move +501 -0
  528. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/util.move +16 -0
  529. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/validator_consensus_info.move +42 -0
  530. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/version.move +115 -0
  531. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/vesting.move +2183 -0
  532. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/voting.move +1279 -0
  533. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/any.move +57 -0
  534. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/aptos_hash.move +253 -0
  535. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/big_vector.move +469 -0
  536. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381.move +985 -0
  537. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381_algebra.move +802 -0
  538. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bn254_algebra.move +855 -0
  539. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/capability.move +193 -0
  540. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/comparator.move +173 -0
  541. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/copyable_any.move +45 -0
  542. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/crypto_algebra.move +351 -0
  543. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/debug.move +278 -0
  544. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ed25519.move +262 -0
  545. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/fixed_point64.move +447 -0
  546. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/from_bcs.move +91 -0
  547. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math128.move +381 -0
  548. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math64.move +336 -0
  549. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed.move +139 -0
  550. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed64.move +142 -0
  551. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/multi_ed25519.move +482 -0
  552. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64.move +571 -0
  553. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64_unbound.move +270 -0
  554. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255.move +1310 -0
  555. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_bulletproofs.move +253 -0
  556. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_elgamal.move +234 -0
  557. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_pedersen.move +158 -0
  558. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/secp256k1.move +114 -0
  559. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/simple_map.move +319 -0
  560. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_table.move +769 -0
  561. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_vector.move +766 -0
  562. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/string_utils.move +148 -0
  563. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table.move +152 -0
  564. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table_with_length.move +141 -0
  565. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/type_info.move +351 -0
  566. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/acl.move +46 -0
  567. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bcs.move +27 -0
  568. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bit_vector.move +239 -0
  569. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/error.move +88 -0
  570. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/features.move +780 -0
  571. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/fixed_point32.move +295 -0
  572. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/hash.move +8 -0
  573. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/option.move +356 -0
  574. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/signer.move +21 -0
  575. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/string.move +93 -0
  576. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/vector.move +669 -0
  577. package/src/internal/move/jwks/build/jwk/sources/main.move +20 -0
  578. package/src/version.ts +1 -1
  579. package/dist/common/chunk-6MMUUJHX.js +0 -4
  580. package/dist/common/chunk-6MMUUJHX.js.map +0 -1
  581. package/dist/esm/api/event.d.mts +0 -193
  582. package/dist/esm/api/event.mjs +0 -2
  583. package/dist/esm/chunk-35DKMW7Q.mjs +0 -2
  584. package/dist/esm/chunk-4R4AI5RT.mjs +0 -2
  585. package/dist/esm/chunk-4RXKALLC.mjs +0 -2
  586. package/dist/esm/chunk-56CNRT2K.mjs +0 -2
  587. package/dist/esm/chunk-6MWXV62C.mjs +0 -2
  588. package/dist/esm/chunk-6PKBXYG3.mjs +0 -2
  589. package/dist/esm/chunk-6Y6ZO7TS.mjs +0 -7
  590. package/dist/esm/chunk-A5L76YP7.mjs +0 -2
  591. package/dist/esm/chunk-AQQEQB35.mjs +0 -2
  592. package/dist/esm/chunk-BUUV6B4P.mjs +0 -2
  593. package/dist/esm/chunk-BYINW7I2.mjs +0 -2
  594. package/dist/esm/chunk-C3Q23D22.mjs +0 -2
  595. package/dist/esm/chunk-C6JRJNK3.mjs +0 -2
  596. package/dist/esm/chunk-DPW6ELCQ.mjs +0 -2
  597. package/dist/esm/chunk-DPW6ELCQ.mjs.map +0 -1
  598. package/dist/esm/chunk-DW6WLD2B.mjs +0 -2
  599. package/dist/esm/chunk-E6IUB35J.mjs +0 -2
  600. package/dist/esm/chunk-EPMBZCYJ.mjs +0 -2
  601. package/dist/esm/chunk-EPMBZCYJ.mjs.map +0 -1
  602. package/dist/esm/chunk-FBCXUC7J.mjs +0 -2
  603. package/dist/esm/chunk-FWGLACJS.mjs +0 -2
  604. package/dist/esm/chunk-FWGLACJS.mjs.map +0 -1
  605. package/dist/esm/chunk-GOXRBEIJ.mjs +0 -2
  606. package/dist/esm/chunk-GRB6YSIT.mjs +0 -2
  607. package/dist/esm/chunk-GYVSI3TS.mjs +0 -4
  608. package/dist/esm/chunk-HPQMAP7O.mjs +0 -2
  609. package/dist/esm/chunk-I4NMWLUZ.mjs +0 -6
  610. package/dist/esm/chunk-I4NMWLUZ.mjs.map +0 -1
  611. package/dist/esm/chunk-IF4UU2MT.mjs +0 -2
  612. package/dist/esm/chunk-IJE2LVZG.mjs +0 -2
  613. package/dist/esm/chunk-IXYGZ57N.mjs +0 -2
  614. package/dist/esm/chunk-JCFTAG5Z.mjs +0 -2
  615. package/dist/esm/chunk-KDMSOCZY.mjs +0 -2
  616. package/dist/esm/chunk-KJH4KKG6.mjs +0 -2
  617. package/dist/esm/chunk-NII5Q32W.mjs +0 -2
  618. package/dist/esm/chunk-NJN3EAOM.mjs +0 -2
  619. package/dist/esm/chunk-OYH2T6V5.mjs +0 -2
  620. package/dist/esm/chunk-OYUW6ZN2.mjs +0 -2
  621. package/dist/esm/chunk-PQS3II2E.mjs +0 -2
  622. package/dist/esm/chunk-PRUQZNAP.mjs +0 -2
  623. package/dist/esm/chunk-QGFWOGAV.mjs +0 -2
  624. package/dist/esm/chunk-QGFWOGAV.mjs.map +0 -1
  625. package/dist/esm/chunk-QQEK2GJC.mjs +0 -2
  626. package/dist/esm/chunk-QREVMGQZ.mjs +0 -2
  627. package/dist/esm/chunk-RFQFTIOA.mjs +0 -2
  628. package/dist/esm/chunk-ROT6S6BM.mjs +0 -2
  629. package/dist/esm/chunk-STY74NUA.mjs +0 -2
  630. package/dist/esm/chunk-THUSLDD6.mjs +0 -2
  631. package/dist/esm/chunk-UCBUUH5M.mjs +0 -2
  632. package/dist/esm/chunk-WLUXOUZH.mjs +0 -2
  633. package/dist/esm/chunk-XIQFX5FV.mjs +0 -2
  634. package/dist/esm/chunk-Y7ZQTLH4.mjs +0 -2
  635. package/dist/esm/chunk-YFFDF22R.mjs +0 -2
  636. package/dist/esm/chunk-YOZBVVKL.mjs +0 -2
  637. package/dist/esm/chunk-Z6KQX6VX.mjs +0 -2
  638. package/dist/esm/chunk-ZMT2M6YT.mjs +0 -2
  639. package/dist/esm/internal/event.d.mts +0 -82
  640. package/dist/esm/internal/event.mjs +0 -2
  641. package/dist/esm/internal/event.mjs.map +0 -1
  642. package/src/api/event.ts +0 -230
  643. package/src/internal/event.ts +0 -166
  644. /package/dist/esm/api/{event.mjs.map → manager.mjs.map} +0 -0
  645. /package/dist/esm/{chunk-KDMSOCZY.mjs.map → chunk-SAWN7RJP.mjs.map} +0 -0
@@ -0,0 +1,1390 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+
12
+ // src/core/common.ts
13
+ var ParsingError = class extends Error {
14
+ /**
15
+ * Creates an instance of the error with a specified message and invalid reason.
16
+ *
17
+ * @param message The error message that describes the issue.
18
+ * @param invalidReason The reason why the input is considered invalid.
19
+ * @group Implementation
20
+ * @category Serialization
21
+ */
22
+ constructor(message, invalidReason) {
23
+ super(message);
24
+ this.invalidReason = invalidReason;
25
+ }
26
+ };
27
+
28
+ // src/core/hex.ts
29
+ var _utils = require('@noble/hashes/utils');
30
+ var HexInvalidReason = /* @__PURE__ */ ((HexInvalidReason2) => {
31
+ HexInvalidReason2["TOO_SHORT"] = "too_short";
32
+ HexInvalidReason2["INVALID_LENGTH"] = "invalid_length";
33
+ HexInvalidReason2["INVALID_HEX_CHARS"] = "invalid_hex_chars";
34
+ return HexInvalidReason2;
35
+ })(HexInvalidReason || {});
36
+ var Hex = class _Hex {
37
+ /**
38
+ * Create a new Hex instance from a Uint8Array.
39
+ *
40
+ * @param data - The Uint8Array containing the data to initialize the Hex instance.
41
+ * @group Implementation
42
+ * @category Serialization
43
+ */
44
+ constructor(data) {
45
+ this.data = data;
46
+ }
47
+ // ===
48
+ // Methods for representing an instance of Hex as other types.
49
+ // ===
50
+ /**
51
+ * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.
52
+ *
53
+ * @returns Hex data as Uint8Array
54
+ * @group Implementation
55
+ * @category Serialization
56
+ */
57
+ toUint8Array() {
58
+ return this.data;
59
+ }
60
+ /**
61
+ * Get the hex data as a string without the 0x prefix.
62
+ *
63
+ * @returns Hex string without 0x prefix
64
+ * @group Implementation
65
+ * @category Serialization
66
+ */
67
+ toStringWithoutPrefix() {
68
+ return _utils.bytesToHex.call(void 0, this.data);
69
+ }
70
+ /**
71
+ * Get the hex data as a string with the 0x prefix.
72
+ *
73
+ * @returns Hex string with 0x prefix
74
+ * @group Implementation
75
+ * @category Serialization
76
+ */
77
+ toString() {
78
+ return `0x${this.toStringWithoutPrefix()}`;
79
+ }
80
+ // ===
81
+ // Methods for creating an instance of Hex from other types.
82
+ // ===
83
+ /**
84
+ * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.
85
+ *
86
+ * @param str - A hex string, with or without the 0x prefix.
87
+ *
88
+ * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.
89
+ *
90
+ * @returns Hex - The resulting Hex instance created from the provided string.
91
+ * @group Implementation
92
+ * @category Serialization
93
+ */
94
+ static fromHexString(str) {
95
+ let input = str;
96
+ if (input.startsWith("0x")) {
97
+ input = input.slice(2);
98
+ }
99
+ if (input.length === 0) {
100
+ throw new ParsingError(
101
+ "Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.",
102
+ "too_short" /* TOO_SHORT */
103
+ );
104
+ }
105
+ if (input.length % 2 !== 0) {
106
+ throw new ParsingError("Hex string must be an even number of hex characters.", "invalid_length" /* INVALID_LENGTH */);
107
+ }
108
+ try {
109
+ return new _Hex(_utils.hexToBytes.call(void 0, input));
110
+ } catch (error) {
111
+ throw new ParsingError(
112
+ `Hex string contains invalid hex characters: ${_optionalChain([error, 'optionalAccess', _ => _.message])}`,
113
+ "invalid_hex_chars" /* INVALID_HEX_CHARS */
114
+ );
115
+ }
116
+ }
117
+ /**
118
+ * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.
119
+ * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.
120
+ *
121
+ * @param hexInput - A HexInput which can be a string or Uint8Array.
122
+ * @returns A Hex instance created from the provided hexInput.
123
+ * @group Implementation
124
+ * @category Serialization
125
+ */
126
+ static fromHexInput(hexInput) {
127
+ if (hexInput instanceof Uint8Array) return new _Hex(hexInput);
128
+ return _Hex.fromHexString(hexInput);
129
+ }
130
+ /**
131
+ * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.
132
+ *
133
+ * @param hexInput - A HexInput which can be a string or Uint8Array.
134
+ * @returns A Uint8Array created from the provided hexInput.
135
+ */
136
+ static hexInputToUint8Array(hexInput) {
137
+ if (hexInput instanceof Uint8Array) return hexInput;
138
+ return _Hex.fromHexString(hexInput).toUint8Array();
139
+ }
140
+ /**
141
+ * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.
142
+ *
143
+ * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array
144
+ * @returns A hex string with '0x' prefix (e.g., "0x1234")
145
+ *
146
+ * @example
147
+ * ```typescript
148
+ * Hex.hexInputToString("1234") // returns "0x1234"
149
+ * Hex.hexInputToString("0x1234") // returns "0x1234"
150
+ * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns "0x1234"
151
+ * ```
152
+ */
153
+ static hexInputToString(hexInput) {
154
+ return _Hex.fromHexInput(hexInput).toString();
155
+ }
156
+ /**
157
+ * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.
158
+ *
159
+ * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array
160
+ * @returns A hex string without '0x' prefix (e.g., "1234")
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * Hex.hexInputToStringWithoutPrefix("1234") // returns "1234"
165
+ * Hex.hexInputToStringWithoutPrefix("0x1234") // returns "1234"
166
+ * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns "1234"
167
+ * ```
168
+ */
169
+ static hexInputToStringWithoutPrefix(hexInput) {
170
+ return _Hex.fromHexInput(hexInput).toStringWithoutPrefix();
171
+ }
172
+ // ===
173
+ // Methods for checking validity.
174
+ // ===
175
+ /**
176
+ * Check if the provided string is a valid hexadecimal representation.
177
+ *
178
+ * @param str - A hex string representing byte data.
179
+ *
180
+ * @returns An object containing:
181
+ * - valid: A boolean indicating whether the string is valid.
182
+ * - invalidReason: The reason for invalidity if the string is not valid.
183
+ * - invalidReasonMessage: A message explaining why the string is invalid.
184
+ * @group Implementation
185
+ * @category Serialization
186
+ */
187
+ static isValid(str) {
188
+ try {
189
+ _Hex.fromHexString(str);
190
+ return { valid: true };
191
+ } catch (error) {
192
+ return {
193
+ valid: false,
194
+ invalidReason: _optionalChain([error, 'optionalAccess', _2 => _2.invalidReason]),
195
+ invalidReasonMessage: _optionalChain([error, 'optionalAccess', _3 => _3.message])
196
+ };
197
+ }
198
+ }
199
+ /**
200
+ * Determine if two Hex instances are equal by comparing their underlying byte data.
201
+ *
202
+ * @param other The Hex instance to compare to.
203
+ * @returns true if the Hex instances are equal, false if not.
204
+ * @group Implementation
205
+ * @category Serialization
206
+ */
207
+ equals(other) {
208
+ if (this.data.length !== other.data.length) return false;
209
+ return this.data.every((value, index) => value === other.data[index]);
210
+ }
211
+ };
212
+ var hexToAsciiString = (hex) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());
213
+
214
+ // src/bcs/consts.ts
215
+ var MAX_U8_NUMBER = 255;
216
+ var MAX_U16_NUMBER = 65535;
217
+ var MAX_U32_NUMBER = 4294967295;
218
+ var MAX_U64_BIG_INT = 18446744073709551615n;
219
+ var MAX_U128_BIG_INT = 340282366920938463463374607431768211455n;
220
+ var MAX_U256_BIG_INT = 115792089237316195423570985008687907853269984665640564039457584007913129639935n;
221
+
222
+ // src/bcs/serializer.ts
223
+ var Serializable = class {
224
+ /**
225
+ * Serializes a `Serializable` value to its BCS representation.
226
+ * This function is the TypeScript SDK equivalent of `bcs::to_bytes` in Move.
227
+ * @returns the BCS representation of the Serializable instance as a byte buffer.
228
+ * @group Implementation
229
+ * @category BCS
230
+ */
231
+ bcsToBytes() {
232
+ const serializer = new Serializer();
233
+ this.serialize(serializer);
234
+ return serializer.toUint8Array();
235
+ }
236
+ /**
237
+ * Converts the BCS-serialized bytes of a value into a Hex instance.
238
+ * This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.
239
+ * @returns A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
240
+ * @group Implementation
241
+ * @category BCS
242
+ */
243
+ bcsToHex() {
244
+ const bcsBytes = this.bcsToBytes();
245
+ return Hex.fromHexInput(bcsBytes);
246
+ }
247
+ /**
248
+ * Returns the hex string representation of the `Serializable` value without the 0x prefix.
249
+ * @returns the hex format as a string without `0x` prefix.
250
+ */
251
+ toStringWithoutPrefix() {
252
+ return this.bcsToHex().toStringWithoutPrefix();
253
+ }
254
+ /**
255
+ * Returns the hex string representation of the `Serializable` value with the 0x prefix.
256
+ * @returns the hex formatas a string prefixed by `0x`.
257
+ */
258
+ toString() {
259
+ return `0x${this.toStringWithoutPrefix()}`;
260
+ }
261
+ };
262
+ var Serializer = class {
263
+ /**
264
+ * Constructs a serializer with a buffer of size `length` bytes, 64 bytes by default.
265
+ * The `length` must be greater than 0.
266
+ *
267
+ * @param length - The size of the buffer in bytes.
268
+ * @group Implementation
269
+ * @category BCS
270
+ */
271
+ constructor(length = 64) {
272
+ if (length <= 0) {
273
+ throw new Error("Length needs to be greater than 0");
274
+ }
275
+ this.buffer = new ArrayBuffer(length);
276
+ this.offset = 0;
277
+ }
278
+ /**
279
+ * Ensures that the internal buffer can accommodate the specified number of bytes.
280
+ * This function dynamically resizes the buffer if the current size is insufficient.
281
+ *
282
+ * @param bytes - The number of bytes to ensure the buffer can handle.
283
+ * @group Implementation
284
+ * @category BCS
285
+ */
286
+ ensureBufferWillHandleSize(bytes) {
287
+ while (this.buffer.byteLength < this.offset + bytes) {
288
+ const newBuffer = new ArrayBuffer(this.buffer.byteLength * 2);
289
+ new Uint8Array(newBuffer).set(new Uint8Array(this.buffer));
290
+ this.buffer = newBuffer;
291
+ }
292
+ }
293
+ /**
294
+ * Appends the specified values to the buffer, ensuring that the buffer can accommodate the new data.
295
+ *
296
+ * @param {Uint8Array} values - The values to be appended to the buffer.
297
+ * @group Implementation
298
+ * @category BCS
299
+ */
300
+ appendToBuffer(values) {
301
+ this.ensureBufferWillHandleSize(values.length);
302
+ new Uint8Array(this.buffer, this.offset).set(values);
303
+ this.offset += values.length;
304
+ }
305
+ /**
306
+ * Serializes a value into the buffer using the provided function, ensuring the buffer can accommodate the size.
307
+ *
308
+ * @param fn - The function to serialize the value, which takes a byte offset, the value to serialize, and an optional little-endian flag.
309
+ * @param fn.byteOffset - The byte offset at which to write the value.
310
+ * @param fn.value - The numeric value to serialize into the buffer.
311
+ * @param fn.littleEndian - Optional flag indicating whether to use little-endian byte order (defaults to true).
312
+ * @group Implementation
313
+ * @category BCS
314
+ */
315
+ // TODO: JSDoc bytesLength and value
316
+ serializeWithFunction(fn, bytesLength, value) {
317
+ this.ensureBufferWillHandleSize(bytesLength);
318
+ const dv = new DataView(this.buffer, this.offset);
319
+ fn.apply(dv, [0, value, true]);
320
+ this.offset += bytesLength;
321
+ }
322
+ /**
323
+ * Serializes a string. UTF8 string is supported.
324
+ * The number of bytes in the string content is serialized first, as a uleb128-encoded u32 integer.
325
+ * Then the string content is serialized as UTF8 encoded bytes.
326
+ *
327
+ * BCS layout for "string": string_length | string_content
328
+ * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
329
+ *
330
+ * @param value - The string to serialize.
331
+ *
332
+ * @example
333
+ * ```typescript
334
+ * const serializer = new Serializer();
335
+ * serializer.serializeStr("1234abcd");
336
+ * assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
337
+ * ```
338
+ * @group Implementation
339
+ * @category BCS
340
+ */
341
+ serializeStr(value) {
342
+ const textEncoder = new TextEncoder();
343
+ this.serializeBytes(textEncoder.encode(value));
344
+ }
345
+ /**
346
+ * Serializes an array of bytes.
347
+ *
348
+ * This function encodes the length of the byte array as a u32 integer in uleb128 format, followed by the byte array itself.
349
+ * BCS layout for "bytes": bytes_length | bytes
350
+ * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
351
+ * @param value - The byte array to serialize.
352
+ * @group Implementation
353
+ * @category BCS
354
+ */
355
+ serializeBytes(value) {
356
+ this.serializeU32AsUleb128(value.length);
357
+ this.appendToBuffer(value);
358
+ }
359
+ /**
360
+ * Serializes an array of bytes with a known length, allowing for efficient deserialization without needing to serialize the
361
+ * length itself.
362
+ * When deserializing, the number of bytes to deserialize needs to be passed in.
363
+
364
+ * @param value - The Uint8Array to be serialized.
365
+ * @group Implementation
366
+ * @category BCS
367
+ */
368
+ serializeFixedBytes(value) {
369
+ this.appendToBuffer(value);
370
+ }
371
+ /**
372
+ * Serializes a boolean value into a byte representation.
373
+ *
374
+ * The BCS layout for a boolean uses one byte, where "0x01" represents true and "0x00" represents false.
375
+ *
376
+ * @param value - The boolean value to serialize.
377
+ * @group Implementation
378
+ * @category BCS
379
+ */
380
+ serializeBool(value) {
381
+ ensureBoolean(value);
382
+ const byteValue = value ? 1 : 0;
383
+ this.appendToBuffer(new Uint8Array([byteValue]));
384
+ }
385
+ serializeU8(value) {
386
+ this.appendToBuffer(new Uint8Array([value]));
387
+ }
388
+ serializeU16(value) {
389
+ this.serializeWithFunction(DataView.prototype.setUint16, 2, value);
390
+ }
391
+ serializeU32(value) {
392
+ this.serializeWithFunction(DataView.prototype.setUint32, 4, value);
393
+ }
394
+ serializeU64(value) {
395
+ const low = BigInt(value) & BigInt(MAX_U32_NUMBER);
396
+ const high = BigInt(value) >> BigInt(32);
397
+ this.serializeU32(Number(low));
398
+ this.serializeU32(Number(high));
399
+ }
400
+ serializeU128(value) {
401
+ const low = BigInt(value) & MAX_U64_BIG_INT;
402
+ const high = BigInt(value) >> BigInt(64);
403
+ this.serializeU64(low);
404
+ this.serializeU64(high);
405
+ }
406
+ serializeU256(value) {
407
+ const low = BigInt(value) & MAX_U128_BIG_INT;
408
+ const high = BigInt(value) >> BigInt(128);
409
+ this.serializeU128(low);
410
+ this.serializeU128(high);
411
+ }
412
+ serializeU32AsUleb128(val) {
413
+ let value = val;
414
+ const valueArray = [];
415
+ while (value >>> 7 !== 0) {
416
+ valueArray.push(value & 127 | 128);
417
+ value >>>= 7;
418
+ }
419
+ valueArray.push(value);
420
+ this.appendToBuffer(new Uint8Array(valueArray));
421
+ }
422
+ /**
423
+ * Returns the buffered bytes as a Uint8Array.
424
+ *
425
+ * This function allows you to retrieve the byte representation of the buffer up to the current offset.
426
+ *
427
+ * @returns Uint8Array - The byte array representation of the buffer.
428
+ * @group Implementation
429
+ * @category BCS
430
+ */
431
+ toUint8Array() {
432
+ return new Uint8Array(this.buffer).slice(0, this.offset);
433
+ }
434
+ /**
435
+ * Serializes a `Serializable` value, facilitating composable serialization.
436
+ *
437
+ * @param value The Serializable value to serialize.
438
+ *
439
+ * @returns the serializer instance
440
+ * @group Implementation
441
+ * @category BCS
442
+ */
443
+ serialize(value) {
444
+ value.serialize(this);
445
+ }
446
+ /**
447
+ * Serializes an array of BCS Serializable values to a serializer instance.
448
+ * The bytes are added to the serializer instance's byte buffer.
449
+ *
450
+ * @param values The array of BCS Serializable values
451
+ * @example
452
+ * const addresses = new Array<AccountAddress>(
453
+ * AccountAddress.from("0x1"),
454
+ * AccountAddress.from("0x2"),
455
+ * AccountAddress.from("0xa"),
456
+ * AccountAddress.from("0xb"),
457
+ * );
458
+ * const serializer = new Serializer();
459
+ * serializer.serializeVector(addresses);
460
+ * const serializedBytes = serializer.toUint8Array();
461
+ * // serializedBytes is now the BCS-serialized bytes
462
+ * // The equivalent value in Move would be:
463
+ * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
464
+ * @group Implementation
465
+ * @category BCS
466
+ */
467
+ serializeVector(values) {
468
+ this.serializeU32AsUleb128(values.length);
469
+ values.forEach((item) => {
470
+ item.serialize(this);
471
+ });
472
+ }
473
+ /**
474
+ * Serializes an optional value which can be a Serializable, string, or Uint8Array.
475
+ * For strings and Uint8Arrays, it uses the appropriate serialization method.
476
+ *
477
+ * @param value The value to serialize (Serializable, string, Uint8Array, or undefined)
478
+ * @param len Optional fixed length for Uint8Array serialization. If provided, uses serializeFixedBytes instead of serializeBytes
479
+ *
480
+ * @example
481
+ * ```typescript
482
+ * const serializer = new Serializer();
483
+ * serializer.serializeOption("hello"); // Serializes optional string
484
+ * serializer.serializeOption(new Uint8Array([1, 2, 3])); // Serializes optional bytes
485
+ * serializer.serializeOption(new Uint8Array([1, 2, 3]), 3); // Serializes optional fixed-length bytes
486
+ * serializer.serializeOption(new AccountAddress(...)); // Serializes optional Serializable
487
+ * serializer.serializeOption(undefined); // Serializes none case
488
+ * ```
489
+ * @group Implementation
490
+ * @category BCS
491
+ */
492
+ serializeOption(value, len) {
493
+ const hasValue = value !== void 0;
494
+ this.serializeBool(hasValue);
495
+ if (hasValue) {
496
+ if (typeof value === "string") {
497
+ this.serializeStr(value);
498
+ } else if (value instanceof Uint8Array) {
499
+ if (len !== void 0) {
500
+ this.serializeFixedBytes(value);
501
+ } else {
502
+ this.serializeBytes(value);
503
+ }
504
+ } else {
505
+ value.serialize(this);
506
+ }
507
+ }
508
+ }
509
+ /**
510
+ * @deprecated use `serializeOption` instead.
511
+ * Serializes an optional string, supporting UTF8 encoding.
512
+ * The function encodes the existence of the string first, followed by the length and content if it exists.
513
+ *
514
+ * BCS layout for optional "string": 1 | string_length | string_content
515
+ * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
516
+ * BCS layout for undefined: 0
517
+ *
518
+ * @param value - The optional string to serialize. If undefined, it will serialize as 0.
519
+ * @group Implementation
520
+ * @category BCS
521
+ */
522
+ serializeOptionStr(value) {
523
+ if (value === void 0) {
524
+ this.serializeU32AsUleb128(0);
525
+ } else {
526
+ this.serializeU32AsUleb128(1);
527
+ this.serializeStr(value);
528
+ }
529
+ }
530
+ };
531
+ __decorateClass([
532
+ checkNumberRange(0, MAX_U8_NUMBER)
533
+ ], Serializer.prototype, "serializeU8", 1);
534
+ __decorateClass([
535
+ checkNumberRange(0, MAX_U16_NUMBER)
536
+ ], Serializer.prototype, "serializeU16", 1);
537
+ __decorateClass([
538
+ checkNumberRange(0, MAX_U32_NUMBER)
539
+ ], Serializer.prototype, "serializeU32", 1);
540
+ __decorateClass([
541
+ checkNumberRange(BigInt(0), MAX_U64_BIG_INT)
542
+ ], Serializer.prototype, "serializeU64", 1);
543
+ __decorateClass([
544
+ checkNumberRange(BigInt(0), MAX_U128_BIG_INT)
545
+ ], Serializer.prototype, "serializeU128", 1);
546
+ __decorateClass([
547
+ checkNumberRange(BigInt(0), MAX_U256_BIG_INT)
548
+ ], Serializer.prototype, "serializeU256", 1);
549
+ __decorateClass([
550
+ checkNumberRange(0, MAX_U32_NUMBER)
551
+ ], Serializer.prototype, "serializeU32AsUleb128", 1);
552
+ function ensureBoolean(value) {
553
+ if (typeof value !== "boolean") {
554
+ throw new Error(`${value} is not a boolean value`);
555
+ }
556
+ }
557
+ var outOfRangeErrorMessage = (value, min, max) => `${value} is out of range: [${min}, ${max}]`;
558
+ function validateNumberInRange(value, minValue, maxValue) {
559
+ const valueBigInt = BigInt(value);
560
+ if (valueBigInt > BigInt(maxValue) || valueBigInt < BigInt(minValue)) {
561
+ throw new Error(outOfRangeErrorMessage(value, minValue, maxValue));
562
+ }
563
+ }
564
+ function checkNumberRange(minValue, maxValue) {
565
+ return (target, propertyKey, descriptor) => {
566
+ const childFunction = descriptor.value;
567
+ descriptor.value = function deco(value) {
568
+ validateNumberInRange(value, minValue, maxValue);
569
+ return childFunction.apply(this, [value]);
570
+ };
571
+ return descriptor;
572
+ };
573
+ }
574
+
575
+ // src/types/types.ts
576
+ var MimeType = /* @__PURE__ */ ((MimeType2) => {
577
+ MimeType2["JSON"] = "application/json";
578
+ MimeType2["BCS"] = "application/x-bcs";
579
+ MimeType2["BCS_SIGNED_TRANSACTION"] = "application/x.aptos.signed_transaction+bcs";
580
+ MimeType2["BCS_VIEW_FUNCTION"] = "application/x.aptos.view_function+bcs";
581
+ return MimeType2;
582
+ })(MimeType || {});
583
+ var TypeTagVariants = /* @__PURE__ */ ((TypeTagVariants2) => {
584
+ TypeTagVariants2[TypeTagVariants2["Bool"] = 0] = "Bool";
585
+ TypeTagVariants2[TypeTagVariants2["U8"] = 1] = "U8";
586
+ TypeTagVariants2[TypeTagVariants2["U64"] = 2] = "U64";
587
+ TypeTagVariants2[TypeTagVariants2["U128"] = 3] = "U128";
588
+ TypeTagVariants2[TypeTagVariants2["Address"] = 4] = "Address";
589
+ TypeTagVariants2[TypeTagVariants2["Signer"] = 5] = "Signer";
590
+ TypeTagVariants2[TypeTagVariants2["Vector"] = 6] = "Vector";
591
+ TypeTagVariants2[TypeTagVariants2["Struct"] = 7] = "Struct";
592
+ TypeTagVariants2[TypeTagVariants2["U16"] = 8] = "U16";
593
+ TypeTagVariants2[TypeTagVariants2["U32"] = 9] = "U32";
594
+ TypeTagVariants2[TypeTagVariants2["U256"] = 10] = "U256";
595
+ TypeTagVariants2[TypeTagVariants2["Reference"] = 254] = "Reference";
596
+ TypeTagVariants2[TypeTagVariants2["Generic"] = 255] = "Generic";
597
+ return TypeTagVariants2;
598
+ })(TypeTagVariants || {});
599
+ var ScriptTransactionArgumentVariants = /* @__PURE__ */ ((ScriptTransactionArgumentVariants2) => {
600
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U8"] = 0] = "U8";
601
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U64"] = 1] = "U64";
602
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U128"] = 2] = "U128";
603
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["Address"] = 3] = "Address";
604
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U8Vector"] = 4] = "U8Vector";
605
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["Bool"] = 5] = "Bool";
606
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U16"] = 6] = "U16";
607
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U32"] = 7] = "U32";
608
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["U256"] = 8] = "U256";
609
+ ScriptTransactionArgumentVariants2[ScriptTransactionArgumentVariants2["Serialized"] = 9] = "Serialized";
610
+ return ScriptTransactionArgumentVariants2;
611
+ })(ScriptTransactionArgumentVariants || {});
612
+ var TransactionPayloadVariants = /* @__PURE__ */ ((TransactionPayloadVariants2) => {
613
+ TransactionPayloadVariants2[TransactionPayloadVariants2["Script"] = 0] = "Script";
614
+ TransactionPayloadVariants2[TransactionPayloadVariants2["EntryFunction"] = 2] = "EntryFunction";
615
+ TransactionPayloadVariants2[TransactionPayloadVariants2["Multisig"] = 3] = "Multisig";
616
+ TransactionPayloadVariants2[TransactionPayloadVariants2["Payload"] = 4] = "Payload";
617
+ return TransactionPayloadVariants2;
618
+ })(TransactionPayloadVariants || {});
619
+ var TransactionInnerPayloadVariants = /* @__PURE__ */ ((TransactionInnerPayloadVariants2) => {
620
+ TransactionInnerPayloadVariants2[TransactionInnerPayloadVariants2["V1"] = 0] = "V1";
621
+ return TransactionInnerPayloadVariants2;
622
+ })(TransactionInnerPayloadVariants || {});
623
+ var TransactionExecutableVariants = /* @__PURE__ */ ((TransactionExecutableVariants2) => {
624
+ TransactionExecutableVariants2[TransactionExecutableVariants2["Script"] = 0] = "Script";
625
+ TransactionExecutableVariants2[TransactionExecutableVariants2["EntryFunction"] = 1] = "EntryFunction";
626
+ TransactionExecutableVariants2[TransactionExecutableVariants2["Empty"] = 2] = "Empty";
627
+ return TransactionExecutableVariants2;
628
+ })(TransactionExecutableVariants || {});
629
+ var TransactionExtraConfigVariants = /* @__PURE__ */ ((TransactionExtraConfigVariants2) => {
630
+ TransactionExtraConfigVariants2[TransactionExtraConfigVariants2["V1"] = 0] = "V1";
631
+ return TransactionExtraConfigVariants2;
632
+ })(TransactionExtraConfigVariants || {});
633
+ var TransactionVariants = /* @__PURE__ */ ((TransactionVariants2) => {
634
+ TransactionVariants2[TransactionVariants2["MultiAgentTransaction"] = 0] = "MultiAgentTransaction";
635
+ TransactionVariants2[TransactionVariants2["FeePayerTransaction"] = 1] = "FeePayerTransaction";
636
+ return TransactionVariants2;
637
+ })(TransactionVariants || {});
638
+ var TransactionAuthenticatorVariant = /* @__PURE__ */ ((TransactionAuthenticatorVariant2) => {
639
+ TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["Ed25519"] = 0] = "Ed25519";
640
+ TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["MultiEd25519"] = 1] = "MultiEd25519";
641
+ TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["MultiAgent"] = 2] = "MultiAgent";
642
+ TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["FeePayer"] = 3] = "FeePayer";
643
+ TransactionAuthenticatorVariant2[TransactionAuthenticatorVariant2["SingleSender"] = 4] = "SingleSender";
644
+ return TransactionAuthenticatorVariant2;
645
+ })(TransactionAuthenticatorVariant || {});
646
+ var AccountAuthenticatorVariant = /* @__PURE__ */ ((AccountAuthenticatorVariant2) => {
647
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["Ed25519"] = 0] = "Ed25519";
648
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["MultiEd25519"] = 1] = "MultiEd25519";
649
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["SingleKey"] = 2] = "SingleKey";
650
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["MultiKey"] = 3] = "MultiKey";
651
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["NoAccountAuthenticator"] = 4] = "NoAccountAuthenticator";
652
+ AccountAuthenticatorVariant2[AccountAuthenticatorVariant2["Abstraction"] = 5] = "Abstraction";
653
+ return AccountAuthenticatorVariant2;
654
+ })(AccountAuthenticatorVariant || {});
655
+ var PrivateKeyVariants = /* @__PURE__ */ ((PrivateKeyVariants2) => {
656
+ PrivateKeyVariants2["Ed25519"] = "ed25519";
657
+ PrivateKeyVariants2["Secp256k1"] = "secp256k1";
658
+ return PrivateKeyVariants2;
659
+ })(PrivateKeyVariants || {});
660
+ var AnyPublicKeyVariant = /* @__PURE__ */ ((AnyPublicKeyVariant2) => {
661
+ AnyPublicKeyVariant2[AnyPublicKeyVariant2["Ed25519"] = 0] = "Ed25519";
662
+ AnyPublicKeyVariant2[AnyPublicKeyVariant2["Secp256k1"] = 1] = "Secp256k1";
663
+ AnyPublicKeyVariant2[AnyPublicKeyVariant2["Keyless"] = 3] = "Keyless";
664
+ AnyPublicKeyVariant2[AnyPublicKeyVariant2["FederatedKeyless"] = 4] = "FederatedKeyless";
665
+ return AnyPublicKeyVariant2;
666
+ })(AnyPublicKeyVariant || {});
667
+ function anyPublicKeyVariantToString(variant) {
668
+ switch (variant) {
669
+ case 0 /* Ed25519 */:
670
+ return "ed25519";
671
+ case 1 /* Secp256k1 */:
672
+ return "secp256k1";
673
+ case 3 /* Keyless */:
674
+ return "keyless";
675
+ case 4 /* FederatedKeyless */:
676
+ return "federated_keyless";
677
+ default:
678
+ throw new Error("Unknown public key variant");
679
+ }
680
+ }
681
+ var AnySignatureVariant = /* @__PURE__ */ ((AnySignatureVariant2) => {
682
+ AnySignatureVariant2[AnySignatureVariant2["Ed25519"] = 0] = "Ed25519";
683
+ AnySignatureVariant2[AnySignatureVariant2["Secp256k1"] = 1] = "Secp256k1";
684
+ AnySignatureVariant2[AnySignatureVariant2["Keyless"] = 3] = "Keyless";
685
+ return AnySignatureVariant2;
686
+ })(AnySignatureVariant || {});
687
+ var EphemeralPublicKeyVariant = /* @__PURE__ */ ((EphemeralPublicKeyVariant2) => {
688
+ EphemeralPublicKeyVariant2[EphemeralPublicKeyVariant2["Ed25519"] = 0] = "Ed25519";
689
+ return EphemeralPublicKeyVariant2;
690
+ })(EphemeralPublicKeyVariant || {});
691
+ var EphemeralSignatureVariant = /* @__PURE__ */ ((EphemeralSignatureVariant2) => {
692
+ EphemeralSignatureVariant2[EphemeralSignatureVariant2["Ed25519"] = 0] = "Ed25519";
693
+ return EphemeralSignatureVariant2;
694
+ })(EphemeralSignatureVariant || {});
695
+ var EphemeralCertificateVariant = /* @__PURE__ */ ((EphemeralCertificateVariant2) => {
696
+ EphemeralCertificateVariant2[EphemeralCertificateVariant2["ZkProof"] = 0] = "ZkProof";
697
+ return EphemeralCertificateVariant2;
698
+ })(EphemeralCertificateVariant || {});
699
+ var ZkpVariant = /* @__PURE__ */ ((ZkpVariant2) => {
700
+ ZkpVariant2[ZkpVariant2["Groth16"] = 0] = "Groth16";
701
+ return ZkpVariant2;
702
+ })(ZkpVariant || {});
703
+ var TransactionResponseType = /* @__PURE__ */ ((TransactionResponseType2) => {
704
+ TransactionResponseType2["Pending"] = "pending_transaction";
705
+ TransactionResponseType2["User"] = "user_transaction";
706
+ TransactionResponseType2["Genesis"] = "genesis_transaction";
707
+ TransactionResponseType2["BlockMetadata"] = "block_metadata_transaction";
708
+ TransactionResponseType2["StateCheckpoint"] = "state_checkpoint_transaction";
709
+ TransactionResponseType2["Validator"] = "validator_transaction";
710
+ TransactionResponseType2["BlockEpilogue"] = "block_epilogue_transaction";
711
+ return TransactionResponseType2;
712
+ })(TransactionResponseType || {});
713
+ function isPendingTransactionResponse(response) {
714
+ return response.type === "pending_transaction" /* Pending */;
715
+ }
716
+ function isUserTransactionResponse(response) {
717
+ return response.type === "user_transaction" /* User */;
718
+ }
719
+ function isGenesisTransactionResponse(response) {
720
+ return response.type === "genesis_transaction" /* Genesis */;
721
+ }
722
+ function isBlockMetadataTransactionResponse(response) {
723
+ return response.type === "block_metadata_transaction" /* BlockMetadata */;
724
+ }
725
+ function isStateCheckpointTransactionResponse(response) {
726
+ return response.type === "state_checkpoint_transaction" /* StateCheckpoint */;
727
+ }
728
+ function isValidatorTransactionResponse(response) {
729
+ return response.type === "validator_transaction" /* Validator */;
730
+ }
731
+ function isBlockEpilogueTransactionResponse(response) {
732
+ return response.type === "block_epilogue_transaction" /* BlockEpilogue */;
733
+ }
734
+ function isEd25519Signature(signature) {
735
+ return "signature" in signature && signature.type === "ed25519_signature";
736
+ }
737
+ function isSecp256k1Signature(signature) {
738
+ return "signature" in signature && signature.signature === "secp256k1_ecdsa_signature";
739
+ }
740
+ function isMultiAgentSignature(signature) {
741
+ return signature.type === "multi_agent_signature";
742
+ }
743
+ function isFeePayerSignature(signature) {
744
+ return signature.type === "fee_payer_signature";
745
+ }
746
+ function isMultiEd25519Signature(signature) {
747
+ return signature.type === "multi_ed25519_signature";
748
+ }
749
+ function isSingleSenderSignature(signature) {
750
+ return signature.type === "single_sender";
751
+ }
752
+ var MoveFunctionVisibility = /* @__PURE__ */ ((MoveFunctionVisibility2) => {
753
+ MoveFunctionVisibility2["PRIVATE"] = "private";
754
+ MoveFunctionVisibility2["PUBLIC"] = "public";
755
+ MoveFunctionVisibility2["FRIEND"] = "friend";
756
+ return MoveFunctionVisibility2;
757
+ })(MoveFunctionVisibility || {});
758
+ var MoveAbility = /* @__PURE__ */ ((MoveAbility2) => {
759
+ MoveAbility2["STORE"] = "store";
760
+ MoveAbility2["DROP"] = "drop";
761
+ MoveAbility2["KEY"] = "key";
762
+ MoveAbility2["COPY"] = "copy";
763
+ return MoveAbility2;
764
+ })(MoveAbility || {});
765
+ var RoleType = /* @__PURE__ */ ((RoleType2) => {
766
+ RoleType2["VALIDATOR"] = "validator";
767
+ RoleType2["FULL_NODE"] = "full_node";
768
+ return RoleType2;
769
+ })(RoleType || {});
770
+ var SigningScheme = /* @__PURE__ */ ((SigningScheme2) => {
771
+ SigningScheme2[SigningScheme2["Ed25519"] = 0] = "Ed25519";
772
+ SigningScheme2[SigningScheme2["MultiEd25519"] = 1] = "MultiEd25519";
773
+ SigningScheme2[SigningScheme2["SingleKey"] = 2] = "SingleKey";
774
+ SigningScheme2[SigningScheme2["MultiKey"] = 3] = "MultiKey";
775
+ return SigningScheme2;
776
+ })(SigningScheme || {});
777
+ var SigningSchemeInput = /* @__PURE__ */ ((SigningSchemeInput2) => {
778
+ SigningSchemeInput2[SigningSchemeInput2["Ed25519"] = 0] = "Ed25519";
779
+ SigningSchemeInput2[SigningSchemeInput2["Secp256k1Ecdsa"] = 2] = "Secp256k1Ecdsa";
780
+ return SigningSchemeInput2;
781
+ })(SigningSchemeInput || {});
782
+ var DeriveScheme = /* @__PURE__ */ ((DeriveScheme2) => {
783
+ DeriveScheme2[DeriveScheme2["DeriveAuid"] = 251] = "DeriveAuid";
784
+ DeriveScheme2[DeriveScheme2["DeriveObjectAddressFromObject"] = 252] = "DeriveObjectAddressFromObject";
785
+ DeriveScheme2[DeriveScheme2["DeriveObjectAddressFromGuid"] = 253] = "DeriveObjectAddressFromGuid";
786
+ DeriveScheme2[DeriveScheme2["DeriveObjectAddressFromSeed"] = 254] = "DeriveObjectAddressFromSeed";
787
+ DeriveScheme2[DeriveScheme2["DeriveResourceAccountAddress"] = 255] = "DeriveResourceAccountAddress";
788
+ return DeriveScheme2;
789
+ })(DeriveScheme || {});
790
+
791
+ // src/core/accountAddress.ts
792
+
793
+ var AddressInvalidReason = /* @__PURE__ */ ((AddressInvalidReason2) => {
794
+ AddressInvalidReason2["INCORRECT_NUMBER_OF_BYTES"] = "incorrect_number_of_bytes";
795
+ AddressInvalidReason2["INVALID_HEX_CHARS"] = "invalid_hex_chars";
796
+ AddressInvalidReason2["TOO_SHORT"] = "too_short";
797
+ AddressInvalidReason2["TOO_LONG"] = "too_long";
798
+ AddressInvalidReason2["LEADING_ZERO_X_REQUIRED"] = "leading_zero_x_required";
799
+ AddressInvalidReason2["LONG_FORM_REQUIRED_UNLESS_SPECIAL"] = "long_form_required_unless_special";
800
+ AddressInvalidReason2["INVALID_PADDING_ZEROES"] = "INVALID_PADDING_ZEROES";
801
+ AddressInvalidReason2["INVALID_PADDING_STRICTNESS"] = "INVALID_PADDING_STRICTNESS";
802
+ return AddressInvalidReason2;
803
+ })(AddressInvalidReason || {});
804
+ var _AccountAddress = class _AccountAddress extends Serializable {
805
+ /**
806
+ * Creates an instance of AccountAddress from a Uint8Array.
807
+ *
808
+ * This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.
809
+ *
810
+ * @param input A Uint8Array representing an account address.
811
+ * @throws ParsingError if the input length is not equal to 32 bytes.
812
+ * @group Implementation
813
+ * @category Serialization
814
+ */
815
+ constructor(input) {
816
+ super();
817
+ if (input.length !== _AccountAddress.LENGTH) {
818
+ throw new ParsingError(
819
+ "AccountAddress data should be exactly 32 bytes long",
820
+ "incorrect_number_of_bytes" /* INCORRECT_NUMBER_OF_BYTES */
821
+ );
822
+ }
823
+ this.data = input;
824
+ }
825
+ /**
826
+ * Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.
827
+ * In other words, the last byte of the address must be < 0b10000 (16)
828
+ * and every other byte must be zero.
829
+ *
830
+ * For more information on how special addresses are defined, see AIP-40:
831
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
832
+ *
833
+ * @returns true if the address is special, false otherwise.
834
+ * @group Implementation
835
+ * @category Serialization
836
+ */
837
+ isSpecial() {
838
+ return this.data.slice(0, this.data.length - 1).every((byte) => byte === 0) && this.data[this.data.length - 1] < 16;
839
+ }
840
+ // ===
841
+ // Methods for representing an instance of AccountAddress as other types.
842
+ // ===
843
+ /**
844
+ * Return the AccountAddress as a string as per AIP-40.
845
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
846
+ * This representation returns special addresses in SHORT form (0xf)
847
+ * and other addresses in LONG form (0x + 64 characters).
848
+ *
849
+ * @returns AccountAddress as a string conforming to AIP-40.
850
+ * @group Implementation
851
+ * @category Serialization
852
+ */
853
+ toString() {
854
+ return `0x${this.toStringWithoutPrefix()}`;
855
+ }
856
+ /**
857
+ * Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.
858
+ *
859
+ * NOTE: Prefer to use `toString` where possible.
860
+ *
861
+ * @returns AccountAddress as a string without the leading 0x.
862
+ * @group Implementation
863
+ * @category Serialization
864
+ */
865
+ toStringWithoutPrefix() {
866
+ let hex = _utils.bytesToHex.call(void 0, this.data);
867
+ if (this.isSpecial()) {
868
+ hex = hex[hex.length - 1];
869
+ }
870
+ return hex;
871
+ }
872
+ /**
873
+ * Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.
874
+ *
875
+ * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
876
+ *
877
+ * @returns AccountAddress as a string in LONG form.
878
+ * @group Implementation
879
+ * @category Serialization
880
+ */
881
+ toStringLong() {
882
+ return `0x${this.toStringLongWithoutPrefix()}`;
883
+ }
884
+ /**
885
+ * Returns the account address as a string in LONG form without a leading 0x.
886
+ * This function will include leading zeroes and will produce a string of 64 hex characters.
887
+ *
888
+ * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
889
+ *
890
+ * @returns {string} The account address in LONG form.
891
+ * @group Implementation
892
+ * @category Serialization
893
+ */
894
+ toStringLongWithoutPrefix() {
895
+ return _utils.bytesToHex.call(void 0, this.data);
896
+ }
897
+ /**
898
+ * Convert the account address to a string in SHORT format, which is 0x followed by the shortest
899
+ * possible representation (no leading zeros).
900
+ *
901
+ * @returns AccountAddress as a string in SHORT form.
902
+ * @group Implementation
903
+ * @category Serialization
904
+ */
905
+ toStringShort() {
906
+ return `0x${this.toStringShortWithoutPrefix()}`;
907
+ }
908
+ /**
909
+ * Returns a lossless short string representation of the address by trimming leading zeros.
910
+ * If the address consists of all zeros, returns "0".
911
+ *
912
+ * @returns A string representation of the address without leading zeros
913
+ * @group Implementation
914
+ * @category Serialization
915
+ */
916
+ toStringShortWithoutPrefix() {
917
+ const hex = _utils.bytesToHex.call(void 0, this.data).replace(/^0+/, "");
918
+ return hex === "" ? "0" : hex;
919
+ }
920
+ /**
921
+ * Get the inner data as a Uint8Array.
922
+ * The inner data is already a Uint8Array, so no conversion takes place.
923
+ *
924
+ * @returns Hex data as Uint8Array
925
+ * @group Implementation
926
+ * @category Serialization
927
+ */
928
+ toUint8Array() {
929
+ return this.data;
930
+ }
931
+ /**
932
+ * Serialize the AccountAddress to a Serializer instance's data buffer.
933
+ * @param serializer The serializer to serialize the AccountAddress to.
934
+ * @returns void
935
+ * @example
936
+ * const serializer = new Serializer();
937
+ * const address = AccountAddress.fromString("0x1");
938
+ * address.serialize(serializer);
939
+ * const bytes = serializer.toUint8Array();
940
+ * // `bytes` is now the BCS-serialized address.
941
+ * @group Implementation
942
+ * @category Serialization
943
+ */
944
+ serialize(serializer) {
945
+ serializer.serializeFixedBytes(this.data);
946
+ }
947
+ /**
948
+ * Serializes the current instance into a byte sequence suitable for entry functions.
949
+ * This allows for the proper encoding of data when interacting with entry functions in the blockchain.
950
+ *
951
+ * @param serializer - The serializer instance used to convert the data into bytes.
952
+ * @group Implementation
953
+ * @category Serialization
954
+ */
955
+ serializeForEntryFunction(serializer) {
956
+ const bcsBytes = this.bcsToBytes();
957
+ serializer.serializeBytes(bcsBytes);
958
+ }
959
+ /**
960
+ * Serializes the current instance for use in a script function by encoding it into a byte sequence.
961
+ * This process involves serializing the variant index and the instance data, making it suitable for transmission.
962
+ *
963
+ * @param serializer - The serializer instance used to perform the serialization.
964
+ * @group Implementation
965
+ * @category Serialization
966
+ */
967
+ serializeForScriptFunction(serializer) {
968
+ serializer.serializeU32AsUleb128(3 /* Address */);
969
+ serializer.serialize(this);
970
+ }
971
+ /**
972
+ * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.
973
+ * This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.
974
+ * @param deserializer The deserializer to deserialize the AccountAddress from.
975
+ * @returns An instance of AccountAddress.
976
+ * @example
977
+ * const bytes = hexToBytes("0x0102030405060708091011121314151617181920212223242526272829303132");
978
+ * const deserializer = new Deserializer(bytes);
979
+ * const address = AccountAddress.deserialize(deserializer);
980
+ * // `address` is now an instance of AccountAddress.
981
+ * @group Implementation
982
+ * @category Serialization
983
+ */
984
+ static deserialize(deserializer) {
985
+ const bytes = deserializer.deserializeFixedBytes(_AccountAddress.LENGTH);
986
+ return new _AccountAddress(bytes);
987
+ }
988
+ // ===
989
+ // Methods for creating an instance of AccountAddress from other types.
990
+ // ===
991
+ /**
992
+ * NOTE: This function has strict parsing behavior. For relaxed behavior, please use
993
+ * the `fromString` function.
994
+ *
995
+ * Creates an instance of AccountAddress from a hex string.
996
+ *
997
+ * This function allows only the strictest formats defined by AIP-40. In short this
998
+ * means only the following formats are accepted:
999
+ *
1000
+ * - LONG
1001
+ * - SHORT for special addresses
1002
+ *
1003
+ * Where:
1004
+ * - LONG is defined as 0x + 64 hex characters.
1005
+ * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.
1006
+ *
1007
+ * This means the following are not accepted:
1008
+ * - SHORT for non-special addresses.
1009
+ * - Any address without a leading 0x.
1010
+ *
1011
+ * @param input - A hex string representing an account address.
1012
+ *
1013
+ * @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.
1014
+ *
1015
+ * @remarks
1016
+ *
1017
+ * This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.
1018
+ *
1019
+ * @see AIP-40 documentation for more details on address formats:
1020
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
1021
+ *
1022
+ * @returns An instance of AccountAddress.
1023
+ * @group Implementation
1024
+ * @category Serialization
1025
+ */
1026
+ static fromStringStrict(input) {
1027
+ if (!input.startsWith("0x")) {
1028
+ throw new ParsingError("Hex string must start with a leading 0x.", "leading_zero_x_required" /* LEADING_ZERO_X_REQUIRED */);
1029
+ }
1030
+ const address = _AccountAddress.fromString(input);
1031
+ if (input.length !== _AccountAddress.LONG_STRING_LENGTH + 2) {
1032
+ if (!address.isSpecial()) {
1033
+ throw new ParsingError(
1034
+ `The given hex string ${input} is not a special address, it must be represented as 0x + 64 chars.`,
1035
+ "long_form_required_unless_special" /* LONG_FORM_REQUIRED_UNLESS_SPECIAL */
1036
+ );
1037
+ } else if (input.length !== 3) {
1038
+ throw new ParsingError(
1039
+ // eslint-disable-next-line max-len
1040
+ `The given hex string ${input} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,
1041
+ "INVALID_PADDING_ZEROES" /* INVALID_PADDING_ZEROES */
1042
+ );
1043
+ }
1044
+ }
1045
+ return address;
1046
+ }
1047
+ /**
1048
+ * NOTE: This function has relaxed parsing behavior. For strict behavior, please use
1049
+ * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this
1050
+ * function, `fromString`.
1051
+ *
1052
+ * Creates an instance of AccountAddress from a hex string.
1053
+ *
1054
+ * This function allows all formats defined by AIP-40. In short this means the
1055
+ * following formats are accepted:
1056
+ *
1057
+ * - LONG, with or without leading 0x
1058
+ * - SHORT*, with or without leading 0x
1059
+ *
1060
+ * Where:
1061
+ * - LONG is 64 hex characters.
1062
+ * - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.
1063
+ * - Padding zeroes are allowed, e.g. 0x0123 is valid.
1064
+ *
1065
+ * Learn more about the different address formats by reading AIP-40:
1066
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
1067
+ *
1068
+ * @param input A hex string representing an account address.
1069
+ * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.
1070
+ *
1071
+ * @returns An instance of AccountAddress.
1072
+ *
1073
+ * @throws ParsingError if the hex string is too short, too long, or contains invalid characters.
1074
+ * @group Implementation
1075
+ * @category Serialization
1076
+ */
1077
+ static fromString(input, { maxMissingChars = 4 } = {}) {
1078
+ let parsedInput = input;
1079
+ if (input.startsWith("0x")) {
1080
+ parsedInput = input.slice(2);
1081
+ }
1082
+ if (parsedInput.length === 0) {
1083
+ throw new ParsingError(
1084
+ "Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.",
1085
+ "too_short" /* TOO_SHORT */
1086
+ );
1087
+ }
1088
+ if (parsedInput.length > 64) {
1089
+ throw new ParsingError(
1090
+ "Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.",
1091
+ "too_long" /* TOO_LONG */
1092
+ );
1093
+ }
1094
+ if (maxMissingChars > 63 || maxMissingChars < 0) {
1095
+ throw new ParsingError(
1096
+ `maxMissingChars must be between or equal to 0 and 63. Received ${maxMissingChars}`,
1097
+ "INVALID_PADDING_STRICTNESS" /* INVALID_PADDING_STRICTNESS */
1098
+ );
1099
+ }
1100
+ let addressBytes;
1101
+ try {
1102
+ addressBytes = _utils.hexToBytes.call(void 0, parsedInput.padStart(64, "0"));
1103
+ } catch (error) {
1104
+ throw new ParsingError(`Hex characters are invalid: ${_optionalChain([error, 'optionalAccess', _4 => _4.message])}`, "invalid_hex_chars" /* INVALID_HEX_CHARS */);
1105
+ }
1106
+ const address = new _AccountAddress(addressBytes);
1107
+ if (parsedInput.length < 64 - maxMissingChars) {
1108
+ if (!address.isSpecial()) {
1109
+ throw new ParsingError(
1110
+ `Hex string is too short, must be ${64 - maxMissingChars} to 64 chars long, excluding the leading 0x. You may need to fix
1111
+ the addresss by padding it with 0s before passing it to \`fromString\` (e.g. <addressString>.padStart(64, '0')).
1112
+ Received ${input}`,
1113
+ "too_short" /* TOO_SHORT */
1114
+ );
1115
+ }
1116
+ }
1117
+ return address;
1118
+ }
1119
+ /**
1120
+ * Convenience method for creating an AccountAddress from various input types.
1121
+ * This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding
1122
+ * AccountAddress.
1123
+ *
1124
+ * @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,
1125
+ * or an existing AccountAddress.
1126
+ * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.
1127
+ * @group Implementation
1128
+ * @category Serialization
1129
+ */
1130
+ static from(input, { maxMissingChars = 4 } = {}) {
1131
+ if (typeof input === "string") {
1132
+ return _AccountAddress.fromString(input, { maxMissingChars });
1133
+ }
1134
+ if (input instanceof Uint8Array) {
1135
+ return new _AccountAddress(input);
1136
+ }
1137
+ return input;
1138
+ }
1139
+ /**
1140
+ * Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.
1141
+ *
1142
+ * @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.
1143
+ * @group Implementation
1144
+ * @category Serialization
1145
+ */
1146
+ static fromStrict(input) {
1147
+ if (typeof input === "string") {
1148
+ return _AccountAddress.fromStringStrict(input);
1149
+ }
1150
+ if (input instanceof Uint8Array) {
1151
+ return new _AccountAddress(input);
1152
+ }
1153
+ return input;
1154
+ }
1155
+ // ===
1156
+ // Methods for checking validity.
1157
+ // ===
1158
+ /**
1159
+ * Check if the provided input is a valid AccountAddress.
1160
+ *
1161
+ * @param args - The arguments for validation.
1162
+ * @param args.input - A hex string representing an account address.
1163
+ * @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.
1164
+ *
1165
+ * @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.
1166
+ * If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.
1167
+ * @group Implementation
1168
+ * @category Serialization
1169
+ */
1170
+ static isValid(args) {
1171
+ try {
1172
+ if (args.strict) {
1173
+ _AccountAddress.fromStrict(args.input);
1174
+ } else {
1175
+ _AccountAddress.from(args.input);
1176
+ }
1177
+ return { valid: true };
1178
+ } catch (error) {
1179
+ return {
1180
+ valid: false,
1181
+ invalidReason: _optionalChain([error, 'optionalAccess', _5 => _5.invalidReason]),
1182
+ invalidReasonMessage: _optionalChain([error, 'optionalAccess', _6 => _6.message])
1183
+ };
1184
+ }
1185
+ }
1186
+ /**
1187
+ * Determine if two AccountAddresses are equal based on their underlying byte data.
1188
+ *
1189
+ * @param other - The AccountAddress to compare to.
1190
+ * @returns true if the AccountAddresses are equal, false if not.
1191
+ * @group Implementation
1192
+ * @category Serialization
1193
+ */
1194
+ equals(other) {
1195
+ if (this.data.length !== other.data.length) return false;
1196
+ return this.data.every((value, index) => value === other.data[index]);
1197
+ }
1198
+ };
1199
+ /**
1200
+ * The number of bytes that make up an account address.
1201
+ * @group Implementation
1202
+ * @category Serialization
1203
+ */
1204
+ _AccountAddress.LENGTH = 32;
1205
+ /**
1206
+ * The length of an address string in LONG form without a leading 0x.
1207
+ * @group Implementation
1208
+ * @category Serialization
1209
+ */
1210
+ _AccountAddress.LONG_STRING_LENGTH = 64;
1211
+ _AccountAddress.ZERO = _AccountAddress.from("0x0");
1212
+ _AccountAddress.ONE = _AccountAddress.from("0x1");
1213
+ _AccountAddress.TWO = _AccountAddress.from("0x2");
1214
+ _AccountAddress.THREE = _AccountAddress.from("0x3");
1215
+ _AccountAddress.FOUR = _AccountAddress.from("0x4");
1216
+ _AccountAddress.A = _AccountAddress.from("0xA");
1217
+ var AccountAddress = _AccountAddress;
1218
+
1219
+ // src/core/account/utils/address.ts
1220
+ var _sha3 = require('@noble/hashes/sha3');
1221
+ var createObjectAddress = (creatorAddress, seed) => {
1222
+ const creatorBytes = creatorAddress.bcsToBytes();
1223
+ const seedBytes = typeof seed === "string" ? Buffer.from(seed, "utf8") : seed;
1224
+ const bytes = new Uint8Array([...creatorBytes, ...seedBytes, 254 /* DeriveObjectAddressFromSeed */]);
1225
+ return new AccountAddress(_sha3.sha3_256.call(void 0, bytes));
1226
+ };
1227
+ var createResourceAddress = (creatorAddress, seed) => {
1228
+ const creatorBytes = creatorAddress.bcsToBytes();
1229
+ const seedBytes = typeof seed === "string" ? Buffer.from(seed, "utf8") : seed;
1230
+ const bytes = new Uint8Array([...creatorBytes, ...seedBytes, 255 /* DeriveResourceAccountAddress */]);
1231
+ return new AccountAddress(_sha3.sha3_256.call(void 0, bytes));
1232
+ };
1233
+ var createTokenAddress = (creatorAddress, collectionName, tokenName) => {
1234
+ const seed = `${collectionName}::${tokenName}`;
1235
+ return createObjectAddress(creatorAddress, seed);
1236
+ };
1237
+
1238
+ // src/utils/helpers.ts
1239
+ var _jsbase64 = require('js-base64');
1240
+ async function sleep(timeMs) {
1241
+ return new Promise((resolve) => {
1242
+ setTimeout(resolve, timeMs);
1243
+ });
1244
+ }
1245
+ function getErrorMessage(error) {
1246
+ return error instanceof Error ? error.message : String(error);
1247
+ }
1248
+ var nowInSeconds = () => Math.floor(Date.now() / 1e3);
1249
+ function floorToWholeHour(timestampInSeconds) {
1250
+ const date = new Date(timestampInSeconds * 1e3);
1251
+ date.setMinutes(0);
1252
+ date.setSeconds(0);
1253
+ date.setMilliseconds(0);
1254
+ return Math.floor(date.getTime() / 1e3);
1255
+ }
1256
+ function base64UrlDecode(base64Url) {
1257
+ const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
1258
+ const paddedBase64 = base64 + "==".substring(0, (3 - base64.length % 3) % 3);
1259
+ const decodedString = _jsbase64.decode.call(void 0, paddedBase64);
1260
+ return decodedString;
1261
+ }
1262
+ function base64UrlToBytes(base64Url) {
1263
+ let base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
1264
+ while (base64.length % 4 !== 0) {
1265
+ base64 += "=";
1266
+ }
1267
+ return new Uint8Array(Buffer.from(base64, "base64"));
1268
+ }
1269
+ var convertAmountFromHumanReadableToOnChain = (value, decimal) => value * 10 ** decimal;
1270
+ var convertAmountFromOnChainToHumanReadable = (value, decimal) => value / 10 ** decimal;
1271
+ var hexToAscii = (hex) => {
1272
+ let str = "";
1273
+ for (let n = 2; n < hex.length; n += 2) {
1274
+ str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));
1275
+ }
1276
+ return str;
1277
+ };
1278
+ var parseEncodedStruct = (structObj) => {
1279
+ const { account_address, module_name, struct_name } = structObj;
1280
+ const moduleName = hexToAscii(module_name);
1281
+ const structName = hexToAscii(struct_name);
1282
+ return `${account_address}::${moduleName}::${structName}`;
1283
+ };
1284
+ var isEncodedStruct = (structObj) => typeof structObj === "object" && !Array.isArray(structObj) && structObj !== null && "account_address" in structObj && "module_name" in structObj && "struct_name" in structObj && typeof structObj.account_address === "string" && typeof structObj.module_name === "string" && typeof structObj.struct_name === "string";
1285
+ function getFunctionParts(functionArg) {
1286
+ const funcNameParts = functionArg.split("::");
1287
+ if (funcNameParts.length !== 3) {
1288
+ throw new Error(`Invalid function ${functionArg}`);
1289
+ }
1290
+ const moduleAddress = funcNameParts[0];
1291
+ const moduleName = funcNameParts[1];
1292
+ const functionName = funcNameParts[2];
1293
+ return { moduleAddress, moduleName, functionName };
1294
+ }
1295
+ function isValidFunctionInfo(functionInfo) {
1296
+ const parts = functionInfo.split("::");
1297
+ return parts.length === 3 && AccountAddress.isValid({ input: parts[0] }).valid;
1298
+ }
1299
+ function truncateAddress(address, start = 6, end = 5) {
1300
+ return `${address.slice(0, start)}...${address.slice(-end)}`;
1301
+ }
1302
+ var APTOS_COIN_TYPE_STR = "0x1::aptos_coin::AptosCoin";
1303
+ var APT_METADATA_ADDRESS_HEX = AccountAddress.A.toStringLong();
1304
+ function standardizeMoveTypeString(input) {
1305
+ const addressRegex = /0x[0-9a-fA-F]+/g;
1306
+ return input.replace(addressRegex, (match) => {
1307
+ return AccountAddress.from(match, { maxMissingChars: 63 }).toStringShort();
1308
+ });
1309
+ }
1310
+ function pairedFaMetadataAddress(coinType) {
1311
+ const standardizedMoveTypeName = standardizeMoveTypeString(coinType);
1312
+ return standardizedMoveTypeName === APTOS_COIN_TYPE_STR ? AccountAddress.A : createObjectAddress(AccountAddress.A, standardizedMoveTypeName);
1313
+ }
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+ exports.__decorateClass = __decorateClass; exports.MAX_U8_NUMBER = MAX_U8_NUMBER; exports.MAX_U16_NUMBER = MAX_U16_NUMBER; exports.MAX_U32_NUMBER = MAX_U32_NUMBER; exports.MAX_U64_BIG_INT = MAX_U64_BIG_INT; exports.MAX_U128_BIG_INT = MAX_U128_BIG_INT; exports.MAX_U256_BIG_INT = MAX_U256_BIG_INT; exports.ParsingError = ParsingError; exports.HexInvalidReason = HexInvalidReason; exports.Hex = Hex; exports.hexToAsciiString = hexToAsciiString; exports.Serializable = Serializable; exports.Serializer = Serializer; exports.ensureBoolean = ensureBoolean; exports.outOfRangeErrorMessage = outOfRangeErrorMessage; exports.validateNumberInRange = validateNumberInRange; exports.MimeType = MimeType; exports.TypeTagVariants = TypeTagVariants; exports.ScriptTransactionArgumentVariants = ScriptTransactionArgumentVariants; exports.TransactionPayloadVariants = TransactionPayloadVariants; exports.TransactionInnerPayloadVariants = TransactionInnerPayloadVariants; exports.TransactionExecutableVariants = TransactionExecutableVariants; exports.TransactionExtraConfigVariants = TransactionExtraConfigVariants; exports.TransactionVariants = TransactionVariants; exports.TransactionAuthenticatorVariant = TransactionAuthenticatorVariant; exports.AccountAuthenticatorVariant = AccountAuthenticatorVariant; exports.PrivateKeyVariants = PrivateKeyVariants; exports.AnyPublicKeyVariant = AnyPublicKeyVariant; exports.anyPublicKeyVariantToString = anyPublicKeyVariantToString; exports.AnySignatureVariant = AnySignatureVariant; exports.EphemeralPublicKeyVariant = EphemeralPublicKeyVariant; exports.EphemeralSignatureVariant = EphemeralSignatureVariant; exports.EphemeralCertificateVariant = EphemeralCertificateVariant; exports.ZkpVariant = ZkpVariant; exports.TransactionResponseType = TransactionResponseType; exports.isPendingTransactionResponse = isPendingTransactionResponse; exports.isUserTransactionResponse = isUserTransactionResponse; exports.isGenesisTransactionResponse = isGenesisTransactionResponse; exports.isBlockMetadataTransactionResponse = isBlockMetadataTransactionResponse; exports.isStateCheckpointTransactionResponse = isStateCheckpointTransactionResponse; exports.isValidatorTransactionResponse = isValidatorTransactionResponse; exports.isBlockEpilogueTransactionResponse = isBlockEpilogueTransactionResponse; exports.isEd25519Signature = isEd25519Signature; exports.isSecp256k1Signature = isSecp256k1Signature; exports.isMultiAgentSignature = isMultiAgentSignature; exports.isFeePayerSignature = isFeePayerSignature; exports.isMultiEd25519Signature = isMultiEd25519Signature; exports.isSingleSenderSignature = isSingleSenderSignature; exports.MoveFunctionVisibility = MoveFunctionVisibility; exports.MoveAbility = MoveAbility; exports.RoleType = RoleType; exports.SigningScheme = SigningScheme; exports.SigningSchemeInput = SigningSchemeInput; exports.DeriveScheme = DeriveScheme; exports.AddressInvalidReason = AddressInvalidReason; exports.AccountAddress = AccountAddress; exports.createObjectAddress = createObjectAddress; exports.createResourceAddress = createResourceAddress; exports.createTokenAddress = createTokenAddress; exports.sleep = sleep; exports.getErrorMessage = getErrorMessage; exports.nowInSeconds = nowInSeconds; exports.floorToWholeHour = floorToWholeHour; exports.base64UrlDecode = base64UrlDecode; exports.base64UrlToBytes = base64UrlToBytes; exports.convertAmountFromHumanReadableToOnChain = convertAmountFromHumanReadableToOnChain; exports.convertAmountFromOnChainToHumanReadable = convertAmountFromOnChainToHumanReadable; exports.parseEncodedStruct = parseEncodedStruct; exports.isEncodedStruct = isEncodedStruct; exports.getFunctionParts = getFunctionParts; exports.isValidFunctionInfo = isValidFunctionInfo; exports.truncateAddress = truncateAddress; exports.pairedFaMetadataAddress = pairedFaMetadataAddress;
1390
+ //# sourceMappingURL=chunk-MU4IJVW5.js.map