@aptos-labs/ts-sdk 1.12.2 → 1.13.0-zeta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.d.ts +37 -0
  4. package/dist/common/cli/index.js +2 -0
  5. package/dist/common/cli/index.js.map +1 -0
  6. package/dist/common/index.d.ts +2133 -1399
  7. package/dist/common/index.js +26 -26
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/{Ed25519Account-DHqzsb8B.d.mts → Ed25519Account-hkKk3b4Z.d.mts} +12 -14
  10. package/dist/esm/account/Account.d.mts +34 -0
  11. package/dist/esm/account/Account.mjs +2 -0
  12. package/dist/esm/account/Ed25519Account.d.mts +34 -0
  13. package/dist/esm/account/Ed25519Account.mjs +2 -0
  14. package/dist/esm/account/EphemeralKeyPair.d.mts +42 -0
  15. package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
  16. package/dist/esm/account/KeylessAccount.d.mts +85 -0
  17. package/dist/esm/account/KeylessAccount.mjs +2 -0
  18. package/dist/esm/account/MultiKeyAccount.d.mts +99 -0
  19. package/dist/esm/account/MultiKeyAccount.mjs +2 -0
  20. package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
  21. package/dist/esm/account/SingleKeyAccount.mjs +2 -0
  22. package/dist/esm/account/index.d.mts +39 -0
  23. package/dist/esm/account/index.mjs +2 -0
  24. package/dist/esm/api/account.d.mts +62 -9
  25. package/dist/esm/api/account.mjs +1 -1
  26. package/dist/esm/api/ans.d.mts +20 -28
  27. package/dist/esm/api/ans.mjs +1 -1
  28. package/dist/esm/api/aptos.d.mts +20 -9
  29. package/dist/esm/api/aptos.mjs +1 -1
  30. package/dist/esm/api/aptosConfig.d.mts +24 -0
  31. package/dist/esm/api/aptosConfig.mjs +1 -1
  32. package/dist/esm/api/coin.d.mts +14 -7
  33. package/dist/esm/api/coin.mjs +1 -1
  34. package/dist/esm/api/digitalAsset.d.mts +149 -10
  35. package/dist/esm/api/digitalAsset.mjs +1 -1
  36. package/dist/esm/api/event.d.mts +13 -8
  37. package/dist/esm/api/event.mjs +1 -1
  38. package/dist/esm/api/faucet.d.mts +3 -0
  39. package/dist/esm/api/faucet.mjs +1 -1
  40. package/dist/esm/api/fungibleAsset.d.mts +36 -13
  41. package/dist/esm/api/fungibleAsset.mjs +1 -1
  42. package/dist/esm/api/general.d.mts +55 -32
  43. package/dist/esm/api/general.mjs +1 -1
  44. package/dist/esm/api/index.d.mts +15 -9
  45. package/dist/esm/api/index.mjs +1 -1
  46. package/dist/esm/api/keyless.d.mts +75 -0
  47. package/dist/esm/api/keyless.mjs +2 -0
  48. package/dist/esm/api/staking.d.mts +9 -0
  49. package/dist/esm/api/staking.mjs +1 -1
  50. package/dist/esm/api/transaction.d.mts +59 -16
  51. package/dist/esm/api/transaction.mjs +1 -1
  52. package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
  53. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  54. package/dist/esm/api/transactionSubmission/management.d.mts +9 -9
  55. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  56. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  57. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  58. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  59. package/dist/esm/api/transactionSubmission/simulate.d.mts +7 -7
  60. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  61. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  62. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  63. package/dist/esm/api/utils.mjs +1 -1
  64. package/dist/esm/bcs/index.mjs +1 -1
  65. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  66. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  67. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  68. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  69. package/dist/esm/bcs/serializer.d.mts +2 -0
  70. package/dist/esm/bcs/serializer.mjs +1 -1
  71. package/dist/esm/chunk-2HXKDHMA.mjs +2 -0
  72. package/dist/esm/chunk-2HXKDHMA.mjs.map +1 -0
  73. package/dist/esm/{chunk-IYSHHN5A.mjs → chunk-2I2XAOH7.mjs} +2 -2
  74. package/dist/esm/{chunk-5RUPEEIG.mjs → chunk-2PW2EHCH.mjs} +2 -2
  75. package/dist/esm/chunk-2PW2EHCH.mjs.map +1 -0
  76. package/dist/esm/{chunk-6ILDDGAX.mjs → chunk-2XIT7I5L.mjs} +2 -2
  77. package/dist/esm/chunk-3FVRXELT.mjs +2 -0
  78. package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-3VGX3TXH.mjs} +2 -2
  79. package/dist/esm/{chunk-Y2MYVQVT.mjs → chunk-45D3YXLT.mjs} +2 -2
  80. package/dist/esm/chunk-4FQ63Z6Y.mjs +2 -0
  81. package/dist/esm/chunk-4FQ63Z6Y.mjs.map +1 -0
  82. package/dist/esm/{chunk-OWXKKVWD.mjs → chunk-4QWFCYP2.mjs} +2 -2
  83. package/dist/esm/chunk-4QWFCYP2.mjs.map +1 -0
  84. package/dist/esm/{chunk-Q73VKL3A.mjs → chunk-5IM5TQN4.mjs} +2 -2
  85. package/dist/esm/{chunk-KS7UY4W5.mjs → chunk-67QYMEZE.mjs} +2 -2
  86. package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-6FBKUTGF.mjs} +2 -2
  87. package/dist/esm/chunk-6Q2GNDKL.mjs +2 -0
  88. package/dist/esm/chunk-6RBUXB5I.mjs +2 -0
  89. package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-6RBUXB5I.mjs.map} +1 -1
  90. package/dist/esm/{chunk-GQR35QW3.mjs → chunk-77MI5DFB.mjs} +2 -2
  91. package/dist/esm/chunk-77MI5DFB.mjs.map +1 -0
  92. package/dist/esm/{chunk-5EN52MUT.mjs → chunk-7STYQ5ZE.mjs} +2 -2
  93. package/dist/esm/chunk-7Z6DYLCA.mjs +1 -0
  94. package/dist/esm/{chunk-2EZJOBD2.mjs → chunk-ABBKCXG4.mjs} +2 -2
  95. package/dist/esm/chunk-ABBKCXG4.mjs.map +1 -0
  96. package/dist/esm/chunk-ACOL3VVP.mjs +2 -0
  97. package/dist/esm/chunk-ACOL3VVP.mjs.map +1 -0
  98. package/dist/esm/chunk-AFPBV2BQ.mjs +2 -0
  99. package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
  100. package/dist/esm/chunk-AQ4I7VVB.mjs +1 -0
  101. package/dist/esm/chunk-AQ4I7VVB.mjs.map +1 -0
  102. package/dist/esm/{chunk-IHPWATYH.mjs → chunk-AWMOLZCX.mjs} +2 -2
  103. package/dist/esm/chunk-AWMOLZCX.mjs.map +1 -0
  104. package/dist/esm/chunk-C3L4ETUF.mjs +2 -0
  105. package/dist/esm/chunk-CITY3EV2.mjs +2 -0
  106. package/dist/esm/chunk-CITY3EV2.mjs.map +1 -0
  107. package/dist/esm/chunk-COW5IGYC.mjs +2 -0
  108. package/dist/esm/chunk-CYA2GSRV.mjs +2 -0
  109. package/dist/esm/chunk-CYA2GSRV.mjs.map +1 -0
  110. package/dist/esm/{chunk-TTUXAKCV.mjs → chunk-CYWA4AJF.mjs} +2 -2
  111. package/dist/esm/{chunk-TVHLZDCO.mjs → chunk-DANNIPX2.mjs} +2 -2
  112. package/dist/esm/chunk-DANNIPX2.mjs.map +1 -0
  113. package/dist/esm/{chunk-V6FZ7WZH.mjs → chunk-E3YEX3FR.mjs} +2 -2
  114. package/dist/esm/{chunk-G56GPLTB.mjs → chunk-EB7AI4B4.mjs} +2 -2
  115. package/dist/esm/chunk-EMFDNUP2.mjs +2 -0
  116. package/dist/esm/chunk-EMFDNUP2.mjs.map +1 -0
  117. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  118. package/dist/esm/chunk-FCVWPGXD.mjs +2 -0
  119. package/dist/esm/chunk-FCVWPGXD.mjs.map +1 -0
  120. package/dist/esm/chunk-FLYEALDB.mjs +2 -0
  121. package/dist/esm/chunk-FLYEALDB.mjs.map +1 -0
  122. package/dist/esm/chunk-G7S2ZX5A.mjs +2 -0
  123. package/dist/esm/chunk-G7S2ZX5A.mjs.map +1 -0
  124. package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-HGZGTBA4.mjs} +2 -2
  125. package/dist/esm/{chunk-3AYBWD76.mjs → chunk-HJVGZBKN.mjs} +2 -2
  126. package/dist/esm/chunk-HJVGZBKN.mjs.map +1 -0
  127. package/dist/esm/{chunk-KXR3IUJ7.mjs → chunk-INYYKAXD.mjs} +2 -2
  128. package/dist/esm/chunk-J7YWDDUB.mjs +2 -0
  129. package/dist/esm/chunk-J7YWDDUB.mjs.map +1 -0
  130. package/dist/esm/chunk-JDD6TMHU.mjs +2 -0
  131. package/dist/esm/chunk-JDD6TMHU.mjs.map +1 -0
  132. package/dist/esm/chunk-JM3W7AQP.mjs +2 -0
  133. package/dist/esm/chunk-JM3W7AQP.mjs.map +1 -0
  134. package/dist/esm/{chunk-GKGTODGE.mjs → chunk-JNAI5UFZ.mjs} +2 -2
  135. package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
  136. package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
  137. package/dist/esm/chunk-KDTQD56P.mjs +2 -0
  138. package/dist/esm/{chunk-MXO53VAI.mjs.map → chunk-KDTQD56P.mjs.map} +1 -1
  139. package/dist/esm/{chunk-C7YANDB2.mjs → chunk-KOWGEMJZ.mjs} +2 -2
  140. package/dist/esm/chunk-KOWGEMJZ.mjs.map +1 -0
  141. package/dist/esm/chunk-KPAKF3K7.mjs +2 -0
  142. package/dist/esm/chunk-KPAKF3K7.mjs.map +1 -0
  143. package/dist/esm/{chunk-UEKKYJGA.mjs → chunk-KR3NQRBA.mjs} +2 -2
  144. package/dist/esm/chunk-KR3NQRBA.mjs.map +1 -0
  145. package/dist/esm/chunk-L4CV3DRL.mjs +2 -0
  146. package/dist/esm/chunk-L4CV3DRL.mjs.map +1 -0
  147. package/dist/esm/{chunk-LPB7SZHL.mjs → chunk-LFTWUMLK.mjs} +2 -2
  148. package/dist/esm/chunk-LPFIDI6C.mjs +2 -0
  149. package/dist/esm/chunk-LPFIDI6C.mjs.map +1 -0
  150. package/dist/esm/chunk-LVYKZS54.mjs +2 -0
  151. package/dist/esm/{chunk-CXR7MOBW.mjs.map → chunk-LVYKZS54.mjs.map} +1 -1
  152. package/dist/esm/chunk-MGOHPDX4.mjs +2 -0
  153. package/dist/esm/chunk-MLPJOS5C.mjs +2 -0
  154. package/dist/esm/chunk-MWUJCP27.mjs +2 -0
  155. package/dist/esm/{chunk-KLAYDUFD.mjs → chunk-MZGNUGEY.mjs} +2 -2
  156. package/dist/esm/chunk-MZGNUGEY.mjs.map +1 -0
  157. package/dist/esm/chunk-NNT3XRRO.mjs +2 -0
  158. package/dist/esm/chunk-NNT3XRRO.mjs.map +1 -0
  159. package/dist/esm/chunk-NUDRQTYI.mjs +2 -0
  160. package/dist/esm/chunk-NUR3TCTI.mjs +2 -0
  161. package/dist/esm/chunk-OOSPASLD.mjs +2 -0
  162. package/dist/esm/chunk-OOSPASLD.mjs.map +1 -0
  163. package/dist/esm/chunk-OVXWFD2N.mjs +2 -0
  164. package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-OVXWFD2N.mjs.map} +1 -1
  165. package/dist/esm/{chunk-MJPUASSD.mjs → chunk-PFFAQZHT.mjs} +2 -2
  166. package/dist/esm/chunk-PTIZKRON.mjs +2 -0
  167. package/dist/esm/chunk-PTIZKRON.mjs.map +1 -0
  168. package/dist/esm/chunk-QREYDZ5R.mjs +2 -0
  169. package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
  170. package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
  171. package/dist/esm/chunk-S5HG2QUD.mjs +2 -0
  172. package/dist/esm/chunk-S5HG2QUD.mjs.map +1 -0
  173. package/dist/esm/chunk-SHL6OAGA.mjs +2 -0
  174. package/dist/esm/chunk-SHL6OAGA.mjs.map +1 -0
  175. package/dist/esm/chunk-SKXGYGDX.mjs +2 -0
  176. package/dist/esm/chunk-SKXGYGDX.mjs.map +1 -0
  177. package/dist/esm/chunk-STYDBDYL.mjs +2 -0
  178. package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-T23OVRNF.mjs} +2 -2
  179. package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-T23OVRNF.mjs.map} +1 -1
  180. package/dist/esm/chunk-T47T7HX4.mjs +2 -0
  181. package/dist/esm/chunk-T47T7HX4.mjs.map +1 -0
  182. package/dist/esm/chunk-TB2KXA2B.mjs +2 -0
  183. package/dist/esm/chunk-TB2KXA2B.mjs.map +1 -0
  184. package/dist/esm/{chunk-EKR6HLSN.mjs → chunk-THVGZXKD.mjs} +2 -2
  185. package/dist/esm/chunk-THVGZXKD.mjs.map +1 -0
  186. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  187. package/dist/esm/chunk-TJTZVCPS.mjs +2 -0
  188. package/dist/esm/chunk-TJTZVCPS.mjs.map +1 -0
  189. package/dist/esm/chunk-TR6Q7RSZ.mjs +2 -0
  190. package/dist/esm/chunk-TR6Q7RSZ.mjs.map +1 -0
  191. package/dist/esm/{chunk-36QXVFR5.mjs → chunk-TVRJ3M7B.mjs} +2 -2
  192. package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
  193. package/dist/esm/chunk-U7AY6CMF.mjs +2 -0
  194. package/dist/esm/chunk-U7AY6CMF.mjs.map +1 -0
  195. package/dist/esm/{chunk-WHA7RISE.mjs → chunk-UYMZF37A.mjs} +2 -2
  196. package/dist/esm/chunk-VHC2KC7B.mjs +2 -0
  197. package/dist/esm/chunk-VHC2KC7B.mjs.map +1 -0
  198. package/dist/esm/chunk-VHCJCXVZ.mjs +2 -0
  199. package/dist/esm/chunk-VHCJCXVZ.mjs.map +1 -0
  200. package/dist/esm/chunk-VVGV4S24.mjs +2 -0
  201. package/dist/esm/chunk-VVGV4S24.mjs.map +1 -0
  202. package/dist/esm/{chunk-6APZ5TPE.mjs → chunk-W2R2FURG.mjs} +2 -2
  203. package/dist/esm/chunk-W2R2FURG.mjs.map +1 -0
  204. package/dist/esm/chunk-W57M6DIK.mjs +2 -0
  205. package/dist/esm/chunk-WRY7462X.mjs +2 -0
  206. package/dist/esm/chunk-WRY7462X.mjs.map +1 -0
  207. package/dist/esm/chunk-X5XBBEVT.mjs +2 -0
  208. package/dist/esm/chunk-X5XBBEVT.mjs.map +1 -0
  209. package/dist/esm/{chunk-XDXI3TRT.mjs → chunk-XBQEFZD7.mjs} +2 -2
  210. package/dist/esm/{chunk-U43KR4TW.mjs → chunk-Y5ZK4UII.mjs} +2 -2
  211. package/dist/esm/chunk-Y5ZK4UII.mjs.map +1 -0
  212. package/dist/esm/chunk-YP3RMVL3.mjs +2 -0
  213. package/dist/esm/chunk-YP3RMVL3.mjs.map +1 -0
  214. package/dist/esm/{chunk-35EWRSDK.mjs → chunk-ZNEBMSNC.mjs} +2 -2
  215. package/dist/esm/client/core.mjs +1 -1
  216. package/dist/esm/client/get.d.mts +2 -1
  217. package/dist/esm/client/get.mjs +1 -1
  218. package/dist/esm/client/index.d.mts +2 -2
  219. package/dist/esm/client/index.mjs +1 -1
  220. package/dist/esm/client/post.d.mts +3 -1
  221. package/dist/esm/client/post.mjs +1 -1
  222. package/dist/esm/client/types.mjs +1 -1
  223. package/dist/esm/core/account/utils/address.mjs +1 -1
  224. package/dist/esm/core/account/utils/index.mjs +1 -1
  225. package/dist/esm/core/accountAddress.mjs +1 -1
  226. package/dist/esm/core/authenticationKey.d.mts +1 -1
  227. package/dist/esm/core/authenticationKey.mjs +1 -1
  228. package/dist/esm/core/common.mjs +1 -1
  229. package/dist/esm/core/crypto/ed25519.d.mts +9 -12
  230. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  231. package/dist/esm/core/crypto/ephemeral.d.mts +76 -0
  232. package/dist/esm/core/crypto/ephemeral.mjs +2 -0
  233. package/dist/esm/core/crypto/ephemeral.mjs.map +1 -0
  234. package/dist/esm/core/crypto/hdKey.d.mts +15 -1
  235. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  236. package/dist/esm/core/crypto/index.d.mts +8 -6
  237. package/dist/esm/core/crypto/index.mjs +1 -1
  238. package/dist/esm/core/crypto/keyless.d.mts +217 -0
  239. package/dist/esm/core/crypto/keyless.mjs +2 -0
  240. package/dist/esm/core/crypto/keyless.mjs.map +1 -0
  241. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  242. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  243. package/dist/esm/core/crypto/multiKey.d.mts +5 -4
  244. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  245. package/dist/esm/core/crypto/poseidon.d.mts +7 -0
  246. package/dist/esm/core/crypto/poseidon.mjs +2 -0
  247. package/dist/esm/core/crypto/poseidon.mjs.map +1 -0
  248. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  249. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  250. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  251. package/dist/esm/core/crypto/secp256k1.d.mts +8 -1
  252. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  253. package/dist/esm/core/crypto/signature.mjs +1 -1
  254. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  255. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  256. package/dist/esm/core/crypto/utils.mjs +1 -1
  257. package/dist/esm/core/hex.mjs +1 -1
  258. package/dist/esm/core/index.d.mts +7 -8
  259. package/dist/esm/core/index.mjs +1 -1
  260. package/dist/esm/index.d.mts +16 -10
  261. package/dist/esm/index.mjs +1 -1
  262. package/dist/esm/internal/account.d.mts +14 -2
  263. package/dist/esm/internal/account.mjs +1 -1
  264. package/dist/esm/internal/ans.d.mts +4 -4
  265. package/dist/esm/internal/ans.mjs +1 -1
  266. package/dist/esm/internal/coin.d.mts +8 -8
  267. package/dist/esm/internal/coin.mjs +1 -1
  268. package/dist/esm/internal/digitalAsset.d.mts +11 -11
  269. package/dist/esm/internal/digitalAsset.mjs +1 -1
  270. package/dist/esm/internal/event.d.mts +1 -1
  271. package/dist/esm/internal/event.mjs +1 -1
  272. package/dist/esm/internal/faucet.d.mts +1 -1
  273. package/dist/esm/internal/faucet.mjs +1 -1
  274. package/dist/esm/internal/fungibleAsset.d.mts +12 -12
  275. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  276. package/dist/esm/internal/general.mjs +1 -1
  277. package/dist/esm/internal/keyless.d.mts +68 -0
  278. package/dist/esm/internal/keyless.mjs +2 -0
  279. package/dist/esm/internal/keyless.mjs.map +1 -0
  280. package/dist/esm/internal/staking.d.mts +1 -1
  281. package/dist/esm/internal/staking.mjs +1 -1
  282. package/dist/esm/internal/transaction.d.mts +5 -1
  283. package/dist/esm/internal/transaction.mjs +1 -1
  284. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  285. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  286. package/dist/esm/internal/view.d.mts +7 -7
  287. package/dist/esm/internal/view.mjs +1 -1
  288. package/dist/esm/transactions/authenticator/account.d.mts +4 -5
  289. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  290. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  291. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  292. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  293. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  294. package/dist/esm/transactions/index.d.mts +3 -3
  295. package/dist/esm/transactions/index.mjs +1 -1
  296. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  297. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  298. package/dist/esm/transactions/instances/index.d.mts +1 -1
  299. package/dist/esm/transactions/instances/index.mjs +1 -1
  300. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  301. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  302. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  303. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  304. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  305. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  306. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  307. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  308. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  309. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  310. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  311. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +14 -2
  312. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  313. package/dist/esm/transactions/management/index.d.mts +3 -3
  314. package/dist/esm/transactions/management/index.mjs +1 -1
  315. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  316. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  317. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  318. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  319. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  320. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  321. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  322. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  323. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +47 -0
  324. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
  325. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
  326. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +7 -29
  327. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  328. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  329. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  330. package/dist/esm/transactions/types.d.mts +7 -7
  331. package/dist/esm/types/index.d.mts +18 -3
  332. package/dist/esm/types/index.mjs +1 -1
  333. package/dist/esm/types/keyless.d.mts +14 -0
  334. package/dist/esm/types/keyless.mjs +1 -0
  335. package/dist/esm/types/keyless.mjs.map +1 -0
  336. package/dist/esm/utils/apiEndpoints.d.mts +3 -1
  337. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  338. package/dist/esm/utils/const.d.mts +5 -3
  339. package/dist/esm/utils/const.mjs +1 -1
  340. package/dist/esm/utils/index.d.mts +1 -1
  341. package/dist/esm/utils/index.mjs +1 -1
  342. package/dist/esm/version.d.mts +1 -1
  343. package/dist/esm/version.mjs +1 -1
  344. package/package.json +13 -7
  345. package/src/{core/account → account}/Account.ts +12 -16
  346. package/src/{core/account → account}/Ed25519Account.ts +13 -7
  347. package/src/account/EphemeralKeyPair.ts +78 -0
  348. package/src/account/KeylessAccount.ts +230 -0
  349. package/src/account/MultiKeyAccount.ts +121 -0
  350. package/src/{core/account → account}/SingleKeyAccount.ts +13 -7
  351. package/src/account/index.ts +6 -0
  352. package/src/api/account.ts +50 -8
  353. package/src/api/ans.ts +10 -17
  354. package/src/api/aptos.ts +10 -0
  355. package/src/api/aptosConfig.ts +50 -1
  356. package/src/api/coin.ts +7 -0
  357. package/src/api/digitalAsset.ts +142 -2
  358. package/src/api/event.ts +13 -8
  359. package/src/api/faucet.ts +3 -0
  360. package/src/api/fungibleAsset.ts +28 -4
  361. package/src/api/general.ts +48 -25
  362. package/src/api/keyless.ts +55 -0
  363. package/src/api/staking.ts +9 -0
  364. package/src/api/transaction.ts +59 -15
  365. package/src/api/transactionSubmission/management.ts +1 -1
  366. package/src/api/transactionSubmission/sign.ts +1 -1
  367. package/src/bcs/serializer.ts +18 -0
  368. package/src/client/core.ts +10 -1
  369. package/src/client/get.ts +6 -0
  370. package/src/client/post.ts +13 -0
  371. package/src/core/crypto/ed25519.ts +50 -34
  372. package/src/core/crypto/ephemeral.ts +147 -0
  373. package/src/core/crypto/hdKey.ts +31 -0
  374. package/src/core/crypto/index.ts +2 -0
  375. package/src/core/crypto/keyless.ts +502 -0
  376. package/src/core/crypto/multiKey.ts +23 -11
  377. package/src/core/crypto/poseidon.ts +134 -0
  378. package/src/core/crypto/secp256k1.ts +9 -3
  379. package/src/core/crypto/singleKey.ts +11 -0
  380. package/src/core/index.ts +0 -1
  381. package/src/index.ts +1 -0
  382. package/src/internal/account.ts +7 -10
  383. package/src/internal/ans.ts +2 -1
  384. package/src/internal/digitalAsset.ts +3 -2
  385. package/src/internal/fungibleAsset.ts +4 -3
  386. package/src/internal/keyless.ts +205 -0
  387. package/src/internal/transaction.ts +48 -10
  388. package/src/internal/transactionSubmission.ts +8 -7
  389. package/src/transactions/authenticator/account.ts +6 -11
  390. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  391. package/src/transactions/management/transactionWorker.ts +8 -2
  392. package/src/transactions/transactionBuilder/index.ts +2 -0
  393. package/src/transactions/transactionBuilder/signingMessage.ts +75 -0
  394. package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -80
  395. package/src/types/index.ts +21 -0
  396. package/src/types/keyless.ts +6 -0
  397. package/src/utils/apiEndpoints.ts +14 -0
  398. package/src/utils/const.ts +4 -2
  399. package/src/version.ts +1 -1
  400. package/dist/esm/chunk-2EZJOBD2.mjs.map +0 -1
  401. package/dist/esm/chunk-3AYBWD76.mjs.map +0 -1
  402. package/dist/esm/chunk-45ZZWQ7X.mjs +0 -2
  403. package/dist/esm/chunk-45ZZWQ7X.mjs.map +0 -1
  404. package/dist/esm/chunk-4ILXLBGX.mjs +0 -2
  405. package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
  406. package/dist/esm/chunk-4QMXOWHP.mjs +0 -1
  407. package/dist/esm/chunk-5GKROFZ4.mjs +0 -2
  408. package/dist/esm/chunk-5GKROFZ4.mjs.map +0 -1
  409. package/dist/esm/chunk-5RUPEEIG.mjs.map +0 -1
  410. package/dist/esm/chunk-6APZ5TPE.mjs.map +0 -1
  411. package/dist/esm/chunk-6BR5UJDT.mjs +0 -2
  412. package/dist/esm/chunk-AEVRPB4E.mjs +0 -2
  413. package/dist/esm/chunk-AEVRPB4E.mjs.map +0 -1
  414. package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
  415. package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
  416. package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
  417. package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
  418. package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
  419. package/dist/esm/chunk-C67BKZND.mjs +0 -2
  420. package/dist/esm/chunk-C67BKZND.mjs.map +0 -1
  421. package/dist/esm/chunk-C7YANDB2.mjs.map +0 -1
  422. package/dist/esm/chunk-CAGDOGXS.mjs +0 -2
  423. package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
  424. package/dist/esm/chunk-CQS6ZCJ7.mjs +0 -2
  425. package/dist/esm/chunk-CQS6ZCJ7.mjs.map +0 -1
  426. package/dist/esm/chunk-CXR7MOBW.mjs +0 -2
  427. package/dist/esm/chunk-CYNQRMO5.mjs +0 -2
  428. package/dist/esm/chunk-CYNQRMO5.mjs.map +0 -1
  429. package/dist/esm/chunk-DUP7XY5P.mjs +0 -2
  430. package/dist/esm/chunk-DUP7XY5P.mjs.map +0 -1
  431. package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
  432. package/dist/esm/chunk-EKR6HLSN.mjs.map +0 -1
  433. package/dist/esm/chunk-EV75CYGN.mjs +0 -2
  434. package/dist/esm/chunk-EV75CYGN.mjs.map +0 -1
  435. package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
  436. package/dist/esm/chunk-FKTXWOKR.mjs +0 -2
  437. package/dist/esm/chunk-FKTXWOKR.mjs.map +0 -1
  438. package/dist/esm/chunk-GQR35QW3.mjs.map +0 -1
  439. package/dist/esm/chunk-IHPWATYH.mjs.map +0 -1
  440. package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
  441. package/dist/esm/chunk-JOLLCFQL.mjs +0 -2
  442. package/dist/esm/chunk-JOLLCFQL.mjs.map +0 -1
  443. package/dist/esm/chunk-KLAYDUFD.mjs.map +0 -1
  444. package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
  445. package/dist/esm/chunk-LR65XHSF.mjs +0 -2
  446. package/dist/esm/chunk-LR65XHSF.mjs.map +0 -1
  447. package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
  448. package/dist/esm/chunk-MXO53VAI.mjs +0 -2
  449. package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
  450. package/dist/esm/chunk-NJRNZEHX.mjs +0 -2
  451. package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
  452. package/dist/esm/chunk-OWXKKVWD.mjs.map +0 -1
  453. package/dist/esm/chunk-PF57EOJY.mjs +0 -2
  454. package/dist/esm/chunk-QJAI7DNA.mjs +0 -2
  455. package/dist/esm/chunk-QJAI7DNA.mjs.map +0 -1
  456. package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
  457. package/dist/esm/chunk-RIUFW2OG.mjs +0 -2
  458. package/dist/esm/chunk-RIUFW2OG.mjs.map +0 -1
  459. package/dist/esm/chunk-SK5TPUAN.mjs +0 -2
  460. package/dist/esm/chunk-SOBCWGBM.mjs +0 -2
  461. package/dist/esm/chunk-SOBCWGBM.mjs.map +0 -1
  462. package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
  463. package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
  464. package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
  465. package/dist/esm/chunk-T6J2LHHS.mjs +0 -2
  466. package/dist/esm/chunk-T6J2LHHS.mjs.map +0 -1
  467. package/dist/esm/chunk-TVHLZDCO.mjs.map +0 -1
  468. package/dist/esm/chunk-U43KR4TW.mjs.map +0 -1
  469. package/dist/esm/chunk-UEKKYJGA.mjs.map +0 -1
  470. package/dist/esm/chunk-UGPALAPN.mjs +0 -2
  471. package/dist/esm/chunk-URTTOOEM.mjs +0 -2
  472. package/dist/esm/chunk-URTTOOEM.mjs.map +0 -1
  473. package/dist/esm/chunk-UVSRX4SV.mjs +0 -1
  474. package/dist/esm/chunk-W3V4IGGB.mjs +0 -2
  475. package/dist/esm/chunk-WMJXRWVE.mjs +0 -2
  476. package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
  477. package/dist/esm/chunk-XX5J7KKC.mjs.map +0 -1
  478. package/dist/esm/chunk-YZGEWPDE.mjs +0 -2
  479. package/dist/esm/chunk-YZGEWPDE.mjs.map +0 -1
  480. package/dist/esm/chunk-ZBT4HP6E.mjs +0 -2
  481. package/dist/esm/chunk-ZBT4HP6E.mjs.map +0 -1
  482. package/dist/esm/chunk-ZTIRBBNS.mjs +0 -2
  483. package/dist/esm/core/account/Account.d.mts +0 -20
  484. package/dist/esm/core/account/Account.mjs +0 -2
  485. package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
  486. package/dist/esm/core/account/Ed25519Account.mjs +0 -2
  487. package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
  488. package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
  489. package/dist/esm/core/account/index.d.mts +0 -21
  490. package/dist/esm/core/account/index.mjs +0 -2
  491. package/src/core/account/index.ts +0 -4
  492. /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
  493. /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
  494. /package/dist/esm/{chunk-4QMXOWHP.mjs.map → account/EphemeralKeyPair.mjs.map} +0 -0
  495. /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/KeylessAccount.mjs.map} +0 -0
  496. /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
  497. /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
  498. /package/dist/esm/{core/account → account}/index.mjs.map +0 -0
  499. /package/dist/esm/{chunk-R7G3CLRI.mjs.map → api/keyless.mjs.map} +0 -0
  500. /package/dist/esm/{chunk-IYSHHN5A.mjs.map → chunk-2I2XAOH7.mjs.map} +0 -0
  501. /package/dist/esm/{chunk-6ILDDGAX.mjs.map → chunk-2XIT7I5L.mjs.map} +0 -0
  502. /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-3FVRXELT.mjs.map} +0 -0
  503. /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-3VGX3TXH.mjs.map} +0 -0
  504. /package/dist/esm/{chunk-Y2MYVQVT.mjs.map → chunk-45D3YXLT.mjs.map} +0 -0
  505. /package/dist/esm/{chunk-Q73VKL3A.mjs.map → chunk-5IM5TQN4.mjs.map} +0 -0
  506. /package/dist/esm/{chunk-KS7UY4W5.mjs.map → chunk-67QYMEZE.mjs.map} +0 -0
  507. /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
  508. /package/dist/esm/{chunk-W3V4IGGB.mjs.map → chunk-6Q2GNDKL.mjs.map} +0 -0
  509. /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-7STYQ5ZE.mjs.map} +0 -0
  510. /package/dist/esm/{chunk-UVSRX4SV.mjs.map → chunk-7Z6DYLCA.mjs.map} +0 -0
  511. /package/dist/esm/{chunk-SK5TPUAN.mjs.map → chunk-AFPBV2BQ.mjs.map} +0 -0
  512. /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
  513. /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-C3L4ETUF.mjs.map} +0 -0
  514. /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-COW5IGYC.mjs.map} +0 -0
  515. /package/dist/esm/{chunk-TTUXAKCV.mjs.map → chunk-CYWA4AJF.mjs.map} +0 -0
  516. /package/dist/esm/{chunk-V6FZ7WZH.mjs.map → chunk-E3YEX3FR.mjs.map} +0 -0
  517. /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-EB7AI4B4.mjs.map} +0 -0
  518. /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
  519. /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-HGZGTBA4.mjs.map} +0 -0
  520. /package/dist/esm/{chunk-KXR3IUJ7.mjs.map → chunk-INYYKAXD.mjs.map} +0 -0
  521. /package/dist/esm/{chunk-GKGTODGE.mjs.map → chunk-JNAI5UFZ.mjs.map} +0 -0
  522. /package/dist/esm/{chunk-LPB7SZHL.mjs.map → chunk-LFTWUMLK.mjs.map} +0 -0
  523. /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-MGOHPDX4.mjs.map} +0 -0
  524. /package/dist/esm/{chunk-ZTIRBBNS.mjs.map → chunk-MLPJOS5C.mjs.map} +0 -0
  525. /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-MWUJCP27.mjs.map} +0 -0
  526. /package/dist/esm/{chunk-4ILXLBGX.mjs.map → chunk-NUDRQTYI.mjs.map} +0 -0
  527. /package/dist/esm/{chunk-WMJXRWVE.mjs.map → chunk-NUR3TCTI.mjs.map} +0 -0
  528. /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-PFFAQZHT.mjs.map} +0 -0
  529. /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-QREYDZ5R.mjs.map} +0 -0
  530. /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-STYDBDYL.mjs.map} +0 -0
  531. /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
  532. /package/dist/esm/{chunk-WHA7RISE.mjs.map → chunk-UYMZF37A.mjs.map} +0 -0
  533. /package/dist/esm/{chunk-6BR5UJDT.mjs.map → chunk-W57M6DIK.mjs.map} +0 -0
  534. /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-XBQEFZD7.mjs.map} +0 -0
  535. /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-ZNEBMSNC.mjs.map} +0 -0
  536. /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
