@aptos-labs/ts-sdk 5.1.1-side-effect-free.1 → 5.1.2

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 (420) hide show
  1. package/README.md +4 -4
  2. package/dist/common/{account-Dr4y1uZG.d.ts → account-147vfOGb.d.ts} +1 -0
  3. package/dist/common/chunk-347THBDE.js +4 -0
  4. package/dist/common/chunk-347THBDE.js.map +1 -0
  5. package/dist/common/cli/index.d.ts +3 -1
  6. package/dist/common/cli/index.js +1 -1
  7. package/dist/common/cli/index.js.map +1 -1
  8. package/dist/common/index.d.ts +15 -82
  9. package/dist/common/index.js +34 -34
  10. package/dist/common/index.js.map +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  12. package/dist/esm/account/AbstractKeylessAccount.mjs.map +1 -1
  13. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  14. package/dist/esm/account/AbstractedAccount.mjs.map +1 -1
  15. package/dist/esm/account/Account.mjs +1 -1
  16. package/dist/esm/account/Account.mjs.map +1 -1
  17. package/dist/esm/account/AccountUtils.mjs +1 -1
  18. package/dist/esm/account/AccountUtils.mjs.map +1 -1
  19. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  20. package/dist/esm/account/DerivableAbstractedAccount.mjs.map +1 -1
  21. package/dist/esm/account/Ed25519Account.mjs +1 -1
  22. package/dist/esm/account/Ed25519Account.mjs.map +1 -1
  23. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  24. package/dist/esm/account/EphemeralKeyPair.mjs.map +1 -1
  25. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  26. package/dist/esm/account/FederatedKeylessAccount.mjs.map +1 -1
  27. package/dist/esm/account/KeylessAccount.mjs +1 -1
  28. package/dist/esm/account/KeylessAccount.mjs.map +1 -1
  29. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  30. package/dist/esm/account/MultiEd25519Account.mjs.map +1 -1
  31. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  32. package/dist/esm/account/MultiKeyAccount.mjs.map +1 -1
  33. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  34. package/dist/esm/account/SingleKeyAccount.mjs.map +1 -1
  35. package/dist/esm/account/index.mjs +1 -1
  36. package/dist/esm/account/index.mjs.map +1 -1
  37. package/dist/esm/account/utils.mjs +1 -1
  38. package/dist/esm/account/utils.mjs.map +1 -1
  39. package/dist/esm/api/account/abstraction.mjs +1 -1
  40. package/dist/esm/api/account/abstraction.mjs.map +1 -1
  41. package/dist/esm/api/account.d.mts +1 -1
  42. package/dist/esm/api/account.mjs +1 -1
  43. package/dist/esm/api/account.mjs.map +1 -1
  44. package/dist/esm/api/ans.mjs +1 -1
  45. package/dist/esm/api/ans.mjs.map +1 -1
  46. package/dist/esm/api/aptos.d.mts +14 -81
  47. package/dist/esm/api/aptos.mjs +1 -1
  48. package/dist/esm/api/aptos.mjs.map +1 -1
  49. package/dist/esm/api/aptosConfig.mjs +1 -1
  50. package/dist/esm/api/aptosConfig.mjs.map +1 -1
  51. package/dist/esm/api/coin.mjs +1 -1
  52. package/dist/esm/api/coin.mjs.map +1 -1
  53. package/dist/esm/api/digitalAsset.mjs +1 -1
  54. package/dist/esm/api/digitalAsset.mjs.map +1 -1
  55. package/dist/esm/api/faucet.mjs +1 -1
  56. package/dist/esm/api/faucet.mjs.map +1 -1
  57. package/dist/esm/api/fungibleAsset.mjs +1 -1
  58. package/dist/esm/api/fungibleAsset.mjs.map +1 -1
  59. package/dist/esm/api/general.mjs +1 -1
  60. package/dist/esm/api/general.mjs.map +1 -1
  61. package/dist/esm/api/index.d.mts +2 -2
  62. package/dist/esm/api/index.mjs +1 -1
  63. package/dist/esm/api/index.mjs.map +1 -1
  64. package/dist/esm/api/keyless.mjs +1 -1
  65. package/dist/esm/api/keyless.mjs.map +1 -1
  66. package/dist/esm/api/object.mjs +1 -1
  67. package/dist/esm/api/object.mjs.map +1 -1
  68. package/dist/esm/api/staking.mjs +1 -1
  69. package/dist/esm/api/staking.mjs.map +1 -1
  70. package/dist/esm/api/table.mjs +1 -1
  71. package/dist/esm/api/table.mjs.map +1 -1
  72. package/dist/esm/api/transaction.mjs +1 -1
  73. package/dist/esm/api/transaction.mjs.map +1 -1
  74. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  75. package/dist/esm/api/transactionSubmission/build.mjs.map +1 -1
  76. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
  77. package/dist/esm/api/transactionSubmission/helpers.mjs.map +1 -1
  78. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  79. package/dist/esm/api/transactionSubmission/management.mjs.map +1 -1
  80. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  81. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  82. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  83. package/dist/esm/api/transactionSubmission/simulate.mjs.map +1 -1
  84. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  85. package/dist/esm/api/transactionSubmission/submit.mjs.map +1 -1
  86. package/dist/esm/api/utils.mjs +1 -1
  87. package/dist/esm/api/utils.mjs.map +1 -1
  88. package/dist/esm/bcs/consts.mjs +1 -1
  89. package/dist/esm/bcs/consts.mjs.map +1 -1
  90. package/dist/esm/bcs/deserializer.mjs +1 -1
  91. package/dist/esm/bcs/deserializer.mjs.map +1 -1
  92. package/dist/esm/bcs/index.mjs +1 -1
  93. package/dist/esm/bcs/index.mjs.map +1 -1
  94. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  95. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -1
  96. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  97. package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -1
  98. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  99. package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -1
  100. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  101. package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -1
  102. package/dist/esm/bcs/serializer.mjs +1 -1
  103. package/dist/esm/bcs/serializer.mjs.map +1 -1
  104. package/dist/esm/chunk-2OPKZKOB.mjs +2 -0
  105. package/dist/esm/chunk-2OPKZKOB.mjs.map +1 -0
  106. package/dist/esm/chunk-2PASUPUO.mjs +2 -0
  107. package/dist/esm/chunk-2PASUPUO.mjs.map +1 -0
  108. package/dist/esm/chunk-35DKMW7Q.mjs +2 -0
  109. package/dist/esm/chunk-35DKMW7Q.mjs.map +1 -0
  110. package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
  111. package/dist/esm/chunk-4QMXOWHP.mjs.map +1 -0
  112. package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
  113. package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
  114. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  115. package/dist/esm/chunk-56CNRT2K.mjs.map +1 -0
  116. package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
  117. package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
  118. package/dist/esm/chunk-626KB2UQ.mjs +2 -0
  119. package/dist/esm/chunk-626KB2UQ.mjs.map +1 -0
  120. package/dist/esm/chunk-7ECCT6PK.mjs +1 -0
  121. package/dist/esm/chunk-7ECCT6PK.mjs.map +1 -0
  122. package/dist/esm/chunk-A5L76YP7.mjs +2 -0
  123. package/dist/esm/chunk-A5L76YP7.mjs.map +1 -0
  124. package/dist/esm/chunk-AQW4BUKF.mjs +2 -0
  125. package/dist/esm/chunk-AQW4BUKF.mjs.map +1 -0
  126. package/dist/esm/chunk-C3Q23D22.mjs +2 -0
  127. package/dist/esm/chunk-C3Q23D22.mjs.map +1 -0
  128. package/dist/esm/chunk-CW35YAMN.mjs +2 -0
  129. package/dist/esm/chunk-CW35YAMN.mjs.map +1 -0
  130. package/dist/esm/chunk-E2U27PNC.mjs +2 -0
  131. package/dist/esm/chunk-E2U27PNC.mjs.map +1 -0
  132. package/dist/esm/chunk-EBMEXURY.mjs +2 -0
  133. package/dist/esm/chunk-EBMEXURY.mjs.map +1 -0
  134. package/dist/esm/chunk-FC72YL4B.mjs +2 -0
  135. package/dist/esm/chunk-FC72YL4B.mjs.map +1 -0
  136. package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
  137. package/dist/esm/chunk-FD6FGKYY.mjs.map +1 -0
  138. package/dist/esm/chunk-FGFLPH5K.mjs +2 -0
  139. package/dist/esm/chunk-FGFLPH5K.mjs.map +1 -0
  140. package/dist/esm/chunk-FLZPUYXQ.mjs +2 -0
  141. package/dist/esm/chunk-FLZPUYXQ.mjs.map +1 -0
  142. package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
  143. package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
  144. package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
  145. package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
  146. package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
  147. package/dist/esm/chunk-GOXRBEIJ.mjs.map +1 -0
  148. package/dist/esm/chunk-GQ3UIDPQ.mjs +2 -0
  149. package/dist/esm/chunk-GQ3UIDPQ.mjs.map +1 -0
  150. package/dist/esm/chunk-H3EP5CGP.mjs +2 -0
  151. package/dist/esm/chunk-H3EP5CGP.mjs.map +1 -0
  152. package/dist/esm/chunk-HGLO5LDS.mjs +1 -0
  153. package/dist/esm/chunk-HGLO5LDS.mjs.map +1 -0
  154. package/dist/esm/chunk-IF4UU2MT.mjs +2 -0
  155. package/dist/esm/chunk-IF4UU2MT.mjs.map +1 -0
  156. package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
  157. package/dist/esm/chunk-KDMSOCZY.mjs.map +1 -0
  158. package/dist/esm/chunk-LA56UDUK.mjs +2 -0
  159. package/dist/esm/chunk-LA56UDUK.mjs.map +1 -0
  160. package/dist/esm/chunk-LAPXUUHK.mjs +2 -0
  161. package/dist/esm/chunk-LAPXUUHK.mjs.map +1 -0
  162. package/dist/esm/chunk-MCFQE4GC.mjs +2 -0
  163. package/dist/esm/chunk-MCFQE4GC.mjs.map +1 -0
  164. package/dist/esm/chunk-MT2RJ7H3.mjs +2 -0
  165. package/dist/esm/chunk-MT2RJ7H3.mjs.map +1 -0
  166. package/dist/esm/chunk-N6YTF76Q.mjs +2 -0
  167. package/dist/esm/chunk-N6YTF76Q.mjs.map +1 -0
  168. package/dist/esm/chunk-NCKJ7X57.mjs +2 -0
  169. package/dist/esm/chunk-NCKJ7X57.mjs.map +1 -0
  170. package/dist/esm/chunk-NECL5FCQ.mjs +1 -0
  171. package/dist/esm/chunk-NECL5FCQ.mjs.map +1 -0
  172. package/dist/esm/chunk-OLILO7VD.mjs +2 -0
  173. package/dist/esm/chunk-OLILO7VD.mjs.map +1 -0
  174. package/dist/esm/chunk-ORMOQWWH.mjs +2 -0
  175. package/dist/esm/chunk-ORMOQWWH.mjs.map +1 -0
  176. package/dist/esm/chunk-P5HCJN3A.mjs +2 -0
  177. package/dist/esm/chunk-P5HCJN3A.mjs.map +1 -0
  178. package/dist/esm/chunk-PJTG745G.mjs +4 -0
  179. package/dist/esm/chunk-PJTG745G.mjs.map +1 -0
  180. package/dist/esm/chunk-PSSIJHHC.mjs +2 -0
  181. package/dist/esm/chunk-PSSIJHHC.mjs.map +1 -0
  182. package/dist/esm/chunk-Q4W3WJ2U.mjs +2 -0
  183. package/dist/esm/chunk-Q4W3WJ2U.mjs.map +1 -0
  184. package/dist/esm/chunk-QNARIAVM.mjs +2 -0
  185. package/dist/esm/chunk-QNARIAVM.mjs.map +1 -0
  186. package/dist/esm/chunk-QREVMGQZ.mjs +2 -0
  187. package/dist/esm/chunk-QREVMGQZ.mjs.map +1 -0
  188. package/dist/esm/chunk-R7FWJP3N.mjs +2 -0
  189. package/dist/esm/chunk-R7FWJP3N.mjs.map +1 -0
  190. package/dist/esm/chunk-RGKRCZ36.mjs +4 -0
  191. package/dist/esm/chunk-RGKRCZ36.mjs.map +1 -0
  192. package/dist/esm/chunk-RQX6JOEN.mjs +2 -0
  193. package/dist/esm/chunk-RQX6JOEN.mjs.map +1 -0
  194. package/dist/esm/chunk-STY74NUA.mjs +2 -0
  195. package/dist/esm/chunk-STY74NUA.mjs.map +1 -0
  196. package/dist/esm/chunk-TOBQ5UE6.mjs +2 -0
  197. package/dist/esm/chunk-TOBQ5UE6.mjs.map +1 -0
  198. package/dist/esm/chunk-UL777LTI.mjs +494 -0
  199. package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
  200. package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
  201. package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
  202. package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
  203. package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
  204. package/dist/esm/chunk-V74WPKSY.mjs +2 -0
  205. package/dist/esm/chunk-V74WPKSY.mjs.map +1 -0
  206. package/dist/esm/chunk-WCMW2L3P.mjs +2 -0
  207. package/dist/esm/chunk-WCMW2L3P.mjs.map +1 -0
  208. package/dist/esm/chunk-WSR5EBJM.mjs +2 -0
  209. package/dist/esm/chunk-WSR5EBJM.mjs.map +1 -0
  210. package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
  211. package/dist/esm/chunk-XJJVJOX5.mjs.map +1 -0
  212. package/dist/esm/chunk-XKUIMGKU.mjs +2 -0
  213. package/dist/esm/chunk-XKUIMGKU.mjs.map +1 -0
  214. package/dist/esm/chunk-YOZBVVKL.mjs +2 -0
  215. package/dist/esm/chunk-YOZBVVKL.mjs.map +1 -0
  216. package/dist/esm/chunk-YS5IUILF.mjs +2 -0
  217. package/dist/esm/chunk-YS5IUILF.mjs.map +1 -0
  218. package/dist/esm/chunk-YZHAI55C.mjs +7 -0
  219. package/dist/esm/chunk-YZHAI55C.mjs.map +1 -0
  220. package/dist/esm/chunk-ZP4DWSQA.mjs +2 -0
  221. package/dist/esm/chunk-ZP4DWSQA.mjs.map +1 -0
  222. package/dist/esm/chunk-ZYE7UTJZ.mjs +2 -0
  223. package/dist/esm/chunk-ZYE7UTJZ.mjs.map +1 -0
  224. package/dist/esm/cli/index.mjs +1 -1
  225. package/dist/esm/cli/index.mjs.map +1 -1
  226. package/dist/esm/cli/localNode.d.mts +2 -0
  227. package/dist/esm/cli/localNode.mjs +1 -1
  228. package/dist/esm/cli/localNode.mjs.map +1 -1
  229. package/dist/esm/cli/move.mjs +1 -1
  230. package/dist/esm/cli/move.mjs.map +1 -1
  231. package/dist/esm/client/core.mjs +1 -1
  232. package/dist/esm/client/core.mjs.map +1 -1
  233. package/dist/esm/client/get.mjs +1 -1
  234. package/dist/esm/client/get.mjs.map +1 -1
  235. package/dist/esm/client/index.mjs +1 -1
  236. package/dist/esm/client/index.mjs.map +1 -1
  237. package/dist/esm/client/post.mjs +1 -1
  238. package/dist/esm/client/post.mjs.map +1 -1
  239. package/dist/esm/core/account/index.mjs +1 -1
  240. package/dist/esm/core/account/index.mjs.map +1 -1
  241. package/dist/esm/core/account/utils/address.mjs +1 -1
  242. package/dist/esm/core/account/utils/address.mjs.map +1 -1
  243. package/dist/esm/core/account/utils/index.mjs +1 -1
  244. package/dist/esm/core/account/utils/index.mjs.map +1 -1
  245. package/dist/esm/core/accountAddress.mjs +1 -3
  246. package/dist/esm/core/accountAddress.mjs.map +1 -1
  247. package/dist/esm/core/authenticationKey.mjs +1 -1
  248. package/dist/esm/core/authenticationKey.mjs.map +1 -1
  249. package/dist/esm/core/common.mjs +1 -1
  250. package/dist/esm/core/common.mjs.map +1 -1
  251. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  252. package/dist/esm/core/crypto/abstraction.mjs.map +1 -1
  253. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  254. package/dist/esm/core/crypto/deserializationUtils.mjs.map +1 -1
  255. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  256. package/dist/esm/core/crypto/ed25519.mjs.map +1 -1
  257. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  258. package/dist/esm/core/crypto/ephemeral.mjs.map +1 -1
  259. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  260. package/dist/esm/core/crypto/federatedKeyless.mjs.map +1 -1
  261. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  262. package/dist/esm/core/crypto/hdKey.mjs.map +1 -1
  263. package/dist/esm/core/crypto/index.mjs +1 -1
  264. package/dist/esm/core/crypto/index.mjs.map +1 -1
  265. package/dist/esm/core/crypto/keyless.mjs +1 -1
  266. package/dist/esm/core/crypto/keyless.mjs.map +1 -1
  267. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  268. package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -1
  269. package/dist/esm/core/crypto/multiKey.mjs +1 -3
  270. package/dist/esm/core/crypto/multiKey.mjs.map +1 -1
  271. package/dist/esm/core/crypto/poseidon.mjs +1 -1
  272. package/dist/esm/core/crypto/poseidon.mjs.map +1 -1
  273. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  274. package/dist/esm/core/crypto/privateKey.mjs.map +1 -1
  275. package/dist/esm/core/crypto/proof.mjs +1 -1
  276. package/dist/esm/core/crypto/proof.mjs.map +1 -1
  277. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  278. package/dist/esm/core/crypto/publicKey.mjs.map +1 -1
  279. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  280. package/dist/esm/core/crypto/secp256k1.mjs.map +1 -1
  281. package/dist/esm/core/crypto/secp256r1.mjs +1 -1
  282. package/dist/esm/core/crypto/secp256r1.mjs.map +1 -1
  283. package/dist/esm/core/crypto/signature.mjs +1 -1
  284. package/dist/esm/core/crypto/signature.mjs.map +1 -1
  285. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  286. package/dist/esm/core/crypto/singleKey.mjs.map +1 -1
  287. package/dist/esm/core/crypto/types.mjs +1 -0
  288. package/dist/esm/core/crypto/utils.mjs +1 -1
  289. package/dist/esm/core/crypto/utils.mjs.map +1 -1
  290. package/dist/esm/core/hex.mjs +1 -1
  291. package/dist/esm/core/hex.mjs.map +1 -1
  292. package/dist/esm/core/index.mjs +1 -1
  293. package/dist/esm/core/index.mjs.map +1 -1
  294. package/dist/esm/errors/index.mjs +1 -6
  295. package/dist/esm/errors/index.mjs.map +1 -1
  296. package/dist/esm/index.d.mts +1 -1
  297. package/dist/esm/index.mjs +1 -1
  298. package/dist/esm/index.mjs.map +1 -1
  299. package/dist/esm/internal/abstraction.mjs +1 -1
  300. package/dist/esm/internal/abstraction.mjs.map +1 -1
  301. package/dist/esm/internal/account.mjs +1 -1
  302. package/dist/esm/internal/account.mjs.map +1 -1
  303. package/dist/esm/internal/ans.mjs +1 -1
  304. package/dist/esm/internal/ans.mjs.map +1 -1
  305. package/dist/esm/internal/coin.mjs +1 -1
  306. package/dist/esm/internal/coin.mjs.map +1 -1
  307. package/dist/esm/internal/digitalAsset.mjs +1 -1
  308. package/dist/esm/internal/digitalAsset.mjs.map +1 -1
  309. package/dist/esm/internal/faucet.mjs +1 -1
  310. package/dist/esm/internal/faucet.mjs.map +1 -1
  311. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  312. package/dist/esm/internal/fungibleAsset.mjs.map +1 -1
  313. package/dist/esm/internal/general.mjs +1 -1
  314. package/dist/esm/internal/general.mjs.map +1 -1
  315. package/dist/esm/internal/keyless.mjs +1 -1
  316. package/dist/esm/internal/keyless.mjs.map +1 -1
  317. package/dist/esm/internal/object.mjs +1 -1
  318. package/dist/esm/internal/object.mjs.map +1 -1
  319. package/dist/esm/internal/staking.mjs +1 -1
  320. package/dist/esm/internal/staking.mjs.map +1 -1
  321. package/dist/esm/internal/table.mjs +1 -1
  322. package/dist/esm/internal/table.mjs.map +1 -1
  323. package/dist/esm/internal/transaction.mjs +1 -1
  324. package/dist/esm/internal/transaction.mjs.map +1 -1
  325. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  326. package/dist/esm/internal/transactionSubmission.mjs.map +1 -1
  327. package/dist/esm/internal/utils/index.mjs +1 -1
  328. package/dist/esm/internal/utils/index.mjs.map +1 -1
  329. package/dist/esm/internal/utils/utils.mjs +1 -1
  330. package/dist/esm/internal/utils/utils.mjs.map +1 -1
  331. package/dist/esm/internal/view.mjs +1 -1
  332. package/dist/esm/internal/view.mjs.map +1 -1
  333. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  334. package/dist/esm/transactions/authenticator/account.mjs.map +1 -1
  335. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  336. package/dist/esm/transactions/authenticator/index.mjs.map +1 -1
  337. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  338. package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -1
  339. package/dist/esm/transactions/index.mjs +1 -1
  340. package/dist/esm/transactions/index.mjs.map +1 -1
  341. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  342. package/dist/esm/transactions/instances/chainId.mjs.map +1 -1
  343. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  344. package/dist/esm/transactions/instances/identifier.mjs.map +1 -1
  345. package/dist/esm/transactions/instances/index.mjs +1 -1
  346. package/dist/esm/transactions/instances/index.mjs.map +1 -1
  347. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  348. package/dist/esm/transactions/instances/moduleId.mjs.map +1 -1
  349. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  350. package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -1
  351. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  352. package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -1
  353. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  354. package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -1
  355. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  356. package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -1
  357. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  358. package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -1
  359. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -0
  360. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  361. package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -1
  362. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  363. package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +1 -1
  364. package/dist/esm/transactions/management/asyncQueue.mjs +1 -1
  365. package/dist/esm/transactions/management/asyncQueue.mjs.map +1 -1
  366. package/dist/esm/transactions/management/index.mjs +1 -1
  367. package/dist/esm/transactions/management/index.mjs.map +1 -1
  368. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  369. package/dist/esm/transactions/management/transactionWorker.mjs.map +1 -1
  370. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  371. package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -1
  372. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  373. package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -1
  374. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  375. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -1
  376. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  377. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -1
  378. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  379. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  380. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -1
  381. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  382. package/dist/esm/transactions/typeTag/index.mjs.map +1 -1
  383. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  384. package/dist/esm/transactions/typeTag/parser.mjs.map +1 -1
  385. package/dist/esm/transactions/types.mjs +1 -0
  386. package/dist/esm/types/abstraction.mjs +1 -1
  387. package/dist/esm/types/abstraction.mjs.map +1 -1
  388. package/dist/esm/types/generated/queries.mjs +1 -493
  389. package/dist/esm/types/generated/queries.mjs.map +1 -1
  390. package/dist/esm/types/generated/types.mjs +1 -1
  391. package/dist/esm/types/generated/types.mjs.map +1 -1
  392. package/dist/esm/types/index.mjs +1 -1
  393. package/dist/esm/types/index.mjs.map +1 -1
  394. package/dist/esm/types/indexer.mjs +1 -0
  395. package/dist/esm/types/types.mjs +1 -1
  396. package/dist/esm/types/types.mjs.map +1 -1
  397. package/dist/esm/utils/apiEndpoints.d.mts +1 -0
  398. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  399. package/dist/esm/utils/apiEndpoints.mjs.map +1 -1
  400. package/dist/esm/utils/const.mjs +1 -1
  401. package/dist/esm/utils/const.mjs.map +1 -1
  402. package/dist/esm/utils/helpers.mjs +1 -1
  403. package/dist/esm/utils/helpers.mjs.map +1 -1
  404. package/dist/esm/utils/index.mjs +1 -1
  405. package/dist/esm/utils/index.mjs.map +1 -1
  406. package/dist/esm/utils/memoize.mjs +1 -1
  407. package/dist/esm/utils/memoize.mjs.map +1 -1
  408. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  409. package/dist/esm/utils/normalizeBundle.mjs.map +1 -1
  410. package/dist/esm/version.d.mts +1 -1
  411. package/dist/esm/version.mjs +1 -1
  412. package/dist/esm/version.mjs.map +1 -1
  413. package/package.json +1 -22
  414. package/src/api/aptos.ts +51 -193
  415. package/src/cli/localNode.ts +13 -2
  416. package/src/internal/ans.ts +1 -0
  417. package/src/utils/apiEndpoints.ts +9 -2
  418. package/src/version.ts +1 -1
  419. package/dist/common/chunk-AWFAHZSB.js +0 -4
  420. package/dist/common/chunk-AWFAHZSB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/internal/transactionSubmission.ts"],"sourcesContent":["/**\n * This file contains the underlying implementations for exposed submission API surface in\n * the {@link api/transaction}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * transaction namespace and without having a dependency cycle error.\n * @group Implementation\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { Deserializer, MoveVector } from \"../bcs\";\nimport { postAptosFullNode } from \"../client\";\nimport { Account, AbstractKeylessAccount, isKeylessSigner } from \"../account\";\nimport { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { FederatedKeylessPublicKey, KeylessPublicKey, KeylessSignature } from \"../core/crypto\";\nimport { AccountAuthenticator } from \"../transactions/authenticator/account\";\nimport {\n buildTransaction,\n generateTransactionPayload,\n generateSignedTransactionForSimulation,\n generateSignedTransaction,\n} from \"../transactions/transactionBuilder/transactionBuilder\";\nimport {\n InputGenerateTransactionData,\n AnyRawTransaction,\n InputSimulateTransactionData,\n InputGenerateTransactionOptions,\n InputGenerateTransactionPayloadDataWithRemoteABI,\n InputSubmitTransactionData,\n InputGenerateMultiAgentRawTransactionData,\n InputGenerateSingleSignerRawTransactionData,\n AnyTransactionPayloadInstance,\n EntryFunctionABI,\n InputTransactionPluginData,\n} from \"../transactions/types\";\nimport { UserTransactionResponse, PendingTransactionResponse, MimeType, HexInput } from \"../types\";\nimport { SignedTransaction, TypeTagVector, generateSigningMessageForTransaction } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\nimport { MultiAgentTransaction } from \"../transactions/instances/multiAgentTransaction\";\n\n/**\n * We are defining function signatures, each with its specific input and output.\n * These are the possible function signature for `generateTransaction` function.\n * When we call `generateTransaction` function with the relevant type properties,\n * Typescript can infer the return type based on the appropriate function overload.\n * @group Implementation\n */\nexport async function generateTransaction(\n args: { aptosConfig: AptosConfig } & InputGenerateSingleSignerRawTransactionData,\n): Promise<SimpleTransaction>;\nexport async function generateTransaction(\n args: { aptosConfig: AptosConfig } & InputGenerateMultiAgentRawTransactionData,\n): Promise<MultiAgentTransaction>;\n/**\n * Generates any transaction by passing in the required arguments\n *\n * @param args.sender The transaction sender's account address as a AccountAddressInput\n * @param args.data EntryFunctionData | ScriptData | MultiSigData\n * @param args.feePayerAddress optional. For a fee payer (aka sponsored) transaction\n * @param args.secondarySignerAddresses optional. For a multi-agent or fee payer (aka sponsored) transactions\n * @param args.options optional. GenerateTransactionOptions type\n *\n * @example\n * For a single signer entry function\n * move function name, move function type arguments, move function arguments\n * `\n * data: {\n * function:\"0x1::aptos_account::transfer\",\n * typeArguments:[]\n * functionArguments :[receiverAddress,10]\n * }\n * `\n *\n * @example\n * For a single signer script function\n * module bytecode, move function type arguments, move function arguments\n * ```\n * data: {\n * bytecode:\"0x001234567\",\n * typeArguments:[],\n * functionArguments :[receiverAddress,10]\n * }\n * ```\n *\n * @return An instance of a RawTransaction, plus optional secondary/fee payer addresses\n * ```\n * {\n * rawTransaction: RawTransaction,\n * secondarySignerAddresses?: Array<AccountAddress>,\n * feePayerAddress?: AccountAddress\n * }\n * ```\n * @group Implementation\n */\nexport async function generateTransaction(\n args: { aptosConfig: AptosConfig } & InputGenerateTransactionData,\n): Promise<AnyRawTransaction> {\n const payload = await buildTransactionPayload(args);\n return buildRawTransaction(args, payload);\n}\n\n/**\n * Builds a transaction payload based on the provided configuration and input data.\n * This function is essential for preparing transaction data for execution on the Aptos blockchain.\n *\n * @param args - The arguments for building the transaction payload.\n * @param args.aptosConfig - Configuration settings for the Aptos network.\n * @param args.data - Input data required to generate the transaction payload, which may include bytecode, multisig address,\n * function name, function arguments, type arguments, and ABI.\n * @returns A promise that resolves to the generated transaction payload instance.\n * @group Implementation\n */\nexport async function buildTransactionPayload(\n args: { aptosConfig: AptosConfig } & InputGenerateTransactionData,\n): Promise<AnyTransactionPayloadInstance> {\n const { aptosConfig, data } = args;\n // Merge in aptosConfig for remote ABI on non-script payloads\n let generateTransactionPayloadData: InputGenerateTransactionPayloadDataWithRemoteABI;\n let payload: AnyTransactionPayloadInstance;\n\n if (\"bytecode\" in data) {\n // TODO: Add ABI checking later\n payload = await generateTransactionPayload(data);\n } else if (\"multisigAddress\" in data) {\n generateTransactionPayloadData = {\n aptosConfig,\n multisigAddress: data.multisigAddress,\n function: data.function,\n functionArguments: data.functionArguments,\n typeArguments: data.typeArguments,\n abi: data.abi,\n };\n payload = await generateTransactionPayload(generateTransactionPayloadData);\n } else {\n generateTransactionPayloadData = {\n aptosConfig,\n function: data.function,\n functionArguments: data.functionArguments,\n typeArguments: data.typeArguments,\n abi: data.abi,\n };\n payload = await generateTransactionPayload(generateTransactionPayloadData);\n }\n return payload;\n}\n\n/**\n * Builds a raw transaction based on the provided configuration and payload.\n * This function helps in creating a transaction that can be sent to the Aptos blockchain.\n *\n * @param args - The arguments for generating the transaction.\n * @param args.aptosConfig - The configuration settings for Aptos.\n * @param args.sender - The address of the sender of the transaction.\n * @param args.options - Additional options for the transaction.\n * @param payload - The payload of the transaction, which defines the action to be performed.\n * @group Implementation\n */\nexport async function buildRawTransaction(\n args: { aptosConfig: AptosConfig } & InputGenerateTransactionData,\n payload: AnyTransactionPayloadInstance,\n): Promise<AnyRawTransaction> {\n const { aptosConfig, sender, options } = args;\n\n let feePayerAddress;\n if (isFeePayerTransactionInput(args)) {\n feePayerAddress = AccountAddress.ZERO.toString();\n }\n\n if (isMultiAgentTransactionInput(args)) {\n const { secondarySignerAddresses } = args;\n return buildTransaction({\n aptosConfig,\n sender,\n payload,\n options,\n secondarySignerAddresses,\n feePayerAddress,\n });\n }\n\n return buildTransaction({\n aptosConfig,\n sender,\n payload,\n options,\n feePayerAddress,\n });\n}\n\n/**\n * Determine if the transaction input includes a fee payer.\n *\n * @param data - The input data for generating a transaction.\n * @param data.withFeePayer - Indicates whether a fee payer is included in the transaction input.\n * @returns A boolean value indicating if the transaction input has a fee payer.\n * @group Implementation\n */\nfunction isFeePayerTransactionInput(data: InputGenerateTransactionData): boolean {\n return data.withFeePayer === true;\n}\n\n/**\n * Determines whether the provided transaction input data includes multiple agent signatures.\n *\n * @param data - The transaction input data to evaluate.\n * @param data.secondarySignerAddresses - An array of secondary signer addresses, indicating multiple agents.\n * @group Implementation\n */\nfunction isMultiAgentTransactionInput(\n data: InputGenerateTransactionData,\n): data is InputGenerateMultiAgentRawTransactionData {\n return \"secondarySignerAddresses\" in data;\n}\n\n/**\n * Builds a signing message that can be signed by external signers.\n *\n * Note: Please prefer using `signTransaction` unless signing outside the SDK.\n *\n * @param args - The arguments for generating the signing message.\n * @param args.transaction - AnyRawTransaction, as generated by `generateTransaction()`.\n *\n * @returns The message to be signed.\n * @group Implementation\n */\nexport function getSigningMessage(args: { transaction: AnyRawTransaction }): Uint8Array {\n const { transaction } = args;\n return generateSigningMessageForTransaction(transaction);\n}\n\n/**\n * Sign a transaction that can later be submitted to the chain.\n *\n * @param args The arguments for signing the transaction.\n * @param args.signer The signer account to sign the transaction.\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses.\n *\n * @return The signer AccountAuthenticator.\n * @group Implementation\n */\nexport function signTransaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n return signer.signTransactionWithAuthenticator(transaction);\n}\n\nexport function signAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesn't hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n}\n\n/**\n * Simulates a transaction before signing it to evaluate its potential outcome.\n *\n * @param args The arguments for simulating the transaction.\n * @param args.aptosConfig The configuration for the Aptos network.\n * @param args.transaction The raw transaction to simulate.\n * @param args.signerPublicKey Optional. The signer public key.\n * @param args.secondarySignersPublicKeys Optional. For when the transaction involves multiple signers.\n * @param args.feePayerPublicKey Optional. For when the transaction is sponsored by a fee payer.\n * @param args.options Optional. A configuration object to customize the simulation process.\n * @param args.options.estimateGasUnitPrice Optional. Indicates whether to estimate the gas unit price.\n * @param args.options.estimateMaxGasAmount Optional. Indicates whether to estimate the maximum gas amount.\n * @param args.options.estimatePrioritizedGasUnitPrice Optional. Indicates whether to estimate the prioritized gas unit price.\n * @group Implementation\n */\nexport async function simulateTransaction(\n args: { aptosConfig: AptosConfig } & InputSimulateTransactionData,\n): Promise<Array<UserTransactionResponse>> {\n const { aptosConfig, transaction, signerPublicKey, secondarySignersPublicKeys, feePayerPublicKey, options } = args;\n\n const signedTransaction = generateSignedTransactionForSimulation({\n transaction,\n signerPublicKey,\n secondarySignersPublicKeys,\n feePayerPublicKey,\n options,\n });\n\n const { data } = await postAptosFullNode<Uint8Array, Array<UserTransactionResponse>>({\n aptosConfig,\n body: signedTransaction,\n path: \"transactions/simulate\",\n params: {\n estimate_gas_unit_price: args.options?.estimateGasUnitPrice ?? false,\n estimate_max_gas_amount: args.options?.estimateMaxGasAmount ?? false,\n estimate_prioritized_gas_unit_price: args.options?.estimatePrioritizedGasUnitPrice ?? false,\n },\n originMethod: \"simulateTransaction\",\n contentType: MimeType.BCS_SIGNED_TRANSACTION,\n });\n return data;\n}\n\n/**\n * Submit a transaction to the Aptos blockchain.\n *\n * @param args - The arguments for submitting the transaction.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.transaction - The Aptos transaction data to be submitted.\n * @param args.senderAuthenticator - The account authenticator of the transaction sender.\n * @param args.secondarySignerAuthenticators - Optional. Authenticators for additional signers in a multi-signer transaction.\n *\n * @returns PendingTransactionResponse - The response containing the status of the submitted transaction.\n * @group Implementation\n */\nexport async function submitTransaction(\n args: {\n aptosConfig: AptosConfig;\n } & InputSubmitTransactionData,\n): Promise<PendingTransactionResponse> {\n const { aptosConfig, transactionSubmitter } = args;\n const maybeTransactionSubmitter =\n transactionSubmitter === undefined ? aptosConfig.getTransactionSubmitter() : transactionSubmitter;\n if (maybeTransactionSubmitter) {\n return maybeTransactionSubmitter.submitTransaction(args);\n }\n const signedTransaction = generateSignedTransaction({ ...args });\n try {\n const { data } = await postAptosFullNode<Uint8Array, PendingTransactionResponse>({\n aptosConfig,\n body: signedTransaction,\n path: \"transactions\",\n originMethod: \"submitTransaction\",\n contentType: MimeType.BCS_SIGNED_TRANSACTION,\n });\n return data;\n } catch (e) {\n const signedTxn = SignedTransaction.deserialize(new Deserializer(signedTransaction));\n if (\n signedTxn.authenticator.isSingleSender() &&\n signedTxn.authenticator.sender.isSingleKey() &&\n (signedTxn.authenticator.sender.public_key.publicKey instanceof KeylessPublicKey ||\n signedTxn.authenticator.sender.public_key.publicKey instanceof FederatedKeylessPublicKey)\n ) {\n await AbstractKeylessAccount.fetchJWK({\n aptosConfig,\n publicKey: signedTxn.authenticator.sender.public_key.publicKey,\n kid: (signedTxn.authenticator.sender.signature.signature as KeylessSignature).getJwkKid(),\n });\n }\n throw e;\n }\n}\n\nexport type FeePayerOrFeePayerAuthenticatorOrNeither =\n | { feePayer: Account; feePayerAuthenticator?: never }\n | { feePayer?: never; feePayerAuthenticator: AccountAuthenticator }\n | { feePayer?: never; feePayerAuthenticator?: never };\n\nexport async function signAndSubmitTransaction(\n args: FeePayerOrFeePayerAuthenticatorOrNeither & {\n aptosConfig: AptosConfig;\n signer: Account;\n transaction: AnyRawTransaction;\n } & InputTransactionPluginData,\n): Promise<PendingTransactionResponse> {\n const { aptosConfig, signer, feePayer, transaction, ...rest } = args;\n // If the signer contains a KeylessAccount, await proof fetching in case the proof\n // was fetched asynchronously.\n if (isKeylessSigner(signer)) {\n await signer.checkKeylessAccountValidity(aptosConfig);\n }\n if (isKeylessSigner(feePayer)) {\n await feePayer.checkKeylessAccountValidity(aptosConfig);\n }\n const feePayerAuthenticator =\n args.feePayerAuthenticator || (feePayer && signAsFeePayer({ signer: feePayer, transaction }));\n\n const senderAuthenticator = signTransaction({ signer, transaction });\n return submitTransaction({\n aptosConfig,\n transaction,\n senderAuthenticator,\n feePayerAuthenticator,\n ...rest,\n });\n}\n\nexport async function signAndSubmitAsFeePayer(\n args: {\n aptosConfig: AptosConfig;\n feePayer: Account;\n senderAuthenticator: AccountAuthenticator;\n transaction: AnyRawTransaction;\n } & InputTransactionPluginData,\n): Promise<PendingTransactionResponse> {\n const { aptosConfig, senderAuthenticator, feePayer, transaction, ...rest } = args;\n\n if (isKeylessSigner(feePayer)) {\n await feePayer.checkKeylessAccountValidity(aptosConfig);\n }\n\n const feePayerAuthenticator = signAsFeePayer({ signer: feePayer, transaction });\n\n return submitTransaction({\n aptosConfig,\n transaction,\n senderAuthenticator,\n feePayerAuthenticator,\n ...rest,\n });\n}\n\nconst packagePublishAbi: EntryFunctionABI = {\n typeParameters: [],\n parameters: [TypeTagVector.u8(), new TypeTagVector(TypeTagVector.u8())],\n};\n\n/**\n * Publishes a package transaction to the Aptos blockchain.\n * This function allows you to create and send a transaction that publishes a package with the specified metadata and bytecode.\n *\n * @param args - The arguments for the package transaction.\n * @param args.aptosConfig - The configuration settings for the Aptos client.\n * @param args.account - The address of the account sending the transaction.\n * @param args.metadataBytes - The metadata associated with the package, represented as hexadecimal input.\n * @param args.moduleBytecode - An array of module bytecode, each represented as hexadecimal input.\n * @param args.options - Optional parameters for generating the transaction.\n * @group Implementation\n */\nexport async function publicPackageTransaction(args: {\n aptosConfig: AptosConfig;\n account: AccountAddressInput;\n metadataBytes: HexInput;\n moduleBytecode: Array<HexInput>;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, account, metadataBytes, moduleBytecode, options } = args;\n\n const totalByteCode = moduleBytecode.map((bytecode) => MoveVector.U8(bytecode));\n\n return generateTransaction({\n aptosConfig,\n sender: AccountAddress.from(account),\n data: {\n function: \"0x1::code::publish_package_txn\",\n functionArguments: [MoveVector.U8(metadataBytes), new MoveVector(totalByteCode)],\n abi: packagePublishAbi,\n },\n options,\n });\n}\n"],"mappings":"AASA,OAAS,gBAAAA,EAAc,cAAAC,MAAkB,SACzC,OAAS,qBAAAC,MAAyB,YAClC,OAAkB,0BAAAC,EAAwB,mBAAAC,MAAuB,aACjE,OAAS,kBAAAC,MAA2C,yBACpD,OAAS,6BAAAC,EAA2B,oBAAAC,MAA0C,iBAE9E,O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AAE,YAAAI,EAAa,oBAAA4B,EAAqB,SAAAH,EAAU,YAAAf,EAAa,GAAGgB,CAAK,EAAI9B,EAEzEb,EAAgB0C,CAAQ,GAC1B,MAAMA,EAAS,4BAA4BzB,CAAW,EAGxD,MAAM2B,EAAwBd,EAAe,CAAE,OAAQY,EAAU,YAAAf,CAAY,CAAC,EAE9E,OAAOS,EAAkB,CACvB,YAAAnB,EACA,YAAAU,EACA,oBAAAkB,EACA,sBAAAD,EACA,GAAGD,CACL,CAAC,CACH,CAEA,MAAMI,EAAsC,CAC1C,eAAgB,CAAC,EACjB,WAAY,CAACrC,EAAc,GAAG,EAAG,IAAIA,EAAcA,EAAc,GAAG,CAAC,CAAC,CACxE,EAcA,eAAsBsC,GAAyBnC,EAMhB,CAC7B,KAAM,CAAE,YAAAI,EAAa,QAAAgC,EAAS,cAAAC,EAAe,eAAAC,EAAgB,QAAA9B,CAAQ,EAAIR,EAEnEuC,EAAgBD,EAAe,IAAKE,GAAaxD,EAAW,GAAGwD,CAAQ,CAAC,EAE9E,OAAOzC,EAAoB,CACzB,YAAAK,EACA,OAAQhB,EAAe,KAAKgD,CAAO,EACnC,KAAM,CACJ,SAAU,iCACV,kBAAmB,CAACpD,EAAW,GAAGqD,CAAa,EAAG,IAAIrD,EAAWuD,CAAa,CAAC,EAC/E,IAAKL,CACP,EACA,QAAA1B,CACF,CAAC,CACH","names":["Deserializer","MoveVector","postAptosFullNode","AbstractKeylessAccount","isKeylessSigner","AccountAddress","FederatedKeylessPublicKey","KeylessPublicKey","buildTransaction","generateTransactionPayload","generateSignedTransactionForSimulation","generateSignedTransaction","MimeType","SignedTransaction","TypeTagVector","generateSigningMessageForTransaction","generateTransaction","args","payload","buildTransactionPayload","buildRawTransaction","aptosConfig","data","generateTransactionPayloadData","sender","options","feePayerAddress","isFeePayerTransactionInput","isMultiAgentTransactionInput","secondarySignerAddresses","getSigningMessage","transaction","signTransaction","signer","signAsFeePayer","simulateTransaction","signerPublicKey","secondarySignersPublicKeys","feePayerPublicKey","signedTransaction","submitTransaction","transactionSubmitter","maybeTransactionSubmitter","e","signedTxn","signAndSubmitTransaction","feePayer","rest","feePayerAuthenticator","senderAuthenticator","signAndSubmitAsFeePayer","packagePublishAbi","publicPackageTransaction","account","metadataBytes","moduleBytecode","totalByteCode","bytecode"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- export*from"./utils";
1
+ import"../../chunk-G3MHXDYA.mjs";import{a,b}from"../../chunk-626KB2UQ.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as getInfo,b as getModule};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/internal/utils/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from \"./utils\";\n"],"mappings":"AAGA,WAAc","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{AccountAddress as r}from"../../core/accountAddress";import{getAptosFullNode as s}from"../../client";import{memoizeAsync as u}from"../../utils/memoize";async function I(o){const{aptosConfig:e,accountAddress:t}=o,{data:n}=await s({aptosConfig:e,originMethod:"getInfo",path:`accounts/${r.from(t).toString()}`});return n}async function v(o){return o.options?.ledgerVersion!==void 0?d(o):u(async()=>d(o),`module-${o.accountAddress}-${o.moduleName}`,1e3*60*5)()}async function d(o){const{aptosConfig:e,accountAddress:t,moduleName:n,options:c}=o,{data:i}=await s({aptosConfig:e,originMethod:"getModule",path:`accounts/${r.from(t).toString()}/module/${n}`,params:{ledger_version:c?.ledgerVersion}});return i}export{I as getInfo,v as getModule};
1
+ import{a,b}from"../../chunk-626KB2UQ.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as getInfo,b as getModule};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/internal/utils/utils.ts"],"sourcesContent":["import { AccountAddress, AccountAddressInput } from \"../../core/accountAddress\";\nimport { MoveModuleBytecode, LedgerVersionArg, AccountData } from \"../../types/types\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { getAptosFullNode } from \"../../client\";\nimport { memoizeAsync } from \"../../utils/memoize\";\n\n/**\n * Retrieves account information for a specified account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.aptosConfig - The configuration object for Aptos.\n * @param args.accountAddress - The address of the account to retrieve information for.\n * @group Implementation\n */\nexport async function getInfo(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<AccountData> {\n const { aptosConfig, accountAddress } = args;\n const { data } = await getAptosFullNode<{}, AccountData>({\n aptosConfig,\n originMethod: \"getInfo\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}`,\n });\n return data;\n}\n\n/**\n * Queries for a move module given an account address and module name.\n * This function can help you retrieve the module's ABI and other relevant information.\n *\n * @param args - The arguments for retrieving the module.\n * @param args.aptosConfig - The configuration for the Aptos client.\n * @param args.accountAddress - The account address in hex-encoded 32 byte format.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for the request.\n * @param args.options.ledgerVersion - Specifies the ledger version of transactions. By default, the latest version will be used.\n * @returns The move module.\n * @group Implementation\n */\nexport async function getModule(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n // We don't memoize the account module by ledger version, as it's not a common use case, this would be handled\n // by the developer directly\n if (args.options?.ledgerVersion !== undefined) {\n return getModuleInner(args);\n }\n\n return memoizeAsync(\n async () => getModuleInner(args),\n `module-${args.accountAddress}-${args.moduleName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\n/**\n * Retrieves the bytecode of a specified module from a given account address.\n *\n * @param args - The parameters for retrieving the module bytecode.\n * @param args.aptosConfig - The configuration for connecting to the Aptos network.\n * @param args.accountAddress - The address of the account from which to retrieve the module.\n * @param args.moduleName - The name of the module to retrieve.\n * @param args.options - Optional parameters for specifying the ledger version.\n * @param args.options.ledgerVersion - The specific ledger version to query.\n * @group Implementation\n */\nasync function getModuleInner(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n const { aptosConfig, accountAddress, moduleName, options } = args;\n\n const { data } = await getAptosFullNode<{}, MoveModuleBytecode>({\n aptosConfig,\n originMethod: \"getModule\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,\n params: { ledger_version: options?.ledgerVersion },\n });\n return data;\n}\n"],"mappings":"AAAA,OAAS,kBAAAA,MAA2C,4BAGpD,OAAS,oBAAAC,MAAwB,eACjC,OAAS,gBAAAC,MAAoB,sBAU7B,eAAsBC,EAAQC,EAGL,CACvB,KAAM,CAAE,YAAAC,EAAa,eAAAC,CAAe,EAAIF,EAClC,CAAE,KAAAG,CAAK,EAAI,MAAMN,EAAkC,CACvD,YAAAI,EACA,aAAc,UACd,KAAM,YAAYL,EAAe,KAAKM,CAAc,EAAE,SAAS,CAAC,EAClE,CAAC,EACD,OAAOC,CACT,CAeA,eAAsBC,EAAUJ,EAKA,CAG9B,OAAIA,EAAK,SAAS,gBAAkB,OAC3BK,EAAeL,CAAI,EAGrBF,EACL,SAAYO,EAAeL,CAAI,EAC/B,UAAUA,EAAK,cAAc,IAAIA,EAAK,UAAU,GAChD,IAAO,GAAK,CACd,EAAE,CACJ,CAaA,eAAeK,EAAeL,EAKE,CAC9B,KAAM,CAAE,YAAAC,EAAa,eAAAC,EAAgB,WAAAI,EAAY,QAAAC,CAAQ,EAAIP,EAEvD,CAAE,KAAAG,CAAK,EAAI,MAAMN,EAAyC,CAC9D,YAAAI,EACA,aAAc,YACd,KAAM,YAAYL,EAAe,KAAKM,CAAc,EAAE,SAAS,CAAC,WAAWI,CAAU,GACrF,OAAQ,CAAE,eAAgBC,GAAS,aAAc,CACnD,CAAC,EACD,OAAOJ,CACT","names":["AccountAddress","getAptosFullNode","memoizeAsync","getInfo","args","aptosConfig","accountAddress","data","getModule","getModuleInner","moduleName","options"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{MimeType as u}from"../types";import{generateViewFunctionPayload as d}from"../transactions";import{Serializer as g}from"../bcs";import{postAptosFullNode as r}from"../client";async function C(n){const{aptosConfig:e,payload:o,options:t}=n,i=await d({...o,aptosConfig:e}),a=new g;i.serialize(a);const s=a.toUint8Array(),{data:p}=await r({aptosConfig:e,path:"view",originMethod:"view",contentType:u.BCS_VIEW_FUNCTION,params:{ledger_version:t?.ledgerVersion},body:s});return p}async function T(n){const{aptosConfig:e,payload:o,options:t}=n,{data:i}=await r({aptosConfig:e,originMethod:"viewJson",path:"view",params:{ledger_version:t?.ledgerVersion},body:{function:o.function,type_arguments:o.typeArguments??[],arguments:o.functionArguments??[]}});return i}export{C as view,T as viewJson};
1
+ import{Qc as a,Rc as b}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import"../chunk-XKUIMGKU.mjs";import"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{a as view,b as viewJson};
2
2
  //# sourceMappingURL=view.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/internal/view.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LedgerVersionArg, MimeType, MoveValue } from \"../types\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport {\n generateViewFunctionPayload,\n InputViewFunctionData,\n InputViewFunctionJsonData,\n ViewFunctionJsonPayload,\n} from \"../transactions\";\nimport { Serializer } from \"../bcs\";\nimport { postAptosFullNode } from \"../client\";\n\nexport async function view<T extends Array<MoveValue> = Array<MoveValue>>(args: {\n aptosConfig: AptosConfig;\n payload: InputViewFunctionData;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, payload, options } = args;\n const viewFunctionPayload = await generateViewFunctionPayload({\n ...payload,\n aptosConfig,\n });\n\n const serializer = new Serializer();\n viewFunctionPayload.serialize(serializer);\n const bytes = serializer.toUint8Array();\n\n const { data } = await postAptosFullNode<Uint8Array, MoveValue[]>({\n aptosConfig,\n path: \"view\",\n originMethod: \"view\",\n contentType: MimeType.BCS_VIEW_FUNCTION,\n params: { ledger_version: options?.ledgerVersion },\n body: bytes,\n });\n\n return data as T;\n}\n\nexport async function viewJson<T extends Array<MoveValue> = Array<MoveValue>>(args: {\n aptosConfig: AptosConfig;\n payload: InputViewFunctionJsonData;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, payload, options } = args;\n const { data } = await postAptosFullNode<ViewFunctionJsonPayload, MoveValue[]>({\n aptosConfig,\n originMethod: \"viewJson\",\n path: \"view\",\n params: { ledger_version: options?.ledgerVersion },\n body: {\n function: payload.function,\n type_arguments: payload.typeArguments ?? [],\n arguments: payload.functionArguments ?? [],\n },\n });\n\n return data as T;\n}\n"],"mappings":"AAGA,OAA2B,YAAAA,MAA2B,WAEtD,OACE,+BAAAC,MAIK,kBACP,OAAS,cAAAC,MAAkB,SAC3B,OAAS,qBAAAC,MAAyB,YAElC,eAAsBC,EAAoDC,EAI3D,CACb,KAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EACpCI,EAAsB,MAAMR,EAA4B,CAC5D,GAAGM,EACH,YAAAD,CACF,CAAC,EAEKI,EAAa,IAAIR,EACvBO,EAAoB,UAAUC,CAAU,EACxC,MAAMC,EAAQD,EAAW,aAAa,EAEhC,CAAE,KAAAE,CAAK,EAAI,MAAMT,EAA2C,CAChE,YAAAG,EACA,KAAM,OACN,aAAc,OACd,YAAaN,EAAS,kBACtB,OAAQ,CAAE,eAAgBQ,GAAS,aAAc,EACjD,KAAMG,CACR,CAAC,EAED,OAAOC,CACT,CAEA,eAAsBC,EAAwDR,EAI/D,CACb,KAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EACpC,CAAE,KAAAO,CAAK,EAAI,MAAMT,EAAwD,CAC7E,YAAAG,EACA,aAAc,WACd,KAAM,OACN,OAAQ,CAAE,eAAgBE,GAAS,aAAc,EACjD,KAAM,CACJ,SAAUD,EAAQ,SAClB,eAAgBA,EAAQ,eAAiB,CAAC,EAC1C,UAAWA,EAAQ,mBAAqB,CAAC,CAC3C,CACF,CAAC,EAED,OAAOK,CACT","names":["MimeType","generateViewFunctionPayload","Serializer","postAptosFullNode","view","args","aptosConfig","payload","options","viewFunctionPayload","serializer","bytes","data","viewJson"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as f}from"../../bcs";import{AnyPublicKey as U,AnySignature as x}from"../../core/crypto";import{Ed25519PublicKey as E,Ed25519Signature as I}from"../../core/crypto/ed25519";import{MultiEd25519PublicKey as K,MultiEd25519Signature as w}from"../../core/crypto/multiEd25519";import{MultiKey as k,MultiKeySignature as v}from"../../core/crypto/multiKey";import{AccountAuthenticatorVariant as n}from"../../types";import{AASigningDataVariant as S,AbstractAuthenticationDataVariant as u}from"../../types/abstraction";import{AccountAddress as l,Hex as d}from"../../core";import{getFunctionParts as m,isValidFunctionInfo as D}from"../../utils/helpers";class r extends f{static deserialize(t){const i=t.deserializeUleb128AsU32();switch(i){case n.Ed25519:return y.load(t);case n.MultiEd25519:return g.load(t);case n.SingleKey:return A.load(t);case n.MultiKey:return b.load(t);case n.NoAccountAuthenticator:return p.load(t);case n.Abstraction:return h.load(t);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${i}`)}}isEd25519(){return this instanceof y}isMultiEd25519(){return this instanceof g}isSingleKey(){return this instanceof A}isMultiKey(){return this instanceof b}}class y extends r{constructor(t,i){super(),this.public_key=t,this.signature=i}serialize(t){t.serializeU32AsUleb128(n.Ed25519),this.public_key.serialize(t),this.signature.serialize(t)}static load(t){const i=E.deserialize(t),e=I.deserialize(t);return new y(i,e)}}class g extends r{constructor(t,i){super(),this.public_key=t,this.signature=i}serialize(t){t.serializeU32AsUleb128(n.MultiEd25519),this.public_key.serialize(t),this.signature.serialize(t)}static load(t){const i=K.deserialize(t),e=w.deserialize(t);return new g(i,e)}}class A extends r{constructor(t,i){super(),this.public_key=t,this.signature=i}serialize(t){t.serializeU32AsUleb128(n.SingleKey),this.public_key.serialize(t),this.signature.serialize(t)}static load(t){const i=U.deserialize(t),e=x.deserialize(t);return new A(i,e)}}class b extends r{constructor(t,i){super(),this.public_keys=t,this.signatures=i}serialize(t){t.serializeU32AsUleb128(n.MultiKey),this.public_keys.serialize(t),this.signatures.serialize(t)}static load(t){const i=k.deserialize(t),e=v.deserialize(t);return new b(i,e)}}class p extends r{serialize(t){t.serializeU32AsUleb128(n.NoAccountAuthenticator)}static load(t){return new p}}class h extends r{constructor(t,i,e,s){if(super(),!D(t))throw new Error(`Invalid function info ${t} passed into AccountAuthenticatorAbstraction`);this.functionInfo=t,this.abstractionSignature=e,this.signingMessageDigest=d.fromHexInput(d.fromHexInput(i).toUint8Array()),this.accountIdentity=s}serialize(t){t.serializeU32AsUleb128(n.Abstraction);const{moduleAddress:i,moduleName:e,functionName:s}=m(this.functionInfo);l.fromString(i).serialize(t),t.serializeStr(e),t.serializeStr(s),this.accountIdentity?t.serializeU32AsUleb128(u.DerivableV1):t.serializeU32AsUleb128(u.V1),t.serializeBytes(this.signingMessageDigest.toUint8Array()),this.accountIdentity?t.serializeBytes(this.abstractionSignature):t.serializeFixedBytes(this.abstractionSignature),this.accountIdentity&&t.serializeBytes(this.accountIdentity)}static load(t){const i=l.deserialize(t),e=t.deserializeStr(),s=t.deserializeStr(),a=t.deserializeUleb128AsU32(),c=t.deserializeBytes();if(a===u.V1){const o=t.deserializeFixedBytes(t.remaining());return new h(`${i}::${e}::${s}`,c,o)}if(a===u.DerivableV1){const o=t.deserializeBytes(),M=t.deserializeBytes();return new h(`${i}::${e}::${s}`,c,o,M)}throw new Error(`Unknown variant index for AccountAuthenticatorAbstraction: ${a}`)}}class z extends f{constructor(t,i){super(),this.originalSigningMessage=d.fromHexInput(d.fromHexInput(t).toUint8Array()),this.functionInfo=i}serialize(t){t.serializeU32AsUleb128(S.V1),t.serializeBytes(this.originalSigningMessage.toUint8Array());const{moduleAddress:i,moduleName:e,functionName:s}=m(this.functionInfo);l.fromString(i).serialize(t),t.serializeStr(e),t.serializeStr(s)}static deserialize(t){const i=t.deserializeUleb128AsU32();if(i!==S.V1)throw new Error(`Unknown variant index for AccountAbstractionMessage: ${i}`);const e=t.deserializeBytes(),s=l.deserialize(t),a=t.deserializeStr(),c=t.deserializeStr(),o=`${s}::${a}::${c}`;return new z(e,o)}}export{z as AccountAbstractionMessage,r as AccountAuthenticator,h as AccountAuthenticatorAbstraction,y as AccountAuthenticatorEd25519,g as AccountAuthenticatorMultiEd25519,b as AccountAuthenticatorMultiKey,p as AccountAuthenticatorNoAccountAuthenticator,A as AccountAuthenticatorSingleKey};
1
+ import{$ as g,V as a,W as b,X as c,Y as d,Z as e,_ as f,aa as h}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{h as AccountAbstractionMessage,a as AccountAuthenticator,g as AccountAuthenticatorAbstraction,b as AccountAuthenticatorEd25519,c as AccountAuthenticatorMultiEd25519,e as AccountAuthenticatorMultiKey,f as AccountAuthenticatorNoAccountAuthenticator,d as AccountAuthenticatorSingleKey};
2
2
  //# sourceMappingURL=account.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/authenticator/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Serializer, Deserializer, Serializable } from \"../../bcs\";\nimport { AnyPublicKey, AnySignature } from \"../../core/crypto\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"../../core/crypto/ed25519\";\nimport { MultiEd25519PublicKey, MultiEd25519Signature } from \"../../core/crypto/multiEd25519\";\nimport { MultiKey, MultiKeySignature } from \"../../core/crypto/multiKey\";\nimport { AccountAuthenticatorVariant, HexInput, MoveFunctionId } from \"../../types\";\nimport { AASigningDataVariant, AbstractAuthenticationDataVariant } from \"../../types/abstraction\";\nimport { AccountAddress, Hex } from \"../../core\";\nimport { getFunctionParts, isValidFunctionInfo } from \"../../utils/helpers\";\n\n/**\n * Represents an account authenticator that can handle multiple authentication variants.\n * This class serves as a base for different types of account authenticators, allowing for serialization\n * and deserialization of various authenticator types.\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport abstract class AccountAuthenticator extends Serializable {\n abstract serialize(serializer: Serializer): void;\n\n /**\n * Deserializes an AccountAuthenticator from the provided deserializer.\n * This function helps in reconstructing the AccountAuthenticator object based on the variant index.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): AccountAuthenticator {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case AccountAuthenticatorVariant.Ed25519:\n return AccountAuthenticatorEd25519.load(deserializer);\n case AccountAuthenticatorVariant.MultiEd25519:\n return AccountAuthenticatorMultiEd25519.load(deserializer);\n case AccountAuthenticatorVariant.SingleKey:\n return AccountAuthenticatorSingleKey.load(deserializer);\n case AccountAuthenticatorVariant.MultiKey:\n return AccountAuthenticatorMultiKey.load(deserializer);\n case AccountAuthenticatorVariant.NoAccountAuthenticator:\n return AccountAuthenticatorNoAccountAuthenticator.load(deserializer);\n case AccountAuthenticatorVariant.Abstraction:\n return AccountAuthenticatorAbstraction.load(deserializer);\n default:\n throw new Error(`Unknown variant index for AccountAuthenticator: ${index}`);\n }\n }\n\n /**\n * Determines if the current instance is an Ed25519 account authenticator.\n *\n * @returns {boolean} True if the instance is of type AccountAuthenticatorEd25519, otherwise false.\n * @group Implementation\n * @category Transactions\n */\n isEd25519(): this is AccountAuthenticatorEd25519 {\n return this instanceof AccountAuthenticatorEd25519;\n }\n\n /**\n * Determines if the current instance is of type AccountAuthenticatorMultiEd25519.\n *\n * @returns {boolean} True if the instance is a multi-signature Ed25519 account authenticator, otherwise false.\n * @group Implementation\n * @category Transactions\n */\n isMultiEd25519(): this is AccountAuthenticatorMultiEd25519 {\n return this instanceof AccountAuthenticatorMultiEd25519;\n }\n\n /**\n * Determines if the current instance is of the type AccountAuthenticatorSingleKey.\n *\n * @returns {boolean} True if the instance is an AccountAuthenticatorSingleKey, otherwise false.\n * @group Implementation\n * @category Transactions\n */\n isSingleKey(): this is AccountAuthenticatorSingleKey {\n return this instanceof AccountAuthenticatorSingleKey;\n }\n\n /**\n * Determine if the current instance is of type AccountAuthenticatorMultiKey.\n *\n * @returns {boolean} Returns true if the instance is an AccountAuthenticatorMultiKey, otherwise false.\n * @group Implementation\n * @category Transactions\n */\n isMultiKey(): this is AccountAuthenticatorMultiKey {\n return this instanceof AccountAuthenticatorMultiKey;\n }\n}\n\n/**\n * Represents an Ed25519 transaction authenticator for multi-signer transactions.\n * This class encapsulates the account's Ed25519 public key and signature.\n *\n * @param public_key - The Ed25519 public key associated with the account.\n * @param signature - The Ed25519 signature for the account.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAuthenticatorEd25519 extends AccountAuthenticator {\n public readonly public_key: Ed25519PublicKey;\n\n public readonly signature: Ed25519Signature;\n\n /**\n * Creates an instance of the class with the specified public keys and signatures.\n *\n * @param public_key The public key used for verification.\n * @param signature The signatures corresponding to the public keys.\n * @group Implementation\n * @category Transactions\n */\n constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n /**\n * Serializes the account authenticator data into the provided serializer.\n * This function captures the multi-key variant, public keys, and signatures for serialization.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.Ed25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n /**\n * Loads an instance of AccountAuthenticatorMultiKey from the provided deserializer.\n * This function helps in reconstructing the authenticator object using the deserialized public keys and signatures.\n *\n * @param deserializer - The deserializer used to extract the necessary data for loading the authenticator.\n * @group Implementation\n * @category Transactions\n */\n static load(deserializer: Deserializer): AccountAuthenticatorEd25519 {\n const public_key = Ed25519PublicKey.deserialize(deserializer);\n const signature = Ed25519Signature.deserialize(deserializer);\n return new AccountAuthenticatorEd25519(public_key, signature);\n }\n}\n\n/**\n * Represents a transaction authenticator for Multi Ed25519, designed for multi-signer transactions.\n *\n * @param public_key - The MultiEd25519 public key of the account.\n * @param signature - The MultiEd25519 signature of the account.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAuthenticatorMultiEd25519 extends AccountAuthenticator {\n public readonly public_key: MultiEd25519PublicKey;\n\n public readonly signature: MultiEd25519Signature;\n\n constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.MultiEd25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorMultiEd25519 {\n const public_key = MultiEd25519PublicKey.deserialize(deserializer);\n const signature = MultiEd25519Signature.deserialize(deserializer);\n return new AccountAuthenticatorMultiEd25519(public_key, signature);\n }\n}\n\n/**\n * Represents an account authenticator that utilizes a single key for signing.\n * This class is designed to handle authentication using a public key and its corresponding signature.\n *\n * @param public_key - The public key used for authentication.\n * @param signature - The signature associated with the public key.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAuthenticatorSingleKey extends AccountAuthenticator {\n public readonly public_key: AnyPublicKey;\n\n public readonly signature: AnySignature;\n\n constructor(public_key: AnyPublicKey, signature: AnySignature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.SingleKey);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorSingleKey {\n const public_key = AnyPublicKey.deserialize(deserializer);\n const signature = AnySignature.deserialize(deserializer);\n return new AccountAuthenticatorSingleKey(public_key, signature);\n }\n}\n\n/**\n * Represents an account authenticator that supports multiple keys and signatures for multi-signature scenarios.\n *\n * @param public_keys - The public keys used for authentication.\n * @param signatures - The signatures corresponding to the public keys.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAuthenticatorMultiKey extends AccountAuthenticator {\n public readonly public_keys: MultiKey;\n\n public readonly signatures: MultiKeySignature;\n\n constructor(public_keys: MultiKey, signatures: MultiKeySignature) {\n super();\n this.public_keys = public_keys;\n this.signatures = signatures;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.MultiKey);\n this.public_keys.serialize(serializer);\n this.signatures.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorMultiKey {\n const public_keys = MultiKey.deserialize(deserializer);\n const signatures = MultiKeySignature.deserialize(deserializer);\n return new AccountAuthenticatorMultiKey(public_keys, signatures);\n }\n}\n\n/**\n * AccountAuthenticatorNoAccountAuthenticator for no account authenticator\n * It represents the absence of a public key for transaction simulation.\n * It allows skipping the public/auth key check during the simulation.\n */\nexport class AccountAuthenticatorNoAccountAuthenticator extends AccountAuthenticator {\n // eslint-disable-next-line class-methods-use-this\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.NoAccountAuthenticator);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static load(deserializer: Deserializer): AccountAuthenticatorNoAccountAuthenticator {\n return new AccountAuthenticatorNoAccountAuthenticator();\n }\n}\n\n/**\n * Represents an account authenticator that supports abstract authentication.\n *\n * @param functionInfo - The function info of the authentication function.\n * @param signingMessageDigest - The digest of the signing message.\n * @param abstractionSignature - The signature of the authentication function.\n * @param accountIdentity - optional. The account identity for DAA.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAuthenticatorAbstraction extends AccountAuthenticator {\n public readonly functionInfo: string;\n\n public readonly signingMessageDigest: Hex;\n\n public readonly abstractionSignature: Uint8Array;\n\n /**\n * DAA, which is extended of the AA module, requires an account identity\n */\n public readonly accountIdentity?: Uint8Array;\n\n constructor(\n functionInfo: string,\n signingMessageDigest: HexInput,\n abstractionSignature: Uint8Array,\n accountIdentity?: Uint8Array,\n ) {\n super();\n if (!isValidFunctionInfo(functionInfo)) {\n throw new Error(`Invalid function info ${functionInfo} passed into AccountAuthenticatorAbstraction`);\n }\n this.functionInfo = functionInfo;\n this.abstractionSignature = abstractionSignature;\n this.signingMessageDigest = Hex.fromHexInput(Hex.fromHexInput(signingMessageDigest).toUint8Array());\n this.accountIdentity = accountIdentity;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.Abstraction);\n const { moduleAddress, moduleName, functionName } = getFunctionParts(this.functionInfo as MoveFunctionId);\n AccountAddress.fromString(moduleAddress).serialize(serializer);\n serializer.serializeStr(moduleName);\n serializer.serializeStr(functionName);\n if (this.accountIdentity) {\n serializer.serializeU32AsUleb128(AbstractAuthenticationDataVariant.DerivableV1);\n } else {\n serializer.serializeU32AsUleb128(AbstractAuthenticationDataVariant.V1);\n }\n serializer.serializeBytes(this.signingMessageDigest.toUint8Array());\n if (this.accountIdentity) {\n serializer.serializeBytes(this.abstractionSignature);\n } else {\n serializer.serializeFixedBytes(this.abstractionSignature);\n }\n\n if (this.accountIdentity) {\n serializer.serializeBytes(this.accountIdentity);\n }\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorAbstraction {\n // deserialize the function info\n const moduleAddress = AccountAddress.deserialize(deserializer);\n const moduleName = deserializer.deserializeStr();\n const functionName = deserializer.deserializeStr();\n // deserialize the variant\n const variant = deserializer.deserializeUleb128AsU32();\n // deserialize the signing message digest\n const signingMessageDigest = deserializer.deserializeBytes();\n\n if (variant === AbstractAuthenticationDataVariant.V1) {\n const abstractionSignature = deserializer.deserializeFixedBytes(deserializer.remaining());\n return new AccountAuthenticatorAbstraction(\n `${moduleAddress}::${moduleName}::${functionName}`,\n signingMessageDigest,\n abstractionSignature,\n );\n }\n if (variant === AbstractAuthenticationDataVariant.DerivableV1) {\n const abstractionSignature = deserializer.deserializeBytes();\n const abstractPublicKey = deserializer.deserializeBytes();\n return new AccountAuthenticatorAbstraction(\n `${moduleAddress}::${moduleName}::${functionName}`,\n signingMessageDigest,\n abstractionSignature,\n abstractPublicKey,\n );\n }\n throw new Error(`Unknown variant index for AccountAuthenticatorAbstraction: ${variant}`);\n }\n}\n\n/**\n * Represents an account abstraction message that contains the original signing message and the function info.\n *\n * @param originalSigningMessage - The original signing message.\n * @param functionInfo - The function info of the authentication function.\n * @group Implementation\n * @category Transactions\n */\nexport class AccountAbstractionMessage extends Serializable {\n public readonly originalSigningMessage: Hex;\n\n public readonly functionInfo: string;\n\n constructor(originalSigningMessage: HexInput, functionInfo: string) {\n super();\n this.originalSigningMessage = Hex.fromHexInput(Hex.fromHexInput(originalSigningMessage).toUint8Array());\n this.functionInfo = functionInfo;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AASigningDataVariant.V1);\n serializer.serializeBytes(this.originalSigningMessage.toUint8Array());\n const { moduleAddress, moduleName, functionName } = getFunctionParts(this.functionInfo as MoveFunctionId);\n AccountAddress.fromString(moduleAddress).serialize(serializer);\n serializer.serializeStr(moduleName);\n serializer.serializeStr(functionName);\n }\n\n static deserialize(deserializer: Deserializer): AccountAbstractionMessage {\n const variant = deserializer.deserializeUleb128AsU32();\n if (variant !== AASigningDataVariant.V1) {\n throw new Error(`Unknown variant index for AccountAbstractionMessage: ${variant}`);\n }\n const originalSigningMessage = deserializer.deserializeBytes();\n const functionInfoModuleAddress = AccountAddress.deserialize(deserializer);\n const functionInfoModuleName = deserializer.deserializeStr();\n const functionInfoFunctionName = deserializer.deserializeStr();\n const functionInfo = `${functionInfoModuleAddress}::${functionInfoModuleName}::${functionInfoFunctionName}`;\n return new AccountAbstractionMessage(originalSigningMessage, functionInfo);\n }\n}\n"],"mappings":"AAKA,OAAmC,gBAAAA,MAAoB,YACvD,OAAS,gBAAAC,EAAc,gBAAAC,MAAoB,oBAC3C,OAAS,oBAAAC,EAAkB,oBAAAC,MAAwB,4BACnD,OAAS,yBAAAC,EAAuB,yBAAAC,MAA6B,iCAC7D,OAAS,YAAAC,EAAU,qBAAAC,MAAyB,6BAC5C,OAAS,+BAAAC,MAA6D,cACtE,OAAS,wBAAAC,EAAsB,qCAAAC,MAAyC,0BACxE,OAAS,kBAAAC,EAAgB,OAAAC,MAAW,aACpC,OAAS,oBAAAC,EAAkB,uBAAAC,MAA2B,sBAW/C,MAAeC,UAA6BhB,CAAa,CAW9D,OAAO,YAAYiB,EAAkD,CACnE,MAAMC,EAAQD,EAAa,wBAAwB,EACnD,OAAQC,EAAO,CACb,KAAKT,EAA4B,QAC/B,OAAOU,EAA4B,KAAKF,CAAY,EACtD,KAAKR,EAA4B,aAC/B,OAAOW,EAAiC,KAAKH,CAAY,EAC3D,KAAKR,EAA4B,UAC/B,OAAOY,EAA8B,KAAKJ,CAAY,EACxD,KAAKR,EAA4B,SAC/B,OAAOa,EAA6B,KAAKL,CAAY,EACvD,KAAKR,EAA4B,uBAC/B,OAAOc,EAA2C,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W,sBAAsBjB,EAAqB,EAAE,EACxDiB,EAAW,eAAe,KAAK,uBAAuB,aAAa,CAAC,EACpE,KAAM,CAAE,cAAAO,EAAe,WAAAC,EAAY,aAAAC,CAAa,EAAItB,EAAiB,KAAK,YAA8B,EACxGF,EAAe,WAAWsB,CAAa,EAAE,UAAUP,CAAU,EAC7DA,EAAW,aAAaQ,CAAU,EAClCR,EAAW,aAAaS,CAAY,CACtC,CAEA,OAAO,YAAYnB,EAAuD,CACxE,MAAMoB,EAAUpB,EAAa,wBAAwB,EACrD,GAAIoB,IAAY3B,EAAqB,GACnC,MAAM,IAAI,MAAM,wDAAwD2B,CAAO,EAAE,EAEnF,MAAMG,EAAyBvB,EAAa,iBAAiB,EACvDwB,EAA4B7B,EAAe,YAAYK,CAAY,EACnEyB,EAAyBzB,EAAa,eAAe,EACrD0B,EAA2B1B,EAAa,eAAe,EACvDa,EAAe,GAAGW,CAAyB,KAAKC,CAAsB,KAAKC,CAAwB,GACzG,OAAO,IAAIJ,EAA0BC,EAAwBV,CAAY,CAC3E,CACF","names":["Serializable","AnyPublicKey","AnySignature","Ed25519PublicKey","Ed25519Signature","MultiEd25519PublicKey","MultiEd25519Signature","MultiKey","MultiKeySignature","AccountAuthenticatorVariant","AASigningDataVariant","AbstractAuthenticationDataVariant","AccountAddress","Hex","getFunctionParts","isValidFunctionInfo","AccountAuthenticator","deserializer","index","AccountAuthenticatorEd25519","AccountAuthenticatorMultiEd25519","AccountAuthenticatorSingleKey","AccountAuthenticatorMultiKey","AccountAuthenticatorNoAccountAuthenticator","AccountAuthenticatorAbstraction","public_key","signature","serializer","public_keys","signatures","functionInfo","signingMessageDigest","abstractionSignature","accountIdentity","moduleAddress","moduleName","functionName","variant","abstractPublicKey","AccountAbstractionMessage","originalSigningMessage","functionInfoModuleAddress","functionInfoModuleName","functionInfoFunctionName"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- export*from"./account";export*from"./transaction";
1
+ import{$ as g,Qa as i,Ra as j,Sa as k,Ta as l,Ua as m,V as a,Va as n,W as b,X as c,Y as d,Z as e,_ as f,aa as h}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{h as AccountAbstractionMessage,a as AccountAuthenticator,g as AccountAuthenticatorAbstraction,b as AccountAuthenticatorEd25519,c as AccountAuthenticatorMultiEd25519,e as AccountAuthenticatorMultiKey,f as AccountAuthenticatorNoAccountAuthenticator,d as AccountAuthenticatorSingleKey,i as TransactionAuthenticator,j as TransactionAuthenticatorEd25519,m as TransactionAuthenticatorFeePayer,l as TransactionAuthenticatorMultiAgent,k as TransactionAuthenticatorMultiEd25519,n as TransactionAuthenticatorSingleSender};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/authenticator/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from \"./account\";\nexport * from \"./transaction\";\n"],"mappings":"AAGA,WAAc,YACd,WAAc","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{AccountAuthenticator as i}from"./account";import{Serializable as g}from"../../bcs";import{AccountAddress as A}from"../../core";import{Ed25519PublicKey as b,Ed25519Signature as _}from"../../core/crypto/ed25519";import{MultiEd25519PublicKey as z,MultiEd25519Signature as S}from"../../core/crypto/multiEd25519";import{TransactionAuthenticatorVariant as s}from"../../types";class a extends g{static deserialize(e){const t=e.deserializeUleb128AsU32();switch(t){case s.Ed25519:return c.load(e);case s.MultiEd25519:return o.load(e);case s.MultiAgent:return u.load(e);case s.FeePayer:return d.load(e);case s.SingleSender:return l.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${t}`)}}isEd25519(){return this instanceof c}isMultiEd25519(){return this instanceof o}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof d}isSingleSender(){return this instanceof l}}class c extends a{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(s.Ed25519),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){const t=b.deserialize(e),r=_.deserialize(e);return new c(t,r)}}class o extends a{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(s.MultiEd25519),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){const t=z.deserialize(e),r=S.deserialize(e);return new o(t,r)}}class u extends a{constructor(e,t,r){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=r}serialize(e){e.serializeU32AsUleb128(s.MultiAgent),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){const t=i.deserialize(e),r=e.deserializeVector(A),n=e.deserializeVector(i);return new u(t,r,n)}}class d extends a{constructor(e,t,r,n){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=r,this.fee_payer=n}serialize(e){e.serializeU32AsUleb128(s.FeePayer),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){const t=i.deserialize(e),r=e.deserializeVector(A),n=e.deserializeVector(i),h=A.deserialize(e),y=i.deserialize(e),p={address:h,authenticator:y};return new d(t,r,n,p)}}class l extends a{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(s.SingleSender),this.sender.serialize(e)}static load(e){const t=i.deserialize(e);return new l(t)}}export{a as TransactionAuthenticator,c as TransactionAuthenticatorEd25519,d as TransactionAuthenticatorFeePayer,u as TransactionAuthenticatorMultiAgent,o as TransactionAuthenticatorMultiEd25519,l as TransactionAuthenticatorSingleSender};
1
+ import{Qa as a,Ra as b,Sa as c,Ta as d,Ua as e,Va as f}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as TransactionAuthenticator,b as TransactionAuthenticatorEd25519,e as TransactionAuthenticatorFeePayer,d as TransactionAuthenticatorMultiAgent,c as TransactionAuthenticatorMultiEd25519,f as TransactionAuthenticatorSingleSender};
2
2
  //# sourceMappingURL=transaction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/authenticator/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { AccountAuthenticator } from \"./account\";\nimport { Deserializer, Serializable, Serializer } from \"../../bcs\";\nimport { AccountAddress } from \"../../core\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"../../core/crypto/ed25519\";\nimport { MultiEd25519PublicKey, MultiEd25519Signature } from \"../../core/crypto/multiEd25519\";\nimport { TransactionAuthenticatorVariant } from \"../../types\";\n\n/**\n * Represents an abstract base class for transaction authenticators.\n * This class provides methods for serializing and deserializing different types of transaction authenticators.\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport abstract class TransactionAuthenticator extends Serializable {\n abstract serialize(serializer: Serializer): void;\n\n /**\n * Deserializes a TransactionAuthenticator from the provided deserializer.\n * This function helps in reconstructing the TransactionAuthenticator based on the variant index found in the serialized data.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): TransactionAuthenticator {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case TransactionAuthenticatorVariant.Ed25519:\n return TransactionAuthenticatorEd25519.load(deserializer);\n case TransactionAuthenticatorVariant.MultiEd25519:\n return TransactionAuthenticatorMultiEd25519.load(deserializer);\n case TransactionAuthenticatorVariant.MultiAgent:\n return TransactionAuthenticatorMultiAgent.load(deserializer);\n case TransactionAuthenticatorVariant.FeePayer:\n return TransactionAuthenticatorFeePayer.load(deserializer);\n case TransactionAuthenticatorVariant.SingleSender:\n return TransactionAuthenticatorSingleSender.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TransactionAuthenticator: ${index}`);\n }\n }\n\n isEd25519(): this is TransactionAuthenticatorEd25519 {\n return this instanceof TransactionAuthenticatorEd25519;\n }\n\n isMultiEd25519(): this is TransactionAuthenticatorMultiEd25519 {\n return this instanceof TransactionAuthenticatorMultiEd25519;\n }\n\n isMultiAgent(): this is TransactionAuthenticatorMultiAgent {\n return this instanceof TransactionAuthenticatorMultiAgent;\n }\n\n isFeePayer(): this is TransactionAuthenticatorFeePayer {\n return this instanceof TransactionAuthenticatorFeePayer;\n }\n\n isSingleSender(): this is TransactionAuthenticatorSingleSender {\n return this instanceof TransactionAuthenticatorSingleSender;\n }\n}\n\n/**\n * Represents a transaction authenticator using Ed25519 for a single signer transaction.\n * This class encapsulates the client's public key and the Ed25519 signature of a raw transaction.\n *\n * @param public_key - The client's public key.\n * @param signature - The Ed25519 signature of a raw transaction.\n * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}\n * for details about generating a signature.\n * @group Implementation\n * @category Transactions\n */\nexport class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {\n public readonly public_key: Ed25519PublicKey;\n\n public readonly signature: Ed25519Signature;\n\n /**\n * Creates an instance of the class with the specified account authenticator.\n *\n * @param public_key - The Ed25519PublicKey that will be used for authentication.\n * @param signature - The Ed25519Signature that will be used for authentication.\n * @group Implementation\n * @category Transactions\n */\n constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n /**\n * Serializes the transaction authenticator by encoding the sender information.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionAuthenticatorVariant.Ed25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n /**\n * Loads a TransactionAuthenticatorSingleSender instance from the provided deserializer.\n * This function helps in deserializing the sender information to create a transaction authenticator.\n *\n * @param deserializer - The deserializer used to extract the sender data.\n * @group Implementation\n * @category Transactions\n */\n static load(deserializer: Deserializer): TransactionAuthenticatorEd25519 {\n const public_key = Ed25519PublicKey.deserialize(deserializer);\n const signature = Ed25519Signature.deserialize(deserializer);\n return new TransactionAuthenticatorEd25519(public_key, signature);\n }\n}\n\n/**\n * Represents a transaction authenticator for multi-signature transactions using Ed25519.\n * This class is used to validate transactions that require multiple signatures from different signers.\n *\n * @param public_key - The public key of the client involved in the transaction.\n * @param signature - The multi-signature of the raw transaction.\n * @group Implementation\n * @category Transactions\n */\nexport class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {\n public readonly public_key: MultiEd25519PublicKey;\n\n public readonly signature: MultiEd25519Signature;\n\n constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionAuthenticatorVariant.MultiEd25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519 {\n const public_key = MultiEd25519PublicKey.deserialize(deserializer);\n const signature = MultiEd25519Signature.deserialize(deserializer);\n return new TransactionAuthenticatorMultiEd25519(public_key, signature);\n }\n}\n\n/**\n * Represents a transaction authenticator for a multi-agent transaction.\n *\n * This class manages the authentication process involving a primary sender and multiple secondary signers.\n *\n * @param sender - The authenticator for the sender account.\n * @param secondary_signer_addresses - An array of addresses for the secondary signers.\n * @param secondary_signers - An array of authenticators for the secondary signer accounts.\n * @group Implementation\n * @category Transactions\n */\nexport class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {\n public readonly sender: AccountAuthenticator;\n\n public readonly secondary_signer_addresses: Array<AccountAddress>;\n\n public readonly secondary_signers: Array<AccountAuthenticator>;\n\n constructor(\n sender: AccountAuthenticator,\n secondary_signer_addresses: Array<AccountAddress>,\n secondary_signers: Array<AccountAuthenticator>,\n ) {\n super();\n this.sender = sender;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.secondary_signers = secondary_signers;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionAuthenticatorVariant.MultiAgent);\n this.sender.serialize(serializer);\n serializer.serializeVector<AccountAddress>(this.secondary_signer_addresses);\n serializer.serializeVector<AccountAuthenticator>(this.secondary_signers);\n }\n\n static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent {\n const sender = AccountAuthenticator.deserialize(deserializer);\n const secondary_signer_addresses = deserializer.deserializeVector(AccountAddress);\n const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);\n return new TransactionAuthenticatorMultiAgent(sender, secondary_signer_addresses, secondary_signers);\n }\n}\n\n/**\n * Represents a transaction authenticator specifically for fee payer transactions.\n * It encapsulates the sender's account authenticator, addresses of secondary signers,\n * their respective authenticators, and the fee payer's account information.\n *\n * @param sender - The authenticator for the sender's account.\n * @param secondary_signer_addresses - An array of addresses for secondary signers.\n * @param secondary_signers - An array of authenticators for secondary signers' accounts.\n * @param fee_payer - An object containing the fee payer's account address and authenticator.\n * @group Implementation\n * @category Transactions\n */\nexport class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {\n public readonly sender: AccountAuthenticator;\n\n public readonly secondary_signer_addresses: Array<AccountAddress>;\n\n public readonly secondary_signers: Array<AccountAuthenticator>;\n\n public readonly fee_payer: {\n address: AccountAddress;\n authenticator: AccountAuthenticator;\n };\n\n constructor(\n sender: AccountAuthenticator,\n secondary_signer_addresses: Array<AccountAddress>,\n secondary_signers: Array<AccountAuthenticator>,\n fee_payer: { address: AccountAddress; authenticator: AccountAuthenticator },\n ) {\n super();\n this.sender = sender;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.secondary_signers = secondary_signers;\n this.fee_payer = fee_payer;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionAuthenticatorVariant.FeePayer);\n this.sender.serialize(serializer);\n serializer.serializeVector<AccountAddress>(this.secondary_signer_addresses);\n serializer.serializeVector<AccountAuthenticator>(this.secondary_signers);\n this.fee_payer.address.serialize(serializer);\n this.fee_payer.authenticator.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent {\n const sender = AccountAuthenticator.deserialize(deserializer);\n const secondary_signer_addresses = deserializer.deserializeVector(AccountAddress);\n const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);\n const address = AccountAddress.deserialize(deserializer);\n const authenticator = AccountAuthenticator.deserialize(deserializer);\n const fee_payer = { address, authenticator };\n return new TransactionAuthenticatorFeePayer(sender, secondary_signer_addresses, secondary_signers, fee_payer);\n }\n}\n\n/**\n * Represents a single sender authenticator for transactions that require a single signer.\n * This class is responsible for managing the authentication of a transaction initiated by a single sender.\n *\n * @param sender - An instance of AccountAuthenticator that represents the account of the sender.\n * @group Implementation\n * @category Transactions\n */\nexport class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {\n public readonly sender: AccountAuthenticator;\n\n constructor(sender: AccountAuthenticator) {\n super();\n this.sender = sender;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionAuthenticatorVariant.SingleSender);\n this.sender.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender {\n const sender = AccountAuthenticator.deserialize(deserializer);\n return new TransactionAuthenticatorSingleSender(sender);\n }\n}\n"],"mappings":"AAKA,OAAS,wBAAAA,MAA4B,YACrC,OAAuB,gBAAAC,MAAgC,YACvD,O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,UAAUA,CAAU,EAC3C,KAAK,UAAU,cAAc,UAAUA,CAAU,CACnD,CAEA,OAAO,KAAKT,EAAgE,CAC1E,MAAMU,EAASnB,EAAqB,YAAYS,CAAY,EACtDW,EAA6BX,EAAa,kBAAkBP,CAAc,EAC1EmB,EAAoBZ,EAAa,kBAAkBT,CAAoB,EACvEuB,EAAUrB,EAAe,YAAYO,CAAY,EACjDe,EAAgBxB,EAAqB,YAAYS,CAAY,EAC7Da,EAAY,CAAE,QAAAC,EAAS,cAAAC,CAAc,EAC3C,OAAO,IAAIV,EAAiCK,EAAQC,EAA4BC,EAAmBC,CAAS,CAC9G,CACF,CAUO,MAAMP,UAA6CP,CAAyB,CAGjF,YAAYW,EAA8B,CACxC,MAAM,EACN,KAAK,OAASA,CAChB,CAEA,UAAUD,EAA8B,CACtCA,EAAW,sBAAsBX,EAAgC,YAAY,EAC7E,KAAK,OAAO,UAAUW,CAAU,CAClC,CAEA,OAAO,KAAKT,EAAkE,CAC5E,MAAMU,EAASnB,EAAqB,YAAYS,CAAY,EAC5D,OAAO,IAAIM,EAAqCI,CAAM,CACxD,CACF","names":["AccountAuthenticator","Serializable","AccountAddress","Ed25519PublicKey","Ed25519Signature","MultiEd25519PublicKey","MultiEd25519Signature","TransactionAuthenticatorVariant","TransactionAuthenticator","deserializer","index","TransactionAuthenticatorEd25519","TransactionAuthenticatorMultiEd25519","TransactionAuthenticatorMultiAgent","TransactionAuthenticatorFeePayer","TransactionAuthenticatorSingleSender","public_key","signature","serializer","sender","secondary_signer_addresses","secondary_signers","fee_payer","address","authenticator"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- export*from"./authenticator";export*from"./instances";export*from"./transactionBuilder";export*from"./typeTag";export*from"./typeTag/parser";export*from"./types";
