@aptos-labs/ts-sdk 1.13.1-zeta.5 → 1.13.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 (478) hide show
  1. package/dist/common/index.d.ts +1399 -1821
  2. package/dist/common/index.js +26 -26
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/{Ed25519Account-8gJF5t3F.d.mts → Ed25519Account--qjfup2u.d.mts} +12 -10
  5. package/dist/esm/api/account.d.mts +1 -13
  6. package/dist/esm/api/account.mjs +1 -1
  7. package/dist/esm/api/ans.d.mts +2 -2
  8. package/dist/esm/api/ans.mjs +1 -1
  9. package/dist/esm/api/aptos.d.mts +8 -14
  10. package/dist/esm/api/aptos.mjs +1 -1
  11. package/dist/esm/api/aptosConfig.d.mts +0 -20
  12. package/dist/esm/api/aptosConfig.mjs +1 -1
  13. package/dist/esm/api/coin.d.mts +7 -7
  14. package/dist/esm/api/coin.mjs +1 -1
  15. package/dist/esm/api/digitalAsset.d.mts +1 -1
  16. package/dist/esm/api/digitalAsset.mjs +1 -1
  17. package/dist/esm/api/event.mjs +1 -1
  18. package/dist/esm/api/faucet.mjs +1 -1
  19. package/dist/esm/api/fungibleAsset.d.mts +5 -5
  20. package/dist/esm/api/fungibleAsset.mjs +1 -1
  21. package/dist/esm/api/general.d.mts +7 -7
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.d.mts +8 -13
  24. package/dist/esm/api/index.mjs +1 -1
  25. package/dist/esm/api/staking.mjs +1 -1
  26. package/dist/esm/api/transaction.d.mts +1 -1
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  33. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  34. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  35. package/dist/esm/api/transactionSubmission/simulate.d.mts +6 -6
  36. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  38. package/dist/esm/api/utils.d.mts +1 -1
  39. package/dist/esm/api/utils.mjs +1 -1
  40. package/dist/esm/bcs/index.mjs +1 -1
  41. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  42. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  43. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  44. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  45. package/dist/esm/bcs/serializer.d.mts +0 -2
  46. package/dist/esm/bcs/serializer.mjs +1 -1
  47. package/dist/esm/{chunk-MRTAMMS3.mjs → chunk-2PFN7LYP.mjs} +2 -2
  48. package/dist/esm/chunk-3426VLAZ.mjs +2 -0
  49. package/dist/esm/chunk-3426VLAZ.mjs.map +1 -0
  50. package/dist/esm/{chunk-PTIZKRON.mjs → chunk-3HV2C4SS.mjs} +2 -2
  51. package/dist/esm/chunk-3OCTOB2E.mjs +2 -0
  52. package/dist/esm/chunk-3OCTOB2E.mjs.map +1 -0
  53. package/dist/esm/{chunk-QJHFD2MT.mjs → chunk-3QBZU5ZD.mjs} +2 -2
  54. package/dist/esm/chunk-3QBZU5ZD.mjs.map +1 -0
  55. package/dist/esm/{chunk-GUWBE3CV.mjs → chunk-3RUY5FQK.mjs} +2 -2
  56. package/dist/esm/chunk-3RUY5FQK.mjs.map +1 -0
  57. package/dist/esm/{chunk-OJ4NIVFW.mjs → chunk-4DNVCOW7.mjs} +2 -2
  58. package/dist/esm/chunk-4DNVCOW7.mjs.map +1 -0
  59. package/dist/esm/{chunk-FFVWTX36.mjs → chunk-4LMAVPA4.mjs} +2 -2
  60. package/dist/esm/{chunk-TVRJ3M7B.mjs → chunk-52C73T26.mjs} +2 -2
  61. package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-52C73T26.mjs.map} +1 -1
  62. package/dist/esm/chunk-5HALZ6JC.mjs +2 -0
  63. package/dist/esm/chunk-5HALZ6JC.mjs.map +1 -0
  64. package/dist/esm/chunk-5OM4V4DR.mjs +2 -0
  65. package/dist/esm/chunk-5TMLAKSH.mjs +2 -0
  66. package/dist/esm/chunk-5TMLAKSH.mjs.map +1 -0
  67. package/dist/esm/{chunk-NCIRQZOJ.mjs → chunk-6IGEUEER.mjs} +2 -2
  68. package/dist/esm/{chunk-IGJCOZGO.mjs → chunk-6MG4JAYB.mjs} +2 -2
  69. package/dist/esm/{chunk-FYJMB23M.mjs → chunk-A556OVZY.mjs} +2 -2
  70. package/dist/esm/chunk-B252RJCU.mjs +2 -0
  71. package/dist/esm/{chunk-HTSXKHXX.mjs.map → chunk-B252RJCU.mjs.map} +1 -1
  72. package/dist/esm/{chunk-7PICPK26.mjs → chunk-BAV4XY7C.mjs} +2 -2
  73. package/dist/esm/{chunk-HGXO74Q3.mjs → chunk-BBU2EE6D.mjs} +2 -2
  74. package/dist/esm/{chunk-D4QQKQXJ.mjs → chunk-BRQYARQ3.mjs} +2 -2
  75. package/dist/esm/{chunk-MWUJCP27.mjs → chunk-BWFJHFBQ.mjs} +2 -2
  76. package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
  77. package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
  78. package/dist/esm/{chunk-3VGX3TXH.mjs → chunk-DMKUAQB7.mjs} +2 -2
  79. package/dist/esm/{chunk-MGOHPDX4.mjs → chunk-DSTKXJMA.mjs} +2 -2
  80. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  81. package/dist/esm/{chunk-W3UCKFFU.mjs → chunk-EJCKCYYI.mjs} +2 -2
  82. package/dist/esm/chunk-FO6ZKE7A.mjs +2 -0
  83. package/dist/esm/chunk-FO6ZKE7A.mjs.map +1 -0
  84. package/dist/esm/{chunk-EB7AI4B4.mjs → chunk-FS3NSGBF.mjs} +2 -2
  85. package/dist/esm/{chunk-JTCWZB3Q.mjs → chunk-FXNFWLQC.mjs} +2 -2
  86. package/dist/esm/chunk-GED6IT3S.mjs +1 -0
  87. package/dist/esm/chunk-GMQQSSEO.mjs +2 -0
  88. package/dist/esm/chunk-GMQQSSEO.mjs.map +1 -0
  89. package/dist/esm/chunk-GNQXMS53.mjs +2 -0
  90. package/dist/esm/chunk-GNQXMS53.mjs.map +1 -0
  91. package/dist/esm/{chunk-AZABJ5QQ.mjs → chunk-GRT5PHL6.mjs} +2 -2
  92. package/dist/esm/{chunk-DORK55K3.mjs → chunk-GS5J57UA.mjs} +2 -2
  93. package/dist/esm/chunk-GS5J57UA.mjs.map +1 -0
  94. package/dist/esm/{chunk-3HL2ZWKG.mjs → chunk-GXYS45Y5.mjs} +2 -2
  95. package/dist/esm/chunk-HLVMEUWD.mjs +2 -0
  96. package/dist/esm/chunk-HLVMEUWD.mjs.map +1 -0
  97. package/dist/esm/chunk-HQSLBTW5.mjs +2 -0
  98. package/dist/esm/chunk-HQSLBTW5.mjs.map +1 -0
  99. package/dist/esm/{chunk-T23OVRNF.mjs → chunk-IOSQVDZI.mjs} +2 -2
  100. package/dist/esm/chunk-IZT6OX3R.mjs +2 -0
  101. package/dist/esm/{chunk-GHVMDDWO.mjs.map → chunk-IZT6OX3R.mjs.map} +1 -1
  102. package/dist/esm/{chunk-VLUJRHOL.mjs → chunk-KDCHX7BI.mjs} +2 -2
  103. package/dist/esm/chunk-KHOHRD2B.mjs +2 -0
  104. package/dist/esm/chunk-KHOHRD2B.mjs.map +1 -0
  105. package/dist/esm/chunk-L6PGWGFF.mjs +2 -0
  106. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  107. package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
  108. package/dist/esm/{chunk-H5YTHO4L.mjs → chunk-LV2V23Z6.mjs} +2 -2
  109. package/dist/esm/chunk-LV2V23Z6.mjs.map +1 -0
  110. package/dist/esm/chunk-MLWIHWNH.mjs +1 -0
  111. package/dist/esm/chunk-MNBYKY5P.mjs +2 -0
  112. package/dist/esm/{chunk-FJH4H4E5.mjs.map → chunk-MNBYKY5P.mjs.map} +1 -1
  113. package/dist/esm/{chunk-7STYQ5ZE.mjs → chunk-NPFNYP75.mjs} +2 -2
  114. package/dist/esm/{chunk-UT37XKQU.mjs → chunk-OGHE4AQA.mjs} +2 -2
  115. package/dist/esm/chunk-OVJQWQ2N.mjs +2 -0
  116. package/dist/esm/chunk-OVJQWQ2N.mjs.map +1 -0
  117. package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
  118. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  119. package/dist/esm/{chunk-FVU47J7S.mjs → chunk-PIOHC246.mjs} +2 -2
  120. package/dist/esm/chunk-PIOHC246.mjs.map +1 -0
  121. package/dist/esm/{chunk-QI2ILOP4.mjs → chunk-PJLCPRYJ.mjs} +2 -2
  122. package/dist/esm/{chunk-6RBUXB5I.mjs → chunk-QIAHBEEW.mjs} +2 -2
  123. package/dist/esm/{chunk-NC5HHEEM.mjs → chunk-QTRYMRYK.mjs} +2 -2
  124. package/dist/esm/{chunk-Q5T2WL2M.mjs → chunk-QWRH22H4.mjs} +2 -2
  125. package/dist/esm/{chunk-STYDBDYL.mjs → chunk-R5QUBEH6.mjs} +2 -2
  126. package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
  127. package/dist/esm/{chunk-ZNEBMSNC.mjs → chunk-RHBCVCOS.mjs} +2 -2
  128. package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
  129. package/dist/esm/chunk-ROXFCLDT.mjs.map +1 -0
  130. package/dist/esm/{chunk-LJ624HBI.mjs → chunk-RQEWIZ67.mjs} +2 -2
  131. package/dist/esm/{chunk-3FVRXELT.mjs → chunk-TBMAJ6AW.mjs} +2 -2
  132. package/dist/esm/{chunk-ZGTJMNZG.mjs → chunk-TC3VVMPY.mjs} +2 -2
  133. package/dist/esm/{chunk-YQOKWIVY.mjs → chunk-TGG7SWBO.mjs} +2 -2
  134. package/dist/esm/chunk-TGG7SWBO.mjs.map +1 -0
  135. package/dist/esm/{chunk-FEWIHUNW.mjs → chunk-TGXZVNR5.mjs} +2 -2
  136. package/dist/esm/{chunk-TTELTGMA.mjs → chunk-TORRTLWV.mjs} +2 -2
  137. package/dist/esm/chunk-TORRTLWV.mjs.map +1 -0
  138. package/dist/esm/chunk-TQR7M73S.mjs +2 -0
  139. package/dist/esm/chunk-TQR7M73S.mjs.map +1 -0
  140. package/dist/esm/{chunk-PFFAQZHT.mjs → chunk-U43IJHQN.mjs} +2 -2
  141. package/dist/esm/{chunk-GOT527V2.mjs → chunk-UMFJDDYI.mjs} +2 -2
  142. package/dist/esm/chunk-UMFJDDYI.mjs.map +1 -0
  143. package/dist/esm/{chunk-HGZGTBA4.mjs → chunk-UML2VQZT.mjs} +2 -2
  144. package/dist/esm/{chunk-47DNXBM6.mjs → chunk-UPIN5AIO.mjs} +2 -2
  145. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  146. package/dist/esm/chunk-VNO4VHJN.mjs +2 -0
  147. package/dist/esm/chunk-VNO4VHJN.mjs.map +1 -0
  148. package/dist/esm/chunk-WBOLHLPX.mjs +2 -0
  149. package/dist/esm/chunk-WBOLHLPX.mjs.map +1 -0
  150. package/dist/esm/{chunk-COW5IGYC.mjs → chunk-WFZDFFBM.mjs} +2 -2
  151. package/dist/esm/chunk-XDGQTMDV.mjs +2 -0
  152. package/dist/esm/chunk-XDGQTMDV.mjs.map +1 -0
  153. package/dist/esm/{chunk-XHPLLMR5.mjs → chunk-XLPVG4XR.mjs} +2 -2
  154. package/dist/esm/{chunk-YQUZLZL4.mjs → chunk-YBEF3UR3.mjs} +2 -2
  155. package/dist/esm/{chunk-4MHEB5MN.mjs → chunk-YKVKSNH4.mjs} +2 -2
  156. package/dist/esm/chunk-YVSU6GOA.mjs +2 -0
  157. package/dist/esm/chunk-YVSU6GOA.mjs.map +1 -0
  158. package/dist/esm/{chunk-C3L4ETUF.mjs → chunk-ZYYK3UXP.mjs} +2 -2
  159. package/dist/esm/client/core.mjs +1 -1
  160. package/dist/esm/client/get.d.mts +1 -2
  161. package/dist/esm/client/get.mjs +1 -1
  162. package/dist/esm/client/index.d.mts +2 -2
  163. package/dist/esm/client/index.mjs +1 -1
  164. package/dist/esm/client/post.d.mts +1 -3
  165. package/dist/esm/client/post.mjs +1 -1
  166. package/dist/esm/core/account/Account.d.mts +20 -0
  167. package/dist/esm/core/account/Account.mjs +2 -0
  168. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  169. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  170. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  171. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  172. package/dist/esm/core/account/index.d.mts +14 -5
  173. package/dist/esm/core/account/index.mjs +1 -1
  174. package/dist/esm/core/account/utils/address.mjs +1 -1
  175. package/dist/esm/core/account/utils/index.mjs +1 -1
  176. package/dist/esm/core/accountAddress.mjs +1 -1
  177. package/dist/esm/core/authenticationKey.mjs +1 -1
  178. package/dist/esm/core/crypto/ed25519.d.mts +10 -0
  179. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  180. package/dist/esm/core/crypto/hdKey.d.mts +1 -15
  181. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  182. package/dist/esm/core/crypto/index.d.mts +5 -7
  183. package/dist/esm/core/crypto/index.mjs +1 -1
  184. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  185. package/dist/esm/core/crypto/multiKey.d.mts +3 -4
  186. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  187. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  188. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  189. package/dist/esm/core/crypto/signature.mjs +1 -1
  190. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  191. package/dist/esm/core/index.d.mts +7 -6
  192. package/dist/esm/core/index.mjs +1 -1
  193. package/dist/esm/index.d.mts +10 -15
  194. package/dist/esm/index.mjs +1 -1
  195. package/dist/esm/internal/account.d.mts +2 -14
  196. package/dist/esm/internal/account.mjs +1 -1
  197. package/dist/esm/internal/ans.d.mts +1 -1
  198. package/dist/esm/internal/ans.mjs +1 -1
  199. package/dist/esm/internal/coin.d.mts +7 -7
  200. package/dist/esm/internal/coin.mjs +1 -1
  201. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  202. package/dist/esm/internal/digitalAsset.mjs +1 -1
  203. package/dist/esm/internal/event.d.mts +1 -1
  204. package/dist/esm/internal/event.mjs +1 -1
  205. package/dist/esm/internal/faucet.d.mts +1 -1
  206. package/dist/esm/internal/faucet.mjs +1 -1
  207. package/dist/esm/internal/fungibleAsset.d.mts +5 -5
  208. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  209. package/dist/esm/internal/general.mjs +1 -1
  210. package/dist/esm/internal/staking.d.mts +1 -1
  211. package/dist/esm/internal/staking.mjs +1 -1
  212. package/dist/esm/internal/transaction.mjs +1 -1
  213. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  214. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  215. package/dist/esm/internal/view.d.mts +7 -7
  216. package/dist/esm/internal/view.mjs +1 -1
  217. package/dist/esm/transactions/authenticator/account.d.mts +4 -3
  218. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  219. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  220. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  221. package/dist/esm/transactions/index.d.mts +2 -2
  222. package/dist/esm/transactions/index.mjs +1 -1
  223. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  224. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  225. package/dist/esm/transactions/instances/index.mjs +1 -1
  226. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  227. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  228. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  229. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  231. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  232. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  233. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  234. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  235. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -13
  236. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  237. package/dist/esm/transactions/management/index.d.mts +2 -2
  238. package/dist/esm/transactions/management/index.mjs +1 -1
  239. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  240. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  241. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  242. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  243. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  244. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  245. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  246. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  247. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +25 -13
  248. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  249. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  250. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  251. package/dist/esm/transactions/types.d.mts +6 -6
  252. package/dist/esm/types/index.d.mts +3 -17
  253. package/dist/esm/types/index.mjs +1 -1
  254. package/dist/esm/utils/apiEndpoints.d.mts +1 -3
  255. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  256. package/dist/esm/utils/const.d.mts +1 -3
  257. package/dist/esm/utils/const.mjs +1 -1
  258. package/dist/esm/utils/index.d.mts +10 -1
  259. package/dist/esm/utils/index.mjs +1 -1
  260. package/dist/esm/utils/normalizeBundle.d.mts +23 -0
  261. package/dist/esm/utils/normalizeBundle.mjs +2 -0
  262. package/dist/esm/version.d.mts +1 -1
  263. package/dist/esm/version.mjs +1 -1
  264. package/package.json +3 -8
  265. package/src/api/account.ts +1 -2
  266. package/src/api/ans.ts +1 -2
  267. package/src/api/aptos.ts +0 -6
  268. package/src/api/aptosConfig.ts +1 -46
  269. package/src/api/digitalAsset.ts +1 -2
  270. package/src/api/fungibleAsset.ts +1 -2
  271. package/src/api/transaction.ts +1 -2
  272. package/src/api/transactionSubmission/management.ts +1 -1
  273. package/src/api/transactionSubmission/sign.ts +1 -1
  274. package/src/bcs/serializer.ts +0 -18
  275. package/src/client/core.ts +0 -8
  276. package/src/client/get.ts +0 -6
  277. package/src/client/post.ts +0 -12
  278. package/src/{account → core/account}/Account.ts +16 -12
  279. package/src/{account → core/account}/Ed25519Account.ts +7 -13
  280. package/src/{account → core/account}/SingleKeyAccount.ts +8 -13
  281. package/src/core/account/index.ts +3 -1
  282. package/src/core/crypto/ed25519.ts +24 -4
  283. package/src/core/crypto/hdKey.ts +0 -31
  284. package/src/core/crypto/index.ts +0 -2
  285. package/src/core/crypto/multiKey.ts +11 -21
  286. package/src/core/crypto/singleKey.ts +0 -11
  287. package/src/core/index.ts +1 -0
  288. package/src/index.ts +0 -1
  289. package/src/internal/account.ts +1 -1
  290. package/src/internal/ans.ts +1 -2
  291. package/src/internal/digitalAsset.ts +1 -2
  292. package/src/internal/fungibleAsset.ts +1 -2
  293. package/src/internal/transactionSubmission.ts +7 -8
  294. package/src/transactions/authenticator/account.ts +11 -6
  295. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  296. package/src/transactions/management/transactionWorker.ts +2 -8
  297. package/src/transactions/transactionBuilder/index.ts +0 -1
  298. package/src/transactions/transactionBuilder/transactionBuilder.ts +103 -76
  299. package/src/types/index.ts +0 -19
  300. package/src/utils/apiEndpoints.ts +0 -14
  301. package/src/utils/const.ts +0 -2
  302. package/src/utils/index.ts +1 -0
  303. package/src/utils/normalizeBundle.ts +21 -0
  304. package/src/version.ts +1 -1
  305. package/dist/esm/account/Account.d.mts +0 -34
  306. package/dist/esm/account/Account.mjs +0 -2
  307. package/dist/esm/account/Ed25519Account.d.mts +0 -34
  308. package/dist/esm/account/Ed25519Account.mjs +0 -2
  309. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -46
  310. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  311. package/dist/esm/account/KeylessAccount.d.mts +0 -87
  312. package/dist/esm/account/KeylessAccount.mjs +0 -2
  313. package/dist/esm/account/MultiKeyAccount.d.mts +0 -99
  314. package/dist/esm/account/MultiKeyAccount.mjs +0 -2
  315. package/dist/esm/account/SingleKeyAccount.d.mts +0 -34
  316. package/dist/esm/account/SingleKeyAccount.mjs +0 -2
  317. package/dist/esm/account/index.d.mts +0 -39
  318. package/dist/esm/account/index.mjs +0 -2
  319. package/dist/esm/api/keyless.d.mts +0 -65
  320. package/dist/esm/api/keyless.mjs +0 -2
  321. package/dist/esm/chunk-4MS27RPK.mjs +0 -2
  322. package/dist/esm/chunk-4VAQCOR6.mjs +0 -2
  323. package/dist/esm/chunk-4VAQCOR6.mjs.map +0 -1
  324. package/dist/esm/chunk-5VSMDXZ6.mjs +0 -2
  325. package/dist/esm/chunk-5VSMDXZ6.mjs.map +0 -1
  326. package/dist/esm/chunk-6GQAHQGW.mjs +0 -2
  327. package/dist/esm/chunk-6GQAHQGW.mjs.map +0 -1
  328. package/dist/esm/chunk-6M6XXPQQ.mjs +0 -2
  329. package/dist/esm/chunk-6M6XXPQQ.mjs.map +0 -1
  330. package/dist/esm/chunk-7JNPSNL6.mjs +0 -2
  331. package/dist/esm/chunk-7JNPSNL6.mjs.map +0 -1
  332. package/dist/esm/chunk-7QFBF7FS.mjs +0 -2
  333. package/dist/esm/chunk-7QFBF7FS.mjs.map +0 -1
  334. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  335. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  336. package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
  337. package/dist/esm/chunk-C3AEWQ3A.mjs +0 -2
  338. package/dist/esm/chunk-C3AEWQ3A.mjs.map +0 -1
  339. package/dist/esm/chunk-CYDWEPFL.mjs +0 -1
  340. package/dist/esm/chunk-CYDWEPFL.mjs.map +0 -1
  341. package/dist/esm/chunk-D73X3S27.mjs +0 -2
  342. package/dist/esm/chunk-D73X3S27.mjs.map +0 -1
  343. package/dist/esm/chunk-DORK55K3.mjs.map +0 -1
  344. package/dist/esm/chunk-E7HMV2GZ.mjs +0 -2
  345. package/dist/esm/chunk-E7HMV2GZ.mjs.map +0 -1
  346. package/dist/esm/chunk-FJH4H4E5.mjs +0 -2
  347. package/dist/esm/chunk-FLYEALDB.mjs +0 -2
  348. package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
  349. package/dist/esm/chunk-FTWBJZYH.mjs +0 -2
  350. package/dist/esm/chunk-FTWBJZYH.mjs.map +0 -1
  351. package/dist/esm/chunk-FVU47J7S.mjs.map +0 -1
  352. package/dist/esm/chunk-GHVMDDWO.mjs +0 -2
  353. package/dist/esm/chunk-GOT527V2.mjs.map +0 -1
  354. package/dist/esm/chunk-GUWBE3CV.mjs.map +0 -1
  355. package/dist/esm/chunk-H5YTHO4L.mjs.map +0 -1
  356. package/dist/esm/chunk-HTSXKHXX.mjs +0 -2
  357. package/dist/esm/chunk-IPH435RF.mjs +0 -2
  358. package/dist/esm/chunk-IPH435RF.mjs.map +0 -1
  359. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  360. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  361. package/dist/esm/chunk-KGJITNRZ.mjs +0 -2
  362. package/dist/esm/chunk-KGJITNRZ.mjs.map +0 -1
  363. package/dist/esm/chunk-KY3SB7JG.mjs +0 -2
  364. package/dist/esm/chunk-KY3SB7JG.mjs.map +0 -1
  365. package/dist/esm/chunk-L3OMI2PE.mjs +0 -2
  366. package/dist/esm/chunk-L3OMI2PE.mjs.map +0 -1
  367. package/dist/esm/chunk-LX2KX36Q.mjs +0 -2
  368. package/dist/esm/chunk-LX2KX36Q.mjs.map +0 -1
  369. package/dist/esm/chunk-MIMIRNUQ.mjs +0 -2
  370. package/dist/esm/chunk-MIMIRNUQ.mjs.map +0 -1
  371. package/dist/esm/chunk-MO5LGCZV.mjs +0 -2
  372. package/dist/esm/chunk-MO5LGCZV.mjs.map +0 -1
  373. package/dist/esm/chunk-MQ32XR4V.mjs +0 -2
  374. package/dist/esm/chunk-MQ32XR4V.mjs.map +0 -1
  375. package/dist/esm/chunk-OJ4NIVFW.mjs.map +0 -1
  376. package/dist/esm/chunk-OKRUEVF3.mjs +0 -2
  377. package/dist/esm/chunk-OKRUEVF3.mjs.map +0 -1
  378. package/dist/esm/chunk-OPCSBCGS.mjs +0 -2
  379. package/dist/esm/chunk-OPCSBCGS.mjs.map +0 -1
  380. package/dist/esm/chunk-PKENQYTQ.mjs +0 -2
  381. package/dist/esm/chunk-QJHFD2MT.mjs.map +0 -1
  382. package/dist/esm/chunk-R7BAM2G6.mjs +0 -2
  383. package/dist/esm/chunk-R7BAM2G6.mjs.map +0 -1
  384. package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
  385. package/dist/esm/chunk-RFSO3JRG.mjs.map +0 -1
  386. package/dist/esm/chunk-RQ6M2YQF.mjs +0 -2
  387. package/dist/esm/chunk-RQ6M2YQF.mjs.map +0 -1
  388. package/dist/esm/chunk-S5HG2QUD.mjs +0 -2
  389. package/dist/esm/chunk-S5HG2QUD.mjs.map +0 -1
  390. package/dist/esm/chunk-T7XMSCZV.mjs +0 -2
  391. package/dist/esm/chunk-T7XMSCZV.mjs.map +0 -1
  392. package/dist/esm/chunk-TTELTGMA.mjs.map +0 -1
  393. package/dist/esm/chunk-WPVBC4JS.mjs +0 -2
  394. package/dist/esm/chunk-WPVBC4JS.mjs.map +0 -1
  395. package/dist/esm/chunk-WTVN3XGK.mjs +0 -2
  396. package/dist/esm/chunk-WTVN3XGK.mjs.map +0 -1
  397. package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
  398. package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
  399. package/dist/esm/chunk-YQOKWIVY.mjs.map +0 -1
  400. package/dist/esm/core/crypto/ephemeral.d.mts +0 -77
  401. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  402. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  403. package/dist/esm/core/crypto/keyless.d.mts +0 -217
  404. package/dist/esm/core/crypto/keyless.mjs +0 -2
  405. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  406. package/dist/esm/core/crypto/poseidon.d.mts +0 -7
  407. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  408. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  409. package/dist/esm/internal/keyless.d.mts +0 -65
  410. package/dist/esm/internal/keyless.mjs +0 -2
  411. package/dist/esm/internal/keyless.mjs.map +0 -1
  412. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -47
  413. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
  414. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
  415. package/dist/esm/types/keyless.d.mts +0 -14
  416. package/dist/esm/types/keyless.mjs +0 -1
  417. package/dist/esm/types/keyless.mjs.map +0 -1
  418. package/src/account/EphemeralKeyPair.ts +0 -115
  419. package/src/account/KeylessAccount.ts +0 -240
  420. package/src/account/MultiKeyAccount.ts +0 -119
  421. package/src/account/index.ts +0 -6
  422. package/src/api/keyless.ts +0 -34
  423. package/src/core/crypto/ephemeral.ts +0 -149
  424. package/src/core/crypto/keyless.ts +0 -508
  425. package/src/core/crypto/poseidon.ts +0 -134
  426. package/src/internal/keyless.ts +0 -185
  427. package/src/transactions/transactionBuilder/signingMessage.ts +0 -70
  428. package/src/types/keyless.ts +0 -6
  429. /package/dist/esm/{chunk-MRTAMMS3.mjs.map → chunk-2PFN7LYP.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-PTIZKRON.mjs.map → chunk-3HV2C4SS.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-FFVWTX36.mjs.map → chunk-4LMAVPA4.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-PKENQYTQ.mjs.map → chunk-5OM4V4DR.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-NCIRQZOJ.mjs.map → chunk-6IGEUEER.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-IGJCOZGO.mjs.map → chunk-6MG4JAYB.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-FYJMB23M.mjs.map → chunk-A556OVZY.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-7PICPK26.mjs.map → chunk-BAV4XY7C.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-HGXO74Q3.mjs.map → chunk-BBU2EE6D.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-D4QQKQXJ.mjs.map → chunk-BRQYARQ3.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  442. /package/dist/esm/{account/Account.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-W3UCKFFU.mjs.map → chunk-EJCKCYYI.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-JTCWZB3Q.mjs.map → chunk-FXNFWLQC.mjs.map} +0 -0
  446. /package/dist/esm/{account/Ed25519Account.mjs.map → chunk-GED6IT3S.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-AZABJ5QQ.mjs.map → chunk-GRT5PHL6.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-3HL2ZWKG.mjs.map → chunk-GXYS45Y5.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-IOSQVDZI.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-VLUJRHOL.mjs.map → chunk-KDCHX7BI.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-4MS27RPK.mjs.map → chunk-L6PGWGFF.mjs.map} +0 -0
  452. /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-MLWIHWNH.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-UT37XKQU.mjs.map → chunk-OGHE4AQA.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-QI2ILOP4.mjs.map → chunk-PJLCPRYJ.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-QIAHBEEW.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-QTRYMRYK.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-Q5T2WL2M.mjs.map → chunk-QWRH22H4.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  460. /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-R7G3CLRI.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-LJ624HBI.mjs.map → chunk-RQEWIZ67.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  464. /package/dist/esm/{chunk-ZGTJMNZG.mjs.map → chunk-TC3VVMPY.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-FEWIHUNW.mjs.map → chunk-TGXZVNR5.mjs.map} +0 -0
  466. /package/dist/esm/{chunk-PFFAQZHT.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  467. /package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  468. /package/dist/esm/{chunk-47DNXBM6.mjs.map → chunk-UPIN5AIO.mjs.map} +0 -0
  469. /package/dist/esm/{account/MultiKeyAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  470. /package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  471. /package/dist/esm/{chunk-XHPLLMR5.mjs.map → chunk-XLPVG4XR.mjs.map} +0 -0
  472. /package/dist/esm/{chunk-YQUZLZL4.mjs.map → chunk-YBEF3UR3.mjs.map} +0 -0
  473. /package/dist/esm/{chunk-4MHEB5MN.mjs.map → chunk-YKVKSNH4.mjs.map} +0 -0
  474. /package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  475. /package/dist/esm/{account/SingleKeyAccount.mjs.map → core/account/Account.mjs.map} +0 -0
  476. /package/dist/esm/{account/index.mjs.map → core/account/Ed25519Account.mjs.map} +0 -0
  477. /package/dist/esm/{api/keyless.mjs.map → core/account/SingleKeyAccount.mjs.map} +0 -0
  478. /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → utils/normalizeBundle.mjs.map} +0 -0
@@ -3,8 +3,6 @@ import EventEmitter from 'eventemitter3';
3
3
  declare const NetworkToIndexerAPI: Record<string, string>;
4
4
  declare const NetworkToNodeAPI: Record<string, string>;
5
5
  declare const NetworkToFaucetAPI: Record<string, string>;
6
- declare const NetworkToPepperAPI: Record<string, string>;
7
- declare const NetworkToProverAPI: Record<string, string>;
8
6
  declare enum Network {
9
7
  MAINNET = "mainnet",
10
8
  TESTNET = "testnet",
@@ -869,23 +867,11 @@ declare enum AccountAuthenticatorVariant {
869
867
  }
870
868
  declare enum AnyPublicKeyVariant {
871
869
  Ed25519 = 0,
872
- Secp256k1 = 1,
873
- Keyless = 3
870
+ Secp256k1 = 1
874
871
  }
875
872
  declare enum AnySignatureVariant {
876
873
  Ed25519 = 0,
877
- Secp256k1 = 1,
878
- Keyless = 3
879
- }
880
- declare enum EphemeralPublicKeyVariant {
881
- Ed25519 = 0
882
- }
883
- declare enum EphemeralSignatureVariant {
884
- Ed25519 = 0
885
- }
886
- declare enum EphemeralCertificate {
887
- ZkProof = 0,
888
- OpenIdSignature = 1
874
+ Secp256k1 = 1
889
875
  }
890
876
  /**
891
877
  * BCS types
@@ -907,8 +893,6 @@ type AptosSettings = {
907
893
  readonly fullnode?: string;
908
894
  readonly faucet?: string;
909
895
  readonly indexer?: string;
910
- readonly pepper?: string;
911
- readonly prover?: string;
912
896
  readonly clientConfig?: ClientConfig;
913
897
  readonly client?: Client;
914
898
  readonly fullnodeConfig?: FullNodeConfig;
@@ -2170,8 +2154,6 @@ declare class Serializer {
2170
2154
  * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
2171
2155
  */
2172
2156
  serializeVector<T extends Serializable>(values: Array<T>): void;
2173
- serializeOption<T extends Serializable>(value?: T): void;
2174
- serializeOptionStr(value?: string): void;
2175
2157
  }
2176
2158
  declare function ensureBoolean(value: unknown): asserts value is boolean;
2177
2159
  declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
@@ -3064,6 +3046,16 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
3064
3046
  * @param mnemonics the mnemonic seed phrase
3065
3047
  */
3066
3048
  static fromDerivationPath(path: string, mnemonics: string): Ed25519PrivateKey;
3049
+ /**
3050
+ * A private inner function so we can separate from the main fromDerivationPath() method
3051
+ * to add tests to verify we create the keys correctly.
3052
+ *
3053
+ * @param path the BIP44 path
3054
+ * @param seed the seed phrase created by the mnemonics
3055
+ * @param offset the offset used for key derivation, defaults to 0x80000000
3056
+ * @returns
3057
+ */
3058
+ private static fromDerivationPathInner;
3067
3059
  /**
3068
3060
  * Derive the Ed25519PublicKey for this private key.
3069
3061
  *
@@ -3131,7 +3123,6 @@ type DerivedKeys = {
3131
3123
  */
3132
3124
  declare const APTOS_HARDENED_REGEX: RegExp;
3133
3125
  declare const APTOS_BIP44_REGEX: RegExp;
3134
- declare const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
3135
3126
  /**
3136
3127
  * A list of supported key types and associated seeds
3137
3128
  */
@@ -3181,13 +3172,6 @@ declare const CKDPriv: ({ key, chainCode }: DerivedKeys, index: number) => Deriv
3181
3172
  * @param path
3182
3173
  */
3183
3174
  declare const splitPath: (path: string) => Array<string>;
3184
- /**
3185
- * @param path the BIP44 path
3186
- * @param seed the seed phrase created by the mnemonics
3187
- * @param offset the offset used for key derivation, defaults to 0x80000000
3188
- * @returns
3189
- */
3190
- declare function fromDerivationPath(path: string, hashSeed: HexInput, seed: Uint8Array, offset?: number): Uint8Array;
3191
3175
  /**
3192
3176
  * Normalizes the mnemonic by removing extra whitespace and making it lowercase
3193
3177
  * @param mnemonic the mnemonic seed phrase
@@ -3394,9 +3378,8 @@ declare class MultiKey extends AccountPublicKey {
3394
3378
  createBitmap(args: {
3395
3379
  bits: number[];
3396
3380
  }): Uint8Array;
3397
- getIndex(publicKey: PublicKey): number;
3398
3381
  }
3399
- declare class MultiSignature extends Signature {
3382
+ declare class MultiKeySignature extends Signature {
3400
3383
  /**
3401
3384
  * Number of bytes in the bitmap representing who signed the transaction (32-bits)
3402
3385
  */
@@ -3448,266 +3431,7 @@ declare class MultiSignature extends Signature {
3448
3431
  }): Uint8Array;
3449
3432
  toUint8Array(): Uint8Array;
3450
3433
  serialize(serializer: Serializer): void;
3451
- static deserialize(deserializer: Deserializer): MultiSignature;
3452
- }
3453
-
3454
- /**
3455
- * Represents ephemeral keys and signatures for Aptos Keyless accounts.
3456
- *
3457
- * TODO
3458
- */
3459
- declare class EphemeralPublicKey extends PublicKey {
3460
- /**
3461
- * Reference to the inner public key
3462
- */
3463
- readonly publicKey: PublicKey;
3464
- readonly variant: EphemeralPublicKeyVariant;
3465
- constructor(publicKey: PublicKey);
3466
- /**
3467
- * Get the public key in bytes (Uint8Array).
3468
- *
3469
- * @returns Uint8Array representation of the public key
3470
- */
3471
- toUint8Array(): Uint8Array;
3472
- /**
3473
- * Get the public key as a hex string with the 0x prefix.
3474
- *
3475
- * @returns string representation of the public key
3476
- */
3477
- toString(): string;
3478
- /**
3479
- * Verifies a signed data with a public key
3480
- *
3481
- * @param args.message message
3482
- * @param args.signature The signature
3483
- * @returns true if the signature is valid
3484
- */
3485
- verifySignature(args: {
3486
- message: HexInput;
3487
- signature: EphemeralSignature;
3488
- }): boolean;
3489
- serialize(serializer: Serializer): void;
3490
- static deserialize(deserializer: Deserializer): EphemeralPublicKey;
3491
- static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
3492
- isEd25519(): this is Ed25519PublicKey;
3493
- }
3494
- declare class EphemeralSignature extends Signature {
3495
- readonly signature: Signature;
3496
- constructor(signature: Signature);
3497
- /**
3498
- * Get the public key in bytes (Uint8Array).
3499
- *
3500
- * @returns Uint8Array representation of the public key
3501
- */
3502
- toUint8Array(): Uint8Array;
3503
- /**
3504
- * Get the public key as a hex string with the 0x prefix.
3505
- *
3506
- * @returns string representation of the public key
3507
- */
3508
- toString(): string;
3509
- static fromHex(hexInput: HexInput): EphemeralSignature;
3510
- serialize(serializer: Serializer): void;
3511
- static deserialize(deserializer: Deserializer): EphemeralSignature;
3512
- }
3513
-
3514
- declare const EPK_HORIZON_SECS = 10000000;
3515
- declare const MAX_AUD_VAL_BYTES = 120;
3516
- declare const MAX_UID_KEY_BYTES = 30;
3517
- declare const MAX_UID_VAL_BYTES = 330;
3518
- declare const MAX_ISS_VAL_BYTES = 120;
3519
- declare const MAX_EXTRA_FIELD_BYTES = 350;
3520
- declare const MAX_JWT_HEADER_B64_BYTES = 300;
3521
- declare const MAX_COMMITED_EPK_BYTES = 93;
3522
- /**
3523
- * Represents the KeylessPublicKey public key
3524
- *
3525
- * KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
3526
- */
3527
- declare class KeylessPublicKey extends AccountPublicKey {
3528
- static readonly ADDRESS_SEED_LENGTH: number;
3529
- readonly iss: string;
3530
- readonly addressSeed: Uint8Array;
3531
- constructor(iss: string, addressSeed: HexInput);
3532
- authKey(): AuthenticationKey;
3533
- /**
3534
- * Get the public key in bytes (Uint8Array).
3535
- *
3536
- * @returns Uint8Array representation of the public key
3537
- */
3538
- toUint8Array(): Uint8Array;
3539
- /**
3540
- * Get the public key as a hex string with the 0x prefix.
3541
- *
3542
- * @returns string representation of the public key
3543
- */
3544
- toString(): string;
3545
- /**
3546
- * Verifies a signed data with a public key
3547
- *
3548
- * @param args.message message
3549
- * @param args.signature The signature
3550
- * @returns true if the signature is valid
3551
- */
3552
- verifySignature(args: {
3553
- message: HexInput;
3554
- signature: KeylessSignature;
3555
- }): boolean;
3556
- serialize(serializer: Serializer): void;
3557
- static deserialize(deserializer: Deserializer): KeylessPublicKey;
3558
- static load(deserializer: Deserializer): KeylessPublicKey;
3559
- static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
3560
- static create(args: {
3561
- iss: string;
3562
- uidKey: string;
3563
- uidVal: string;
3564
- aud: string;
3565
- pepper: HexInput;
3566
- }): KeylessPublicKey;
3567
- }
3568
- declare function computeAddressSeed(args: {
3569
- uidKey: string;
3570
- uidVal: string;
3571
- aud: string;
3572
- pepper: HexInput;
3573
- }): Uint8Array;
3574
- declare class OpenIdSignatureOrZkProof extends Signature {
3575
- readonly signature: Signature;
3576
- constructor(signature: Signature);
3577
- /**
3578
- * Get the public key in bytes (Uint8Array).
3579
- *
3580
- * @returns Uint8Array representation of the public key
3581
- */
3582
- toUint8Array(): Uint8Array;
3583
- /**
3584
- * Get the public key as a hex string with the 0x prefix.
3585
- *
3586
- * @returns string representation of the public key
3587
- */
3588
- toString(): string;
3589
- serialize(serializer: Serializer): void;
3590
- static deserialize(deserializer: Deserializer): OpenIdSignatureOrZkProof;
3591
- }
3592
- declare class Groth16Zkp extends Serializable {
3593
- a: Uint8Array;
3594
- b: Uint8Array;
3595
- c: Uint8Array;
3596
- constructor(args: {
3597
- a: HexInput;
3598
- b: HexInput;
3599
- c: HexInput;
3600
- });
3601
- toUint8Array(): Uint8Array;
3602
- serialize(serializer: Serializer): void;
3603
- static deserialize(deserializer: Deserializer): Groth16Zkp;
3604
- }
3605
- declare class SignedGroth16Signature extends Signature {
3606
- readonly proof: Groth16Zkp;
3607
- readonly expHorizonSecs: bigint;
3608
- readonly extraField?: string;
3609
- readonly overrideAudVal?: string;
3610
- readonly trainingWheelsSignature?: EphemeralSignature;
3611
- constructor(args: {
3612
- proof: Groth16Zkp;
3613
- expHorizonSecs?: bigint;
3614
- extraField?: string;
3615
- overrideAudVal?: string;
3616
- trainingWheelsSignature?: EphemeralSignature;
3617
- });
3618
- /**
3619
- * Get the signature in bytes (Uint8Array).
3620
- *
3621
- * @returns Uint8Array representation of the signature
3622
- */
3623
- toUint8Array(): Uint8Array;
3624
- /**
3625
- * Get the signature as a hex string with the 0x prefix.
3626
- *
3627
- * @returns string representation of the signature
3628
- */
3629
- toString(): string;
3630
- serialize(serializer: Serializer): void;
3631
- static deserialize(deserializer: Deserializer): SignedGroth16Signature;
3632
- static load(deserializer: Deserializer): SignedGroth16Signature;
3633
- }
3634
- /**
3635
- * A OpenId signature which contains the private inputs to an OIDB proof.
3636
- */
3637
- declare class OpenIdSignature extends Signature {
3638
- readonly jwtSignature: string;
3639
- readonly jwtPayloadJson: string;
3640
- readonly uidKey: string;
3641
- readonly epkBlinder: Uint8Array;
3642
- readonly pepper: Uint8Array;
3643
- readonly overrideAudValue?: string;
3644
- /**
3645
- * Create a new Signature instance from a Uint8Array or String.
3646
- *
3647
- * @param hexInput A HexInput (string or Uint8Array)
3648
- */
3649
- constructor(args: {
3650
- jwtSignature: string;
3651
- jwtPayloadJson: string;
3652
- uidKey?: string;
3653
- epkBlinder: Uint8Array;
3654
- pepper: Uint8Array;
3655
- overrideAudValue?: string;
3656
- });
3657
- /**
3658
- * Get the signature in bytes (Uint8Array).
3659
- *
3660
- * @returns Uint8Array representation of the signature
3661
- */
3662
- toUint8Array(): Uint8Array;
3663
- /**
3664
- * Get the signature as a hex string with the 0x prefix.
3665
- *
3666
- * @returns string representation of the signature
3667
- */
3668
- toString(): string;
3669
- serialize(serializer: Serializer): void;
3670
- static deserialize(deserializer: Deserializer): OpenIdSignature;
3671
- static load(deserializer: Deserializer): OpenIdSignature;
3672
- static isSignature(signature: Signature): signature is OpenIdSignature;
3673
- }
3674
- /**
3675
- * A signature of a message signed via OIDC that uses proofs or the jwt token to authenticate.
3676
- */
3677
- declare class KeylessSignature extends Signature {
3678
- readonly openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
3679
- readonly jwtHeader: string;
3680
- readonly expiryDateSecs: bigint | number;
3681
- readonly ephemeralPublicKey: EphemeralPublicKey;
3682
- readonly ephemeralSignature: EphemeralSignature;
3683
- /**
3684
- * Create a new Signature instance from a Uint8Array or String.
3685
- *
3686
- * @param hexInput A HexInput (string or Uint8Array)
3687
- */
3688
- constructor(args: {
3689
- jwtHeader: string;
3690
- openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
3691
- expiryDateSecs: bigint | number;
3692
- ephemeralPublicKey: EphemeralPublicKey;
3693
- ephemeralSignature: EphemeralSignature;
3694
- });
3695
- /**
3696
- * Get the signature in bytes (Uint8Array).
3697
- *
3698
- * @returns Uint8Array representation of the signature
3699
- */
3700
- toUint8Array(): Uint8Array;
3701
- /**
3702
- * Get the signature as a hex string with the 0x prefix.
3703
- *
3704
- * @returns string representation of the signature
3705
- */
3706
- toString(): string;
3707
- serialize(serializer: Serializer): void;
3708
- static deserialize(deserializer: Deserializer): KeylessSignature;
3709
- static load(deserializer: Deserializer): KeylessSignature;
3710
- static isSignature(signature: Signature): signature is KeylessSignature;
3434
+ static deserialize(deserializer: Deserializer): MultiKeySignature;
3711
3435
  }
