@aptos-labs/ts-sdk 1.13.0-zeta.1 → 1.13.1

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 (472) hide show
  1. package/dist/common/index.d.ts +1399 -1825
  2. package/dist/common/index.js +26 -26
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/{Ed25519Account-hkKk3b4Z.d.mts → Ed25519Account--qjfup2u.d.mts} +13 -11
  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 +12 -12
  8. package/dist/esm/api/ans.mjs +1 -1
  9. package/dist/esm/api/aptos.d.mts +8 -15
  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 +9 -9
  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 +9 -9
  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 -14
  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.mjs +1 -1
  39. package/dist/esm/bcs/index.mjs +1 -1
  40. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  41. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  42. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  43. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  44. package/dist/esm/bcs/serializer.d.mts +0 -2
  45. package/dist/esm/bcs/serializer.mjs +1 -1
  46. package/dist/esm/{chunk-RBDX3YWC.mjs → chunk-2SPJ7XZB.mjs} +2 -2
  47. package/dist/esm/chunk-32PB5F74.mjs +2 -0
  48. package/dist/esm/chunk-32PB5F74.mjs.map +1 -0
  49. package/dist/esm/chunk-3YCG7Y63.mjs +2 -0
  50. package/dist/esm/chunk-3YCG7Y63.mjs.map +1 -0
  51. package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
  52. package/dist/esm/{chunk-7M3U2I23.mjs → chunk-4UJ5Y6QQ.mjs} +2 -2
  53. package/dist/esm/{chunk-52DBSOFA.mjs → chunk-52C73T26.mjs} +2 -2
  54. package/dist/esm/{chunk-52DBSOFA.mjs.map → chunk-52C73T26.mjs.map} +1 -1
  55. package/dist/esm/chunk-5M7D6SXS.mjs +2 -0
  56. package/dist/esm/chunk-5M7D6SXS.mjs.map +1 -0
  57. package/dist/esm/chunk-5RE43AX2.mjs +2 -0
  58. package/dist/esm/{chunk-OVXWFD2N.mjs.map → chunk-5RE43AX2.mjs.map} +1 -1
  59. package/dist/esm/{chunk-YNBWXDRS.mjs → chunk-6GZ5SUUK.mjs} +2 -2
  60. package/dist/esm/{chunk-XESYWLDD.mjs → chunk-6T4IFH73.mjs} +2 -2
  61. package/dist/esm/chunk-6T4IFH73.mjs.map +1 -0
  62. package/dist/esm/{chunk-5TNUDFLP.mjs → chunk-BGW77OLE.mjs} +2 -2
  63. package/dist/esm/{chunk-MRCVSUJQ.mjs → chunk-BWFJHFBQ.mjs} +2 -2
  64. package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
  65. package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
  66. package/dist/esm/chunk-CYTNMIOT.mjs +2 -0
  67. package/dist/esm/chunk-CYTNMIOT.mjs.map +1 -0
  68. package/dist/esm/{chunk-BQCIUNLZ.mjs → chunk-CZF6JTC2.mjs} +2 -2
  69. package/dist/esm/chunk-DJ5TUMIY.mjs +2 -0
  70. package/dist/esm/chunk-DJ5TUMIY.mjs.map +1 -0
  71. package/dist/esm/{chunk-Q225PZMV.mjs → chunk-DMKUAQB7.mjs} +2 -2
  72. package/dist/esm/{chunk-RM7D2ITN.mjs → chunk-DSTKXJMA.mjs} +2 -2
  73. package/dist/esm/{chunk-P4UY6YKM.mjs → chunk-DW4FAHFT.mjs} +2 -2
  74. package/dist/esm/{chunk-CHL5NDZD.mjs → chunk-DW5XFUDM.mjs} +2 -2
  75. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  76. package/dist/esm/{chunk-CYWA4AJF.mjs → chunk-E7OPTWPP.mjs} +2 -2
  77. package/dist/esm/{chunk-5D65Z2SG.mjs → chunk-F2LL2BWZ.mjs} +2 -2
  78. package/dist/esm/chunk-F2LL2BWZ.mjs.map +1 -0
  79. package/dist/esm/{chunk-3FL3NLZ6.mjs → chunk-F5O5BBEK.mjs} +2 -2
  80. package/dist/esm/{chunk-35ZI4WOQ.mjs → chunk-FS3NSGBF.mjs} +2 -2
  81. package/dist/esm/chunk-H3NRKYG4.mjs +2 -0
  82. package/dist/esm/chunk-H3NRKYG4.mjs.map +1 -0
  83. package/dist/esm/chunk-HDDI532F.mjs +2 -0
  84. package/dist/esm/chunk-HDDI532F.mjs.map +1 -0
  85. package/dist/esm/chunk-HHETZQ6D.mjs +2 -0
  86. package/dist/esm/{chunk-TR6Q7RSZ.mjs.map → chunk-HHETZQ6D.mjs.map} +1 -1
  87. package/dist/esm/{chunk-T3QZ5HSE.mjs → chunk-HLBUOMKA.mjs} +2 -2
  88. package/dist/esm/chunk-HLBUOMKA.mjs.map +1 -0
  89. package/dist/esm/{chunk-NU6UF6RM.mjs → chunk-I24X55BI.mjs} +2 -2
  90. package/dist/esm/{chunk-2QGT5DK3.mjs → chunk-I2RHCBHM.mjs} +2 -2
  91. package/dist/esm/{chunk-2I2XAOH7.mjs → chunk-ILTVKYMT.mjs} +2 -2
  92. package/dist/esm/{chunk-U7EZI5D5.mjs → chunk-IOSQVDZI.mjs} +2 -2
  93. package/dist/esm/{chunk-R25D6NBC.mjs → chunk-J5WUVXKC.mjs} +2 -2
  94. package/dist/esm/chunk-J5WUVXKC.mjs.map +1 -0
  95. package/dist/esm/{chunk-VJCQBX6V.mjs → chunk-JAIQBRLH.mjs} +2 -2
  96. package/dist/esm/{chunk-XJFGX3E4.mjs → chunk-JK23P2GY.mjs} +2 -2
  97. package/dist/esm/chunk-JK23P2GY.mjs.map +1 -0
  98. package/dist/esm/chunk-KBRRTSF6.mjs +2 -0
  99. package/dist/esm/{chunk-T7TIIAWK.mjs.map → chunk-KBRRTSF6.mjs.map} +1 -1
  100. package/dist/esm/{chunk-YP3RMVL3.mjs → chunk-KECXKWWV.mjs} +2 -2
  101. package/dist/esm/{chunk-YIG37BG2.mjs → chunk-LGVHYLN2.mjs} +2 -2
  102. package/dist/esm/chunk-LGVHYLN2.mjs.map +1 -0
  103. package/dist/esm/chunk-LJ6MB5U7.mjs +2 -0
  104. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  105. package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
  106. package/dist/esm/chunk-LYCGUGYR.mjs +2 -0
  107. package/dist/esm/chunk-LYCGUGYR.mjs.map +1 -0
  108. package/dist/esm/chunk-M3NK6GOI.mjs +2 -0
  109. package/dist/esm/chunk-M3NK6GOI.mjs.map +1 -0
  110. package/dist/esm/{chunk-B645DPPF.mjs → chunk-MFFSJJSY.mjs} +2 -2
  111. package/dist/esm/chunk-MLWIHWNH.mjs +1 -0
  112. package/dist/esm/chunk-MQXSU6GN.mjs +2 -0
  113. package/dist/esm/{chunk-LVYKZS54.mjs.map → chunk-MQXSU6GN.mjs.map} +1 -1
  114. package/dist/esm/{chunk-JYFKKB34.mjs → chunk-NPFNYP75.mjs} +2 -2
  115. package/dist/esm/{chunk-RXMGJBCP.mjs → chunk-O5ZLNJ6Z.mjs} +2 -2
  116. package/dist/esm/chunk-O5ZLNJ6Z.mjs.map +1 -0
  117. package/dist/esm/{chunk-V7VV5QW4.mjs → chunk-O7P52OOA.mjs} +2 -2
  118. package/dist/esm/{chunk-ZGWWPB3D.mjs → chunk-O7PPRJJC.mjs} +2 -2
  119. package/dist/esm/chunk-O7PPRJJC.mjs.map +1 -0
  120. package/dist/esm/chunk-OATDMLDK.mjs +2 -0
  121. package/dist/esm/chunk-OATDMLDK.mjs.map +1 -0
  122. package/dist/esm/chunk-OMC3ZGKN.mjs +2 -0
  123. package/dist/esm/chunk-OMC3ZGKN.mjs.map +1 -0
  124. package/dist/esm/chunk-OVJQWQ2N.mjs +2 -0
  125. package/dist/esm/chunk-OVJQWQ2N.mjs.map +1 -0
  126. package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
  127. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  128. package/dist/esm/{chunk-MKHPGY3O.mjs → chunk-OZNBOCEF.mjs} +2 -2
  129. package/dist/esm/chunk-PNGS6IWC.mjs +2 -0
  130. package/dist/esm/{chunk-VVJEWB26.mjs → chunk-QIAHBEEW.mjs} +2 -2
  131. package/dist/esm/{chunk-ED6PYTNG.mjs → chunk-QM4UQVGB.mjs} +2 -2
  132. package/dist/esm/{chunk-KX5ESZO7.mjs → chunk-R5QUBEH6.mjs} +2 -2
  133. package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
  134. package/dist/esm/{chunk-WZCUABDL.mjs → chunk-RHBCVCOS.mjs} +2 -2
  135. package/dist/esm/{chunk-7EQOLMEJ.mjs → chunk-TBMAJ6AW.mjs} +2 -2
  136. package/dist/esm/{chunk-IVBYTTN7.mjs → chunk-U43IJHQN.mjs} +2 -2
  137. package/dist/esm/{chunk-XI4LX4EC.mjs → chunk-UML2VQZT.mjs} +2 -2
  138. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  139. package/dist/esm/chunk-V6SPPOWX.mjs +2 -0
  140. package/dist/esm/chunk-VVMR7UKB.mjs +2 -0
  141. package/dist/esm/chunk-VVMR7UKB.mjs.map +1 -0
  142. package/dist/esm/{chunk-2VCKY2ZJ.mjs → chunk-WFL6YWJS.mjs} +2 -2
  143. package/dist/esm/{chunk-HZC6A3QL.mjs → chunk-WFZDFFBM.mjs} +2 -2
  144. package/dist/esm/chunk-WZNX3RBA.mjs +2 -0
  145. package/dist/esm/chunk-XDGQTMDV.mjs +2 -0
  146. package/dist/esm/chunk-XDGQTMDV.mjs.map +1 -0
  147. package/dist/esm/chunk-XRAL7KVT.mjs +2 -0
  148. package/dist/esm/chunk-XRAL7KVT.mjs.map +1 -0
  149. package/dist/esm/{chunk-U426PZNM.mjs → chunk-Y5GRH4YJ.mjs} +2 -2
  150. package/dist/esm/chunk-Y5GRH4YJ.mjs.map +1 -0
  151. package/dist/esm/{chunk-KMHJNUXU.mjs → chunk-YUN2JVAN.mjs} +2 -2
  152. package/dist/esm/{chunk-KBSAS57Q.mjs → chunk-YVIP7DMT.mjs} +2 -2
  153. package/dist/esm/{chunk-OAOJVE5X.mjs → chunk-YWN2T4IU.mjs} +2 -2
  154. package/dist/esm/chunk-YZKDNVA5.mjs +2 -0
  155. package/dist/esm/chunk-YZKDNVA5.mjs.map +1 -0
  156. package/dist/esm/{chunk-UZHVGPGH.mjs → chunk-ZYYK3UXP.mjs} +2 -2
  157. package/dist/esm/client/core.mjs +1 -1
  158. package/dist/esm/client/get.d.mts +1 -2
  159. package/dist/esm/client/get.mjs +1 -1
  160. package/dist/esm/client/index.d.mts +2 -2
  161. package/dist/esm/client/index.mjs +1 -1
  162. package/dist/esm/client/post.d.mts +1 -3
  163. package/dist/esm/client/post.mjs +1 -1
  164. package/dist/esm/core/account/Account.d.mts +20 -0
  165. package/dist/esm/core/account/Account.mjs +2 -0
  166. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  167. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  168. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  169. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  170. package/dist/esm/core/account/index.d.mts +21 -0
  171. package/dist/esm/core/account/index.mjs +2 -0
  172. package/dist/esm/core/account/utils/address.mjs +1 -1
  173. package/dist/esm/core/account/utils/index.mjs +1 -1
  174. package/dist/esm/core/accountAddress.mjs +1 -1
  175. package/dist/esm/core/authenticationKey.mjs +1 -1
  176. package/dist/esm/core/crypto/ed25519.d.mts +10 -0
  177. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  178. package/dist/esm/core/crypto/hdKey.d.mts +1 -15
  179. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  180. package/dist/esm/core/crypto/index.d.mts +5 -7
  181. package/dist/esm/core/crypto/index.mjs +1 -1
  182. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  183. package/dist/esm/core/crypto/multiKey.d.mts +3 -4
  184. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  185. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  186. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  187. package/dist/esm/core/crypto/signature.mjs +1 -1
  188. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  189. package/dist/esm/core/index.d.mts +7 -6
  190. package/dist/esm/core/index.mjs +1 -1
  191. package/dist/esm/index.d.mts +9 -15
  192. package/dist/esm/index.mjs +1 -1
  193. package/dist/esm/internal/account.d.mts +1 -13
  194. package/dist/esm/internal/account.mjs +1 -1
  195. package/dist/esm/internal/ans.d.mts +3 -3
  196. package/dist/esm/internal/ans.mjs +1 -1
  197. package/dist/esm/internal/coin.d.mts +7 -7
  198. package/dist/esm/internal/coin.mjs +1 -1
  199. package/dist/esm/internal/digitalAsset.d.mts +10 -10
  200. package/dist/esm/internal/digitalAsset.mjs +1 -1
  201. package/dist/esm/internal/event.d.mts +1 -1
  202. package/dist/esm/internal/event.mjs +1 -1
  203. package/dist/esm/internal/faucet.d.mts +1 -1
  204. package/dist/esm/internal/faucet.mjs +1 -1
  205. package/dist/esm/internal/fungibleAsset.d.mts +9 -9
  206. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  207. package/dist/esm/internal/general.mjs +1 -1
  208. package/dist/esm/internal/staking.d.mts +1 -1
  209. package/dist/esm/internal/staking.mjs +1 -1
  210. package/dist/esm/internal/transaction.mjs +1 -1
  211. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  212. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  213. package/dist/esm/internal/view.d.mts +7 -7
  214. package/dist/esm/internal/view.mjs +1 -1
  215. package/dist/esm/transactions/authenticator/account.d.mts +4 -3
  216. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  217. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  218. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  219. package/dist/esm/transactions/index.d.mts +2 -2
  220. package/dist/esm/transactions/index.mjs +1 -1
  221. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  222. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  223. package/dist/esm/transactions/instances/index.mjs +1 -1
  224. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  225. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  226. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  227. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  228. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  229. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  231. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  232. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  233. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -13
  234. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  235. package/dist/esm/transactions/management/index.d.mts +2 -2
  236. package/dist/esm/transactions/management/index.mjs +1 -1
  237. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  238. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  239. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  240. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  241. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  242. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  243. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  244. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  245. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +28 -6
  246. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  247. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  248. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  249. package/dist/esm/transactions/types.d.mts +6 -6
  250. package/dist/esm/types/index.d.mts +3 -17
  251. package/dist/esm/types/index.mjs +1 -1
  252. package/dist/esm/utils/apiEndpoints.d.mts +1 -3
  253. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  254. package/dist/esm/utils/const.d.mts +3 -5
  255. package/dist/esm/utils/const.mjs +1 -1
  256. package/dist/esm/utils/index.d.mts +1 -1
  257. package/dist/esm/utils/index.mjs +1 -1
  258. package/dist/esm/version.d.mts +1 -1
  259. package/dist/esm/version.mjs +1 -1
  260. package/package.json +2 -7
  261. package/src/api/account.ts +1 -2
  262. package/src/api/ans.ts +1 -2
  263. package/src/api/aptos.ts +0 -6
  264. package/src/api/aptosConfig.ts +1 -46
  265. package/src/api/digitalAsset.ts +1 -2
  266. package/src/api/fungibleAsset.ts +1 -2
  267. package/src/api/transaction.ts +1 -2
  268. package/src/api/transactionSubmission/management.ts +1 -1
  269. package/src/api/transactionSubmission/sign.ts +1 -1
  270. package/src/bcs/serializer.ts +0 -18
  271. package/src/client/core.ts +0 -8
  272. package/src/client/get.ts +0 -6
  273. package/src/client/post.ts +0 -13
  274. package/src/{account → core/account}/Account.ts +16 -12
  275. package/src/{account → core/account}/Ed25519Account.ts +7 -13
  276. package/src/{account → core/account}/SingleKeyAccount.ts +7 -13
  277. package/src/core/account/index.ts +4 -0
  278. package/src/core/crypto/ed25519.ts +24 -6
  279. package/src/core/crypto/hdKey.ts +0 -31
  280. package/src/core/crypto/index.ts +0 -2
  281. package/src/core/crypto/multiKey.ts +11 -23
  282. package/src/core/crypto/singleKey.ts +0 -11
  283. package/src/core/index.ts +1 -0
  284. package/src/index.ts +0 -1
  285. package/src/internal/account.ts +1 -1
  286. package/src/internal/ans.ts +1 -2
  287. package/src/internal/digitalAsset.ts +1 -2
  288. package/src/internal/fungibleAsset.ts +1 -2
  289. package/src/internal/transactionSubmission.ts +10 -9
  290. package/src/transactions/authenticator/account.ts +11 -6
  291. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  292. package/src/transactions/management/transactionWorker.ts +2 -8
  293. package/src/transactions/transactionBuilder/index.ts +0 -2
  294. package/src/transactions/transactionBuilder/transactionBuilder.ts +128 -40
  295. package/src/types/index.ts +0 -20
  296. package/src/utils/apiEndpoints.ts +1 -14
  297. package/src/utils/const.ts +2 -4
  298. package/src/version.ts +1 -1
  299. package/dist/esm/account/Account.d.mts +0 -34
  300. package/dist/esm/account/Account.mjs +0 -2
  301. package/dist/esm/account/Ed25519Account.d.mts +0 -34
  302. package/dist/esm/account/Ed25519Account.mjs +0 -2
  303. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -42
  304. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  305. package/dist/esm/account/KeylessAccount.d.mts +0 -85
  306. package/dist/esm/account/KeylessAccount.mjs +0 -2
  307. package/dist/esm/account/MultiKeyAccount.d.mts +0 -99
  308. package/dist/esm/account/MultiKeyAccount.mjs +0 -2
  309. package/dist/esm/account/SingleKeyAccount.d.mts +0 -34
  310. package/dist/esm/account/SingleKeyAccount.mjs +0 -2
  311. package/dist/esm/account/index.d.mts +0 -39
  312. package/dist/esm/account/index.mjs +0 -2
  313. package/dist/esm/api/keyless.d.mts +0 -75
  314. package/dist/esm/api/keyless.mjs +0 -2
  315. package/dist/esm/chunk-2FKQJL3H.mjs +0 -2
  316. package/dist/esm/chunk-2FKQJL3H.mjs.map +0 -1
  317. package/dist/esm/chunk-2HXKDHMA.mjs +0 -2
  318. package/dist/esm/chunk-2HXKDHMA.mjs.map +0 -1
  319. package/dist/esm/chunk-2MPLQPZT.mjs +0 -2
  320. package/dist/esm/chunk-2MPLQPZT.mjs.map +0 -1
  321. package/dist/esm/chunk-2Z4N3GLA.mjs +0 -2
  322. package/dist/esm/chunk-2Z4N3GLA.mjs.map +0 -1
  323. package/dist/esm/chunk-3J2Q7O57.mjs +0 -2
  324. package/dist/esm/chunk-3J2Q7O57.mjs.map +0 -1
  325. package/dist/esm/chunk-4AOGG725.mjs +0 -2
  326. package/dist/esm/chunk-4AOGG725.mjs.map +0 -1
  327. package/dist/esm/chunk-5D65Z2SG.mjs.map +0 -1
  328. package/dist/esm/chunk-5GIWRESN.mjs +0 -2
  329. package/dist/esm/chunk-6OKRMOWR.mjs +0 -2
  330. package/dist/esm/chunk-6OKRMOWR.mjs.map +0 -1
  331. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  332. package/dist/esm/chunk-ACOL3VVP.mjs +0 -2
  333. package/dist/esm/chunk-ACOL3VVP.mjs.map +0 -1
  334. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  335. package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
  336. package/dist/esm/chunk-ATXQWKVH.mjs +0 -2
  337. package/dist/esm/chunk-ATXQWKVH.mjs.map +0 -1
  338. package/dist/esm/chunk-EMFDNUP2.mjs +0 -2
  339. package/dist/esm/chunk-EMFDNUP2.mjs.map +0 -1
  340. package/dist/esm/chunk-EY3FIYMV.mjs +0 -2
  341. package/dist/esm/chunk-EY3FIYMV.mjs.map +0 -1
  342. package/dist/esm/chunk-FLYEALDB.mjs +0 -2
  343. package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
  344. package/dist/esm/chunk-HTO4EQNT.mjs +0 -2
  345. package/dist/esm/chunk-HTO4EQNT.mjs.map +0 -1
  346. package/dist/esm/chunk-J5SQQQPI.mjs +0 -2
  347. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  348. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  349. package/dist/esm/chunk-KWDJ4YOP.mjs +0 -2
  350. package/dist/esm/chunk-KWDJ4YOP.mjs.map +0 -1
  351. package/dist/esm/chunk-LVYKZS54.mjs +0 -2
  352. package/dist/esm/chunk-MAFSWKAF.mjs +0 -2
  353. package/dist/esm/chunk-MAFSWKAF.mjs.map +0 -1
  354. package/dist/esm/chunk-MX3YIOU5.mjs +0 -2
  355. package/dist/esm/chunk-MX3YIOU5.mjs.map +0 -1
  356. package/dist/esm/chunk-NJWTXEHT.mjs +0 -2
  357. package/dist/esm/chunk-NJWTXEHT.mjs.map +0 -1
  358. package/dist/esm/chunk-ODA4KV4Q.mjs +0 -2
  359. package/dist/esm/chunk-OVXWFD2N.mjs +0 -2
  360. package/dist/esm/chunk-Q6CZDSLM.mjs +0 -2
  361. package/dist/esm/chunk-R25D6NBC.mjs.map +0 -1
  362. package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
  363. package/dist/esm/chunk-RFSO3JRG.mjs.map +0 -1
  364. package/dist/esm/chunk-RXMGJBCP.mjs.map +0 -1
  365. package/dist/esm/chunk-S5HG2QUD.mjs +0 -2
  366. package/dist/esm/chunk-S5HG2QUD.mjs.map +0 -1
  367. package/dist/esm/chunk-SCPXFKEK.mjs +0 -2
  368. package/dist/esm/chunk-SCPXFKEK.mjs.map +0 -1
  369. package/dist/esm/chunk-T3QZ5HSE.mjs.map +0 -1
  370. package/dist/esm/chunk-T7TIIAWK.mjs +0 -2
  371. package/dist/esm/chunk-TR6Q7RSZ.mjs +0 -2
  372. package/dist/esm/chunk-TT2VLL52.mjs +0 -2
  373. package/dist/esm/chunk-TT2VLL52.mjs.map +0 -1
  374. package/dist/esm/chunk-U426PZNM.mjs.map +0 -1
  375. package/dist/esm/chunk-ULUMROUJ.mjs +0 -2
  376. package/dist/esm/chunk-ULUMROUJ.mjs.map +0 -1
  377. package/dist/esm/chunk-VAZQVN5V.mjs +0 -2
  378. package/dist/esm/chunk-VAZQVN5V.mjs.map +0 -1
  379. package/dist/esm/chunk-WF737YNO.mjs +0 -2
  380. package/dist/esm/chunk-WF737YNO.mjs.map +0 -1
  381. package/dist/esm/chunk-XESYWLDD.mjs.map +0 -1
  382. package/dist/esm/chunk-XJ3HRNOP.mjs +0 -2
  383. package/dist/esm/chunk-XJ3HRNOP.mjs.map +0 -1
  384. package/dist/esm/chunk-XJFGX3E4.mjs.map +0 -1
  385. package/dist/esm/chunk-YIG37BG2.mjs.map +0 -1
  386. package/dist/esm/chunk-YPBHGSXY.mjs +0 -2
  387. package/dist/esm/chunk-YPBHGSXY.mjs.map +0 -1
  388. package/dist/esm/chunk-YU7DNMEA.mjs +0 -2
  389. package/dist/esm/chunk-YU7DNMEA.mjs.map +0 -1
  390. package/dist/esm/chunk-ZG6HOK6A.mjs +0 -2
  391. package/dist/esm/chunk-ZG6HOK6A.mjs.map +0 -1
  392. package/dist/esm/chunk-ZGWWPB3D.mjs.map +0 -1
  393. package/dist/esm/chunk-ZUDMSBVZ.mjs +0 -2
  394. package/dist/esm/chunk-ZUDMSBVZ.mjs.map +0 -1
  395. package/dist/esm/core/crypto/ephemeral.d.mts +0 -76
  396. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  397. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  398. package/dist/esm/core/crypto/keyless.d.mts +0 -217
  399. package/dist/esm/core/crypto/keyless.mjs +0 -2
  400. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  401. package/dist/esm/core/crypto/poseidon.d.mts +0 -7
  402. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  403. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  404. package/dist/esm/internal/keyless.d.mts +0 -68
  405. package/dist/esm/internal/keyless.mjs +0 -2
  406. package/dist/esm/internal/keyless.mjs.map +0 -1
  407. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -47
  408. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
  409. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
  410. package/dist/esm/types/keyless.d.mts +0 -14
  411. package/dist/esm/types/keyless.mjs +0 -1
  412. package/dist/esm/types/keyless.mjs.map +0 -1
  413. package/src/account/EphemeralKeyPair.ts +0 -78
  414. package/src/account/KeylessAccount.ts +0 -230
  415. package/src/account/MultiKeyAccount.ts +0 -121
  416. package/src/account/index.ts +0 -6
  417. package/src/api/keyless.ts +0 -55
  418. package/src/core/crypto/ephemeral.ts +0 -147
  419. package/src/core/crypto/keyless.ts +0 -502
  420. package/src/core/crypto/poseidon.ts +0 -134
  421. package/src/internal/keyless.ts +0 -205
  422. package/src/transactions/transactionBuilder/signingMessage.ts +0 -75
  423. package/src/types/keyless.ts +0 -6
  424. /package/dist/esm/{chunk-RBDX3YWC.mjs.map → chunk-2SPJ7XZB.mjs.map} +0 -0
  425. /package/dist/esm/{account/Account.mjs.map → chunk-4QMXOWHP.mjs.map} +0 -0
  426. /package/dist/esm/{chunk-7M3U2I23.mjs.map → chunk-4UJ5Y6QQ.mjs.map} +0 -0
  427. /package/dist/esm/{chunk-YNBWXDRS.mjs.map → chunk-6GZ5SUUK.mjs.map} +0 -0
  428. /package/dist/esm/{chunk-5TNUDFLP.mjs.map → chunk-BGW77OLE.mjs.map} +0 -0
  429. /package/dist/esm/{chunk-MRCVSUJQ.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-BQCIUNLZ.mjs.map → chunk-CZF6JTC2.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-Q225PZMV.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-RM7D2ITN.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-P4UY6YKM.mjs.map → chunk-DW4FAHFT.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-CHL5NDZD.mjs.map → chunk-DW5XFUDM.mjs.map} +0 -0
  435. /package/dist/esm/{account/Ed25519Account.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-CYWA4AJF.mjs.map → chunk-E7OPTWPP.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-3FL3NLZ6.mjs.map → chunk-F5O5BBEK.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-35ZI4WOQ.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-NU6UF6RM.mjs.map → chunk-I24X55BI.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-2QGT5DK3.mjs.map → chunk-I2RHCBHM.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-2I2XAOH7.mjs.map → chunk-ILTVKYMT.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-U7EZI5D5.mjs.map → chunk-IOSQVDZI.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-VJCQBX6V.mjs.map → chunk-JAIQBRLH.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-YP3RMVL3.mjs.map → chunk-KECXKWWV.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-ODA4KV4Q.mjs.map → chunk-LJ6MB5U7.mjs.map} +0 -0
  446. /package/dist/esm/{chunk-B645DPPF.mjs.map → chunk-MFFSJJSY.mjs.map} +0 -0
  447. /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-MLWIHWNH.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-JYFKKB34.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-V7VV5QW4.mjs.map → chunk-O7P52OOA.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-MKHPGY3O.mjs.map → chunk-OZNBOCEF.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-Q6CZDSLM.mjs.map → chunk-PNGS6IWC.mjs.map} +0 -0
  452. /package/dist/esm/{chunk-VVJEWB26.mjs.map → chunk-QIAHBEEW.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-ED6PYTNG.mjs.map → chunk-QM4UQVGB.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-KX5ESZO7.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  455. /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-R7G3CLRI.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-WZCUABDL.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-7EQOLMEJ.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-IVBYTTN7.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-XI4LX4EC.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  460. /package/dist/esm/{account/MultiKeyAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-5GIWRESN.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-2VCKY2ZJ.mjs.map → chunk-WFL6YWJS.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-HZC6A3QL.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  464. /package/dist/esm/{chunk-J5SQQQPI.mjs.map → chunk-WZNX3RBA.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-KMHJNUXU.mjs.map → chunk-YUN2JVAN.mjs.map} +0 -0
  466. /package/dist/esm/{chunk-KBSAS57Q.mjs.map → chunk-YVIP7DMT.mjs.map} +0 -0
  467. /package/dist/esm/{chunk-OAOJVE5X.mjs.map → chunk-YWN2T4IU.mjs.map} +0 -0
  468. /package/dist/esm/{chunk-UZHVGPGH.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  469. /package/dist/esm/{account/SingleKeyAccount.mjs.map → core/account/Account.mjs.map} +0 -0
  470. /package/dist/esm/{account/index.mjs.map → core/account/Ed25519Account.mjs.map} +0 -0
  471. /package/dist/esm/{api/keyless.mjs.map → core/account/SingleKeyAccount.mjs.map} +0 -0
  472. /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → core/account/index.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,265 +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
- constructor(publicKey: PublicKey);
3465
- /**
3466
- * Get the public key in bytes (Uint8Array).
3467
- *
3468
- * @returns Uint8Array representation of the public key
3469
- */
3470
- toUint8Array(): Uint8Array;
3471
- /**
3472
- * Get the public key as a hex string with the 0x prefix.
3473
- *
3474
- * @returns string representation of the public key
3475
- */
3476
- toString(): string;
3477
- /**
3478
- * Verifies a signed data with a public key
3479
- *
3480
- * @param args.message message
3481
- * @param args.signature The signature
3482
- * @returns true if the signature is valid
3483
- */
3484
- verifySignature(args: {
3485
- message: HexInput;
3486
- signature: EphemeralSignature;
3487
- }): boolean;
3488
- serialize(serializer: Serializer): void;
3489
- static deserialize(deserializer: Deserializer): EphemeralPublicKey;
3490
- static isPublicKey(publicKey: PublicKey): publicKey is EphemeralPublicKey;
3491
- isEd25519(): this is Ed25519PublicKey;
3492
- }
3493
- declare class EphemeralSignature extends Signature {
3494
- readonly signature: Signature;
3495
- constructor(signature: Signature);
3496
- /**
3497
- * Get the public key in bytes (Uint8Array).
3498
- *
3499
- * @returns Uint8Array representation of the public key
3500
- */
3501
- toUint8Array(): Uint8Array;
3502
- /**
3503
- * Get the public key as a hex string with the 0x prefix.
3504
- *
3505
- * @returns string representation of the public key
3506
- */
3507
- toString(): string;
3508
- static fromHex(hexInput: HexInput): EphemeralSignature;
3509
- serialize(serializer: Serializer): void;
3510
- static deserialize(deserializer: Deserializer): EphemeralSignature;
3511
- }
3512
-
3513
- declare const EPK_HORIZON_SECS = 10000000;
3514
- declare const MAX_AUD_VAL_BYTES = 120;
3515
- declare const MAX_UID_KEY_BYTES = 30;
3516
- declare const MAX_UID_VAL_BYTES = 330;
3517
- declare const MAX_ISS_VAL_BYTES = 120;
3518
- declare const MAX_EXTRA_FIELD_BYTES = 350;
3519
- declare const MAX_JWT_HEADER_B64_BYTES = 300;
3520
- declare const MAX_COMMITED_EPK_BYTES = 93;
3521
- /**
3522
- * Represents the KeylessPublicKey public key
3523
- *
3524
- * KeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
3525
- */
3526
- declare class KeylessPublicKey extends AccountPublicKey {
3527
- static readonly ADDRESS_SEED_LENGTH: number;
3528
- readonly iss: string;
3529
- readonly addressSeed: Uint8Array;
3530
- constructor(iss: string, addressSeed: HexInput);
3531
- authKey(): AuthenticationKey;
3532
- /**
3533
- * Get the public key in bytes (Uint8Array).
3534
- *
3535
- * @returns Uint8Array representation of the public key
3536
- */
3537
- toUint8Array(): Uint8Array;
3538
- /**
3539
- * Get the public key as a hex string with the 0x prefix.
3540
- *
3541
- * @returns string representation of the public key
3542
- */
3543
- toString(): string;
3544
- /**
3545
- * Verifies a signed data with a public key
3546
- *
3547
- * @param args.message message
3548
- * @param args.signature The signature
3549
- * @returns true if the signature is valid
3550
- */
3551
- verifySignature(args: {
3552
- message: HexInput;
3553
- signature: KeylessSignature;
3554
- }): boolean;
3555
- serialize(serializer: Serializer): void;
3556
- static deserialize(deserializer: Deserializer): KeylessPublicKey;
3557
- static load(deserializer: Deserializer): KeylessPublicKey;
3558
- static isPublicKey(publicKey: PublicKey): publicKey is KeylessPublicKey;
3559
- static create(args: {
3560
- iss: string;
3561
- uidKey: string;
3562
- uidVal: string;
3563
- aud: string;
3564
- pepper: HexInput;
3565
- }): KeylessPublicKey;
3566
- }
3567
- declare function computeAddressSeed(args: {
3568
- uidKey: string;
3569
- uidVal: string;
3570
- aud: string;
3571
- pepper: HexInput;
3572
- }): Uint8Array;
3573
- declare class OpenIdSignatureOrZkProof extends Signature {
3574
- readonly signature: Signature;
3575
- constructor(signature: Signature);
3576
- /**
3577
- * Get the public key in bytes (Uint8Array).
3578
- *
3579
- * @returns Uint8Array representation of the public key
3580
- */
3581
- toUint8Array(): Uint8Array;
3582
- /**
3583
- * Get the public key as a hex string with the 0x prefix.
3584
- *
3585
- * @returns string representation of the public key
3586
- */
3587
- toString(): string;
3588
- serialize(serializer: Serializer): void;
3589
- static deserialize(deserializer: Deserializer): OpenIdSignatureOrZkProof;
3590
- }
3591
- declare class Groth16Zkp extends Serializable {
3592
- a: Uint8Array;
3593
- b: Uint8Array;
3594
- c: Uint8Array;
3595
- constructor(args: {
3596
- a: HexInput;
3597
- b: HexInput;
3598
- c: HexInput;
3599
- });
3600
- toUint8Array(): Uint8Array;
3601
- serialize(serializer: Serializer): void;
3602
- static deserialize(deserializer: Deserializer): Groth16Zkp;
3603
- }
3604
- declare class SignedGroth16Signature extends Signature {
3605
- readonly proof: Groth16Zkp;
3606
- readonly expHorizonSecs: bigint;
3607
- readonly extraField?: string;
3608
- readonly overrideAudVal?: string;
3609
- readonly trainingWheelsSignature?: EphemeralSignature;
3610
- constructor(args: {
3611
- proof: Groth16Zkp;
3612
- expHorizonSecs?: bigint;
3613
- extraField?: string;
3614
- overrideAudVal?: string;
3615
- trainingWheelsSignature?: EphemeralSignature;
3616
- });
3617
- /**
3618
- * Get the signature in bytes (Uint8Array).
3619
- *
3620
- * @returns Uint8Array representation of the signature
3621
- */
3622
- toUint8Array(): Uint8Array;
3623
- /**
3624
- * Get the signature as a hex string with the 0x prefix.
3625
- *
3626
- * @returns string representation of the signature
3627
- */
3628
- toString(): string;
3629
- serialize(serializer: Serializer): void;
3630
- static deserialize(deserializer: Deserializer): SignedGroth16Signature;
3631
- static load(deserializer: Deserializer): SignedGroth16Signature;
3632
- }
3633
- /**
3634
- * A OpenId signature which contains the private inputs to an OIDB proof.
3635
- */
3636
- declare class OpenIdSignature extends Signature {
3637
- readonly jwtSignature: string;
3638
- readonly jwtPayloadJson: string;
3639
- readonly uidKey: string;
3640
- readonly epkBlinder: Uint8Array;
3641
- readonly pepper: Uint8Array;
3642
- readonly overrideAudValue?: string;
3643
- /**
3644
- * Create a new Signature instance from a Uint8Array or String.
3645
- *
3646
- * @param hexInput A HexInput (string or Uint8Array)
3647
- */
3648
- constructor(args: {
3649
- jwtSignature: string;
3650
- jwtPayloadJson: string;
3651
- uidKey?: string;
3652
- epkBlinder: Uint8Array;
3653
- pepper: Uint8Array;
3654
- overrideAudValue?: string;
3655
- });
3656
- /**
3657
- * Get the signature in bytes (Uint8Array).
3658
- *
3659
- * @returns Uint8Array representation of the signature
3660
- */
3661
- toUint8Array(): Uint8Array;
3662
- /**
3663
- * Get the signature as a hex string with the 0x prefix.
3664
- *
3665
- * @returns string representation of the signature
3666
- */
3667
- toString(): string;
3668
- serialize(serializer: Serializer): void;
3669
- static deserialize(deserializer: Deserializer): OpenIdSignature;
3670
- static load(deserializer: Deserializer): OpenIdSignature;
3671
- static isSignature(signature: Signature): signature is OpenIdSignature;
3672
- }
3673
- /**
3674
- * A signature of a message signed via OIDC that uses proofs or the jwt token to authenticate.
3675
- */
3676
- declare class KeylessSignature extends Signature {
3677
- readonly openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
3678
- readonly jwtHeader: string;
3679
- readonly expiryDateSecs: bigint;
3680
- readonly ephemeralPublicKey: EphemeralPublicKey;
3681
- readonly ephemeralSignature: EphemeralSignature;
3682
- /**
3683
- * Create a new Signature instance from a Uint8Array or String.
3684
- *
3685
- * @param hexInput A HexInput (string or Uint8Array)
3686
- */
3687
- constructor(args: {
3688
- jwtHeader: string;
3689
- openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
3690
- expiryDateSecs: bigint;
3691
- ephemeralPublicKey: EphemeralPublicKey;
3692
- ephemeralSignature: EphemeralSignature;
3693
- });
3694
- /**
3695
- * Get the signature in bytes (Uint8Array).
3696
- *
3697
- * @returns Uint8Array representation of the signature
3698
- */
3699
- toUint8Array(): Uint8Array;
3700
- /**
3701
- * Get the signature as a hex string with the 0x prefix.
3702
- *
3703
- * @returns string representation of the signature
3704
- */
3705
- toString(): string;
3706
- serialize(serializer: Serializer): void;
3707
- static deserialize(deserializer: Deserializer): KeylessSignature;
3708
- static load(deserializer: Deserializer): KeylessSignature;
3709
- static isSignature(signature: Signature): signature is KeylessSignature;
3434
+ static deserialize(deserializer: Deserializer): MultiKeySignature;
3710
3435
  }
3711
3436
 
3712
3437
  /**
@@ -3899,67 +3624,379 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
3899
3624
  */
3900
3625
  declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
3901
3626
  readonly public_keys: MultiKey;
3902
- readonly signatures: MultiSignature;
3903
- 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);
3904
3630
  serialize(serializer: Serializer): void;
3905
3631
  static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
3906
3632
  }