1
+ import{$ as g,$a as ja,$b as Va,Aa as J,Ab as ua,Ba as K,Bb as va,Ca as L,Cb as wa,Da as M,Db as xa,Ea as N,Eb as ya,Fa as O,Fb as za,Ga as P,Gb as Aa,Ha as Q,Hb as Ba,Ia as R,Ib as Ca,Ja as S,Jb as Da,Ka as T,Kb as Ea,La as U,Lb as Fa,Ma as V,Mb as Ga,Na as W,Nb as Ha,Oa as X,Ob as Ia,Pa as Y,Pb as Ja,Qa as _,Qb as Ka,Ra as $,Rb as La,Sa as aa,Sb as Ma,Ta as ba,Tb as Na,Ua as ca,Ub as Oa,V as a,Va as da,Vb as Pa,W as b,Wa as ea,Wb as Qa,X as c,Xa as fa,Xb as Ra,Y as d,Ya as ga,Yb as Sa,Z as e,Za as ha,Zb as Ta,_ as f,_a as ia,_b as Ua,aa as h,ab as ka,ac as Wa,ba as k,bc as Xa,ca as l,cc as Ya,da as m,dc as Za,ea as n,ec as _a,fa as o,fc as $a,ga as p,ha as q,ia as r,ja as s,ka as t,la as u,ma as v,na as w,oa as x,pa as y,qa as z,ra as A,rb as la,sa as B,sb as ma,ta as C,tb as na,ua as D,ub as oa,va as E,vb as pa,wa as F,wb as qa,xa as G,xb as ra,ya as H,yb as sa,za as I,zb as ta}from"../chunk-PJTG745G.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-XJJVJOX5.mjs";import"../chunk-QNARIAVM.mjs";import"../chunk-2PASUPUO.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-RQX6JOEN.mjs";import"../chunk-WSR5EBJM.mjs";import"../chunk-WCMW2L3P.mjs";import{a as Z}from"../chunk-V74WPKSY.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-626KB2UQ.mjs";import{a as i}from"../chunk-XKUIMGKU.mjs";import{a as j}from"../chunk-N6YTF76Q.mjs";import"../chunk-FGFLPH5K.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-ZP4DWSQA.mjs";import"../chunk-2OPKZKOB.mjs";import"../chunk-FC72YL4B.mjs";import"../chunk-YS5IUILF.mjs";import"../chunk-PSSIJHHC.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-R7FWJP3N.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-AQW4BUKF.mjs";import"../chunk-E2U27PNC.mjs";import"../chunk-LAPXUUHK.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-YZHAI55C.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-Q4W3WJ2U.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-LA56UDUK.mjs";import"../chunk-ZYE7UTJZ.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-MCFQE4GC.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NCKJ7X57.mjs";import"../chunk-P5HCJN3A.mjs";import"../chunk-OLILO7VD.mjs";import"../chunk-H3EP5CGP.mjs";import"../chunk-KDMSOCZY.mjs";export{h as AccountAbstractionMessage,a as AccountAuthenticator,g as AccountAuthenticatorAbstraction,b as AccountAuthenticatorEd25519,c as AccountAuthenticatorMultiEd25519,e as AccountAuthenticatorMultiKey,f as AccountAuthenticatorNoAccountAuthenticator,d as AccountAuthenticatorSingleKey,i as ChainId,J as EntryFunction,Y as FeePayerRawTransaction,j as Identifier,k as ModuleId,X as MultiAgentRawTransaction,ga as MultiAgentTransaction,L as MultiSig,M as MultiSigTransactionPayload,V as RawTransaction,W as RawTransactionWithData,Z as RotationProofChallenge,K as Script,ea as SignedTransaction,fa as SimpleTransaction,z as StructTag,_ as TransactionAuthenticator,$ as TransactionAuthenticatorEd25519,ca as TransactionAuthenticatorFeePayer,ba as TransactionAuthenticatorMultiAgent,aa as TransactionAuthenticatorMultiEd25519,da as TransactionAuthenticatorSingleSender,P as TransactionExecutable,S as TransactionExecutableEmpty,R as TransactionExecutableEntryFunction,Q as TransactionExecutableScript,T as TransactionExtraConfig,U as TransactionExtraConfigV1,N as TransactionInnerPayload,O as TransactionInnerPayloadV1,F as TransactionPayload,H as TransactionPayloadEntryFunction,I as TransactionPayloadMultiSig,G as TransactionPayloadScript,l as TypeTag,t as TypeTagAddress,m as TypeTagBool,w as TypeTagGeneric,ma as TypeTagParserError,la as TypeTagParserErrorType,v as TypeTagReference,u as TypeTagSigner,y as TypeTagStruct,r as TypeTagU128,o as TypeTagU16,s as TypeTagU256,p as TypeTagU32,q as TypeTagU64,n as TypeTagU8,x as TypeTagVector,A as aptosCoinStructTag,Wa as buildTransaction,Pa as checkOrConvertArgument,Oa as convertArgument,ra as convertNumber,Va as convertPayloadToInnerPayload,ha as deriveTransactionType,E as deserializeFromScriptArgument,Ma as fetchEntryFunctionAbi,Ka as fetchFunctionAbi,Ja as fetchModuleAbi,La as fetchMoveFunctionAbi,Na as fetchViewFunctionAbi,Ha as findFirstNonSignerArg,Ua as generateRawTransaction,Za as generateSignedTransaction,Xa as generateSignedTransactionForSimulation,ia as generateSigningMessage,ja as generateSigningMessageForSerializable,ka as generateSigningMessageForTransaction,Qa as generateTransactionPayload,Ra as generateTransactionPayloadWithABI,$a as generateUserTransactionHash,Sa as generateViewFunctionPayload,Ta as generateViewFunctionPayloadWithABI,Ya as getAuthenticatorForSimulation,_a as hashValues,wa as isBcsAddress,va as isBcsBool,ya as isBcsFixedBytes,xa as isBcsString,Da as isBcsU128,Aa as isBcsU16,Ea as isBcsU256,Ba as isBcsU32,Ca as isBcsU64,za as isBcsU8,oa as isBool,ta as isEmptyOption,ua as isEncodedEntryFunctionArgument,sa as isLargeNumber,qa as isNumber,Fa as isScriptDataInput,pa as isString,D as objectStructTag,C as optionStructTag,na as parseTypeTag,Ia as standardizeTypeTags,B as stringStructTag,Ga as throwTypeMismatch};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/transactions/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from \"./authenticator\";\nexport * from \"./instances\";\nexport * from \"./transactionBuilder\";\nexport * from \"./typeTag\";\nexport * from \"./typeTag/parser\";\nexport * from \"./types\";\n"],"mappings":"AAGA,WAAc,kBACd,WAAc,cACd,WAAc,uBACd,WAAc,YACd,WAAc,mBACd,WAAc","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as a}from"../../bcs/serializer";class i extends a{constructor(e){super(),this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){const r=e.deserializeU8();return new i(r)}}export{i as ChainId};
1
+ import{a}from"../../chunk-XKUIMGKU.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as ChainId};
2
2
  //# sourceMappingURL=chainId.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/chainId.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Serializer, Serializable } from \"../../bcs/serializer\";\nimport { Deserializer } from \"../../bcs/deserializer\";\n\n/**\n * Represents a ChainId that can be serialized and deserialized.\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport class ChainId extends Serializable {\n public readonly chainId: number;\n\n /**\n * Initializes a new instance of the class with the specified chain ID.\n *\n * @param chainId - The ID of the blockchain network to be used.\n * @group Implementation\n * @category Transactions\n */\n constructor(chainId: number) {\n super();\n this.chainId = chainId;\n }\n\n /**\n * Serializes the current object using the provided serializer.\n * This function helps in converting the object into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n serializer.serializeU8(this.chainId);\n }\n\n /**\n * Deserializes a ChainId from the provided deserializer.\n * This function allows you to reconstruct a ChainId object from serialized data.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): ChainId {\n const chainId = deserializer.deserializeU8();\n return new ChainId(chainId);\n }\n}\n"],"mappings":"AAGA,OAAqB,gBAAAA,MAAoB,uBAUlC,MAAMC,UAAgBD,CAAa,CAUxC,YAAYE,EAAiB,CAC3B,MAAM,EACN,KAAK,QAAUA,CACjB,CAUA,UAAUC,EAA8B,CACtCA,EAAW,YAAY,KAAK,OAAO,CACrC,CAUA,OAAO,YAAYC,EAAqC,CACtD,MAAMF,EAAUE,EAAa,cAAc,EAC3C,OAAO,IAAIH,EAAQC,CAAO,CAC5B,CACF","names":["Serializable","ChainId","chainId","serializer","deserializer"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as t}from"../../bcs/serializer";class e extends t{constructor(i){super(),this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){const r=i.deserializeStr();return new e(r)}}export{e as Identifier};