3712
3436
 
3713
3437
  /**
@@ -3900,61 +3624,373 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
3900
3624
  */
3901
3625
  declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
3902
3626
  readonly public_keys: MultiKey;
3903
- readonly signatures: MultiSignature;
3904
- constructor(public_keys: MultiKey, signatures: MultiSignature);
3627
+ readonly signatures: Array<AnySignature>;
3628
+ readonly signatures_bitmap: Uint8Array;
3629
+ constructor(public_keys: MultiKey, signatures: Array<AnySignature>, signatures_bitmap: Uint8Array);
3905
3630
  serialize(serializer: Serializer): void;
3906
3631
  static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
3907
3632
  }
3908
3633
 
3634
+ interface SingleKeySignerConstructorArgs {
3635
+ privateKey: PrivateKey;
3636
+ address?: AccountAddressInput;
3637
+ }
3638
+ interface SingleKeySignerGenerateArgs {
3639
+ scheme?: SigningSchemeInput;
3640
+ }
3641
+ type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
3642
+ path: string;
3643
+ mnemonic: string;
3644
+ };
3645
+ interface VerifySingleKeySignatureArgs {
3646
+ message: HexInput;
3647
+ signature: AnySignature;
3648
+ }
3909
3649
  /**
3910
- * Type of API endpoint for request routing
3650
+ * Signer implementation for the SingleKey authentication scheme.
3651
+ * This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
3652
+ * Currently, the only supported signature schemes are Ed25519 and Secp256k1.
3653
+ *
3654
+ * Note: Generating a signer instance does not create the account on-chain.
3911
3655
  */