3907
3633
 
3908
- /**
3909
- * Type of API endpoint for request routing
3910
- */
3911
- declare enum AptosApiType {
3912
- FULLNODE = "Fullnode",
3913
- INDEXER = "Indexer",
3914
- FAUCET = "Faucet",
3915
- PEPPER = "Pepper",
3916
- PROVER = "Prover"
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;
3917
3648
  }
3918
3649
  /**
3919
- * The default max gas amount when none is given.
3920
- *
3921
- * This is the maximum number of gas units that will be used by a transaction before being rejected.
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.
3922
3653
  *
3923
- * Note that max gas amount varies based on the transaction. A larger transaction will go over this
3924
- * default gas amount, and the value will need to be changed for the specific transaction.
3654
+ * Note: Generating a signer instance does not create the account on-chain.
3925
3655
  */
3926
- declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
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;
3685
+ }
3686
+
3927
3687
  /**
3928
- * The default transaction expiration seconds from now.
3929
- *
3930
- * This time is how long until the blockchain nodes will reject the transaction.
3931
- *
3932
- * Note that the transaction expiration time varies based on network connection and network load. It may need to be
3933
- * increased for the transaction to be processed.
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.
3934
3691
  */
3935
- declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
3692
+ interface CreateEd25519AccountFromPrivateKeyArgs {
3693
+ privateKey: Ed25519PrivateKey;
3694
+ address?: AccountAddressInput;
3695
+ legacy?: true;
3696
+ }
3936
3697
  /**
3937
- * The default number of seconds to wait for a transaction to be processed.
3938
- *
3939
- * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
3940
- * the results of the transaction. It may take longer based on network connection and network load.
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.
3941
3701
  */