1
+ import{a}from"../../chunk-N6YTF76Q.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as Identifier};
2
2
  //# sourceMappingURL=identifier.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/identifier.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\n\n/**\n * Represents an Identifier that can be serialized and deserialized.\n * This class is used to denote the module \"name\" in \"ModuleId\" and\n * the \"function name\" in \"EntryFunction\".\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport class Identifier extends Serializable {\n public identifier: string;\n\n /**\n * Creates an instance of the class with a specified identifier.\n *\n * @param identifier - The unique identifier for the instance.\n * @group Implementation\n * @category Transactions\n */\n constructor(identifier: string) {\n super();\n this.identifier = identifier;\n }\n\n /**\n * Serializes the identifier of the current instance using the provided serializer.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n public serialize(serializer: Serializer): void {\n serializer.serializeStr(this.identifier);\n }\n\n /**\n * Deserializes an identifier from the provided deserializer.\n * This function is useful for reconstructing an Identifier object from a serialized format.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): Identifier {\n const identifier = deserializer.deserializeStr();\n return new Identifier(identifier);\n }\n}\n"],"mappings":"AAIA,OAAS,gBAAAA,MAAgC,uBAWlC,MAAMC,UAAmBD,CAAa,CAU3C,YAAYE,EAAoB,CAC9B,MAAM,EACN,KAAK,WAAaA,CACpB,CASO,UAAUC,EAA8B,CAC7CA,EAAW,aAAa,KAAK,UAAU,CACzC,CAUA,OAAO,YAAYC,EAAwC,CACzD,MAAMF,EAAaE,EAAa,eAAe,EAC/C,OAAO,IAAIH,EAAWC,CAAU,CAClC,CACF","names":["Serializable","Identifier","identifier","serializer","deserializer"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- export*from"./chainId";export*from"./identifier";export*from"./moduleId";export*from"./rawTransaction";export*from"./rotationProofChallenge";export*from"./signedTransaction";export*from"./transactionArgument";export*from"./transactionPayload";export*from"./simpleTransaction";export*from"./multiAgentTransaction";
