@aptos-labs/ts-sdk 1.33.2 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/README.md +15 -9
  2. package/dist/common/{accountAddress-Cf1amU98.d.ts → accountAddress-CuHovHdK.d.ts} +22 -2
  3. package/dist/common/chunk-RX5UBAME.js +4 -0
  4. package/dist/common/chunk-RX5UBAME.js.map +1 -0
  5. package/dist/common/cli/index.d.ts +1 -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 +3139 -2533
  9. package/dist/common/index.js +33 -35
  10. package/dist/common/index.js.map +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +1 -0
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  13. package/dist/esm/account/AbstractedAccount.d.mts +91 -0
  14. package/dist/esm/account/AbstractedAccount.mjs +2 -0
  15. package/dist/esm/account/Account.d.mts +2 -1
  16. package/dist/esm/account/Account.mjs +1 -1
  17. package/dist/esm/account/AccountUtils.d.mts +17 -16
  18. package/dist/esm/account/AccountUtils.mjs +1 -1
  19. package/dist/esm/account/Ed25519Account.d.mts +3 -2
  20. package/dist/esm/account/Ed25519Account.mjs +1 -1
  21. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -0
  22. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  23. package/dist/esm/account/FederatedKeylessAccount.d.mts +1 -0
  24. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  25. package/dist/esm/account/KeylessAccount.d.mts +1 -0
  26. package/dist/esm/account/KeylessAccount.mjs +1 -1
  27. package/dist/esm/account/MultiEd25519Account.d.mts +108 -0
  28. package/dist/esm/account/MultiEd25519Account.mjs +2 -0
  29. package/dist/esm/account/MultiKeyAccount.d.mts +2 -2
  30. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  31. package/dist/esm/account/SingleKeyAccount.d.mts +1 -0
  32. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  33. package/dist/esm/account/index.d.mts +4 -0
  34. package/dist/esm/account/index.mjs +1 -1
  35. package/dist/esm/account/utils.d.mts +1 -0
  36. package/dist/esm/account/utils.mjs +1 -1
  37. package/dist/esm/api/account/abstraction.d.mts +209 -0
  38. package/dist/esm/api/account/abstraction.mjs +2 -0
  39. package/dist/esm/api/account.d.mts +4 -1
  40. package/dist/esm/api/account.mjs +1 -1
  41. package/dist/esm/api/ans.d.mts +1 -0
  42. package/dist/esm/api/ans.mjs +1 -1
  43. package/dist/esm/api/aptos.d.mts +6 -1
  44. package/dist/esm/api/aptos.mjs +1 -1
  45. package/dist/esm/api/aptosConfig.d.mts +1 -0
  46. package/dist/esm/api/aptosConfig.mjs +1 -1
  47. package/dist/esm/api/coin.d.mts +3 -2
  48. package/dist/esm/api/coin.mjs +1 -1
  49. package/dist/esm/api/digitalAsset.d.mts +1 -0
  50. package/dist/esm/api/digitalAsset.mjs +1 -1
  51. package/dist/esm/api/event.d.mts +1 -0
  52. package/dist/esm/api/event.mjs +1 -1
  53. package/dist/esm/api/experimental.d.mts +83 -0
  54. package/dist/esm/api/experimental.mjs +2 -0
  55. package/dist/esm/api/experimental.mjs.map +1 -0
  56. package/dist/esm/api/faucet.d.mts +1 -0
  57. package/dist/esm/api/faucet.mjs +1 -1
  58. package/dist/esm/api/fungibleAsset.d.mts +1 -0
  59. package/dist/esm/api/fungibleAsset.mjs +1 -1
  60. package/dist/esm/api/general.d.mts +1 -0
  61. package/dist/esm/api/general.mjs +1 -1
  62. package/dist/esm/api/index.d.mts +4 -0
  63. package/dist/esm/api/index.mjs +1 -1
  64. package/dist/esm/api/keyless.d.mts +2 -1
  65. package/dist/esm/api/keyless.mjs +1 -1
  66. package/dist/esm/api/object.d.mts +1 -0
  67. package/dist/esm/api/object.mjs +1 -1
  68. package/dist/esm/api/staking.d.mts +1 -0
  69. package/dist/esm/api/staking.mjs +1 -1
  70. package/dist/esm/api/table.d.mts +1 -0
  71. package/dist/esm/api/table.mjs +1 -1
  72. package/dist/esm/api/transaction.d.mts +2 -0
  73. package/dist/esm/api/transaction.mjs +1 -1
  74. package/dist/esm/api/transactionSubmission/build.d.mts +66 -0
  75. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  76. package/dist/esm/api/transactionSubmission/management.d.mts +1 -0
  77. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  78. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -0
  79. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  80. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  81. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -0
  82. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  83. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -0
  84. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  85. package/dist/esm/api/utils.d.mts +1 -0
  86. package/dist/esm/api/utils.mjs +1 -1
  87. package/dist/esm/bcs/consts.d.mts +1 -0
  88. package/dist/esm/bcs/deserializer.d.mts +1 -0
  89. package/dist/esm/bcs/deserializer.mjs +1 -1
  90. package/dist/esm/bcs/index.d.mts +1 -0
  91. package/dist/esm/bcs/index.mjs +1 -1
  92. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -0
  93. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  94. package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -0
  95. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  96. package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -0
  97. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  98. package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -0
  99. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  100. package/dist/esm/bcs/serializer.d.mts +1 -0
  101. package/dist/esm/bcs/serializer.mjs +1 -1
  102. package/dist/esm/{chunk-7IY3DTEF.mjs → chunk-27ESCVVC.mjs} +2 -2
  103. package/dist/esm/chunk-2SAYQUUX.mjs +2 -0
  104. package/dist/esm/chunk-2SAYQUUX.mjs.map +1 -0
  105. package/dist/esm/{chunk-VUIHJIMX.mjs → chunk-2TRQERBL.mjs} +2 -2
  106. package/dist/esm/chunk-2V636AYW.mjs +2 -0
  107. package/dist/esm/{chunk-XTJOA5QN.mjs → chunk-2YKERRHD.mjs} +2 -2
  108. package/dist/esm/chunk-2ZLFQBT2.mjs +2 -0
  109. package/dist/esm/chunk-2ZLFQBT2.mjs.map +1 -0
  110. package/dist/esm/{chunk-5YWH3XPN.mjs → chunk-3LDVJ2YK.mjs} +2 -2
  111. package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
  112. package/dist/esm/chunk-3OLFJ65O.mjs.map +1 -0
  113. package/dist/esm/{chunk-ONTWK5FU.mjs → chunk-44EHAKKW.mjs} +2 -2
  114. package/dist/esm/{chunk-OEQ2U7GK.mjs → chunk-53IBOHXB.mjs} +2 -2
  115. package/dist/esm/{chunk-YCQUYDZI.mjs → chunk-5H5D6QVX.mjs} +2 -2
  116. package/dist/esm/{chunk-G4O6FXCF.mjs → chunk-5W2ERBGY.mjs} +2 -2
  117. package/dist/esm/{chunk-NYETBDSR.mjs → chunk-67A5U2X6.mjs} +2 -2
  118. package/dist/esm/{chunk-AXYARCYT.mjs → chunk-6IJZRG3U.mjs} +2 -2
  119. package/dist/esm/{chunk-N4DM5FYH.mjs → chunk-6KZT3KFZ.mjs} +2 -2
  120. package/dist/esm/chunk-752TOOCA.mjs +2 -0
  121. package/dist/esm/chunk-752TOOCA.mjs.map +1 -0
  122. package/dist/esm/{chunk-2WCATZVL.mjs → chunk-7A2KHJ3D.mjs} +2 -2
  123. package/dist/esm/{chunk-ROT6S6BM.mjs → chunk-7CRQNXR5.mjs} +2 -2
  124. package/dist/esm/{chunk-FZD5RWSZ.mjs → chunk-7OUPEQRN.mjs} +2 -2
  125. package/dist/esm/chunk-A3VO773Q.mjs +2 -0
  126. package/dist/esm/{chunk-OHZURQPY.mjs → chunk-AEGA5N2W.mjs} +2 -2
  127. package/dist/esm/{chunk-BI3BTSUB.mjs → chunk-AIPHJFJL.mjs} +2 -2
  128. package/dist/esm/chunk-AQWKKSRN.mjs +2 -0
  129. package/dist/esm/chunk-AQWKKSRN.mjs.map +1 -0
  130. package/dist/esm/{chunk-4EUS4E6S.mjs → chunk-B23VO5TB.mjs} +2 -2
  131. package/dist/esm/chunk-BHVSIRNF.mjs +2 -0
  132. package/dist/esm/chunk-BHVSIRNF.mjs.map +1 -0
  133. package/dist/esm/chunk-BMPHQ3E7.mjs +2 -0
  134. package/dist/esm/chunk-BPHCRTHD.mjs +2 -0
  135. package/dist/esm/chunk-BPHCRTHD.mjs.map +1 -0
  136. package/dist/esm/{chunk-DYATTONT.mjs → chunk-BQYKFATL.mjs} +2 -2
  137. package/dist/esm/chunk-BY3XFRUM.mjs +2 -0
  138. package/dist/esm/{chunk-77AEKF7K.mjs.map → chunk-BY3XFRUM.mjs.map} +1 -1
  139. package/dist/esm/chunk-CGTMSLVZ.mjs +2 -0
  140. package/dist/esm/chunk-CGTMSLVZ.mjs.map +1 -0
  141. package/dist/esm/{chunk-QQEK7WVP.mjs → chunk-CPAAEEF4.mjs} +2 -2
  142. package/dist/esm/{chunk-ZAIVZDOL.mjs → chunk-CPFQUFVD.mjs} +2 -2
  143. package/dist/esm/chunk-CXLNTATW.mjs +2 -0
  144. package/dist/esm/chunk-CXLNTATW.mjs.map +1 -0
  145. package/dist/esm/{chunk-ZPV7HPA4.mjs → chunk-DAJFOJ3L.mjs} +2 -2
  146. package/dist/esm/chunk-DOVH6HPL.mjs +2 -0
  147. package/dist/esm/{chunk-KOORZTHC.mjs → chunk-E5PAUR4N.mjs} +2 -2
  148. package/dist/esm/{chunk-E7JDVKFY.mjs → chunk-EGCL6KA6.mjs} +2 -2
  149. package/dist/esm/{chunk-TOBQ5UE6.mjs → chunk-ERLDXTIY.mjs} +2 -2
  150. package/dist/esm/chunk-FJ5J7CVW.mjs +2 -0
  151. package/dist/esm/chunk-FJ5J7CVW.mjs.map +1 -0
  152. package/dist/esm/{chunk-X6UNY6YM.mjs → chunk-FOEPRHAC.mjs} +2 -2
  153. package/dist/esm/{chunk-XYB6KYKW.mjs → chunk-G5F5ZOH5.mjs} +2 -2
  154. package/dist/esm/chunk-GFPEB22G.mjs +1 -0
  155. package/dist/esm/chunk-GFPEB22G.mjs.map +1 -0
  156. package/dist/esm/{chunk-AZWVCBK2.mjs → chunk-GI4AR6DQ.mjs} +2 -2
  157. package/dist/esm/{chunk-3RCAJICY.mjs → chunk-GRRBXHVG.mjs} +2 -2
  158. package/dist/esm/{chunk-5EYTHMRZ.mjs → chunk-GTVMJJQQ.mjs} +2 -2
  159. package/dist/esm/{chunk-2TJ6OTVD.mjs → chunk-GU4MD5ST.mjs} +2 -2
  160. package/dist/esm/chunk-H4YAL2IL.mjs +2 -0
  161. package/dist/esm/{chunk-ZGVNZE7J.mjs → chunk-HBTJN4RJ.mjs} +2 -2
  162. package/dist/esm/{chunk-IDTLNF4M.mjs → chunk-HHWJHOFZ.mjs} +2 -2
  163. package/dist/esm/{chunk-XZ4JRYCE.mjs → chunk-HKL4MFNL.mjs} +2 -2
  164. package/dist/esm/{chunk-IEUEMBFD.mjs → chunk-HVIF6DW6.mjs} +2 -2
  165. package/dist/esm/{chunk-MWBRD43V.mjs → chunk-HYJQHVDZ.mjs} +2 -2
  166. package/dist/esm/chunk-HYJQHVDZ.mjs.map +1 -0
  167. package/dist/esm/{chunk-JJM6ELMS.mjs → chunk-ILUFGYLO.mjs} +2 -2
  168. package/dist/esm/chunk-IMTC3J2M.mjs +2 -0
  169. package/dist/esm/chunk-IMTC3J2M.mjs.map +1 -0
  170. package/dist/esm/chunk-IMYNN4TW.mjs +2 -0
  171. package/dist/esm/chunk-IMYNN4TW.mjs.map +1 -0
  172. package/dist/esm/{chunk-DOQV5BSA.mjs → chunk-IOHESHLR.mjs} +2 -2
  173. package/dist/esm/{chunk-NBNZ53ZV.mjs → chunk-JNNFNYDO.mjs} +2 -2
  174. package/dist/esm/{chunk-2UXW3EB7.mjs → chunk-K233I26C.mjs} +2 -2
  175. package/dist/esm/{chunk-VV4HCOJQ.mjs → chunk-KK5HUWF6.mjs} +2 -2
  176. package/dist/esm/chunk-KSLLV3ZC.mjs +2 -0
  177. package/dist/esm/chunk-KSLLV3ZC.mjs.map +1 -0
  178. package/dist/esm/{chunk-67ZVDKJF.mjs → chunk-L6KVC7CJ.mjs} +2 -2
  179. package/dist/esm/{chunk-Q4C4U6I4.mjs → chunk-LQOSHBB7.mjs} +2 -2
  180. package/dist/esm/{chunk-XKUIMGKU.mjs → chunk-LS3IDL2N.mjs} +2 -2
  181. package/dist/esm/{chunk-2N5KYALM.mjs → chunk-MAWGZICD.mjs} +2 -2
  182. package/dist/esm/{chunk-S7RZGC56.mjs → chunk-MFLHAVIW.mjs} +2 -2
  183. package/dist/esm/chunk-OLGEN23M.mjs +2 -0
  184. package/dist/esm/chunk-OLGEN23M.mjs.map +1 -0
  185. package/dist/esm/{chunk-MCLYDS3O.mjs → chunk-ONGH5DXZ.mjs} +2 -2
  186. package/dist/esm/chunk-OPD5EKOA.mjs +2 -0
  187. package/dist/esm/chunk-OPD5EKOA.mjs.map +1 -0
  188. package/dist/esm/{chunk-4ZYPDCSP.mjs → chunk-P5CM4C2G.mjs} +2 -2
  189. package/dist/esm/chunk-PC25RPDV.mjs +2 -0
  190. package/dist/esm/chunk-PC25RPDV.mjs.map +1 -0
  191. package/dist/esm/{chunk-N6YTF76Q.mjs → chunk-PDAWVDI7.mjs} +2 -2
  192. package/dist/esm/chunk-PIPDQFL2.mjs +2 -0
  193. package/dist/esm/chunk-PIPDQFL2.mjs.map +1 -0
  194. package/dist/esm/{chunk-43GCGE6C.mjs → chunk-PWGTRRSJ.mjs} +2 -2
  195. package/dist/esm/{chunk-P7A5RILV.mjs → chunk-PYY2RXFP.mjs} +2 -2
  196. package/dist/esm/chunk-PYY2RXFP.mjs.map +1 -0
  197. package/dist/esm/chunk-QUJM5W4L.mjs +2 -0
  198. package/dist/esm/chunk-QUJM5W4L.mjs.map +1 -0
  199. package/dist/esm/{chunk-2FBJWTJD.mjs → chunk-QYJKCRVA.mjs} +2 -2
  200. package/dist/esm/chunk-R6QCPXQG.mjs +2 -0
  201. package/dist/esm/chunk-R6QCPXQG.mjs.map +1 -0
  202. package/dist/esm/{chunk-6YHDZLRN.mjs → chunk-RDPWCN4B.mjs} +2 -2
  203. package/dist/esm/{chunk-MT2RJ7H3.mjs → chunk-RIINVEZA.mjs} +2 -2
  204. package/dist/esm/{chunk-EBMEXURY.mjs → chunk-RXHER6EA.mjs} +2 -2
  205. package/dist/esm/chunk-SJDHW55X.mjs +2 -0
  206. package/dist/esm/chunk-SJDHW55X.mjs.map +1 -0
  207. package/dist/esm/{chunk-UC23V7PU.mjs → chunk-T7X4GZDU.mjs} +2 -2
  208. package/dist/esm/{chunk-QHEKBHNU.mjs → chunk-TH5JCPN2.mjs} +2 -2
  209. package/dist/esm/{chunk-ORMOQWWH.mjs → chunk-TKXEVD7A.mjs} +2 -2
  210. package/dist/esm/{chunk-FN4C3CKC.mjs → chunk-TTY5GFMN.mjs} +2 -2
  211. package/dist/esm/chunk-TWETGZ3W.mjs +2 -0
  212. package/dist/esm/chunk-TWETGZ3W.mjs.map +1 -0
  213. package/dist/esm/{chunk-E5HGSOG2.mjs → chunk-U4DEYWFT.mjs} +2 -2
  214. package/dist/esm/chunk-UIRAXHDH.mjs +1 -0
  215. package/dist/esm/chunk-UIRAXHDH.mjs.map +1 -0
  216. package/dist/esm/{chunk-OROPNHRY.mjs → chunk-UJJGIPOA.mjs} +2 -2
  217. package/dist/esm/{chunk-CWKNJZB6.mjs → chunk-US2HZFOM.mjs} +2 -2
  218. package/dist/esm/{chunk-XY43TPRH.mjs → chunk-VDYUMBOT.mjs} +2 -2
  219. package/dist/esm/chunk-VHY6ZATX.mjs +2 -0
  220. package/dist/esm/chunk-VHY6ZATX.mjs.map +1 -0
  221. package/dist/esm/chunk-VWZEJTGP.mjs +4 -0
  222. package/dist/esm/chunk-VWZEJTGP.mjs.map +1 -0
  223. package/dist/esm/{chunk-WUWPN7XV.mjs → chunk-W2C5KRUQ.mjs} +2 -2
  224. package/dist/esm/{chunk-OR6GFWLG.mjs → chunk-W4SMZ6IW.mjs} +2 -2
  225. package/dist/esm/chunk-WFKPVKU3.mjs +2 -0
  226. package/dist/esm/chunk-WFKPVKU3.mjs.map +1 -0
  227. package/dist/esm/{chunk-5VMAJTTV.mjs → chunk-WHVCUVZP.mjs} +2 -2
  228. package/dist/esm/{chunk-WQRGDSPD.mjs → chunk-WLDYBSOG.mjs} +2 -2
  229. package/dist/esm/chunk-XRVZAEQO.mjs +2 -0
  230. package/dist/esm/chunk-XRVZAEQO.mjs.map +1 -0
  231. package/dist/esm/chunk-XSBUL2WP.mjs +2 -0
  232. package/dist/esm/chunk-XSBUL2WP.mjs.map +1 -0
  233. package/dist/esm/{chunk-BGSEBFFC.mjs → chunk-XW3BXTCZ.mjs} +2 -2
  234. package/dist/esm/{chunk-6CXMDJQR.mjs → chunk-Y65PKZLK.mjs} +2 -2
  235. package/dist/esm/{chunk-NWLJ6RW7.mjs → chunk-YAGIE4GN.mjs} +2 -2
  236. package/dist/esm/{chunk-M77M6NSB.mjs → chunk-YLUULY6G.mjs} +2 -2
  237. package/dist/esm/{chunk-5EBUWO2M.mjs → chunk-YWSDONJJ.mjs} +2 -2
  238. package/dist/esm/{chunk-V6VPMNWJ.mjs → chunk-YXYYII5S.mjs} +2 -2
  239. package/dist/esm/{chunk-XTOIL6MB.mjs → chunk-ZD2TY5N3.mjs} +2 -2
  240. package/dist/esm/{chunk-FIEMUPXF.mjs → chunk-ZS2IVRHT.mjs} +2 -2
  241. package/dist/esm/cli/index.d.mts +1 -0
  242. package/dist/esm/cli/index.mjs +1 -1
  243. package/dist/esm/cli/localNode.mjs +1 -1
  244. package/dist/esm/cli/move.d.mts +1 -0
  245. package/dist/esm/client/core.d.mts +37 -1
  246. package/dist/esm/client/core.mjs +1 -1
  247. package/dist/esm/client/get.d.mts +36 -1
  248. package/dist/esm/client/get.mjs +1 -1
  249. package/dist/esm/client/index.d.mts +4 -3
  250. package/dist/esm/client/index.mjs +1 -1
  251. package/dist/esm/client/post.d.mts +35 -1
  252. package/dist/esm/client/post.mjs +1 -1
  253. package/dist/esm/core/account/index.d.mts +1 -0
  254. package/dist/esm/core/account/index.mjs +1 -1
  255. package/dist/esm/core/account/utils/address.d.mts +1 -0
  256. package/dist/esm/core/account/utils/address.mjs +1 -1
  257. package/dist/esm/core/account/utils/index.d.mts +1 -0
  258. package/dist/esm/core/account/utils/index.mjs +1 -1
  259. package/dist/esm/core/accountAddress.d.mts +1 -0
  260. package/dist/esm/core/accountAddress.mjs +1 -1
  261. package/dist/esm/core/authenticationKey.d.mts +1 -0
  262. package/dist/esm/core/authenticationKey.mjs +1 -1
  263. package/dist/esm/core/crypto/abstraction.d.mts +30 -0
  264. package/dist/esm/core/crypto/abstraction.mjs +2 -0
  265. package/dist/esm/core/crypto/abstraction.mjs.map +1 -0
  266. package/dist/esm/core/crypto/ed25519.d.mts +1 -0
  267. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  268. package/dist/esm/core/crypto/ephemeral.d.mts +1 -0
  269. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  270. package/dist/esm/core/crypto/federatedKeyless.d.mts +1 -0
  271. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  272. package/dist/esm/core/crypto/index.d.mts +2 -1
  273. package/dist/esm/core/crypto/index.mjs +1 -1
  274. package/dist/esm/core/crypto/keyless.d.mts +1 -0
  275. package/dist/esm/core/crypto/keyless.mjs +1 -1
  276. package/dist/esm/core/crypto/multiEd25519.d.mts +18 -2
  277. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  278. package/dist/esm/core/crypto/multiKey.d.mts +34 -15
  279. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  280. package/dist/esm/core/crypto/privateKey.d.mts +1 -0
  281. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  282. package/dist/esm/core/crypto/proof.d.mts +1 -0
  283. package/dist/esm/core/crypto/proof.mjs +1 -1
  284. package/dist/esm/core/crypto/publicKey.d.mts +1 -0
  285. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  286. package/dist/esm/core/crypto/secp256k1.d.mts +1 -0
  287. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  288. package/dist/esm/core/crypto/signature.d.mts +1 -0
  289. package/dist/esm/core/crypto/signature.mjs +1 -1
  290. package/dist/esm/core/crypto/singleKey.d.mts +1 -0
  291. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  292. package/dist/esm/core/crypto/utils.d.mts +1 -0
  293. package/dist/esm/core/crypto/utils.mjs +1 -1
  294. package/dist/esm/core/hex.d.mts +1 -0
  295. package/dist/esm/core/hex.mjs +1 -1
  296. package/dist/esm/core/index.d.mts +2 -1
  297. package/dist/esm/core/index.mjs +1 -1
  298. package/dist/esm/errors/index.d.mts +1 -0
  299. package/dist/esm/errors/index.mjs +1 -1
  300. package/dist/esm/index.d.mts +16 -9
  301. package/dist/esm/index.mjs +1 -1
  302. package/dist/esm/internal/abstraction.d.mts +55 -0
  303. package/dist/esm/internal/abstraction.mjs +2 -0
  304. package/dist/esm/internal/abstraction.mjs.map +1 -0
  305. package/dist/esm/internal/account.d.mts +1 -0
  306. package/dist/esm/internal/account.mjs +1 -1
  307. package/dist/esm/internal/ans.d.mts +1 -0
  308. package/dist/esm/internal/ans.mjs +1 -1
  309. package/dist/esm/internal/coin.d.mts +1 -0
  310. package/dist/esm/internal/coin.mjs +1 -1
  311. package/dist/esm/internal/digitalAsset.d.mts +1 -0
  312. package/dist/esm/internal/digitalAsset.mjs +1 -1
  313. package/dist/esm/internal/event.d.mts +1 -0
  314. package/dist/esm/internal/event.mjs +1 -1
  315. package/dist/esm/internal/experimental.d.mts +52 -0
  316. package/dist/esm/internal/experimental.mjs +2 -0
  317. package/dist/esm/internal/experimental.mjs.map +1 -0
  318. package/dist/esm/internal/faucet.d.mts +1 -0
  319. package/dist/esm/internal/faucet.mjs +1 -1
  320. package/dist/esm/internal/fungibleAsset.d.mts +1 -0
  321. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  322. package/dist/esm/internal/general.d.mts +1 -0
  323. package/dist/esm/internal/general.mjs +1 -1
  324. package/dist/esm/internal/keyless.d.mts +1 -0
  325. package/dist/esm/internal/keyless.mjs +1 -1
  326. package/dist/esm/internal/object.d.mts +1 -0
  327. package/dist/esm/internal/object.mjs +1 -1
  328. package/dist/esm/internal/staking.d.mts +1 -0
  329. package/dist/esm/internal/staking.mjs +1 -1
  330. package/dist/esm/internal/table.d.mts +1 -0
  331. package/dist/esm/internal/table.mjs +1 -1
  332. package/dist/esm/internal/transaction.d.mts +1 -0
  333. package/dist/esm/internal/transaction.mjs +1 -1
  334. package/dist/esm/internal/transactionSubmission.d.mts +1 -0
  335. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  336. package/dist/esm/internal/view.d.mts +1 -0
  337. package/dist/esm/internal/view.mjs +1 -1
  338. package/dist/esm/transactions/authenticator/account.d.mts +12 -3
  339. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  340. package/dist/esm/transactions/authenticator/index.d.mts +2 -1
  341. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  342. package/dist/esm/transactions/authenticator/transaction.d.mts +3 -2
  343. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  344. package/dist/esm/transactions/index.d.mts +6 -4
  345. package/dist/esm/transactions/index.mjs +1 -1
  346. package/dist/esm/transactions/instances/chainId.d.mts +1 -0
  347. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  348. package/dist/esm/transactions/instances/identifier.d.mts +1 -0
  349. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  350. package/dist/esm/transactions/instances/index.d.mts +1 -0
  351. package/dist/esm/transactions/instances/index.mjs +1 -1
  352. package/dist/esm/transactions/instances/moduleId.d.mts +1 -0
  353. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  354. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -0
  355. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  356. package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -0
  357. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  358. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -0
  359. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  360. package/dist/esm/transactions/instances/signedTransaction.d.mts +5 -4
  361. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  362. package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -0
  363. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  364. package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -0
  365. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -0
  366. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  367. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -0
  368. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  369. package/dist/esm/transactions/management/index.d.mts +1 -0
  370. package/dist/esm/transactions/management/index.mjs +1 -1
  371. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -0
  372. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  373. package/dist/esm/transactions/scriptComposer/index.d.mts +53 -0
  374. package/dist/esm/transactions/scriptComposer/index.mjs +2 -0
  375. package/dist/esm/transactions/scriptComposer/index.mjs.map +1 -0
  376. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +3 -17
  377. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  378. package/dist/esm/transactions/transactionBuilder/index.d.mts +3 -2
  379. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  380. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +23 -2
  381. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  382. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -0
  383. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  384. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -0
  385. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  386. package/dist/esm/transactions/typeTag/index.d.mts +1 -0
  387. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  388. package/dist/esm/transactions/typeTag/parser.d.mts +1 -0
  389. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  390. package/dist/esm/transactions/types.d.mts +10 -1
  391. package/dist/esm/types/abstraction.d.mts +8 -0
  392. package/dist/esm/types/abstraction.mjs +2 -0
  393. package/dist/esm/types/abstraction.mjs.map +1 -0
  394. package/dist/esm/types/index.d.mts +1 -0
  395. package/dist/esm/types/index.mjs +1 -1
  396. package/dist/esm/types/types.d.mts +22 -1
  397. package/dist/esm/types/types.mjs +1 -1
  398. package/dist/esm/utils/helpers.d.mts +19 -2
  399. package/dist/esm/utils/helpers.mjs +1 -1
  400. package/dist/esm/utils/index.d.mts +2 -1
  401. package/dist/esm/utils/index.mjs +1 -1
  402. package/dist/esm/utils/normalizeBundle.d.mts +1 -0
  403. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  404. package/dist/esm/version.d.mts +1 -1
  405. package/dist/esm/version.mjs +1 -1
  406. package/package.json +21 -19
  407. package/src/account/AbstractedAccount.ts +111 -0
  408. package/src/account/MultiEd25519Account.ts +154 -0
  409. package/src/account/MultiKeyAccount.ts +1 -2
  410. package/src/account/index.ts +2 -0
  411. package/src/api/account/abstraction.ts +239 -0
  412. package/src/api/account.ts +7 -2
  413. package/src/api/aptos.ts +9 -0
  414. package/src/api/aptosConfig.ts +2 -2
  415. package/src/api/experimental.ts +64 -0
  416. package/src/api/transactionSubmission/build.ts +85 -2
  417. package/src/client/core.ts +120 -0
  418. package/src/client/get.ts +73 -1
  419. package/src/client/post.ts +70 -1
  420. package/src/core/crypto/abstraction.ts +47 -0
  421. package/src/core/crypto/multiEd25519.ts +19 -3
  422. package/src/core/crypto/multiKey.ts +76 -52
  423. package/src/core/hex.ts +3 -1
  424. package/src/internal/abstraction.ts +79 -0
  425. package/src/internal/experimental.ts +55 -0
  426. package/src/internal/view.ts +4 -4
  427. package/src/transactions/authenticator/account.ts +52 -1
  428. package/src/transactions/index.ts +1 -0
  429. package/src/transactions/scriptComposer/index.ts +87 -0
  430. package/src/transactions/transactionBuilder/helpers.ts +1 -22
  431. package/src/transactions/transactionBuilder/remoteAbi.ts +62 -1
  432. package/src/transactions/transactionBuilder/transactionBuilder.ts +9 -1
  433. package/src/transactions/types.ts +11 -0
  434. package/src/types/abstraction.ts +6 -0
  435. package/src/types/index.ts +1 -0
  436. package/src/types/types.ts +21 -0
  437. package/src/utils/helpers.ts +28 -1
  438. package/src/version.ts +1 -1
  439. package/dist/common/chunk-IHUCZKG2.js +0 -2
  440. package/dist/common/chunk-IHUCZKG2.js.map +0 -1
  441. package/dist/esm/chunk-4YLUM62M.mjs +0 -2
  442. package/dist/esm/chunk-5PXDPMF2.mjs +0 -4
  443. package/dist/esm/chunk-5PXDPMF2.mjs.map +0 -1
  444. package/dist/esm/chunk-6IEZPA4H.mjs +0 -2
  445. package/dist/esm/chunk-6IEZPA4H.mjs.map +0 -1
  446. package/dist/esm/chunk-6YWYAVFS.mjs +0 -2
  447. package/dist/esm/chunk-6YWYAVFS.mjs.map +0 -1
  448. package/dist/esm/chunk-77AEKF7K.mjs +0 -2
  449. package/dist/esm/chunk-AFEHO5PP.mjs +0 -2
  450. package/dist/esm/chunk-AFEHO5PP.mjs.map +0 -1
  451. package/dist/esm/chunk-DAFSKSZ5.mjs +0 -2
  452. package/dist/esm/chunk-DAFSKSZ5.mjs.map +0 -1
  453. package/dist/esm/chunk-DPW6ELCQ.mjs +0 -2
  454. package/dist/esm/chunk-EMURYYVO.mjs +0 -2
  455. package/dist/esm/chunk-F2ZTBAJJ.mjs +0 -2
  456. package/dist/esm/chunk-F2ZTBAJJ.mjs.map +0 -1
  457. package/dist/esm/chunk-FD6FGKYY.mjs +0 -1
  458. package/dist/esm/chunk-GP4TLDVZ.mjs +0 -1
  459. package/dist/esm/chunk-HBH2NQKU.mjs +0 -2
  460. package/dist/esm/chunk-HBH2NQKU.mjs.map +0 -1
  461. package/dist/esm/chunk-I5OYNCZS.mjs +0 -1
  462. package/dist/esm/chunk-JBEUUULP.mjs +0 -2
  463. package/dist/esm/chunk-JBEUUULP.mjs.map +0 -1
  464. package/dist/esm/chunk-KVM2SGSF.mjs +0 -2
  465. package/dist/esm/chunk-KVM2SGSF.mjs.map +0 -1
  466. package/dist/esm/chunk-MLSAZJZK.mjs +0 -2
  467. package/dist/esm/chunk-MLSAZJZK.mjs.map +0 -1
  468. package/dist/esm/chunk-MWBRD43V.mjs.map +0 -1
  469. package/dist/esm/chunk-OSBRPVVI.mjs +0 -2
  470. package/dist/esm/chunk-OSBRPVVI.mjs.map +0 -1
  471. package/dist/esm/chunk-P7A5RILV.mjs.map +0 -1
  472. package/dist/esm/chunk-QHC5DKVZ.mjs +0 -2
  473. package/dist/esm/chunk-QHC5DKVZ.mjs.map +0 -1
  474. package/dist/esm/chunk-S4LZMY2L.mjs +0 -2
  475. package/dist/esm/chunk-S4LZMY2L.mjs.map +0 -1
  476. package/dist/esm/chunk-STY74NUA.mjs +0 -2
  477. package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
  478. package/dist/esm/chunk-U2PRGW4O.mjs +0 -2
  479. package/dist/esm/chunk-U2PRGW4O.mjs.map +0 -1
  480. package/dist/esm/chunk-VVXBVJXD.mjs +0 -2
  481. package/dist/esm/chunk-VVXBVJXD.mjs.map +0 -1
  482. package/dist/esm/chunk-WCMW2L3P.mjs +0 -2
  483. package/dist/esm/chunk-XJJVJOX5.mjs +0 -2
  484. /package/dist/esm/{chunk-FD6FGKYY.mjs.map → account/AbstractedAccount.mjs.map} +0 -0
  485. /package/dist/esm/{chunk-GP4TLDVZ.mjs.map → account/MultiEd25519Account.mjs.map} +0 -0
  486. /package/dist/esm/{chunk-I5OYNCZS.mjs.map → api/account/abstraction.mjs.map} +0 -0
  487. /package/dist/esm/{chunk-7IY3DTEF.mjs.map → chunk-27ESCVVC.mjs.map} +0 -0
  488. /package/dist/esm/{chunk-VUIHJIMX.mjs.map → chunk-2TRQERBL.mjs.map} +0 -0
  489. /package/dist/esm/{chunk-XJJVJOX5.mjs.map → chunk-2V636AYW.mjs.map} +0 -0
  490. /package/dist/esm/{chunk-XTJOA5QN.mjs.map → chunk-2YKERRHD.mjs.map} +0 -0
  491. /package/dist/esm/{chunk-5YWH3XPN.mjs.map → chunk-3LDVJ2YK.mjs.map} +0 -0
  492. /package/dist/esm/{chunk-ONTWK5FU.mjs.map → chunk-44EHAKKW.mjs.map} +0 -0
  493. /package/dist/esm/{chunk-OEQ2U7GK.mjs.map → chunk-53IBOHXB.mjs.map} +0 -0
  494. /package/dist/esm/{chunk-YCQUYDZI.mjs.map → chunk-5H5D6QVX.mjs.map} +0 -0
  495. /package/dist/esm/{chunk-G4O6FXCF.mjs.map → chunk-5W2ERBGY.mjs.map} +0 -0
  496. /package/dist/esm/{chunk-NYETBDSR.mjs.map → chunk-67A5U2X6.mjs.map} +0 -0
  497. /package/dist/esm/{chunk-AXYARCYT.mjs.map → chunk-6IJZRG3U.mjs.map} +0 -0
  498. /package/dist/esm/{chunk-N4DM5FYH.mjs.map → chunk-6KZT3KFZ.mjs.map} +0 -0
  499. /package/dist/esm/{chunk-2WCATZVL.mjs.map → chunk-7A2KHJ3D.mjs.map} +0 -0
  500. /package/dist/esm/{chunk-ROT6S6BM.mjs.map → chunk-7CRQNXR5.mjs.map} +0 -0
  501. /package/dist/esm/{chunk-FZD5RWSZ.mjs.map → chunk-7OUPEQRN.mjs.map} +0 -0
  502. /package/dist/esm/{chunk-WCMW2L3P.mjs.map → chunk-A3VO773Q.mjs.map} +0 -0
  503. /package/dist/esm/{chunk-OHZURQPY.mjs.map → chunk-AEGA5N2W.mjs.map} +0 -0
  504. /package/dist/esm/{chunk-BI3BTSUB.mjs.map → chunk-AIPHJFJL.mjs.map} +0 -0
  505. /package/dist/esm/{chunk-4EUS4E6S.mjs.map → chunk-B23VO5TB.mjs.map} +0 -0
  506. /package/dist/esm/{chunk-4YLUM62M.mjs.map → chunk-BMPHQ3E7.mjs.map} +0 -0
  507. /package/dist/esm/{chunk-DYATTONT.mjs.map → chunk-BQYKFATL.mjs.map} +0 -0
  508. /package/dist/esm/{chunk-QQEK7WVP.mjs.map → chunk-CPAAEEF4.mjs.map} +0 -0
  509. /package/dist/esm/{chunk-ZAIVZDOL.mjs.map → chunk-CPFQUFVD.mjs.map} +0 -0
  510. /package/dist/esm/{chunk-ZPV7HPA4.mjs.map → chunk-DAJFOJ3L.mjs.map} +0 -0
  511. /package/dist/esm/{chunk-DPW6ELCQ.mjs.map → chunk-DOVH6HPL.mjs.map} +0 -0
  512. /package/dist/esm/{chunk-KOORZTHC.mjs.map → chunk-E5PAUR4N.mjs.map} +0 -0
  513. /package/dist/esm/{chunk-E7JDVKFY.mjs.map → chunk-EGCL6KA6.mjs.map} +0 -0
  514. /package/dist/esm/{chunk-TOBQ5UE6.mjs.map → chunk-ERLDXTIY.mjs.map} +0 -0
  515. /package/dist/esm/{chunk-X6UNY6YM.mjs.map → chunk-FOEPRHAC.mjs.map} +0 -0
  516. /package/dist/esm/{chunk-XYB6KYKW.mjs.map → chunk-G5F5ZOH5.mjs.map} +0 -0
  517. /package/dist/esm/{chunk-AZWVCBK2.mjs.map → chunk-GI4AR6DQ.mjs.map} +0 -0
  518. /package/dist/esm/{chunk-3RCAJICY.mjs.map → chunk-GRRBXHVG.mjs.map} +0 -0
  519. /package/dist/esm/{chunk-5EYTHMRZ.mjs.map → chunk-GTVMJJQQ.mjs.map} +0 -0
  520. /package/dist/esm/{chunk-2TJ6OTVD.mjs.map → chunk-GU4MD5ST.mjs.map} +0 -0
  521. /package/dist/esm/{chunk-EMURYYVO.mjs.map → chunk-H4YAL2IL.mjs.map} +0 -0
  522. /package/dist/esm/{chunk-ZGVNZE7J.mjs.map → chunk-HBTJN4RJ.mjs.map} +0 -0
  523. /package/dist/esm/{chunk-IDTLNF4M.mjs.map → chunk-HHWJHOFZ.mjs.map} +0 -0
  524. /package/dist/esm/{chunk-XZ4JRYCE.mjs.map → chunk-HKL4MFNL.mjs.map} +0 -0
  525. /package/dist/esm/{chunk-IEUEMBFD.mjs.map → chunk-HVIF6DW6.mjs.map} +0 -0
  526. /package/dist/esm/{chunk-JJM6ELMS.mjs.map → chunk-ILUFGYLO.mjs.map} +0 -0
  527. /package/dist/esm/{chunk-DOQV5BSA.mjs.map → chunk-IOHESHLR.mjs.map} +0 -0
  528. /package/dist/esm/{chunk-NBNZ53ZV.mjs.map → chunk-JNNFNYDO.mjs.map} +0 -0
  529. /package/dist/esm/{chunk-2UXW3EB7.mjs.map → chunk-K233I26C.mjs.map} +0 -0
  530. /package/dist/esm/{chunk-VV4HCOJQ.mjs.map → chunk-KK5HUWF6.mjs.map} +0 -0
  531. /package/dist/esm/{chunk-67ZVDKJF.mjs.map → chunk-L6KVC7CJ.mjs.map} +0 -0
  532. /package/dist/esm/{chunk-Q4C4U6I4.mjs.map → chunk-LQOSHBB7.mjs.map} +0 -0
  533. /package/dist/esm/{chunk-XKUIMGKU.mjs.map → chunk-LS3IDL2N.mjs.map} +0 -0
  534. /package/dist/esm/{chunk-2N5KYALM.mjs.map → chunk-MAWGZICD.mjs.map} +0 -0
  535. /package/dist/esm/{chunk-S7RZGC56.mjs.map → chunk-MFLHAVIW.mjs.map} +0 -0
  536. /package/dist/esm/{chunk-MCLYDS3O.mjs.map → chunk-ONGH5DXZ.mjs.map} +0 -0
  537. /package/dist/esm/{chunk-4ZYPDCSP.mjs.map → chunk-P5CM4C2G.mjs.map} +0 -0
  538. /package/dist/esm/{chunk-N6YTF76Q.mjs.map → chunk-PDAWVDI7.mjs.map} +0 -0
  539. /package/dist/esm/{chunk-43GCGE6C.mjs.map → chunk-PWGTRRSJ.mjs.map} +0 -0
  540. /package/dist/esm/{chunk-2FBJWTJD.mjs.map → chunk-QYJKCRVA.mjs.map} +0 -0
  541. /package/dist/esm/{chunk-6YHDZLRN.mjs.map → chunk-RDPWCN4B.mjs.map} +0 -0
  542. /package/dist/esm/{chunk-MT2RJ7H3.mjs.map → chunk-RIINVEZA.mjs.map} +0 -0
  543. /package/dist/esm/{chunk-EBMEXURY.mjs.map → chunk-RXHER6EA.mjs.map} +0 -0
  544. /package/dist/esm/{chunk-UC23V7PU.mjs.map → chunk-T7X4GZDU.mjs.map} +0 -0
  545. /package/dist/esm/{chunk-QHEKBHNU.mjs.map → chunk-TH5JCPN2.mjs.map} +0 -0
  546. /package/dist/esm/{chunk-ORMOQWWH.mjs.map → chunk-TKXEVD7A.mjs.map} +0 -0
  547. /package/dist/esm/{chunk-FN4C3CKC.mjs.map → chunk-TTY5GFMN.mjs.map} +0 -0
  548. /package/dist/esm/{chunk-E5HGSOG2.mjs.map → chunk-U4DEYWFT.mjs.map} +0 -0
  549. /package/dist/esm/{chunk-OROPNHRY.mjs.map → chunk-UJJGIPOA.mjs.map} +0 -0
  550. /package/dist/esm/{chunk-CWKNJZB6.mjs.map → chunk-US2HZFOM.mjs.map} +0 -0
  551. /package/dist/esm/{chunk-XY43TPRH.mjs.map → chunk-VDYUMBOT.mjs.map} +0 -0
  552. /package/dist/esm/{chunk-WUWPN7XV.mjs.map → chunk-W2C5KRUQ.mjs.map} +0 -0
  553. /package/dist/esm/{chunk-OR6GFWLG.mjs.map → chunk-W4SMZ6IW.mjs.map} +0 -0
  554. /package/dist/esm/{chunk-5VMAJTTV.mjs.map → chunk-WHVCUVZP.mjs.map} +0 -0
  555. /package/dist/esm/{chunk-WQRGDSPD.mjs.map → chunk-WLDYBSOG.mjs.map} +0 -0
  556. /package/dist/esm/{chunk-BGSEBFFC.mjs.map → chunk-XW3BXTCZ.mjs.map} +0 -0
  557. /package/dist/esm/{chunk-6CXMDJQR.mjs.map → chunk-Y65PKZLK.mjs.map} +0 -0
  558. /package/dist/esm/{chunk-NWLJ6RW7.mjs.map → chunk-YAGIE4GN.mjs.map} +0 -0
  559. /package/dist/esm/{chunk-M77M6NSB.mjs.map → chunk-YLUULY6G.mjs.map} +0 -0
  560. /package/dist/esm/{chunk-5EBUWO2M.mjs.map → chunk-YWSDONJJ.mjs.map} +0 -0
  561. /package/dist/esm/{chunk-V6VPMNWJ.mjs.map → chunk-YXYYII5S.mjs.map} +0 -0
  562. /package/dist/esm/{chunk-XTOIL6MB.mjs.map → chunk-ZD2TY5N3.mjs.map} +0 -0
  563. /package/dist/esm/{chunk-FIEMUPXF.mjs.map → chunk-ZS2IVRHT.mjs.map} +0 -0