@@ -3,6 +3,8 @@ 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>;
6
8
  declare enum Network {
7
9
  MAINNET = "mainnet",
8
10
  TESTNET = "testnet",
@@ -867,11 +869,23 @@ declare enum AccountAuthenticatorVariant {
867
869
  }
868
870
  declare enum AnyPublicKeyVariant {
869
871
  Ed25519 = 0,
870
- Secp256k1 = 1
872
+ Secp256k1 = 1,
873
+ Keyless = 3
871
874
  }
872
875
  declare enum AnySignatureVariant {
873
876
  Ed25519 = 0,
874
- Secp256k1 = 1
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
875
889
  }
876
890
  /**
877
891
  * BCS types
@@ -893,6 +907,8 @@ type AptosSettings = {
893
907
  readonly fullnode?: string;
894
908
  readonly faucet?: string;
895
909
  readonly indexer?: string;
910
+ readonly pepper?: string;
911
+ readonly prover?: string;
896
912
  readonly clientConfig?: ClientConfig;
897
913
  readonly client?: Client;
898
914
  readonly fullnodeConfig?: FullNodeConfig;
@@ -962,6 +978,7 @@ type ClientHeadersType = {
962
978
  interface ClientRequest<Req> {
963
979
  url: string;
964
980
  method: "GET" | "POST";
981
+ originMethod?: string;
965
982
  body?: Req;
966
983
  contentType?: string;
967
984
  params?: any;
@@ -2153,6 +2170,8 @@ declare class Serializer {
2153
2170
  * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
2154
2171
  */
2155
2172
  serializeVector<T extends Serializable>(values: Array<T>): void;
2173
+ serializeOption<T extends Serializable>(value?: T): void;
2174
+ serializeOptionStr(value?: string): void;
2156
2175
  }
2157
2176
  declare function ensureBoolean(value: unknown): asserts value is boolean;
2158
2177
  declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
@@ -3020,7 +3039,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
3020
3039
  * The Ed25519 signing key
3021
3040
  * @private
3022
3041
  */
3023
- private readonly signingKeyPair;
3042
+ private readonly signingKey;
3024
3043
  /**
3025
3044
  * Create a new PrivateKey instance from a Uint8Array or String.
3026
3045
  *
@@ -3045,16 +3064,6 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
3045
3064
  * @param mnemonics the mnemonic seed phrase
3046
3065
  */
3047
3066
  static fromDerivationPath(path: string, mnemonics: string): Ed25519PrivateKey;
3048
- /**
3049
- * A private inner function so we can separate from the main fromDerivationPath() method
3050
- * to add tests to verify we create the keys correctly.
3051
- *
3052
- * @param path the BIP44 path
3053
- * @param seed the seed phrase created by the mnemonics
3054
- * @param offset the offset used for key derivation, defaults to 0x80000000
3055
- * @returns
3056
- */
3057
- private static fromDerivationPathInner;
3058
3067
  /**
3059
3068
  * Derive the Ed25519PublicKey for this private key.
3060
3069
  *
@@ -3104,6 +3113,13 @@ declare class Ed25519Signature extends Signature {
3104
3113
  toUint8Array(): Uint8Array;
3105
3114
  serialize(serializer: Serializer): void;
3106
3115
  static deserialize(deserializer: Deserializer): Ed25519Signature;
3116
+ /**
3117
+ * Checks if an ED25519 signature is non-canonical.
3118
+ *
3119
+ * Comes from Aptos Core
3120
+ * https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos-crypto/src/ed25519/ed25519_sigs.rs#L47-L85
3121
+ */
3122
+ isCanonicalSignature(): boolean;
3107
3123
  }
3108
3124
 
3109
3125
  type DerivedKeys = {
@@ -3115,6 +3131,7 @@ type DerivedKeys = {
3115
3131
  */
3116
3132
  declare const APTOS_HARDENED_REGEX: RegExp;
3117
3133
  declare const APTOS_BIP44_REGEX: RegExp;
3134
+ declare const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
3118
3135
  /**
3119
3136
  * A list of supported key types and associated seeds
3120
3137
  */
@@ -3164,6 +3181,13 @@ declare const CKDPriv: ({ key, chainCode }: DerivedKeys, index: number) => Deriv
3164
3181
  * @param path
3165
3182
  */
3166
3183
  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;
3167
3191
  /**
3168
3192
  * Normalizes the mnemonic by removing extra whitespace and making it lowercase
3169
3193
  * @param mnemonic the mnemonic seed phrase
@@ -3370,8 +3394,9 @@ declare class MultiKey extends AccountPublicKey {
3370
3394
  createBitmap(args: {
3371
3395
  bits: number[];
3372
3396
  }): Uint8Array;
3397
+ getIndex(publicKey: PublicKey): number;
3373
3398
  }
3374
- declare class MultiKeySignature extends Signature {
3399
+ declare class MultiSignature extends Signature {
3375
3400
  /**
3376
3401
  * Number of bytes in the bitmap representing who signed the transaction (32-bits)
3377
3402
  */
@@ -3423,7 +3448,265 @@ declare class MultiKeySignature extends Signature {
3423
3448
  }): Uint8Array;
3424
3449
  toUint8Array(): Uint8Array;
3425
3450
  serialize(serializer: Serializer): void;
3426
- static deserialize(deserializer: Deserializer): MultiKeySignature;
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;
3427
3710
  }