3942
- declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
3702
+ interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
3703
+ privateKey: Ed25519PrivateKey;
3704
+ address?: AccountAddressInput;
3705
+ legacy: false;
3706
+ }
3943
3707
  /**
3944
- * The default gas currency for the network.
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.
3945
3711
  */
3946
- declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
3947
- declare const RAW_TRANSACTION_SALT = "RawTransaction";
3948
- declare const RAW_TRANSACTION_WITH_DATA_SALT = "RawTransactionWithData";
3712
+ interface CreateSingleKeyAccountFromPrivateKeyArgs {
3713
+ privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
3714
+ address?: AccountAddressInput;
3715
+ legacy?: false;
3716
+ }
3949
3717
  /**
3950
- * The list of supported Processor types for our indexer api.
3951
- *
3952
- * These can be found from the processor_status table in the indexer database.
3953
- * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
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.
3954
3720
  */
3955
- declare enum ProcessorType {
3956
- ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
3957
- DEFAULT = "default_processor",
3958
- EVENTS_PROCESSOR = "events_processor",
3959
- FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
3960
- STAKE_PROCESSOR = "stake_processor",
3961
- TOKEN_V2_PROCESSOR = "token_v2_processor",
3962
- USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
3721
+ interface CreateAccountFromPrivateKeyArgs {
3722
+ privateKey: PrivateKey;
3723
+ address?: AccountAddressInput;
3724
+ legacy?: boolean;
3725
+ }
3726
+ /**
3727
+ * Arguments for generating an `Ed25519Account`.
3728
+ * This is the input type used by default.
3729
+ */
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",
3994
+ DEFAULT = "default_processor",
3995
+ EVENTS_PROCESSOR = "events_processor",
3996
+ FUNGIBLE_ASSET_PROCESSOR = "fungible_asset_processor",
3997
+ STAKE_PROCESSOR = "stake_processor",
3998
+ TOKEN_V2_PROCESSOR = "token_v2_processor",
3999
+ USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
3963
4000
  }