@@ -0,0 +1,64 @@
1
+ // Copyright © Aptos Foundation
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { LedgerVersionArg } from "../types";
5
+ import { AptosConfig } from "./aptosConfig";
6
+ import { InputViewFunctionData } from "../transactions";
7
+ import { viewBinary } from "../internal/experimental";
8
+
9
+ /**
10
+ * A class to have experimental functionality to the SDK. Anything used here is subject to change.
11
+ * @group Experimental
12
+ * @experimental
13
+ */
14
+ export class Experimental {
15
+ /**
16
+ * Initializes a new instance of the Aptos client with the provided configuration.
17
+ *
18
+ * @param config - The configuration settings for the Aptos client.
19
+ * @param config.network - The network to connect to (e.g., Testnet, Mainnet).
20
+ * @param config.nodeUrl - The URL of the Aptos node to connect to.
21
+ * @param config.faucetUrl - The URL of the faucet to use for funding accounts.
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
26
+ *
27
+ * async function runExample() {
28
+ * // Create a new Aptos client with Testnet configuration
29
+ * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own network if needed
30
+ * const aptos = new Aptos(config);
31
+ *
32
+ * console.log("Aptos client initialized:", aptos);
33
+ * }
34
+ * runExample().catch(console.error);
35
+ * ```
36
+ * @group Experimental
37
+ * @experimental
38
+ */
39
+ constructor(readonly config: AptosConfig) {}
40
+
41
+ async viewBinary(args: {
42
+ payload: InputViewFunctionData;
43
+ options?: LedgerVersionArg & { convert?: undefined };
44
+ }): Promise<Uint8Array>;
45
+ async viewBinary<T extends {}>(args: {
46
+ payload: InputViewFunctionData;
47
+ options: LedgerVersionArg & { convert: (input: Uint8Array) => T };
48
+ }): Promise<T>;
49
+
50
+ /**
51
+ * Returns BCS encoded results of the view function. It can also convert the results to a specific type, if a
52
+ * converter is provided.
53
+ *
54
+ * @experimental
55
+ * @group Experimental
56
+ * @param args
57
+ */
58
+ async viewBinary<T extends {} = Uint8Array>(args: {
59
+ payload: InputViewFunctionData;
60
+ options?: LedgerVersionArg & { convert?: (input: Uint8Array) => T };
61
+ }): Promise<Uint8Array | T> {
62
+ return viewBinary<T>({ ...args, aptosConfig: this.config });
63
+ }
64
+ }
@@ -1,12 +1,19 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { AccountAddressInput } from "../../core";
4
+ import { AccountAddress, AccountAddressInput } from "../../core";
5
5
  import { generateTransaction } from "../../internal/transactionSubmission";