1
+ import{Aa as i,Ba as j,Ca as k,Da as l,Ea as m,Fa as n,Ga as o,Ha as p,Ia as q,Ja as r,Ka as s,La as t,Ma as u,Na as v,Oa as w,Pa as x,Wa as z,Xa as A,Ya as B,ba as c,va as d,wa as e,xa as f,ya as g,za as h}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import{a as y}from"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import{a}from"../../chunk-XKUIMGKU.mjs";import{a as b}from"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as ChainId,i as EntryFunction,x as FeePayerRawTransaction,b as Identifier,c as ModuleId,w as MultiAgentRawTransaction,B as MultiAgentTransaction,k as MultiSig,l as MultiSigTransactionPayload,u as RawTransaction,v as RawTransactionWithData,y as RotationProofChallenge,j as Script,z as SignedTransaction,A as SimpleTransaction,o as TransactionExecutable,r as TransactionExecutableEmpty,q as TransactionExecutableEntryFunction,p as TransactionExecutableScript,s as TransactionExtraConfig,t as TransactionExtraConfigV1,m as TransactionInnerPayload,n as TransactionInnerPayloadV1,e as TransactionPayload,g as TransactionPayloadEntryFunction,h as TransactionPayloadMultiSig,f as TransactionPayloadScript,d as deserializeFromScriptArgument};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/index.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from \"./chainId\";\nexport * from \"./identifier\";\nexport * from \"./moduleId\";\nexport * from \"./rawTransaction\";\nexport * from \"./rotationProofChallenge\";\nexport * from \"./signedTransaction\";\nexport * from \"./transactionArgument\";\nexport * from \"./transactionPayload\";\nexport * from \"./simpleTransaction\";\nexport * from \"./multiAgentTransaction\";\n"],"mappings":"AAGA,WAAc,YACd,WAAc,eACd,WAAc,aACd,WAAc,mBACd,WAAc,2BACd,WAAc,sBACd,WAAc,wBACd,WAAc,uBACd,WAAc,sBACd,WAAc","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as o}from"../../bcs/serializer";import{AccountAddress as s}from"../../core";import{Identifier as t}from"./identifier";class i extends o{constructor(e,r){super(),this.address=e,this.name=r}static fromStr(e){const r=e.split("::");if(r.length!==2)throw new Error("Invalid module id.");return new i(s.fromString(r[0]),new t(r[1]))}serialize(e){this.address.serialize(e),this.name.serialize(e)}static deserialize(e){const r=s.deserialize(e),d=t.deserialize(e);return new i(r,d)}}export{i as ModuleId};
1
+ import{ba as a}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as ModuleId};
2
2
  //# sourceMappingURL=moduleId.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/moduleId.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { AccountAddress } from \"../../core\";\nimport { Identifier } from \"./identifier\";\nimport { MoveModuleId } from \"../../types\";\n\n/**\n * Represents a ModuleId that can be serialized and deserialized.\n * A ModuleId consists of a module address (e.g., \"0x1\") and a module name (e.g., \"coin\").\n * @group Implementation\n * @category Transactions\n */\nexport class ModuleId extends Serializable {\n public readonly address: AccountAddress;\n\n public readonly name: Identifier;\n\n /**\n * Initializes a new instance of the module with the specified account address and name.\n *\n * @param address - The account address, e.g., \"0x1\".\n * @param name - The module name under the specified address, e.g., \"coin\".\n * @group Implementation\n * @category Transactions\n */\n constructor(address: AccountAddress, name: Identifier) {\n super();\n this.address = address;\n this.name = name;\n }\n\n /**\n * Converts a string literal in the format \"account_address::module_name\" to a ModuleId.\n * @param moduleId - A string literal representing the module identifier.\n * @throws Error if the provided moduleId is not in the correct format.\n * @returns ModuleId - The corresponding ModuleId object.\n * @group Implementation\n * @category Transactions\n */\n static fromStr(moduleId: MoveModuleId): ModuleId {\n const parts = moduleId.split(\"::\");\n if (parts.length !== 2) {\n throw new Error(\"Invalid module id.\");\n }\n return new ModuleId(AccountAddress.fromString(parts[0]), new Identifier(parts[1]));\n }\n\n /**\n * Serializes the address and name properties using the provided serializer.\n * This function is essential for converting the object's data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n this.address.serialize(serializer);\n this.name.serialize(serializer);\n }\n\n /**\n * Deserializes a ModuleId from the provided deserializer.\n * This function retrieves the account address and identifier to construct a ModuleId instance.\n *\n * @param deserializer - The deserializer instance used to read the data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): ModuleId {\n const address = AccountAddress.deserialize(deserializer);\n const name = Identifier.deserialize(deserializer);\n return new ModuleId(address, name);\n }\n}\n"],"mappings":"AAGA,OAAS,gBAAAA,MAAgC,uBAEzC,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,cAAAC,MAAkB,eASpB,MAAMC,UAAiBH,CAAa,CAazC,YAAYI,EAAyBC,EAAkB,CACrD,MAAM,EACN,KAAK,QAAUD,EACf,KAAK,KAAOC,CACd,CAUA,OAAO,QAAQC,EAAkC,CAC/C,MAAMC,EAAQD,EAAS,MAAM,IAAI,EACjC,GAAIC,EAAM,SAAW,EACnB,MAAM,IAAI,MAAM,oBAAoB,EAEtC,OAAO,IAAIJ,EAASF,EAAe,WAAWM,EAAM,CAAC,CAAC,EAAG,IAAIL,EAAWK,EAAM,CAAC,CAAC,CAAC,CACnF,CAUA,UAAUC,EAA8B,CACtC,KAAK,QAAQ,UAAUA,CAAU,EACjC,KAAK,KAAK,UAAUA,CAAU,CAChC,CAUA,OAAO,YAAYC,EAAsC,CACvD,MAAML,EAAUH,EAAe,YAAYQ,CAAY,EACjDJ,EAAOH,EAAW,YAAYO,CAAY,EAChD,OAAO,IAAIN,EAASC,EAASC,CAAI,CACnC,CACF","names":["Serializable","AccountAddress","Identifier","ModuleId","address","name","moduleId","parts","serializer","deserializer"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as t}from"../../bcs/serializer";import{AccountAddress as a}from"../../core";import{RawTransaction as o}from"./rawTransaction";class n extends t{constructor(e,s,r){super(),this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){const s=o.deserialize(e),r=e.deserializeVector(a),d=e.deserializeBool();let i;return d&&(i=a.deserialize(e)),new n(s,r,i)}}export{n as MultiAgentTransaction};