3428
3711
 
3429
3712
  /**
@@ -3440,6 +3723,11 @@ declare class Secp256k1PublicKey extends PublicKey {
3440
3723
  * @param hexInput A HexInput (string or Uint8Array)
3441
3724
  */
3442
3725
  constructor(hexInput: HexInput);
3726
+ /**
3727
+ * Verifies a Secp256k1 signature against the public key
3728
+ *
3729
+ * Note signatures are validated to be canonical as a malleability check
3730
+ */
3443
3731
  verifySignature(args: VerifySignatureArgs): boolean;
3444
3732
  toUint8Array(): Uint8Array;
3445
3733
  serialize(serializer: Serializer): void;
@@ -3497,6 +3785,8 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
3497
3785
  /**
3498
3786
  * Sign the given message with the private key.
3499
3787
  *
3788
+ * Note: signatures are canonical, and non-malleable
3789
+ *
3500
3790
  * @param message a message as a string or Uint8Array
3501
3791
  * @returns Signature
3502
3792
  */
@@ -3609,365 +3899,53 @@ declare class AccountAuthenticatorSingleKey extends AccountAuthenticator {
3609
3899
  */
3610
3900
  declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
3611
3901
  readonly public_keys: MultiKey;
3612
- readonly signatures: Array<AnySignature>;
3613
- readonly signatures_bitmap: Uint8Array;
3614
- constructor(public_keys: MultiKey, signatures: Array<AnySignature>, signatures_bitmap: Uint8Array);
3902
+ readonly signatures: MultiSignature;
3903
+ constructor(public_keys: MultiKey, signatures: MultiSignature);
3615
3904
  serialize(serializer: Serializer): void;
3616
3905
  static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
3617
3906
  }
3618
3907
 
3619
- interface SingleKeySignerConstructorArgs {
3620
- privateKey: PrivateKey;
3621
- address?: AccountAddressInput;
3622
- }
3623
- interface SingleKeySignerGenerateArgs {
3624
- scheme?: SigningSchemeInput;
3625
- }
3626
- type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
3627
- path: string;
3628
- mnemonic: string;
3629
- };
3630
- interface VerifySingleKeySignatureArgs {
3631
- message: HexInput;
3632
- signature: AnySignature;
3633
- }
3634
3908
  /**
3635
- * Signer implementation for the SingleKey authentication scheme.
3636
- * This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
3637
- * Currently, the only supported signature schemes are Ed25519 and Secp256k1.
3638
- *
3639
- * Note: Generating a signer instance does not create the account on-chain.
3909
+ * Type of API endpoint for request routing
3640
3910
  */
3641
- declare class SingleKeyAccount implements Account$1 {
3642
- /**
3643
- * Private key associated with the account
3644
- */
3645
- readonly privateKey: PrivateKey;
3646
- readonly publicKey: AnyPublicKey;
3647
- readonly accountAddress: AccountAddress;
3648
- readonly signingScheme = SigningScheme.SingleKey;
3649
- constructor(args: SingleKeySignerConstructorArgs);
3650
- /**
3651
- * Derives an account from a randomly generated private key.
3652
- * Default generation is using an Ed25519 key
3653
- * @returns Account with the given signature scheme
3654
- */
3655
- static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
3656
- /**
3657
- * Derives an account with bip44 path and mnemonics,
3658
- * Default to using an Ed25519 signature scheme.
3659
- *
3660
- * @param args.scheme The signature scheme to derive the private key with
3661
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
3662
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
3663
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3664
- * @param args.mnemonic the mnemonic seed phrase of the account
3665
- */
3666
- static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
3667
- verifySignature(args: VerifySingleKeySignatureArgs): boolean;
3668
- signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
3669
- sign(message: HexInput): AnySignature;
3911
+ declare enum AptosApiType {
3912
+ FULLNODE = "Fullnode",
3913
+ INDEXER = "Indexer",
3914
+ FAUCET = "Faucet",
3915
+ PEPPER = "Pepper",
3916
+ PROVER = "Prover"
3670
3917
  }
3671
-
3672
3918
  /**
3673
- * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
3674
- * This is the default input type when passing an `Ed25519PrivateKey`.
3675
- * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
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.
3922
+ *
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.
3676
3925
  */
3677
- interface CreateEd25519AccountFromPrivateKeyArgs {
3678
- privateKey: Ed25519PrivateKey;
3679
- address?: AccountAddressInput;
3680
- legacy?: true;
3681
- }
3926
+ declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
3682
3927
  /**
3683
- * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
3684
- * The `legacy` argument needs to be explicitly set to false in order to
3685
- * use the `SingleKey` authentication scheme.
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.
3686
3934
  */
3687
- interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
3688
- privateKey: Ed25519PrivateKey;
3689
- address?: AccountAddressInput;
3690
- legacy: false;
3691
- }
3935
+ declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
3692
3936
  /**
3693
- * Arguments for creating an `SingleKeyAccount` from any supported private key
3694
- * that is not an `Ed25519PrivateKey`.
3695
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
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.
3696
3941
  */
3697
- interface CreateSingleKeyAccountFromPrivateKeyArgs {
3698
- privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
3699
- address?: AccountAddressInput;
3700
- legacy?: false;
3701
- }
3942
+ declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
3702
3943
  /**
3703
- * Arguments for creating an opaque `Account` from any supported private key.
3704
- * This is used when the private key type is not known at compilation time.
3944
+ * The default gas currency for the network.
3705
3945
  */
3706
- interface CreateAccountFromPrivateKeyArgs {
3707
- privateKey: PrivateKey;
3708
- address?: AccountAddressInput;
3709
- legacy?: boolean;
3710
- }
3711
- /**
3712
- * Arguments for generating an `Ed25519Account`.
3713
- * This is the input type used by default.
3714
- */
3715
- interface GenerateEd25519AccountArgs {
3716
- scheme?: SigningSchemeInput.Ed25519;
3717
- legacy?: true;
3718
- }
3719
- /**
3720
- * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
3721
- * The `legacy` argument needs to be explicitly set to false,
3722
- * otherwise an `Ed25519Account` will be returned instead.
3723
- */
3724
- interface GenerateEd25519SingleKeyAccountArgs {
3725
- scheme?: SigningSchemeInput.Ed25519;
3726
- legacy: false;
3727
- }
3728
- /**
3729
- * Arguments for generating an `SingleKeyAccount` with any supported private key
3730
- * that is not an `Ed25519PrivateKey`.
3731
- * The `legacy` argument defaults to false and cannot be explicitly set to true.
3732
- */
3733
- interface GenerateSingleKeyAccountArgs {
3734
- scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
3735
- legacy?: false;
3736
- }
3737
- /**
3738
- * Arguments for generating an opaque `Account`.
3739
- * This is used when the input signature scheme is not known at compilation time.
3740
- */
3741
- interface GenerateAccountArgs {
3742
- scheme?: SigningSchemeInput;
3743
- legacy?: boolean;
3744
- }
3745
- /**
3746
- * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
3747
- */
3748
- interface PrivateKeyFromDerivationPathArgs {
3749
- path: string;
3750
- mnemonic: string;
3751
- }
3752
- /**
3753
- * Interface for a generic Aptos account.
3754
- *
3755
- * The interface is defined as abstract class to provide a single entrypoint for account generation,
3756
- * either through `Account.generate()` or `Account.fromDerivationPath`.
3757
- * Despite this being an abstract class, it should be treated as an interface and enforced using
3758
- * the `implements` keyword.
3759
- *
3760
- * Note: Generating an account instance does not create the account on-chain.
3761
- */
3762
- declare abstract class Account$1 {
3763
- /**
3764
- * Private key associated with the account.
3765
- * Note: this will be removed in the next major release,
3766
- * as not all accounts have a private key.
3767
- */
3768
- abstract readonly privateKey: PrivateKey;
3769
- /**
3770
- * Public key associated with the account
3771
- */
3772
- abstract readonly publicKey: AccountPublicKey;
3773
- /**
3774
- * Account address associated with the account
3775
- */
3776
- abstract readonly accountAddress: AccountAddress;
3777
- /**
3778
- * Signing scheme used to sign transactions
3779
- */
3780
- abstract signingScheme: SigningScheme;
3781
- /**
3782
- * Derives an account from a randomly generated private key.
3783
- * @param args.scheme The signature scheme to use, to generate the private key
3784
- * @param args.legacy Whether to use a legacy authentication scheme, when applicable
3785
- * @returns An account compatible with the provided signature scheme
3786
- */
3787
- static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
3788
- static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
3789
- static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
3790
- static generate(args: GenerateAccountArgs): Account$1;
3791
- /**
3792
- * Creates an account from the provided private key.
3793
- *
3794
- * @param args.privateKey a valid private key
3795
- * @param args.address the account's address. If not provided, it will be derived from the public key.
3796
- * @param args.legacy Whether to use a legacy authentication scheme, when applicable
3797
- */
3798
- static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
3799
- static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
3800
- static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
3801
- static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account$1;
3802
- /**
3803
- * @deprecated use `fromPrivateKey` instead.
3804
- * Instantiates an account given a private key and a specified account address.
3805
- * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
3806
- *
3807
- * @param args.privateKey PrivateKey - the underlying private key for the account
3808
- * @param args.address AccountAddress - The account address the `Account` will sign for
3809
- * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
3810
- * to generating a Legacy Ed25519 keypair
3811
- *
3812
- * @returns Account
3813
- */
3814
- static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
3815
- /**
3816
- * Derives an account with bip44 path and mnemonics
3817
- *
3818
- * @param args.scheme The signature scheme to derive the private key with
3819
- * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
3820
- * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
3821
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3822
- * @param args.mnemonic the mnemonic seed phrase of the account
3823
- */
3824
- static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
3825
- static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
3826
- static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
3827
- static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account$1;
3828
- /**
3829
- * @deprecated use `publicKey.authKey()` instead.
3830
- * This key enables account owners to rotate their private key(s)
3831
- * associated with the account without changing the address that hosts their account.
3832
- * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
3833
- *
3834
- * @param args.publicKey PublicKey - public key of the account
3835
- * @returns The authentication key for the associated account
3836
- */
3837
- static authKey(args: {
3838
- publicKey: AccountPublicKey;
3839
- }): AuthenticationKey;
3840
- /**
3841
- * Sign a message using the available signing capabilities.
3842
- * @param message the signing message, as binary input
3843
- * @return the AccountAuthenticator containing the signature, together with the account's public key
3844
- */
3845
- abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
3846
- /**
3847
- * Sign the given message with the private key.
3848
- * @param message in HexInput format
3849
- * @returns AccountSignature
3850
- */
3851
- abstract sign(message: HexInput): Signature;
3852
- /**
3853
- * @param args.message raw message data in HexInput format
3854
- * @param args.signature signed message signature
3855
- */
3856
- verifySignature(args: VerifySignatureArgs): boolean;
3857
- }
3858
-
3859
- interface Ed25519SignerConstructorArgs {
3860
- privateKey: Ed25519PrivateKey;
3861
- address?: AccountAddressInput;
3862
- }
3863
- interface Ed25519SignerFromDerivationPathArgs {
3864
- path: string;
3865
- mnemonic: string;
3866
- }
3867
- interface VerifyEd25519SignatureArgs {
3868
- message: HexInput;
3869
- signature: Ed25519Signature;
3870
- }
3871
- /**
3872
- * Signer implementation for the Ed25519 authentication scheme.
3873
- * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
3874
- *
3875
- * Note: Generating a signer instance does not create the account on-chain.
3876
- */
3877
- declare class Ed25519Account implements Account$1 {
3878
- /**
3879
- * Private key associated with the account
3880
- */
3881
- readonly privateKey: Ed25519PrivateKey;
3882
- readonly publicKey: Ed25519PublicKey;
3883
- readonly accountAddress: AccountAddress;
3884
- readonly signingScheme = SigningScheme.Ed25519;
3885
- constructor(args: Ed25519SignerConstructorArgs);
3886
- /**
3887
- * Derives a signer from a randomly generated private key
3888
- */
3889
- static generate(): Ed25519Account;
3890
- /**
3891
- * Derives an account with bip44 path and mnemonics
3892
- *
3893
- * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
3894
- * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
3895
- * @param args.mnemonic the mnemonic seed phrase of the account
3896
- */
3897
- static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
3898
- verifySignature(args: VerifyEd25519SignatureArgs): boolean;
3899
- signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
3900
- sign(message: HexInput): Ed25519Signature;
3901
- }
3902
-
3903
- /**
3904
- * Creates an object address from creator address and seed
3905
- *
3906
- * @param creatorAddress The object creator account address
3907
- * @param seed The seed in either Uint8Array | string type
3908
- *
3909
- * @returns The object account address
3910
- */
3911
- declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
3912
- /**
3913
- * Creates an resource address from creator address and seed
3914
- *
3915
- * @param creatorAddress The creator account address
3916
- * @param seed The seed in either Uint8Array | string type
3917
- *
3918
- * @returns The resource account address
3919
- */
3920
- declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
3921
- /**
3922
- * Creates a token object address from creator address, collection name and token name
3923
- *
3924
- * @param creatorAddress The token creator account address
3925
- * @param collectionName The collection name
3926
- * @param tokenName The token name
3927
- *
3928
- * @returns The token account address
3929
- */
3930
- declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
3931
-
3932
- /**
3933
- * Type of API endpoint for request routing
3934
- */
3935
- declare enum AptosApiType {
3936
- FULLNODE = "Fullnode",
3937
- INDEXER = "Indexer",
3938
- FAUCET = "Faucet"
3939
- }
3940
- /**
3941
- * The default max gas amount when none is given.
3942
- *
3943
- * This is the maximum number of gas units that will be used by a transaction before being rejected.
3944
- *
3945
- * Note that max gas amount varies based on the transaction. A larger transaction will go over this
3946
- * default gas amount, and the value will need to be changed for the specific transaction.
3947
- */
3948
- declare const DEFAULT_MAX_GAS_AMOUNT = 200000;
3949
- /**
3950
- * The default transaction expiration seconds from now.
3951
- *
3952
- * This time is how long until the blockchain nodes will reject the transaction.
3953
- *
3954
- * Note that the transaction expiration time varies based on network connection and network load. It may need to be
3955
- * increased for the transaction to be processed.
3956
- */
3957
- declare const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;
3958
- /**
3959
- * The default number of seconds to wait for a transaction to be processed.
3960
- *
3961
- * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for
3962
- * the results of the transaction. It may take longer based on network connection and network load.
3963
- */
3964
- declare const DEFAULT_TXN_TIMEOUT_SEC = 20;
3965
- /**
3966
- * The default gas currency for the network.
3967
- */
3968
- declare const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
3969
- declare const RAW_TRANSACTION_SALT = "APTOS::RawTransaction";
3970
- declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
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";
3971
3949
  /**
3972
3950
  * The list of supported Processor types for our indexer api.
3973
3951
  *
@@ -3986,6 +3964,10 @@ declare enum ProcessorType {
3986
3964
 
3987
3965
  /**
3988
3966
  * This class holds the config information for the SDK client instance.
3967
+ *
3968
+ * @example
3969
+ *
3970
+ * const aptosConfig = new AptosConfig({network:Network.TESTNET})
3989
3971
  */