3964
4001
 
3965
4002
  /**
@@ -3986,14 +4023,6 @@ declare class AptosConfig {
3986
4023
  * The optional hardcoded faucet URL to send requests to instead of using the network
3987
4024
  */
3988
4025
  readonly faucet?: string;
3989
- /**
3990
- * The optional hardcoded pepper service URL to send requests to instead of using the network
3991
- */
3992
- readonly pepper?: string;
3993
- /**
3994
- * The optional hardcoded prover service URL to send requests to instead of using the network
3995
- */
3996
- readonly prover?: string;
3997
4026
  /**
3998
4027
  * The optional hardcoded indexer URL to send requests to instead of using the network
3999
4028
  */
@@ -4026,1582 +4055,1156 @@ declare class AptosConfig {
4026
4055
  * @internal
4027
4056
  */
4028
4057
  getRequestUrl(apiType: AptosApiType): string;
4029
- /**
4030
- * Checks if the URL is a known pepper service endpoint
4031
- *
4032
- * @internal
4033
- * */
4034
- isPepperServiceRequest(url: string): boolean;
4035
- /**
4036
- * Checks if the URL is a known prover service endpoint
4037
- *
4038
- * @internal
4039
- * */
4040
- isProverServiceRequest(url: string): boolean;
4041
- }
4042
-
4043
- /**
4044
- * Representation of a ChainId that can serialized and deserialized
4045
- */
4046
- declare class ChainId extends Serializable {
4047
- readonly chainId: number;
4048
- constructor(chainId: number);
4049
- serialize(serializer: Serializer): void;
4050
- static deserialize(deserializer: Deserializer): ChainId;
4051
- }
4052
-
4053
- /**
4054
- * Representation of an Identifier that can serialized and deserialized.
4055
- * We use Identifier to represent the module "name" in "ModuleId" and
4056
- * the "function name" in "EntryFunction"
4057
- */
4058
- declare class Identifier extends Serializable {
4059
- identifier: string;
4060
- constructor(identifier: string);
4061
- serialize(serializer: Serializer): void;
4062
- static deserialize(deserializer: Deserializer): Identifier;
4063
- }
4064
-
4065
- /**
4066
- * Representation of a ModuleId that can serialized and deserialized
4067
- * ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
4068
- */
4069
- declare class ModuleId extends Serializable {
4070
- readonly address: AccountAddress;
4071
- readonly name: Identifier;
4072
- /**
4073
- * Full name of a module.
4074
- * @param address The account address. e.g "0x1"
4075
- * @param name The module name under the "address". e.g "coin"
4076
- */
4077
- constructor(address: AccountAddress, name: Identifier);
4078
- /**
4079
- * Converts a string literal to a ModuleId
4080
- * @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
4081
- * @returns ModuleId
4082
- */
4083
- static fromStr(moduleId: MoveModuleId): ModuleId;
4084
- serialize(serializer: Serializer): void;
4085
- static deserialize(deserializer: Deserializer): ModuleId;
4086
- }
4087
-
4088
- declare abstract class TypeTag extends Serializable {
4089
- abstract serialize(serializer: Serializer): void;
4090
- static deserialize(deserializer: Deserializer): TypeTag;
4091
- abstract toString(): string;
4092
- isBool(): this is TypeTagBool;
4093
- isAddress(): this is TypeTagAddress;
4094
- isGeneric(): this is TypeTagGeneric;
4095
- isSigner(): this is TypeTagSigner;
4096
- isVector(): this is TypeTagVector;
4097
- isStruct(): this is TypeTagStruct;
4098
- isU8(): this is TypeTagU8;
4099
- isU16(): this is TypeTagU16;
4100
- isU32(): this is TypeTagU32;
4101
- isU64(): this is TypeTagU64;
4102
- isU128(): this is TypeTagU128;
4103
- isU256(): this is TypeTagU256;
4104
- }
4105
- declare class TypeTagBool extends TypeTag {
4106
- toString(): string;
4107
- serialize(serializer: Serializer): void;
4108
- static load(_deserializer: Deserializer): TypeTagBool;
4109
- }
4110
- declare class TypeTagU8 extends TypeTag {
4111
- toString(): string;
4112
- serialize(serializer: Serializer): void;
4113
- static load(_deserializer: Deserializer): TypeTagU8;
4114
- }
4115
- declare class TypeTagU16 extends TypeTag {
4116
- toString(): string;
4117
- serialize(serializer: Serializer): void;
4118
- static load(_deserializer: Deserializer): TypeTagU16;
4119
- }
4120
- declare class TypeTagU32 extends TypeTag {
4121
- toString(): string;
4122
- serialize(serializer: Serializer): void;
4123
- static load(_deserializer: Deserializer): TypeTagU32;
4124
- }
4125
- declare class TypeTagU64 extends TypeTag {
4126
- toString(): string;
4127
- serialize(serializer: Serializer): void;
4128
- static load(_deserializer: Deserializer): TypeTagU64;
4129
- }
4130
- declare class TypeTagU128 extends TypeTag {
4131
- toString(): string;
4132
- serialize(serializer: Serializer): void;
4133
- static load(_deserializer: Deserializer): TypeTagU128;
4134
- }
4135
- declare class TypeTagU256 extends TypeTag {
4136
- toString(): string;
4137
- serialize(serializer: Serializer): void;
4138
- static load(_deserializer: Deserializer): TypeTagU256;
4139
- }
4140
- declare class TypeTagAddress extends TypeTag {
4141
- toString(): string;
4142
- serialize(serializer: Serializer): void;
4143
- static load(_deserializer: Deserializer): TypeTagAddress;
4144
- }
4145
- declare class TypeTagSigner extends TypeTag {
4146
- toString(): string;
4147
- serialize(serializer: Serializer): void;
4148
- static load(_deserializer: Deserializer): TypeTagSigner;
4149
- }
4150
- declare class TypeTagReference extends TypeTag {
4151
- readonly value: TypeTag;
4152
- toString(): `&${string}`;
4153
- constructor(value: TypeTag);
4154
- serialize(serializer: Serializer): void;
4155
- static load(deserializer: Deserializer): TypeTagReference;
4156
- }
4157
- /**
4158
- * Generics are used for type parameters in entry functions. However,
4159
- * they are not actually serialized into a real type, so they cannot be
4160
- * used as a type directly.
4161
- */
4162
- declare class TypeTagGeneric extends TypeTag {
4163
- readonly value: number;
4164
- toString(): `T${number}`;
4165
- constructor(value: number);
4166
- serialize(serializer: Serializer): void;
4167
- static load(deserializer: Deserializer): TypeTagGeneric;
4168
4058
  }
4169
- declare class TypeTagVector extends TypeTag {
4170
- readonly value: TypeTag;
4171
- toString(): `vector<${string}>`;
4172
- constructor(value: TypeTag);
4173
- static u8(): TypeTagVector;
4174
- serialize(serializer: Serializer): void;
4175
- static load(deserializer: Deserializer): TypeTagVector;
4176
- }
4177
- declare class TypeTagStruct extends TypeTag {
4178
- readonly value: StructTag;
4179
- toString(): `0x${string}::${string}::${string}`;
4180
- constructor(value: StructTag);
4181
- serialize(serializer: Serializer): void;
4182
- static load(deserializer: Deserializer): TypeTagStruct;
4183
- isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
4184
- isString(): boolean;
4185
- isOption(): boolean;
4186
- isObject(): boolean;
4187
- }
4188
- declare class StructTag extends Serializable {
4189
- readonly address: AccountAddress;
4190
- readonly moduleName: Identifier;
4191
- readonly name: Identifier;
4192
- readonly typeArgs: Array<TypeTag>;
4193
- constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
4194
- serialize(serializer: Serializer): void;
4195
- static deserialize(deserializer: Deserializer): StructTag;
4196
- }
4197
- declare function aptosCoinStructTag(): StructTag;
4198
- declare function stringStructTag(): StructTag;
4199
- declare function optionStructTag(typeArg: TypeTag): StructTag;
4200
- declare function objectStructTag(typeArg: TypeTag): StructTag;
4201
4059
 
4202
4060
  /**
4203
- * Deserialize a Script Transaction Argument
4204
- */
4205
- declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
4206
- /**
4207
- * Representation of the supported Transaction Payload
4208
- * that can serialized and deserialized
4209
- */
4210
- declare abstract class TransactionPayload extends Serializable {
4211
- /**
4212
- * Serialize a Transaction Payload
4213
- */
4214
- abstract serialize(serializer: Serializer): void;
4215
- /**
4216
- * Deserialize a Transaction Payload
4217
- */
4218
- static deserialize(deserializer: Deserializer): TransactionPayload;
4219
- }
4220
- /**
4221
- * Representation of a Transaction Payload Script that can serialized and deserialized
4222
- */
4223
- declare class TransactionPayloadScript extends TransactionPayload {
4224
- readonly script: Script;
4225
- constructor(script: Script);
4226
- serialize(serializer: Serializer): void;
4227
- static load(deserializer: Deserializer): TransactionPayloadScript;
4228
- }
4229
- /**
4230
- * Representation of a Transaction Payload Entry Function that can serialized and deserialized
4231
- */
4232
- declare class TransactionPayloadEntryFunction extends TransactionPayload {
4233
- readonly entryFunction: EntryFunction;
4234
- constructor(entryFunction: EntryFunction);
4235
- serialize(serializer: Serializer): void;
4236
- static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
4237
- }
4238
- /**
4239
- * Representation of a Transaction Payload Multi-sig that can serialized and deserialized
4240
- */
4241
- declare class TransactionPayloadMultiSig extends TransactionPayload {
4242
- readonly multiSig: MultiSig;
4243
- constructor(multiSig: MultiSig);
4244
- serialize(serializer: Serializer): void;
4245
- static load(deserializer: Deserializer): TransactionPayloadMultiSig;
4246
- }
4247
- /**
4248
- * Representation of a EntryFunction that can serialized and deserialized
4061
+ * A class to query all `Account` related queries on Aptos.
4249
4062
  */