3912
- declare enum AptosApiType {
3913
- FULLNODE = "Fullnode",
3914
- INDEXER = "Indexer",
3915
- FAUCET = "Faucet",
3916
- PEPPER = "Pepper",
3917
- PROVER = "Prover"
3656
+ declare class SingleKeyAccount implements Account$1 {
3657
+ /**
3658
+ * Private key associated with the account
3659
+ */
3660
+ readonly privateKey: PrivateKey;
3661
+ readonly publicKey: AnyPublicKey;
3662
+ readonly accountAddress: AccountAddress;
3663
+ readonly signingScheme = SigningScheme.SingleKey;
3664
+ constructor(args: SingleKeySignerConstructorArgs);
3665
+ /**
3666
+ * Derives an account from a randomly generated private key.
3667
+ * Default generation is using an Ed25519 key
3668
+ * @returns Account with the given signature scheme
3669
+ */
3670
+ static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
3671
+ /**
3672
+ * Derives an account with bip44 path and mnemonics,
3673
+ * Default to using an Ed25519 signature scheme.
3674
+ *
3675
+ * @param args.scheme The signature scheme to derive the private key with
3676
+ * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
3677
+ * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
3678
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3679
+ * @param args.mnemonic the mnemonic seed phrase of the account
3680
+ */
3681
+ static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
3682
+ verifySignature(args: VerifySingleKeySignatureArgs): boolean;
3683
+ signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
3684
+ sign(message: HexInput): AnySignature;
3918
3685
  }
3686
+
3919
3687
  /**
3920
- * The default max gas amount when none is given.
3921
- *
3922
- * This is the maximum number of gas units that will be used by a transaction before being rejected.
3923
- *
3924
- * Note that max gas amount varies based on the transaction. A larger transaction will go over this
3925
- * default gas amount, and the value will need to be changed for the specific transaction.
3688
+ * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
3689
+ * This is the default input type when passing an `Ed25519PrivateKey`.
3690
+ * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
3926
3691
  */
3927
- declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
3692
+ interface CreateEd25519AccountFromPrivateKeyArgs {
3693
+ privateKey: Ed25519PrivateKey;
3694
+ address?: AccountAddressInput;
3695
+ legacy?: true;
3696
+ }
3928
3697
  /**
3929
- * The default transaction expiration seconds from now.
3930
- *
3931
- * This time is how long until the blockchain nodes will reject the transaction.
3932
- *
3933
- * Note that the transaction expiration time varies based on network connection and network load. It may need to be
3934
- * increased for the transaction to be processed.
3698
+ * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
3699
+ * The `legacy` argument needs to be explicitly set to false in order to
3700
+ * use the `SingleKey` authentication scheme.
3935
3701
  */
3936
- declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
3702
+ interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
3703
+ privateKey: Ed25519PrivateKey;
3704
+ address?: AccountAddressInput;
3705
+ legacy: false;
3706
+ }
3937
3707
  /**
3938
- * The default number of seconds to wait for a transaction to be processed.
3939
- *
3940
- * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
3941
- * the results of the transaction. It may take longer based on network connection and network load.
3708
+ * Arguments for creating an `SingleKeyAccount` from any supported private key
3709
+ * that is not an `Ed25519PrivateKey`.
3710
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
3942
3711
  */
3943
- declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
3712
+ interface CreateSingleKeyAccountFromPrivateKeyArgs {
3713
+ privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
3714
+ address?: AccountAddressInput;
3715
+ legacy?: false;
3716
+ }
3944
3717
  /**
3945
- * The default gas currency for the network.
3718
+ * Arguments for creating an opaque `Account` from any supported private key.
3719
+ * This is used when the private key type is not known at compilation time.
3946
3720
  */
3947
- declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
3948
- declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
3949
- declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
3721
+ interface CreateAccountFromPrivateKeyArgs {
3722
+ privateKey: PrivateKey;
3723
+ address?: AccountAddressInput;
3724
+ legacy?: boolean;
3725
+ }
3950
3726
  /**
3951
- * The list of supported Processor types for our indexer api.
3952
- *
3953
- * These can be found from the processor_status table in the indexer database.
3954
- * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
3727
+ * Arguments for generating an `Ed25519Account`.
3728
+ * This is the input type used by default.
3955
3729
  */