3990
3972
  declare class AptosConfig {
3991
3973
  /**
@@ -4004,6 +3986,14 @@ declare class AptosConfig {
4004
3986
  * The optional hardcoded faucet URL to send requests to instead of using the network
4005
3987
  */
4006
3988
  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;
4007
3997
  /**
4008
3998
  * The optional hardcoded indexer URL to send requests to instead of using the network
4009
3999
  */
@@ -4036,1115 +4026,1582 @@ declare class AptosConfig {
4036
4026
  * @internal
4037
4027
  */
4038
4028
  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;
4039
4041
  }
4040
4042
 
4041
4043
  /**
4042
- * A class to query all `Account` related queries on Aptos.
4044
+ * Representation of a ChainId that can serialized and deserialized
4043
4045
  */
4044
- declare class Account {
4045
- readonly config: AptosConfig;
4046
- constructor(config: AptosConfig);
4047
- /**
4048
- * Queries the current state for an Aptos account given its account address
4049
- *
4050
- * @param args.accountAddress Aptos account address
4051
- *
4052
- * @returns The account data
4053
- *
4054
- * @example An example of the returned account
4055
- * ```
4056
- * {
4057
- * sequence_number: "1",
4058
- * authentication_key: "0x5307b5f4bc67829097a8ba9b43dba3b88261eeccd1f709d9bde240fc100fbb69"
4059
- * }
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
+ }
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
+
4202
+ /**
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
4249
+ */
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>;
4255
+ /**
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.
4260
+ *
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.
4267
+ *
4268
+ * @example
4269
+ * A coin transfer function has three arguments "from", "to" and "amount".
4270
+ * ```
4271
+ * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4060
4272
  * ```
4061
4273
  */
4062
- getAccountInfo(args: {
4063
- accountAddress: AccountAddressInput;
4064
- }): Promise<AccountData>;
4274
+ constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
4065
4275
  /**
4066
- * Queries for all modules in an account given an account address
4276
+ * A helper function to build a EntryFunction payload from raw primitive values
4067
4277
  *
4068
- * Note: In order to get all account modules, this function may call the API
4069
- * multiple times as it auto paginates.
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.
4070
4281
  *
4071
- * @param args.accountAddress Aptos account address
4072
- * @param args.options.offset The number module to start returning results from
4073
- * @param args.options.limit The number of results to return
4074
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
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.
4075
4288
  *
4076
- * @returns Account modules
4289
+ * @example
4290
+ * A coin transfer function has three arguments "from", "to" and "amount".
4291
+ * ```
4292
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4293
+ * ```
4294
+ * @returns EntryFunction
4077
4295
  */
4078
- getAccountModules(args: {
4079
- accountAddress: AccountAddressInput;
4080
- options?: PaginationArgs & LedgerVersionArg;
4081
- }): Promise<MoveModuleBytecode[]>;
4296
+ static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4297
+ serialize(serializer: Serializer): void;
4082
4298
  /**
4083
- * Queries for a specific account module given account address and module name
4299
+ * Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
4300
+ * @see EntryFunctionBytes
4084
4301
  *
4085
- * @param args.accountAddress Aptos account address
4086
- * @param args.moduleName The name of the module
4087
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
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.
4088
4305
  *
4089
- * @returns Account module
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.
4308
+ *
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.
4311
+ *
4312
+ * @param deserializer
4313
+ * @returns A deserialized EntryFunction payload for a transaction.
4314
+ *
4315
+ */
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;
4326
+ /**
4327
+ * The type arguments that the bytecode function requires.
4328
+ */
4329
+ readonly type_args: Array<TypeTag>;
4330
+ /**
4331
+ * The arguments that the bytecode function requires.
4332
+ */
4333
+ readonly args: Array<ScriptFunctionArgument>;
4334
+ /**
4335
+ * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
4090
4336
  *
4091
- * @example An example of an account module
4337
+ * @param bytecode The move module bytecode
4338
+ * @param type_args The type arguments that the bytecode function requires.
4339
+ *
4340
+ * @example
4341
+ * A coin transfer function has one type argument "CoinType".
4092
4342
  * ```
4093
- * {
4094
- * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
4095
- * abi: { address: "0x1" }
4096
- * }
4343
+ * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4344
+ * ```
4345
+ * @param args The arguments that the bytecode function requires.
4346
+ *
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,)
4097
4351
  * ```
4098
4352
  */
4099
- getAccountModule(args: {
4100
- accountAddress: AccountAddressInput;
4101
- moduleName: string;
4102
- options?: LedgerVersionArg;
4103
- }): Promise<MoveModuleBytecode>;
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;
4363
+ /**
4364
+ * Contains the payload to run a multi-sig account transaction.
4365
+ *
4366
+ * @param multisig_address The multi-sig account address the transaction will be executed as.
4367
+ *
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.
4370
+ */
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;
4385
+ /**
4386
+ * Contains the payload to run a multi-sig account transaction.
4387
+ *
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.
4391
+ */
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;
4104
4408
  /**
4105
- * Queries account transactions given an account address
4106
- *
4107
- * Note: In order to get all account transactions, this function may call the API
4108
- * multiple times as it auto paginates.
4109
- *
4110
- * @param args.accountAddress Aptos account address
4111
- * @param args.options.offset The number transaction to start returning results from
4112
- * @param args.options.limit The number of results to return
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.
4113
4411
  *
4114
- * @returns The account transactions
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.
4115
4422
  */
4116
- getAccountTransactions(args: {
4117
- accountAddress: AccountAddressInput;
4118
- options?: PaginationArgs;
4119
- }): Promise<TransactionResponse[]>;
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 {
4120
4431
  /**
4121
- * Queries all account resources given an account address
4122
- *
4123
- * Note: In order to get all account resources, this function may call the API
4124
- * multiple times as it auto paginates.
4125
- *
4126
- * @param args.accountAddress Aptos account address
4127
- * @param args.options.offset The number resource to start returning results from
4128
- * @param args.options.limit The number of results to return
4129
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4130
- * @returns Account resources
4432
+ * Serialize a Raw Transaction With Data
4131
4433
  */
4132
- getAccountResources(args: {
4133
- accountAddress: AccountAddressInput;
4134
- options?: PaginationArgs & LedgerVersionArg;
4135
- }): Promise<MoveResource[]>;
4434
+ abstract serialize(serializer: Serializer): void;
4136
4435
  /**
4137
- * Queries a specific account resource given account address and resource type. Note that the default is `any` in order
4138
- * to allow for ease of accessing properties of the object.
4139
- *
4140
- * @type The typed output of the resource
4141
- * @param args.accountAddress Aptos account address
4142
- * @param args.resourceType String representation of an on-chain Move struct type, i.e "0x1::aptos_coin::AptosCoin"
4143
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4144
- *
4145
- * @returns Account resource
4146
- *
4147
- * @example An example of an account resource
4148
- * ```
4149
- * {
4150
- * value: 6
4151
- * }
4152
- * ```
4436
+ * Deserialize a Raw Transaction With Data
4153
4437
  */
4154
- getAccountResource<T extends {} = any>(args: {
4155
- accountAddress: AccountAddressInput;
4156
- resourceType: MoveStructId;
4157
- options?: LedgerVersionArg;
4158
- }): Promise<T>;
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 {
4159
4444
  /**
4160
- * Looks up the account address for a given authentication key
4161
- *
4162
- * This handles both if the account's authentication key has been rotated or not.
4163
- *
4164
- * @param args.authenticationKey The authentication key
4165
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4166
- * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
4167
- * @returns Promise<AccountAddress> The accountAddress associated with the authentication key
4445
+ * The raw transaction
4168
4446
  */
4169
- lookupOriginalAccountAddress(args: {
4170
- authenticationKey: AccountAddressInput;
4171
- minimumLedgerVersion?: AnyNumber;
4172
- options?: LedgerVersionArg;
4173
- }): Promise<AccountAddress>;
4447
+ readonly raw_txn: RawTransaction;
4174
4448
  /**
4175
- * Queries the current count of tokens owned by an account
4176
- *
4177
- * @param args.accountAddress The account address
4178
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4179
- * @returns Current count of tokens owned by the account
4449
+ * The secondary signers on this transaction
4180
4450
  */
4181
- getAccountTokensCount(args: {
4182
- accountAddress: AccountAddressInput;
4183
- minimumLedgerVersion?: AnyNumber;
4184
- }): Promise<number>;
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 {
4185
4460
  /**
4186
- * Queries the account's current owned tokens.
4187
- *
4188
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4189
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4190
- *
4191
- * @param args.accountAddress The account address we want to get the tokens for
4192
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4193
- * @param args.options.tokenStandard The NFT standard to query for
4194
- * @param args.options.offset The number token to start returning results from
4195
- * @param args.options.limit The number of results to return
4196
- * @param args.options.orderBy The order to sort the tokens by
4197
- * @returns Tokens array with the token data
4461
+ * The raw transaction
4198
4462
  */
4199
- getAccountOwnedTokens(args: {
4200
- accountAddress: AccountAddressInput;
4201
- minimumLedgerVersion?: AnyNumber;
4202
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
4203
- }): Promise<GetAccountOwnedTokensQueryResponse>;
4463
+ readonly raw_txn: RawTransaction;
4204
4464
  /**
4205
- * Queries all current tokens of a specific collection that an account owns by the collection address
4206
- *
4207
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4208
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4209
- *
4210
- * @param args.accountAddress The account address we want to get the tokens for
4211
- * @param args.collectionAddress The address of the collection being queried
4212
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4213
- * @param args.options.tokenStandard The NFT standard to query for
4214
- * @param args.options.offset The number token to start returning results from
4215
- * @param args.options.limit The number of results to return
4216
- * @param args.options.orderBy The order to sort the tokens by
4217
- * @returns Tokens array with the token data
4465
+ * The secondary signers on this transaction - optional and can be empty
4218
4466
  */
4219
- getAccountOwnedTokensFromCollectionAddress(args: {
4220
- accountAddress: AccountAddressInput;
4221
- collectionAddress: AccountAddressInput;
4222
- minimumLedgerVersion?: AnyNumber;
4223
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
4224
- }): Promise<GetAccountOwnedTokensFromCollectionResponse>;
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;
4225
4586
  /**
4226
- * Queries for all collections that an account currently has tokens for.
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.
4227
4589
  *
4228
- * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.
4229
- * If you want to get only the token from a specific standard, you can pass an optional tokenStandard param
4590
+ * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4230
4591
  *
4231
- * @param args.accountAddress The account address we want to get the collections for
4232
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4233
- * @param args.options.tokenStandard The NFT standard to query for
4234
- * @param args.options.offset The number collection to start returning results from
4235
- * @param args.options.limit The number of results to return
4236
- * @param args.options.orderBy The order to sort the tokens by
4237
- * @returns Collections array with the collections data
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.
4238
4596
  */
4239
- getAccountCollectionsWithOwnedTokens(args: {
4240
- accountAddress: AccountAddressInput;
4241
- minimumLedgerVersion?: AnyNumber;
4242
- options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
4243
- }): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
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;
4244
4609
  /**
4245
- * Queries the current count of transactions submitted by an account
4610
+ * SimpleTransaction represents a simple transaction type of a single signer that
4611
+ * can be submitted to Aptos chain for execution.
4246
4612
  *
4247
- * @param args.accountAddress The account address we want to get the total count for
4248
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4249
- * @returns Current count of transactions made by an account
4250
- */
4251
- getAccountTransactionsCount(args: {
4252
- accountAddress: AccountAddressInput;
4253
- minimumLedgerVersion?: AnyNumber;
4254
- }): Promise<number>;
4255
- /**
4256
- * Queries an account's coins data
4613
+ * SimpleTransaction metadata contains the Raw Transaction and an optional
4614
+ * sponsor Account Address to pay the gas fees.
4257
4615
  *
4258
- * @param args.accountAddress The account address we want to get the coins data for
4259
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4260
- * @param args.options.offset optional. The number coin to start returning results from
4261
- * @param args.options.limit optional. The number of results to return
4262
- * @param args.options.orderBy optional. The order to sort the coins by
4263
- * @param args.options.where optional. Filter the results by
4264
- * @returns Array with the coins data
4616
+ * @param rawTransaction The Raw Tranasaction
4617
+ * @param feePayerAddress The sponsor Account Address
4265
4618
  */
4266
- getAccountCoinsData(args: {
4267
- accountAddress: AccountAddressInput;
4268
- minimumLedgerVersion?: AnyNumber;
4269
- options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
4270
- }): Promise<GetAccountCoinsDataResponse>;
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[];
4271
4631
  /**
4272
- * Queries the current count of an account's coins aggregated
4632
+ * SimpleTransaction represents a simple transaction type of a single signer that
4633
+ * can be submitted to Aptos chain for execution.
4273
4634
  *
4274
- * @param args.accountAddress The account address we want to get the total count for
4275
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4276
- * @returns Current count of the aggregated count of all account's coins
4635
+ * SimpleTransaction metadata contains the Raw Transaction and an optional
4636
+ * sponsor Account Address to pay the gas fees.
4637
+ *
4638
+ * @param rawTransaction The Raw Tranasaction
4639
+ * @param feePayerAddress The sponsor Account Address
4277
4640
  */
4278
- getAccountCoinsCount(args: {
4279
- accountAddress: AccountAddressInput;
4280
- minimumLedgerVersion?: AnyNumber;
4281
- }): Promise<number>;
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 = {
4282
4796
  /**
4283
- * Queries the account's APT amount
4284
- *
4285
- * @param args.accountAddress The account address we want to get the total count for
4286
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4287
- * @returns Current amount of account's APT
4797
+ * The transaction to simulate, probably generated by `generateTransaction()`
4288
4798
  */
4289
- getAccountAPTAmount(args: {
4290
- accountAddress: AccountAddressInput;
4291
- minimumLedgerVersion?: AnyNumber;
4292
- }): Promise<number>;
4799
+ transaction: AnyRawTransaction;
4293
4800
  /**
4294
- * Queries the account's coin amount by the coin type
4295
- *
4296
- * @param args.accountAddress The account address we want to get the total count for
4297
- * @param args.coinType The coin type to query
4298
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4299
- * @returns Current amount of account's coin
4801
+ * For a single signer transaction
4300
4802
  */
4301
- getAccountCoinAmount(args: {
4302
- accountAddress: AccountAddressInput;
4303
- coinType: MoveStructId;
4304
- minimumLedgerVersion?: AnyNumber;
4305
- }): Promise<number>;
4803
+ signerPublicKey: PublicKey;
4306
4804
  /**
4307
- * Queries an account's owned objects
4308
- *
4309
- * @param args.accountAddress The account address we want to get the objects for
4310
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
4311
- * @param args.options.offset The starting position to start returning results from
4312
- * @param args.options.limit The number of results to return
4313
- * @param args.options.orderBy The order to sort the objects by
4314
- * @returns Objects array with the object data
4805
+ * For a fee payer or multi-agent transaction that requires additional signers in
4315
4806
  */
4316
- getAccountOwnedObjects(args: {
4317
- accountAddress: AccountAddressInput;
4318
- minimumLedgerVersion?: AnyNumber;
4319
- options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
4320
- }): Promise<GetAccountOwnedObjectsResponse>;
4807
+ secondarySignersPublicKeys?: Array<PublicKey>;
4321
4808
  /**
4322
- * Derives an account by providing a private key.
4323
- * This functions resolves the provided private key type and derives the public key from it.
4324
- *
4325
- * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and
4326
- * auth key using the SingleKey scheme locally.
4327
- *
4328
- * If the privateKey is a ED25519 type, it looks up the authentication key on chain, and uses it to resolve
4329
- * whether it is a Legacy ED25519 key or a Unified ED25519 key. It then derives the account based
4330
- * on that.
4331
- *
4332
- * @param args.privateKey An account private key
4333
- * @returns Account type
4809
+ * For a fee payer transaction (aka Sponsored Transaction)
4334
4810
  */
4335
- deriveAccountFromPrivateKey(args: {
4336
- privateKey: PrivateKey;
4337
- }): Promise<Account$1>;
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;
4338
4828
  }
4339
-
4340
4829
  /**
4341
- * Representation of a ChainId that can serialized and deserialized
4830
+ * Interface that holds the user data input when generating a multi-agent transaction
4342
4831
  */
4343
- declare class ChainId extends Serializable {
4344
- readonly chainId: number;
4345
- constructor(chainId: number);
4346
- serialize(serializer: Serializer): void;
4347
- static deserialize(deserializer: Deserializer): ChainId;
4832
+ interface InputGenerateMultiAgentRawTransactionData {
4833
+ sender: AccountAddressInput;
4834
+ data: InputGenerateTransactionPayloadData;
4835
+ secondarySignerAddresses: AccountAddressInput[];
4836
+ options?: InputGenerateTransactionOptions;
4837
+ withFeePayer?: boolean;
4348
4838
  }
4349
-
4350
4839
  /**
4351
- * Representation of an Identifier that can serialized and deserialized.
4352
- * We use Identifier to represent the module "name" in "ModuleId" and
4353
- * the "function name" in "EntryFunction"
4840
+ * Unified type that holds all the user data input interfaces when generating different transaction types
4354
4841
  */
4355
- declare class Identifier extends Serializable {
4356
- identifier: string;
4357
- constructor(identifier: string);
4358
- serialize(serializer: Serializer): void;
4359
- static deserialize(deserializer: Deserializer): Identifier;
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>;
4360
4851
  }
4361
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
+ }
4362
4868
  /**
4363
- * Representation of a ModuleId that can serialized and deserialized
4364
- * ModuleId means the module address (e.g "0x1") and the module name (e.g "coin")
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.
4365
4874
  */
4366
- declare class ModuleId extends Serializable {
4367
- readonly address: AccountAddress;
4368
- readonly name: Identifier;
4875
+ declare class SingleKeyAccount implements Account$1 {
4369
4876
  /**
4370
- * Full name of a module.
4371
- * @param address The account address. e.g "0x1"
4372
- * @param name The module name under the "address". e.g "coin"
4877
+ * Private key associated with the account
4373
4878
  */
4374
- constructor(address: AccountAddress, name: Identifier);
4879
+ readonly privateKey: PrivateKey;
4880
+ readonly publicKey: AnyPublicKey;
4881
+ readonly accountAddress: AccountAddress;
4882
+ readonly signingScheme = SigningScheme.SingleKey;
4883
+ constructor(args: SingleKeySignerConstructorArgs);
4375
4884
  /**
4376
- * Converts a string literal to a ModuleId
4377
- * @param moduleId String literal in format "account_address::module_name", e.g. "0x1::coin"
4378
- * @returns ModuleId
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
4379
4888
  */
4380
- static fromStr(moduleId: MoveModuleId): ModuleId;
4381
- serialize(serializer: Serializer): void;
4382
- static deserialize(deserializer: Deserializer): ModuleId;
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;
4383
4905
  }
4384
4906
 
4385
- declare abstract class TypeTag extends Serializable {
4386
- abstract serialize(serializer: Serializer): void;
4387
- static deserialize(deserializer: Deserializer): TypeTag;
4388
- abstract toString(): string;
4389
- isBool(): this is TypeTagBool;
4390
- isAddress(): this is TypeTagAddress;
4391
- isGeneric(): this is TypeTagGeneric;
4392
- isSigner(): this is TypeTagSigner;
4393
- isVector(): this is TypeTagVector;
4394
- isStruct(): this is TypeTagStruct;
4395
- isU8(): this is TypeTagU8;
4396
- isU16(): this is TypeTagU16;
4397
- isU32(): this is TypeTagU32;
4398
- isU64(): this is TypeTagU64;
4399
- isU128(): this is TypeTagU128;
4400
- isU256(): this is TypeTagU256;
4401
- }
4402
- declare class TypeTagBool extends TypeTag {
4403
- toString(): string;
4404
- serialize(serializer: Serializer): void;
4405
- static load(_deserializer: Deserializer): TypeTagBool;
4406
- }
4407
- declare class TypeTagU8 extends TypeTag {
4408
- toString(): string;
4409
- serialize(serializer: Serializer): void;
4410
- static load(_deserializer: Deserializer): TypeTagU8;
4411
- }
4412
- declare class TypeTagU16 extends TypeTag {
4413
- toString(): string;
4414
- serialize(serializer: Serializer): void;
4415
- static load(_deserializer: Deserializer): TypeTagU16;
4416
- }
4417
- declare class TypeTagU32 extends TypeTag {
4418
- toString(): string;
4419
- serialize(serializer: Serializer): void;
4420
- static load(_deserializer: Deserializer): TypeTagU32;
4421
- }
4422
- declare class TypeTagU64 extends TypeTag {
4423
- toString(): string;
4424
- serialize(serializer: Serializer): void;
4425
- static load(_deserializer: Deserializer): TypeTagU64;
4426
- }
4427
- declare class TypeTagU128 extends TypeTag {
4428
- toString(): string;
4429
- serialize(serializer: Serializer): void;
4430
- static load(_deserializer: Deserializer): TypeTagU128;
4431
- }
4432
- declare class TypeTagU256 extends TypeTag {
4433
- toString(): string;
4434
- serialize(serializer: Serializer): void;
4435
- static load(_deserializer: Deserializer): TypeTagU256;
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;
4436
4916
  }
4437
- declare class TypeTagAddress extends TypeTag {
4438
- toString(): string;
4439
- serialize(serializer: Serializer): void;
4440
- static load(_deserializer: Deserializer): TypeTagAddress;
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;
4441
4926
  }
4442
- declare class TypeTagSigner extends TypeTag {
4443
- toString(): string;
4444
- serialize(serializer: Serializer): void;
4445
- static load(_deserializer: Deserializer): TypeTagSigner;
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;
4446
4936
  }
4447
- declare class TypeTagReference extends TypeTag {
4448
- readonly value: TypeTag;
4449
- toString(): `&${string}`;
4450
- constructor(value: TypeTag);
4451
- serialize(serializer: Serializer): void;
4452
- static load(deserializer: Deserializer): TypeTagReference;
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;
4453
4945
  }
4454
4946
  /**
4455
- * Generics are used for type parameters in entry functions. However,
4456
- * they are not actually serialized into a real type, so they cannot be
4457
- * used as a type directly.
4947
+ * Arguments for generating an `Ed25519Account`.
4948
+ * This is the input type used by default.
4458
4949
  */
4459
- declare class TypeTagGeneric extends TypeTag {
4460
- readonly value: number;
4461
- toString(): `T${number}`;
4462
- constructor(value: number);
4463
- serialize(serializer: Serializer): void;
4464
- static load(deserializer: Deserializer): TypeTagGeneric;
4950
+ interface GenerateEd25519AccountArgs {
4951
+ scheme?: SigningSchemeInput.Ed25519;
4952
+ legacy?: true;
4465
4953
  }
4466
- declare class TypeTagVector extends TypeTag {
4467
- readonly value: TypeTag;
4468
- toString(): `vector<${string}>`;
4469
- constructor(value: TypeTag);
4470
- static u8(): TypeTagVector;
4471
- serialize(serializer: Serializer): void;
4472
- static load(deserializer: Deserializer): TypeTagVector;
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;
4473
4962
  }
4474
- declare class TypeTagStruct extends TypeTag {
4475
- readonly value: StructTag;
4476
- toString(): `0x${string}::${string}::${string}`;
4477
- constructor(value: StructTag);
4478
- serialize(serializer: Serializer): void;
4479
- static load(deserializer: Deserializer): TypeTagStruct;
4480
- isTypeTag(address: AccountAddress, moduleName: string, structName: string): boolean;
4481
- isString(): boolean;
4482
- isOption(): boolean;
4483
- isObject(): boolean;
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;
4484
4971
  }
4485
- declare class StructTag extends Serializable {
4486
- readonly address: AccountAddress;
4487
- readonly moduleName: Identifier;
4488
- readonly name: Identifier;
4489
- readonly typeArgs: Array<TypeTag>;
4490
- constructor(address: AccountAddress, module_name: Identifier, name: Identifier, type_args: Array<TypeTag>);
4491
- serialize(serializer: Serializer): void;
4492
- static deserialize(deserializer: Deserializer): StructTag;
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;
4493
4979
  }
4494
- declare function aptosCoinStructTag(): StructTag;
4495
- declare function stringStructTag(): StructTag;
4496
- declare function optionStructTag(typeArg: TypeTag): StructTag;
4497
- declare function objectStructTag(typeArg: TypeTag): StructTag;
4498
-
4499
4980
  /**
4500
- * Deserialize a Script Transaction Argument
4981
+ * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
4501
4982
  */
4502
- declare function deserializeFromScriptArgument(deserializer: Deserializer): TransactionArgument;
4983
+ interface PrivateKeyFromDerivationPathArgs {
4984
+ path: string;
4985
+ mnemonic: string;
4986
+ }
4503
4987
  /**
4504
- * Representation of the supported Transaction Payload
4505
- * that can serialized and deserialized
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.
4506
4996
  */
4507
- declare abstract class TransactionPayload extends Serializable {
4997
+ declare abstract class Account$1 {
4508
4998
  /**
4509
- * Serialize a Transaction Payload
4999
+ * Public key associated with the account
4510
5000
  */
4511
- abstract serialize(serializer: Serializer): void;
5001
+ abstract readonly publicKey: AccountPublicKey;
4512
5002
  /**
4513
- * Deserialize a Transaction Payload
5003
+ * Account address associated with the account
4514
5004
  */
4515
- static deserialize(deserializer: Deserializer): TransactionPayload;
5005
+ abstract readonly accountAddress: AccountAddress;
5006
+ /**
5007
+ * Signing scheme used to sign transactions
5008
+ */
5009
+ abstract signingScheme: SigningScheme;
5010
+ /**
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
5015
+ */
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;
5020
+ /**
5021
+ * Creates an account from the provided private key.
5022
+ *
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
5026
+ */
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;
5031
+ /**
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.
5035
+ *
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
5040
+ *
5041
+ * @returns Account
5042
+ */
5043
+ static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account$1;
5044
+ /**
5045
+ * Derives an account with bip44 path and mnemonics
5046
+ *
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
5052
+ */
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;
5057
+ /**
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}
5062
+ *
5063
+ * @param args.publicKey PublicKey - public key of the account
5064
+ * @returns The authentication key for the associated account
5065
+ */
5066
+ static authKey(args: {
5067
+ publicKey: AccountPublicKey;
5068
+ }): AuthenticationKey;
5069
+ /**
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
5073
+ */
5074
+ abstract signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
5075
+ /**
5076
+ * Sign the given message with the private key.
5077
+ * @param message in HexInput format
5078
+ * @returns AccountSignature
5079
+ */
5080
+ abstract sign(message: HexInput): Signature;
5081
+ abstract signTransaction(transaction: AnyRawTransaction): Signature;
5082
+ /**
5083
+ * @param args.message raw message data in HexInput format
5084
+ * @param args.signature signed message signature
5085
+ */
5086
+ verifySignature(args: VerifySignatureArgs): boolean;
4516
5087
  }
4517
- /**
4518
- * Representation of a Transaction Payload Script that can serialized and deserialized
4519
- */
4520
- declare class TransactionPayloadScript extends TransactionPayload {
4521
- readonly script: Script;
4522
- constructor(script: Script);
4523
- serialize(serializer: Serializer): void;
4524
- static load(deserializer: Deserializer): TransactionPayloadScript;
5088
+
5089
+ interface Ed25519SignerConstructorArgs {
5090
+ privateKey: Ed25519PrivateKey;
5091
+ address?: AccountAddressInput;
4525
5092
  }
4526
- /**
4527
- * Representation of a Transaction Payload Entry Function that can serialized and deserialized
4528
- */
4529
- declare class TransactionPayloadEntryFunction extends TransactionPayload {
4530
- readonly entryFunction: EntryFunction;
4531
- constructor(entryFunction: EntryFunction);
4532
- serialize(serializer: Serializer): void;
4533
- static load(deserializer: Deserializer): TransactionPayloadEntryFunction;
5093
+ interface Ed25519SignerFromDerivationPathArgs {
5094
+ path: string;
5095
+ mnemonic: string;
4534
5096
  }
4535
- /**
4536
- * Representation of a Transaction Payload Multi-sig that can serialized and deserialized
4537
- */
4538
- declare class TransactionPayloadMultiSig extends TransactionPayload {
4539
- readonly multiSig: MultiSig;
4540
- constructor(multiSig: MultiSig);
4541
- serialize(serializer: Serializer): void;
4542
- static load(deserializer: Deserializer): TransactionPayloadMultiSig;
5097
+ interface VerifyEd25519SignatureArgs {
5098
+ message: HexInput;
5099
+ signature: Ed25519Signature;
4543
5100
  }
4544
5101
  /**
4545
- * Representation of a EntryFunction that can serialized and deserialized
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.
4546
5106
  */
4547
- declare class EntryFunction {
4548
- readonly module_name: ModuleId;
4549
- readonly function_name: Identifier;
4550
- readonly type_args: Array<TypeTag>;
4551
- readonly args: Array<EntryFunctionArgument>;
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;
5132
+ }
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;
5156
+ }
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;
5202
+ }
5203
+
5204
+ declare class MultiKeyAccount implements Account$1 {
4552
5205
  /**
4553
- * Contains the payload to run a function within a module.
4554
- * @param module_name Fully qualified module name in format "account_address::module_name" e.g. "0x1::coin"
4555
- * @param function_name The function name. e.g "transfer"
4556
- * @param type_args Type arguments that move function requires.
4557
- *
4558
- * @example
4559
- * A coin transfer function has one type argument "CoinType".
4560
- * ```
4561
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4562
- * ```
4563
- * @param args arguments to the move function.
4564
- *
4565
- * @example
4566
- * A coin transfer function has three arguments "from", "to" and "amount".
4567
- * ```
4568
- * public entry fun transfer<CoinType>(from: &signer, to: address, amount: u64)
4569
- * ```
5206
+ * Public key associated with the account
4570
5207
  */
4571
- constructor(module_name: ModuleId, function_name: Identifier, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>);
5208
+ readonly publicKey: MultiKey;
4572
5209
  /**
4573
- * A helper function to build a EntryFunction payload from raw primitive values
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
4574
5221
  *
4575
- * @param module_id Fully qualified module name in format "AccountAddress::module_id" e.g. "0x1::coin"
4576
- * @param function_name Function name
4577
- * @param type_args Type arguments that move function requires.
5222
+ * Need to update this to use the new crypto library if new schemes are added.
4578
5223
  *
4579
- * @example
4580
- * A coin transfer function has one type argument "CoinType".
4581
- * ```
4582
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4583
- * ```
4584
- * @param args Arguments to the move function.
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.
4585
5228
  *
4586
- * @example
4587
- * A coin transfer function has three arguments "from", "to" and "amount".
4588
- * ```
4589
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4590
- * ```
4591
- * @returns EntryFunction
5229
+ * This method is private because it should only be called by the factory static methods.
5230
+ * @returns Account
4592
5231
  */
4593
- static build(module_id: MoveModuleId, function_name: string, type_args: Array<TypeTag>, args: Array<EntryFunctionArgument>): EntryFunction;
4594
- serialize(serializer: Serializer): void;
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>;
4595
5244
  /**
4596
- * Deserializes an entry function payload with the arguments represented as EntryFunctionBytes instances.
4597
- * @see EntryFunctionBytes
4598
- *
4599
- * NOTE: When you deserialize an EntryFunction payload with this method, the entry function
4600
- * arguments are populated into the deserialized instance as type-agnostic, raw fixed bytes
4601
- * in the form of the EntryFunctionBytes class.
4602
- *
4603
- * In order to correctly deserialize these arguments as their actual type representations, you
4604
- * must know the types of the arguments beforehand and deserialize them yourself individually.
5245
+ * Sign the given message with the private key.
4605
5246
  *
4606
- * One way you could achieve this is by using the ABIs for an entry function and deserializing each
4607
- * argument as its given, corresponding type.
5247
+ * TODO: Add sign transaction or specific types
4608
5248
  *
4609
- * @param deserializer
4610
- * @returns A deserialized EntryFunction payload for a transaction.
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.
4611
5256
  *
5257
+ * @param args.message raw message data in HexInput format
5258
+ * @param args.signature signed message Signature
5259
+ * @returns
4612
5260
  */
4613
- static deserialize(deserializer: Deserializer): EntryFunction;
5261
+ verifySignature(args: {
5262
+ message: HexInput;
5263
+ signature: Signature;
5264
+ }): boolean;
4614
5265
  }
5266
+
4615
5267
  /**
4616
- * Representation of a Script that can serialized and deserialized
5268
+ * A class to query all `Account` related queries on Aptos.
4617
5269
  */
4618
- declare class Script {
4619
- /**
4620
- * The move module bytecode
4621
- */
4622
- readonly bytecode: Uint8Array;
5270
+ declare class Account {
5271
+ readonly config: AptosConfig;
5272
+ constructor(config: AptosConfig);
4623
5273
  /**
4624
- * The type arguments that the bytecode function requires.
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
+ * ```
4625
5287
  */
4626
- readonly type_args: Array<TypeTag>;
5288
+ getAccountInfo(args: {
5289
+ accountAddress: AccountAddressInput;
5290
+ }): Promise<AccountData>;
4627
5291
  /**
4628
- * The arguments that the bytecode function requires.
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
4629
5303
  */
4630
- readonly args: Array<ScriptFunctionArgument>;
5304
+ getAccountModules(args: {
5305
+ accountAddress: AccountAddressInput;
5306
+ options?: PaginationArgs & LedgerVersionArg;
5307
+ }): Promise<MoveModuleBytecode[]>;
4631
5308
  /**
4632
- * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.
5309
+ * Queries for a specific account module given account address and module name
4633
5310
  *
4634
- * @param bytecode The move module bytecode
4635
- * @param type_args The type arguments that the bytecode function requires.
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
4636
5314
  *
4637
- * @example
4638
- * A coin transfer function has one type argument "CoinType".
4639
- * ```
4640
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
4641
- * ```
4642
- * @param args The arguments that the bytecode function requires.
5315
+ * @returns Account module
4643
5316
  *
4644
5317
  * @example
4645
- * A coin transfer function has three arguments "from", "to" and "amount".
5318
+ * const module = await aptos.getAccountModule({accountAddress:"0x456"})
5319
+ * // An example of an account module response
4646
5320
  * ```
4647
- * public(script) fun transfer<CoinType>(from: &signer, to: address, amount: u64,)
5321
+ * {
5322
+ * bytecode: "0xa11ceb0b0600000006010002030206050807070f0d081c200",
5323
+ * abi: { address: "0x1" }
5324
+ * }
4648
5325
  * ```
4649
5326
  */
4650
- constructor(bytecode: Uint8Array, type_args: Array<TypeTag>, args: Array<ScriptFunctionArgument>);
4651
- serialize(serializer: Serializer): void;
4652
- static deserialize(deserializer: Deserializer): Script;
4653
- }
4654
- /**
4655
- * Representation of a MultiSig that can serialized and deserialized
4656
- */
4657
- declare class MultiSig {
4658
- readonly multisig_address: AccountAddress;
4659
- readonly transaction_payload?: MultiSigTransactionPayload;
5327
+ getAccountModule(args: {
5328
+ accountAddress: AccountAddressInput;
5329
+ moduleName: string;
5330
+ options?: LedgerVersionArg;
5331
+ }): Promise<MoveModuleBytecode>;
4660
5332
  /**
4661
- * Contains the payload to run a multi-sig account transaction.
5333
+ * Queries account transactions given an account address
4662
5334
  *
4663
- * @param multisig_address The multi-sig account address the transaction will be executed as.
5335
+ * Note: In order to get all account transactions, this function may call the API
5336
+ * multiple times as it auto paginates.
4664
5337
  *
4665
- * @param transaction_payload The payload of the multi-sig transaction. This is optional when executing a multi-sig
4666
- * transaction whose payload is already stored on chain.
4667
- */
4668
- constructor(multisig_address: AccountAddress, transaction_payload?: MultiSigTransactionPayload);
4669
- serialize(serializer: Serializer): void;
4670
- static deserialize(deserializer: Deserializer): MultiSig;
4671
- }
4672
- /**
4673
- * Representation of a MultiSig Transaction Payload from `multisig_account.move`
4674
- * that can be serialized and deserialized
4675
-
4676
- * This class exists right now to represent an extensible transaction payload class for
4677
- * transactions used in `multisig_account.move`. Eventually, this class will be able to
4678
- * support script payloads when the `multisig_account.move` module supports them.
4679
- */
4680
- declare class MultiSigTransactionPayload extends Serializable {
4681
- readonly transaction_payload: EntryFunction;
4682
- /**
4683
- * Contains the payload to run a multi-sig account transaction.
5338
+ * @example
5339
+ * const transactions = await aptos.getAccountTransactions({accountAddress:"0x456"})
4684
5340
  *
4685
- * @param transaction_payload The payload of the multi-sig transaction.
4686
- * This can only be EntryFunction for now but,
4687
- * Script might be supported in the future.
4688
- */
4689
- constructor(transaction_payload: EntryFunction);
4690
- serialize(serializer: Serializer): void;
4691
- static deserialize(deserializer: Deserializer): MultiSigTransactionPayload;
4692
- }
4693
-
4694
- /**
4695
- * Representation of a Raw Transaction that can serialized and deserialized
4696
- */
4697
- declare class RawTransaction extends Serializable {
4698
- readonly sender: AccountAddress;
4699
- readonly sequence_number: bigint;
4700
- readonly payload: TransactionPayload;
4701
- readonly max_gas_amount: bigint;
4702
- readonly gas_unit_price: bigint;
4703
- readonly expiration_timestamp_secs: bigint;
4704
- readonly chain_id: ChainId;
4705
- /**
4706
- * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
4707
- * RawTransactions must be signed before Aptos chain can execute them.
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
4708
5344
  *
4709
- * @param sender The sender Account Address
4710
- * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
4711
- * the sender's account at the time the transaction executes.
4712
- * @param payload Instructions for the Aptos Blockchain, including publishing a module,
4713
- * execute an entry function or execute a script payload.
4714
- * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
4715
- * than this gas or the transaction will be discarded during validation.
4716
- * @param gas_unit_price Price to be paid per gas unit.
4717
- * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
4718
- * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
5345
+ * @returns The account transactions
4719
5346
  */
4720
- constructor(sender: AccountAddress, sequence_number: bigint, payload: TransactionPayload, max_gas_amount: bigint, gas_unit_price: bigint, expiration_timestamp_secs: bigint, chain_id: ChainId);
4721
- serialize(serializer: Serializer): void;
4722
- static deserialize(deserializer: Deserializer): RawTransaction;
4723
- }
4724
- /**
4725
- * Representation of a Raw Transaction With Data that can serialized and deserialized
4726
- */
4727
- declare abstract class RawTransactionWithData extends Serializable {
5347
+ getAccountTransactions(args: {
5348
+ accountAddress: AccountAddressInput;
5349
+ options?: PaginationArgs;
5350
+ }): Promise<TransactionResponse[]>;
4728
5351
  /**
4729
- * Serialize a Raw Transaction With Data
5352
+ * Queries all account resources given an account address
5353
+ *
5354
+ * Note: In order to get all account resources, this function may call the API
5355
+ * multiple times as it auto paginates.
5356
+ *
5357
+ * @example
5358
+ * const resources = await aptos.getAccountResources({accountAddress:"0x456"})
5359
+ *
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
4730
5365
  */
4731
- abstract serialize(serializer: Serializer): void;
5366
+ getAccountResources(args: {
5367
+ accountAddress: AccountAddressInput;
5368
+ options?: PaginationArgs & LedgerVersionArg;
5369
+ }): Promise<MoveResource[]>;
4732
5370
  /**
4733
- * Deserialize a Raw Transaction With Data
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.
5373
+ *
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
5378
+ *
5379
+ * @returns Account resource
5380
+ *
5381
+ * @example
5382
+ * const resource = await aptos.getAccountResource({accountAddress:"0x456"})
5383
+ *
4734
5384
  */
4735
- static deserialize(deserializer: Deserializer): RawTransactionWithData;
4736
- }
4737
- /**
4738
- * Representation of a Multi Agent Transaction that can serialized and deserialized
4739
- */
4740
- declare class MultiAgentRawTransaction extends RawTransactionWithData {
5385
+ getAccountResource<T extends {} = any>(args: {
5386
+ accountAddress: AccountAddressInput;
5387
+ resourceType: MoveStructId;
5388
+ options?: LedgerVersionArg;
5389
+ }): Promise<T>;
4741
5390
  /**
4742
- * The raw transaction
5391
+ * Looks up the account address for a given authentication key
5392
+ *
5393
+ * This handles both if the account's authentication key has been rotated or not.
5394
+ *
5395
+ * @example
5396
+ * const accountAddress = await aptos.lookupOriginalAccountAddress({authenticationKey:account.accountAddress})
5397
+ *
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
4743
5402
  */
4744
- readonly raw_txn: RawTransaction;
5403
+ lookupOriginalAccountAddress(args: {
5404
+ authenticationKey: AccountAddressInput;
5405
+ minimumLedgerVersion?: AnyNumber;
5406
+ options?: LedgerVersionArg;
5407
+ }): Promise<AccountAddress>;
4745
5408
  /**
4746
- * The secondary signers on this transaction
5409
+ * Queries the current count of tokens owned by an account
5410
+ *
5411
+ * @example
5412
+ * const tokensCount = await aptos.getAccountTokensCount({accountAddress:"0x456"})
5413
+ *
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
4747
5417
  */
4748
- readonly secondary_signer_addresses: Array<AccountAddress>;
4749
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>);
4750
- serialize(serializer: Serializer): void;
4751
- static load(deserializer: Deserializer): MultiAgentRawTransaction;
4752
- }
4753
- /**
4754
- * Representation of a Fee Payer Transaction that can serialized and deserialized
4755
- */
4756
- declare class FeePayerRawTransaction extends RawTransactionWithData {
5418
+ getAccountTokensCount(args: {
5419
+ accountAddress: AccountAddressInput;
5420
+ minimumLedgerVersion?: AnyNumber;
5421
+ }): Promise<number>;
4757
5422
  /**
4758
- * The raw transaction
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"})
5430
+ *
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
4759
5438
  */
4760
- readonly raw_txn: RawTransaction;
5439
+ getAccountOwnedTokens(args: {
5440
+ accountAddress: AccountAddressInput;
5441
+ minimumLedgerVersion?: AnyNumber;
5442
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;
5443
+ }): Promise<GetAccountOwnedTokensQueryResponse>;
4761
5444
  /**
4762
- * The secondary signers on this transaction - optional and can be empty
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"})
5452
+ *
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
4763
5461
  */
4764
- readonly secondary_signer_addresses: Array<AccountAddress>;
5462
+ getAccountOwnedTokensFromCollectionAddress(args: {
5463
+ accountAddress: AccountAddressInput;
5464
+ collectionAddress: AccountAddressInput;
5465
+ minimumLedgerVersion?: AnyNumber;
5466
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;
5467
+ }): Promise<GetAccountOwnedTokensFromCollectionResponse>;
4765
5468
  /**
4766
- * The fee payer account address
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
4767
5484
  */
4768
- readonly fee_payer_address: AccountAddress;
4769
- constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>, fee_payer_address: AccountAddress);
4770
- serialize(serializer: Serializer): void;
4771
- static load(deserializer: Deserializer): FeePayerRawTransaction;
4772
- }
4773
-
4774
- /**
4775
- * Representation of a SimpleTransaction that can serialized and deserialized
4776
- */
4777
- declare class SimpleTransaction extends Serializable {
4778
- rawTransaction: RawTransaction;
4779
- feePayerAddress?: AccountAddress | undefined;
4780
- readonly secondarySignerAddresses: undefined;
5485
+ getAccountCollectionsWithOwnedTokens(args: {
5486
+ accountAddress: AccountAddressInput;
5487
+ minimumLedgerVersion?: AnyNumber;
5488
+ options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;
5489
+ }): Promise<GetAccountCollectionsWithOwnedTokenResponse>;
4781
5490
  /**
4782
- * SimpleTransaction represents a simple transaction type of a single signer that
4783
- * can be submitted to Aptos chain for execution.
5491
+ * Queries the current count of transactions submitted by an account
4784
5492
  *
4785
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4786
- * sponsor Account Address to pay the gas fees.
5493
+ * @example
5494
+ * const accountTransactionsCount = await aptos.getAccountTransactionsCount({accountAddress:"0x123"})
4787
5495
  *
4788
- * @param rawTransaction The Raw Tranasaction
4789
- * @param feePayerAddress The sponsor Account Address
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
4790
5499
  */
4791
- constructor(rawTransaction: RawTransaction, feePayerAddress?: AccountAddress);
4792
- serialize(serializer: Serializer): void;
4793
- static deserialize(deserializer: Deserializer): SimpleTransaction;
4794
- }
4795
-
4796
- /**
4797
- * Representation of the challenge which is needed to sign by owner of the account
4798
- * to rotate the authentication key.
4799
- */
4800
- declare class RotationProofChallenge extends Serializable {
4801
- readonly accountAddress: AccountAddress;
4802
- readonly moduleName: MoveString;
4803
- readonly structName: MoveString;
4804
- readonly originator: AccountAddress;
4805
- readonly currentAuthKey: AccountAddress;
4806
- readonly newPublicKey: MoveVector<U8>;
4807
- readonly sequenceNumber: U64;
4808
- constructor(args: {
4809
- sequenceNumber: AnyNumber;
4810
- originator: AccountAddress;
4811
- currentAuthKey: AccountAddress;
4812
- newPublicKey: PublicKey;
4813
- });
4814
- serialize(serializer: Serializer): void;
4815
- }
4816
-
4817
- declare abstract class TransactionAuthenticator extends Serializable {
4818
- abstract serialize(serializer: Serializer): void;
4819
- static deserialize(deserializer: Deserializer): TransactionAuthenticator;
4820
- }
4821
- /**
4822
- * Transaction authenticator Ed25519 for a single signer transaction
4823
- *
4824
- * @param public_key Client's public key.
4825
- * @param signature Ed25519 signature of a raw transaction.
4826
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
4827
- * for details about generating a signature.
4828
- */
4829
- declare class TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
4830
- readonly public_key: Ed25519PublicKey;
4831
- readonly signature: Ed25519Signature;
4832
- constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature);
4833
- serialize(serializer: Serializer): void;
4834
- static load(deserializer: Deserializer): TransactionAuthenticatorEd25519;
4835
- }
4836
- /**
4837
- * Transaction authenticator Ed25519 for a multi signers transaction
4838
- *
4839
- * @param public_key Client's public key.
4840
- * @param signature Multi Ed25519 signature of a raw transaction.
4841
- *
4842
- */
4843
- declare class TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
4844
- readonly public_key: MultiEd25519PublicKey;
4845
- readonly signature: MultiEd25519Signature;
4846
- constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature);
4847
- serialize(serializer: Serializer): void;
4848
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiEd25519;
4849
- }
4850
- /**
4851
- * Transaction authenticator for a multi-agent transaction
4852
- *
4853
- * @param sender Sender account authenticator
4854
- * @param secondary_signer_addresses Secondary signers address
4855
- * @param secondary_signers Secondary signers account authenticators
4856
- *
4857
- */
4858
- declare class TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
4859
- readonly sender: AccountAuthenticator;
4860
- readonly secondary_signer_addresses: Array<AccountAddress>;
4861
- readonly secondary_signers: Array<AccountAuthenticator>;
4862
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>);
4863
- serialize(serializer: Serializer): void;
4864
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4865
- }
4866
- /**
4867
- * Transaction authenticator for a fee payer transaction
4868
- *
4869
- * @param sender Sender account authenticator
4870
- * @param secondary_signer_addresses Secondary signers address
4871
- * @param secondary_signers Secondary signers account authenticators
4872
- * @param fee_payer Object of the fee payer account address and the fee payer authentication
4873
- *
4874
- */
4875
- declare class TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
4876
- readonly sender: AccountAuthenticator;
4877
- readonly secondary_signer_addresses: Array<AccountAddress>;
4878
- readonly secondary_signers: Array<AccountAuthenticator>;
4879
- readonly fee_payer: {
4880
- address: AccountAddress;
4881
- authenticator: AccountAuthenticator;
4882
- };
4883
- constructor(sender: AccountAuthenticator, secondary_signer_addresses: Array<AccountAddress>, secondary_signers: Array<AccountAuthenticator>, fee_payer: {
4884
- address: AccountAddress;
4885
- authenticator: AccountAuthenticator;
4886
- });
4887
- serialize(serializer: Serializer): void;
4888
- static load(deserializer: Deserializer): TransactionAuthenticatorMultiAgent;
4889
- }
4890
- /**
4891
- * Single Sender authenticator for a single signer transaction
4892
- *
4893
- * @param sender AccountAuthenticator
4894
- */
4895
- declare class TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
4896
- readonly sender: AccountAuthenticator;
4897
- constructor(sender: AccountAuthenticator);
4898
- serialize(serializer: Serializer): void;
4899
- static load(deserializer: Deserializer): TransactionAuthenticatorSingleSender;
4900
- }
4901
-
4902
- declare class SignedTransaction extends Serializable {
4903
- readonly raw_txn: RawTransaction;
4904
- readonly authenticator: TransactionAuthenticator;
5500
+ getAccountTransactionsCount(args: {
5501
+ accountAddress: AccountAddressInput;
5502
+ minimumLedgerVersion?: AnyNumber;
5503
+ }): Promise<number>;
4905
5504
  /**
4906
- * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
4907
- * contains a client's public key and the signature of the raw transaction.
5505
+ * Queries an account's coins data
4908
5506
  *
4909
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
5507
+ * @example
5508
+ * const accountCoinsData = await aptos.getAccountCoinsData({accountAddress:"0x123"})
4910
5509
  *
4911
- * @param raw_txn
4912
- * @param authenticator Contains a client's public key and the signature of the raw transaction.
4913
- * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
4914
- * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
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
4915
5517
  */
4916
- constructor(raw_txn: RawTransaction, authenticator: TransactionAuthenticator);
4917
- serialize(serializer: Serializer): void;
4918
- static deserialize(deserializer: Deserializer): SignedTransaction;
4919
- }
4920
-
4921
- /**
4922
- * Representation of a Raw Transaction that can serialized and deserialized
4923
- */
4924
- declare class MultiAgentTransaction extends Serializable {
4925
- rawTransaction: RawTransaction;
4926
- feePayerAddress?: AccountAddress | undefined;
4927
- secondarySignerAddresses: AccountAddress[];
5518
+ getAccountCoinsData(args: {
5519
+ accountAddress: AccountAddressInput;
5520
+ minimumLedgerVersion?: AnyNumber;
5521
+ options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
5522
+ }): Promise<GetAccountCoinsDataResponse>;
4928
5523
  /**
4929
- * SimpleTransaction represents a simple transaction type of a single signer that
4930
- * can be submitted to Aptos chain for execution.
5524
+ * Queries the current count of an account's coins aggregated
4931
5525
  *
4932
- * SimpleTransaction metadata contains the Raw Transaction and an optional
4933
- * sponsor Account Address to pay the gas fees.
5526
+ * @example
5527
+ * const accountCoinsCount = await aptos.getAccountCoinsCount({accountAddress:"0x123"})
4934
5528
  *
4935
- * @param rawTransaction The Raw Tranasaction
4936
- * @param feePayerAddress The sponsor Account Address
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
4937
5532
  */
4938
- constructor(rawTransaction: RawTransaction, secondarySignerAddresses: AccountAddress[], feePayerAddress?: AccountAddress);
4939
- serialize(serializer: Serializer): void;
4940
- static deserialize(deserializer: Deserializer): MultiAgentTransaction;
4941
- }
4942
-
4943
- /**
4944
- * Entry function arguments to be used when building a raw transaction using remote ABI
4945
- */
4946
- type SimpleEntryFunctionArgumentTypes = boolean | number | bigint | string | null | undefined | Uint8Array | ArrayBuffer | Array<SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes>;
4947
- /**
4948
- * Entry function arguments to be used when building a raw transaction using BCS serialized arguments
4949
- */
4950
- type EntryFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<EntryFunctionArgumentTypes> | MoveOption<EntryFunctionArgumentTypes> | MoveString | FixedBytes;
4951
- /**
4952
- * Script function arguments to be used when building a raw transaction using BCS serialized arguments
4953
- */
4954
- type ScriptFunctionArgumentTypes = Bool | U8 | U16 | U32 | U64 | U128 | U256 | AccountAddress | MoveVector<U8> | MoveString | FixedBytes;
4955
- /**
4956
- * Type that holds all raw transaction instances Aptos SDK supports
4957
- */
4958
- type AnyRawTransactionInstance = RawTransaction | MultiAgentRawTransaction | FeePayerRawTransaction;
4959
- /**
4960
- * Optional options to set when generating a transaction
4961
- */
4962
- type InputGenerateTransactionOptions = {
4963
- maxGasAmount?: number;
4964
- gasUnitPrice?: number;
4965
- expireTimestamp?: number;
4966
- accountSequenceNumber?: AnyNumber;
4967
- };
4968
- /**
4969
- * The generated transaction payload type that was produces from `generateTransactionPayload()` function.
4970
- */
4971
- type AnyTransactionPayloadInstance = TransactionPayloadEntryFunction | TransactionPayloadScript | TransactionPayloadMultiSig;
4972
- /**
4973
- * Unified type for the data needed to generate a transaction payload of types:
4974
- * Entry Function | Script | Multi Sig
4975
- */
4976
- type InputGenerateTransactionPayloadData = InputEntryFunctionData | InputScriptData | InputMultiSigData;
4977
- type InputGenerateTransactionPayloadDataWithRemoteABI = InputScriptData | InputEntryFunctionDataWithRemoteABI | InputMultiSigDataWithRemoteABI;
4978
- /**
4979
- * The data needed to generate an Entry Function payload
4980
- */
4981
- type InputEntryFunctionData = {
4982
- function: MoveFunctionId;
4983
- typeArguments?: Array<TypeTag | string>;
4984
- functionArguments: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
4985
- abi?: EntryFunctionABI;
4986
- };
4987
- type InputGenerateTransactionPayloadDataWithABI = InputEntryFunctionDataWithABI | InputMultiSigDataWithABI;
4988
- type InputEntryFunctionDataWithABI = Omit<InputEntryFunctionData, "abi"> & {
4989
- abi: EntryFunctionABI;
4990
- };
4991
- type InputMultiSigDataWithABI = {
4992
- multisigAddress: AccountAddressInput;
4993
- } & InputEntryFunctionDataWithABI;
4994
- type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
4995
- aptosConfig: AptosConfig;
4996
- };
4997
- /**
4998
- * The data needed to generate a Multi Sig payload
4999
- */
5000
- type InputMultiSigData = {
5001
- multisigAddress: AccountAddressInput;
5002
- } & InputEntryFunctionData;
5003
- /**
5004
- * The data needed to generate a Multi Sig payload
5005
- */
5006
- type InputMultiSigDataWithRemoteABI = {
5007
- multisigAddress: AccountAddressInput;
5008
- } & InputEntryFunctionDataWithRemoteABI;
5009
- /**
5010
- * The data needed to generate a Script payload
5011
- */
5012
- type InputScriptData = {
5013
- bytecode: HexInput;
5014
- typeArguments?: Array<TypeTag>;
5015
- functionArguments: Array<ScriptFunctionArgumentTypes>;
5016
- };
5017
- /**
5018
- * The data needed to generate a View Function payload
5019
- */
5020
- type InputViewFunctionData = {
5021
- function: MoveFunctionId;
5022
- typeArguments?: Array<TypeTag | string>;
5023
- functionArguments?: Array<EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes>;
5024
- abi?: ViewFunctionABI;
5025
- };
5026
- /**
5027
- * Data needed to generate a view function payload and fetch the remote ABI
5028
- */
5029
- type InputViewFunctionDataWithRemoteABI = InputViewFunctionData & {
5030
- aptosConfig: AptosConfig;
5031
- };
5032
- /**
5033
- * Data needed to generate a view function, with an already fetched ABI
5034
- */
5035
- type InputViewFunctionDataWithABI = InputViewFunctionData & {
5036
- abi: ViewFunctionABI;
5037
- };
5038
- /**
5039
- * Data need for a generic function ABI, both view and entry
5040
- */
5041
- type FunctionABI = {
5042
- typeParameters: Array<MoveFunctionGenericTypeParam>;
5043
- parameters: Array<TypeTag>;
5044
- };
5045
- /**
5046
- * Interface of an Entry function's ABI.
5047
- *
5048
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
5049
- */
5050
- type EntryFunctionABI = FunctionABI & {
5051
- signers?: number;
5052
- };
5053
- /**
5054
- * Interface of an View function's ABI.
5055
- *
5056
- * This is used to provide type checking and simple input conversion on ABI based transaction submission.
5057
- */
5058
- type ViewFunctionABI = FunctionABI & {
5059
- returnTypes: Array<TypeTag>;
5060
- };
5061
- /**
5062
- * Interface of the arguments to generate a single signer transaction.
5063
- * Used to provide to `generateTransaction()` method in the transaction builder flow
5064
- */
5065
- interface InputGenerateSingleSignerRawTransactionArgs {
5066
- aptosConfig: AptosConfig;
5067
- sender: AccountAddressInput;
5068
- payload: AnyTransactionPayloadInstance;
5069
- options?: InputGenerateTransactionOptions;
5070
- feePayerAddress?: AccountAddressInput;
5071
- }
5072
- /**
5073
- * Interface of the arguments to generate a multi-agent transaction.
5074
- * Used to provide to `generateTransaction()` method in the transaction builder flow
5075
- */
5076
- interface InputGenerateMultiAgentRawTransactionArgs {
5077
- aptosConfig: AptosConfig;
5078
- sender: AccountAddressInput;
5079
- payload: AnyTransactionPayloadInstance;
5080
- secondarySignerAddresses: AccountAddressInput[];
5081
- options?: InputGenerateTransactionOptions;
5082
- feePayerAddress?: AccountAddressInput;
5083
- }
5084
- /**
5085
- * Unified type that holds all the interfaces to generate different transaction types
5086
- */
5087
- type InputGenerateRawTransactionArgs = InputGenerateSingleSignerRawTransactionArgs | InputGenerateMultiAgentRawTransactionArgs;
5088
- /**
5089
- * Unified type that holds all the return interfaces when generating different transaction types
5090
- */
5091
- type AnyRawTransaction = SimpleTransaction | MultiAgentTransaction;
5092
- type InputSimulateTransactionData = {
5533
+ getAccountCoinsCount(args: {
5534
+ accountAddress: AccountAddressInput;
5535
+ minimumLedgerVersion?: AnyNumber;
5536
+ }): Promise<number>;
5093
5537
  /**
5094
- * The transaction to simulate, probably generated by `generateTransaction()`
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
5095
5546
  */
5096
- transaction: AnyRawTransaction;
5547
+ getAccountAPTAmount(args: {
5548
+ accountAddress: AccountAddressInput;
5549
+ minimumLedgerVersion?: AnyNumber;
5550
+ }): Promise<number>;
5097
5551
  /**
5098
- * For a single signer transaction
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
5099
5561
  */
5100
- signerPublicKey: PublicKey;
5562
+ getAccountCoinAmount(args: {
5563
+ accountAddress: AccountAddressInput;
5564
+ coinType: MoveStructId;
5565
+ minimumLedgerVersion?: AnyNumber;
5566
+ }): Promise<number>;
5101
5567
  /**
5102
- * For a fee payer or multi-agent transaction that requires additional signers in
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
5103
5579
  */
5104
- secondarySignersPublicKeys?: Array<PublicKey>;
5580
+ getAccountOwnedObjects(args: {
5581
+ accountAddress: AccountAddressInput;
5582
+ minimumLedgerVersion?: AnyNumber;
5583
+ options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;
5584
+ }): Promise<GetAccountOwnedObjectsResponse>;
5105
5585
  /**
5106
- * For a fee payer transaction (aka Sponsored Transaction)
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
5107
5601
  */
5108
- feePayerPublicKey?: PublicKey;
5109
- options?: InputSimulateTransactionOptions;
5110
- };
5111
- type InputSimulateTransactionOptions = {
5112
- estimateGasUnitPrice?: boolean;
5113
- estimateMaxGasAmount?: boolean;
5114
- estimatePrioritizedGasUnitPrice?: boolean;
5115
- };
5116
- /**
5117
- * Interface that holds the user data input when generating a single signer transaction
5118
- */
5119
- interface InputGenerateSingleSignerRawTransactionData {
5120
- sender: AccountAddressInput;
5121
- data: InputGenerateTransactionPayloadData;
5122
- options?: InputGenerateTransactionOptions;
5123
- withFeePayer?: boolean;
5124
- secondarySignerAddresses?: undefined;
5125
- }
5126
- /**
5127
- * Interface that holds the user data input when generating a multi-agent transaction
5128
- */
5129
- interface InputGenerateMultiAgentRawTransactionData {
5130
- sender: AccountAddressInput;
5131
- data: InputGenerateTransactionPayloadData;
5132
- secondarySignerAddresses: AccountAddressInput[];
5133
- options?: InputGenerateTransactionOptions;
5134
- withFeePayer?: boolean;
5135
- }
5136
- /**
5137
- * Unified type that holds all the user data input interfaces when generating different transaction types
5138
- */
5139
- type InputGenerateTransactionData = InputGenerateSingleSignerRawTransactionData | InputGenerateMultiAgentRawTransactionData;
5140
- /**
5141
- * Interface that holds the user data input when submitting a transaction
5142
- */
5143
- interface InputSubmitTransactionData {
5144
- transaction: AnyRawTransaction;
5145
- senderAuthenticator: AccountAuthenticator;
5146
- feePayerAuthenticator?: AccountAuthenticator;
5147
- additionalSignersAuthenticators?: Array<AccountAuthenticator>;
5602
+ deriveAccountFromPrivateKey(args: {
5603
+ privateKey: PrivateKey;
5604
+ }): Promise<Account$1>;
5148
5605
  }