1
+ import{Ya as a}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as MultiAgentTransaction};
2
2
  //# sourceMappingURL=multiAgentTransaction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/multiAgentTransaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { AccountAddress } from \"../../core\";\nimport { RawTransaction } from \"./rawTransaction\";\n\n/**\n * Represents a multi-agent transaction that can be serialized and deserialized.\n * This transaction includes a raw transaction, optional fee payer address, and multiple secondary signer addresses.\n *\n * @param rawTransaction The raw transaction to be executed.\n * @param secondarySignerAddresses An array of secondary signer addresses involved in the transaction.\n * @param feePayerAddress An optional account address that sponsors the transaction's gas fees.\n * @group Implementation\n * @category Transactions\n */\nexport class MultiAgentTransaction extends Serializable {\n public rawTransaction: RawTransaction;\n\n public feePayerAddress?: AccountAddress | undefined;\n\n public secondarySignerAddresses: AccountAddress[];\n\n /**\n * Represents a MultiAgentTransaction that can be submitted to the Aptos chain for execution.\n * This class encapsulates the raw transaction data, the secondary signer addresses, and an optional fee payer address.\n *\n * @param rawTransaction The raw transaction data.\n * @param secondarySignerAddresses An array of secondary signer addresses.\n * @param feePayerAddress An optional account address that sponsors the gas fees.\n * @group Implementation\n * @category Transactions\n */\n constructor(\n rawTransaction: RawTransaction,\n secondarySignerAddresses: AccountAddress[],\n feePayerAddress?: AccountAddress,\n ) {\n super();\n this.rawTransaction = rawTransaction;\n this.feePayerAddress = feePayerAddress;\n this.secondarySignerAddresses = secondarySignerAddresses;\n }\n\n /**\n * Serializes the transaction data, including the raw transaction, secondary signer addresses, and fee payer address.\n * This function is essential for preparing the transaction for transmission or storage in a serialized format.\n *\n * @param serializer - The serializer instance used to serialize the transaction data.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n this.rawTransaction.serialize(serializer);\n\n serializer.serializeVector<AccountAddress>(this.secondarySignerAddresses);\n\n if (this.feePayerAddress === undefined) {\n serializer.serializeBool(false);\n } else {\n serializer.serializeBool(true);\n this.feePayerAddress.serialize(serializer);\n }\n }\n\n /**\n * Deserializes a MultiAgentTransaction from the provided deserializer.\n * This function allows you to reconstruct a MultiAgentTransaction object from its serialized form, including any secondary\n * signer addresses and the fee payer address if present.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): MultiAgentTransaction {\n const rawTransaction = RawTransaction.deserialize(deserializer);\n\n const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);\n\n const feePayerPresent = deserializer.deserializeBool();\n let feePayerAddress;\n if (feePayerPresent) {\n feePayerAddress = AccountAddress.deserialize(deserializer);\n }\n\n return new MultiAgentTransaction(rawTransaction, secondarySignerAddresses, feePayerAddress);\n }\n}\n"],"mappings":"AAMA,OAAS,gBAAAA,MAAgC,uBACzC,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,kBAAAC,MAAsB,mBAYxB,MAAMC,UAA8BH,CAAa,CAiBtD,YACEI,EACAC,EACAC,EACA,CACA,MAAM,EACN,KAAK,eAAiBF,EACtB,KAAK,gBAAkBE,EACvB,KAAK,yBAA2BD,CAClC,CAUA,UAAUE,EAA8B,CACtC,KAAK,eAAe,UAAUA,CAAU,EAExCA,EAAW,gBAAgC,KAAK,wBAAwB,EAEpE,KAAK,kBAAoB,OAC3BA,EAAW,cAAc,EAAK,GAE9BA,EAAW,cAAc,EAAI,EAC7B,KAAK,gBAAgB,UAAUA,CAAU,EAE7C,CAWA,OAAO,YAAYC,EAAmD,CACpE,MAAMJ,EAAiBF,EAAe,YAAYM,CAAY,EAExDH,EAA2BG,EAAa,kBAAkBP,CAAc,EAExEQ,EAAkBD,EAAa,gBAAgB,EACrD,IAAIF,EACJ,OAAIG,IACFH,EAAkBL,EAAe,YAAYO,CAAY,GAGpD,IAAIL,EAAsBC,EAAgBC,EAA0BC,CAAe,CAC5F,CACF","names":["Serializable","AccountAddress","RawTransaction","MultiAgentTransaction","rawTransaction","secondarySignerAddresses","feePayerAddress","serializer","deserializer","feePayerPresent"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as u}from"../../bcs/serializer";import{ChainId as h}from"./chainId";import{AccountAddress as r}from"../../core";import{TransactionPayload as m}from"./transactionPayload";import{TransactionVariants as n}from"../../types";class t extends u{constructor(e,s,a,i,o,c,d){super(),this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=i,this.gas_unit_price=o,this.expiration_timestamp_secs=c,this.chain_id=d}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){const s=r.deserialize(e),a=e.deserializeU64(),i=m.deserialize(e),o=e.deserializeU64(),c=e.deserializeU64(),d=e.deserializeU64(),y=h.deserialize(e);return new t(s,a,i,o,c,d,y)}}class p extends u{static deserialize(e){const s=e.deserializeUleb128AsU32();switch(s){case n.MultiAgentTransaction:return l.load(e);case n.FeePayerTransaction:return _.load(e);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${s}`)}}}class l extends p{constructor(e,s){super(),this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(n.MultiAgentTransaction),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){const s=t.deserialize(e),a=e.deserializeVector(r);return new l(s,a)}}class _ extends p{constructor(e,s,a){super(),this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(n.FeePayerTransaction),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){const s=t.deserialize(e),a=e.deserializeVector(r),i=r.deserialize(e);return new _(s,a,i)}}export{_ as FeePayerRawTransaction,l as MultiAgentRawTransaction,t as RawTransaction,p as RawTransactionWithData};