3956
- declare enum ProcessorType {
3957
- ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
3730
+ interface GenerateEd25519AccountArgs {
3731
+ scheme?: SigningSchemeInput.Ed25519;
3732
+ legacy?: true;
3733
+ }
3734
+ /**
3735
+ * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
3736
+ * The `legacy` argument needs to be explicitly set to false,
3737
+ * otherwise an `Ed25519Account` will be returned instead.
3738
+ */
3739
+ interface GenerateEd25519SingleKeyAccountArgs {
3740
+ scheme?: SigningSchemeInput.Ed25519;
3741
+ legacy: false;
3742
+ }
3743
+ /**
3744
+ * Arguments for generating an `SingleKeyAccount` with any supported private key
3745
+ * that is not an `Ed25519PrivateKey`.
3746
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
3747
+ */
3748
+ interface GenerateSingleKeyAccountArgs {
3749
+ scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
3750
+ legacy?: false;
3751
+ }
3752
+ /**
3753
+ * Arguments for generating an opaque `Account`.
3754
+ * This is used when the input signature scheme is not known at compilation time.
3755
+ */
3756
+ interface GenerateAccountArgs {
3757
+ scheme?: SigningSchemeInput;
3758
+ legacy?: boolean;
3759
+ }
3760
+ /**
3761
+ * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
3762
+ */
3763
+ interface PrivateKeyFromDerivationPathArgs {
3764
+ path: string;
3765
+ mnemonic: string;
3766
+ }
3767
+ /**
3768
+ * Interface for a generic Aptos account.
3769
+ *
3770
+ * The interface is defined as abstract class to provide a single entrypoint for account generation,
3771
+ * either through `Account.generate()` or `Account.fromDerivationPath`.
3772
+ * Despite this being an abstract class, it should be treated as an interface and enforced using
3773
+ * the `implements` keyword.
3774
+ *
3775
+ * Note: Generating an account instance does not create the account on-chain.
3776
+ */
3777
+ declare abstract class Account$1 {
3778
+ /**
3779
+ * Private key associated with the account.
3780
+ * Note: this will be removed in the next major release,
3781
+ * as not all accounts have a private key.
3782
+ */
3783
+ abstract readonly privateKey: PrivateKey;
3784
+ /**
3785
+ * Public key associated with the account
3786
+ */
3787
+ abstract readonly publicKey: AccountPublicKey;
3788
+ /**
3789
+ * Account address associated with the account
3790
+ */
3791
+ abstract readonly accountAddress: AccountAddress;
3792
+ /**
3793
+ * Signing scheme used to sign transactions
3794
+ */
3795
+ abstract signingScheme: SigningScheme;
3796
+ /**
3797
+ * Derives an account from a randomly generated private key.
3798
+ * @param args.scheme The signature scheme to use, to generate the private key
3799
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
3800
+ * @returns An account compatible with the provided signature scheme
3801
+ */
3802
+ static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
3803
+ static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
3804
+ static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
3805
+ static generate(args: GenerateAccountArgs): Account$1;
3806
+ /**
3807
+ * Creates an account from the provided private key.
3808
+ *
3809
+ * @param args.privateKey a valid private key
3810
+ * @param args.address the account's address. If not provided, it will be derived from the public key.
3811
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
3812
+ */
3813
+ static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
3814
+ static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
3815
+ static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
3816
+ static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
3817
+ /**
3818
+ * @deprecated use `fromPrivateKey` instead.
3819
+ * Instantiates an account given a private key and a specified account address.
3820
+ * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
3821
+ *
3822
+ * @param args.privateKey PrivateKey - the underlying private key for the account
3823
+ * @param args.address AccountAddress - The account address the `Account` will sign for
3824
+ * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
3825
+ * to generating a Legacy Ed25519 keypair
3826
+ *
3827
+ * @returns Account
3828
+ */
3829
+ static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
3830
+ /**
3831
+ * Derives an account with bip44 path and mnemonics
3832
+ *
3833
+ * @param args.scheme The signature scheme to derive the private key with
3834
+ * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
3835
+ * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
3836
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3837
+ * @param args.mnemonic the mnemonic seed phrase of the account
3838
+ */
3839
+ static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
3840
+ static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
3841
+ static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
3842
+ static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
3843
+ /**
3844
+ * @deprecated use `publicKey.authKey()` instead.
3845
+ * This key enables account owners to rotate their private key(s)
3846
+ * associated with the account without changing the address that hosts their account.
3847
+ * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
3848
+ *
3849
+ * @param args.publicKey PublicKey - public key of the account
3850
+ * @returns The authentication key for the associated account
3851
+ */
3852
+ static authKey(args: {
3853
+ publicKey: AccountPublicKey;
3854
+ }): AuthenticationKey;
3855
+ /**
3856
+ * Sign a message using the available signing capabilities.
3857
+ * @param message the signing message, as binary input
3858
+ * @return the AccountAuthenticator containing the signature, together with the account's public key
3859
+ */
3860
+ abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
3861
+ /**
3862
+ * Sign the given message with the private key.
3863
+ * @param message in HexInput format
3864
+ * @returns AccountSignature
3865
+ */
3866
+ abstract sign(message: HexInput): Signature;
3867
+ /**
3868
+ * @param args.message raw message data in HexInput format
3869
+ * @param args.signature signed message signature
3870
+ */
3871
+ verifySignature(args: VerifySignatureArgs): boolean;
3872
+ }
3873
+
3874
+ interface Ed25519SignerConstructorArgs {
3875
+ privateKey: Ed25519PrivateKey;
3876
+ address?: AccountAddressInput;
3877
+ }
3878
+ interface Ed25519SignerFromDerivationPathArgs {
3879
+ path: string;
3880
+ mnemonic: string;
3881
+ }
3882
+ interface VerifyEd25519SignatureArgs {
3883
+ message: HexInput;
3884
+ signature: Ed25519Signature;
3885
+ }
3886
+ /**
3887
+ * Signer implementation for the Ed25519 authentication scheme.
3888
+ * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
3889
+ *
3890
+ * Note: Generating a signer instance does not create the account on-chain.
3891
+ */
3892
+ declare class Ed25519Account implements Account$1 {
3893
+ /**
3894
+ * Private key associated with the account
3895
+ */
3896
+ readonly privateKey: Ed25519PrivateKey;
3897
+ readonly publicKey: Ed25519PublicKey;
3898
+ readonly accountAddress: AccountAddress;
3899
+ readonly signingScheme = SigningScheme.Ed25519;
3900
+ constructor(args: Ed25519SignerConstructorArgs);
3901
+ /**
3902
+ * Derives a signer from a randomly generated private key
3903
+ */
3904
+ static generate(): Ed25519Account;
3905
+ /**
3906
+ * Derives an account with bip44 path and mnemonics
3907
+ *
3908
+ * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
3909
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3910
+ * @param args.mnemonic the mnemonic seed phrase of the account
3911
+ */
3912
+ static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
3913
+ verifySignature(args: VerifyEd25519SignatureArgs): boolean;
3914
+ signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
3915
+ sign(message: HexInput): Ed25519Signature;
3916
+ }
3917
+
3918
+ /**
3919
+ * Creates an object address from creator address and seed
3920
+ *
3921
+ * @param creatorAddress The object creator account address
3922
+ * @param seed The seed in either Uint8Array | string type
3923
+ *
3924
+ * @returns The object account address
3925
+ */
3926
+ declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
3927
+ /**
3928
+ * Creates an resource address from creator address and seed
3929
+ *
3930
+ * @param creatorAddress The creator account address
3931
+ * @param seed The seed in either Uint8Array | string type
3932
+ *
3933
+ * @returns The resource account address
3934
+ */
3935
+ declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
3936
+ /**
3937
+ * Creates a token object address from creator address, collection name and token name
3938
+ *
3939
+ * @param creatorAddress The token creator account address
3940
+ * @param collectionName The collection name
3941
+ * @param tokenName The token name
3942
+ *
3943
+ * @returns The token account address
3944
+ */
3945
+ declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
3946
+
3947
+ /**
3948
+ * Type of API endpoint for request routing
3949
+ */
3950
+ declare enum AptosApiType {
3951
+ FULLNODE = "Fullnode",
3952
+ INDEXER = "Indexer",
3953
+ FAUCET = "Faucet"
3954
+ }
3955
+ /**
3956
+ * The default max gas amount when none is given.
3957
+ *
3958
+ * This is the maximum number of gas units that will be used by a transaction before being rejected.
3959
+ *
3960
+ * Note that max gas amount varies based on the transaction. A larger transaction will go over this
3961
+ * default gas amount, and the value will need to be changed for the specific transaction.
3962
+ */
3963
+ declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
3964
+ /**
3965
+ * The default transaction expiration seconds from now.
3966
+ *
3967
+ * This time is how long until the blockchain nodes will reject the transaction.
3968
+ *
3969
+ * Note that the transaction expiration time varies based on network connection and network load. It may need to be
3970
+ * increased for the transaction to be processed.
3971
+ */
3972
+ declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
3973
+ /**
3974
+ * The default number of seconds to wait for a transaction to be processed.
3975
+ *
3976
+ * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
3977
+ * the results of the transaction. It may take longer based on network connection and network load.
3978
+ */
3979
+ declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
3980
+ /**
3981
+ * The default gas currency for the network.
3982
+ */
3983
+ declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
3984
+ declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
3985
+ declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
3986
+ /**
3987
+ * The list of supported Processor types for our indexer api.
3988
+ *
3989
+ * These can be found from the processor_status table in the indexer database.
3990
+ * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
3991
+ */
3992
+ declare enum ProcessorType {
3993
+ ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
3958
3994
  DEFAULT = "default_processor",
3959
3995
  EVENTS_PROCESSOR = "events_processor",
3960
3996
  FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
@@ -3987,14 +4023,6 @@ declare class AptosConfig {
3987
4023
  * The optional hardcoded faucet URL to send requests to instead of using the network
3988
4024
  */
3989
4025
  readonly faucet?: string;
3990
- /**
3991
- * The optional hardcoded pepper service URL to send requests to instead of using the network
3992
- */
3993
- readonly pepper?: string;
3994
- /**
3995
- * The optional hardcoded prover service URL to send requests to instead of using the network
3996
- */
3997
- readonly prover?: string;
3998
4026
  /**
3999
4027
  * The optional hardcoded indexer URL to send requests to instead of using the network
4000
4028
  */
@@ -4027,1588 +4055,1156 @@ declare class AptosConfig {
4027
4055
  * @internal
4028
4056
  */
4029
4057
  getRequestUrl(apiType: AptosApiType): string;
4030
- /**
4031
- * Checks if the URL is a known pepper service endpoint
4032
- *
4033
- * @internal
4034
- * */
4035
- isPepperServiceRequest(url: string): boolean;
4036
- /**
4037
- * Checks if the URL is a known prover service endpoint
4038
- *
4039
- * @internal
4040
- * */
4041
- isProverServiceRequest(url: string): boolean;
4042
4058
  }
4043
4059
 
4044
4060
  /**
4045
- * Representation of a ChainId that can serialized and deserialized
4061
+ * A class to query all `Account` related queries on Aptos.
4046
4062
  */
4047
- declare class ChainId extends Serializable {
4048
- readonly chainId: number;
4049
- constructor(chainId: number);
4050
- serialize(serializer: Serializer): void;
4051
- static deserialize(deserializer: Deserializer): ChainId;
4052
- }
4053
-
4054
- /**
4055
- * Representation of an Identifier that can serialized and deserialized.
4056
- * We use Identifier to represent the module "name" in "ModuleId" and
4057
- * the "function name" in "EntryFunction"
4058
- */
4059
- declare class Identifier extends Serializable {
4060
- identifier: string;
4061
- constructor(identifier: string);
4062
- serialize(serializer: Serializer): void;
4063
- static deserialize(deserializer: Deserializer): Identifier;
4064
- }
4065
-
4066
- /**
4067
- * Representation of a ModuleId that can serialized and deserialized
4068
- * ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
4069
- */
4070
- declare class ModuleId extends Serializable {
4071
- readonly address: AccountAddress;
4072
- readonly name: Identifier;
4073
- /**
4074
- * Full name of a module.
4075
- * @param address The account address. e.g "0x1"
4076
- * @param name The module name under the "address". e.g "coin"
4077
- */
4078
- constructor(address: AccountAddress, name: Identifier);
4079
- /**
4080
- * Converts a string literal to a ModuleId
4081
- * @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
4082
- * @returns ModuleId
4083
- */
4084
- static fromStr(moduleId: MoveModuleId): ModuleId;
4085
- serialize(serializer: Serializer): void;
4086
- static deserialize(deserializer: Deserializer): ModuleId;
4087
- }
4088
-
4089
- declare abstract class TypeTag extends Serializable {
4090
- abstract serialize(serializer: Serializer): void;
4091
- static deserialize(deserializer: Deserializer): TypeTag;
4092
- abstract toString(): string;
4093
- isBool(): this is TypeTagBool;
4094
- isAddress(): this is TypeTagAddress;
4095
- isGeneric(): this is TypeTagGeneric;
4096
- isSigner(): this is TypeTagSigner;
4097
- isVector(): this is TypeTagVector;
4098
- isStruct(): this is TypeTagStruct;
4099
- isU8(): this is TypeTagU8;
4100
- isU16(): this is TypeTagU16;
4101
- isU32(): this is TypeTagU32;
4102
- isU64(): this is TypeTagU64;
4103
- isU128(): this is TypeTagU128;
4104
- isU256(): this is TypeTagU256;
4105
- }
4106
- declare class TypeTagBool extends TypeTag {
4107
- toString(): string;
4108
- serialize(serializer: Serializer): void;
4109
- static load(_deserializer: Deserializer): TypeTagBool;
4110
- }
4111
- declare class TypeTagU8 extends TypeTag {
4112
- toString(): string;
4113
- serialize(serializer: Serializer): void;
4114
- static load(_deserializer: Deserializer): TypeTagU8;
4115
- }
4116
- declare class TypeTagU16 extends TypeTag {
4117
- toString(): string;
4118
- serialize(serializer: Serializer): void;
4119
- static load(_deserializer: Deserializer): TypeTagU16;
4120
- }
4121
- declare class TypeTagU32 extends TypeTag {
4122
- toString(): string;
4123
- serialize(serializer: Serializer): void;
4124
- static load(_deserializer: Deserializer): TypeTagU32;
4125
- }
4126
- declare class TypeTagU64 extends TypeTag {
4127
- toString(): string;
4128
- serialize(serializer: Serializer): void;
4129
- static load(_deserializer: Deserializer): TypeTagU64;
4130
- }
4131
- declare class TypeTagU128 extends TypeTag {
4132
- toString(): string;
4133
- serialize(serializer: Serializer): void;
4134
- static load(_deserializer: Deserializer): TypeTagU128;
4135
- }
4136
- declare class TypeTagU256 extends TypeTag {
4137
- toString(): string;
4138
- serialize(serializer: Serializer): void;
4139
- static load(_deserializer: Deserializer): TypeTagU256;
4140
- }
4141
- declare class TypeTagAddress extends TypeTag {
4142
- toString(): string;
4143
- serialize(serializer: Serializer): void;
4144
- static load(_deserializer: Deserializer): TypeTagAddress;
4145
- }
4146
- declare class TypeTagSigner extends TypeTag {
4147
- toString(): string;
4148
- serialize(serializer: Serializer): void;
4149
- static load(_deserializer: Deserializer): TypeTagSigner;
4150
- }
4151
- declare class TypeTagReference extends TypeTag {
4152
- readonly value: TypeTag;
4153
- toString(): `&${string}`;
4154
- constructor(value: TypeTag);
4155
- serialize(serializer: Serializer): void;
4156
- static load(deserializer: Deserializer): TypeTagReference;
4157
- }
4158
- /**
4159
- * Generics are used for type parameters in entry functions. However,
4160
- * they are not actually serialized into a real type, so they cannot be
4161
- * used as a type directly.
4162
- */
4163
- declare class TypeTagGeneric extends TypeTag {
4164
- readonly value: number;
4165
- toString(): `T${number}`;
4166
- constructor(value: number);
4167
- serialize(serializer: Serializer): void;
4168
- static load(deserializer: Deserializer): TypeTagGeneric;
4169
- }
4170
- declare class TypeTagVector extends TypeTag {
4171
- readonly value: TypeTag;
4172
- toString(): `vector<${string}>`;
4173
- constructor(value: TypeTag);
4174
- static u8(): TypeTagVector;
4175
- serialize(serializer: Serializer): void;
4176
- static load(deserializer: Deserializer): TypeTagVector;
4177
- }
4178
- declare class TypeTagStruct extends TypeTag {
4179
- readonly value: StructTag;
4180
- toString(): `0x${string}::${string}::${string}`;
4181
- constructor(value: StructTag);
4182
- serialize(serializer: Serializer): void;
4183
- static load(deserializer: Deserializer): TypeTagStruct;
4184
- isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
4185
- isString(): boolean;
4186
- isOption(): boolean;
4187
- isObject(): boolean;
4188
- }
4189
- declare class StructTag extends Serializable {
4190
- readonly address: AccountAddress;
4191
- readonly moduleName: Identifier;
4192
- readonly name: Identifier;
4193
- readonly typeArgs: Array<TypeTag>;
4194
- constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
4195
- serialize(serializer: Serializer): void;
4196
- static deserialize(deserializer: Deserializer): StructTag;
4197
- }
4198
- declare function aptosCoinStructTag(): StructTag;
4199
- declare function stringStructTag(): StructTag;
4200
- declare function optionStructTag(typeArg: TypeTag): StructTag;
4201
- declare function objectStructTag(typeArg: TypeTag): StructTag;
4202
-
4203
- /**
4204
- * Deserialize a Script Transaction Argument
4205
- */
4206
- declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
4207
- /**
4208
- * Representation of the supported Transaction Payload
4209
- * that can serialized and deserialized
4210
- */
4211
- declare abstract class TransactionPayload extends Serializable {
4212
- /**
4213
- * Serialize a Transaction Payload
4214
- */
4215
- abstract serialize(serializer: Serializer): void;
4216
- /**
4217
- * Deserialize a Transaction Payload
4218
- */
4219
- static deserialize(deserializer: Deserializer): TransactionPayload;
4220
- }
4221
- /**
4222
- * Representation of a Transaction Payload Script that can serialized and deserialized
4223
- */
4224
- declare class TransactionPayloadScript extends TransactionPayload {
4225
- readonly script: Script;
4226
- constructor(script: Script);
4227
- serialize(serializer: Serializer): void;
4228
- static load(deserializer: Deserializer): TransactionPayloadScript;
4229
- }
4230
- /**
4231
- * Representation of a Transaction Payload Entry Function that can serialized and deserialized
4232
- */
4233
- declare class TransactionPayloadEntryFunction extends TransactionPayload {
4234
- readonly entryFunction: EntryFunction;
4235
- constructor(entryFunction: EntryFunction);
4236
- serialize(serializer: Serializer): void;
4237
- static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
4238
- }
4239
- /**
4240
- * Representation of a Transaction Payload Multi-sig that can serialized and deserialized
4241
- */
4242
- declare class TransactionPayloadMultiSig extends TransactionPayload {
4243
- readonly multiSig: MultiSig;
4244
- constructor(multiSig: MultiSig);
4245
- serialize(serializer: Serializer): void;
4246
- static load(deserializer: Deserializer): TransactionPayloadMultiSig;
4247
- }
4248
- /**
4249
- * Representation of a EntryFunction that can serialized and deserialized
4250
- */
4251
- declare class EntryFunction {
4252
- readonly module_name: ModuleId;
4253
- readonly function_name: Identifier;
4254
- readonly type_args: Array<TypeTag>;
4255
- readonly args: Array<EntryFunctionArgument>;
4063
+ declare class Account {
4064
+ readonly config: AptosConfig;
4065
+ constructor(config: AptosConfig);
4256
4066
  /**
4257
- * Contains the payload to run a function within a module.
4258
- * @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
4259
- * @param function_name The function name. e.g "transfer"
4260
- * @param type_args Type arguments that move function requires.
4067
+ * Queries the current state for an Aptos account given its account address
4261
4068
  *
4262
- * @example
4263
- * A coin transfer function has one type argument "CoinType".
4264
- * ```
4265
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4266
- * ```
4267
- * @param args arguments to the move function.
4069
+ * @param args.accountAddress Aptos account address
4268
4070
  *
4269
- * @example
4270
- * A coin transfer function has three arguments "from", "to" and "amount".
4071
+ * @returns The account data
4072
+ *
4073
+ * @example An example of the returned account
4271
4074
  * ```
4272
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4075
+ * {
4076
+ * sequence_number: "1",
4077
+ * authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
4078
+ * }
4273
4079
  * ```
4274
4080
  */
4275
- constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
4081
+ getAccountInfo(args: {
4082
+ accountAddress: AccountAddressInput;
4083
+ }): Promise<AccountData>;
4276
4084
  /**
4277
- * A helper function to build a EntryFunction payload from raw primitive values
4085
+ * Queries for all modules in an account given an account address
4278
4086
  *
4279
- * @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
4280
- * @param function_name Function name
4281
- * @param type_args Type arguments that move function requires.
4087
+ * Note: In order to get all account modules, this function may call the API
4088
+ * multiple times as it auto paginates.
4282
4089
  *
4283
- * @example
4284
- * A coin transfer function has one type argument "CoinType".
4285
- * ```
4286
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4287
- * ```
4288
- * @param args Arguments to the move function.
4090
+ * @param args.accountAddress Aptos account address
4091
+ * @param args.options.offset The number module to start returning results from
4092
+ * @param args.options.limit The number of results to return
4093
+ * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4289
4094
  *
4290
- * @example
4291
- * A coin transfer function has three arguments "from", "to" and "amount".
4292
- * ```
4293
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4294
- * ```
4295
- * @returns EntryFunction
4095
+ * @returns Account modules
4296
4096
  */
4297
- static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4298
- serialize(serializer: Serializer): void;
4097
+ getAccountModules(args: {
4098
+ accountAddress: AccountAddressInput;
4099
+ options?: PaginationArgs & LedgerVersionArg;
4100
+ }): Promise<MoveModuleBytecode[]>;
4299
4101
  /**
4300
- * Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
4301
- * @see EntryFunctionBytes
4302
- *
4303
- * NOTE: When you deserialize an EntryFunction payload with this method, the entry function
4304
- * arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
4305
- * in the form of the EntryFunctionBytes class.
4306
- *
4307
- * In order to correctly deserialize these arguments as their actual type representations, you
4308
- * must know the types of the arguments beforehand and deserialize them yourself individually.
4102
+ * Queries for a specific account module given account address and module name
4309
4103
  *
4310
- * One way you could achieve this is by using the ABIs for an entry function and deserializing each
4311
- * argument as its given, corresponding type.
4104
+ * @param args.accountAddress Aptos account address
4105
+ * @param args.moduleName The name of the module
4106
+ * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4312
4107
  *
4313
- * @param deserializer
4314
- * @returns A deserialized EntryFunction payload for a transaction.
4108
+ * @returns Account module
4315
4109
  *
4110
+ * @example
4111
+ * const module = await aptos.getAccountModule({accountAddress:"0x456"})
4112
+ * // An example of an account module response
4113
+ * ```
4114
+ * {
4115
+ * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
4116
+ * abi: { address: "0x1" }
4117
+ * }
4118
+ * ```
4316
4119
  */
4317
- static deserialize(deserializer: Deserializer): EntryFunction;
4318
- }
4319
- /**
4320
- * Representation of a Script that can serialized and deserialized
4321
- */
4322
- declare class Script {
4323
- /**
4324
- * The move module bytecode
4325
- */
4326
- readonly bytecode: Uint8Array;
4120
+ getAccountModule(args: {
4121
+ accountAddress: AccountAddressInput;
4122
+ moduleName: string;
4123
+ options?: LedgerVersionArg;
4124
+ }): Promise<MoveModuleBytecode>;
4327
4125
  /**
4328
- * The type arguments that the bytecode function requires.
4126
+ * Queries account transactions given an account address
4127
+ *
4128
+ * Note: In order to get all account transactions, this function may call the API
4129
+ * multiple times as it auto paginates.
4130
+ *
4131
+ * @example
4132
+ * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
4133
+ *
4134
+ * @param args.accountAddress Aptos account address
4135
+ * @param args.options.offset The number transaction to start returning results from
4136
+ * @param args.options.limit The number of results to return
4137
+ *
4138
+ * @returns The account transactions
4329
4139
  */
4330
- readonly type_args: Array<TypeTag>;
4140
+ getAccountTransactions(args: {
4141
+ accountAddress: AccountAddressInput;
4142
+ options?: PaginationArgs;
4143
+ }): Promise<TransactionResponse[]>;
4331
4144
  /**
4332
- * The arguments that the bytecode function requires.
4145
+ * Queries all account resources given an account address
4146
+ *
4147
+ * Note: In order to get all account resources, this function may call the API
4148
+ * multiple times as it auto paginates.
4149
+ *
4150
+ * @example
4151
+ * const resources = await aptos.getAccountResources({accountAddress:"0x456"})
4152
+ *
4153
+ * @param args.accountAddress Aptos account address
4154
+ * @param args.options.offset The number resource to start returning results from
4155
+ * @param args.options.limit The number of results to return
4156
+ * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4157
+ * @returns Account resources
4333
4158
  */
4334
- readonly args: Array<ScriptFunctionArgument>;
4159
+ getAccountResources(args: {
4160
+ accountAddress: AccountAddressInput;
4161
+ options?: PaginationArgs & LedgerVersionArg;
4162
+ }): Promise<MoveResource[]>;
4335
4163
  /**
4336
- * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
4164
+ * Queries a specific account resource given account address and resource type. Note that the default is `any` in order
4165
+ * to allow for ease of accessing properties of the object.
4337
4166
  *
4338
- * @param bytecode The move module bytecode
4339
- * @param type_args The type arguments that the bytecode function requires.
4167
+ * @type The typed output of the resource
4168
+ * @param args.accountAddress Aptos account address
4169
+ * @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
4170
+ * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4340
4171
  *
4341
- * @example
4342
- * A coin transfer function has one type argument "CoinType".
4343
- * ```
4344
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4345
- * ```
4346
- * @param args The arguments that the bytecode function requires.
4172
+ * @returns Account resource
4347
4173
  *
4348
4174
  * @example
4349
- * A coin transfer function has three arguments "from", "to" and "amount".
4350
- * ```
4351
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4352
- * ```
4175
+ * const resource = await aptos.getAccountResource({accountAddress:"0x456"})
4176
+ *
4353
4177
  */
4354
- constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
4355
- serialize(serializer: Serializer): void;
4356
- static deserialize(deserializer: Deserializer): Script;
4357
- }
4358
- /**
4359
- * Representation of a MultiSig that can serialized and deserialized
4360
- */
4361
- declare class MultiSig {
4362
- readonly multisig_address: AccountAddress;
4363
- readonly transaction_payload?: MultiSigTransactionPayload;
4178
+ getAccountResource<T extends {} = any>(args: {
4179
+ accountAddress: AccountAddressInput;
4180
+ resourceType: MoveStructId;
4181
+ options?: LedgerVersionArg;
4182
+ }): Promise<T>;
4364
4183
  /**
4365
- * Contains the payload to run a multi-sig account transaction.
4184
+ * Looks up the account address for a given authentication key
4366
4185
  *
4367
- * @param multisig_address The multi-sig account address the transaction will be executed as.
4186
+ * This handles both if the account's authentication key has been rotated or not.
4368
4187
  *
4369
- * @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
4370
- * transaction whose payload is already stored on chain.
4188
+ * @example
4189
+ * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
4190
+ *
4191
+ * @param args.authenticationKey The authentication key
4192
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4193
+ * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4194
+ * @returns Promise<AccountAddress> The accountAddress associated with the authentication key
4371
4195
  */
4372
- constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
4373
- serialize(serializer: Serializer): void;
4374
- static deserialize(deserializer: Deserializer): MultiSig;
4375
- }
4376
- /**
4377
- * Representation of a MultiSig Transaction Payload from `multisig_account.move`
4378
- * that can be serialized and deserialized
4379
-
4380
- * This class exists right now to represent an extensible transaction payload class for
4381
- * transactions used in `multisig_account.move`. Eventually, this class will be able to
4382
- * support script payloads when the `multisig_account.move` module supports them.
4383
- */
4384
- declare class MultiSigTransactionPayload extends Serializable {
4385
- readonly transaction_payload: EntryFunction;
4196
+ lookupOriginalAccountAddress(args: {
4197
+ authenticationKey: AccountAddressInput;
4198
+ minimumLedgerVersion?: AnyNumber;
4199
+ options?: LedgerVersionArg;
4200
+ }): Promise<AccountAddress>;
4386
4201
  /**
4387
- * Contains the payload to run a multi-sig account transaction.
4202
+ * Queries the current count of tokens owned by an account
4388
4203
  *
4389
- * @param transaction_payload The payload of the multi-sig transaction.
4390
- * This can only be EntryFunction for now but,
4391
- * Script might be supported in the future.
4204
+ * @example
4205
+ * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
4206
+ *
4207
+ * @param args.accountAddress The account address
4208
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4209
+ * @returns Current count of tokens owned by the account
4392
4210
  */
4393
- constructor(transaction_payload: EntryFunction);
4394
- serialize(serializer: Serializer): void;
4395
- static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
4396
- }
4397
-
4398
- /**
4399
- * Representation of a Raw Transaction that can serialized and deserialized
4400
- */
4401
- declare class RawTransaction extends Serializable {
4402
- readonly sender: AccountAddress;
4403
- readonly sequence_number: bigint;
4404
- readonly payload: TransactionPayload;
4405
- readonly max_gas_amount: bigint;
4406
- readonly gas_unit_price: bigint;
4407
- readonly expiration_timestamp_secs: bigint;
4408
- readonly chain_id: ChainId;
4211
+ getAccountTokensCount(args: {
4212
+ accountAddress: AccountAddressInput;
4213
+ minimumLedgerVersion?: AnyNumber;
4214
+ }): Promise<number>;
4409
4215
  /**
4410
- * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
4411
- * RawTransactions must be signed before Aptos chain can execute them.
4216
+ * Queries the account's current owned tokens.
4412
4217
  *
4413
- * @param sender The sender Account Address
4414
- * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
4415
- * the sender's account at the time the transaction executes.
4416
- * @param payload Instructions for the Aptos Blockchain, including publishing a module,
4417
- * execute an entry function or execute a script payload.
4418
- * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
4419
- * than this gas or the transaction will be discarded during validation.
4420
- * @param gas_unit_price Price to be paid per gas unit.
4421
- * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
4422
- * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
4218
+ * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4219
+ * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4220
+ *
4221
+ * @example
4222
+ * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
4223
+ *
4224
+ * @param args.accountAddress The account address we want to get the tokens for
4225
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4226
+ * @param args.options.tokenStandard The NFT standard to query for
4227
+ * @param args.options.offset The number token to start returning results from
4228
+ * @param args.options.limit The number of results to return
4229
+ * @param args.options.orderBy The order to sort the tokens by
4230
+ * @returns Tokens array with the token data
4423
4231
  */
4424
- constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
4425
- serialize(serializer: Serializer): void;
4426
- static deserialize(deserializer: Deserializer): RawTransaction;
4427
- }
4428
- /**
4429
- * Representation of a Raw Transaction With Data that can serialized and deserialized
4430
- */
4431
- declare abstract class RawTransactionWithData extends Serializable {
4232
+ getAccountOwnedTokens(args: {
4233
+ accountAddress: AccountAddressInput;
4234
+ minimumLedgerVersion?: AnyNumber;
4235
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
4236
+ }): Promise<GetAccountOwnedTokensQueryResponse>;
4432
4237
  /**
4433
- * Serialize a Raw Transaction With Data
4238
+ * Queries all current tokens of a specific collection that an account owns by the collection address
4239
+ *
4240
+ * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4241
+ * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4242
+ *
4243
+ * @example
4244
+ * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
4245
+ *
4246
+ * @param args.accountAddress The account address we want to get the tokens for
4247
+ * @param args.collectionAddress The address of the collection being queried
4248
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4249
+ * @param args.options.tokenStandard The NFT standard to query for
4250
+ * @param args.options.offset The number token to start returning results from
4251
+ * @param args.options.limit The number of results to return
4252
+ * @param args.options.orderBy The order to sort the tokens by
4253
+ * @returns Tokens array with the token data
4434
4254
  */
4435
- abstract serialize(serializer: Serializer): void;
4255
+ getAccountOwnedTokensFromCollectionAddress(args: {
4256
+ accountAddress: AccountAddressInput;
4257
+ collectionAddress: AccountAddressInput;
4258
+ minimumLedgerVersion?: AnyNumber;
4259
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
4260
+ }): Promise<GetAccountOwnedTokensFromCollectionResponse>;
4436
4261
  /**
4437
- * Deserialize a Raw Transaction With Data
4438
- */
4439
- static deserialize(deserializer: Deserializer): RawTransactionWithData;
4440
- }
4441
- /**
4442
- * Representation of a Multi Agent Transaction that can serialized and deserialized
4443
- */
4444
- declare class MultiAgentRawTransaction extends RawTransactionWithData {
4445
- /**
4446
- * The raw transaction
4447
- */
4448
- readonly raw_txn: RawTransaction;
4449
- /**
4450
- * The secondary signers on this transaction
4451
- */
4452
- readonly secondary_signer_addresses: Array<AccountAddress>;
4453
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
4454
- serialize(serializer: Serializer): void;
4455
- static load(deserializer: Deserializer): MultiAgentRawTransaction;
4456
- }
4457
- /**
4458
- * Representation of a Fee Payer Transaction that can serialized and deserialized
4459
- */
4460
- declare class FeePayerRawTransaction extends RawTransactionWithData {
4461
- /**
4462
- * The raw transaction
4463
- */
4464
- readonly raw_txn: RawTransaction;
4465
- /**
4466
- * The secondary signers on this transaction - optional and can be empty
4467
- */
4468
- readonly secondary_signer_addresses: Array<AccountAddress>;
4469
- /**
4470
- * The fee payer account address
4471
- */
4472
- readonly fee_payer_address: AccountAddress;
4473
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
4474
- serialize(serializer: Serializer): void;
4475
- static load(deserializer: Deserializer): FeePayerRawTransaction;
4476
- }
4477
-
4478
- /**
4479
- * Representation of the challenge which is needed to sign by owner of the account
4480
- * to rotate the authentication key.
4481
- */
4482
- declare class RotationProofChallenge extends Serializable {
4483
- readonly accountAddress: AccountAddress;
4484
- readonly moduleName: MoveString;
4485
- readonly structName: MoveString;
4486
- readonly originator: AccountAddress;
4487
- readonly currentAuthKey: AccountAddress;
4488
- readonly newPublicKey: MoveVector<U8>;
4489
- readonly sequenceNumber: U64;
4490
- constructor(args: {
4491
- sequenceNumber: AnyNumber;
4492
- originator: AccountAddress;
4493
- currentAuthKey: AccountAddress;
4494
- newPublicKey: PublicKey;
4495
- });
4496
- serialize(serializer: Serializer): void;
4497
- }
4498
-
4499
- declare abstract class TransactionAuthenticator extends Serializable {
4500
- abstract serialize(serializer: Serializer): void;
4501
- static deserialize(deserializer: Deserializer): TransactionAuthenticator;
4502
- }
4503
- /**
4504
- * Transaction authenticator Ed25519 for a single signer transaction
4505
- *
4506
- * @param public_key Client's public key.
4507
- * @param signature Ed25519 signature of a raw transaction.
4508
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4509
- * for details about generating a signature.
4510
- */
4511
- declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
4512
- readonly public_key: Ed25519PublicKey;
4513
- readonly signature: Ed25519Signature;
4514
- constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
4515
- serialize(serializer: Serializer): void;
4516
- static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
4517
- }
4518
- /**
4519
- * Transaction authenticator Ed25519 for a multi signers transaction
4520
- *
4521
- * @param public_key Client's public key.
4522
- * @param signature Multi Ed25519 signature of a raw transaction.
4523
- *
4524
- */
4525
- declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
4526
- readonly public_key: MultiEd25519PublicKey;
4527
- readonly signature: MultiEd25519Signature;
4528
- constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
4529
- serialize(serializer: Serializer): void;
4530
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
4531
- }
4532
- /**
4533
- * Transaction authenticator for a multi-agent transaction
4534
- *
4535
- * @param sender Sender account authenticator
4536
- * @param secondary_signer_addresses Secondary signers address
4537
- * @param secondary_signers Secondary signers account authenticators
4538
- *
4539
- */
4540
- declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
4541
- readonly sender: AccountAuthenticator;
4542
- readonly secondary_signer_addresses: Array<AccountAddress>;
4543
- readonly secondary_signers: Array<AccountAuthenticator>;
4544
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
4545
- serialize(serializer: Serializer): void;
4546
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4547
- }
4548
- /**
4549
- * Transaction authenticator for a fee payer transaction
4550
- *
4551
- * @param sender Sender account authenticator
4552
- * @param secondary_signer_addresses Secondary signers address
4553
- * @param secondary_signers Secondary signers account authenticators
4554
- * @param fee_payer Object of the fee payer account address and the fee payer authentication
4555
- *
4556
- */
4557
- declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
4558
- readonly sender: AccountAuthenticator;
4559
- readonly secondary_signer_addresses: Array<AccountAddress>;
4560
- readonly secondary_signers: Array<AccountAuthenticator>;
4561
- readonly fee_payer: {
4562
- address: AccountAddress;
4563
- authenticator: AccountAuthenticator;
4564
- };
4565
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
4566
- address: AccountAddress;
4567
- authenticator: AccountAuthenticator;
4568
- });
4569
- serialize(serializer: Serializer): void;
4570
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4571
- }
4572
- /**
4573
- * Single Sender authenticator for a single signer transaction
4574
- *
4575
- * @param sender AccountAuthenticator
4576
- */
4577
- declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
4578
- readonly sender: AccountAuthenticator;
4579
- constructor(sender: AccountAuthenticator);
4580
- serialize(serializer: Serializer): void;
4581
- static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
4582
- }
4583
-
4584
- declare class SignedTransaction extends Serializable {
4585
- readonly raw_txn: RawTransaction;
4586
- readonly authenticator: TransactionAuthenticator;
4587
- /**
4588
- * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
4589
- * contains a client's public key and the signature of the raw transaction.
4590
- *
4591
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4592
- *
4593
- * @param raw_txn
4594
- * @param authenticator Contains a client's public key and the signature of the raw transaction.
4595
- * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
4596
- * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
4597
- */
4598
- constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
4599
- serialize(serializer: Serializer): void;
4600
- static deserialize(deserializer: Deserializer): SignedTransaction;
4601
- }
4602
-
4603
- /**
4604
- * Representation of a SimpleTransaction that can serialized and deserialized
4605
- */
4606
- declare class SimpleTransaction extends Serializable {
4607
- rawTransaction: RawTransaction;
4608
- feePayerAddress?: AccountAddress | undefined;
4609
- readonly secondarySignerAddresses: undefined;
4610
- /**
4611
- * SimpleTransaction represents a simple transaction type of a single signer that
4612
- * can be submitted to Aptos chain for execution.
4613
- *
4614
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4615
- * sponsor Account Address to pay the gas fees.
4616
- *
4617
- * @param rawTransaction The Raw Tranasaction
4618
- * @param feePayerAddress The sponsor Account Address
4619
- */
4620
- constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
4621
- serialize(serializer: Serializer): void;
4622
- static deserialize(deserializer: Deserializer): SimpleTransaction;
4623
- }
4624
-
4625
- /**
4626
- * Representation of a Raw Transaction that can serialized and deserialized
4627
- */
4628
- declare class MultiAgentTransaction extends Serializable {
4629
- rawTransaction: RawTransaction;
4630
- feePayerAddress?: AccountAddress | undefined;
4631
- secondarySignerAddresses: AccountAddress[];
4632
- /**
4633
- * SimpleTransaction represents a simple transaction type of a single signer that
4634
- * can be submitted to Aptos chain for execution.
4262
+ * Queries for all collections that an account currently has tokens for.
4635
4263
  *
4636
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4637
- * sponsor Account Address to pay the gas fees.
4264
+ * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4265
+ * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4638
4266
  *
4639
- * @param rawTransaction The Raw Tranasaction
4640
- * @param feePayerAddress The sponsor Account Address
4641
- */
4642
- constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
4643
- serialize(serializer: Serializer): void;
4644
- static deserialize(deserializer: Deserializer): MultiAgentTransaction;
4645
- }
4646
-
4647
- /**
4648
- * Entry function arguments to be used when building a raw transaction using remote ABI
4649
- */
4650
- type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
4651
- /**
4652
- * Entry function arguments to be used when building a raw transaction using BCS serialized arguments
4653
- */
4654
- type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
4655
- /**
4656
- * Script function arguments to be used when building a raw transaction using BCS serialized arguments
4657
- */
4658
- type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
4659
- /**
4660
- * Type that holds all raw transaction instances Aptos SDK supports
4661
- */
4662
- type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
4663
- /**
4664
- * Optional options to set when generating a transaction
4665
- */
4666
- type InputGenerateTransactionOptions = {
4667
- maxGasAmount?: number;
4668
- gasUnitPrice?: number;
4669
- expireTimestamp?: number;
4670
- accountSequenceNumber?: AnyNumber;
4671
- };
4672
- /**
4673
- * The generated transaction payload type that was produces from `generateTransactionPayload()` function.
4674
- */
4675
- type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
4676
- /**
4677
- * Unified type for the data needed to generate a transaction payload of types:
4678
- * Entry Function | Script | Multi Sig
4679
- */
4680
- type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
4681
- type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
4682
- /**
4683
- * The data needed to generate an Entry Function payload
4684
- */
4685
- type InputEntryFunctionData = {
4686
- function: MoveFunctionId;
4687
- typeArguments?: Array<TypeTag | string>;
4688
- functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
4689
- abi?: EntryFunctionABI;
4690
- };
4691
- type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
4692
- type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
4693
- abi: EntryFunctionABI;
4694
- };
4695
- type InputMultiSigDataWithABI = {
4696
- multisigAddress: AccountAddressInput;
4697
- } & InputEntryFunctionDataWithABI;
4698
- type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
4699
- aptosConfig: AptosConfig;
4700
- };
4701
- /**
4702
- * The data needed to generate a Multi Sig payload
4703
- */
4704
- type InputMultiSigData = {
4705
- multisigAddress: AccountAddressInput;
4706
- } & InputEntryFunctionData;
4707
- /**
4708
- * The data needed to generate a Multi Sig payload
4709
- */
4710
- type InputMultiSigDataWithRemoteABI = {
4711
- multisigAddress: AccountAddressInput;
4712
- } & InputEntryFunctionDataWithRemoteABI;
4713
- /**
4714
- * The data needed to generate a Script payload
4715
- */
4716
- type InputScriptData = {
4717
- bytecode: HexInput;
4718
- typeArguments?: Array<TypeTag>;
4719
- functionArguments: Array<ScriptFunctionArgumentTypes>;
4720
- };
4721
- /**
4722
- * The data needed to generate a View Function payload
4723
- */
4724
- type InputViewFunctionData = {
4725
- function: MoveFunctionId;
4726
- typeArguments?: Array<TypeTag | string>;
4727
- functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
4728
- abi?: ViewFunctionABI;
4729
- };
4730
- /**
4731
- * Data needed to generate a view function payload and fetch the remote ABI
4732
- */
4733
- type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
4734
- aptosConfig: AptosConfig;
4735
- };
4736
- /**
4737
- * Data needed to generate a view function, with an already fetched ABI
4738
- */
4739
- type InputViewFunctionDataWithABI = InputViewFunctionData & {
4740
- abi: ViewFunctionABI;
4741
- };
4742
- /**
4743
- * Data need for a generic function ABI, both view and entry
4744
- */
4745
- type FunctionABI = {
4746
- typeParameters: Array<MoveFunctionGenericTypeParam>;
4747
- parameters: Array<TypeTag>;
4748
- };
4749
- /**
4750
- * Interface of an Entry function's ABI.
4751
- *
4752
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
4753
- */
4754
- type EntryFunctionABI = FunctionABI & {
4755
- signers?: number;
4756
- };
4757
- /**
4758
- * Interface of an View function's ABI.
4759
- *
4760
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
4761
- */
4762
- type ViewFunctionABI = FunctionABI & {
4763
- returnTypes: Array<TypeTag>;
4764
- };
4765
- /**
4766
- * Interface of the arguments to generate a single signer transaction.
4767
- * Used to provide to `generateTransaction()` method in the transaction builder flow
4768
- */
4769
- interface InputGenerateSingleSignerRawTransactionArgs {
4770
- aptosConfig: AptosConfig;
4771
- sender: AccountAddressInput;
4772
- payload: AnyTransactionPayloadInstance;
4773
- options?: InputGenerateTransactionOptions;
4774
- feePayerAddress?: AccountAddressInput;
4775
- }
4776
- /**
4777
- * Interface of the arguments to generate a multi-agent transaction.
4778
- * Used to provide to `generateTransaction()` method in the transaction builder flow
4779
- */
4780
- interface InputGenerateMultiAgentRawTransactionArgs {
4781
- aptosConfig: AptosConfig;
4782
- sender: AccountAddressInput;
4783
- payload: AnyTransactionPayloadInstance;
4784
- secondarySignerAddresses: AccountAddressInput[];
4785
- options?: InputGenerateTransactionOptions;
4786
- feePayerAddress?: AccountAddressInput;
4787
- }
4788
- /**
4789
- * Unified type that holds all the interfaces to generate different transaction types
4790
- */
4791
- type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
4792
- /**
4793
- * Unified type that holds all the return interfaces when generating different transaction types
4794
- */
4795
- type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
4796
- type InputSimulateTransactionData = {
4797
- /**
4798
- * The transaction to simulate, probably generated by `generateTransaction()`
4799
- */
4800
- transaction: AnyRawTransaction;
4801
- /**
4802
- * For a single signer transaction
4803
- */
4804
- signerPublicKey: PublicKey;
4805
- /**
4806
- * For a fee payer or multi-agent transaction that requires additional signers in
4807
- */
4808
- secondarySignersPublicKeys?: Array<PublicKey>;
4809
- /**
4810
- * For a fee payer transaction (aka Sponsored Transaction)
4811
- */
4812
- feePayerPublicKey?: PublicKey;
4813
- options?: InputSimulateTransactionOptions;
4814
- };
4815
- type InputSimulateTransactionOptions = {
4816
- estimateGasUnitPrice?: boolean;
4817
- estimateMaxGasAmount?: boolean;
4818
- estimatePrioritizedGasUnitPrice?: boolean;
4819
- };
4820
- /**
4821
- * Interface that holds the user data input when generating a single signer transaction
4822
- */
4823
- interface InputGenerateSingleSignerRawTransactionData {
4824
- sender: AccountAddressInput;
4825
- data: InputGenerateTransactionPayloadData;
4826
- options?: InputGenerateTransactionOptions;
4827
- withFeePayer?: boolean;
4828
- secondarySignerAddresses?: undefined;
4829
- }
4830
- /**
4831
- * Interface that holds the user data input when generating a multi-agent transaction
4832
- */
4833
- interface InputGenerateMultiAgentRawTransactionData {
4834
- sender: AccountAddressInput;
4835
- data: InputGenerateTransactionPayloadData;
4836
- secondarySignerAddresses: AccountAddressInput[];
4837
- options?: InputGenerateTransactionOptions;
4838
- withFeePayer?: boolean;
4839
- }
4840
- /**
4841
- * Unified type that holds all the user data input interfaces when generating different transaction types
4842
- */
4843
- type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
4844
- /**
4845
- * Interface that holds the user data input when submitting a transaction
4846
- */
4847
- interface InputSubmitTransactionData {
4848
- transaction: AnyRawTransaction;
4849
- senderAuthenticator: AccountAuthenticator;
4850
- feePayerAuthenticator?: AccountAuthenticator;
4851
- additionalSignersAuthenticators?: Array<AccountAuthenticator>;
4852
- }
4853
-
4854
- interface SingleKeySignerConstructorArgs {
4855
- privateKey: PrivateKey;
4856
- address?: AccountAddressInput;
4857
- }
4858
- interface SingleKeySignerGenerateArgs {
4859
- scheme?: SigningSchemeInput;
4860
- }
4861
- type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
4862
- path: string;
4863
- mnemonic: string;
4864
- };
4865
- interface VerifySingleKeySignatureArgs {
4866
- message: HexInput;
4867
- signature: AnySignature;
4868
- }
4869
- /**
4870
- * Signer implementation for the SingleKey authentication scheme.
4871
- * This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
4872
- * Currently, the only supported signature schemes are Ed25519 and Secp256k1.
4873
- *
4874
- * Note: Generating a signer instance does not create the account on-chain.
4875
- */
4876
- declare class SingleKeyAccount implements Account$1 {
4877
- /**
4878
- * Private key associated with the account
4879
- */
4880
- readonly privateKey: PrivateKey;
4881
- readonly publicKey: AnyPublicKey;
4882
- readonly accountAddress: AccountAddress;
4883
- readonly signingScheme = SigningScheme.SingleKey;
4884
- constructor(args: SingleKeySignerConstructorArgs);
4885
- /**
4886
- * Derives an account from a randomly generated private key.
4887
- * Default generation is using an Ed25519 key
4888
- * @returns Account with the given signature scheme
4889
- */
4890
- static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
4891
- /**
4892
- * Derives an account with bip44 path and mnemonics,
4893
- * Default to using an Ed25519 signature scheme.
4894
- *
4895
- * @param args.scheme The signature scheme to derive the private key with
4896
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
4897
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
4898
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
4899
- * @param args.mnemonic the mnemonic seed phrase of the account
4900
- */
4901
- static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
4902
- verifySignature(args: VerifySingleKeySignatureArgs): boolean;
4903
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
4904
- sign(message: HexInput): AnySignature;
4905
- signTransaction(transaction: AnyRawTransaction): AnySignature;
4906
- }
4907
-
4908
- /**
4909
- * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
4910
- * This is the default input type when passing an `Ed25519PrivateKey`.
4911
- * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
4912
- */
4913
- interface CreateEd25519AccountFromPrivateKeyArgs {
4914
- privateKey: Ed25519PrivateKey;
4915
- address?: AccountAddressInput;
4916
- legacy?: true;
4917
- }
4918
- /**
4919
- * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
4920
- * The `legacy` argument needs to be explicitly set to false in order to
4921
- * use the `SingleKey` authentication scheme.
4922
- */
4923
- interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
4924
- privateKey: Ed25519PrivateKey;
4925
- address?: AccountAddressInput;
4926
- legacy: false;
4927
- }
4928
- /**
4929
- * Arguments for creating an `SingleKeyAccount` from any supported private key
4930
- * that is not an `Ed25519PrivateKey`.
4931
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
4932
- */
4933
- interface CreateSingleKeyAccountFromPrivateKeyArgs {
4934
- privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
4935
- address?: AccountAddressInput;
4936
- legacy?: false;
4937
- }
4938
- /**
4939
- * Arguments for creating an opaque `Account` from any supported private key.
4940
- * This is used when the private key type is not known at compilation time.
4941
- */
4942
- interface CreateAccountFromPrivateKeyArgs {
4943
- privateKey: PrivateKey;
4944
- address?: AccountAddressInput;
4945
- legacy?: boolean;
4946
- }
4947
- /**
4948
- * Arguments for generating an `Ed25519Account`.
4949
- * This is the input type used by default.
4950
- */
4951
- interface GenerateEd25519AccountArgs {
4952
- scheme?: SigningSchemeInput.Ed25519;
4953
- legacy?: true;
4954
- }
4955
- /**
4956
- * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
4957
- * The `legacy` argument needs to be explicitly set to false,
4958
- * otherwise an `Ed25519Account` will be returned instead.
4959
- */
4960
- interface GenerateEd25519SingleKeyAccountArgs {
4961
- scheme?: SigningSchemeInput.Ed25519;
4962
- legacy: false;
4963
- }
4964
- /**
4965
- * Arguments for generating an `SingleKeyAccount` with any supported private key
4966
- * that is not an `Ed25519PrivateKey`.
4967
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
4968
- */
4969
- interface GenerateSingleKeyAccountArgs {
4970
- scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
4971
- legacy?: false;
4972
- }
4973
- /**
4974
- * Arguments for generating an opaque `Account`.
4975
- * This is used when the input signature scheme is not known at compilation time.
4976
- */
4977
- interface GenerateAccountArgs {
4978
- scheme?: SigningSchemeInput;
4979
- legacy?: boolean;
4980
- }
4981
- /**
4982
- * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
4983
- */
4984
- interface PrivateKeyFromDerivationPathArgs {
4985
- path: string;
4986
- mnemonic: string;
4987
- }
4988
- /**
4989
- * Interface for a generic Aptos account.
4990
- *
4991
- * The interface is defined as abstract class to provide a single entrypoint for account generation,
4992
- * either through `Account.generate()` or `Account.fromDerivationPath`.
4993
- * Despite this being an abstract class, it should be treated as an interface and enforced using
4994
- * the `implements` keyword.
4995
- *
4996
- * Note: Generating an account instance does not create the account on-chain.
4997
- */
4998
- declare abstract class Account$1 {
4999
- /**
5000
- * Public key associated with the account
5001
- */
5002
- abstract readonly publicKey: AccountPublicKey;
5003
- /**
5004
- * Account address associated with the account
4267
+ * @example
4268
+ * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
4269
+ *
4270
+ * @param args.accountAddress The account address we want to get the collections for
4271
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4272
+ * @param args.options.tokenStandard The NFT standard to query for
4273
+ * @param args.options.offset The number collection to start returning results from
4274
+ * @param args.options.limit The number of results to return
4275
+ * @param args.options.orderBy The order to sort the tokens by
4276
+ * @returns Collections array with the collections data
5005
4277
  */
5006
- abstract readonly accountAddress: AccountAddress;
4278
+ getAccountCollectionsWithOwnedTokens(args: {
4279
+ accountAddress: AccountAddressInput;
4280
+ minimumLedgerVersion?: AnyNumber;
4281
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
4282
+ }): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
5007
4283
  /**
5008
- * Signing scheme used to sign transactions
4284
+ * Queries the current count of transactions submitted by an account
4285
+ *
4286
+ * @example
4287
+ * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
4288
+ *
4289
+ * @param args.accountAddress The account address we want to get the total count for
4290
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4291
+ * @returns Current count of transactions made by an account
5009
4292
  */
5010
- abstract signingScheme: SigningScheme;
4293
+ getAccountTransactionsCount(args: {
4294
+ accountAddress: AccountAddressInput;
4295
+ minimumLedgerVersion?: AnyNumber;
4296
+ }): Promise<number>;
5011
4297
  /**
5012
- * Derives an account from a randomly generated private key.
5013
- * @param args.scheme The signature scheme to use, to generate the private key
5014
- * @param args.legacy Whether to use a legacy authentication scheme, when applicable
5015
- * @returns An account compatible with the provided signature scheme
4298
+ * Queries an account's coins data
4299
+ *
4300
+ * @example
4301
+ * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
4302
+ *
4303
+ * @param args.accountAddress The account address we want to get the coins data for
4304
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4305
+ * @param args.options.offset optional. The number coin to start returning results from
4306
+ * @param args.options.limit optional. The number of results to return
4307
+ * @param args.options.orderBy optional. The order to sort the coins by
4308
+ * @param args.options.where optional. Filter the results by
4309
+ * @returns Array with the coins data
5016
4310
  */
5017
- static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
5018
- static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
5019
- static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
5020
- static generate(args: GenerateAccountArgs): Account$1;
4311
+ getAccountCoinsData(args: {
4312
+ accountAddress: AccountAddressInput;
4313
+ minimumLedgerVersion?: AnyNumber;
4314
+ options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
4315
+ }): Promise<GetAccountCoinsDataResponse>;
5021
4316
  /**
5022
- * Creates an account from the provided private key.
4317
+ * Queries the current count of an account's coins aggregated
5023
4318
  *
5024
- * @param args.privateKey a valid private key
5025
- * @param args.address the account's address. If not provided, it will be derived from the public key.
5026
- * @param args.legacy Whether to use a legacy authentication scheme, when applicable
4319
+ * @example
4320
+ * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
4321
+ *
4322
+ * @param args.accountAddress The account address we want to get the total count for
4323
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4324
+ * @returns Current count of the aggregated count of all account's coins
5027
4325
  */
5028
- static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
5029
- static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
5030
- static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
5031
- static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
4326
+ getAccountCoinsCount(args: {
4327
+ accountAddress: AccountAddressInput;
4328
+ minimumLedgerVersion?: AnyNumber;
4329
+ }): Promise<number>;
5032
4330
  /**
5033
- * @deprecated use `fromPrivateKey` instead.
5034
- * Instantiates an account given a private key and a specified account address.
5035
- * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
4331
+ * Queries the account's APT amount
5036
4332
  *
5037
- * @param args.privateKey PrivateKey - the underlying private key for the account
5038
- * @param args.address AccountAddress - The account address the `Account` will sign for
5039
- * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
5040
- * to generating a Legacy Ed25519 keypair
4333
+ * @example
4334
+ * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
5041
4335
  *
5042
- * @returns Account
4336
+ * @param args.accountAddress The account address we want to get the total count for
4337
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4338
+ * @returns Current amount of account's APT
5043
4339
  */
5044
- static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
4340
+ getAccountAPTAmount(args: {
4341
+ accountAddress: AccountAddressInput;
4342
+ minimumLedgerVersion?: AnyNumber;
4343
+ }): Promise<number>;
5045
4344
  /**
5046
- * Derives an account with bip44 path and mnemonics
4345
+ * Queries the account's coin amount by the coin type
5047
4346
  *
5048
- * @param args.scheme The signature scheme to derive the private key with
5049
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
5050
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
5051
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
5052
- * @param args.mnemonic the mnemonic seed phrase of the account
4347
+ * @example
4348
+ * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
4349
+ *
4350
+ * @param args.accountAddress The account address we want to get the total count for
4351
+ * @param args.coinType The coin type to query
4352
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4353
+ * @returns Current amount of account's coin
5053
4354
  */
5054
- static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
5055
- static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
5056
- static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
5057
- static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
4355
+ getAccountCoinAmount(args: {
4356
+ accountAddress: AccountAddressInput;
4357
+ coinType: MoveStructId;
4358
+ minimumLedgerVersion?: AnyNumber;
4359
+ }): Promise<number>;
5058
4360
  /**
5059
- * @deprecated use `publicKey.authKey()` instead.
5060
- * This key enables account owners to rotate their private key(s)
5061
- * associated with the account without changing the address that hosts their account.
5062
- * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
4361
+ * Queries an account's owned objects
5063
4362
  *
5064
- * @param args.publicKey PublicKey - public key of the account
5065
- * @returns The authentication key for the associated account
4363
+ * @example
4364
+ * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
4365
+ *
4366
+ * @param args.accountAddress The account address we want to get the objects for
4367
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4368
+ * @param args.options.offset The starting position to start returning results from
4369
+ * @param args.options.limit The number of results to return
4370
+ * @param args.options.orderBy The order to sort the objects by
4371
+ * @returns Objects array with the object data
5066
4372
  */
5067
- static authKey(args: {
5068
- publicKey: AccountPublicKey;
5069
- }): AuthenticationKey;
4373
+ getAccountOwnedObjects(args: {
4374
+ accountAddress: AccountAddressInput;
4375
+ minimumLedgerVersion?: AnyNumber;
4376
+ options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
4377
+ }): Promise<GetAccountOwnedObjectsResponse>;
5070
4378
  /**
5071
- * Sign a transaction using the available signing capabilities.
5072
- * @param transaction the raw transaction
5073
- * @return the AccountAuthenticator containing the signature og the transaction, together with the account's public key
4379
+ * Derives an account by providing a private key.
4380
+ * This functions resolves the provided private key type and derives the public key from it.
4381
+ *
4382
+ * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
4383
+ * auth key using the SingleKey scheme locally.
4384
+ *
4385
+ * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
4386
+ * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
4387
+ * on that.
4388
+ *
4389
+ * @example
4390
+ * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
4391
+ *
4392
+ * @param args.privateKey An account private key
4393
+ * @returns Account type
5074
4394
  */
5075
- abstract signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
4395
+ deriveAccountFromPrivateKey(args: {
4396
+ privateKey: PrivateKey;
4397
+ }): Promise<Account$1>;
4398
+ }
4399
+
4400
+ /**
4401
+ * Representation of a ChainId that can serialized and deserialized
4402
+ */
4403
+ declare class ChainId extends Serializable {
4404
+ readonly chainId: number;
4405
+ constructor(chainId: number);
4406
+ serialize(serializer: Serializer): void;
4407
+ static deserialize(deserializer: Deserializer): ChainId;
4408
+ }
4409
+
4410
+ /**
4411
+ * Representation of an Identifier that can serialized and deserialized.
4412
+ * We use Identifier to represent the module "name" in "ModuleId" and
4413
+ * the "function name" in "EntryFunction"
4414
+ */
4415
+ declare class Identifier extends Serializable {
4416
+ identifier: string;
4417
+ constructor(identifier: string);
4418
+ serialize(serializer: Serializer): void;
4419
+ static deserialize(deserializer: Deserializer): Identifier;
4420
+ }
4421
+
4422
+ /**
4423
+ * Representation of a ModuleId that can serialized and deserialized
4424
+ * ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
4425
+ */
4426
+ declare class ModuleId extends Serializable {
4427
+ readonly address: AccountAddress;
4428
+ readonly name: Identifier;
5076
4429
  /**
5077
- * Sign the given message with the private key.
5078
- * @param message in HexInput format
5079
- * @returns AccountSignature
4430
+ * Full name of a module.
4431
+ * @param address The account address. e.g "0x1"
4432
+ * @param name The module name under the "address". e.g "coin"
5080
4433
  */
5081
- abstract sign(message: HexInput): Signature;
5082
- abstract signTransaction(transaction: AnyRawTransaction): Signature;
4434
+ constructor(address: AccountAddress, name: Identifier);
5083
4435
  /**
5084
- * @param args.message raw message data in HexInput format
5085
- * @param args.signature signed message signature
4436
+ * Converts a string literal to a ModuleId
4437
+ * @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
4438
+ * @returns ModuleId
5086
4439
  */
5087
- verifySignature(args: VerifySignatureArgs): boolean;
4440
+ static fromStr(moduleId: MoveModuleId): ModuleId;
4441
+ serialize(serializer: Serializer): void;
4442
+ static deserialize(deserializer: Deserializer): ModuleId;
5088
4443
  }