5149
5606
 
5150
5607
  /**
@@ -5156,6 +5613,13 @@ declare class Coin {
5156
5613
  /**
5157
5614
  * Generate a transfer coin transaction that can be simulated and/or signed and submitted
5158
5615
  *
5616
+ * @example
5617
+ * const transferCoinTransaction = await aptos.transferCoinTransaction({
5618
+ * sender: "0x123",
5619
+ * recipient:"0x456",
5620
+ * amount: 10,
5621
+ * })
5622
+ *
5159
5623
  * @param args.sender The sender account
5160
5624
  * @param args.recipient The recipient address
5161
5625
  * @param args.amount The amount to transfer
@@ -5220,6 +5684,9 @@ declare class DigitalAsset {
5220
5684
  * If, for some reason, a creator account has 2 collections with the same name in v1 and v2,
5221
5685
  * can pass an optional `tokenStandard` parameter to query a specific standard
5222
5686
  *
5687
+ * @example
5688
+ * const collection = await aptos.getCollectionData({creatorAddress:"0x123",collectionName:"myCollection"})
5689
+ *
5223
5690
  * @param args.creatorAddress the address of the collection's creator
5224
5691
  * @param args.collectionName the name of the collection
5225
5692
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5235,6 +5702,9 @@ declare class DigitalAsset {
5235
5702
  /**
5236
5703
  * Queries data of a specific collection by the collection ID.
5237
5704
  *
5705
+ * @example
5706
+ * const collection = await aptos.getCollectionDataByCollectionId({collectionId:"0x123"})
5707
+ *
5238
5708
  * @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
5239
5709
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5240
5710
  * @returns GetCollectionDataResponse response type
@@ -5249,6 +5719,9 @@ declare class DigitalAsset {
5249
5719
  * This is the same as the collection's object address in V2, but V1 does
5250
5720
  * not use objects, and does not have an address
5251
5721
  *
5722
+ * @example
5723
+ * const collection = await aptos.getCollectionId({creatorAddress:"0x123",collectionName:"myCollection"})
5724
+ *
5252
5725
  * @param args.creatorAddress the address of the collection's creator
5253
5726
  * @param args.collectionName the name of the collection
5254
5727
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5264,6 +5737,9 @@ declare class DigitalAsset {
5264
5737
  /**
5265
5738
  * Gets digital asset data given the address of a digital asset.
5266
5739
  *
5740
+ * @example
5741
+ * const digitalAsset = await aptos.getDigitalAssetData({digitalAssetAddress:"0x123"})
5742
+ *
5267
5743
  * @param args.tokenAddress The address of the digital asset
5268
5744
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5269
5745
  * @returns GetTokenDataResponse containing relevant data to the digital asset.
@@ -5275,6 +5751,9 @@ declare class DigitalAsset {
5275
5751
  /**
5276
5752
  * Gets digital asset ownership data given the address of a digital asset.
5277
5753
  *
5754
+ * @example
5755
+ * const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({digitalAssetAddress:"0x123"})
5756
+ *
5278
5757
  * @param args.tokenAddress The address of the digital asset
5279
5758
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5280
5759
  *
@@ -5287,6 +5766,9 @@ declare class DigitalAsset {
5287
5766
  /**
5288
5767
  * Gets the digital assets that the given address owns.
5289
5768
  *
5769
+ * @example
5770
+ * const digitalAssets = await aptos.getOwnedDigitalAssets({ownerAddress:"0x123"})
5771
+ *
5290
5772
  * @param args.ownerAddress The address of the owner
5291
5773
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5292
5774
  *
@@ -5300,6 +5782,9 @@ declare class DigitalAsset {
5300
5782
  /**
5301
5783
  * Gets the activity data given the address of a digital asset.
5302
5784
  *
5785
+ * @example
5786
+ * const digitalAssetActivity = await aptos.getDigitalAssetActivity({digitalAssetAddress:"0x123"})
5787
+ *
5303
5788
  * @param args.tokenAddress The address of the digital asset
5304
5789
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5305
5790
  *
@@ -5313,6 +5798,14 @@ declare class DigitalAsset {
5313
5798
  /**
5314
5799
  * Creates a new collection within the specified account
5315
5800
  *
5801
+ * @example
5802
+ * const transaction = await aptos.createCollectionTransaction({
5803
+ * creator: alice,
5804
+ * description: "collectionDescription",
5805
+ * name: "collectionName",
5806
+ * uri: "collection-uri.com",
5807
+ * });
5808
+ *
5316
5809
  * @param args.creator the account of the collection's creator
5317
5810
  * @param args.description the description of the collection
5318
5811
  * @param args.name the name of the collection
@@ -5346,6 +5839,15 @@ declare class DigitalAsset {
5346
5839
  /**
5347
5840
  * Create a transaction to mint a digital asset into the creators account within an existing collection.
5348
5841
  *
5842
+ * @example
5843
+ * const transaction = await aptos.mintDigitalAssetTransaction({
5844
+ * creator: alice,
5845
+ * description: "collectionDescription",
5846
+ * collection: "collectionName",
5847
+ * name: "digitalAssetName",
5848
+ * uri: "digital-asset-uri.com",
5849
+ * });
5850
+ *
5349
5851
  * @param args.creator the creator of the collection
5350
5852
  * @param args.collection the name of the collection the digital asset belongs to
5351
5853
  * @param args.description the description of the digital asset
@@ -5371,6 +5873,13 @@ declare class DigitalAsset {
5371
5873
  * We can transfer a digital asset only when the digital asset is not frozen
5372
5874
  * (i.e. owner transfer is not disabled such as for soul bound digital assets)
5373
5875
  *
5876
+ * @example
5877
+ * const transaction = await aptos.transferDigitalAssetTransaction({
5878
+ * sender: alice,
5879
+ * digitalAssetAddress: "0x123",
5880
+ * recipient: "0x456",
5881
+ * });
5882
+ *
5374
5883
  * @param args.sender The sender account of the current digital asset owner
5375
5884
  * @param args.digitalAssetAddress The digital asset address
5376
5885
  * @param args.recipient The recipient account address
@@ -5388,6 +5897,16 @@ declare class DigitalAsset {
5388
5897
  /**
5389
5898
  * Mint a soul bound digital asset into a recipient's account
5390
5899
  *
5900
+ * @example
5901
+ * const transaction = await aptos.mintSoulBoundTransaction({
5902
+ * account: alice,
5903
+ * collection: "collectionName",
5904
+ * description: "collectionDescription",
5905
+ * name: "digitalAssetName",
5906
+ * uri: "digital-asset-uri.com",
5907
+ * recipient: "0x123"
5908
+ * });
5909
+ *
5391
5910
  * @param args.account The account that mints the digital asset
5392
5911
  * @param args.collection The collection name that the digital asset belongs to
5393
5912
  * @param args.description The digital asset description
@@ -5406,7 +5925,7 @@ declare class DigitalAsset {
5406
5925
  description: string;
5407
5926
  name: string;
5408
5927
  uri: string;
5409
- recipient: AccountAddress;
5928
+ recipient: AccountAddressInput;
5410
5929
  propertyKeys?: Array<string>;
5411
5930
  propertyTypes?: Array<PropertyType>;
5412
5931
  propertyValues?: Array<PropertyValue>;
@@ -5415,6 +5934,12 @@ declare class DigitalAsset {
5415
5934
  /**
5416
5935
  * Burn a digital asset by its creator
5417
5936
  *
5937
+ * @example
5938
+ * const transaction = await aptos.burnDigitalAssetTransaction({
5939
+ * creator: alice,
5940
+ * digitalAssetAddress: "0x123",
5941
+ * });
5942
+ *
5418
5943
  * @param args.creator The creator account
5419
5944
  * @param args.digitalAssetAddress The digital asset address
5420
5945
  *
@@ -5429,6 +5954,12 @@ declare class DigitalAsset {
5429
5954
  /**
5430
5955
  * Freeze digital asset transfer ability
5431
5956
  *
5957
+ * @example
5958
+ * const transaction = await aptos.freezeDigitalAssetTransaferTransaction({
5959
+ * creator: alice,
5960
+ * digitalAssetAddress: "0x123",
5961
+ * });
5962
+ *
5432
5963
  * @param args.creator The creator account
5433
5964
  * @param args.digitalAssetAddress The digital asset address
5434
5965
  *
@@ -5443,6 +5974,12 @@ declare class DigitalAsset {
5443
5974
  /**
5444
5975
  * Unfreeze digital asset transfer ability
5445
5976
  *
5977
+ * @example
5978
+ * const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({
5979
+ * creator: alice,
5980
+ * digitalAssetAddress: "0x123",
5981
+ * });
5982
+ *
5446
5983
  * @param args.creator The creator account
5447
5984
  * @param args.digitalAssetAddress The digital asset address
5448
5985
  *
@@ -5457,6 +5994,13 @@ declare class DigitalAsset {
5457
5994
  /**
5458
5995
  * Set the digital asset description
5459
5996
  *
5997
+ * @example
5998
+ * const transaction = await aptos.setDigitalAssetDescriptionTransaction({
5999
+ * creator: alice,
6000
+ * description: "digitalAssetDescription",
6001
+ * digitalAssetAddress: "0x123",
6002
+ * });
6003
+ *
5460
6004
  * @param args.creator The creator account
5461
6005
  * @param args.description The digital asset description
5462
6006
  * @param args.digitalAssetAddress The digital asset address
@@ -5473,6 +6017,13 @@ declare class DigitalAsset {
5473
6017
  /**
5474
6018
  * Set the digital asset name
5475
6019
  *
6020
+ * @example
6021
+ * const transaction = await aptos.setDigitalAssetNameTransaction({
6022
+ * creator: alice,
6023
+ * name: "digitalAssetName",
6024
+ * digitalAssetAddress: "0x123",
6025
+ * });
6026
+ *
5476
6027
  * @param args.creator The creator account
5477
6028
  * @param args.name The digital asset name
5478
6029
  * @param args.digitalAssetAddress The digital asset address
@@ -5489,6 +6040,13 @@ declare class DigitalAsset {
5489
6040
  /**
5490
6041
  * Set the digital asset name
5491
6042
  *
6043
+ * @example
6044
+ * const transaction = await aptos.setDigitalAssetURITransaction({
6045
+ * creator: alice,
6046
+ * uri: "digital-asset-uri.com",
6047
+ * digitalAssetAddress: "0x123",
6048
+ * });
6049
+ *
5492
6050
  * @param args.creator The creator account
5493
6051
  * @param args.uri The digital asset uri
5494
6052
  * @param args.digitalAssetAddress The digital asset address
@@ -5505,6 +6063,15 @@ declare class DigitalAsset {
5505
6063
  /**
5506
6064
  * Add a digital asset property
5507
6065
  *
6066
+ * @example
6067
+ * const transaction = await aptos.addDigitalAssetPropertyTransaction({
6068
+ * creator: alice,
6069
+ * propertyKey: "newKey",
6070
+ * propertyType: "BOOLEAN",
6071
+ * propertyValue: true,
6072
+ * digitalAssetAddress: "0x123",
6073
+ * });
6074
+ *
5508
6075
  * @param args.account The account that mints the digital asset
5509
6076
  * @param args.digitalAssetAddress The digital asset address
5510
6077
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5525,6 +6092,15 @@ declare class DigitalAsset {
5525
6092
  /**
5526
6093
  * Remove a digital asset property
5527
6094
  *
6095
+ * @example
6096
+ * const transaction = await aptos.removeDigitalAssetPropertyTransaction({
6097
+ * creator: alice,
6098
+ * propertyKey: "newKey",
6099
+ * propertyType: "BOOLEAN",
6100
+ * propertyValue: true,
6101
+ * digitalAssetAddress: "0x123",
6102
+ * });
6103
+ *
5528
6104
  * @param args.account The account that mints the digital asset
5529
6105
  * @param args.digitalAssetAddress The digital asset address
5530
6106
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5545,6 +6121,15 @@ declare class DigitalAsset {
5545
6121
  /**
5546
6122
  * Update a digital asset property
5547
6123
  *
6124
+ * @example
6125
+ * const transaction = await aptos.updateDigitalAssetPropertyTransaction({
6126
+ * creator: alice,
6127
+ * propertyKey: "newKey",
6128
+ * propertyType: "BOOLEAN",
6129
+ * propertyValue: false,
6130
+ * digitalAssetAddress: "0x123",
6131
+ * });
6132
+ *
5548
6133
  * @param args.account The account that mints the digital asset
5549
6134
  * @param args.digitalAssetAddress The digital asset address
5550
6135
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5565,6 +6150,15 @@ declare class DigitalAsset {
5565
6150
  /**
5566
6151
  * Add a typed digital asset property
5567
6152
  *
6153
+ * @example
6154
+ * const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({
6155
+ * creator: alice,
6156
+ * propertyKey: "typedKey",
6157
+ * propertyType: "STRING",
6158
+ * propertyValue: "hello",
6159
+ * digitalAssetAddress: "0x123",
6160
+ * });
6161
+ *
5568
6162
  * @param args.account The account that mints the digital asset
5569
6163
  * @param args.digitalAssetAddress The digital asset address
5570
6164
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5585,6 +6179,15 @@ declare class DigitalAsset {
5585
6179
  /**
5586
6180
  * Update a typed digital asset property
5587
6181
  *
6182
+ * @example
6183
+ * const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({
6184
+ * creator: alice,
6185
+ * propertyKey: "typedKey",
6186
+ * propertyType: "U8",
6187
+ * propertyValue: 2,
6188
+ * digitalAssetAddress: "0x123",
6189
+ * });
6190
+ *
5588
6191
  * @param args.account The account that mints the digital asset
5589
6192
  * @param args.digitalAssetAddress The digital asset address
5590
6193
  * @param args.propertyKey The property key for storing on-chain properties
@@ -5613,6 +6216,9 @@ declare class Event {
5613
6216
  /**
5614
6217
  * Get module events by event type
5615
6218
  *
6219
+ * @example
6220
+ * const events = await aptos.getModuleEventsByEventType({eventType:"0x1::transaction_fee::FeeStatement"})
6221
+ *
5616
6222
  * @param args.eventType - The event type
5617
6223
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5618
6224
  *
@@ -5626,6 +6232,9 @@ declare class Event {
5626
6232
  /**
5627
6233
  * Get events by creation number and an account address
5628
6234
  *
6235
+ * @example
6236
+ * const events = await aptos.getAccountEventsByCreationNumber({accountAddress:"0x123",creationNumber: 0})
6237
+ *
5629
6238
  * @param args.accountAddress - The account address
5630
6239
  * @param args.creationNumber - The event creation number
5631
6240
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5640,6 +6249,9 @@ declare class Event {
5640
6249
  /**
5641
6250
  * Get events by event type and an account address
5642
6251
  *
6252
+ * @example
6253
+ * const events = await aptos.getAccountEventsByEventType({accountAddress:"0x123",eventType: "0x1::transaction_fee::FeeStatement"})
6254
+ *
5643
6255
  * @param args.accountAddress - The account address
5644
6256
  * @param args.eventType - The event type
5645
6257
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -5656,15 +6268,11 @@ declare class Event {
5656
6268
  * Get all events
5657
6269
  *
5658
6270
  * An optional `where` can be passed in to filter out the response.
5659
- *@param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6271
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5660
6272
  * @example
5661
- * ```
5662
- * { where:
5663
- * {
5664
- * transaction_version: { _eq: 123456 },
5665
- * }
5666
- * }
5667
- * ```
6273
+ * const events = await aptos.getEvents()
6274
+ * // with filtering
6275
+ * const events = await aptos.getEvents({options: { where: { account_address: { _eq: "0x123" } } }});
5668
6276
  *
5669
6277
  * @returns GetEventsQuery response type
5670
6278
  */