4250
- declare class EntryFunction {
4251
- readonly module_name: ModuleId;
4252
- readonly function_name: Identifier;
4253
- readonly type_args: Array<TypeTag>;
4254
- readonly args: Array<EntryFunctionArgument>;
4063
+ declare class Account {
4064
+ readonly config: AptosConfig;
4065
+ constructor(config: AptosConfig);
4255
4066
  /**
4256
- * Contains the payload to run a function within a module.
4257
- * @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
4258
- * @param function_name The function name. e.g "transfer"
4259
- * @param type_args Type arguments that move function requires.
4067
+ * Queries the current state for an Aptos account given its account address
4260
4068
  *
4261
- * @example
4262
- * A coin transfer function has one type argument "CoinType".
4263
- * ```
4264
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4265
- * ```
4266
- * @param args arguments to the move function.
4069
+ * @param args.accountAddress Aptos account address
4267
4070
  *
4268
- * @example
4269
- * 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
4270
4074
  * ```
4271
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4075
+ * {
4076
+ * sequence_number: "1",
4077
+ * authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
4078
+ * }
4272
4079
  * ```
4273
4080
  */
4274
- constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
4081
+ getAccountInfo(args: {
4082
+ accountAddress: AccountAddressInput;
4083
+ }): Promise<AccountData>;
4275
4084
  /**
4276
- * A helper function to build a EntryFunction payload from raw primitive values
4277
- *
4278
- * @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
4279
- * @param function_name Function name
4280
- * @param type_args Type arguments that move function requires.
4085
+ * Queries for all modules in an account given an account address
4281
4086
  *
4282
- * @example
4283
- * A coin transfer function has one type argument "CoinType".
4284
- * ```
4285
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4286
- * ```
4287
- * @param args Arguments to the move function.
4087
+ * Note: In order to get all account modules, this function may call the API
4088
+ * multiple times as it auto paginates.
4288
4089
  *
4289
- * @example
4290
- * A coin transfer function has three arguments "from", "to" and "amount".
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
4094
+ *
4095
+ * @returns Account modules
4096
+ */
4097
+ getAccountModules(args: {
4098
+ accountAddress: AccountAddressInput;
4099
+ options?: PaginationArgs & LedgerVersionArg;
4100
+ }): Promise<MoveModuleBytecode[]>;
4101
+ /**
4102
+ * Queries for a specific account module given account address and module name
4103
+ *
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
4107
+ *
4108
+ * @returns Account module
4109
+ *
4110
+ * @example
4111
+ * const module = await aptos.getAccountModule({accountAddress:"0x456"})
4112
+ * // An example of an account module response
4291
4113
  * ```
4292
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4114
+ * {
4115
+ * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
4116
+ * abi: { address: "0x1" }
4117
+ * }
4293
4118
  * ```
4294
- * @returns EntryFunction
4295
4119
  */
4296
- static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4297
- serialize(serializer: Serializer): void;
4120
+ getAccountModule(args: {
4121
+ accountAddress: AccountAddressInput;
4122
+ moduleName: string;
4123
+ options?: LedgerVersionArg;
4124
+ }): Promise<MoveModuleBytecode>;
4298
4125
  /**
4299
- * Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
4300
- * @see EntryFunctionBytes
4301
- *
4302
- * NOTE: When you deserialize an EntryFunction payload with this method, the entry function
4303
- * arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
4304
- * in the form of the EntryFunctionBytes class.
4126
+ * Queries account transactions given an account address
4305
4127
  *
4306
- * In order to correctly deserialize these arguments as their actual type representations, you
4307
- * must know the types of the arguments beforehand and deserialize them yourself individually.
4128
+ * Note: In order to get all account transactions, this function may call the API
4129
+ * multiple times as it auto paginates.
4308
4130
  *
4309
- * One way you could achieve this is by using the ABIs for an entry function and deserializing each
4310
- * argument as its given, corresponding type.
4131
+ * @example
4132
+ * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
4311
4133
  *
4312
- * @param deserializer
4313
- * @returns A deserialized EntryFunction payload for a transaction.
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
4314
4137
  *
4138
+ * @returns The account transactions
4315
4139
  */
4316
- static deserialize(deserializer: Deserializer): EntryFunction;
4317
- }
4318
- /**
4319
- * Representation of a Script that can serialized and deserialized
4320
- */
4321
- declare class Script {
4322
- /**
4323
- * The move module bytecode
4324
- */
4325
- readonly bytecode: Uint8Array;
4140
+ getAccountTransactions(args: {
4141
+ accountAddress: AccountAddressInput;
4142
+ options?: PaginationArgs;
4143
+ }): Promise<TransactionResponse[]>;
4326
4144
  /**
4327
- * The type 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
4328
4158
  */
4329
- readonly type_args: Array<TypeTag>;
4159
+ getAccountResources(args: {
4160
+ accountAddress: AccountAddressInput;
4161
+ options?: PaginationArgs & LedgerVersionArg;
4162
+ }): Promise<MoveResource[]>;
4330
4163
  /**
4331
- * The arguments that the bytecode function requires.
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.
4166
+ *
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
4171
+ *
4172
+ * @returns Account resource
4173
+ *
4174
+ * @example
4175
+ * const resource = await aptos.getAccountResource({accountAddress:"0x456"})
4176
+ *
4332
4177
  */
4333
- readonly args: Array<ScriptFunctionArgument>;
4178
+ getAccountResource<T extends {} = any>(args: {
4179
+ accountAddress: AccountAddressInput;
4180
+ resourceType: MoveStructId;
4181
+ options?: LedgerVersionArg;
4182
+ }): Promise<T>;
4334
4183
  /**
4335
- * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
4184
+ * Looks up the account address for a given authentication key
4336
4185
  *
4337
- * @param bytecode The move module bytecode
4338
- * @param type_args The type arguments that the bytecode function requires.
4186
+ * This handles both if the account's authentication key has been rotated or not.
4339
4187
  *
4340
4188
  * @example
4341
- * A coin transfer function has one type argument "CoinType".
4342
- * ```
4343
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4344
- * ```
4345
- * @param args The arguments that the bytecode function requires.
4189
+ * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
4346
4190
  *
4347
- * @example
4348
- * A coin transfer function has three arguments "from", "to" and "amount".
4349
- * ```
4350
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4351
- * ```
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
4352
4195
  */
4353
- constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
4354
- serialize(serializer: Serializer): void;
4355
- static deserialize(deserializer: Deserializer): Script;
4356
- }
4357
- /**
4358
- * Representation of a MultiSig that can serialized and deserialized
4359
- */
4360
- declare class MultiSig {
4361
- readonly multisig_address: AccountAddress;
4362
- readonly transaction_payload?: MultiSigTransactionPayload;
4196
+ lookupOriginalAccountAddress(args: {
4197
+ authenticationKey: AccountAddressInput;
4198
+ minimumLedgerVersion?: AnyNumber;
4199
+ options?: LedgerVersionArg;
4200
+ }): Promise<AccountAddress>;
4363
4201
  /**
4364
- * Contains the payload to run a multi-sig account transaction.
4202
+ * Queries the current count of tokens owned by an account
4365
4203
  *
4366
- * @param multisig_address The multi-sig account address the transaction will be executed as.
4204
+ * @example
4205
+ * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
4367
4206
  *
4368
- * @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
4369
- * transaction whose payload is already stored on chain.
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
4370
4210
  */
4371
- constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
4372
- serialize(serializer: Serializer): void;
4373
- static deserialize(deserializer: Deserializer): MultiSig;
4374
- }
4375
- /**
4376
- * Representation of a MultiSig Transaction Payload from `multisig_account.move`
4377
- * that can be serialized and deserialized
4378
-
4379
- * This class exists right now to represent an extensible transaction payload class for
4380
- * transactions used in `multisig_account.move`. Eventually, this class will be able to
4381
- * support script payloads when the `multisig_account.move` module supports them.
4382
- */
4383
- declare class MultiSigTransactionPayload extends Serializable {
4384
- readonly transaction_payload: EntryFunction;
4211
+ getAccountTokensCount(args: {
4212
+ accountAddress: AccountAddressInput;
4213
+ minimumLedgerVersion?: AnyNumber;
4214
+ }): Promise<number>;
4385
4215
  /**
4386
- * Contains the payload to run a multi-sig account transaction.
4216
+ * Queries the account's current owned tokens.
4387
4217
  *
4388
- * @param transaction_payload The payload of the multi-sig transaction.
4389
- * This can only be EntryFunction for now but,
4390
- * Script might be supported in the future.
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
4391
4231
  */
4392
- constructor(transaction_payload: EntryFunction);
4393
- serialize(serializer: Serializer): void;
4394
- static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
4395
- }
4396
-
4397
- /**
4398
- * Representation of a Raw Transaction that can serialized and deserialized
4399
- */
4400
- declare class RawTransaction extends Serializable {
4401
- readonly sender: AccountAddress;
4402
- readonly sequence_number: bigint;
4403
- readonly payload: TransactionPayload;
4404
- readonly max_gas_amount: bigint;
4405
- readonly gas_unit_price: bigint;
4406
- readonly expiration_timestamp_secs: bigint;
4407
- readonly chain_id: ChainId;
4232
+ getAccountOwnedTokens(args: {
4233
+ accountAddress: AccountAddressInput;
4234
+ minimumLedgerVersion?: AnyNumber;
4235
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
4236
+ }): Promise<GetAccountOwnedTokensQueryResponse>;
4408
4237
  /**
4409
- * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
4410
- * RawTransactions must be signed before Aptos chain can execute them.
4238
+ * Queries all current tokens of a specific collection that an account owns by the collection address
4411
4239
  *
4412
- * @param sender The sender Account Address
4413
- * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
4414
- * the sender's account at the time the transaction executes.
4415
- * @param payload Instructions for the Aptos Blockchain, including publishing a module,
4416
- * execute an entry function or execute a script payload.
4417
- * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
4418
- * than this gas or the transaction will be discarded during validation.
4419
- * @param gas_unit_price Price to be paid per gas unit.
4420
- * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
4421
- * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
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
4422
4254
  */
4423
- constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
4424
- serialize(serializer: Serializer): void;
4425
- static deserialize(deserializer: Deserializer): RawTransaction;
4426
- }
4427
- /**
4428
- * Representation of a Raw Transaction With Data that can serialized and deserialized
4429
- */
4430
- declare abstract class RawTransactionWithData extends Serializable {
4255
+ getAccountOwnedTokensFromCollectionAddress(args: {
4256
+ accountAddress: AccountAddressInput;
4257
+ collectionAddress: AccountAddressInput;
4258
+ minimumLedgerVersion?: AnyNumber;
4259
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
4260
+ }): Promise<GetAccountOwnedTokensFromCollectionResponse>;
4431
4261
  /**
4432
- * Serialize a Raw Transaction With Data
4433
- */
4434
- abstract serialize(serializer: Serializer): void;
4435
- /**
4436
- * Deserialize a Raw Transaction With Data
4437
- */
4438
- static deserialize(deserializer: Deserializer): RawTransactionWithData;
4439
- }
4440
- /**
4441
- * Representation of a Multi Agent Transaction that can serialized and deserialized
4442
- */
4443
- declare class MultiAgentRawTransaction extends RawTransactionWithData {
4444
- /**
4445
- * The raw transaction
4446
- */
4447
- readonly raw_txn: RawTransaction;
4448
- /**
4449
- * The secondary signers on this transaction
4450
- */
4451
- readonly secondary_signer_addresses: Array<AccountAddress>;
4452
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
4453
- serialize(serializer: Serializer): void;
4454
- static load(deserializer: Deserializer): MultiAgentRawTransaction;
4455
- }
4456
- /**
4457
- * Representation of a Fee Payer Transaction that can serialized and deserialized
4458
- */
4459
- declare class FeePayerRawTransaction extends RawTransactionWithData {
4460
- /**
4461
- * The raw transaction
4462
- */
4463
- readonly raw_txn: RawTransaction;
4464
- /**
4465
- * The secondary signers on this transaction - optional and can be empty
4466
- */
4467
- readonly secondary_signer_addresses: Array<AccountAddress>;
4468
- /**
4469
- * The fee payer account address
4470
- */
4471
- readonly fee_payer_address: AccountAddress;
4472
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
4473
- serialize(serializer: Serializer): void;
4474
- static load(deserializer: Deserializer): FeePayerRawTransaction;
4475
- }
4476
-
4477
- /**
4478
- * Representation of the challenge which is needed to sign by owner of the account
4479
- * to rotate the authentication key.
4480
- */
4481
- declare class RotationProofChallenge extends Serializable {
4482
- readonly accountAddress: AccountAddress;
4483
- readonly moduleName: MoveString;
4484
- readonly structName: MoveString;
4485
- readonly originator: AccountAddress;
4486
- readonly currentAuthKey: AccountAddress;
4487
- readonly newPublicKey: MoveVector<U8>;
4488
- readonly sequenceNumber: U64;
4489
- constructor(args: {
4490
- sequenceNumber: AnyNumber;
4491
- originator: AccountAddress;
4492
- currentAuthKey: AccountAddress;
4493
- newPublicKey: PublicKey;
4494
- });
4495
- serialize(serializer: Serializer): void;
4496
- }
4497
-
4498
- declare abstract class TransactionAuthenticator extends Serializable {
4499
- abstract serialize(serializer: Serializer): void;
4500
- static deserialize(deserializer: Deserializer): TransactionAuthenticator;
4501
- }
4502
- /**
4503
- * Transaction authenticator Ed25519 for a single signer transaction
4504
- *
4505
- * @param public_key Client's public key.
4506
- * @param signature Ed25519 signature of a raw transaction.
4507
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4508
- * for details about generating a signature.
4509
- */
4510
- declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
4511
- readonly public_key: Ed25519PublicKey;
4512
- readonly signature: Ed25519Signature;
4513
- constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
4514
- serialize(serializer: Serializer): void;
4515
- static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
4516
- }
4517
- /**
4518
- * Transaction authenticator Ed25519 for a multi signers transaction
4519
- *
4520
- * @param public_key Client's public key.
4521
- * @param signature Multi Ed25519 signature of a raw transaction.
4522
- *
4523
- */
4524
- declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
4525
- readonly public_key: MultiEd25519PublicKey;
4526
- readonly signature: MultiEd25519Signature;
4527
- constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
4528
- serialize(serializer: Serializer): void;
4529
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
4530
- }
4531
- /**
4532
- * Transaction authenticator for a multi-agent transaction
4533
- *
4534
- * @param sender Sender account authenticator
4535
- * @param secondary_signer_addresses Secondary signers address
4536
- * @param secondary_signers Secondary signers account authenticators
4537
- *
4538
- */
4539
- declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
4540
- readonly sender: AccountAuthenticator;
4541
- readonly secondary_signer_addresses: Array<AccountAddress>;
4542
- readonly secondary_signers: Array<AccountAuthenticator>;
4543
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
4544
- serialize(serializer: Serializer): void;
4545
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4546
- }
4547
- /**
4548
- * Transaction authenticator for a fee payer transaction
4549
- *
4550
- * @param sender Sender account authenticator
4551
- * @param secondary_signer_addresses Secondary signers address
4552
- * @param secondary_signers Secondary signers account authenticators
4553
- * @param fee_payer Object of the fee payer account address and the fee payer authentication
4554
- *
4555
- */
4556
- declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
4557
- readonly sender: AccountAuthenticator;
4558
- readonly secondary_signer_addresses: Array<AccountAddress>;
4559
- readonly secondary_signers: Array<AccountAuthenticator>;
4560
- readonly fee_payer: {
4561
- address: AccountAddress;
4562
- authenticator: AccountAuthenticator;
4563
- };
4564
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
4565
- address: AccountAddress;
4566
- authenticator: AccountAuthenticator;
4567
- });
4568
- serialize(serializer: Serializer): void;
4569
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4570
- }
4571
- /**
4572
- * Single Sender authenticator for a single signer transaction
4573
- *
4574
- * @param sender AccountAuthenticator
4575
- */
4576
- declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
4577
- readonly sender: AccountAuthenticator;
4578
- constructor(sender: AccountAuthenticator);
4579
- serialize(serializer: Serializer): void;
4580
- static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
4581
- }
4582
-
4583
- declare class SignedTransaction extends Serializable {
4584
- readonly raw_txn: RawTransaction;
4585
- readonly authenticator: TransactionAuthenticator;
4586
- /**
4587
- * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
4588
- * contains a client's public key and the signature of the raw transaction.
4589
- *
4590
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4591
- *
4592
- * @param raw_txn
4593
- * @param authenticator Contains a client's public key and the signature of the raw transaction.
4594
- * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
4595
- * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
4596
- */
4597
- constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
4598
- serialize(serializer: Serializer): void;
4599
- static deserialize(deserializer: Deserializer): SignedTransaction;
4600
- }
4601
-
4602
- /**
4603
- * Representation of a SimpleTransaction that can serialized and deserialized
4604
- */
4605
- declare class SimpleTransaction extends Serializable {
4606
- rawTransaction: RawTransaction;
4607
- feePayerAddress?: AccountAddress | undefined;
4608
- readonly secondarySignerAddresses: undefined;
4609
- /**
4610
- * SimpleTransaction represents a simple transaction type of a single signer that
4611
- * can be submitted to Aptos chain for execution.
4612
- *
4613
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4614
- * sponsor Account Address to pay the gas fees.
4262
+ * Queries for all collections that an account currently has tokens for.
4615
4263
  *
4616
- * @param rawTransaction The Raw Tranasaction
4617
- * @param feePayerAddress The sponsor Account Address
4618
- */
4619
- constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
4620
- serialize(serializer: Serializer): void;
4621
- static deserialize(deserializer: Deserializer): SimpleTransaction;
4622
- }
4623
-
4624
- /**
4625
- * Representation of a Raw Transaction that can serialized and deserialized
4626
- */
4627
- declare class MultiAgentTransaction extends Serializable {
4628
- rawTransaction: RawTransaction;
4629
- feePayerAddress?: AccountAddress | undefined;
4630
- secondarySignerAddresses: AccountAddress[];
4631
- /**
4632
- * SimpleTransaction represents a simple transaction type of a single signer that
4633
- * can be submitted to Aptos chain for execution.
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
4634
4266
  *
4635
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4636
- * sponsor Account Address to pay the gas fees.
4267
+ * @example
4268
+ * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
4637
4269
  *
4638
- * @param rawTransaction The Raw Tranasaction
4639
- * @param feePayerAddress The sponsor Account Address
4640
- */
4641
- constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
4642
- serialize(serializer: Serializer): void;
4643
- static deserialize(deserializer: Deserializer): MultiAgentTransaction;
4644
- }
4645
-
4646
- /**
4647
- * Entry function arguments to be used when building a raw transaction using remote ABI
4648
- */
4649
- type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
4650
- /**
4651
- * Entry function arguments to be used when building a raw transaction using BCS serialized arguments
4652
- */
4653
- type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
4654
- /**
4655
- * Script function arguments to be used when building a raw transaction using BCS serialized arguments
4656
- */
4657
- type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
4658
- /**
4659
- * Type that holds all raw transaction instances Aptos SDK supports
4660
- */
4661
- type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
4662
- /**
4663
- * Optional options to set when generating a transaction
4664
- */
4665
- type InputGenerateTransactionOptions = {
4666
- maxGasAmount?: number;
4667
- gasUnitPrice?: number;
4668
- expireTimestamp?: number;
4669
- accountSequenceNumber?: AnyNumber;
4670
- };
4671
- /**
4672
- * The generated transaction payload type that was produces from `generateTransactionPayload()` function.
4673
- */
4674
- type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
4675
- /**
4676
- * Unified type for the data needed to generate a transaction payload of types:
4677
- * Entry Function | Script | Multi Sig
4678
- */
4679
- type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
4680
- type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
4681
- /**
4682
- * The data needed to generate an Entry Function payload
4683
- */
4684
- type InputEntryFunctionData = {
4685
- function: MoveFunctionId;
4686
- typeArguments?: Array<TypeTag | string>;
4687
- functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
4688
- abi?: EntryFunctionABI;
4689
- };
4690
- type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
4691
- type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
4692
- abi: EntryFunctionABI;
4693
- };
4694
- type InputMultiSigDataWithABI = {
4695
- multisigAddress: AccountAddressInput;
4696
- } & InputEntryFunctionDataWithABI;
4697
- type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
4698
- aptosConfig: AptosConfig;
4699
- };
4700
- /**
4701
- * The data needed to generate a Multi Sig payload
4702
- */
4703
- type InputMultiSigData = {
4704
- multisigAddress: AccountAddressInput;
4705
- } & InputEntryFunctionData;
4706
- /**
4707
- * The data needed to generate a Multi Sig payload
4708
- */
4709
- type InputMultiSigDataWithRemoteABI = {
4710
- multisigAddress: AccountAddressInput;
4711
- } & InputEntryFunctionDataWithRemoteABI;
4712
- /**
4713
- * The data needed to generate a Script payload
4714
- */
4715
- type InputScriptData = {
4716
- bytecode: HexInput;
4717
- typeArguments?: Array<TypeTag>;
4718
- functionArguments: Array<ScriptFunctionArgumentTypes>;
4719
- };
4720
- /**
4721
- * The data needed to generate a View Function payload
4722
- */
4723
- type InputViewFunctionData = {
4724
- function: MoveFunctionId;
4725
- typeArguments?: Array<TypeTag | string>;
4726
- functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
4727
- abi?: ViewFunctionABI;
4728
- };
4729
- /**
4730
- * Data needed to generate a view function payload and fetch the remote ABI
4731
- */
4732
- type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
4733
- aptosConfig: AptosConfig;
4734
- };
4735
- /**
4736
- * Data needed to generate a view function, with an already fetched ABI
4737
- */
4738
- type InputViewFunctionDataWithABI = InputViewFunctionData & {
4739
- abi: ViewFunctionABI;
4740
- };
4741
- /**
4742
- * Data need for a generic function ABI, both view and entry
4743
- */
4744
- type FunctionABI = {
4745
- typeParameters: Array<MoveFunctionGenericTypeParam>;
4746
- parameters: Array<TypeTag>;
4747
- };
4748
- /**
4749
- * Interface of an Entry function's ABI.
4750
- *
4751
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
4752
- */
4753
- type EntryFunctionABI = FunctionABI & {
4754
- signers?: number;
4755
- };
4756
- /**
4757
- * Interface of an View function's ABI.
4758
- *
4759
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
4760
- */
4761
- type ViewFunctionABI = FunctionABI & {
4762
- returnTypes: Array<TypeTag>;
4763
- };
4764
- /**
4765
- * Interface of the arguments to generate a single signer transaction.
4766
- * Used to provide to `generateTransaction()` method in the transaction builder flow
4767
- */
4768
- interface InputGenerateSingleSignerRawTransactionArgs {
4769
- aptosConfig: AptosConfig;
4770
- sender: AccountAddressInput;
4771
- payload: AnyTransactionPayloadInstance;
4772
- options?: InputGenerateTransactionOptions;
4773
- feePayerAddress?: AccountAddressInput;
4774
- }
4775
- /**
4776
- * Interface of the arguments to generate a multi-agent transaction.
4777
- * Used to provide to `generateTransaction()` method in the transaction builder flow
4778
- */
4779
- interface InputGenerateMultiAgentRawTransactionArgs {
4780
- aptosConfig: AptosConfig;
4781
- sender: AccountAddressInput;
4782
- payload: AnyTransactionPayloadInstance;
4783
- secondarySignerAddresses: AccountAddressInput[];
4784
- options?: InputGenerateTransactionOptions;
4785
- feePayerAddress?: AccountAddressInput;
4786
- }
4787
- /**
4788
- * Unified type that holds all the interfaces to generate different transaction types
4789
- */
4790
- type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
4791
- /**
4792
- * Unified type that holds all the return interfaces when generating different transaction types
4793
- */
4794
- type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
4795
- type InputSimulateTransactionData = {
4796
- /**
4797
- * The transaction to simulate, probably generated by `generateTransaction()`
4798
- */
4799
- transaction: AnyRawTransaction;
4800
- /**
4801
- * For a single signer transaction
4802
- */
4803
- signerPublicKey: PublicKey;
4804
- /**
4805
- * For a fee payer or multi-agent transaction that requires additional signers in
4806
- */
4807
- secondarySignersPublicKeys?: Array<PublicKey>;
4808
- /**
4809
- * For a fee payer transaction (aka Sponsored Transaction)
4810
- */
4811
- feePayerPublicKey?: PublicKey;
4812
- options?: InputSimulateTransactionOptions;
4813
- };
4814
- type InputSimulateTransactionOptions = {
4815
- estimateGasUnitPrice?: boolean;
4816
- estimateMaxGasAmount?: boolean;
4817
- estimatePrioritizedGasUnitPrice?: boolean;
4818
- };
4819
- /**
4820
- * Interface that holds the user data input when generating a single signer transaction
4821
- */
4822
- interface InputGenerateSingleSignerRawTransactionData {
4823
- sender: AccountAddressInput;
4824
- data: InputGenerateTransactionPayloadData;
4825
- options?: InputGenerateTransactionOptions;
4826
- withFeePayer?: boolean;
4827
- secondarySignerAddresses?: undefined;
4828
- }
4829
- /**
4830
- * Interface that holds the user data input when generating a multi-agent transaction
4831
- */
4832
- interface InputGenerateMultiAgentRawTransactionData {
4833
- sender: AccountAddressInput;
4834
- data: InputGenerateTransactionPayloadData;
4835
- secondarySignerAddresses: AccountAddressInput[];
4836
- options?: InputGenerateTransactionOptions;
4837
- withFeePayer?: boolean;
4838
- }
4839
- /**
4840
- * Unified type that holds all the user data input interfaces when generating different transaction types
4841
- */
4842
- type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
4843
- /**
4844
- * Interface that holds the user data input when submitting a transaction
4845
- */
4846
- interface InputSubmitTransactionData {
4847
- transaction: AnyRawTransaction;
4848
- senderAuthenticator: AccountAuthenticator;
4849
- feePayerAuthenticator?: AccountAuthenticator;
4850
- additionalSignersAuthenticators?: Array<AccountAuthenticator>;
4851
- }
4852
-
4853
- interface SingleKeySignerConstructorArgs {
4854
- privateKey: PrivateKey;
4855
- address?: AccountAddressInput;
4856
- }
4857
- interface SingleKeySignerGenerateArgs {
4858
- scheme?: SigningSchemeInput;
4859
- }
4860
- type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
4861
- path: string;
4862
- mnemonic: string;
4863
- };
4864
- interface VerifySingleKeySignatureArgs {
4865
- message: HexInput;
4866
- signature: AnySignature;
4867
- }
4868
- /**
4869
- * Signer implementation for the SingleKey authentication scheme.
4870
- * This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
4871
- * Currently, the only supported signature schemes are Ed25519 and Secp256k1.
4872
- *
4873
- * Note: Generating a signer instance does not create the account on-chain.
4874
- */
4875
- declare class SingleKeyAccount implements Account$1 {
4876
- /**
4877
- * Private key associated with the account
4878
- */
4879
- readonly privateKey: PrivateKey;
4880
- readonly publicKey: AnyPublicKey;
4881
- readonly accountAddress: AccountAddress;
4882
- readonly signingScheme = SigningScheme.SingleKey;
4883
- constructor(args: SingleKeySignerConstructorArgs);
4884
- /**
4885
- * Derives an account from a randomly generated private key.
4886
- * Default generation is using an Ed25519 key
4887
- * @returns Account with the given signature scheme
4888
- */
4889
- static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
4890
- /**
4891
- * Derives an account with bip44 path and mnemonics,
4892
- * Default to using an Ed25519 signature scheme.
4893
- *
4894
- * @param args.scheme The signature scheme to derive the private key with
4895
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
4896
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
4897
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
4898
- * @param args.mnemonic the mnemonic seed phrase of the account
4899
- */
4900
- static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
4901
- verifySignature(args: VerifySingleKeySignatureArgs): boolean;
4902
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
4903
- sign(message: HexInput): Signature;
4904
- signTransaction(transaction: AnyRawTransaction): Signature;
4905
- }
4906
-
4907
- /**
4908
- * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
4909
- * This is the default input type when passing an `Ed25519PrivateKey`.
4910
- * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
4911
- */
4912
- interface CreateEd25519AccountFromPrivateKeyArgs {
4913
- privateKey: Ed25519PrivateKey;
4914
- address?: AccountAddressInput;
4915
- legacy?: true;
4916
- }
4917
- /**
4918
- * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
4919
- * The `legacy` argument needs to be explicitly set to false in order to
4920
- * use the `SingleKey` authentication scheme.
4921
- */
4922
- interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
4923
- privateKey: Ed25519PrivateKey;
4924
- address?: AccountAddressInput;
4925
- legacy: false;
4926
- }
4927
- /**
4928
- * Arguments for creating an `SingleKeyAccount` from any supported private key
4929
- * that is not an `Ed25519PrivateKey`.
4930
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
4931
- */
4932
- interface CreateSingleKeyAccountFromPrivateKeyArgs {
4933
- privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
4934
- address?: AccountAddressInput;
4935
- legacy?: false;
4936
- }
4937
- /**
4938
- * Arguments for creating an opaque `Account` from any supported private key.
4939
- * This is used when the private key type is not known at compilation time.
4940
- */
4941
- interface CreateAccountFromPrivateKeyArgs {
4942
- privateKey: PrivateKey;
4943
- address?: AccountAddressInput;
4944
- legacy?: boolean;
4945
- }
4946
- /**
4947
- * Arguments for generating an `Ed25519Account`.
4948
- * This is the input type used by default.
4949
- */
4950
- interface GenerateEd25519AccountArgs {
4951
- scheme?: SigningSchemeInput.Ed25519;
4952
- legacy?: true;
4953
- }
4954
- /**
4955
- * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
4956
- * The `legacy` argument needs to be explicitly set to false,
4957
- * otherwise an `Ed25519Account` will be returned instead.
4958
- */
4959
- interface GenerateEd25519SingleKeyAccountArgs {
4960
- scheme?: SigningSchemeInput.Ed25519;
4961
- legacy: false;
4962
- }
4963
- /**
4964
- * Arguments for generating an `SingleKeyAccount` with any supported private key
4965
- * that is not an `Ed25519PrivateKey`.
4966
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
4967
- */
4968
- interface GenerateSingleKeyAccountArgs {
4969
- scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
4970
- legacy?: false;
4971
- }
4972
- /**
4973
- * Arguments for generating an opaque `Account`.
4974
- * This is used when the input signature scheme is not known at compilation time.
4975
- */
4976
- interface GenerateAccountArgs {
4977
- scheme?: SigningSchemeInput;
4978
- legacy?: boolean;
4979
- }
4980
- /**
4981
- * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
4982
- */
4983
- interface PrivateKeyFromDerivationPathArgs {
4984
- path: string;
4985
- mnemonic: string;
4986
- }
4987
- /**
4988
- * Interface for a generic Aptos account.
4989
- *
4990
- * The interface is defined as abstract class to provide a single entrypoint for account generation,
4991
- * either through `Account.generate()` or `Account.fromDerivationPath`.
4992
- * Despite this being an abstract class, it should be treated as an interface and enforced using
4993
- * the `implements` keyword.
4994
- *
4995
- * Note: Generating an account instance does not create the account on-chain.
4996
- */
4997
- declare abstract class Account$1 {
4998
- /**
4999
- * Public key associated with the account
5000
- */
5001
- abstract readonly publicKey: AccountPublicKey;
5002
- /**
5003
- * Account address associated with the account
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
5004
4277
  */
5005
- abstract readonly accountAddress: AccountAddress;
4278
+ getAccountCollectionsWithOwnedTokens(args: {
4279
+ accountAddress: AccountAddressInput;
4280
+ minimumLedgerVersion?: AnyNumber;
4281
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
4282
+ }): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
5006
4283
  /**
5007
- * 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
5008
4292
  */
5009
- abstract signingScheme: SigningScheme;
4293
+ getAccountTransactionsCount(args: {
4294
+ accountAddress: AccountAddressInput;
4295
+ minimumLedgerVersion?: AnyNumber;
4296
+ }): Promise<number>;
5010
4297
  /**
5011
- * Derives an account from a randomly generated private key.
5012
- * @param args.scheme The signature scheme to use, to generate the private key
5013
- * @param args.legacy Whether to use a legacy authentication scheme, when applicable
5014
- * @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
5015
4310
  */
5016
- static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
5017
- static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
5018
- static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
5019
- 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>;
5020
4316
  /**
5021
- * Creates an account from the provided private key.
4317
+ * Queries the current count of an account's coins aggregated
5022
4318
  *
5023
- * @param args.privateKey a valid private key
5024
- * @param args.address the account's address. If not provided, it will be derived from the public key.
5025
- * @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
5026
4325
  */
5027
- static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
5028
- static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
5029
- static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
5030
- static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
4326
+ getAccountCoinsCount(args: {
4327
+ accountAddress: AccountAddressInput;
4328
+ minimumLedgerVersion?: AnyNumber;
4329
+ }): Promise<number>;
5031
4330
  /**
5032
- * @deprecated use `fromPrivateKey` instead.
5033
- * Instantiates an account given a private key and a specified account address.
5034
- * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
4331
+ * Queries the account's APT amount
5035
4332
  *
5036
- * @param args.privateKey PrivateKey - the underlying private key for the account
5037
- * @param args.address AccountAddress - The account address the `Account` will sign for
5038
- * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
5039
- * to generating a Legacy Ed25519 keypair
4333
+ * @example
4334
+ * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
5040
4335
  *
5041
- * @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
5042
4339
  */
5043
- static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
4340
+ getAccountAPTAmount(args: {
4341
+ accountAddress: AccountAddressInput;
4342
+ minimumLedgerVersion?: AnyNumber;
4343
+ }): Promise<number>;
5044
4344
  /**
5045
- * Derives an account with bip44 path and mnemonics
4345
+ * Queries the account's coin amount by the coin type
5046
4346
  *
5047
- * @param args.scheme The signature scheme to derive the private key with
5048
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
5049
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
5050
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
5051
- * @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
5052
4354
  */
5053
- static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
5054
- static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
5055
- static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
5056
- static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
4355
+ getAccountCoinAmount(args: {
4356
+ accountAddress: AccountAddressInput;
4357
+ coinType: MoveStructId;
4358
+ minimumLedgerVersion?: AnyNumber;
4359
+ }): Promise<number>;
5057
4360
  /**
5058
- * @deprecated use `publicKey.authKey()` instead.
5059
- * This key enables account owners to rotate their private key(s)
5060
- * associated with the account without changing the address that hosts their account.
5061
- * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
4361
+ * Queries an account's owned objects
5062
4362
  *
5063
- * @param args.publicKey PublicKey - public key of the account
5064
- * @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
5065
4372
  */
5066
- static authKey(args: {
5067
- publicKey: AccountPublicKey;
5068
- }): AuthenticationKey;
4373
+ getAccountOwnedObjects(args: {
4374
+ accountAddress: AccountAddressInput;
4375
+ minimumLedgerVersion?: AnyNumber;
4376
+ options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
4377
+ }): Promise<GetAccountOwnedObjectsResponse>;
5069
4378
  /**
5070
- * Sign a transaction using the available signing capabilities.
5071
- * @param transaction the raw transaction
5072
- * @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
5073
4394
  */
5074
- 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;
5075
4429
  /**
5076
- * Sign the given message with the private key.
5077
- * @param message in HexInput format
5078
- * @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"
5079
4433
  */
5080
- abstract sign(message: HexInput): Signature;
5081
- abstract signTransaction(transaction: AnyRawTransaction): Signature;
4434
+ constructor(address: AccountAddress, name: Identifier);
5082
4435
  /**
5083
- * @param args.message raw message data in HexInput format
5084
- * @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
5085
4439
  */
5086
- verifySignature(args: VerifySignatureArgs): boolean;
4440
+ static fromStr(moduleId: MoveModuleId): ModuleId;
4441
+ serialize(serializer: Serializer): void;
4442
+ static deserialize(deserializer: Deserializer): ModuleId;
5087
4443
  }