5089
4444
 
5090
- interface Ed25519SignerConstructorArgs {
5091
- privateKey: Ed25519PrivateKey;
5092
- address?: AccountAddressInput;
4445
+ declare abstract class TypeTag extends Serializable {
4446
+ abstract serialize(serializer: Serializer): void;
4447
+ static deserialize(deserializer: Deserializer): TypeTag;
4448
+ abstract toString(): string;
4449
+ isBool(): this is TypeTagBool;
4450
+ isAddress(): this is TypeTagAddress;
4451
+ isGeneric(): this is TypeTagGeneric;
4452
+ isSigner(): this is TypeTagSigner;
4453
+ isVector(): this is TypeTagVector;
4454
+ isStruct(): this is TypeTagStruct;
4455
+ isU8(): this is TypeTagU8;
4456
+ isU16(): this is TypeTagU16;
4457
+ isU32(): this is TypeTagU32;
4458
+ isU64(): this is TypeTagU64;
4459
+ isU128(): this is TypeTagU128;
4460
+ isU256(): this is TypeTagU256;
4461
+ }
4462
+ declare class TypeTagBool extends TypeTag {
4463
+ toString(): string;
4464
+ serialize(serializer: Serializer): void;
4465
+ static load(_deserializer: Deserializer): TypeTagBool;
4466
+ }
4467
+ declare class TypeTagU8 extends TypeTag {
4468
+ toString(): string;
4469
+ serialize(serializer: Serializer): void;
4470
+ static load(_deserializer: Deserializer): TypeTagU8;
4471
+ }
4472
+ declare class TypeTagU16 extends TypeTag {
4473
+ toString(): string;
4474
+ serialize(serializer: Serializer): void;
4475
+ static load(_deserializer: Deserializer): TypeTagU16;
4476
+ }
4477
+ declare class TypeTagU32 extends TypeTag {
4478
+ toString(): string;
4479
+ serialize(serializer: Serializer): void;
4480
+ static load(_deserializer: Deserializer): TypeTagU32;
4481
+ }
4482
+ declare class TypeTagU64 extends TypeTag {
4483
+ toString(): string;
4484
+ serialize(serializer: Serializer): void;
4485
+ static load(_deserializer: Deserializer): TypeTagU64;
4486
+ }
4487
+ declare class TypeTagU128 extends TypeTag {
4488
+ toString(): string;
4489
+ serialize(serializer: Serializer): void;
4490
+ static load(_deserializer: Deserializer): TypeTagU128;
4491
+ }
4492
+ declare class TypeTagU256 extends TypeTag {
4493
+ toString(): string;
4494
+ serialize(serializer: Serializer): void;
4495
+ static load(_deserializer: Deserializer): TypeTagU256;
5093
4496
  }
5094
- interface Ed25519SignerFromDerivationPathArgs {
5095
- path: string;
5096
- mnemonic: string;
4497
+ declare class TypeTagAddress extends TypeTag {
4498
+ toString(): string;
4499
+ serialize(serializer: Serializer): void;
4500
+ static load(_deserializer: Deserializer): TypeTagAddress;
5097
4501
  }
5098
- interface VerifyEd25519SignatureArgs {
5099
- message: HexInput;
5100
- signature: Ed25519Signature;
4502
+ declare class TypeTagSigner extends TypeTag {
4503
+ toString(): string;
4504
+ serialize(serializer: Serializer): void;
4505
+ static load(_deserializer: Deserializer): TypeTagSigner;
4506
+ }
4507
+ declare class TypeTagReference extends TypeTag {
4508
+ readonly value: TypeTag;
4509
+ toString(): `&${string}`;
4510
+ constructor(value: TypeTag);
4511
+ serialize(serializer: Serializer): void;
4512
+ static load(deserializer: Deserializer): TypeTagReference;
5101
4513
  }
5102
4514
  /**
5103
- * Signer implementation for the Ed25519 authentication scheme.
5104
- * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
5105
- *
5106
- * Note: Generating a signer instance does not create the account on-chain.
4515
+ * Generics are used for type parameters in entry functions. However,
4516
+ * they are not actually serialized into a real type, so they cannot be
4517
+ * used as a type directly.
5107
4518
  */
5108
- declare class Ed25519Account implements Account$1 {
5109
- /**
5110
- * Private key associated with the account
5111
- */
5112
- readonly privateKey: Ed25519PrivateKey;
5113
- readonly publicKey: Ed25519PublicKey;
5114
- readonly accountAddress: AccountAddress;
5115
- readonly signingScheme = SigningScheme.Ed25519;
5116
- constructor(args: Ed25519SignerConstructorArgs);
5117
- /**
5118
- * Derives a signer from a randomly generated private key
5119
- */
5120
- static generate(): Ed25519Account;
5121
- /**
5122
- * Derives an account with bip44 path and mnemonics
5123
- *
5124
- * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
5125
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
5126
- * @param args.mnemonic the mnemonic seed phrase of the account
5127
- */
5128
- static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
5129
- verifySignature(args: VerifyEd25519SignatureArgs): boolean;
5130
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519;
5131
- sign(message: HexInput): Ed25519Signature;
5132
- signTransaction(transaction: AnyRawTransaction): Ed25519Signature;
4519
+ declare class TypeTagGeneric extends TypeTag {
4520
+ readonly value: number;
4521
+ toString(): `T${number}`;
4522
+ constructor(value: number);
4523
+ serialize(serializer: Serializer): void;
4524
+ static load(deserializer: Deserializer): TypeTagGeneric;
5133
4525
  }
5134
-
5135
- declare class EphemeralKeyPair extends Serializable {
5136
- readonly blinder: Uint8Array;
5137
- readonly expiryDateSecs: bigint | number;
5138
- readonly nonce: string;
5139
- private privateKey;
5140
- private publicKey;
5141
- constructor(args: {
5142
- privateKey: PrivateKey;
5143
- expiryDateSecs?: bigint | number;
5144
- blinder?: HexInput;
5145
- });
5146
- getPublicKey(): EphemeralPublicKey;
4526
+ declare class TypeTagVector extends TypeTag {
4527
+ readonly value: TypeTag;
4528
+ toString(): `vector<${string}>`;
4529
+ constructor(value: TypeTag);
4530
+ static u8(): TypeTagVector;
5147
4531
  serialize(serializer: Serializer): void;
5148
- static deserialize(deserializer: Deserializer): EphemeralKeyPair;
5149
- static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
5150
- static generate(args?: {
5151
- scheme: SigningSchemeInput;
5152
- }): EphemeralKeyPair;
5153
- generateNonce(): string;
5154
- /**
5155
- * Sign the given message with the private key.
5156
- * *
5157
- * @param data in HexInput format
5158
- * @returns EphemeralSignature
5159
- */
5160
- sign(data: HexInput): EphemeralSignature;
4532
+ static load(deserializer: Deserializer): TypeTagVector;
5161
4533
  }
5162
-
5163
- declare class KeylessAccount implements Account$1 {
5164
- static readonly PEPPER_LENGTH: number;
5165
- static readonly SLIP_0010_SEED: string;
5166
- publicKey: KeylessPublicKey;
5167
- ephemeralKeyPair: EphemeralKeyPair;
5168
- uidKey: string;
5169
- uidVal: string;
5170
- aud: string;
5171
- pepper: Uint8Array;
5172
- accountAddress: AccountAddress;
5173
- proof: SignedGroth16Signature;
5174
- signingScheme: SigningScheme;
5175
- jwt: string;
5176
- constructor(args: {
5177
- address?: AccountAddress;
5178
- ephemeralKeyPair: EphemeralKeyPair;
5179
- iss: string;
5180
- uidKey: string;
5181
- uidVal: string;
5182
- aud: string;
5183
- pepper: HexInput;
5184
- proof: SignedGroth16Signature;
5185
- jwt: string;
5186
- });
4534
+ declare class TypeTagStruct extends TypeTag {
4535
+ readonly value: StructTag;
4536
+ toString(): `0x${string}::${string}::${string}`;
4537
+ constructor(value: StructTag);
5187
4538
  serialize(serializer: Serializer): void;
5188
- static deserialize(deserializer: Deserializer): KeylessAccount;
5189
- bcsToBytes(): Uint8Array;
5190
- bcsToHex(): Hex;
5191
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
5192
- waitForProofFetch(): Promise<void>;
5193
- sign(data: HexInput): Signature;
5194
- signTransaction(transaction: AnyRawTransaction): Signature;
5195
- signWithOpenIdSignature(data: HexInput): Signature;
5196
- verifySignature(args: {
5197
- message: HexInput;
5198
- signature: Signature;
5199
- }): boolean;
5200
- static fromBytes(bytes: Uint8Array): KeylessAccount;
5201
- static fromJWTAndProof(args: {
5202
- proof: SignedGroth16Signature;
5203
- jwt: string;
5204
- ephemeralKeyPair: EphemeralKeyPair;
5205
- pepper: HexInput;
5206
- uidKey?: string;
5207
- }): KeylessAccount;
5208
- static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array;
4539
+ static load(deserializer: Deserializer): TypeTagStruct;
4540
+ isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
4541
+ isString(): boolean;
4542
+ isOption(): boolean;
4543
+ isObject(): boolean;
5209
4544
  }
5210
-
5211
- declare class MultiKeyAccount implements Account$1 {
5212
- /**
5213
- * Public key associated with the account
5214
- */
5215
- readonly publicKey: MultiKey;
5216
- /**
5217
- * Account address associated with the account
5218
- */
5219
- readonly accountAddress: AccountAddress;
5220
- /**
5221
- * Signing scheme used to sign transactions
5222
- */
5223
- readonly signingScheme: SigningScheme;
5224
- signers: Account$1[];
5225
- signaturesBitmap: Uint8Array;
5226
- /**
5227
- * constructor for Account
5228
- *
5229
- * Need to update this to use the new crypto library if new schemes are added.
5230
- *
5231
- * @param args.privateKey PrivateKey - private key of the account
5232
- * @param args.address AccountAddress - address of the account
5233
- * @param args.legacy optional. If set to false, the keypair authentication keys will be derived with a unified scheme.
5234
- * Defaults to deriving an authentication key with the legacy scheme.
5235
- *
5236
- * This method is private because it should only be called by the factory static methods.
5237
- * @returns Account
5238
- */
5239
- constructor(args: {
5240
- multiKey: MultiKey;
5241
- signers: Account$1[];
5242
- });
5243
- static fromPublicKeysAndSigners(args: {
5244
- publicKeys: PublicKey[];
5245
- signaturesRequired: number;
5246
- signers: Account$1[];
5247
- }): MultiKeyAccount;
5248
- static isMultiKeySigner(account: Account$1): account is MultiKeyAccount;
5249
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
5250
- waitForProofFetch(): Promise<void>;
5251
- /**
5252
- * Sign the given message with the private key.
5253
- *
5254
- * TODO: Add sign transaction or specific types
5255
- *
5256
- * @param data in HexInput format
5257
- * @returns Signature
5258
- */
5259
- sign(data: HexInput): MultiSignature;
5260
- signTransaction(transaction: AnyRawTransaction): MultiSignature;
5261
- /**
5262
- * Verify the given message and signature with the public key.
5263
- *
5264
- * @param args.message raw message data in HexInput format
5265
- * @param args.signature signed message Signature
5266
- * @returns
5267
- */
5268
- verifySignature(args: {
5269
- message: HexInput;
5270
- signature: Signature;
5271
- }): boolean;
4545
+ declare class StructTag extends Serializable {
4546
+ readonly address: AccountAddress;
4547
+ readonly moduleName: Identifier;
4548
+ readonly name: Identifier;
4549
+ readonly typeArgs: Array<TypeTag>;
4550
+ constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
4551
+ serialize(serializer: Serializer): void;
4552
+ static deserialize(deserializer: Deserializer): StructTag;
5272
4553
  }
4554
+ declare function aptosCoinStructTag(): StructTag;
4555
+ declare function stringStructTag(): StructTag;
4556
+ declare function optionStructTag(typeArg: TypeTag): StructTag;
4557
+ declare function objectStructTag(typeArg: TypeTag): StructTag;
5273
4558
 
5274
4559
  /**
5275
- * A class to query all `Account` related queries on Aptos.
4560
+ * Deserialize a Script Transaction Argument
5276
4561
  */
5277
- declare class Account {
5278
- readonly config: AptosConfig;
5279
- constructor(config: AptosConfig);
4562
+ declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
4563
+ /**
4564
+ * Representation of the supported Transaction Payload
4565
+ * that can serialized and deserialized
4566
+ */
4567
+ declare abstract class TransactionPayload extends Serializable {
5280
4568
  /**
5281
- * Queries the current state for an Aptos account given its account address
5282
- *
5283
- * @param args.accountAddress Aptos account address
5284
- *
5285
- * @returns The account data
5286
- *
5287
- * @example An example of the returned account
5288
- * ```
5289
- * {
5290
- * sequence_number: "1",
5291
- * authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
5292
- * }
5293
- * ```
4569
+ * Serialize a Transaction Payload
5294
4570
  */
5295
- getAccountInfo(args: {
5296
- accountAddress: AccountAddressInput;
5297
- }): Promise<AccountData>;
4571
+ abstract serialize(serializer: Serializer): void;
5298
4572
  /**
5299
- * Queries for all modules in an account given an account address
5300
- *
5301
- * Note: In order to get all account modules, this function may call the API
5302
- * multiple times as it auto paginates.
5303
- *
5304
- * @param args.accountAddress Aptos account address
5305
- * @param args.options.offset The number module to start returning results from
5306
- * @param args.options.limit The number of results to return
5307
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5308
- *
5309
- * @returns Account modules
4573
+ * Deserialize a Transaction Payload
5310
4574
  */
5311
- getAccountModules(args: {
5312
- accountAddress: AccountAddressInput;
5313
- options?: PaginationArgs & LedgerVersionArg;
5314
- }): Promise<MoveModuleBytecode[]>;
4575
+ static deserialize(deserializer: Deserializer): TransactionPayload;
4576
+ }
4577
+ /**
4578
+ * Representation of a Transaction Payload Script that can serialized and deserialized
4579
+ */
4580
+ declare class TransactionPayloadScript extends TransactionPayload {
4581
+ readonly script: Script;
4582
+ constructor(script: Script);
4583
+ serialize(serializer: Serializer): void;
4584
+ static load(deserializer: Deserializer): TransactionPayloadScript;
4585
+ }
4586
+ /**
4587
+ * Representation of a Transaction Payload Entry Function that can serialized and deserialized
4588
+ */
4589
+ declare class TransactionPayloadEntryFunction extends TransactionPayload {
4590
+ readonly entryFunction: EntryFunction;
4591
+ constructor(entryFunction: EntryFunction);
4592
+ serialize(serializer: Serializer): void;
4593
+ static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
4594
+ }
4595
+ /**
4596
+ * Representation of a Transaction Payload Multi-sig that can serialized and deserialized
4597
+ */
4598
+ declare class TransactionPayloadMultiSig extends TransactionPayload {
4599
+ readonly multiSig: MultiSig;
4600
+ constructor(multiSig: MultiSig);
4601
+ serialize(serializer: Serializer): void;
4602
+ static load(deserializer: Deserializer): TransactionPayloadMultiSig;
4603
+ }
4604
+ /**
4605
+ * Representation of a EntryFunction that can serialized and deserialized
4606
+ */
4607
+ declare class EntryFunction {
4608
+ readonly module_name: ModuleId;
4609
+ readonly function_name: Identifier;
4610
+ readonly type_args: Array<TypeTag>;
4611
+ readonly args: Array<EntryFunctionArgument>;
5315
4612
  /**
5316
- * Queries for a specific account module given account address and module name
5317
- *
5318
- * @param args.accountAddress Aptos account address
5319
- * @param args.moduleName The name of the module
5320
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5321
- *
5322
- * @returns Account module
4613
+ * Contains the payload to run a function within a module.
4614
+ * @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
4615
+ * @param function_name The function name. e.g "transfer"
4616
+ * @param type_args Type arguments that move function requires.
5323
4617
  *
5324
4618
  * @example
5325
- * const module = await aptos.getAccountModule({accountAddress:"0x456"})
5326
- * // An example of an account module response
4619
+ * A coin transfer function has one type argument "CoinType".
5327
4620
  * ```
5328
- * {
5329
- * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
5330
- * abi: { address: "0x1" }
5331
- * }
4621
+ * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
5332
4622
  * ```
5333
- */
5334
- getAccountModule(args: {
5335
- accountAddress: AccountAddressInput;
5336
- moduleName: string;
5337
- options?: LedgerVersionArg;
5338
- }): Promise<MoveModuleBytecode>;
5339
- /**
5340
- * Queries account transactions given an account address
5341
- *
5342
- * Note: In order to get all account transactions, this function may call the API
5343
- * multiple times as it auto paginates.
4623
+ * @param args arguments to the move function.
5344
4624
  *
5345
4625
  * @example
5346
- * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
5347
- *
5348
- * @param args.accountAddress Aptos account address
5349
- * @param args.options.offset The number transaction to start returning results from
5350
- * @param args.options.limit The number of results to return
5351
- *
5352
- * @returns The account transactions
5353
- */
5354
- getAccountTransactions(args: {
5355
- accountAddress: AccountAddressInput;
5356
- options?: PaginationArgs;
5357
- }): Promise<TransactionResponse[]>;
4626
+ * A coin transfer function has three arguments "from", "to" and "amount".
4627
+ * ```
4628
+ * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4629
+ * ```
4630
+ */
4631
+ constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
5358
4632
  /**
5359
- * Queries all account resources given an account address
4633
+ * A helper function to build a EntryFunction payload from raw primitive values
5360
4634
  *
5361
- * Note: In order to get all account resources, this function may call the API
5362
- * multiple times as it auto paginates.
4635
+ * @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
4636
+ * @param function_name Function name
4637
+ * @param type_args Type arguments that move function requires.
5363
4638
  *
5364
4639
  * @example
5365
- * const resources = await aptos.getAccountResources({accountAddress:"0x456"})
4640
+ * A coin transfer function has one type argument "CoinType".
4641
+ * ```
4642
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4643
+ * ```
4644
+ * @param args Arguments to the move function.
5366
4645
  *
5367
- * @param args.accountAddress Aptos account address
5368
- * @param args.options.offset The number resource to start returning results from
5369
- * @param args.options.limit The number of results to return
5370
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5371
- * @returns Account resources
4646
+ * @example
4647
+ * A coin transfer function has three arguments "from", "to" and "amount".
4648
+ * ```
4649
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4650
+ * ```
4651
+ * @returns EntryFunction
5372
4652
  */
5373
- getAccountResources(args: {
5374
- accountAddress: AccountAddressInput;
5375
- options?: PaginationArgs & LedgerVersionArg;
5376
- }): Promise<MoveResource[]>;
4653
+ static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4654
+ serialize(serializer: Serializer): void;
5377
4655
  /**
5378
- * Queries a specific account resource given account address and resource type. Note that the default is `any` in order
5379
- * to allow for ease of accessing properties of the object.
4656
+ * Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
4657
+ * @see EntryFunctionBytes
5380
4658
  *
5381
- * @type The typed output of the resource
5382
- * @param args.accountAddress Aptos account address
5383
- * @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
5384
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4659
+ * NOTE: When you deserialize an EntryFunction payload with this method, the entry function
4660
+ * arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
4661
+ * in the form of the EntryFunctionBytes class.
5385
4662
  *
5386
- * @returns Account resource
4663
+ * In order to correctly deserialize these arguments as their actual type representations, you
4664
+ * must know the types of the arguments beforehand and deserialize them yourself individually.
5387
4665
  *
5388
- * @example
5389
- * const resource = await aptos.getAccountResource({accountAddress:"0x456"})
4666
+ * One way you could achieve this is by using the ABIs for an entry function and deserializing each
4667
+ * argument as its given, corresponding type.
4668
+ *
4669
+ * @param deserializer
4670
+ * @returns A deserialized EntryFunction payload for a transaction.
5390
4671
  *
5391
4672
  */
5392
- getAccountResource<T extends {} = any>(args: {
5393
- accountAddress: AccountAddressInput;
5394
- resourceType: MoveStructId;
5395
- options?: LedgerVersionArg;
5396
- }): Promise<T>;
4673
+ static deserialize(deserializer: Deserializer): EntryFunction;
4674
+ }
4675
+ /**
4676
+ * Representation of a Script that can serialized and deserialized
4677
+ */
4678
+ declare class Script {
5397
4679
  /**
5398
- * Looks up the account address for a given authentication key
4680
+ * The move module bytecode
4681
+ */
4682
+ readonly bytecode: Uint8Array;
4683
+ /**
4684
+ * The type arguments that the bytecode function requires.
4685
+ */
4686
+ readonly type_args: Array<TypeTag>;
4687
+ /**
4688
+ * The arguments that the bytecode function requires.
4689
+ */
4690
+ readonly args: Array<ScriptFunctionArgument>;
4691
+ /**
4692
+ * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
5399
4693
  *
5400
- * This handles both if the account's authentication key has been rotated or not.
4694
+ * @param bytecode The move module bytecode
4695
+ * @param type_args The type arguments that the bytecode function requires.
5401
4696
  *
5402
4697
  * @example
5403
- * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
4698
+ * A coin transfer function has one type argument "CoinType".
4699
+ * ```
4700
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4701
+ * ```
4702
+ * @param args The arguments that the bytecode function requires.
5404
4703
  *
5405
- * @param args.authenticationKey The authentication key
5406
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5407
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5408
- * @returns Promise<AccountAddress> The accountAddress associated with the authentication key
4704
+ * @example
4705
+ * A coin transfer function has three arguments "from", "to" and "amount".
4706
+ * ```
4707
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4708
+ * ```
5409
4709
  */
5410
- lookupOriginalAccountAddress(args: {
5411
- authenticationKey: AccountAddressInput;
5412
- minimumLedgerVersion?: AnyNumber;
5413
- options?: LedgerVersionArg;
5414
- }): Promise<AccountAddress>;
4710
+ constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
4711
+ serialize(serializer: Serializer): void;
4712
+ static deserialize(deserializer: Deserializer): Script;
4713
+ }
4714
+ /**
4715
+ * Representation of a MultiSig that can serialized and deserialized
4716
+ */
4717
+ declare class MultiSig {
4718
+ readonly multisig_address: AccountAddress;
4719
+ readonly transaction_payload?: MultiSigTransactionPayload;
5415
4720
  /**
5416
- * Queries the current count of tokens owned by an account
4721
+ * Contains the payload to run a multi-sig account transaction.
5417
4722
  *
5418
- * @example
5419
- * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
4723
+ * @param multisig_address The multi-sig account address the transaction will be executed as.
5420
4724
  *
5421
- * @param args.accountAddress The account address
5422
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5423
- * @returns Current count of tokens owned by the account
4725
+ * @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
4726
+ * transaction whose payload is already stored on chain.
5424
4727
  */
5425
- getAccountTokensCount(args: {
5426
- accountAddress: AccountAddressInput;
5427
- minimumLedgerVersion?: AnyNumber;
5428
- }): Promise<number>;
4728
+ constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
4729
+ serialize(serializer: Serializer): void;
4730
+ static deserialize(deserializer: Deserializer): MultiSig;
4731
+ }
4732
+ /**
4733
+ * Representation of a MultiSig Transaction Payload from `multisig_account.move`
4734
+ * that can be serialized and deserialized
4735
+
4736
+ * This class exists right now to represent an extensible transaction payload class for
4737
+ * transactions used in `multisig_account.move`. Eventually, this class will be able to
4738
+ * support script payloads when the `multisig_account.move` module supports them.
4739
+ */
4740
+ declare class MultiSigTransactionPayload extends Serializable {
4741
+ readonly transaction_payload: EntryFunction;
5429
4742
  /**
5430
- * Queries the account's current owned tokens.
5431
- *
5432
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5433
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5434
- *
5435
- * @example
5436
- * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
4743
+ * Contains the payload to run a multi-sig account transaction.
5437
4744
  *
5438
- * @param args.accountAddress The account address we want to get the tokens for
5439
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5440
- * @param args.options.tokenStandard The NFT standard to query for
5441
- * @param args.options.offset The number token to start returning results from
5442
- * @param args.options.limit The number of results to return
5443
- * @param args.options.orderBy The order to sort the tokens by
5444
- * @returns Tokens array with the token data
4745
+ * @param transaction_payload The payload of the multi-sig transaction.
4746
+ * This can only be EntryFunction for now but,
4747
+ * Script might be supported in the future.
5445
4748
  */
5446
- getAccountOwnedTokens(args: {
5447
- accountAddress: AccountAddressInput;
5448
- minimumLedgerVersion?: AnyNumber;
5449
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
5450
- }): Promise<GetAccountOwnedTokensQueryResponse>;
4749
+ constructor(transaction_payload: EntryFunction);
4750
+ serialize(serializer: Serializer): void;
4751
+ static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
4752
+ }
4753
+
4754
+ /**
4755
+ * Representation of a Raw Transaction that can serialized and deserialized
4756
+ */
4757
+ declare class RawTransaction extends Serializable {
4758
+ readonly sender: AccountAddress;
4759
+ readonly sequence_number: bigint;
4760
+ readonly payload: TransactionPayload;
4761
+ readonly max_gas_amount: bigint;
4762
+ readonly gas_unit_price: bigint;
4763
+ readonly expiration_timestamp_secs: bigint;
4764
+ readonly chain_id: ChainId;
5451
4765
  /**
5452
- * Queries all current tokens of a specific collection that an account owns by the collection address
5453
- *
5454
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5455
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5456
- *
5457
- * @example
5458
- * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({accountAddress:"0x123", collectionAddress:"0x456"})
4766
+ * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
4767
+ * RawTransactions must be signed before Aptos chain can execute them.
5459
4768
  *
5460
- * @param args.accountAddress The account address we want to get the tokens for
5461
- * @param args.collectionAddress The address of the collection being queried
5462
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5463
- * @param args.options.tokenStandard The NFT standard to query for
5464
- * @param args.options.offset The number token to start returning results from
5465
- * @param args.options.limit The number of results to return
5466
- * @param args.options.orderBy The order to sort the tokens by
5467
- * @returns Tokens array with the token data
4769
+ * @param sender The sender Account Address
4770
+ * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
4771
+ * the sender's account at the time the transaction executes.
4772
+ * @param payload Instructions for the Aptos Blockchain, including publishing a module,
4773
+ * execute an entry function or execute a script payload.
4774
+ * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
4775
+ * than this gas or the transaction will be discarded during validation.
4776
+ * @param gas_unit_price Price to be paid per gas unit.
4777
+ * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
4778
+ * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
5468
4779
  */
5469
- getAccountOwnedTokensFromCollectionAddress(args: {
5470
- accountAddress: AccountAddressInput;
5471
- collectionAddress: AccountAddressInput;
5472
- minimumLedgerVersion?: AnyNumber;
5473
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
5474
- }): Promise<GetAccountOwnedTokensFromCollectionResponse>;
4780
+ constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
4781
+ serialize(serializer: Serializer): void;
4782
+ static deserialize(deserializer: Deserializer): RawTransaction;
4783
+ }
4784
+ /**
4785
+ * Representation of a Raw Transaction With Data that can serialized and deserialized
4786
+ */
4787
+ declare abstract class RawTransactionWithData extends Serializable {
4788
+ /**
4789
+ * Serialize a Raw Transaction With Data
4790
+ */
4791
+ abstract serialize(serializer: Serializer): void;
4792
+ /**
4793
+ * Deserialize a Raw Transaction With Data
4794
+ */
4795
+ static deserialize(deserializer: Deserializer): RawTransactionWithData;
4796
+ }
4797
+ /**
4798
+ * Representation of a Multi Agent Transaction that can serialized and deserialized
4799
+ */
4800
+ declare class MultiAgentRawTransaction extends RawTransactionWithData {
4801
+ /**
4802
+ * The raw transaction
4803
+ */
4804
+ readonly raw_txn: RawTransaction;
4805
+ /**
4806
+ * The secondary signers on this transaction
4807
+ */
4808
+ readonly secondary_signer_addresses: Array<AccountAddress>;
4809
+ constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
4810
+ serialize(serializer: Serializer): void;
4811
+ static load(deserializer: Deserializer): MultiAgentRawTransaction;
4812
+ }
4813
+ /**
4814
+ * Representation of a Fee Payer Transaction that can serialized and deserialized
4815
+ */
4816
+ declare class FeePayerRawTransaction extends RawTransactionWithData {
4817
+ /**
4818
+ * The raw transaction
4819
+ */
4820
+ readonly raw_txn: RawTransaction;
4821
+ /**
4822
+ * The secondary signers on this transaction - optional and can be empty
4823
+ */
4824
+ readonly secondary_signer_addresses: Array<AccountAddress>;
5475
4825
  /**
5476
- * Queries for all collections that an account currently has tokens for.
5477
- *
5478
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5479
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5480
- *
5481
- * @example
5482
- * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
5483
- *
5484
- * @param args.accountAddress The account address we want to get the collections for
5485
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5486
- * @param args.options.tokenStandard The NFT standard to query for
5487
- * @param args.options.offset The number collection to start returning results from
5488
- * @param args.options.limit The number of results to return
5489
- * @param args.options.orderBy The order to sort the tokens by
5490
- * @returns Collections array with the collections data
4826
+ * The fee payer account address
5491
4827
  */
5492
- getAccountCollectionsWithOwnedTokens(args: {
5493
- accountAddress: AccountAddressInput;
5494
- minimumLedgerVersion?: AnyNumber;
5495
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
5496
- }): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
4828
+ readonly fee_payer_address: AccountAddress;
4829
+ constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
4830
+ serialize(serializer: Serializer): void;
4831
+ static load(deserializer: Deserializer): FeePayerRawTransaction;
4832
+ }
4833
+
4834
+ /**
4835
+ * Representation of a SimpleTransaction that can serialized and deserialized
4836
+ */
4837
+ declare class SimpleTransaction extends Serializable {
4838
+ rawTransaction: RawTransaction;
4839
+ feePayerAddress?: AccountAddress | undefined;
4840
+ readonly secondarySignerAddresses: undefined;
5497
4841
  /**
5498
- * Queries the current count of transactions submitted by an account
4842
+ * SimpleTransaction represents a simple transaction type of a single signer that
4843
+ * can be submitted to Aptos chain for execution.
5499
4844
  *
5500
- * @example
5501
- * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
4845
+ * SimpleTransaction metadata contains the Raw Transaction and an optional
4846
+ * sponsor Account Address to pay the gas fees.
5502
4847
  *
5503
- * @param args.accountAddress The account address we want to get the total count for
5504
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5505
- * @returns Current count of transactions made by an account
4848
+ * @param rawTransaction The Raw Tranasaction
4849
+ * @param feePayerAddress The sponsor Account Address
5506
4850
  */
5507
- getAccountTransactionsCount(args: {
5508
- accountAddress: AccountAddressInput;
5509
- minimumLedgerVersion?: AnyNumber;
5510
- }): Promise<number>;
4851
+ constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
4852
+ serialize(serializer: Serializer): void;
4853
+ static deserialize(deserializer: Deserializer): SimpleTransaction;
4854
+ }
4855
+
4856
+ /**
4857
+ * Representation of the challenge which is needed to sign by owner of the account
4858
+ * to rotate the authentication key.
4859
+ */
4860
+ declare class RotationProofChallenge extends Serializable {
4861
+ readonly accountAddress: AccountAddress;
4862
+ readonly moduleName: MoveString;
4863
+ readonly structName: MoveString;
4864
+ readonly originator: AccountAddress;
4865
+ readonly currentAuthKey: AccountAddress;
4866
+ readonly newPublicKey: MoveVector<U8>;
4867
+ readonly sequenceNumber: U64;
4868
+ constructor(args: {
4869
+ sequenceNumber: AnyNumber;
4870
+ originator: AccountAddress;
4871
+ currentAuthKey: AccountAddress;
4872
+ newPublicKey: PublicKey;
4873
+ });
4874
+ serialize(serializer: Serializer): void;
4875
+ }
4876
+
4877
+ declare abstract class TransactionAuthenticator extends Serializable {
4878
+ abstract serialize(serializer: Serializer): void;
4879
+ static deserialize(deserializer: Deserializer): TransactionAuthenticator;
4880
+ }
4881
+ /**
4882
+ * Transaction authenticator Ed25519 for a single signer transaction
4883
+ *
4884
+ * @param public_key Client's public key.
4885
+ * @param signature Ed25519 signature of a raw transaction.
4886
+ * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4887
+ * for details about generating a signature.
4888
+ */
4889
+ declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
4890
+ readonly public_key: Ed25519PublicKey;
4891
+ readonly signature: Ed25519Signature;
4892
+ constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
4893
+ serialize(serializer: Serializer): void;
4894
+ static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
4895
+ }
4896
+ /**
4897
+ * Transaction authenticator Ed25519 for a multi signers transaction
4898
+ *
4899
+ * @param public_key Client's public key.
4900
+ * @param signature Multi Ed25519 signature of a raw transaction.
4901
+ *
4902
+ */
4903
+ declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
4904
+ readonly public_key: MultiEd25519PublicKey;
4905
+ readonly signature: MultiEd25519Signature;
4906
+ constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
4907
+ serialize(serializer: Serializer): void;
4908
+ static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
4909
+ }
4910
+ /**
4911
+ * Transaction authenticator for a multi-agent transaction
4912
+ *
4913
+ * @param sender Sender account authenticator
4914
+ * @param secondary_signer_addresses Secondary signers address
4915
+ * @param secondary_signers Secondary signers account authenticators
4916
+ *
4917
+ */
4918
+ declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
4919
+ readonly sender: AccountAuthenticator;
4920
+ readonly secondary_signer_addresses: Array<AccountAddress>;
4921
+ readonly secondary_signers: Array<AccountAuthenticator>;
4922
+ constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
4923
+ serialize(serializer: Serializer): void;
4924
+ static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4925
+ }
4926
+ /**
4927
+ * Transaction authenticator for a fee payer transaction
4928
+ *
4929
+ * @param sender Sender account authenticator
4930
+ * @param secondary_signer_addresses Secondary signers address
4931
+ * @param secondary_signers Secondary signers account authenticators
4932
+ * @param fee_payer Object of the fee payer account address and the fee payer authentication
4933
+ *
4934
+ */
4935
+ declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
4936
+ readonly sender: AccountAuthenticator;
4937
+ readonly secondary_signer_addresses: Array<AccountAddress>;
4938
+ readonly secondary_signers: Array<AccountAuthenticator>;
4939
+ readonly fee_payer: {
4940
+ address: AccountAddress;
4941
+ authenticator: AccountAuthenticator;
4942
+ };
4943
+ constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
4944
+ address: AccountAddress;
4945
+ authenticator: AccountAuthenticator;
4946
+ });
4947
+ serialize(serializer: Serializer): void;
4948
+ static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4949
+ }
4950
+ /**
4951
+ * Single Sender authenticator for a single signer transaction
4952
+ *
4953
+ * @param sender AccountAuthenticator
4954
+ */
4955
+ declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
4956
+ readonly sender: AccountAuthenticator;
4957
+ constructor(sender: AccountAuthenticator);
4958
+ serialize(serializer: Serializer): void;
4959
+ static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
4960
+ }
4961
+
4962
+ declare class SignedTransaction extends Serializable {
4963
+ readonly raw_txn: RawTransaction;
4964
+ readonly authenticator: TransactionAuthenticator;
5511
4965
  /**
5512
- * Queries an account's coins data
4966
+ * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
4967
+ * contains a client's public key and the signature of the raw transaction.
5513
4968
  *
5514
- * @example
5515
- * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
4969
+ * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
5516
4970
  *
5517
- * @param args.accountAddress The account address we want to get the coins data for
5518
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5519
- * @param args.options.offset optional. The number coin to start returning results from
5520
- * @param args.options.limit optional. The number of results to return
5521
- * @param args.options.orderBy optional. The order to sort the coins by
5522
- * @param args.options.where optional. Filter the results by
5523
- * @returns Array with the coins data
4971
+ * @param raw_txn
4972
+ * @param authenticator Contains a client's public key and the signature of the raw transaction.
4973
+ * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
4974
+ * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
5524
4975
  */
5525
- getAccountCoinsData(args: {
5526
- accountAddress: AccountAddressInput;
5527
- minimumLedgerVersion?: AnyNumber;
5528
- options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
5529
- }): Promise<GetAccountCoinsDataResponse>;
4976
+ constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
4977
+ serialize(serializer: Serializer): void;
4978
+ static deserialize(deserializer: Deserializer): SignedTransaction;
4979
+ }
4980
+
4981
+ /**
4982
+ * Representation of a Raw Transaction that can serialized and deserialized
4983
+ */
4984
+ declare class MultiAgentTransaction extends Serializable {
4985
+ rawTransaction: RawTransaction;
4986
+ feePayerAddress?: AccountAddress | undefined;
4987
+ secondarySignerAddresses: AccountAddress[];
5530
4988
  /**
5531
- * Queries the current count of an account's coins aggregated
4989
+ * SimpleTransaction represents a simple transaction type of a single signer that
4990
+ * can be submitted to Aptos chain for execution.
5532
4991
  *
5533
- * @example
5534
- * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
4992
+ * SimpleTransaction metadata contains the Raw Transaction and an optional
4993
+ * sponsor Account Address to pay the gas fees.
5535
4994
  *
5536
- * @param args.accountAddress The account address we want to get the total count for
5537
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5538
- * @returns Current count of the aggregated count of all account's coins
4995
+ * @param rawTransaction The Raw Tranasaction
4996
+ * @param feePayerAddress The sponsor Account Address
5539
4997
  */
5540
- getAccountCoinsCount(args: {
5541
- accountAddress: AccountAddressInput;
5542
- minimumLedgerVersion?: AnyNumber;
5543
- }): Promise<number>;
4998
+ constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
4999
+ serialize(serializer: Serializer): void;
5000
+ static deserialize(deserializer: Deserializer): MultiAgentTransaction;
5001
+ }
5002
+
5003
+ /**
5004
+ * Entry function arguments to be used when building a raw transaction using remote ABI
5005
+ */
5006
+ type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
5007
+ /**
5008
+ * Entry function arguments to be used when building a raw transaction using BCS serialized arguments
5009
+ */
5010
+ type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
5011
+ /**
5012
+ * Script function arguments to be used when building a raw transaction using BCS serialized arguments
5013
+ */
5014
+ type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
5015
+ /**
5016
+ * Type that holds all raw transaction instances Aptos SDK supports
5017
+ */
5018
+ type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
5019
+ /**
5020
+ * Optional options to set when generating a transaction
5021
+ */
5022
+ type InputGenerateTransactionOptions = {
5023
+ maxGasAmount?: number;
5024
+ gasUnitPrice?: number;
5025
+ expireTimestamp?: number;
5026
+ accountSequenceNumber?: AnyNumber;
5027
+ };
5028
+ /**
5029
+ * The generated transaction payload type that was produces from `generateTransactionPayload()` function.
5030
+ */
5031
+ type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
5032
+ /**
5033
+ * Unified type for the data needed to generate a transaction payload of types:
5034
+ * Entry Function | Script | Multi Sig
5035
+ */
5036
+ type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
5037
+ type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
5038
+ /**
5039
+ * The data needed to generate an Entry Function payload
5040
+ */
5041
+ type InputEntryFunctionData = {
5042
+ function: MoveFunctionId;
5043
+ typeArguments?: Array<TypeTag | string>;
5044
+ functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
5045
+ abi?: EntryFunctionABI;
5046
+ };
5047
+ type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
5048
+ type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
5049
+ abi: EntryFunctionABI;
5050
+ };
5051
+ type InputMultiSigDataWithABI = {
5052
+ multisigAddress: AccountAddressInput;
5053
+ } & InputEntryFunctionDataWithABI;
5054
+ type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
5055
+ aptosConfig: AptosConfig;
5056
+ };
5057
+ /**
5058
+ * The data needed to generate a Multi Sig payload
5059
+ */
5060
+ type InputMultiSigData = {
5061
+ multisigAddress: AccountAddressInput;
5062
+ } & InputEntryFunctionData;
5063
+ /**
5064
+ * The data needed to generate a Multi Sig payload
5065
+ */
5066
+ type InputMultiSigDataWithRemoteABI = {
5067
+ multisigAddress: AccountAddressInput;
5068
+ } & InputEntryFunctionDataWithRemoteABI;
5069
+ /**
5070
+ * The data needed to generate a Script payload
5071
+ */
5072
+ type InputScriptData = {
5073
+ bytecode: HexInput;
5074
+ typeArguments?: Array<TypeTag>;
5075
+ functionArguments: Array<ScriptFunctionArgumentTypes>;
5076
+ };
5077
+ /**
5078
+ * The data needed to generate a View Function payload
5079
+ */
5080
+ type InputViewFunctionData = {
5081
+ function: MoveFunctionId;
5082
+ typeArguments?: Array<TypeTag | string>;
5083
+ functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
5084
+ abi?: ViewFunctionABI;
5085
+ };
5086
+ /**
5087
+ * Data needed to generate a view function payload and fetch the remote ABI
5088
+ */
5089
+ type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
5090
+ aptosConfig: AptosConfig;
5091
+ };
5092
+ /**
5093
+ * Data needed to generate a view function, with an already fetched ABI
5094
+ */
5095
+ type InputViewFunctionDataWithABI = InputViewFunctionData & {
5096
+ abi: ViewFunctionABI;
5097
+ };
5098
+ /**
5099
+ * Data need for a generic function ABI, both view and entry
5100
+ */
5101
+ type FunctionABI = {
5102
+ typeParameters: Array<MoveFunctionGenericTypeParam>;
5103
+ parameters: Array<TypeTag>;
5104
+ };
5105
+ /**
5106
+ * Interface of an Entry function's ABI.
5107
+ *
5108
+ * This is used to provide type checking and simple input conversion on ABI based transaction submission.
5109
+ */
5110
+ type EntryFunctionABI = FunctionABI & {
5111
+ signers?: number;
5112
+ };
5113
+ /**
5114
+ * Interface of an View function's ABI.
5115
+ *
5116
+ * This is used to provide type checking and simple input conversion on ABI based transaction submission.
5117
+ */
5118
+ type ViewFunctionABI = FunctionABI & {
5119
+ returnTypes: Array<TypeTag>;
5120
+ };
5121
+ /**
5122
+ * Interface of the arguments to generate a single signer transaction.
5123
+ * Used to provide to `generateTransaction()` method in the transaction builder flow
5124
+ */
5125
+ interface InputGenerateSingleSignerRawTransactionArgs {
5126
+ aptosConfig: AptosConfig;
5127
+ sender: AccountAddressInput;
5128
+ payload: AnyTransactionPayloadInstance;
5129
+ options?: InputGenerateTransactionOptions;
5130
+ feePayerAddress?: AccountAddressInput;
5131
+ }
5132
+ /**
5133
+ * Interface of the arguments to generate a multi-agent transaction.
5134
+ * Used to provide to `generateTransaction()` method in the transaction builder flow
5135
+ */
5136
+ interface InputGenerateMultiAgentRawTransactionArgs {
5137
+ aptosConfig: AptosConfig;
5138
+ sender: AccountAddressInput;
5139
+ payload: AnyTransactionPayloadInstance;
5140
+ secondarySignerAddresses: AccountAddressInput[];
5141
+ options?: InputGenerateTransactionOptions;
5142
+ feePayerAddress?: AccountAddressInput;
5143
+ }
5144
+ /**
5145
+ * Unified type that holds all the interfaces to generate different transaction types
5146
+ */
5147
+ type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
5148
+ /**
5149
+ * Unified type that holds all the return interfaces when generating different transaction types
5150
+ */
5151
+ type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
5152
+ type InputSimulateTransactionData = {
5544
5153
  /**
5545
- * Queries the account's APT amount
5546
- *
5547
- * @example
5548
- * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
5549
- *
5550
- * @param args.accountAddress The account address we want to get the total count for
5551
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5552
- * @returns Current amount of account's APT
5154
+ * The transaction to simulate, probably generated by `generateTransaction()`
5553
5155
  */
5554
- getAccountAPTAmount(args: {
5555
- accountAddress: AccountAddressInput;
5556
- minimumLedgerVersion?: AnyNumber;
5557
- }): Promise<number>;
5156
+ transaction: AnyRawTransaction;
5558
5157
  /**
5559
- * Queries the account's coin amount by the coin type
5560
- *
5561
- * @example
5562
- * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
5563
- *
5564
- * @param args.accountAddress The account address we want to get the total count for
5565
- * @param args.coinType The coin type to query
5566
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5567
- * @returns Current amount of account's coin
5158
+ * For a single signer transaction
5568
5159
  */
5569
- getAccountCoinAmount(args: {
5570
- accountAddress: AccountAddressInput;
5571
- coinType: MoveStructId;
5572
- minimumLedgerVersion?: AnyNumber;
5573
- }): Promise<number>;
5160
+ signerPublicKey: PublicKey;
5574
5161
  /**
5575
- * Queries an account's owned objects
5576
- *
5577
- * @example
5578
- * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
5579
- *
5580
- * @param args.accountAddress The account address we want to get the objects for
5581
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5582
- * @param args.options.offset The starting position to start returning results from
5583
- * @param args.options.limit The number of results to return
5584
- * @param args.options.orderBy The order to sort the objects by
5585
- * @returns Objects array with the object data
5162
+ * For a fee payer or multi-agent transaction that requires additional signers in
5586
5163
  */
5587
- getAccountOwnedObjects(args: {
5588
- accountAddress: AccountAddressInput;
5589
- minimumLedgerVersion?: AnyNumber;
5590
- options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
5591
- }): Promise<GetAccountOwnedObjectsResponse>;
5164
+ secondarySignersPublicKeys?: Array<PublicKey>;
5592
5165
  /**
5593
- * Derives an account by providing a private key.
5594
- * This functions resolves the provided private key type and derives the public key from it.
5595
- *
5596
- * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
5597
- * auth key using the SingleKey scheme locally.
5598
- *
5599
- * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
5600
- * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
5601
- * on that.
5602
- *
5603
- * @example
5604
- * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
5605
- *
5606
- * @param args.privateKey An account private key
5607
- * @returns Account type
5166
+ * For a fee payer transaction (aka Sponsored Transaction)
5608
5167
  */
5609
- deriveAccountFromPrivateKey(args: {
5610
- privateKey: PrivateKey;
5611
- }): Promise<Account$1>;
5168
+ feePayerPublicKey?: PublicKey;
5169
+ options?: InputSimulateTransactionOptions;
5170
+ };
5171
+ type InputSimulateTransactionOptions = {
5172
+ estimateGasUnitPrice?: boolean;
5173
+ estimateMaxGasAmount?: boolean;
5174
+ estimatePrioritizedGasUnitPrice?: boolean;
5175
+ };
5176
+ /**
5177
+ * Interface that holds the user data input when generating a single signer transaction
5178
+ */
5179
+ interface InputGenerateSingleSignerRawTransactionData {
5180
+ sender: AccountAddressInput;
5181
+ data: InputGenerateTransactionPayloadData;
5182
+ options?: InputGenerateTransactionOptions;
5183
+ withFeePayer?: boolean;
5184
+ secondarySignerAddresses?: undefined;
5185
+ }
5186
+ /**
5187
+ * Interface that holds the user data input when generating a multi-agent transaction
5188
+ */
5189
+ interface InputGenerateMultiAgentRawTransactionData {
5190
+ sender: AccountAddressInput;
5191
+ data: InputGenerateTransactionPayloadData;
5192
+ secondarySignerAddresses: AccountAddressInput[];
5193
+ options?: InputGenerateTransactionOptions;
5194
+ withFeePayer?: boolean;
5195
+ }
5196
+ /**
5197
+ * Unified type that holds all the user data input interfaces when generating different transaction types
5198
+ */
5199
+ type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
5200
+ /**
5201
+ * Interface that holds the user data input when submitting a transaction
5202
+ */
5203
+ interface InputSubmitTransactionData {
5204
+ transaction: AnyRawTransaction;
5205
+ senderAuthenticator: AccountAuthenticator;
5206
+ feePayerAuthenticator?: AccountAuthenticator;
5207
+ additionalSignersAuthenticators?: Array<AccountAuthenticator>;
5612
5208
  }