@@ -5684,6 +6292,9 @@ declare class Faucet {
5684
6292
  * This creates an account if it does not exist and mints the specified amount of
5685
6293
  * coins into that account
5686
6294
  *
6295
+ * @example
6296
+ * const transaction = await aptos.fundAccount({accountAddress:"0x123", amount: 100})
6297
+ *
5687
6298
  * @param args.accountAddress Address of the account to fund
5688
6299
  * @param args.amount Amount of tokens to fund the account with
5689
6300
  * @param args.options Configuration options for waitForTransaction
@@ -5778,18 +6389,6 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
5778
6389
  */
5779
6390
  declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
5780
6391
  declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey;
5781
- /**
5782
- * Sign a transaction that can later be submitted to chain
5783
- *
5784
- * @param args.signer The signer account to sign the transaction
5785
- * @param args.transaction A aptos transaction type to sign
5786
- *
5787
- * @return The signer AccountAuthenticator
5788
- */
5789
- declare function sign(args: {
5790
- signer: Account$1;
5791
- transaction: AnyRawTransaction;
5792
- }): AccountAuthenticator;
5793
6392
  /**
5794
6393
  * Prepare a transaction to be submitted to chain
5795
6394
  *
@@ -5810,14 +6409,6 @@ declare function hashValues(input: (Uint8Array | string)[]): Uint8Array;
5810
6409
  * @param args InputSubmitTransactionData
5811
6410
  */
5812
6411
  declare function generateUserTransactionHash(args: InputSubmitTransactionData): string;
5813
- /**
5814
- * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
5815
- *
5816
- * @param transaction A aptos transaction type
5817
- *
5818
- * @returns FeePayerRawTransaction | MultiAgentRawTransaction | RawTransaction
5819
- */
5820
- declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTransactionInstance;
5821
6412
  /**
5822
6413
  * Generate a multi signers signed transaction that can be submitted to chain
5823
6414
  *
@@ -5828,7 +6419,6 @@ declare function deriveTransactionType(transaction: AnyRawTransaction): AnyRawTr
5828
6419
  * @returns A SignedTransaction
5829
6420
  */
5830
6421
  declare function generateMultiSignersSignedTransaction(transaction: MultiAgentRawTransaction | FeePayerRawTransaction, senderAuthenticator: AccountAuthenticator, feePayerAuthenticator?: AccountAuthenticator, additionalSignersAuthenticators?: Array<AccountAuthenticator>): Uint8Array;
5831
- declare function generateSigningMessage(transaction: AnyRawTransaction): Uint8Array;
5832
6422
 
5833
6423
  /**
5834
6424
  * Convert type arguments to only type tags, allowing for string representations of type tags
@@ -5870,6 +6460,18 @@ declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string,
5870
6460
  declare function convertArgument(functionName: string, functionAbi: FunctionABI, arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
5871
6461
  declare function checkOrConvertArgument(arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes, param: TypeTag, position: number, genericTypeParams: Array<TypeTag>): EntryFunctionArgumentTypes;
5872
6462
 
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
+
5873
6475
  declare enum TypeTagParserErrorType {
5874
6476
  InvalidTypeTag = "unknown type",
5875
6477
  UnexpectedGenericType = "unexpected generic type",
@@ -5912,7 +6514,11 @@ declare class FungibleAsset {
5912
6514
  /**
5913
6515
  * Queries all fungible asset metadata.
5914
6516
  *
6517
+ * @example
6518
+ * const fungibleAsset = await aptos.getFungibleAssetMetadata()
6519
+ *
5915
6520
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6521
+ * @param args.options Optional configuration for pagination and filtering
5916
6522
  *
5917
6523
  * @returns A list of fungible asset metadata
5918
6524
  */
@@ -5925,6 +6531,9 @@ declare class FungibleAsset {
5925
6531
  *
5926
6532
  * This query returns the fungible asset metadata for a specific fungible asset.
5927
6533
  *
6534
+ * @example
6535
+ * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:"0x123::test_coin::TestCoin"})
6536
+ *
5928
6537
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
5929
6538
  * @param args.assetType The asset type of the fungible asset.