1
+ import{Ma as a,Na as b,Oa as c,Pa as d}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{d as FeePayerRawTransaction,c as MultiAgentRawTransaction,a as RawTransaction,b as RawTransactionWithData};
2
2
  //# sourceMappingURL=rawTransaction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/rawTransaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { ChainId } from \"./chainId\";\nimport { AccountAddress } from \"../../core\";\nimport { TransactionPayload } from \"./transactionPayload\";\nimport { TransactionVariants } from \"../../types\";\n\n/**\n * Represents a raw transaction that can be serialized and deserialized.\n * Raw transactions contain the metadata and payloads that can be submitted to the Aptos chain for execution.\n * They must be signed before the Aptos chain can execute them.\n * @group Implementation\n * @category Transactions\n */\nexport class RawTransaction extends Serializable {\n public readonly sender: AccountAddress;\n\n public readonly sequence_number: bigint;\n\n public readonly payload: TransactionPayload;\n\n public readonly max_gas_amount: bigint;\n\n public readonly gas_unit_price: bigint;\n\n public readonly expiration_timestamp_secs: bigint;\n\n public readonly chain_id: ChainId;\n\n /**\n * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.\n * RawTransactions must be signed before Aptos chain can execute them.\n *\n * @param sender The sender Account Address\n * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in\n * the sender's account at the time the transaction executes.\n * @param payload Instructions for the Aptos Blockchain, including publishing a module,\n * execute an entry function or execute a script payload.\n * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more\n * than this gas or the transaction will be discarded during validation.\n * @param gas_unit_price Price to be paid per gas unit.\n * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.\n * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.\n * @group Implementation\n * @category Transactions\n */\n constructor(\n sender: AccountAddress,\n sequence_number: bigint,\n payload: TransactionPayload,\n max_gas_amount: bigint,\n gas_unit_price: bigint,\n expiration_timestamp_secs: bigint,\n chain_id: ChainId,\n ) {\n super();\n this.sender = sender;\n this.sequence_number = sequence_number;\n this.payload = payload;\n this.max_gas_amount = max_gas_amount;\n this.gas_unit_price = gas_unit_price;\n this.expiration_timestamp_secs = expiration_timestamp_secs;\n this.chain_id = chain_id;\n }\n\n /**\n * Serializes the transaction data, including the fee payer transaction type, raw transaction, secondary signer addresses,\n * and fee payer address.\n * This function is essential for preparing the transaction for transmission or storage in a serialized format.\n *\n * @param serializer - The serializer instance used to serialize the transaction data.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n this.sender.serialize(serializer);\n serializer.serializeU64(this.sequence_number);\n this.payload.serialize(serializer);\n serializer.serializeU64(this.max_gas_amount);\n serializer.serializeU64(this.gas_unit_price);\n serializer.serializeU64(this.expiration_timestamp_secs);\n this.chain_id.serialize(serializer);\n }\n\n /**\n * Deserialize a Raw Transaction With Data.\n * This function retrieves the appropriate raw transaction based on the variant index provided by the deserializer.\n *\n * @param deserializer - An instance of the Deserializer used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): RawTransaction {\n const sender = AccountAddress.deserialize(deserializer);\n const sequence_number = deserializer.deserializeU64();\n const payload = TransactionPayload.deserialize(deserializer);\n const max_gas_amount = deserializer.deserializeU64();\n const gas_unit_price = deserializer.deserializeU64();\n const expiration_timestamp_secs = deserializer.deserializeU64();\n const chain_id = ChainId.deserialize(deserializer);\n return new RawTransaction(\n sender,\n sequence_number,\n payload,\n max_gas_amount,\n gas_unit_price,\n expiration_timestamp_secs,\n chain_id,\n );\n }\n}\n\n/**\n * Represents a raw transaction with associated data that can be serialized and deserialized.\n *\n * @extends Serializable\n * @group Implementation\n * @category Transactions\n */\nexport abstract class RawTransactionWithData extends Serializable {\n /**\n * Serialize a Raw Transaction With Data\n * @group Implementation\n * @category Transactions\n */\n abstract serialize(serializer: Serializer): void;\n\n /**\n * Deserialize a Raw Transaction With Data\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): RawTransactionWithData {\n // index enum variant\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case TransactionVariants.MultiAgentTransaction:\n return MultiAgentRawTransaction.load(deserializer);\n case TransactionVariants.FeePayerTransaction:\n return FeePayerRawTransaction.load(deserializer);\n default:\n throw new Error(`Unknown variant index for RawTransactionWithData: ${index}`);\n }\n }\n}\n\n/**\n * Represents a multi-agent transaction that can be serialized and deserialized.\n *\n * @extends RawTransactionWithData\n * @group Implementation\n * @category Transactions\n */\nexport class MultiAgentRawTransaction extends RawTransactionWithData {\n /**\n * The raw transaction\n * @group Implementation\n * @category Transactions\n */\n public readonly raw_txn: RawTransaction;\n\n /**\n * The secondary signers on this transaction\n * @group Implementation\n * @category Transactions\n */\n public readonly secondary_signer_addresses: Array<AccountAddress>;\n\n constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>) {\n super();\n this.raw_txn = raw_txn;\n this.secondary_signer_addresses = secondary_signer_addresses;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionVariants.MultiAgentTransaction);\n this.raw_txn.serialize(serializer);\n serializer.serializeVector(this.secondary_signer_addresses);\n }\n\n /**\n * Deserializes a Fee Payer Raw Transaction from the provided deserializer.\n * This function allows you to reconstruct a Fee Payer Raw Transaction object, which includes the raw transaction data,\n * secondary signer addresses, and the fee payer address.\n *\n * @param deserializer - The deserializer used to read the raw transaction data.\n * @returns A FeePayerRawTransaction object constructed from the deserialized data.\n * @group Implementation\n * @category Transactions\n */\n static load(deserializer: Deserializer): MultiAgentRawTransaction {\n const rawTxn = RawTransaction.deserialize(deserializer);\n const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);\n\n return new MultiAgentRawTransaction(rawTxn, secondarySignerAddresses);\n }\n}\n\n/**\n * Represents a Fee Payer Transaction that can be serialized and deserialized.\n * @group Implementation\n * @category Transactions\n */\nexport class FeePayerRawTransaction extends RawTransactionWithData {\n /**\n * The raw transaction\n * @group Implementation\n * @category Transactions\n */\n public readonly raw_txn: RawTransaction;\n\n /**\n * The secondary signers on this transaction - optional and can be empty\n * @group Implementation\n * @category Transactions\n */\n public readonly secondary_signer_addresses: Array<AccountAddress>;\n\n /**\n * The fee payer account address\n * @group Implementation\n * @category Transactions\n */\n public readonly fee_payer_address: AccountAddress;\n\n constructor(\n raw_txn: RawTransaction,\n secondary_signer_addresses: Array<AccountAddress>,\n fee_payer_address: AccountAddress,\n ) {\n super();\n this.raw_txn = raw_txn;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.fee_payer_address = fee_payer_address;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(TransactionVariants.FeePayerTransaction);\n this.raw_txn.serialize(serializer);\n serializer.serializeVector(this.secondary_signer_addresses);\n this.fee_payer_address.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): FeePayerRawTransaction {\n const rawTxn = RawTransaction.deserialize(deserializer);\n const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);\n const feePayerAddress = AccountAddress.deserialize(deserializer);\n\n return new FeePayerRawTransaction(rawTxn, secondarySignerAddresses, feePayerAddress);\n }\n}\n"],"mappings":"AAMA,OAAS,gBAAAA,MAAgC,uBACzC,OAAS,WAAAC,MAAe,YACxB,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,sBAAAC,MAA0B,uBACnC,OAAS,uBAAAC,MAA2B,cAS7B,MAAMC,UAAuBL,CAAa,CAgC/C,YACEM,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACA,CACA,MAAM,EACN,KAAK,OAASN,EACd,KAAK,gBAAkBC,EACvB,KAAK,QAAUC,EACf,KAAK,eAAiBC,EACtB,KAAK,eAAiBC,EACtB,KAAK,0BAA4BC,EACjC,KAAK,SAAWC,CAClB,CAWA,UAAUC,EAA8B,CACtC,KAAK,OAAO,UAAUA,CAAU,EAChCA,EAAW,aAAa,KAAK,eAAe,EAC5C,KAAK,QAA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EACA,CACA,MAAM,EACN,KAAK,QAAUJ,EACf,KAAK,2BAA6BC,EAClC,KAAK,kBAAoBG,CAC3B,CAEA,UAAUV,EAA8B,CACtCA,EAAW,sBAAsBT,EAAoB,mBAAmB,EACxE,KAAK,QAAQ,UAAUS,CAAU,EACjCA,EAAW,gBAAgB,KAAK,0BAA0B,EAC1D,KAAK,kBAAkB,UAAUA,CAAU,CAC7C,CAEA,OAAO,KAAKC,EAAoD,CAC9D,MAAMO,EAAShB,EAAe,YAAYS,CAAY,EAChDQ,EAA2BR,EAAa,kBAAkBZ,CAAc,EACxEsB,EAAkBtB,EAAe,YAAYY,CAAY,EAE/D,OAAO,IAAII,EAAuBG,EAAQC,EAA0BE,CAAe,CACrF,CACF","names":["Serializable","ChainId","AccountAddress","TransactionPayload","TransactionVariants","RawTransaction","sender","sequence_number","payload","max_gas_amount","gas_unit_price","expiration_timestamp_secs","chain_id","serializer","deserializer","RawTransactionWithData","index","MultiAgentRawTransaction","FeePayerRawTransaction","raw_txn","secondary_signer_addresses","rawTxn","secondarySignerAddresses","fee_payer_address","feePayerAddress"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as t}from"../../bcs/serializer";import{AccountAddress as o}from"../../core/accountAddress";import{MoveString as r,MoveVector as i,U64 as n}from"../../bcs";class p extends t{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new n(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=i.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}}export{p as RotationProofChallenge};