6
- import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions";
6
+ import {
7
+ InputGenerateTransactionPayloadData,
8
+ InputGenerateTransactionOptions,
9
+ AptosScriptComposer,
10
+ TransactionPayloadScript,
11
+ generateRawTransaction,
12
+ } from "../../transactions";
7
13
  import { MultiAgentTransaction } from "../../transactions/instances/multiAgentTransaction";
8
14
  import { SimpleTransaction } from "../../transactions/instances/simpleTransaction";
9
15
  import { AptosConfig } from "../aptosConfig";
16
+ import { Deserializer } from "../../bcs";
10
17
 
11
18
  /**
12
19
  * A class to handle all `Build` transaction operations.
@@ -96,6 +103,82 @@ export class Build {
96
103
  return generateTransaction({ aptosConfig: this.config, ...args });
97
104
  }
98
105
 
106
+ /**
107
+ * Build a transaction from a series of Move calls.
108
+ *
109
+ * This function allows you to create a transaction with a list of Move calls.
110
+ *
111
+ * Right now we only tested this logic with single signer and we will add support
112
+ * for mutli agent transactions if needed.
113
+ *
114
+ * @param args.sender - The sender account address.
115
+ * @param args.builder - The closure to construct the list of calls.
116
+ * @param args.options - Optional transaction configurations.
117
+ * @param args.withFeePayer - Whether there is a fee payer for the transaction.
118
+ *
119
+ * @returns SimpleTransaction
120
+ *
121
+ * @example
122
+ * ```typescript
123
+ * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
124
+ *
125
+ * const config = new AptosConfig({ network: Network.TESTNET });
126
+ * const aptos = new Aptos(config);
127
+ *
128
+ * async function runExample() {
129
+ * // Build a transaction from a chained series of Move calls.
130
+ * const transaction = await aptos.transaction.build.scriptComposer({
131
+ * sender: "0x1", // replace with a real sender account address
132
+ * builder: builder: async (builder) => {
133
+ * const coin = await builder.addBatchedCalls({
134
+ * function: "0x1::coin::withdraw",
135
+ * functionArguments: [CallArgument.new_signer(0), 1],
136
+ * typeArguments: ["0x1::aptos_coin::AptosCoin"],
137
+ * });
138
+ *
139
+ * // Pass the returned value from the first function call to the second call
140
+ * const fungibleAsset = await builder.addBatchedCalls({
141
+ * function: "0x1::coin::coin_to_fungible_asset",
142
+ * functionArguments: [coin[0]],
143
+ * typeArguments: ["0x1::aptos_coin::AptosCoin"],
144
+ * });
145
+ *
146
+ * await builder.addBatchedCalls({
147
+ * function: "0x1::primary_fungible_store::deposit",
148
+ * functionArguments: [singleSignerED25519SenderAccount.accountAddress, fungibleAsset[0]],
149
+ * typeArguments: [],
150
+ * });
151
+ * return builder;
152
+ * },
153
+ * options: {
154
+ * gasUnitPrice: 100, // specify your own gas unit price if needed
155
+ * maxGasAmount: 1000, // specify your own max gas amount if needed
156
+ * },
157
+ * });
158
+ *
159
+ * console.log(transaction);
160
+ * }
161
+ * runExample().catch(console.error);
162
+ * ```
163
+ */
164
+ async scriptComposer(args: {
165
+ sender: AccountAddressInput;
166
+ builder: (builder: AptosScriptComposer) => Promise<AptosScriptComposer>;
167
+ options?: InputGenerateTransactionOptions;
168
+ withFeePayer?: boolean;
169
+ }): Promise<SimpleTransaction> {
170
+ const composer = new AptosScriptComposer(this.config);
171
+ await composer.init();
172
+ const builder = await args.builder(composer);
173
+ const bytes = builder.build();
174
+ const rawTxn = await generateRawTransaction({
175
+ aptosConfig: this.config,
176
+ payload: TransactionPayloadScript.load(new Deserializer(bytes)),
177
+ ...args,
178
+ });
179
+ return new SimpleTransaction(rawTxn, args.withFeePayer === true ? AccountAddress.ZERO : undefined);
180
+ }
181
+
99
182
  /**
100
183
  * Build a multi-agent transaction that allows multiple signers to authorize a transaction.
101
184
  *
@@ -15,6 +15,7 @@ import { AptosApiError } from "../errors";
15
15
  * @param options.method - The HTTP method to use for the request.
16
16
  * @param options.body - The body of the request.
17
17
  * @param options.contentType - The content type of the request.
18
+ * @param options.acceptType - The accept type of the request.
18
19
  * @param options.params - The query parameters to include in the request.
19
20
  * @param options.overrides - Additional overrides for the request.
20
21
  * @param options.overrides.HEADERS - Custom headers to include in the request.
@@ -57,6 +58,62 @@ export async function request<Req, Res>(options: ClientRequest<Req>, client: Cli
57
58
  });
58
59
  }
59
60
 
61
+ /**
62
+ * Sends a request using the specified options and returns the response.
63
+ *
64
+ * @param options - The options for the request.
65
+ * @param options.url - The URL to send the request to.
66
+ * @param options.method - The HTTP method to use for the request.
67
+ * @param options.body - The body of the request.
68
+ * @param options.contentType - The content type of the request.
69
+ * @param options.acceptType - The accept type of the request.
70
+ * @param options.params - The query parameters to include in the request.
71
+ * @param options.overrides - Additional overrides for the request.
72
+ * @param options.overrides.HEADERS - Custom headers to include in the request.
73
+ * @param options.overrides.AUTH_TOKEN - The authorization token for the request.
74
+ * @param options.overrides.API_KEY - The API key for the request.
75
+ * @param options.originMethod - The origin method for the request.
76
+ * @param client - The client used to make the request.
77
+ *
78
+ * @returns The response from the request.
79
+ * @group Implementation
80
+ * @category Client
81
+ */
82
+ export async function binaryRequest<Req>(options: ClientRequest<Req>, client: Client): Promise<ClientResponse<Buffer>> {
83
+ if (client.binaryProvider === undefined) {
84
+ throw new Error("Binary provider is not provided");
85
+ }
86
+ const { url, method, body, contentType, acceptType, params, overrides, originMethod } = options;
87
+ const headers: Record<string, string | AnyNumber | boolean | undefined> = {
88
+ ...overrides?.HEADERS,
89
+ "x-aptos-client": `aptos-typescript-sdk/${VERSION}`,
90
+ "content-type": contentType ?? MimeType.JSON,
91
+ accept: acceptType ?? MimeType.BCS,
92
+ "x-aptos-typescript-sdk-origin-method": originMethod,
93
+ };
94
+
95
+ if (overrides?.AUTH_TOKEN) {
96
+ headers.Authorization = `Bearer ${overrides?.AUTH_TOKEN}`;
97
+ }
98
+ if (overrides?.API_KEY) {
99
+ headers.Authorization = `Bearer ${overrides?.API_KEY}`;
100
+ }
101
+
102
+ /*
103
+ * make a call using the @aptos-labs/aptos-client package
104
+ * {@link https://www.npmjs.com/package/@aptos-labs/aptos-client}
105
+ */
106
+ return client.binaryProvider<Req>({
107
+ acceptType: MimeType.BCS,
108
+ url,
109
+ method,
110
+ body,
111
+ params,
112
+ headers,
113
+ overrides,
114
+ });
115
+ }
116
+
60
117
  /**
61
118
  * The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.
62
119
  *
@@ -118,3 +175,66 @@ export async function aptosRequest<Req extends {}, Res extends {}>(
118
175
  // comes from an indexer request (e.g. 404), we'll need to mention it appropriately
119
176
  throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
120
177
  }
178
+
179
+ /**
180
+ * The main function to use when making an API request, returning the response or throwing an AptosApiError on failure.
181
+ *
182
+ * @param aptosRequestOpts - Options for the Aptos request, including the URL and path.
183
+ * @param aptosConfig - The configuration information for the SDK client instance.
184
+ * @param apiType - The type of API being accessed, which determines how the response is handled.
185
+ * @returns The response from the API request or throws an AptosApiError if the request fails.
186
+ * @group Implementation
187
+ * @category Client
188
+ * @experimental
189
+ */
190
+ export async function aptosBinaryRequest<Req extends {}>(
191
+ aptosRequestOpts: AptosRequest,
192
+ aptosConfig: AptosConfig,
193
+ apiType: AptosApiType,
194
+ ): Promise<AptosResponse<Req, Buffer>> {
195
+ const { url, path } = aptosRequestOpts;
196
+ const fullUrl = path ? `${url}/${path}` : url;
197
+ const clientResponse = await binaryRequest<Req>({ ...aptosRequestOpts, url: fullUrl }, aptosConfig.client);
198
+
199
+ const aptosResponse: AptosResponse<Req, Buffer> = {
200
+ status: clientResponse.status,
201
+ statusText: clientResponse.statusText ?? "No status text provided",
202
+ data: clientResponse.data,
203
+ headers: clientResponse.headers,
204
+ config: clientResponse.config,
205
+ request: clientResponse.request,
206
+ url: fullUrl,
207
+ };
208
+
209
+ // Handle case for `Unauthorized` error (i.e. API_KEY error)
210
+ if (aptosResponse.status === 401) {
211
+ throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
212
+ }
213
+
214
+ // to support both fullnode and indexer responses,
215
+ // check if it is an indexer query, and adjust response.data
216
+ if (apiType === AptosApiType.INDEXER) {
217
+ const indexerResponse = aptosResponse.data as any;
218
+ // Handle Indexer general errors
219
+ if (indexerResponse.errors) {
220
+ throw new AptosApiError({
221
+ apiType,
222
+ aptosRequest: aptosRequestOpts,
223
+ aptosResponse,
224
+ });
225
+ }
226
+ aptosResponse.data = indexerResponse.data as Buffer;
227
+ } else if (apiType === AptosApiType.PEPPER || apiType === AptosApiType.PROVER) {
228
+ if (aptosResponse.status >= 400) {
229
+ throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
230
+ }
231
+ }
232
+
233
+ if (aptosResponse.status >= 200 && aptosResponse.status < 300) {
234
+ return aptosResponse;
235
+ }
236
+
237
+ // We have to explicitly check for all request types, because if the error is a non-indexer error, but
238
+ // comes from an indexer request (e.g. 404), we'll need to mention it appropriately
239
+ throw new AptosApiError({ apiType, aptosRequest: aptosRequestOpts, aptosResponse });
240
+ }
package/src/client/get.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AptosConfig } from "../api/aptosConfig";
2
- import { aptosRequest } from "./core";
2
+ import { aptosBinaryRequest, aptosRequest } from "./core";
3
3
  import { AptosResponse, AnyNumber, ClientConfig, MimeType } from "../types";