5088
4444
 
5089
- interface Ed25519SignerConstructorArgs {
5090
- privateKey: Ed25519PrivateKey;
5091
- 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;
5092
4496
  }
5093
- interface Ed25519SignerFromDerivationPathArgs {
5094
- path: string;
5095
- mnemonic: string;
4497
+ declare class TypeTagAddress extends TypeTag {
4498
+ toString(): string;
4499
+ serialize(serializer: Serializer): void;
4500
+ static load(_deserializer: Deserializer): TypeTagAddress;
5096
4501
  }
5097
- interface VerifyEd25519SignatureArgs {
5098
- message: HexInput;
5099
- 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;
5100
4513
  }
5101
4514
  /**
5102
- * Signer implementation for the Ed25519 authentication scheme.
5103
- * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
5104
- *
5105
- * 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.
5106
4518
  */
5107
- declare class Ed25519Account implements Account$1 {
5108
- /**
5109
- * Private key associated with the account
5110
- */
5111
- readonly privateKey: Ed25519PrivateKey;
5112
- readonly publicKey: Ed25519PublicKey;
5113
- readonly accountAddress: AccountAddress;
5114
- readonly signingScheme = SigningScheme.Ed25519;
5115
- constructor(args: Ed25519SignerConstructorArgs);
5116
- /**
5117
- * Derives a signer from a randomly generated private key
5118
- */
5119
- static generate(): Ed25519Account;
5120
- /**
5121
- * Derives an account with bip44 path and mnemonics
5122
- *
5123
- * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
5124
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
5125
- * @param args.mnemonic the mnemonic seed phrase of the account
5126
- */
5127
- static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
5128
- verifySignature(args: VerifyEd25519SignatureArgs): boolean;
5129
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519;
5130
- sign(message: HexInput): Ed25519Signature;
5131
- 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;
5132
4525
  }
5133
-
5134
- declare class EphemeralKeyPair {
5135
- readonly blinder: Uint8Array;
5136
- readonly expiryDateSecs: bigint;
5137
- readonly nonce: string;
5138
- readonly privateKey: PrivateKey;
5139
- readonly publicKey: EphemeralPublicKey;
5140
- constructor(args: {
5141
- privateKey: PrivateKey;
5142
- expiryDateSecs?: bigint;
5143
- blinder?: HexInput;
5144
- });
5145
- static generate(args?: {
5146
- scheme: SigningSchemeInput;
5147
- }): EphemeralKeyPair;
5148
- generateNonce(): string;
5149
- /**
5150
- * Sign the given message with the private key.
5151
- * *
5152
- * @param data in HexInput format
5153
- * @returns EphemeralSignature
5154
- */
5155
- sign(data: HexInput): EphemeralSignature;
4526
+ declare class TypeTagVector extends TypeTag {
4527
+ readonly value: TypeTag;
4528
+ toString(): `vector<${string}>`;
4529
+ constructor(value: TypeTag);
4530
+ static u8(): TypeTagVector;
4531
+ serialize(serializer: Serializer): void;
4532
+ static load(deserializer: Deserializer): TypeTagVector;
5156
4533
  }
5157
-
5158
- declare class KeylessAccount implements Account$1 {
5159
- static readonly PEPPER_LENGTH: number;
5160
- static readonly SLIP_0010_SEED: string;
5161
- static readonly APTOS_CONNECT_CLIENT_ID: string;
5162
- publicKey: KeylessPublicKey;
5163
- ephemeralKeyPair: EphemeralKeyPair;
5164
- uidKey: string;
5165
- uidVal: string;
5166
- aud: string;
5167
- pepper: Uint8Array;
5168
- accountAddress: AccountAddress;
5169
- proof: SignedGroth16Signature | Promise<SignedGroth16Signature>;
5170
- signingScheme: SigningScheme;
5171
- jwt: string;
5172
- constructor(args: {
5173
- address?: AccountAddress;
5174
- ephemeralKeyPair: EphemeralKeyPair;
5175
- iss: string;
5176
- uidKey: string;
5177
- uidVal: string;
5178
- aud: string;
5179
- pepper: HexInput;
5180
- proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;
5181
- jwt: string;
5182
- });
5183
- private initialize;
5184
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
5185
- waitForProofFetch(): Promise<void>;
5186
- sign(data: HexInput): Signature;
5187
- signTransaction(transaction: AnyRawTransaction): Signature;
5188
- signWithOpenIdSignature(data: HexInput): Signature;
5189
- deriveAptosConnectPublicKey(): KeylessPublicKey;
5190
- verifySignature(args: {
5191
- message: HexInput;
5192
- signature: Signature;
5193
- }): boolean;
5194
- static fromJWTAndProof(args: {
5195
- proofFetcherOrData: Promise<SignedGroth16Signature> | SignedGroth16Signature;
5196
- jwt: string;
5197
- ephemeralKeyPair: EphemeralKeyPair;
5198
- pepper: HexInput;
5199
- uidKey?: string;
5200
- }): KeylessAccount;
5201
- static fromDerivationPath(path: string, seed: Uint8Array): Uint8Array;
4534
+ declare class TypeTagStruct extends TypeTag {
4535
+ readonly value: StructTag;
4536
+ toString(): `0x${string}::${string}::${string}`;
4537
+ constructor(value: StructTag);
4538
+ serialize(serializer: Serializer): void;
4539
+ static load(deserializer: Deserializer): TypeTagStruct;
4540
+ isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
4541
+ isString(): boolean;
4542
+ isOption(): boolean;
4543
+ isObject(): boolean;
5202
4544
  }
5203
-
5204
- declare class MultiKeyAccount implements Account$1 {
5205
- /**
5206
- * Public key associated with the account
5207
- */
5208
- readonly publicKey: MultiKey;
5209
- /**
5210
- * Account address associated with the account
5211
- */
5212
- readonly accountAddress: AccountAddress;
5213
- /**
5214
- * Signing scheme used to sign transactions
5215
- */
5216
- readonly signingScheme: SigningScheme;
5217
- signers: Account$1[];
5218
- signaturesBitmap: Uint8Array;
5219
- /**
5220
- * constructor for Account
5221
- *
5222
- * Need to update this to use the new crypto library if new schemes are added.
5223
- *
5224
- * @param args.privateKey PrivateKey - private key of the account
5225
- * @param args.address AccountAddress - address of the account
5226
- * @param args.legacy optional. If set to false, the keypair authentication keys will be derived with a unified scheme.
5227
- * Defaults to deriving an authentication key with the legacy scheme.
5228
- *
5229
- * This method is private because it should only be called by the factory static methods.
5230
- * @returns Account
5231
- */
5232
- constructor(args: {
5233
- multiKey: MultiKey;
5234
- signers: Account$1[];
5235
- });
5236
- static fromPublicKeysAndSigners(args: {
5237
- publicKeys: PublicKey[];
5238
- signaturesRequired: number;
5239
- signers: Account$1[];
5240
- }): MultiKeyAccount;
5241
- static isMultiKeySigner(account: Account$1): account is MultiKeyAccount;
5242
- signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorMultiKey;
5243
- waitForProofFetch(): Promise<void>;
5244
- /**
5245
- * Sign the given message with the private key.
5246
- *
5247
- * TODO: Add sign transaction or specific types
5248
- *
5249
- * @param data in HexInput format
5250
- * @returns Signature
5251
- */
5252
- sign(data: HexInput): MultiSignature;
5253
- signTransaction(transaction: AnyRawTransaction): MultiSignature;
5254
- /**
5255
- * Verify the given message and signature with the public key.
5256
- *
5257
- * @param args.message raw message data in HexInput format
5258
- * @param args.signature signed message Signature
5259
- * @returns
5260
- */
5261
- verifySignature(args: {
5262
- message: HexInput;
5263
- signature: Signature;
5264
- }): 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;
5265
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;
5266
4558
 
5267
4559
  /**
5268
- * A class to query all `Account` related queries on Aptos.
4560
+ * Deserialize a Script Transaction Argument
5269
4561
  */
5270
- declare class Account {
5271
- readonly config: AptosConfig;
5272
- 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 {
5273
4568
  /**
5274
- * Queries the current state for an Aptos account given its account address
5275
- *
5276
- * @param args.accountAddress Aptos account address
5277
- *
5278
- * @returns The account data
5279
- *
5280
- * @example An example of the returned account
5281
- * ```
5282
- * {
5283
- * sequence_number: "1",
5284
- * authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
5285
- * }
5286
- * ```
4569
+ * Serialize a Transaction Payload
5287
4570
  */
5288
- getAccountInfo(args: {
5289
- accountAddress: AccountAddressInput;
5290
- }): Promise<AccountData>;
4571
+ abstract serialize(serializer: Serializer): void;
5291
4572
  /**
5292
- * Queries for all modules in an account given an account address
5293
- *
5294
- * Note: In order to get all account modules, this function may call the API
5295
- * multiple times as it auto paginates.
5296
- *
5297
- * @param args.accountAddress Aptos account address
5298
- * @param args.options.offset The number module to start returning results from
5299
- * @param args.options.limit The number of results to return
5300
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5301
- *
5302
- * @returns Account modules
4573
+ * Deserialize a Transaction Payload
5303
4574
  */
5304
- getAccountModules(args: {
5305
- accountAddress: AccountAddressInput;
5306
- options?: PaginationArgs & LedgerVersionArg;
5307
- }): 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>;
5308
4612
  /**
5309
- * Queries for a specific account module given account address and module name
5310
- *
5311
- * @param args.accountAddress Aptos account address
5312
- * @param args.moduleName The name of the module
5313
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5314
- *
5315
- * @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.
5316
4617
  *
5317
4618
  * @example
5318
- * const module = await aptos.getAccountModule({accountAddress:"0x456"})
5319
- * // An example of an account module response
4619
+ * A coin transfer function has one type argument "CoinType".
5320
4620
  * ```
5321
- * {
5322
- * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
5323
- * abi: { address: "0x1" }
5324
- * }
4621
+ * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
5325
4622
  * ```
5326
- */
5327
- getAccountModule(args: {
5328
- accountAddress: AccountAddressInput;
5329
- moduleName: string;
5330
- options?: LedgerVersionArg;
5331
- }): Promise<MoveModuleBytecode>;
5332
- /**
5333
- * Queries account transactions given an account address
5334
- *
5335
- * Note: In order to get all account transactions, this function may call the API
5336
- * multiple times as it auto paginates.
4623
+ * @param args arguments to the move function.
5337
4624
  *
5338
4625
  * @example
5339
- * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
5340
- *
5341
- * @param args.accountAddress Aptos account address
5342
- * @param args.options.offset The number transaction to start returning results from
5343
- * @param args.options.limit The number of results to return
5344
- *
5345
- * @returns The account transactions
5346
- */
5347
- getAccountTransactions(args: {
5348
- accountAddress: AccountAddressInput;
5349
- options?: PaginationArgs;
5350
- }): 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>);
5351
4632
  /**
5352
- * Queries all account resources given an account address
4633
+ * A helper function to build a EntryFunction payload from raw primitive values
5353
4634
  *
5354
- * Note: In order to get all account resources, this function may call the API
5355
- * 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.
5356
4638
  *
5357
4639
  * @example
5358
- * 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.
5359
4645
  *
5360
- * @param args.accountAddress Aptos account address
5361
- * @param args.options.offset The number resource to start returning results from
5362
- * @param args.options.limit The number of results to return
5363
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5364
- * @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
5365
4652
  */
5366
- getAccountResources(args: {
5367
- accountAddress: AccountAddressInput;
5368
- options?: PaginationArgs & LedgerVersionArg;
5369
- }): Promise<MoveResource[]>;
4653
+ static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4654
+ serialize(serializer: Serializer): void;
5370
4655
  /**
5371
- * Queries a specific account resource given account address and resource type. Note that the default is `any` in order
5372
- * 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
5373
4658
  *
5374
- * @type The typed output of the resource
5375
- * @param args.accountAddress Aptos account address
5376
- * @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
5377
- * @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.
5378
4662
  *
5379
- * @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.
5380
4665
  *
5381
- * @example
5382
- * 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.
5383
4671
  *
5384
4672
  */
5385
- getAccountResource<T extends {} = any>(args: {
5386
- accountAddress: AccountAddressInput;
5387
- resourceType: MoveStructId;
5388
- options?: LedgerVersionArg;
5389
- }): 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 {
5390
4679
  /**
5391
- * 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.
5392
4693
  *
5393
- * 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.
5394
4696
  *
5395
4697
  * @example
5396
- * 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.
5397
4703
  *
5398
- * @param args.authenticationKey The authentication key
5399
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5400
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
5401
- * @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
+ * ```
5402
4709
  */
5403
- lookupOriginalAccountAddress(args: {
5404
- authenticationKey: AccountAddressInput;
5405
- minimumLedgerVersion?: AnyNumber;
5406
- options?: LedgerVersionArg;
5407
- }): 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;
5408
4720
  /**
5409
- * Queries the current count of tokens owned by an account
4721
+ * Contains the payload to run a multi-sig account transaction.
5410
4722
  *
5411
- * @example
5412
- * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
4723
+ * @param multisig_address The multi-sig account address the transaction will be executed as.
5413
4724
  *
5414
- * @param args.accountAddress The account address
5415
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5416
- * @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.
5417
4727
  */
5418
- getAccountTokensCount(args: {
5419
- accountAddress: AccountAddressInput;
5420
- minimumLedgerVersion?: AnyNumber;
5421
- }): 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;
5422
4742
  /**
5423
- * Queries the account's current owned tokens.
5424
- *
5425
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5426
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5427
- *
5428
- * @example
5429
- * const accountOwnedTokens = await aptos.getAccountOwnedTokens({accountAddress:"0x456"})
4743
+ * Contains the payload to run a multi-sig account transaction.
5430
4744
  *
5431
- * @param args.accountAddress The account address we want to get the tokens for
5432
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5433
- * @param args.options.tokenStandard The NFT standard to query for
5434
- * @param args.options.offset The number token to start returning results from
5435
- * @param args.options.limit The number of results to return
5436
- * @param args.options.orderBy The order to sort the tokens by
5437
- * @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.
5438
4748
  */
5439
- getAccountOwnedTokens(args: {
5440
- accountAddress: AccountAddressInput;
5441
- minimumLedgerVersion?: AnyNumber;
5442
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
5443
- }): 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;
5444
4765
  /**
5445
- * Queries all current tokens of a specific collection that an account owns by the collection address
5446
- *
5447
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5448
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5449
- *
5450
- * @example
5451
- * 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.
5452
4768
  *
5453
- * @param args.accountAddress The account address we want to get the tokens for
5454
- * @param args.collectionAddress The address of the collection being queried
5455
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5456
- * @param args.options.tokenStandard The NFT standard to query for
5457
- * @param args.options.offset The number token to start returning results from
5458
- * @param args.options.limit The number of results to return
5459
- * @param args.options.orderBy The order to sort the tokens by
5460
- * @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.
5461
4779
  */
5462
- getAccountOwnedTokensFromCollectionAddress(args: {
5463
- accountAddress: AccountAddressInput;
5464
- collectionAddress: AccountAddressInput;
5465
- minimumLedgerVersion?: AnyNumber;
5466
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
5467
- }): 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>;
5468
4825
  /**
5469
- * Queries for all collections that an account currently has tokens for.
5470
- *
5471
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
5472
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
5473
- *
5474
- * @example
5475
- * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({accountAddress:"0x123"})
5476
- *
5477
- * @param args.accountAddress The account address we want to get the collections for
5478
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5479
- * @param args.options.tokenStandard The NFT standard to query for
5480
- * @param args.options.offset The number collection to start returning results from
5481
- * @param args.options.limit The number of results to return
5482
- * @param args.options.orderBy The order to sort the tokens by
5483
- * @returns Collections array with the collections data
4826
+ * The fee payer account address
5484
4827
  */
5485
- getAccountCollectionsWithOwnedTokens(args: {
5486
- accountAddress: AccountAddressInput;
5487
- minimumLedgerVersion?: AnyNumber;
5488
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
5489
- }): 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;
5490
4841
  /**
5491
- * 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.
5492
4844
  *
5493
- * @example
5494
- * 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.
5495
4847
  *
5496
- * @param args.accountAddress The account address we want to get the total count for
5497
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5498
- * @returns Current count of transactions made by an account
4848
+ * @param rawTransaction The Raw Tranasaction
4849
+ * @param feePayerAddress The sponsor Account Address
5499
4850
  */
5500
- getAccountTransactionsCount(args: {
5501
- accountAddress: AccountAddressInput;
5502
- minimumLedgerVersion?: AnyNumber;
5503
- }): 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;
5504
4965
  /**
5505
- * 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.
5506
4968
  *
5507
- * @example
5508
- * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
4969
+ * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
5509
4970
  *
5510
- * @param args.accountAddress The account address we want to get the coins data for
5511
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5512
- * @param args.options.offset optional. The number coin to start returning results from
5513
- * @param args.options.limit optional. The number of results to return
5514
- * @param args.options.orderBy optional. The order to sort the coins by
5515
- * @param args.options.where optional. Filter the results by
5516
- * @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.
5517
4975
  */
5518
- getAccountCoinsData(args: {
5519
- accountAddress: AccountAddressInput;
5520
- minimumLedgerVersion?: AnyNumber;
5521
- options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
5522
- }): 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[];
5523
4988
  /**
5524
- * 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.
5525
4991
  *
5526
- * @example
5527
- * 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.
5528
4994
  *
5529
- * @param args.accountAddress The account address we want to get the total count for
5530
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5531
- * @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
5532
4997
  */
5533
- getAccountCoinsCount(args: {
5534
- accountAddress: AccountAddressInput;
5535
- minimumLedgerVersion?: AnyNumber;
5536
- }): 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 = {
5537
5153
  /**
5538
- * Queries the account's APT amount
5539
- *
5540
- * @example
5541
- * const accountAPTAmount = await aptos.getAccountAPTAmount({accountAddress:"0x123"})
5542
- *
5543
- * @param args.accountAddress The account address we want to get the total count for
5544
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5545
- * @returns Current amount of account's APT
5154
+ * The transaction to simulate, probably generated by `generateTransaction()`
5546
5155
  */
5547
- getAccountAPTAmount(args: {
5548
- accountAddress: AccountAddressInput;
5549
- minimumLedgerVersion?: AnyNumber;
5550
- }): Promise<number>;
5156
+ transaction: AnyRawTransaction;
5551
5157
  /**
5552
- * Queries the account's coin amount by the coin type
5553
- *
5554
- * @example
5555
- * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
5556
- *
5557
- * @param args.accountAddress The account address we want to get the total count for
5558
- * @param args.coinType The coin type to query
5559
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5560
- * @returns Current amount of account's coin
5158
+ * For a single signer transaction
5561
5159
  */
5562
- getAccountCoinAmount(args: {
5563
- accountAddress: AccountAddressInput;
5564
- coinType: MoveStructId;
5565
- minimumLedgerVersion?: AnyNumber;
5566
- }): Promise<number>;
5160
+ signerPublicKey: PublicKey;
5567
5161
  /**
5568
- * Queries an account's owned objects
5569
- *
5570
- * @example
5571
- * const accountOwnedObjects = await aptos.getAccountOwnedObjects({accountAddress:"0x123"})
5572
- *
5573
- * @param args.accountAddress The account address we want to get the objects for
5574
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5575
- * @param args.options.offset The starting position to start returning results from
5576
- * @param args.options.limit The number of results to return
5577
- * @param args.options.orderBy The order to sort the objects by
5578
- * @returns Objects array with the object data
5162
+ * For a fee payer or multi-agent transaction that requires additional signers in
5579
5163
  */
5580
- getAccountOwnedObjects(args: {
5581
- accountAddress: AccountAddressInput;
5582
- minimumLedgerVersion?: AnyNumber;
5583
- options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
5584
- }): Promise<GetAccountOwnedObjectsResponse>;
5164
+ secondarySignersPublicKeys?: Array<PublicKey>;
5585
5165
  /**
5586
- * Derives an account by providing a private key.
5587
- * This functions resolves the provided private key type and derives the public key from it.
5588
- *
5589
- * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
5590
- * auth key using the SingleKey scheme locally.
5591
- *
5592
- * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
5593
- * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
5594
- * on that.
5595
- *
5596
- * @example
5597
- * const account = await aptos.deriveAccountFromPrivateKey({privateKey:new Ed25519PrivateKey("0x123")})
5598
- *
5599
- * @param args.privateKey An account private key
5600
- * @returns Account type
5166
+ * For a fee payer transaction (aka Sponsored Transaction)
5601
5167
  */
5602
- deriveAccountFromPrivateKey(args: {
5603
- privateKey: PrivateKey;
5604
- }): 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>;
5605
5208
  }
5606
5209
 
5607
5210
  /**
@@ -6389,6 +5992,18 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
6389
5992
  */
6390
5993
  declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
6391
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;
6392
6007
  /**
6393
6008
  * Prepare a transaction to be submitted to chain
6394
6009
  *
@@ -6409,6 +6024,14 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
6409
6024
  * @param args InputSubmitTransactionData
6410
6025
  */
6411
6026
  declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
6027
+ /**
6028
+ * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
6029
+ *
6030
+ * @param transaction A aptos transaction type
6031
+ *
6032
+ * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
6033
+ */
6034
+ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
6412
6035
  /**
6413
6036
  * Generate a multi signers signed transaction that can be submitted to chain
6414
6037
  *
@@ -6419,6 +6042,7 @@ declare function generateUserTransactionHash(args: InputSubmitTransactionData):
6419
6042
  * @returns A SignedTransaction
6420
6043
  */
6421
6044
  declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
6045
+ declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
6422
6046
 
6423
6047
  /**
6424
6048
  * Convert type arguments to only type tags, allowing for string representations of type tags
@@ -6460,18 +6084,6 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
6460
6084
  declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
6461
6085
  declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
6462
6086
 
6463
- /**
6464
- * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
6465
- *
6466
- * @param transaction A aptos transaction type
6467
- *
6468
- * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
6469
- */
6470
- declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
6471
- declare function generateSigningMessage(bytes: Uint8Array, domainSeparator: string): Uint8Array;
6472
- declare function generateSigningMessageForSerializable(obj: Serializable): Uint8Array;
6473
- declare function generateSigningMessageForTransaction(transaction: AnyRawTransaction): Uint8Array;
6474
-
6475
6087
  declare enum TypeTagParserErrorType {
6476
6088
  InvalidTypeTag = "unknown type",
6477
6089
  UnexpectedGenericType = "unexpected generic type",
@@ -7775,40 +7387,6 @@ declare class Transaction {
7775
7387
  }): Promise<PendingTransactionResponse>;
7776
7388
  }
7777
7389
 
7778
- interface BaseDeriveKeylessAccountArgs {
7779
- jwt: string;
7780
- ephemeralKeyPair: EphemeralKeyPair;
7781
- uidKey?: string;
7782
- pepper?: HexInput;
7783
- extraFieldKey?: string;
7784
- fetchProofAsync?: boolean;
7785
- }
7786
- interface DeriveKeylessAccountArgs extends BaseDeriveKeylessAccountArgs {
7787
- disableConnect: true;
7788
- }
7789
- interface DeriveKeylessAccountWithConnectArgs extends BaseDeriveKeylessAccountArgs {
7790
- disableConnect?: boolean;
7791
- }
7792
- /**
7793
- * A class to query all `OIDB` related queries on Aptos.
7794
- */
7795
- declare class Keyless {
7796
- readonly config: AptosConfig;
7797
- constructor(config: AptosConfig);
7798
- /**
7799
- * TODO
7800
- *
7801
- * @param args.jwt jwt token
7802
- * @returns The pepper
7803
- */
7804
- getPepper(args: {
7805
- jwt: string;
7806
- ephemeralKeyPair: EphemeralKeyPair;
7807
- }): Promise<Uint8Array>;
7808
- deriveKeylessAccount(args: DeriveKeylessAccountArgs): Promise<KeylessAccount>;
7809
- deriveKeylessAccount(args: DeriveKeylessAccountWithConnectArgs): Promise<MultiKeyAccount>;
7810
- }
7811
-
7812
7390
  /**
7813
7391
  * This class is the main entry point into Aptos's
7814
7392
  * APIs and separates functionality into different namespaces.
@@ -7832,10 +7410,9 @@ declare class Aptos {
7832
7410
  readonly general: General;
7833
7411
  readonly staking: Staking;
7834
7412
  readonly transaction: Transaction;
7835
- readonly keyless: Keyless;
7836
7413
  constructor(settings?: AptosConfig);
7837
7414
  }
7838
- interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7415
+ interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7839
7416
  }
7840
7417
 
7841
7418
  /**
@@ -7934,7 +7511,6 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
7934
7511
  */
7935
7512
  declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
7936
7513
  declare function getAptosFullNode<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7937
- declare function getAptosPepperService<Req extends {}, Res extends {}>(options: GetAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7938
7514
  declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
7939
7515
 
7940
7516
  type PostRequestOptions = {
@@ -7986,7 +7562,5 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
7986
7562
  declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7987
7563
  declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7988
7564
  declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7989
- declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7990
- declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7991
7565
 
7992
- 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 };
7566
+ 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, 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, generateMultiSignersSignedTransaction, 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, objectStructTag, optionStructTag, outOfRangeErrorMessage, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, promiseFulfilledStatus, request, sign, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, validateNumberInRange };