1
+ import{a}from"../../chunk-V74WPKSY.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as RotationProofChallenge};
2
2
  //# sourceMappingURL=rotationProofChallenge.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/rotationProofChallenge.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Serializer, Serializable } from \"../../bcs/serializer\";\nimport { AccountAddress } from \"../../core/accountAddress\";\nimport { AnyNumber } from \"../../types\";\nimport { PublicKey } from \"../../core/crypto\";\nimport { MoveString, MoveVector, U64, U8 } from \"../../bcs\";\n\n/**\n * Represents a challenge required for the account owner to sign in order to rotate the authentication key.\n * @group Implementation\n * @category Transactions\n */\nexport class RotationProofChallenge extends Serializable {\n // Resource account address\n public readonly accountAddress: AccountAddress = AccountAddress.ONE;\n\n // Module name, i.e: 0x1::account\n public readonly moduleName: MoveString = new MoveString(\"account\");\n\n // The rotation proof challenge struct name that live under the module\n public readonly structName: MoveString = new MoveString(\"RotationProofChallenge\");\n\n // Signer's address\n public readonly originator: AccountAddress;\n\n // Signer's current authentication key\n public readonly currentAuthKey: AccountAddress;\n\n // New public key to rotate to\n public readonly newPublicKey: MoveVector<U8>;\n\n // Sequence number of the account\n public readonly sequenceNumber: U64;\n\n /**\n * Initializes a new instance of the class with the specified parameters.\n * This constructor sets up the necessary attributes for managing account keys.\n *\n * @param args - The parameters required to create the instance.\n * @param args.sequenceNumber - The sequence number associated with the transaction.\n * @param args.originator - The account address of the originator.\n * @param args.currentAuthKey - The current authentication key of the account.\n * @param args.newPublicKey - The new public key to be set for the account.\n * @group Implementation\n * @category Transactions\n */\n constructor(args: {\n sequenceNumber: AnyNumber;\n originator: AccountAddress;\n currentAuthKey: AccountAddress;\n newPublicKey: PublicKey;\n }) {\n super();\n this.sequenceNumber = new U64(args.sequenceNumber);\n this.originator = args.originator;\n this.currentAuthKey = args.currentAuthKey;\n this.newPublicKey = MoveVector.U8(args.newPublicKey.toUint8Array());\n }\n\n /**\n * Serializes the properties of the current instance for transmission or storage.\n * This function helps in converting the instance data into a format suitable for serialization.\n *\n * @param serializer - The serializer used to serialize the instance properties.\n * @param serializer.accountAddress - The account address to serialize.\n * @param serializer.moduleName - The module name to serialize.\n * @param serializer.structName - The struct name to serialize.\n * @param serializer.sequenceNumber - The sequence number to serialize.\n * @param serializer.originator - The originator to serialize.\n * @param serializer.currentAuthKey - The current authentication key to serialize.\n * @param serializer.newPublicKey - The new public key to serialize.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n serializer.serialize(this.accountAddress);\n serializer.serialize(this.moduleName);\n serializer.serialize(this.structName);\n serializer.serialize(this.sequenceNumber);\n serializer.serialize(this.originator);\n serializer.serialize(this.currentAuthKey);\n serializer.serialize(this.newPublicKey);\n }\n}\n"],"mappings":"AAGA,OAAqB,gBAAAA,MAAoB,uBACzC,OAAS,kBAAAC,MAAsB,4BAG/B,OAAS,cAAAC,EAAY,cAAAC,EAAY,OAAAC,MAAe,YAOzC,MAAMC,UAA+BL,CAAa,CAkCvD,YAAYM,EAKT,CACD,MAAM,EAtCR,KAAgB,eAAiCL,EAAe,IAGhE,KAAgB,WAAyB,IAAIC,EAAW,SAAS,EAGjE,KAAgB,WAAyB,IAAIA,EAAW,wBAAwB,EAiC9E,KAAK,eAAiB,IAAIE,EAAIE,EAAK,cAAc,EACjD,KAAK,WAAaA,EAAK,WACvB,KAAK,eAAiBA,EAAK,eAC3B,KAAK,aAAeH,EAAW,GAAGG,EAAK,aAAa,aAAa,CAAC,CACpE,CAiBA,UAAUC,EAA8B,CACtCA,EAAW,UAAU,KAAK,cAAc,EACxCA,EAAW,UAAU,KAAK,UAAU,EACpCA,EAAW,UAAU,KAAK,UAAU,EACpCA,EAAW,UAAU,KAAK,cAAc,EACxCA,EAAW,UAAU,KAAK,UAAU,EACpCA,EAAW,UAAU,KAAK,cAAc,EACxCA,EAAW,UAAU,KAAK,YAAY,CACxC,CACF","names":["Serializable","AccountAddress","MoveString","MoveVector","U64","RotationProofChallenge","args","serializer"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{TransactionAuthenticator as e}from"../authenticator/transaction";import{Serializable as n}from"../../bcs/serializer";import{RawTransaction as o}from"./rawTransaction";class i extends n{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){const a=o.deserialize(t),r=e.deserialize(t);return new i(a,r)}}export{i as SignedTransaction};
1
+ import{Wa as a}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as SignedTransaction};
2
2
  //# sourceMappingURL=signedTransaction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/signedTransaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { TransactionAuthenticator } from \"../authenticator/transaction\";\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { RawTransaction } from \"./rawTransaction\";\n\n/**\n * Represents a signed transaction that includes a raw transaction and an authenticator.\n * The authenticator contains a client's public key and the signature of the raw transaction.\n *\n * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}\n * @param raw_txn - The raw transaction to be signed.\n * @param authenticator - Contains a client's public key and the signature of the raw transaction.\n * Authenticator can have three variations: single signature, multi-signature, and multi-agent.\n * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.\n * @group Implementation\n * @category Transactions\n */\nexport class SignedTransaction extends Serializable {\n public readonly raw_txn: RawTransaction;\n\n public readonly authenticator: TransactionAuthenticator;\n\n /**\n * Represents a signed transaction that includes a raw transaction and an authenticator.\n * The authenticator contains a client's public key and the signature of the raw transaction,\n * which can be of three types: single signature, multi-signature, and multi-agent.\n *\n * @param raw_txn The raw transaction to be signed.\n * @param authenticator Contains a client's public key and the signature of the raw transaction. The authenticator has 3\n * flavors: single signature, multi-signature and multi-agent.\n * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}\n * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.\n * @group Implementation\n * @category Transactions\n */\n constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator) {\n super();\n this.raw_txn = raw_txn;\n this.authenticator = authenticator;\n }\n\n /**\n * Serializes the raw transaction and its authenticator using the provided serializer.\n * This function is essential for preparing the transaction data for transmission or storage.\n *\n * @param serializer - The serializer instance used to serialize the transaction and authenticator.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n this.raw_txn.serialize(serializer);\n this.authenticator.serialize(serializer);\n }\n\n /**\n * Deserializes a signed transaction from the provided deserializer.\n * This function allows you to reconstruct a SignedTransaction object from its serialized form, enabling further processing or validation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): SignedTransaction {\n const raw_txn = RawTransaction.deserialize(deserializer);\n const authenticator = TransactionAuthenticator.deserialize(deserializer);\n return new SignedTransaction(raw_txn, authenticator);\n }\n}\n"],"mappings":"AAKA,OAAS,4BAAAA,MAAgC,+BAEzC,OAAS,gBAAAC,MAAgC,uBACzC,OAAS,kBAAAC,MAAsB,mBAcxB,MAAMC,UAA0BF,CAAa,CAkBlD,YAAYG,EAAyBC,EAAyC,CAC5E,MAAM,EACN,KAAK,QAAUD,EACf,KAAK,cAAgBC,CACvB,CAUA,UAAUC,EAA8B,CACtC,KAAK,QAAQ,UAAUA,CAAU,EACjC,KAAK,cAAc,UAAUA,CAAU,CACzC,CAUA,OAAO,YAAYC,EAA+C,CAChE,MAAMH,EAAUF,EAAe,YAAYK,CAAY,EACjDF,EAAgBL,EAAyB,YAAYO,CAAY,EACvE,OAAO,IAAIJ,EAAkBC,EAASC,CAAa,CACrD,CACF","names":["TransactionAuthenticator","Serializable","RawTransaction","SignedTransaction","raw_txn","authenticator","serializer","deserializer"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{Serializable as n}from"../../bcs/serializer";import{AccountAddress as o}from"../../core";import{RawTransaction as t}from"./rawTransaction";class i extends n{constructor(e,r){super(),this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){const r=t.deserialize(e),a=e.deserializeBool();let s;return a&&(s=o.deserialize(e)),new i(r,s)}}export{i as SimpleTransaction};
1
+ import{Xa as a}from"../../chunk-PJTG745G.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-GOXRBEIJ.mjs";import"../../chunk-XJJVJOX5.mjs";import"../../chunk-QNARIAVM.mjs";import"../../chunk-2PASUPUO.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-RQX6JOEN.mjs";import"../../chunk-WSR5EBJM.mjs";import"../../chunk-WCMW2L3P.mjs";import"../../chunk-V74WPKSY.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-626KB2UQ.mjs";import"../../chunk-XKUIMGKU.mjs";import"../../chunk-N6YTF76Q.mjs";import"../../chunk-FGFLPH5K.mjs";import"../../chunk-QREVMGQZ.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-2OPKZKOB.mjs";import"../../chunk-FC72YL4B.mjs";import"../../chunk-YS5IUILF.mjs";import"../../chunk-PSSIJHHC.mjs";import"../../chunk-YOZBVVKL.mjs";import"../../chunk-R7FWJP3N.mjs";import"../../chunk-UL777LTI.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-AQW4BUKF.mjs";import"../../chunk-E2U27PNC.mjs";import"../../chunk-LAPXUUHK.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-CW35YAMN.mjs";import"../../chunk-YZHAI55C.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-TOBQ5UE6.mjs";import"../../chunk-MT2RJ7H3.mjs";import"../../chunk-Q4W3WJ2U.mjs";import"../../chunk-ORMOQWWH.mjs";import"../../chunk-FLZPUYXQ.mjs";import"../../chunk-LA56UDUK.mjs";import"../../chunk-ZYE7UTJZ.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-MCFQE4GC.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NCKJ7X57.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-OLILO7VD.mjs";import"../../chunk-H3EP5CGP.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as SimpleTransaction};
2
2
  //# sourceMappingURL=simpleTransaction.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/transactions/instances/simpleTransaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { AccountAddress } from \"../../core\";\nimport { RawTransaction } from \"./rawTransaction\";\n\n/**\n * Represents a simple transaction type that can be submitted to the Aptos chain for execution.\n *\n * This transaction type is designed for a single signer and includes metadata such as the Raw Transaction\n * and an optional sponsor Account Address to cover gas fees.\n *\n * @param rawTransaction - The Raw Transaction.\n * @param feePayerAddress - The optional sponsor Account Address.\n * @group Implementation\n * @category Transactions\n */\nexport class SimpleTransaction extends Serializable {\n public rawTransaction: RawTransaction;\n\n public feePayerAddress?: AccountAddress | undefined;\n\n // We don't really need it, we add it for type checking we do\n // throughout the SDK\n public readonly secondarySignerAddresses: undefined;\n\n /**\n * SimpleTransaction represents a transaction signed by a single account that\n * can be submitted to the Aptos chain for execution.\n *\n * @param rawTransaction The Raw Transaction.\n * @param feePayerAddress The optional sponsor Account Address to pay the gas fees.\n * @group Implementation\n * @category Transactions\n */\n constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress) {\n super();\n this.rawTransaction = rawTransaction;\n this.feePayerAddress = feePayerAddress;\n }\n\n /**\n * Serializes the transaction data using the provided serializer.\n * This function ensures that the raw transaction and fee payer address are properly serialized for further processing.\n *\n * @param serializer - The serializer instance used to serialize the transaction data.\n * @group Implementation\n * @category Transactions\n */\n serialize(serializer: Serializer): void {\n this.rawTransaction.serialize(serializer);\n\n if (this.feePayerAddress === undefined) {\n serializer.serializeBool(false);\n } else {\n serializer.serializeBool(true);\n this.feePayerAddress.serialize(serializer);\n }\n }\n\n /**\n * Deserializes a SimpleTransaction from the given deserializer.\n * This function helps in reconstructing a SimpleTransaction object from its serialized form.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Transactions\n */\n static deserialize(deserializer: Deserializer): SimpleTransaction {\n const rawTransaction = RawTransaction.deserialize(deserializer);\n const feePayerPresent = deserializer.deserializeBool();\n let feePayerAddress;\n if (feePayerPresent) {\n feePayerAddress = AccountAddress.deserialize(deserializer);\n }\n\n return new SimpleTransaction(rawTransaction, feePayerAddress);\n }\n}\n"],"mappings":"AAMA,OAAS,gBAAAA,MAAgC,uBACzC,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,kBAAAC,MAAsB,mBAaxB,MAAMC,UAA0BH,CAAa,CAkBlD,YAAYI,EAAgCC,EAAkC,CAC5E,MAAM,EACN,KAAK,eAAiBD,EACtB,KAAK,gBAAkBC,CACzB,CAUA,UAAUC,EAA8B,CACtC,KAAK,eAAe,UAAUA,CAAU,EAEpC,KAAK,kBAAoB,OAC3BA,EAAW,cAAc,EAAK,GAE9BA,EAAW,cAAc,EAAI,EAC7B,KAAK,gBAAgB,UAAUA,CAAU,EAE7C,CAUA,OAAO,YAAYC,EAA+C,CAChE,MAAMH,EAAiBF,EAAe,YAAYK,CAAY,EACxDC,EAAkBD,EAAa,gBAAgB,EACrD,IAAIF,EACJ,OAAIG,IACFH,EAAkBJ,EAAe,YAAYM,CAAY,GAGpD,IAAIJ,EAAkBC,EAAgBC,CAAe,CAC9D,CACF","names":["Serializable","AccountAddress","RawTransaction","SimpleTransaction","rawTransaction","feePayerAddress","serializer","deserializer","feePayerPresent"]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1,2 @@
1
+ import"../../chunk-UYVPNUH3.mjs";
1
2
  //# sourceMappingURL=transactionArgument.mjs.map