4
4
  import { AptosApiType } from "../utils/const";
5
5
 
@@ -107,6 +107,46 @@ export async function get<Req extends {}, Res extends {}>(
107
107
  );
108
108
  }
109
109
 
110
+ /**
111
+ * Executes a GET request to retrieve data based on the provided options.
112
+ *
113
+ * @param options - The options for the GET request.
114
+ * @param options.aptosConfig - The configuration object for Aptos requests.
115
+ * @param options.overrides - Optional overrides for the request configuration.
116
+ * @param options.params - Query parameters to include in the request.
117
+ * @param options.contentType - The content type of the request.
118
+ * @param options.acceptType - The accepted response type.
119
+ * @param options.path - The specific path for the request.
120
+ * @param options.originMethod - The original method of the request.
121
+ * @param options.type - The type of request being made.
122
+ * @returns The response from the GET request.
123
+ * @group Implementation
124
+ * @category Client
125
+ * @experimental
126
+ */
127
+ export async function getBinary<Req extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Buffer>> {
128
+ const { aptosConfig, overrides, params, contentType, acceptType, path, originMethod, type } = options;
129
+ const url = aptosConfig.getRequestUrl(type);
130
+
131
+ return aptosBinaryRequest<Req>(
132
+ {
133
+ url,
134
+ method: "GET",
135
+ originMethod,
136
+ path,
137
+ contentType,
138
+ acceptType,
139
+ params,
140
+ overrides: {
141
+ ...aptosConfig.clientConfig,
142
+ ...overrides,
143
+ },
144
+ },
145
+ aptosConfig,
146
+ options.type,
147
+ );
148
+ }
149
+
110
150
  /**
111
151
  * Retrieves data from the Aptos full node using the provided options.
112
152
  *
@@ -138,6 +178,38 @@ export async function getAptosFullNode<Req extends {}, Res extends {}>(
138
178
  });
139
179
  }
140
180
 
181
+ /**
182
+ * Retrieves data from the Aptos full node using the provided options.
183
+ *
184
+ * @param options - The options for the request to the Aptos full node.
185
+ * @param options.aptosConfig - Configuration settings specific to the Aptos client and full node.
186
+ * @param options.aptosConfig.clientConfig - The client configuration settings.
187
+ * @param options.aptosConfig.fullnodeConfig - The full node configuration settings.
188
+ * @param options.overrides - Additional overrides for the request.
189
+ * @param options.type - The type of API request being made.
190
+ *
191
+ * @returns A promise that resolves with the response from the Aptos full node.
192
+ * @group Implementation
193
+ * @category Client
194
+ * @experimental
195
+ */
196
+ export async function getBinaryAptosFullNode<Req extends {}>(
197
+ options: GetAptosRequestOptions,
198
+ ): Promise<AptosResponse<Req, Buffer>> {
199
+ const { aptosConfig } = options;
200
+
201
+ return getBinary<Req>({
202
+ ...options,
203
+ type: AptosApiType.FULLNODE,
204
+ overrides: {
205
+ ...aptosConfig.clientConfig,
206
+ ...aptosConfig.fullnodeConfig,
207
+ ...options.overrides,
208
+ HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },
209
+ },
210
+ });
211
+ }
212
+
141
213
  /**
142
214
  * Makes a GET request to the Aptos Pepper service to retrieve data.
143
215
  *
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { AptosConfig } from "../api/aptosConfig";
5
- import { aptosRequest } from "./core";
5
+ import { aptosBinaryRequest, aptosRequest } from "./core";
6
6
  import { AptosResponse, AnyNumber, ClientConfig, MimeType } from "../types";
7
7
  import { AptosApiType } from "../utils/const";
8
8
 
@@ -115,6 +115,45 @@ export async function post<Req extends {}, Res extends {}>(
115
115
  );
116
116
  }
117
117
 
118
+ /**
119
+ * Executes a POST request to the specified URL with the provided options.
120
+ *
121
+ * @param options - The options for the POST request.
122
+ * @param options.type - The type of the request.
123
+ * @param options.originMethod - The original method that initiated the request.
124
+ * @param options.path - The path for the request.
125
+ * @param options.body - The body content to be sent with the request.
126
+ * @param options.acceptType - The type of response expected from the server.
127
+ * @param options.contentType - The content type of the request body.
128
+ * @param options.params - Additional parameters to include in the request.
129
+ * @param options.aptosConfig - Configuration settings for the Aptos request.
130
+ * @param options.overrides - Any overrides for the default request behavior.
131
+ * @returns The response from the POST request.
132
+ * @group Implementation
133
+ * @category Client
134
+ * @experimental
135
+ */
136
+ export async function postBinary<Req extends {}>(options: PostRequestOptions): Promise<AptosResponse<Req, Buffer>> {
137
+ const { type, originMethod, path, body, acceptType, contentType, params, aptosConfig, overrides } = options;
138
+ const url = aptosConfig.getRequestUrl(type);
139
+
140
+ return aptosBinaryRequest<Req>(
141
+ {
142
+ url,
143
+ method: "POST",
144
+ originMethod,
145
+ path,
146
+ body,
147
+ contentType,
148
+ acceptType,
149
+ params,
150
+ overrides,
151
+ },
152
+ aptosConfig,
153
+ options.type,
154
+ );
155
+ }
156
+
118
157
  /**
119
158
  * Sends a request to the Aptos full node using the specified options.
120
159
  * This function allows you to interact with the Aptos blockchain by sending requests to the full node.
@@ -144,6 +183,36 @@ export async function postAptosFullNode<Req extends {}, Res extends {}>(
144
183
  });
145
184
  }
146
185
 
186
+ /**
187
+ * Sends a request to the Aptos full node using the specified options.
188
+ * This function allows you to interact with the Aptos blockchain by sending requests to the full node.
189
+ *
190
+ * @param options - The options for the request.
191
+ * @param options.aptosConfig - Configuration settings for the Aptos client.
192
+ * @param options.aptosConfig.clientConfig - Client-specific configuration settings.
193
+ * @param options.aptosConfig.fullnodeConfig - Full node-specific configuration settings.
194
+ * @param options.overrides - Additional overrides for the request.
195
+ * @group Implementation
196
+ * @category Client
197
+ * @experimental
198
+ */
199
+ export async function postBinaryAptosFullNode<Req extends {}>(
200
+ options: PostAptosRequestOptions,
201
+ ): Promise<AptosResponse<Req, Buffer>> {
202
+ const { aptosConfig } = options;
203
+
204
+ return postBinary<Req>({
205
+ ...options,
206
+ type: AptosApiType.FULLNODE,
207
+ overrides: {
208
+ ...aptosConfig.clientConfig,
209
+ ...aptosConfig.fullnodeConfig,
210
+ ...options.overrides,
211
+ HEADERS: { ...aptosConfig.clientConfig?.HEADERS, ...aptosConfig.fullnodeConfig?.HEADERS },
212
+ },
213
+ });
214
+ }
215
+
147
216
  /**
148
217
  * Sends a request to the Aptos indexer with the specified options.
149
218
  * This function allows you to interact with the Aptos indexer and customize the request using various configurations.
@@ -0,0 +1,47 @@
1
+ import { Deserializer, Serializer } from "../../bcs";
2
+ import { HexInput } from "../../types";
3
+ import { AccountAddress } from "../accountAddress";
4
+ import { AuthenticationKey } from "../authenticationKey";
5
+ import { Hex } from "../hex";
6
+ import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
7
+ import { Signature } from "./signature";
8
+
9
+ export class AbstractSignature extends Signature {
10
+ readonly value: Hex;
11
+
12
+ constructor(value: HexInput) {
13
+ super();
14
+ this.value = Hex.fromHexInput(value);
15
+ }
16
+
17
+ serialize(serializer: Serializer): void {
18
+ serializer.serializeBytes(this.value.toUint8Array());
19
+ }
20
+
21
+ static deserialize(deserializer: Deserializer): AbstractSignature {
22
+ return new AbstractSignature(deserializer.deserializeBytes());
23
+ }
24
+ }
25
+
26
+ export class AbstractPublicKey extends AccountPublicKey {
27
+ readonly accountAddress: AccountAddress;
28
+
29
+ constructor(accountAddress: AccountAddress) {
30
+ super();
31
+ this.accountAddress = accountAddress;
32
+ }
33
+
34
+ authKey(): AuthenticationKey {
35
+ return new AuthenticationKey({ data: this.accountAddress.toUint8Array() });
36
+ }
37
+
38
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
39
+ verifySignature(args: VerifySignatureArgs): boolean {
40
+ throw new Error("This function is not implemented for AbstractPublicKey.");
41
+ }
42
+
43
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
44
+ serialize(serializer: Serializer): void {
45
+ throw new Error("This function is not implemented for AbstractPublicKey.");
46
+ }
47
+ }
@@ -5,7 +5,8 @@ import { Deserializer, Serializer } from "../../bcs";
5
5
  import { SigningScheme as AuthenticationKeyScheme } from "../../types";
6
6
  import { AuthenticationKey } from "../authenticationKey";
7
7
  import { Ed25519PublicKey, Ed25519Signature } from "./ed25519";
8
- import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
8
+ import { AbstractMultiKey } from "./multiKey";
9
+ import { VerifySignatureArgs } from "./publicKey";
9
10
  import { Signature } from "./signature";
10
11
 
11
12
  /**
@@ -19,7 +20,7 @@ import { Signature } from "./signature";
19
20
  * @group Implementation
20
21
  * @category Serialization
21
22
  */