5613
5209
 
5614
5210
  /**
@@ -6396,6 +5992,18 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
6396
5992
  */
6397
5993
  declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
6398
5994
  declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey;
5995
+ /**
5996
+ * Sign a transaction that can later be submitted to chain
5997
+ *
5998
+ * @param args.signer The signer account to sign the transaction
5999
+ * @param args.transaction A aptos transaction type to sign
6000
+ *
6001
+ * @return The signer AccountAuthenticator
6002
+ */
6003
+ declare function sign(args: {
6004
+ signer: Account$1;
6005
+ transaction: AnyRawTransaction;
6006
+ }): AccountAuthenticator;
6399
6007
  /**
6400
6008
  * Prepare a transaction to be submitted to chain
6401
6009
  *
@@ -6417,15 +6025,14 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
6417
6025
  */
6418
6026
  declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
6419
6027
  /**
6420
- * Generate a multi signers signed transaction that can be submitted to chain
6028
+ * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
6421
6029
  *
6422
- * @param transaction MultiAgentRawTransaction | FeePayerRawTransaction
6423
- * @param senderAuthenticator The account authenticator of the transaction sender
6424
- * @param secondarySignerAuthenticators The extra signers account Authenticators
6030
+ * @param transaction A aptos transaction type
6425
6031
  *
6426
- * @returns A SignedTransaction
6032
+ * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
6427
6033
  */