5930
6539
  * e.g
@@ -5940,7 +6549,11 @@ declare class FungibleAsset {
5940
6549
  /**
5941
6550
  * Queries all fungible asset activities
5942
6551
  *
6552
+ * @example
6553
+ * const fungibleAssetActivities = await aptos.getFungibleAssetActivities()
6554
+ *
5943
6555
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6556
+ * @param args.options Optional configuration for pagination and filtering
5944
6557
  *
5945
6558
  * @returns A list of fungible asset metadata
5946
6559
  */
@@ -5951,7 +6564,11 @@ declare class FungibleAsset {
5951
6564
  /**
5952
6565
  * Queries all fungible asset balances
5953
6566
  *
6567
+ * @example
6568
+ * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()
6569
+ *
5954
6570
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6571
+ * @param args.options Optional configuration for pagination and filtering
5955
6572
  *
5956
6573
  * @returns A list of fungible asset metadata
5957
6574
  */
@@ -5960,10 +6577,18 @@ declare class FungibleAsset {
5960
6577
  options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;
5961
6578
  }): Promise<GetCurrentFungibleAssetBalancesResponse>;
5962
6579
  /**
5963
- * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
6580
+ * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
5964
6581
  *
5965
6582
  * Use this method to transfer any fungible asset including fungible token.
5966
6583
  *
6584
+ * @example
6585
+ * const transaction = await aptos.transferFungibleAsset({
6586
+ * sender: alice,
6587
+ * fungibleAssetMetadataAddress: "0x123",
6588
+ * recipient: "0x456",
6589
+ * amount: 5
6590
+ * })
6591
+ *
5967
6592
  * @param sender The sender account
5968
6593
  * @param fungibleAssetMetadataAddress The fungible asset account address.
5969
6594
  * For example if you’re transferring USDT this would be the USDT address
@@ -5974,8 +6599,8 @@ declare class FungibleAsset {
5974
6599
  */
5975
6600
  transferFungibleAsset(args: {
5976
6601
  sender: Account$1;
5977
- fungibleAssetMetadataAddress: AccountAddress;
5978
- recipient: AccountAddress;
6602
+ fungibleAssetMetadataAddress: AccountAddressInput;
6603
+ recipient: AccountAddressInput;
5979
6604
  amount: AnyNumber;
5980
6605
  options?: InputGenerateTransactionOptions;
5981
6606
  }): Promise<SimpleTransaction>;
@@ -5992,7 +6617,9 @@ declare class General {
5992
6617
  *
5993
6618
  * @returns Aptos Ledger Info
5994
6619
  *
5995
- * @example An example of the returned data
6620
+ * @example
6621
+ * const ledgerInfo = await aptos.getLedgerInfo()
6622
+ * // an example of the returned data
5996
6623
  * ```
5997
6624
  * {
5998
6625
  * "chain_id": 4,
@@ -6011,12 +6638,18 @@ declare class General {
6011
6638
  /**
6012
6639
  * Queries for the chain id
6013
6640
  *
6641
+ * @example
6642
+ * const chainId = await aptos.getChainId()
6643
+ *
6014
6644
  * @returns The chain id
6015
6645
  */
6016
6646
  getChainId(): Promise<number>;
6017
6647
  /**
6018
6648
  * Queries for block by transaction version
6019
6649
  *
6650
+ * @example
6651
+ * const block = await aptos.getBlockByVersion({ledgerVersion:5})
6652
+ *
6020
6653
  * @param args.ledgerVersion Ledger version to lookup block information for
6021
6654
  * @param args.options.withTransactions If set to true, include all transactions in the block
6022
6655
  *
@@ -6031,6 +6664,9 @@ declare class General {
6031
6664
  /**
6032
6665
  * Get block by block height
6033
6666
  *
6667
+ * @example
6668
+ * const block = await aptos.getBlockByVersion({blockHeight:5})
6669
+ *
6034
6670
  * @param args.blockHeight Block height to lookup. Starts at 0
6035
6671
  * @param args.options.withTransactions If set to true, include all transactions in the block
6036
6672
  *
@@ -6045,17 +6681,21 @@ declare class General {
6045
6681
  /**
6046
6682
  * Queries for a table item for a table identified by the handle and the key for the item.
6047
6683
  * Key and value types need to be passed in to help with key serialization and value deserialization.
6684
+ *
6685
+ * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
6686
+ * const tableItem = await aptos.getTableItem({
6687
+ * handle: "0x123",
6688
+ * data: {
6689
+ * key_type: "address", // Move type of table key
6690
+ * value_type: "u128", // Move type of table value
6691
+ * key: "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
6692
+ * },
6693
+ * })
6694
+ *
6048
6695
  * @param args.handle A pointer to where that table is stored
6049
6696
  * @param args.data Object that describes table item
6050
6697
  * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
6051
6698
  *
6052
- * @example https://api.devnet.aptoslabs.com/v1/accounts/0x1/resource/0x1::coin::CoinInfo%3C0x1::aptos_coin::AptosCoin%3E
6053
- * {
6054
- * data.key_type = "address" // Move type of table key
6055
- * data.value_type = "u128" // Move type of table value
6056
- * data.key = "0x619dc29a0aac8fa146714058e8dd6d2d0f3bdf5f6331907bf91f3acd81e6935" // Value of table key
6057
- * }
6058
- *
6059
6699
  * @returns Table item value rendered in JSON
6060
6700
  */
6061
6701
  getTableItem<T>(args: {
@@ -6067,14 +6707,15 @@ declare class General {
6067
6707
  * Queries for a Move view function
6068
6708
  * @param args.payload Payload for the view function
6069
6709
  * @param args.options.ledgerVersion The ledger version to query, if not provided it will get the latest version
6710
+ *
6070
6711
  * @example
6071
- * `
6072
- * const payload: ViewRequest = {
6073
- * function: "0x1::coin::balance",
6074
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
6075
- * functionArguments: [accountAddress],
6076
- * };
6077
- * `
6712
+ * const data = await aptos.view({
6713
+ * payload: {
6714
+ * function: "0x1::coin::balance",
6715
+ * typeArguments: ["0x1::aptos_coin::AptosCoin"],
6716
+ * functionArguments: [accountAddress],
6717
+ * }
6718
+ * })
6078
6719
  *
6079
6720
  * @returns an array of Move values
6080
6721
  */
@@ -6085,6 +6726,9 @@ declare class General {
6085
6726
  /**
6086
6727
  * Queries top user transactions
6087
6728
  *
6729
+ * @example
6730
+ * const topUserTransactions = await aptos.getChainTopUserTransactions({limit:5})
6731
+ *
6088
6732
  * @param args.limit The number of transactions to return
6089
6733
  * @returns GetChainTopUserTransactionsResponse
6090
6734
  */
@@ -6096,18 +6740,16 @@ declare class General {
6096
6740
  * For more detailed queries specification see
6097
6741
  * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}
6098
6742
  *
6099
- * @param args.query.query A GraphQL query
6100
- * @param args.query.variables The variables for the query
6101
6743
  * @example
6102
- * ```
6103
- * {
6744
+ * const topUserTransactions = await aptos.queryIndexer({
6104
6745
  * query: `query MyQuery {
6105
- ledger_infos {
6106
- chain_id
6107
- }
6108
- }`;
6109
- * }
6110
- * ```
6746
+ * ledger_infos {
6747
+ * chain_id
6748
+ * }}`;
6749
+ * })
6750
+ *
6751
+ * @param args.query.query A GraphQL query
6752
+ * @param args.query.variables The variables for the query
6111
6753
  *
6112
6754
  * @return The provided T type
6113
6755
  */
@@ -6118,11 +6760,17 @@ declare class General {
6118
6760
  * Queries for the last successful indexer version
6119
6761
  *
6120
6762
  * This is useful to tell what ledger version the indexer is updated to, as it can be behind the full nodes.
6763
+ *
6764
+ * @example
6765
+ * const version = await aptos.getIndexerLastSuccessVersion()
6121
6766
  */
6122
6767
  getIndexerLastSuccessVersion(): Promise<bigint>;
6123
6768
  /**
6124
6769
  * Query the processor status for a specific processor type.
6125
6770
  *
6771
+ * @example
6772
+ * const status = await aptos.getProcessorStatus({processorType:"account_transactions_processor"})
6773
+ *
6126
6774
  * @param processorType The processor type to query
6127
6775
  * @returns
6128
6776
  */
@@ -6179,11 +6827,10 @@ declare class ANS {
6179
6827
  /**
6180
6828
  * Retrieve the owner address of a domain name or subdomain name from the contract.
6181
6829
  *
6182
- * ```ts
6830
+ * @example
6183
6831
  * // Will return the owner address of "test.aptos.apt" or undefined
6184
6832
  * const owner = await aptos.getOwnerAddress({name: "test.aptos"})
6185
6833
  * // owner = 0x123...
6186
- * ```
6187
6834
  *
6188
6835
  * @param args.name - A string of the name to retrieve
6189
6836
  *
@@ -6195,11 +6842,10 @@ declare class ANS {
6195
6842
  /**
6196
6843
  * Retrieve the expiration time of a domain name or subdomain name from the contract.
6197
6844
  *
6198
- * ```ts
6845
+ * @example
6199
6846
  * // Will return the expiration of "test.aptos.apt" or undefined
6200
6847
  * const exp = await aptos.getExpiration({name: "test.aptos"})
6201
6848
  * // new Date(exp) would give you the date in question: 2021-01-01T00:00:00.000Z
6202
- * ```
6203
6849
  *
6204
6850
  * @param args.name - A string of the name to retrieve
6205
6851
  *
@@ -6213,10 +6859,9 @@ declare class ANS {
6213
6859
  * address the name points to for use on chain. Note, the target address can
6214
6860
  * point to addresses that are not the owner of the name
6215
6861
  *
6216
- * ```ts
6862
+ * @example
6217
6863
  * const targetAddr = await aptos.getTargetAddress({name: "test.aptos"})
6218
6864
  * // targetAddr = 0x123...
6219
- * ```
6220
6865
  *
6221
6866
  * @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.
6222
6867
  *
@@ -6230,11 +6875,10 @@ declare class ANS {
6230
6875
  * address the name points to for use on chain. Note, the target address can
6231
6876
  * point to addresses that are not the owner of the name
6232
6877
  *
6233
- * ```ts
6878
+ * @example
6234
6879
  * await aptos.setTargetAddress({sender: alice, name: "test.aptos", address: bob.accountAddress})
6235
6880
  * const address = await aptos.getTargetAddress({name: "test.aptos"})
6236
6881
  * // address = bob.accountAddress
6237
- * ```
6238
6882
  *
6239
6883
  * @param args.name - A string of the name: test.aptos.apt, test.apt, test, test.aptos, etc.
6240
6884
  * @param args.address - A AccountAddressInput of the address to set the domain or subdomain to
@@ -6252,10 +6896,9 @@ declare class ANS {
6252
6896
  * multiple names that target it, but only a single name that is primary. An
6253
6897
  * account also may not have a primary name.
6254
6898
  *
6255
- * ```ts
6899
+ * @example
6256
6900
  * const name = await aptos.getPrimaryName({address: alice.accountAddress})
6257
6901
  * // name = test.aptos
6258
- * ```
6259
6902
  *
6260
6903
  * @param args.address - A AccountAddressInput (address) of the account
6261
6904
  *
@@ -6269,11 +6912,10 @@ declare class ANS {
6269
6912
  * multiple names that target it, but only a single name that is primary. An
6270
6913
  * account also may not have a primary name.
6271
6914
  *
6272
- * ```ts
6915
+ * @example
6273
6916
  * await aptos.setPrimaryName({sender: alice, name: "test.aptos"})
6274
6917
  * const primaryName = await aptos.getPrimaryName({address: alice.accountAddress})
6275
6918
  * // primaryName = test.aptos
6276
- * ```
6277
6919
  *
6278
6920
  * @param args.sender - The sender account
6279
6921
  * @param args.name - A string of the name: test, test.apt, test.aptos, test.aptos.apt, etc.
@@ -6288,7 +6930,7 @@ declare class ANS {
6288
6930
  /**
6289
6931
  * Registers a new name
6290
6932
  *
6291
- * ```ts
6933
+ * @example
6292
6934
  * // An example of registering a subdomain name assuming def.apt is already registered
6293
6935
  * // and belongs to the sender alice.
6294
6936
  * const txn = aptos.registerName({
@@ -6299,7 +6941,6 @@ declare class ANS {
6299
6941
  * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000,
6300
6942
  * },
6301
6943
  * });
6302
- * ```
6303
6944
  *
6304
6945
  * @param args.sender - The sender account
6305
6946
  * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix.
@@ -6326,10 +6967,9 @@ declare class ANS {
6326
6967
  *
6327
6968
  * Note: If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.
6328
6969
  *
6329
- * ```ts
6970
+ * @example
6330
6971
  * await aptos.renewDomain({sender: alice, name: "test"})
6331
6972
  * // test.apt will be renewed for one year
6332
- * ```
6333
6973
  *
6334
6974
  * @param args.sender - The sender account
6335
6975
  * @param args.name - A string of the domain the subdomain will be under. The signer must be the domain owner.
@@ -6418,6 +7058,9 @@ declare class Staking {
6418
7058
  /**
6419
7059
  * Queries current number of delegators in a pool. Throws an error if the pool is not found.
6420
7060
  *
7061
+ * @example
7062
+ * const delegators = await aptos.getNumberOfDelegators({poolAddress:"0x123"})
7063
+ *
6421
7064
  * @param args.poolAddress Pool address
6422
7065
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6423
7066
  * @returns The number of delegators for the given pool
@@ -6429,6 +7072,9 @@ declare class Staking {
6429
7072
  /**
6430
7073
  * Queries current number of delegators in a pool. Throws an error if the pool is not found.
6431
7074
  *
7075
+ * @example
7076
+ * const delegators = await aptos.getNumberOfDelegatorsForAllPools()
7077
+ *
6432
7078
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
6433
7079
  * @returns GetNumberOfDelegatorsForAllPoolsResponse response type
6434
7080
  */
@@ -6439,6 +7085,9 @@ declare class Staking {
6439
7085
  /**
6440
7086
  * Queries delegated staking activities
6441
7087
  *
7088
+ * @example
7089
+ * const delegators = await aptos.getDelegatedStakingActivities({delegatorAddress:"0x123",poolAddress:"0x456"})
7090
+ *
6442
7091
  * @param args.delegatorAddress Delegator address
6443
7092
  * @param args.poolAddress Pool address
6444
7093
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -6889,6 +7538,9 @@ declare class Transaction {
6889
7538
  * Queries on-chain transactions. This function will not return pending
6890
7539
  * transactions. For that, use `getTransactionsByHash`.
6891
7540
  *
7541
+ * @example
7542
+ * const transactions = await aptos.getTransactions()
7543
+ *
6892
7544
  * @param args.options.offset The number transaction to start with
6893
7545
  * @param args.options.limit Number of results to return
6894
7546
  *
@@ -6900,6 +7552,9 @@ declare class Transaction {
6900
7552
  /**
6901
7553
  * Queries on-chain transaction by version. This function will not return pending transactions.
6902
7554
  *
7555
+ * @example
7556
+ * const transaction = await aptos.getTransactions({ledgerVersion:1})
7557
+ *
6903
7558
  * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.
6904
7559
  * @returns On-chain transaction. Only on-chain transactions have versions, so this
6905
7560
  * function cannot be used to query pending transactions.
@@ -6909,6 +7564,10 @@ declare class Transaction {
6909
7564
  }): Promise<TransactionResponse>;
6910
7565
  /**
6911
7566
  * Queries on-chain transaction by transaction hash. This function will return pending transactions.
7567
+ *
7568
+ * @example
7569
+ * const transaction = await aptos.getTransactionByHash({transactionHash:"0x123"})
7570
+ *
6912
7571
  * @param args.transactionHash - Transaction hash should be hex-encoded bytes string with 0x prefix.
6913
7572
  * @returns Transaction from mempool (pending) or on-chain (committed) transaction
6914
7573
  */
@@ -6924,6 +7583,9 @@ declare class Transaction {
6924
7583
  * 2. Apply hash algorithm SHA3-256 to the hash message bytes.
6925
7584
  * 3. Hex-encode the hash bytes with 0x prefix.
6926
7585
  *
7586
+ * @example
7587
+ * const isPendingTransaction = await aptos.isPendingTransaction({transactionHash:"0x123"})
7588
+ *
6927
7589
  * @param args.transactionHash A hash of transaction
6928
7590
  * @returns `true` if transaction is in pending state and `false` otherwise
6929
7591
  */
@@ -6945,6 +7607,8 @@ declare class Transaction {
6945
7607
  * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.
6946
7608
  * - The function will throw a WaitForTransactionError
6947
7609
  *
7610
+ * @example
7611
+ * const transaction = await aptos.waitForTransaction({transactionHash:"0x123"})
6948
7612
  *
6949
7613
  * @param args.transactionHash The hash of a transaction previously submitted to the blockchain.
6950
7614
  * @param args.options.timeoutSecs Timeout in seconds. Defaults to 20 seconds.
@@ -6962,14 +7626,9 @@ declare class Transaction {
6962
7626
  * For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}
6963
7627
  *
6964
7628
  * @returns Object holding the outputs of the estimate gas API
7629
+ *
6965
7630
  * @example
6966
- * ```
6967
- * {
6968
- * gas_estimate: number;
6969
- * deprioritized_gas_estimate?: number;
6970
- * prioritized_gas_estimate?: number;
6971
- * }
6972
- * ```
7631
+ * const gasPrice = await aptos.waitForTransaction()
6973
7632
  */
6974
7633
  getGasPriceEstimation(): Promise<GasEstimation>;
6975
7634
  /**
@@ -6977,6 +7636,11 @@ declare class Transaction {
6977
7636
  *
6978
7637
  * This allows a user to sign a transaction using their own preferred signing method, and
6979
7638
  * then submit it to the network.
7639
+ *
7640
+ * @example
7641
+ * const transaction = await aptos.transaction.build.simple({...})
7642
+ * const message = await aptos.getSigningMessage({transaction})
7643
+ *
6980
7644
  * @param args.transaction A raw transaction for signing elsewhere
6981
7645
  */
6982
7646
  getSigningMessage(args: {
@@ -6989,6 +7653,13 @@ declare class Transaction {
6989
7653
  * `aptos move compile --save-metadata ...`,
6990
7654
  * For more info {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}
6991
7655
  *
7656
+ * @example
7657
+ * const transaction = await aptos.publishPackageTransaction({
7658
+ * account: alice,
7659
+ * metadataBytes,
7660
+ * moduleBytecode: [byteCode],
7661
+ * })
7662
+ *
6992
7663
  * @param args.account The publisher account
6993
7664
  * @param args.metadataBytes The package metadata bytes
6994
7665
  * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order
@@ -7006,6 +7677,13 @@ declare class Transaction {
7006
7677
  * the account.
7007
7678
  * Note: Only legacy Ed25519 scheme is supported for now.
7008
7679
  * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}
7680
+ *
7681
+ * @example
7682
+ * const response = await aptos.rotateAuthKey({
7683
+ * fromAccount: alice,
7684
+ * toNewPrivateKey: new ED25519PublicKey("0x123"),
7685
+ * })
7686
+ *
7009
7687
  * @param args.fromAccount The account to rotate the auth key for
7010
7688
  * @param args.toNewPrivateKey The new private key to rotate to
7011
7689
  *
@@ -7018,6 +7696,13 @@ declare class Transaction {
7018
7696
  /**
7019
7697
  * Sign a transaction that can later be submitted to chain
7020
7698
  *
7699
+ * @example
7700
+ * const transaction = await aptos.transaction.build.simple({...})
7701
+ * const transaction = await aptos.transaction.sign({
7702
+ * signer: alice,
7703
+ * transaction
7704
+ * })
7705
+ *
7021
7706
  * @param args.signer The signer account
7022
7707
  * @param args.transaction A raw transaction to sign on
7023
7708
  *
@@ -7030,6 +7715,13 @@ declare class Transaction {
7030
7715
  /**
7031
7716
  * Sign a transaction as a fee payer that can later be submitted to chain
7032
7717
  *
7718
+ * @example
7719
+ * const transaction = await aptos.transaction.build.simple({...})
7720
+ * const transaction = await aptos.transaction.signAsFeePayer({
7721
+ * signer: alice,
7722
+ * transaction
7723
+ * })
7724
+ *
7033
7725
  * @param args.signer The fee payer signer account
7034
7726
  * @param args.transaction A raw transaction to sign on
7035
7727
  *
@@ -7067,13 +7759,13 @@ declare class Transaction {
7067
7759
  *
7068
7760
  * @param args.signer The signer account to sign the transaction
7069
7761
  * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses
7070
- * ```
7071
- * {
7072
- * rawTransaction: RawTransaction,
7073
- * secondarySignerAddresses? : Array<AccountAddress>,
7074
- * feePayerAddress?: AccountAddress
7075
- * }
7076
- * ```
7762
+ *
7763
+ * @example
7764
+ * const transaction = await aptos.transaction.build.simple({...})
7765
+ * const transaction = await aptos.signAndSubmitTransaction({
7766
+ * signer: alice,
7767
+ * transaction
7768
+ * })
7077
7769
  *
7078
7770
  * @return PendingTransactionResponse
7079
7771
  */
@@ -7083,12 +7775,50 @@ declare class Transaction {
7083
7775
  }): Promise<PendingTransactionResponse>;
7084
7776
  }
7085
7777
 
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
+
7086
7812
  /**
7087
7813
  * This class is the main entry point into Aptos's
7088
7814
  * APIs and separates functionality into different namespaces.
7089
7815
  *
7090
7816
  * To use the SDK, create a new Aptos instance to get access
7091
7817
  * to all the sdk functionality.
7818
+ *
7819
+ * @example
7820
+ *
7821
+ * const aptos = new Aptos();
7092
7822
  */
7093
7823
  declare class Aptos {
7094
7824
  readonly config: AptosConfig;
@@ -7102,9 +7832,10 @@ declare class Aptos {
7102
7832
  readonly general: General;
7103
7833
  readonly staking: Staking;
7104
7834
  readonly transaction: Transaction;
7835
+ readonly keyless: Keyless;
7105
7836
  constructor(settings?: AptosConfig);
7106
7837
  }
7107
- interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7838
+ interface Aptos extends Account, ANS, Coin, DigitalAsset, Event, Faucet, FungibleAsset, General, Keyless, Staking, Omit<Transaction, "build" | "simulate" | "submit" | "batch"> {
7108
7839
  }
7109
7840
 
7110
7841
  /**
@@ -7203,6 +7934,7 @@ type GetAptosRequestOptions = Omit<GetRequestOptions, "type">;
7203
7934
  */
7204
7935
  declare function get<Req extends {}, Res extends {}>(options: GetRequestOptions): Promise<AptosResponse<Req, Res>>;
7205
7936
  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>>;
7206
7938
  declare function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(options: GetAptosRequestOptions): Promise<Res>;
7207
7939
 
7208
7940
  type PostRequestOptions = {
@@ -7254,5 +7986,7 @@ declare function post<Req extends {}, Res extends {}>(options: PostRequestOption
7254
7986
  declare function postAptosFullNode<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7255
7987
  declare function postAptosIndexer<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
7256
7988
  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>>;
7257
7991
 
7258
- 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 };
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 };