22
- export class MultiEd25519PublicKey extends AccountPublicKey {
23
+ export class MultiEd25519PublicKey extends AbstractMultiKey {
23
24
  /**
24
25
  * Maximum number of public keys supported
25
26
  * @group Implementation
@@ -69,8 +70,8 @@ export class MultiEd25519PublicKey extends AccountPublicKey {
69
70
  * @category Serialization
70
71
  */
71
72
  constructor(args: { publicKeys: Ed25519PublicKey[]; threshold: number }) {
72
- super();
73
73
  const { publicKeys, threshold } = args;
74
+ super({ publicKeys });
74
75
 
75
76
  // Validate number of public keys
76
77
  if (publicKeys.length > MultiEd25519PublicKey.MAX_KEYS || publicKeys.length < MultiEd25519PublicKey.MIN_KEYS) {
@@ -209,6 +210,21 @@ export class MultiEd25519PublicKey extends AccountPublicKey {
209
210
  }
210
211
 
211
212
  // endregion
213
+
214
+ /**
215
+ * Get the index of the provided public key.
216
+ *
217
+ * This function retrieves the index of a specified public key within the MultiKey.
218
+ * If the public key does not exist, it throws an error.
219
+ *
220
+ * @param publicKey - The public key to find the index for.
221
+ * @returns The corresponding index of the public key, if it exists.
222
+ * @throws Error - If the public key is not found in the MultiKey.
223
+ * @group Implementation
224
+ */
225
+ getIndex(publicKey: Ed25519PublicKey): number {
226
+ return super.getIndex(publicKey);
227
+ }
212
228
  }
213
229
 
214
230
  /**