6428
- declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
6034
+ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
6035
+ declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
6429
6036
 
6430
6037
  /**
6431
6038
  * Convert type arguments to only type tags, allowing for string representations of type tags
@@ -6467,18 +6074,6 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
6467
6074
  declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
6468
6075
  declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
6469
6076
 
6470
- /**
6471
- * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
6472
- *
6473
- * @param transaction A aptos transaction type
6474
- *
6475
- * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
6476
- */
6477
- declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
6478
- declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
6479
- declare function generateSigningMessageForSerializable(obj: Serializable): Uint8Array;
6480
- declare function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array;
6481
-
6482
6077
  declare enum TypeTagParserErrorType {
6483
6078
  InvalidTypeTag = "unknown type",
6484
6079
  UnexpectedGenericType = "unexpected generic type",
@@ -7782,31 +7377,6 @@ declare class Transaction {
7782
7377
  }): Promise<PendingTransactionResponse>;
7783
7378
  }
7784
7379
 
7785
- /**
7786
- * A class to query all `OIDB` related queries on Aptos.
7787
- */
7788
- declare class Keyless {
7789
- readonly config: AptosConfig;
7790
- constructor(config: AptosConfig);
7791
- /**
7792
- * TODO
7793
- *
7794
- * @param args.jwt jwt token
7795
- * @returns The pepper
7796
- */
7797
- getPepper(args: {
7798
- jwt: string;
7799
- ephemeralKeyPair: EphemeralKeyPair;
7800
- }): Promise<Uint8Array>;
7801
- deriveKeylessAccount(args: {
7802
- jwt: string;
7803
- ephemeralKeyPair: EphemeralKeyPair;
7804
- uidKey?: string;
7805
- pepper?: HexInput;
7806
- extraFieldKey?: string;
7807
- }): Promise<KeylessAccount>;
7808
- }
7809
-
7810
7380
  /**
7811
7381
  * This class is the main entry point into Aptos's
7812
7382
  * APIs and separates functionality into different namespaces.
@@ -7830,10 +7400,9 @@ declare class Aptos {
7830
7400
  readonly general: General;
7831
7401
  readonly staking: Staking;
7832
7402
  readonly transaction: Transaction;
7833
- readonly keyless: Keyless;
7834
7403
  constructor(settings?: AptosConfig);
7835
7404
  }
7836
- interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7405
+ interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7837
7406
  }
7838
7407
 
7839
7408
  /**
@@ -7875,6 +7444,18 @@ declare class AptosApiError extends Error {
7875
7444
  constructor(request: AptosRequest, response: AptosResponse<any, any>, message: string);
7876
7445
  }
7877
7446
 
7447
+ type DeserializableClass<T extends Serializable> = {
7448
+ deserialize(deserializer: Deserializer): T;
7449
+ };
7450
+ /**
7451
+ * Utility function that serializes and deserialize an object back into the same bundle as the sdk.
7452
+ * This is a workaround to have the `instanceof` operator work when input objects come from a different
7453
+ * bundle.
7454
+ * @param cls The class of the object to normalize
7455
+ * @param value the instance to normalize
7456
+ */
7457
+ declare function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T): T;
7458
+
7878
7459
  /**
7879
7460
  * Given a url and method, sends the request with axios and
7880
7461
  * returns the response.
@@ -7932,7 +7513,6 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
7932
7513
  */
7933
7514
  declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
7934
7515
  declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7935
- declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7936
7516
  declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
7937
7517
 
7938
7518
  type PostRequestOptions = {
@@ -7984,7 +7564,5 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
7984
7564
  declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7985
7565
  declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7986
7566
  declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7987
- declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7988
- declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7989
7567
 
7990
- export { APTOS_BIP44_DEFAULT_DERIVATION_PATH, APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, type AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountAuthenticatorVariant, type AccountData, AccountPublicKey, AccountSequenceNumber, type AccountSignature, AddressInvalidReason, type AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, AnySignatureVariant, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, type AptosRequest, type AptosResponse, type AptosSettings, AuthenticationKey, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, Bool, CKDPriv, ChainId, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DecodedTableData, type DeletedTableData, DeriveScheme, type DerivedKeys, type Deserializable, Deserializer, type DirectWriteSet, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, type EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type EntryFunctionPayloadResponse, EphemeralCertificate, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, EphemeralSignatureVariant, type Event$1 as Event, type EventGuid, type ExecutionFinishEventData, type FailureEventData, type FaucetConfig, FeePayerRawTransaction, FixedBytes, type FullNodeConfig, type FunctionABI, type GasEstimation, type GenerateAccount, type GenerateAccountArgs, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, type GenesisPayload, type GenesisTransactionResponse, type GetANSNameResponse, type GetAccountCoinsDataResponse, type GetAccountCollectionsWithOwnedTokenResponse, type GetAccountOwnedObjectsResponse, type GetAccountOwnedTokensFromCollectionResponse, type GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, type GetChainTopUserTransactionsResponse, type GetCollectionDataResponse, type GetCurrentFungibleAssetBalancesResponse, type GetCurrentTokenOwnershipResponse, type GetDelegatedStakingActivitiesResponse, type GetEventsResponse, type GetFungibleAssetActivitiesResponse, type GetFungibleAssetMetadataResponse, type GetNumberOfDelegatorsResponse, type GetOwnedTokensResponse, type GetProcessorStatusResponse, type GetRequestOptions, type GetTokenActivityResponse, type GetTokenDataResponse, type GraphqlQuery, Groth16Zkp, HARDENED_OFFSET, Hex, type HexInput, HexInvalidReason, Identifier, type IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, KeyType, KeylessAccount, KeylessPublicKey, KeylessSignature, type LedgerInfo, type LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, MoveOption, type MoveOptionType, type MoveResource, type MoveScriptBytecode, MoveString, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, MoveVector, MultiAgentRawTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiSig, MultiSigTransactionPayload, MultiSignature, type MultisigPayloadResponse, Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, NetworkToPepperAPI, NetworkToProverAPI, OpenIdSignature, OpenIdSignatureOrZkProof, type OrderBy, type OrderByArg, type OrderByValue, type PaginationArgs, ParsingError, type ParsingResult, type PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RoleType, RotationProofChallenge, Script, type ScriptFunctionArgument, type ScriptFunctionArgumentTypes, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedGroth16Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type StateCheckpointTransactionResponse, StructTag, type SuccessEventData, type TableItemRequest, type TokenStandard, type TokenStandardArg, type TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, type TransactionPayloadResponse, TransactionPayloadScript, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVariants, TypeTagVector, U128, U16, U256, U32, U64, U8, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type VerifyEd25519SignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, computeAddressSeed, convertArgument, deriveKey, deriveTransactionType, deserializeFromScriptArgument, ensureBoolean, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, fromDerivationPath, generateMultiSignersSignedTransaction, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBlockMetadataTransactionResponse, isBool, isEd25519Signature, isEncodedEntryFunctionArgument, isFeePayerSignature, isGenesisTransactionResponse, isLargeNumber, isMultiAgentSignature, isMultiEd25519Signature, isNull, isNumber, isPendingTransactionResponse, isScriptDataInput, isSecp256k1Signature, isStateCheckpointTransactionResponse, isString, isUserTransactionResponse, isValidBIP44Path, isValidHardenedPath, isValidatorTransactionResponse, mnemonicToSeed, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };
7568
+ export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, type AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountAuthenticatorVariant, type AccountData, AccountPublicKey, AccountSequenceNumber, type AccountSignature, AddressInvalidReason, type AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, AnySignatureVariant, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, type AptosRequest, type AptosResponse, type AptosSettings, AuthenticationKey, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, Bool, CKDPriv, ChainId, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DecodedTableData, type DeletedTableData, DeriveScheme, type DerivedKeys, type Deserializable, type DeserializableClass, Deserializer, type DirectWriteSet, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, type EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, type EntryFunctionPayloadResponse, type Event$1 as Event, type EventGuid, type ExecutionFinishEventData, type FailureEventData, type FaucetConfig, FeePayerRawTransaction, FixedBytes, type FullNodeConfig, type FunctionABI, type GasEstimation, type GenerateAccount, type GenerateAccountArgs, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, type GenesisPayload, type GenesisTransactionResponse, type GetANSNameResponse, type GetAccountCoinsDataResponse, type GetAccountCollectionsWithOwnedTokenResponse, type GetAccountOwnedObjectsResponse, type GetAccountOwnedTokensFromCollectionResponse, type GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, type GetChainTopUserTransactionsResponse, type GetCollectionDataResponse, type GetCurrentFungibleAssetBalancesResponse, type GetCurrentTokenOwnershipResponse, type GetDelegatedStakingActivitiesResponse, type GetEventsResponse, type GetFungibleAssetActivitiesResponse, type GetFungibleAssetMetadataResponse, type GetNumberOfDelegatorsResponse, type GetOwnedTokensResponse, type GetProcessorStatusResponse, type GetRequestOptions, type GetTokenActivityResponse, type GetTokenDataResponse, type GraphqlQuery, HARDENED_OFFSET, Hex, type HexInput, HexInvalidReason, Identifier, type IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, KeyType, type LedgerInfo, type LedgerVersionArg, MimeType, ModuleId, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, MoveOption, type MoveOptionType, type MoveResource, type MoveScriptBytecode, MoveString, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, MoveVector, MultiAgentRawTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeySignature, MultiSig, MultiSigTransactionPayload, type MultisigPayloadResponse, Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI, type OrderBy, type OrderByArg, type OrderByValue, type PaginationArgs, ParsingError, type ParsingResult, type PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RoleType, RotationProofChallenge, Script, type ScriptFunctionArgument, type ScriptFunctionArgumentTypes, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type StateCheckpointTransactionResponse, StructTag, type SuccessEventData, type TableItemRequest, type TokenStandard, type TokenStandardArg, type TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, type TransactionPayloadResponse, TransactionPayloadScript, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVariants, TypeTagVector, U128, U16, U256, U32, U64, U8, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type VerifyEd25519SignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, ensureBoolean, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAuthenticatorForSimulation, getFunctionParts, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBlockMetadataTransactionResponse, isBool, isEd25519Signature, isEncodedEntryFunctionArgument, isFeePayerSignature, isGenesisTransactionResponse, isLargeNumber, isMultiAgentSignature, isMultiEd25519Signature, isNull, isNumber, isPendingTransactionResponse, isScriptDataInput, isSecp256k1Signature, isStateCheckpointTransactionResponse, isString, isUserTransactionResponse, isValidBIP44Path, isValidHardenedPath, isValidatorTransactionResponse, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, promiseFulfilledStatus, request, sign, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };