@aptos-labs/ts-sdk 1.13.3-zeta.1 → 1.14.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 (482) hide show
  1. package/dist/common/accountAddress-csDQ8Gnp.d.ts +2103 -0
  2. package/dist/common/cli/index.d.ts +94 -1
  3. package/dist/common/cli/index.js +1 -1
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.d.ts +2250 -4805
  6. package/dist/common/index.js +26 -26
  7. package/dist/common/index.js.map +1 -1
  8. package/dist/esm/{Ed25519Account-8gJF5t3F.d.mts → Ed25519Account--qjfup2u.d.mts} +12 -10
  9. package/dist/esm/api/account.d.mts +1 -13
  10. package/dist/esm/api/account.mjs +1 -1
  11. package/dist/esm/api/ans.d.mts +2 -2
  12. package/dist/esm/api/ans.mjs +1 -1
  13. package/dist/esm/api/aptos.d.mts +8 -14
  14. package/dist/esm/api/aptos.mjs +1 -1
  15. package/dist/esm/api/aptosConfig.d.mts +0 -20
  16. package/dist/esm/api/aptosConfig.mjs +1 -1
  17. package/dist/esm/api/coin.d.mts +7 -7
  18. package/dist/esm/api/coin.mjs +1 -1
  19. package/dist/esm/api/digitalAsset.d.mts +1 -1
  20. package/dist/esm/api/digitalAsset.mjs +1 -1
  21. package/dist/esm/api/event.mjs +1 -1
  22. package/dist/esm/api/faucet.mjs +1 -1
  23. package/dist/esm/api/fungibleAsset.d.mts +5 -5
  24. package/dist/esm/api/fungibleAsset.mjs +1 -1
  25. package/dist/esm/api/general.d.mts +7 -7
  26. package/dist/esm/api/general.mjs +1 -1
  27. package/dist/esm/api/index.d.mts +8 -13
  28. package/dist/esm/api/index.mjs +1 -1
  29. package/dist/esm/api/staking.mjs +1 -1
  30. package/dist/esm/api/transaction.d.mts +1 -1
  31. package/dist/esm/api/transaction.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
  33. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  34. package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
  35. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  37. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  39. package/dist/esm/api/transactionSubmission/simulate.d.mts +6 -6
  40. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  41. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  42. package/dist/esm/api/utils.mjs +1 -1
  43. package/dist/esm/bcs/index.mjs +1 -1
  44. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  45. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  46. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  47. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  48. package/dist/esm/bcs/serializer.d.mts +0 -2
  49. package/dist/esm/bcs/serializer.mjs +1 -1
  50. package/dist/esm/{chunk-MJGZJL3W.mjs → chunk-2G4ZSGL4.mjs} +2 -2
  51. package/dist/esm/{chunk-UKJUHLZW.mjs → chunk-3YZGJLW7.mjs} +2 -2
  52. package/dist/esm/{chunk-TV64AINP.mjs → chunk-4374JPA6.mjs} +2 -2
  53. package/dist/esm/chunk-4374JPA6.mjs.map +1 -0
  54. package/dist/esm/{chunk-KFJMLLOA.mjs → chunk-4P5EKAJB.mjs} +2 -2
  55. package/dist/esm/{chunk-TVRJ3M7B.mjs → chunk-52C73T26.mjs} +2 -2
  56. package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-52C73T26.mjs.map} +1 -1
  57. package/dist/esm/{chunk-DIBNAYZ2.mjs → chunk-5HY3DEPF.mjs} +2 -2
  58. package/dist/esm/chunk-62P5CJAJ.mjs +2 -0
  59. package/dist/esm/chunk-62P5CJAJ.mjs.map +1 -0
  60. package/dist/esm/{chunk-NPNAKSCR.mjs → chunk-6OV2PQS5.mjs} +2 -2
  61. package/dist/esm/chunk-APDALGDD.mjs +2 -0
  62. package/dist/esm/chunk-APDALGDD.mjs.map +1 -0
  63. package/dist/esm/chunk-AT2A6UGB.mjs +2 -0
  64. package/dist/esm/chunk-AT2A6UGB.mjs.map +1 -0
  65. package/dist/esm/chunk-B3BRR4WP.mjs +2 -0
  66. package/dist/esm/chunk-B3BRR4WP.mjs.map +1 -0
  67. package/dist/esm/{chunk-W637YAND.mjs → chunk-BAV4XY7C.mjs} +2 -2
  68. package/dist/esm/{chunk-3YNRBMPS.mjs → chunk-BE4FOV6X.mjs} +2 -2
  69. package/dist/esm/{chunk-33WBJV5U.mjs → chunk-BIAEC6FO.mjs} +2 -2
  70. package/dist/esm/{chunk-MWUJCP27.mjs → chunk-BWFJHFBQ.mjs} +2 -2
  71. package/dist/esm/{chunk-37CYBCWS.mjs → chunk-CDB34C4N.mjs} +2 -2
  72. package/dist/esm/chunk-CDB34C4N.mjs.map +1 -0
  73. package/dist/esm/{chunk-ZGTJMNZG.mjs → chunk-CF5R4HVB.mjs} +2 -2
  74. package/dist/esm/chunk-CNMQNPNV.mjs +2 -0
  75. package/dist/esm/chunk-CNMQNPNV.mjs.map +1 -0
  76. package/dist/esm/chunk-CPBGL37X.mjs +2 -0
  77. package/dist/esm/{chunk-X7GVXVT4.mjs.map → chunk-CPBGL37X.mjs.map} +1 -1
  78. package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
  79. package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
  80. package/dist/esm/{chunk-3VGX3TXH.mjs → chunk-DMKUAQB7.mjs} +2 -2
  81. package/dist/esm/{chunk-MGOHPDX4.mjs → chunk-DSTKXJMA.mjs} +2 -2
  82. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  83. package/dist/esm/{chunk-EB7AI4B4.mjs → chunk-FS3NSGBF.mjs} +2 -2
  84. package/dist/esm/{chunk-7H3HRFVM.mjs → chunk-FXNFWLQC.mjs} +2 -2
  85. package/dist/esm/{chunk-DOCYCNXV.mjs → chunk-HG4Q4EFG.mjs} +2 -2
  86. package/dist/esm/chunk-HG4Q4EFG.mjs.map +1 -0
  87. package/dist/esm/{chunk-GKCO5PQJ.mjs → chunk-HWECUBBA.mjs} +2 -2
  88. package/dist/esm/chunk-HWECUBBA.mjs.map +1 -0
  89. package/dist/esm/chunk-HYCGMFC2.mjs +2 -0
  90. package/dist/esm/chunk-HYCGMFC2.mjs.map +1 -0
  91. package/dist/esm/{chunk-T23OVRNF.mjs → chunk-IOSQVDZI.mjs} +2 -2
  92. package/dist/esm/{chunk-YGB7MEH3.mjs → chunk-IR46T46A.mjs} +2 -2
  93. package/dist/esm/{chunk-RDNPWCZ4.mjs → chunk-JCD72AW7.mjs} +2 -2
  94. package/dist/esm/{chunk-GI52SX32.mjs → chunk-L5IL2IAB.mjs} +2 -2
  95. package/dist/esm/chunk-LBGYH45K.mjs +2 -0
  96. package/dist/esm/chunk-LBGYH45K.mjs.map +1 -0
  97. package/dist/esm/chunk-LDQ6JFEF.mjs +2 -0
  98. package/dist/esm/chunk-LDQ6JFEF.mjs.map +1 -0
  99. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  100. package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
  101. package/dist/esm/chunk-MFL3UCKA.mjs +2 -0
  102. package/dist/esm/chunk-MFL3UCKA.mjs.map +1 -0
  103. package/dist/esm/chunk-MLWIHWNH.mjs +1 -0
  104. package/dist/esm/{chunk-A7L2Z5DW.mjs → chunk-N77VJHW5.mjs} +2 -2
  105. package/dist/esm/chunk-NBCHJ75L.mjs +2 -0
  106. package/dist/esm/chunk-NBCHJ75L.mjs.map +1 -0
  107. package/dist/esm/{chunk-7STYQ5ZE.mjs → chunk-NPFNYP75.mjs} +2 -2
  108. package/dist/esm/{chunk-LV7OW245.mjs → chunk-NWYIE7ZX.mjs} +2 -2
  109. package/dist/esm/chunk-NZGRLKRG.mjs +2 -0
  110. package/dist/esm/{chunk-PTIZKRON.mjs → chunk-O4JRPZZM.mjs} +2 -2
  111. package/dist/esm/{chunk-Z2ZR4PTF.mjs → chunk-OGHE4AQA.mjs} +2 -2
  112. package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
  113. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  114. package/dist/esm/{chunk-DX62SMGM.mjs → chunk-P3UFJZY5.mjs} +2 -2
  115. package/dist/esm/chunk-P3UFJZY5.mjs.map +1 -0
  116. package/dist/esm/chunk-PJPXC22D.mjs +2 -0
  117. package/dist/esm/chunk-PJPXC22D.mjs.map +1 -0
  118. package/dist/esm/{chunk-TFJCMFKE.mjs → chunk-PMUT3HZE.mjs} +2 -2
  119. package/dist/esm/chunk-PMUT3HZE.mjs.map +1 -0
  120. package/dist/esm/chunk-PXFIA4BL.mjs +2 -0
  121. package/dist/esm/{chunk-EKOIHFAW.mjs.map → chunk-PXFIA4BL.mjs.map} +1 -1
  122. package/dist/esm/{chunk-IM32PZOD.mjs → chunk-PYXJYEAC.mjs} +2 -2
  123. package/dist/esm/chunk-PYXJYEAC.mjs.map +1 -0
  124. package/dist/esm/{chunk-OKG6X5TX.mjs → chunk-QD2Y3VK4.mjs} +2 -2
  125. package/dist/esm/chunk-QD2Y3VK4.mjs.map +1 -0
  126. package/dist/esm/{chunk-6RBUXB5I.mjs → chunk-QIAHBEEW.mjs} +2 -2
  127. package/dist/esm/{chunk-ODTNF2YP.mjs → chunk-QIAU5K5Y.mjs} +2 -2
  128. package/dist/esm/{chunk-NC5HHEEM.mjs → chunk-QTRYMRYK.mjs} +2 -2
  129. package/dist/esm/{chunk-STYDBDYL.mjs → chunk-R5QUBEH6.mjs} +2 -2
  130. package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
  131. package/dist/esm/{chunk-ZNEBMSNC.mjs → chunk-RHBCVCOS.mjs} +2 -2
  132. package/dist/esm/chunk-RR7I2HLA.mjs +2 -0
  133. package/dist/esm/chunk-RR7I2HLA.mjs.map +1 -0
  134. package/dist/esm/chunk-RTSWVT2Q.mjs +2 -0
  135. package/dist/esm/chunk-RTSWVT2Q.mjs.map +1 -0
  136. package/dist/esm/chunk-RW2A63WK.mjs +2 -0
  137. package/dist/esm/chunk-RW2A63WK.mjs.map +1 -0
  138. package/dist/esm/{chunk-T7JIGO3O.mjs → chunk-S2LTZKM4.mjs} +2 -2
  139. package/dist/esm/{chunk-6CQH7JPF.mjs → chunk-SPU745XV.mjs} +2 -2
  140. package/dist/esm/{chunk-3FVRXELT.mjs → chunk-TBMAJ6AW.mjs} +2 -2
  141. package/dist/esm/{chunk-IEZO4PIG.mjs → chunk-TGXZVNR5.mjs} +2 -2
  142. package/dist/esm/{chunk-PFFAQZHT.mjs → chunk-U43IJHQN.mjs} +2 -2
  143. package/dist/esm/chunk-UDRSFVAK.mjs +2 -0
  144. package/dist/esm/{chunk-CHQ6IKE3.mjs.map → chunk-UDRSFVAK.mjs.map} +1 -1
  145. package/dist/esm/chunk-UF534PKA.mjs +2 -0
  146. package/dist/esm/chunk-UF534PKA.mjs.map +1 -0
  147. package/dist/esm/chunk-UMDTVVQC.mjs +2 -0
  148. package/dist/esm/chunk-UMDTVVQC.mjs.map +1 -0
  149. package/dist/esm/{chunk-HGZGTBA4.mjs → chunk-UML2VQZT.mjs} +2 -2
  150. package/dist/esm/chunk-UNU3RVRJ.mjs +2 -0
  151. package/dist/esm/{chunk-MKUAW7KW.mjs → chunk-UPIN5AIO.mjs} +2 -2
  152. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  153. package/dist/esm/{chunk-YI7FZPIK.mjs → chunk-WCVUDO5S.mjs} +2 -2
  154. package/dist/esm/{chunk-COW5IGYC.mjs → chunk-WFZDFFBM.mjs} +2 -2
  155. package/dist/esm/chunk-XIJHRBDL.mjs +2 -0
  156. package/dist/esm/chunk-XIJHRBDL.mjs.map +1 -0
  157. package/dist/esm/{chunk-XHPLLMR5.mjs → chunk-XO3HHRJV.mjs} +2 -2
  158. package/dist/esm/chunk-ZEHKHKBP.mjs +2 -0
  159. package/dist/esm/chunk-ZEHKHKBP.mjs.map +1 -0
  160. package/dist/esm/{chunk-C3L4ETUF.mjs → chunk-ZYYK3UXP.mjs} +2 -2
  161. package/dist/esm/cli/index.d.mts +12 -0
  162. package/dist/esm/cli/index.mjs +1 -1
  163. package/dist/esm/cli/move.d.mts +105 -0
  164. package/dist/esm/cli/move.mjs +2 -0
  165. package/dist/esm/client/core.mjs +1 -1
  166. package/dist/esm/client/get.d.mts +1 -2
  167. package/dist/esm/client/get.mjs +1 -1
  168. package/dist/esm/client/index.d.mts +2 -2
  169. package/dist/esm/client/index.mjs +1 -1
  170. package/dist/esm/client/post.d.mts +1 -3
  171. package/dist/esm/client/post.mjs +1 -1
  172. package/dist/esm/core/account/Account.d.mts +20 -0
  173. package/dist/esm/core/account/Account.mjs +2 -0
  174. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  175. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  176. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  177. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  178. package/dist/esm/core/account/index.d.mts +14 -5
  179. package/dist/esm/core/account/index.mjs +1 -1
  180. package/dist/esm/core/account/utils/address.mjs +1 -1
  181. package/dist/esm/core/account/utils/index.mjs +1 -1
  182. package/dist/esm/core/accountAddress.mjs +1 -1
  183. package/dist/esm/core/authenticationKey.mjs +1 -1
  184. package/dist/esm/core/crypto/ed25519.d.mts +10 -0
  185. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  186. package/dist/esm/core/crypto/hdKey.d.mts +1 -15
  187. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  188. package/dist/esm/core/crypto/index.d.mts +5 -7
  189. package/dist/esm/core/crypto/index.mjs +1 -1
  190. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  191. package/dist/esm/core/crypto/multiKey.d.mts +3 -4
  192. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  193. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  194. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  195. package/dist/esm/core/crypto/signature.mjs +1 -1
  196. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  197. package/dist/esm/core/index.d.mts +7 -6
  198. package/dist/esm/core/index.mjs +1 -1
  199. package/dist/esm/index.d.mts +10 -16
  200. package/dist/esm/index.mjs +1 -1
  201. package/dist/esm/internal/account.d.mts +2 -14
  202. package/dist/esm/internal/account.mjs +1 -1
  203. package/dist/esm/internal/ans.d.mts +2 -2
  204. package/dist/esm/internal/ans.mjs +1 -1
  205. package/dist/esm/internal/coin.d.mts +7 -7
  206. package/dist/esm/internal/coin.mjs +1 -1
  207. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  208. package/dist/esm/internal/digitalAsset.mjs +1 -1
  209. package/dist/esm/internal/event.d.mts +1 -1
  210. package/dist/esm/internal/event.mjs +1 -1
  211. package/dist/esm/internal/faucet.d.mts +1 -1
  212. package/dist/esm/internal/faucet.mjs +1 -1
  213. package/dist/esm/internal/fungibleAsset.d.mts +5 -5
  214. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  215. package/dist/esm/internal/general.mjs +1 -1
  216. package/dist/esm/internal/staking.d.mts +1 -1
  217. package/dist/esm/internal/staking.mjs +1 -1
  218. package/dist/esm/internal/transaction.mjs +1 -1
  219. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  220. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  221. package/dist/esm/internal/view.d.mts +7 -7
  222. package/dist/esm/internal/view.mjs +1 -1
  223. package/dist/esm/transactions/authenticator/account.d.mts +4 -3
  224. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  225. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  226. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  227. package/dist/esm/transactions/index.d.mts +2 -2
  228. package/dist/esm/transactions/index.mjs +1 -1
  229. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  230. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  231. package/dist/esm/transactions/instances/index.mjs +1 -1
  232. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  233. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  234. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  235. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  236. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  237. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  238. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  239. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  240. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  241. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -13
  242. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  243. package/dist/esm/transactions/management/index.d.mts +2 -2
  244. package/dist/esm/transactions/management/index.mjs +1 -1
  245. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  246. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  247. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  248. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  249. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  250. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  251. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  252. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  253. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +25 -13
  254. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  255. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  256. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  257. package/dist/esm/transactions/types.d.mts +6 -6
  258. package/dist/esm/types/index.d.mts +3 -17
  259. package/dist/esm/types/index.mjs +1 -1
  260. package/dist/esm/utils/apiEndpoints.d.mts +1 -4
  261. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  262. package/dist/esm/utils/const.d.mts +1 -3
  263. package/dist/esm/utils/const.mjs +1 -1
  264. package/dist/esm/utils/index.d.mts +1 -1
  265. package/dist/esm/utils/index.mjs +1 -1
  266. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  267. package/dist/esm/version.d.mts +1 -1
  268. package/dist/esm/version.mjs +1 -1
  269. package/package.json +2 -7
  270. package/src/api/account.ts +1 -2
  271. package/src/api/ans.ts +1 -2
  272. package/src/api/aptos.ts +0 -6
  273. package/src/api/aptosConfig.ts +1 -46
  274. package/src/api/digitalAsset.ts +1 -2
  275. package/src/api/fungibleAsset.ts +1 -2
  276. package/src/api/transaction.ts +1 -2
  277. package/src/api/transactionSubmission/management.ts +1 -1
  278. package/src/api/transactionSubmission/sign.ts +1 -1
  279. package/src/bcs/serializer.ts +0 -18
  280. package/src/cli/index.ts +1 -0
  281. package/src/cli/move.ts +183 -0
  282. package/src/client/core.ts +0 -8
  283. package/src/client/get.ts +0 -6
  284. package/src/client/post.ts +0 -12
  285. package/src/{account → core/account}/Account.ts +16 -12
  286. package/src/{account → core/account}/Ed25519Account.ts +7 -13
  287. package/src/{account → core/account}/SingleKeyAccount.ts +8 -13
  288. package/src/core/account/index.ts +3 -1
  289. package/src/core/crypto/ed25519.ts +24 -4
  290. package/src/core/crypto/hdKey.ts +0 -31
  291. package/src/core/crypto/index.ts +0 -2
  292. package/src/core/crypto/multiKey.ts +11 -21
  293. package/src/core/crypto/singleKey.ts +0 -11
  294. package/src/core/index.ts +1 -0
  295. package/src/index.ts +0 -1
  296. package/src/internal/account.ts +1 -1
  297. package/src/internal/ans.ts +1 -3
  298. package/src/internal/digitalAsset.ts +1 -2
  299. package/src/internal/fungibleAsset.ts +2 -3
  300. package/src/internal/transactionSubmission.ts +7 -8
  301. package/src/transactions/authenticator/account.ts +11 -6
  302. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  303. package/src/transactions/management/transactionWorker.ts +2 -8
  304. package/src/transactions/transactionBuilder/index.ts +0 -1
  305. package/src/transactions/transactionBuilder/transactionBuilder.ts +68 -41
  306. package/src/types/index.ts +0 -19
  307. package/src/utils/apiEndpoints.ts +0 -20
  308. package/src/utils/const.ts +0 -2
  309. package/src/version.ts +1 -1
  310. package/dist/esm/account/Account.d.mts +0 -34
  311. package/dist/esm/account/Account.mjs +0 -2
  312. package/dist/esm/account/Ed25519Account.d.mts +0 -34
  313. package/dist/esm/account/Ed25519Account.mjs +0 -2
  314. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -47
  315. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  316. package/dist/esm/account/KeylessAccount.d.mts +0 -106
  317. package/dist/esm/account/KeylessAccount.mjs +0 -2
  318. package/dist/esm/account/MultiKeyAccount.d.mts +0 -99
  319. package/dist/esm/account/MultiKeyAccount.mjs +0 -2
  320. package/dist/esm/account/SingleKeyAccount.d.mts +0 -34
  321. package/dist/esm/account/SingleKeyAccount.mjs +0 -2
  322. package/dist/esm/account/index.d.mts +0 -40
  323. package/dist/esm/account/index.mjs +0 -2
  324. package/dist/esm/api/keyless.d.mts +0 -67
  325. package/dist/esm/api/keyless.mjs +0 -2
  326. package/dist/esm/chunk-2Q6K4CLJ.mjs +0 -2
  327. package/dist/esm/chunk-2Q6K4CLJ.mjs.map +0 -1
  328. package/dist/esm/chunk-2YDIOWRJ.mjs +0 -2
  329. package/dist/esm/chunk-2YDIOWRJ.mjs.map +0 -1
  330. package/dist/esm/chunk-37CYBCWS.mjs.map +0 -1
  331. package/dist/esm/chunk-3QHRPREO.mjs +0 -2
  332. package/dist/esm/chunk-3QHRPREO.mjs.map +0 -1
  333. package/dist/esm/chunk-4XB3D2ZD.mjs +0 -2
  334. package/dist/esm/chunk-4XB3D2ZD.mjs.map +0 -1
  335. package/dist/esm/chunk-5QBTBH64.mjs +0 -2
  336. package/dist/esm/chunk-5VSMDXZ6.mjs +0 -2
  337. package/dist/esm/chunk-5VSMDXZ6.mjs.map +0 -1
  338. package/dist/esm/chunk-6GQAHQGW.mjs +0 -2
  339. package/dist/esm/chunk-6GQAHQGW.mjs.map +0 -1
  340. package/dist/esm/chunk-6J3CB3DN.mjs +0 -2
  341. package/dist/esm/chunk-6J3CB3DN.mjs.map +0 -1
  342. package/dist/esm/chunk-6M6XXPQQ.mjs +0 -2
  343. package/dist/esm/chunk-6M6XXPQQ.mjs.map +0 -1
  344. package/dist/esm/chunk-7JNPSNL6.mjs +0 -2
  345. package/dist/esm/chunk-7JNPSNL6.mjs.map +0 -1
  346. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  347. package/dist/esm/chunk-7Z6DYLCA.mjs.map +0 -1
  348. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  349. package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
  350. package/dist/esm/chunk-CHQ6IKE3.mjs +0 -2
  351. package/dist/esm/chunk-DMKFITUM.mjs +0 -2
  352. package/dist/esm/chunk-DMKFITUM.mjs.map +0 -1
  353. package/dist/esm/chunk-DOCYCNXV.mjs.map +0 -1
  354. package/dist/esm/chunk-DX62SMGM.mjs.map +0 -1
  355. package/dist/esm/chunk-EFRNRARV.mjs +0 -2
  356. package/dist/esm/chunk-EFRNRARV.mjs.map +0 -1
  357. package/dist/esm/chunk-EKOIHFAW.mjs +0 -2
  358. package/dist/esm/chunk-FLYEALDB.mjs +0 -2
  359. package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
  360. package/dist/esm/chunk-GKCO5PQJ.mjs.map +0 -1
  361. package/dist/esm/chunk-HJULFJXF.mjs +0 -2
  362. package/dist/esm/chunk-HJULFJXF.mjs.map +0 -1
  363. package/dist/esm/chunk-IM32PZOD.mjs.map +0 -1
  364. package/dist/esm/chunk-IOVRZ2CA.mjs +0 -2
  365. package/dist/esm/chunk-IOVRZ2CA.mjs.map +0 -1
  366. package/dist/esm/chunk-ITEV72BZ.mjs +0 -2
  367. package/dist/esm/chunk-ITEV72BZ.mjs.map +0 -1
  368. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  369. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  370. package/dist/esm/chunk-KGJITNRZ.mjs +0 -2
  371. package/dist/esm/chunk-KGJITNRZ.mjs.map +0 -1
  372. package/dist/esm/chunk-KOCKKI4F.mjs +0 -2
  373. package/dist/esm/chunk-NWLZDI2I.mjs +0 -2
  374. package/dist/esm/chunk-NWLZDI2I.mjs.map +0 -1
  375. package/dist/esm/chunk-OKG6X5TX.mjs.map +0 -1
  376. package/dist/esm/chunk-OKRUEVF3.mjs +0 -2
  377. package/dist/esm/chunk-OKRUEVF3.mjs.map +0 -1
  378. package/dist/esm/chunk-OYTLWUQT.mjs +0 -2
  379. package/dist/esm/chunk-OYTLWUQT.mjs.map +0 -1
  380. package/dist/esm/chunk-P5VCS2F5.mjs +0 -2
  381. package/dist/esm/chunk-P5VCS2F5.mjs.map +0 -1
  382. package/dist/esm/chunk-R4UIPTBH.mjs +0 -2
  383. package/dist/esm/chunk-R4UIPTBH.mjs.map +0 -1
  384. package/dist/esm/chunk-R7BAM2G6.mjs +0 -2
  385. package/dist/esm/chunk-R7BAM2G6.mjs.map +0 -1
  386. package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
  387. package/dist/esm/chunk-RFSO3JRG.mjs.map +0 -1
  388. package/dist/esm/chunk-S5HG2QUD.mjs +0 -2
  389. package/dist/esm/chunk-S5HG2QUD.mjs.map +0 -1
  390. package/dist/esm/chunk-SA7MZPM3.mjs +0 -2
  391. package/dist/esm/chunk-SA7MZPM3.mjs.map +0 -1
  392. package/dist/esm/chunk-TFJCMFKE.mjs.map +0 -1
  393. package/dist/esm/chunk-TV64AINP.mjs.map +0 -1
  394. package/dist/esm/chunk-VTX77UM3.mjs +0 -2
  395. package/dist/esm/chunk-VTX77UM3.mjs.map +0 -1
  396. package/dist/esm/chunk-WPVBC4JS.mjs +0 -2
  397. package/dist/esm/chunk-WPVBC4JS.mjs.map +0 -1
  398. package/dist/esm/chunk-WTVN3XGK.mjs +0 -2
  399. package/dist/esm/chunk-WTVN3XGK.mjs.map +0 -1
  400. package/dist/esm/chunk-X7GVXVT4.mjs +0 -2
  401. package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
  402. package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
  403. package/dist/esm/chunk-YH6UKGIX.mjs +0 -2
  404. package/dist/esm/chunk-YH6UKGIX.mjs.map +0 -1
  405. package/dist/esm/core/crypto/ephemeral.d.mts +0 -77
  406. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  407. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  408. package/dist/esm/core/crypto/keyless.d.mts +0 -217
  409. package/dist/esm/core/crypto/keyless.mjs +0 -2
  410. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  411. package/dist/esm/core/crypto/poseidon.d.mts +0 -7
  412. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  413. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  414. package/dist/esm/internal/keyless.d.mts +0 -67
  415. package/dist/esm/internal/keyless.mjs +0 -2
  416. package/dist/esm/internal/keyless.mjs.map +0 -1
  417. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -47
  418. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
  419. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
  420. package/dist/esm/types/keyless.d.mts +0 -14
  421. package/dist/esm/types/keyless.mjs +0 -1
  422. package/dist/esm/types/keyless.mjs.map +0 -1
  423. package/src/account/EphemeralKeyPair.ts +0 -123
  424. package/src/account/KeylessAccount.ts +0 -299
  425. package/src/account/MultiKeyAccount.ts +0 -119
  426. package/src/account/index.ts +0 -6
  427. package/src/api/keyless.ts +0 -35
  428. package/src/core/crypto/ephemeral.ts +0 -149
  429. package/src/core/crypto/keyless.ts +0 -508
  430. package/src/core/crypto/poseidon.ts +0 -134
  431. package/src/internal/keyless.ts +0 -188
  432. package/src/transactions/transactionBuilder/signingMessage.ts +0 -70
  433. package/src/types/keyless.ts +0 -6
  434. /package/dist/esm/{chunk-MJGZJL3W.mjs.map → chunk-2G4ZSGL4.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-UKJUHLZW.mjs.map → chunk-3YZGJLW7.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-KFJMLLOA.mjs.map → chunk-4P5EKAJB.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-DIBNAYZ2.mjs.map → chunk-5HY3DEPF.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-NPNAKSCR.mjs.map → chunk-6OV2PQS5.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-W637YAND.mjs.map → chunk-BAV4XY7C.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-3YNRBMPS.mjs.map → chunk-BE4FOV6X.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-33WBJV5U.mjs.map → chunk-BIAEC6FO.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-ZGTJMNZG.mjs.map → chunk-CF5R4HVB.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  446. /package/dist/esm/{account/Account.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-7H3HRFVM.mjs.map → chunk-FXNFWLQC.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-IOSQVDZI.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-YGB7MEH3.mjs.map → chunk-IR46T46A.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-RDNPWCZ4.mjs.map → chunk-JCD72AW7.mjs.map} +0 -0
  452. /package/dist/esm/{chunk-GI52SX32.mjs.map → chunk-L5IL2IAB.mjs.map} +0 -0
  453. /package/dist/esm/{account/Ed25519Account.mjs.map → chunk-MLWIHWNH.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-A7L2Z5DW.mjs.map → chunk-N77VJHW5.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-LV7OW245.mjs.map → chunk-NWYIE7ZX.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-5QBTBH64.mjs.map → chunk-NZGRLKRG.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-PTIZKRON.mjs.map → chunk-O4JRPZZM.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-Z2ZR4PTF.mjs.map → chunk-OGHE4AQA.mjs.map} +0 -0
  460. /package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-QIAHBEEW.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-ODTNF2YP.mjs.map → chunk-QIAU5K5Y.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-QTRYMRYK.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  464. /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-R7G3CLRI.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  466. /package/dist/esm/{chunk-T7JIGO3O.mjs.map → chunk-S2LTZKM4.mjs.map} +0 -0
  467. /package/dist/esm/{chunk-6CQH7JPF.mjs.map → chunk-SPU745XV.mjs.map} +0 -0
  468. /package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  469. /package/dist/esm/{chunk-IEZO4PIG.mjs.map → chunk-TGXZVNR5.mjs.map} +0 -0
  470. /package/dist/esm/{chunk-PFFAQZHT.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  471. /package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  472. /package/dist/esm/{chunk-KOCKKI4F.mjs.map → chunk-UNU3RVRJ.mjs.map} +0 -0
  473. /package/dist/esm/{chunk-MKUAW7KW.mjs.map → chunk-UPIN5AIO.mjs.map} +0 -0
  474. /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  475. /package/dist/esm/{chunk-YI7FZPIK.mjs.map → chunk-WCVUDO5S.mjs.map} +0 -0
  476. /package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  477. /package/dist/esm/{chunk-XHPLLMR5.mjs.map → chunk-XO3HHRJV.mjs.map} +0 -0
  478. /package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  479. /package/dist/esm/{account/MultiKeyAccount.mjs.map → cli/move.mjs.map} +0 -0
  480. /package/dist/esm/{account/SingleKeyAccount.mjs.map → core/account/Account.mjs.map} +0 -0
  481. /package/dist/esm/{account/index.mjs.map → core/account/Ed25519Account.mjs.map} +0 -0
  482. /package/dist/esm/{api/keyless.mjs.map → core/account/SingleKeyAccount.mjs.map} +0 -0
@@ -0,0 +1,2103 @@
1
+ declare const NetworkToIndexerAPI: Record<string, string>;
2
+ declare const NetworkToNodeAPI: Record<string, string>;
3
+ declare const NetworkToFaucetAPI: Record<string, string>;
4
+ declare enum Network {
5
+ MAINNET = "mainnet",
6
+ TESTNET = "testnet",
7
+ DEVNET = "devnet",
8
+ LOCAL = "local",
9
+ CUSTOM = "custom"
10
+ }
11
+ declare const NetworkToChainId: Record<string, number>;
12
+ declare const NetworkToNetworkName: Record<string, Network>;
13
+
14
+ type GetAccountCoinsDataQuery = {
15
+ current_fungible_asset_balances: Array<{
16
+ amount: any;
17
+ asset_type: string;
18
+ is_frozen: boolean;
19
+ is_primary: boolean;
20
+ last_transaction_timestamp: any;
21
+ last_transaction_version: any;
22
+ owner_address: string;
23
+ storage_id: string;
24
+ token_standard: string;
25
+ metadata?: {
26
+ token_standard: string;
27
+ symbol: string;
28
+ supply_aggregator_table_key_v1?: string | null;
29
+ supply_aggregator_table_handle_v1?: string | null;
30
+ project_uri?: string | null;
31
+ name: string;
32
+ last_transaction_version: any;
33
+ last_transaction_timestamp: any;
34
+ icon_uri?: string | null;
35
+ decimals: number;
36
+ creator_address: string;
37
+ asset_type: string;
38
+ } | null;
39
+ }>;
40
+ };
41
+ type GetAccountCollectionsWithOwnedTokensQuery = {
42
+ current_collection_ownership_v2_view: Array<{
43
+ collection_id?: string | null;
44
+ collection_name?: string | null;
45
+ collection_uri?: string | null;
46
+ creator_address?: string | null;
47
+ distinct_tokens?: any | null;
48
+ last_transaction_version?: any | null;
49
+ owner_address?: string | null;
50
+ single_token_uri?: string | null;
51
+ current_collection?: {
52
+ collection_id: string;
53
+ collection_name: string;
54
+ creator_address: string;
55
+ current_supply: any;
56
+ description: string;
57
+ last_transaction_timestamp: any;
58
+ last_transaction_version: any;
59
+ mutable_description?: boolean | null;
60
+ max_supply?: any | null;
61
+ mutable_uri?: boolean | null;
62
+ table_handle_v1?: string | null;
63
+ token_standard: string;
64
+ total_minted_v2?: any | null;
65
+ uri: string;
66
+ } | null;
67
+ }>;
68
+ };
69
+ type GetAccountOwnedObjectsQuery = {
70
+ current_objects: Array<{
71
+ allow_ungated_transfer: boolean;
72
+ state_key_hash: string;
73
+ owner_address: string;
74
+ object_address: string;
75
+ last_transaction_version: any;
76
+ last_guid_creation_num: any;
77
+ is_deleted: boolean;
78
+ }>;
79
+ };
80
+ type GetAccountOwnedTokensQuery = {
81
+ current_token_ownerships_v2: Array<{
82
+ token_standard: string;
83
+ token_properties_mutated_v1?: any | null;
84
+ token_data_id: string;
85
+ table_type_v1?: string | null;
86
+ storage_id: string;
87
+ property_version_v1: any;
88
+ owner_address: string;
89
+ last_transaction_version: any;
90
+ last_transaction_timestamp: any;
91
+ is_soulbound_v2?: boolean | null;
92
+ is_fungible_v2?: boolean | null;
93
+ amount: any;
94
+ current_token_data?: {
95
+ collection_id: string;
96
+ description: string;
97
+ is_fungible_v2?: boolean | null;
98
+ largest_property_version_v1?: any | null;
99
+ last_transaction_timestamp: any;
100
+ last_transaction_version: any;
101
+ maximum?: any | null;
102
+ supply: any;
103
+ token_data_id: string;
104
+ token_name: string;
105
+ token_properties: any;
106
+ token_standard: string;
107
+ token_uri: string;
108
+ decimals: any;
109
+ current_collection?: {
110
+ collection_id: string;
111
+ collection_name: string;
112
+ creator_address: string;
113
+ current_supply: any;
114
+ description: string;
115
+ last_transaction_timestamp: any;
116
+ last_transaction_version: any;
117
+ max_supply?: any | null;
118
+ mutable_description?: boolean | null;
119
+ mutable_uri?: boolean | null;
120
+ table_handle_v1?: string | null;
121
+ token_standard: string;
122
+ total_minted_v2?: any | null;
123
+ uri: string;
124
+ } | null;
125
+ } | null;
126
+ }>;
127
+ };
128
+ type GetAccountOwnedTokensFromCollectionQuery = {
129
+ current_token_ownerships_v2: Array<{
130
+ token_standard: string;
131
+ token_properties_mutated_v1?: any | null;
132
+ token_data_id: string;
133
+ table_type_v1?: string | null;
134
+ storage_id: string;
135
+ property_version_v1: any;
136
+ owner_address: string;
137
+ last_transaction_version: any;
138
+ last_transaction_timestamp: any;
139
+ is_soulbound_v2?: boolean | null;
140
+ is_fungible_v2?: boolean | null;
141
+ amount: any;
142
+ current_token_data?: {
143
+ collection_id: string;
144
+ description: string;
145
+ is_fungible_v2?: boolean | null;
146
+ largest_property_version_v1?: any | null;
147
+ last_transaction_timestamp: any;
148
+ last_transaction_version: any;
149
+ maximum?: any | null;
150
+ supply: any;
151
+ token_data_id: string;
152
+ token_name: string;
153
+ token_properties: any;
154
+ token_standard: string;
155
+ token_uri: string;
156
+ decimals: any;
157
+ current_collection?: {
158
+ collection_id: string;
159
+ collection_name: string;
160
+ creator_address: string;
161
+ current_supply: any;
162
+ description: string;
163
+ last_transaction_timestamp: any;
164
+ last_transaction_version: any;
165
+ max_supply?: any | null;
166
+ mutable_description?: boolean | null;
167
+ mutable_uri?: boolean | null;
168
+ table_handle_v1?: string | null;
169
+ token_standard: string;
170
+ total_minted_v2?: any | null;
171
+ uri: string;
172
+ } | null;
173
+ } | null;
174
+ }>;
175
+ };
176
+ type GetChainTopUserTransactionsQuery = {
177
+ user_transactions: Array<{
178
+ version: any;
179
+ }>;
180
+ };
181
+ type GetCollectionDataQuery = {
182
+ current_collections_v2: Array<{
183
+ collection_id: string;
184
+ collection_name: string;
185
+ creator_address: string;
186
+ current_supply: any;
187
+ description: string;
188
+ last_transaction_timestamp: any;
189
+ last_transaction_version: any;
190
+ max_supply?: any | null;
191
+ mutable_description?: boolean | null;
192
+ mutable_uri?: boolean | null;
193
+ table_handle_v1?: string | null;
194
+ token_standard: string;
195
+ total_minted_v2?: any | null;
196
+ uri: string;
197
+ }>;
198
+ };
199
+ type GetCurrentFungibleAssetBalancesQuery = {
200
+ current_fungible_asset_balances: Array<{
201
+ amount: any;
202
+ asset_type: string;
203
+ is_frozen: boolean;
204
+ is_primary: boolean;
205
+ last_transaction_timestamp: any;
206
+ last_transaction_version: any;
207
+ owner_address: string;
208
+ storage_id: string;
209
+ token_standard: string;
210
+ }>;
211
+ };
212
+ type GetDelegatedStakingActivitiesQuery = {
213
+ delegated_staking_activities: Array<{
214
+ amount: any;
215
+ delegator_address: string;
216
+ event_index: any;
217
+ event_type: string;
218
+ pool_address: string;
219
+ transaction_version: any;
220
+ }>;
221
+ };
222
+ type GetEventsQuery = {
223
+ events: Array<{
224
+ account_address: string;
225
+ creation_number: any;
226
+ data: any;
227
+ event_index: any;
228
+ sequence_number: any;
229
+ transaction_block_height: any;
230
+ transaction_version: any;
231
+ type: string;
232
+ indexed_type: string;
233
+ }>;
234
+ };
235
+ type GetFungibleAssetActivitiesQuery = {
236
+ fungible_asset_activities: Array<{
237
+ amount?: any | null;
238
+ asset_type: string;
239
+ block_height: any;
240
+ entry_function_id_str?: string | null;
241
+ event_index: any;
242
+ gas_fee_payer_address?: string | null;
243
+ is_frozen?: boolean | null;
244
+ is_gas_fee: boolean;
245
+ is_transaction_success: boolean;
246
+ owner_address: string;
247
+ storage_id: string;
248
+ storage_refund_amount: any;
249
+ token_standard: string;
250
+ transaction_timestamp: any;
251
+ transaction_version: any;
252
+ type: string;
253
+ }>;
254
+ };
255
+ type GetFungibleAssetMetadataQuery = {
256
+ fungible_asset_metadata: Array<{
257
+ icon_uri?: string | null;
258
+ project_uri?: string | null;
259
+ supply_aggregator_table_handle_v1?: string | null;
260
+ supply_aggregator_table_key_v1?: string | null;
261
+ creator_address: string;
262
+ asset_type: string;
263
+ decimals: number;
264
+ last_transaction_timestamp: any;
265
+ last_transaction_version: any;
266
+ name: string;
267
+ symbol: string;
268
+ token_standard: string;
269
+ }>;
270
+ };
271
+ type GetNamesQuery = {
272
+ current_aptos_names: Array<{
273
+ domain?: string | null;
274
+ expiration_timestamp?: any | null;
275
+ registered_address?: string | null;
276
+ subdomain?: string | null;
277
+ token_standard?: string | null;
278
+ is_primary?: boolean | null;
279
+ owner_address?: string | null;
280
+ }>;
281
+ };
282
+ type GetNumberOfDelegatorsQuery = {
283
+ num_active_delegator_per_pool: Array<{
284
+ num_active_delegator?: any | null;
285
+ pool_address?: string | null;
286
+ }>;
287
+ };
288
+ type GetProcessorStatusQuery = {
289
+ processor_status: Array<{
290
+ last_success_version: any;
291
+ processor: string;
292
+ last_updated: any;
293
+ }>;
294
+ };
295
+ type GetTokenActivityQuery = {
296
+ token_activities_v2: Array<{
297
+ after_value?: string | null;
298
+ before_value?: string | null;
299
+ entry_function_id_str?: string | null;
300
+ event_account_address: string;
301
+ event_index: any;
302
+ from_address?: string | null;
303
+ is_fungible_v2?: boolean | null;
304
+ property_version_v1: any;
305
+ to_address?: string | null;
306
+ token_amount: any;
307
+ token_data_id: string;
308
+ token_standard: string;
309
+ transaction_timestamp: any;
310
+ transaction_version: any;
311
+ type: string;
312
+ }>;
313
+ };
314
+ type GetCurrentTokenOwnershipQuery = {
315
+ current_token_ownerships_v2: Array<{
316
+ token_standard: string;
317
+ token_properties_mutated_v1?: any | null;
318
+ token_data_id: string;
319
+ table_type_v1?: string | null;
320
+ storage_id: string;
321
+ property_version_v1: any;
322
+ owner_address: string;
323
+ last_transaction_version: any;
324
+ last_transaction_timestamp: any;
325
+ is_soulbound_v2?: boolean | null;
326
+ is_fungible_v2?: boolean | null;
327
+ amount: any;
328
+ current_token_data?: {
329
+ collection_id: string;
330
+ description: string;
331
+ is_fungible_v2?: boolean | null;
332
+ largest_property_version_v1?: any | null;
333
+ last_transaction_timestamp: any;
334
+ last_transaction_version: any;
335
+ maximum?: any | null;
336
+ supply: any;
337
+ token_data_id: string;
338
+ token_name: string;
339
+ token_properties: any;
340
+ token_standard: string;
341
+ token_uri: string;
342
+ decimals: any;
343
+ current_collection?: {
344
+ collection_id: string;
345
+ collection_name: string;
346
+ creator_address: string;
347
+ current_supply: any;
348
+ description: string;
349
+ last_transaction_timestamp: any;
350
+ last_transaction_version: any;
351
+ max_supply?: any | null;
352
+ mutable_description?: boolean | null;
353
+ mutable_uri?: boolean | null;
354
+ table_handle_v1?: string | null;
355
+ token_standard: string;
356
+ total_minted_v2?: any | null;
357
+ uri: string;
358
+ } | null;
359
+ } | null;
360
+ }>;
361
+ };
362
+ type GetTokenDataQuery = {
363
+ current_token_datas_v2: Array<{
364
+ collection_id: string;
365
+ description: string;
366
+ is_fungible_v2?: boolean | null;
367
+ largest_property_version_v1?: any | null;
368
+ last_transaction_timestamp: any;
369
+ last_transaction_version: any;
370
+ maximum?: any | null;
371
+ supply: any;
372
+ token_data_id: string;
373
+ token_name: string;
374
+ token_properties: any;
375
+ token_standard: string;
376
+ token_uri: string;
377
+ decimals: any;
378
+ current_collection?: {
379
+ collection_id: string;
380
+ collection_name: string;
381
+ creator_address: string;
382
+ current_supply: any;
383
+ description: string;
384
+ last_transaction_timestamp: any;
385
+ last_transaction_version: any;
386
+ max_supply?: any | null;
387
+ mutable_description?: boolean | null;
388
+ mutable_uri?: boolean | null;
389
+ table_handle_v1?: string | null;
390
+ token_standard: string;
391
+ total_minted_v2?: any | null;
392
+ uri: string;
393
+ } | null;
394
+ }>;
395
+ };
396
+
397
+ /**
398
+ * GENERATED QUERY TYPES FROM GRAPHQL SCHEMA
399
+ *
400
+ * generated types we generate from graphql schema that match the structure of the
401
+ * response type when querying from Hasura schema.
402
+ *
403
+ * These types are used as the return type when making the actual request (usually
404
+ * under the /internal/ folder)
405
+ */
406
+
407
+ /**
408
+ * CUSTOM RESPONSE TYPES FOR THE END USER
409
+ *
410
+ * To provide a good dev exp, we build custom types derived from the
411
+ * query types to be the response type the end developer/user will
412
+ * work with.
413
+ *
414
+ * These types are used as the return type when calling a sdk api function
415
+ * that calls the function that queries the server (usually under the /api/ folder)
416
+ */
417
+ type GetAccountOwnedObjectsResponse = GetAccountOwnedObjectsQuery["current_objects"];
418
+ type GetAccountOwnedTokensQueryResponse = GetAccountOwnedTokensQuery["current_token_ownerships_v2"];
419
+ type GetAccountOwnedTokensFromCollectionResponse = GetAccountOwnedTokensFromCollectionQuery["current_token_ownerships_v2"];
420
+ type GetAccountCollectionsWithOwnedTokenResponse = GetAccountCollectionsWithOwnedTokensQuery["current_collection_ownership_v2_view"];
421
+ type GetAccountCoinsDataResponse = GetAccountCoinsDataQuery["current_fungible_asset_balances"];
422
+ type GetChainTopUserTransactionsResponse = GetChainTopUserTransactionsQuery["user_transactions"];
423
+ type GetEventsResponse = GetEventsQuery["events"];
424
+ type GetNumberOfDelegatorsResponse = GetNumberOfDelegatorsQuery["num_active_delegator_per_pool"];
425
+ type GetDelegatedStakingActivitiesResponse = GetDelegatedStakingActivitiesQuery["delegated_staking_activities"];
426
+ type GetCollectionDataResponse = GetCollectionDataQuery["current_collections_v2"][0];
427
+ type GetTokenDataResponse = GetTokenDataQuery["current_token_datas_v2"][0];
428
+ type GetProcessorStatusResponse = GetProcessorStatusQuery["processor_status"];
429
+ type GetFungibleAssetMetadataResponse = GetFungibleAssetMetadataQuery["fungible_asset_metadata"];
430
+ type GetFungibleAssetActivitiesResponse = GetFungibleAssetActivitiesQuery["fungible_asset_activities"];
431
+ type GetCurrentFungibleAssetBalancesResponse = GetCurrentFungibleAssetBalancesQuery["current_fungible_asset_balances"];
432
+ type GetTokenActivityResponse = GetTokenActivityQuery["token_activities_v2"];
433
+ type GetCurrentTokenOwnershipResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"][0];
434
+ type GetOwnedTokensResponse = GetCurrentTokenOwnershipQuery["current_token_ownerships_v2"];
435
+ type GetANSNameResponse = GetNamesQuery["current_aptos_names"];
436
+ /**
437
+ * A generic type that being passed by each function and holds an
438
+ * array of properties we can sort the query by
439
+ */
440
+ type OrderBy<T> = Array<{
441
+ [K in keyof T]?: OrderByValue;
442
+ }>;
443
+ type OrderByValue = "asc" | "asc_nulls_first" | "asc_nulls_last" | "desc" | "desc_nulls_first" | "desc_nulls_last";
444
+ /**
445
+ * Refers to the token standard we want to query for
446
+ */
447
+ type TokenStandard = "v1" | "v2";
448
+ /**
449
+ * The graphql query type to pass into the `queryIndexer` function
450
+ */
451
+ type GraphqlQuery = {
452
+ query: string;
453
+ variables?: {};
454
+ };
455
+
456
+ declare enum MimeType {
457
+ /**
458
+ * JSON representation, used for transaction submission and accept type JSON output
459
+ */
460
+ JSON = "application/json",
461
+ /**
462
+ * BCS representation, used for accept type BCS output
463
+ */
464
+ BCS = "application/x-bcs",
465
+ /**
466
+ * BCS representation, used for transaction submission in BCS input
467
+ */
468
+ BCS_SIGNED_TRANSACTION = "application/x.aptos.signed_transaction+bcs",
469
+ BCS_VIEW_FUNCTION = "application/x.aptos.view_function+bcs"
470
+ }
471
+ /**
472
+ * Hex data as input to a function
473
+ */
474
+ type HexInput = string | Uint8Array;
475
+ /**
476
+ * TypeTag enum as they are represented in Rust
477
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/language_storage.rs#L27}
478
+ */
479
+ declare enum TypeTagVariants {
480
+ Bool = 0,
481
+ U8 = 1,
482
+ U64 = 2,
483
+ U128 = 3,
484
+ Address = 4,
485
+ Signer = 5,
486
+ Vector = 6,
487
+ Struct = 7,
488
+ U16 = 8,
489
+ U32 = 9,
490
+ U256 = 10,
491
+ Reference = 254,// This is specifically a placeholder and does not represent a real type
492
+ Generic = 255
493
+ }
494
+ /**
495
+ * Script transaction arguments enum as they are represented in Rust
496
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/third_party/move/move-core/types/src/transaction_argument.rs#L11}
497
+ */
498
+ declare enum ScriptTransactionArgumentVariants {
499
+ U8 = 0,
500
+ U64 = 1,
501
+ U128 = 2,
502
+ Address = 3,
503
+ U8Vector = 4,
504
+ Bool = 5,
505
+ U16 = 6,
506
+ U32 = 7,
507
+ U256 = 8
508
+ }
509
+ /**
510
+ * Transaction payload enum as they are represented in Rust
511
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L478}
512
+ */
513
+ declare enum TransactionPayloadVariants {
514
+ Script = 0,
515
+ EntryFunction = 2,
516
+ Multisig = 3
517
+ }
518
+ /**
519
+ * Transaction variants enum as they are represented in Rust
520
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/mod.rs#L440}
521
+ */
522
+ declare enum TransactionVariants {
523
+ MultiAgentTransaction = 0,
524
+ FeePayerTransaction = 1
525
+ }
526
+ /**
527
+ * Transaction Authenticator enum as they are represented in Rust
528
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L44}
529
+ */
530
+ declare enum TransactionAuthenticatorVariant {
531
+ Ed25519 = 0,
532
+ MultiEd25519 = 1,
533
+ MultiAgent = 2,
534
+ FeePayer = 3,
535
+ SingleSender = 4
536
+ }
537
+ /**
538
+ * Transaction Authenticator enum as they are represented in Rust
539
+ * {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs#L414}
540
+ */
541
+ declare enum AccountAuthenticatorVariant {
542
+ Ed25519 = 0,
543
+ MultiEd25519 = 1,
544
+ SingleKey = 2,
545
+ MultiKey = 3
546
+ }
547
+ declare enum AnyPublicKeyVariant {
548
+ Ed25519 = 0,
549
+ Secp256k1 = 1
550
+ }
551
+ declare enum AnySignatureVariant {
552
+ Ed25519 = 0,
553
+ Secp256k1 = 1
554
+ }
555
+ /**
556
+ * BCS types
557
+ */
558
+ type Uint8 = number;
559
+ type Uint16 = number;
560
+ type Uint32 = number;
561
+ type Uint64 = bigint;
562
+ type Uint128 = bigint;
563
+ type Uint256 = bigint;
564
+ type AnyNumber = number | bigint;
565
+ /**
566
+ * Set of configuration options that can be provided when initializing the SDK.
567
+ * The purpose of these options is to configure various aspects of the SDK's
568
+ * behavior and interaction with the Aptos network
569
+ */
570
+ type AptosSettings = {
571
+ readonly network?: Network;
572
+ readonly fullnode?: string;
573
+ readonly faucet?: string;
574
+ readonly indexer?: string;
575
+ readonly clientConfig?: ClientConfig;
576
+ readonly client?: Client;
577
+ readonly fullnodeConfig?: FullNodeConfig;
578
+ readonly indexerConfig?: IndexerConfig;
579
+ readonly faucetConfig?: FaucetConfig;
580
+ };
581
+ /**
582
+ *
583
+ * Controls the number of results that are returned and the starting position of those results.
584
+ * @param offset parameter specifies the starting position of the query result within the set of data. Default is 0.
585
+ * @param limit specifies the maximum number of items or records to return in a query result. Default is 25.
586
+ */
587
+ interface PaginationArgs {
588
+ offset?: AnyNumber;
589
+ limit?: number;
590
+ }
591
+ interface TokenStandardArg {
592
+ tokenStandard?: TokenStandard;
593
+ }
594
+ interface OrderByArg<T extends {}> {
595
+ orderBy?: OrderBy<T>;
596
+ }
597
+ interface WhereArg<T extends {}> {
598
+ where?: T;
599
+ }
600
+ /**
601
+ * QUERY TYPES
602
+ */
603
+ /**
604
+ * A configuration object we can pass with the request to the server.
605
+ *
606
+ * @param API_KEY - api key generated from developer portal {@link https://developers.aptoslabs.com/manage/api-keys}}
607
+ * @param HEADERS - extra headers we want to send with the request
608
+ * @param WITH_CREDENTIALS - whether to carry cookies. By default, it is set to true and cookies will be sent
609
+ */
610
+ type ClientConfig = ClientHeadersType & {
611
+ WITH_CREDENTIALS?: boolean;
612
+ API_KEY?: string;
613
+ };
614
+ /**
615
+ * A Fullnode only configuration object
616
+ *
617
+ * @param HEADERS - extra headers we want to send with the request
618
+ */
619
+ type FullNodeConfig = ClientHeadersType;
620
+ /**
621
+ * An Indexer only configuration object
622
+ *
623
+ * @param HEADERS - extra headers we want to send with the request
624
+ */
625
+ type IndexerConfig = ClientHeadersType;
626
+ /**
627
+ * A Faucet only configuration object
628
+ *
629
+ * @param HEADERS - extra headers we want to send with the request
630
+ * @param AUTH_TOKEN - an auth token to send with a faucet request
631
+ */
632
+ type FaucetConfig = ClientHeadersType & {
633
+ AUTH_TOKEN?: string;
634
+ };
635
+ /**
636
+ * General type definition for client HEADERS
637
+ */
638
+ type ClientHeadersType = {
639
+ HEADERS?: Record<string, string | number | boolean>;
640
+ };
641
+ interface ClientRequest<Req> {
642
+ url: string;
643
+ method: "GET" | "POST";
644
+ originMethod?: string;
645
+ body?: Req;
646
+ contentType?: string;
647
+ params?: any;
648
+ overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;
649
+ headers?: Record<string, any>;
650
+ }
651
+ interface ClientResponse<Res> {
652
+ status: number;
653
+ statusText: string;
654
+ data: Res;
655
+ config?: any;
656
+ request?: any;
657
+ response?: any;
658
+ headers?: any;
659
+ }
660
+ interface Client {
661
+ provider<Req, Res>(requestOptions: ClientRequest<Req>): Promise<ClientResponse<Res>>;
662
+ }
663
+ /**
664
+ * The API request type
665
+ *
666
+ * @param url - the url to make the request to, i.e https://fullnode.devnet.aptoslabs.com/v1
667
+ * @param method - the request method "GET" | "POST"
668
+ * @param endpoint (optional) - the endpoint to make the request to, i.e transactions
669
+ * @param body (optional) - the body of the request
670
+ * @param contentType (optional) - the content type to set the `content-type` header to,
671
+ * by default is set to `application/json`
672
+ * @param params (optional) - query params to add to the request
673
+ * @param originMethod (optional) - the local method the request came from
674
+ * @param overrides (optional) - a `ClientConfig` object type to override request data
675
+ */
676
+ type AptosRequest = {
677
+ url: string;
678
+ method: "GET" | "POST";
679
+ path?: string;
680
+ body?: any;
681
+ contentType?: string;
682
+ acceptType?: string;
683
+ params?: Record<string, string | AnyNumber | boolean | undefined>;
684
+ originMethod?: string;
685
+ overrides?: ClientConfig & FullNodeConfig & IndexerConfig & FaucetConfig;
686
+ };
687
+ /**
688
+ * Specifies ledger version of transactions. By default latest version will be used
689
+ */
690
+ type LedgerVersionArg = {
691
+ ledgerVersion?: AnyNumber;
692
+ };
693
+ /**
694
+ * RESPONSE TYPES
695
+ */
696
+ /**
697
+ * Type holding the outputs of the estimate gas API
698
+ */
699
+ type GasEstimation = {
700
+ /**
701
+ * The deprioritized estimate for the gas unit price
702
+ */
703
+ deprioritized_gas_estimate?: number;
704
+ /**
705
+ * The current estimate for the gas unit price
706
+ */
707
+ gas_estimate: number;
708
+ /**
709
+ * The prioritized estimate for the gas unit price
710
+ */
711
+ prioritized_gas_estimate?: number;
712
+ };
713
+ type MoveResource = {
714
+ type: MoveStructId;
715
+ data: {};
716
+ };
717
+ type AccountData = {
718
+ sequence_number: string;
719
+ authentication_key: string;
720
+ };
721
+ type MoveModuleBytecode = {
722
+ bytecode: string;
723
+ abi?: MoveModule;
724
+ };
725
+ /**
726
+ * TRANSACTION TYPES
727
+ */
728
+ declare enum TransactionResponseType {
729
+ Pending = "pending_transaction",
730
+ User = "user_transaction",
731
+ Genesis = "genesis_transaction",
732
+ BlockMetadata = "block_metadata_transaction",
733
+ StateCheckpoint = "state_checkpoint_transaction",
734
+ Validator = "validator_transaction"
735
+ }
736
+ type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
737
+ type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
738
+ declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
739
+ declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
740
+ declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
741
+ declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
742
+ declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
743
+ declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
744
+ type PendingTransactionResponse = {
745
+ type: TransactionResponseType.Pending;
746
+ hash: string;
747
+ sender: string;
748
+ sequence_number: string;
749
+ max_gas_amount: string;
750
+ gas_unit_price: string;
751
+ expiration_timestamp_secs: string;
752
+ payload: TransactionPayloadResponse;
753
+ signature?: TransactionSignature;
754
+ };
755
+ type UserTransactionResponse = {
756
+ type: TransactionResponseType.User;
757
+ version: string;
758
+ hash: string;
759
+ state_change_hash: string;
760
+ event_root_hash: string;
761
+ state_checkpoint_hash: string | null;
762
+ gas_used: string;
763
+ /**
764
+ * Whether the transaction was successful
765
+ */
766
+ success: boolean;
767
+ /**
768
+ * The VM status of the transaction, can tell useful information in a failure
769
+ */
770
+ vm_status: string;
771
+ accumulator_root_hash: string;
772
+ /**
773
+ * Final state of resources changed by the transaction
774
+ */
775
+ changes: Array<WriteSetChange>;
776
+ sender: string;
777
+ sequence_number: string;
778
+ max_gas_amount: string;
779
+ gas_unit_price: string;
780
+ expiration_timestamp_secs: string;
781
+ payload: TransactionPayloadResponse;
782
+ signature?: TransactionSignature;
783
+ /**
784
+ * Events generated by the transaction
785
+ */
786
+ events: Array<Event>;
787
+ timestamp: string;
788
+ };
789
+ type GenesisTransactionResponse = {
790
+ type: TransactionResponseType.Genesis;
791
+ version: string;
792
+ hash: string;
793
+ state_change_hash: string;
794
+ event_root_hash: string;
795
+ state_checkpoint_hash?: string;
796
+ gas_used: string;
797
+ /**
798
+ * Whether the transaction was successful
799
+ */
800
+ success: boolean;
801
+ /**
802
+ * The VM status of the transaction, can tell useful information in a failure
803
+ */
804
+ vm_status: string;
805
+ accumulator_root_hash: string;
806
+ /**
807
+ * Final state of resources changed by the transaction
808
+ */
809
+ changes: Array<WriteSetChange>;
810
+ payload: GenesisPayload;
811
+ /**
812
+ * Events emitted during genesis
813
+ */
814
+ events: Array<Event>;
815
+ };
816
+ type BlockMetadataTransactionResponse = {
817
+ type: TransactionResponseType.BlockMetadata;
818
+ version: string;
819
+ hash: string;
820
+ state_change_hash: string;
821
+ event_root_hash: string;
822
+ state_checkpoint_hash: string | null;
823
+ gas_used: string;
824
+ /**
825
+ * Whether the transaction was successful
826
+ */
827
+ success: boolean;
828
+ /**
829
+ * The VM status of the transaction, can tell useful information in a failure
830
+ */
831
+ vm_status: string;
832
+ accumulator_root_hash: string;
833
+ /**
834
+ * Final state of resources changed by the transaction
835
+ */
836
+ changes: Array<WriteSetChange>;
837
+ id: string;
838
+ epoch: string;
839
+ round: string;
840
+ /**
841
+ * The events emitted at the block creation
842
+ */
843
+ events: Array<Event>;
844
+ /**
845
+ * Previous block votes
846
+ */
847
+ previous_block_votes_bitvec: Array<number>;
848
+ proposer: string;
849
+ /**
850
+ * The indices of the proposers who failed to propose
851
+ */
852
+ failed_proposer_indices: Array<number>;
853
+ timestamp: string;
854
+ };
855
+ type StateCheckpointTransactionResponse = {
856
+ type: TransactionResponseType.StateCheckpoint;
857
+ version: string;
858
+ hash: string;
859
+ state_change_hash: string;
860
+ event_root_hash: string;
861
+ state_checkpoint_hash: string | null;
862
+ gas_used: string;
863
+ /**
864
+ * Whether the transaction was successful
865
+ */
866
+ success: boolean;
867
+ /**
868
+ * The VM status of the transaction, can tell useful information in a failure
869
+ */
870
+ vm_status: string;
871
+ accumulator_root_hash: string;
872
+ /**
873
+ * Final state of resources changed by the transaction
874
+ */
875
+ changes: Array<WriteSetChange>;
876
+ timestamp: string;
877
+ };
878
+ type ValidatorTransactionResponse = {
879
+ type: TransactionResponseType.Validator;
880
+ version: string;
881
+ hash: string;
882
+ state_change_hash: string;
883
+ event_root_hash: string;
884
+ state_checkpoint_hash: string | null;
885
+ gas_used: string;
886
+ /**
887
+ * Whether the transaction was successful
888
+ */
889
+ success: boolean;
890
+ /**
891
+ * The VM status of the transaction, can tell useful information in a failure
892
+ */
893
+ vm_status: string;
894
+ accumulator_root_hash: string;
895
+ /**
896
+ * Final state of resources changed by the transaction
897
+ */
898
+ changes: Array<WriteSetChange>;
899
+ /**
900
+ * The events emitted by the validator transaction
901
+ */
902
+ events: Array<Event>;
903
+ timestamp: string;
904
+ };
905
+ /**
906
+ * WRITESET CHANGE TYPES
907
+ */
908
+ type WriteSetChange = WriteSetChangeDeleteModule | WriteSetChangeDeleteResource | WriteSetChangeDeleteTableItem | WriteSetChangeWriteModule | WriteSetChangeWriteResource | WriteSetChangeWriteTableItem;
909
+ type WriteSetChangeDeleteModule = {
910
+ type: string;
911
+ address: string;
912
+ /**
913
+ * State key hash
914
+ */
915
+ state_key_hash: string;
916
+ module: MoveModuleId;
917
+ };
918
+ type WriteSetChangeDeleteResource = {
919
+ type: string;
920
+ address: string;
921
+ state_key_hash: string;
922
+ resource: string;
923
+ };
924
+ type WriteSetChangeDeleteTableItem = {
925
+ type: string;
926
+ state_key_hash: string;
927
+ handle: string;
928
+ key: string;
929
+ data?: DeletedTableData;
930
+ };
931
+ type WriteSetChangeWriteModule = {
932
+ type: string;
933
+ address: string;
934
+ state_key_hash: string;
935
+ data: MoveModuleBytecode;
936
+ };
937
+ type WriteSetChangeWriteResource = {
938
+ type: string;
939
+ address: string;
940
+ state_key_hash: string;
941
+ data: MoveResource;
942
+ };
943
+ type WriteSetChangeWriteTableItem = {
944
+ type: string;
945
+ state_key_hash: string;
946
+ handle: string;
947
+ key: string;
948
+ value: string;
949
+ data?: DecodedTableData;
950
+ };
951
+ type DecodedTableData = {
952
+ /**
953
+ * Key of table in JSON
954
+ */
955
+ key: any;
956
+ /**
957
+ * Type of key
958
+ */
959
+ key_type: string;
960
+ /**
961
+ * Value of table in JSON
962
+ */
963
+ value: any;
964
+ /**
965
+ * Type of value
966
+ */
967
+ value_type: string;
968
+ };
969
+ /**
970
+ * Deleted table data
971
+ */
972
+ type DeletedTableData = {
973
+ /**
974
+ * Deleted key
975
+ */
976
+ key: any;
977
+ /**
978
+ * Deleted key type
979
+ */
980
+ key_type: string;
981
+ };
982
+ type TransactionPayloadResponse = EntryFunctionPayloadResponse | ScriptPayloadResponse | MultisigPayloadResponse;
983
+ type EntryFunctionPayloadResponse = {
984
+ type: string;
985
+ function: MoveFunctionId;
986
+ /**
987
+ * Type arguments of the function
988
+ */
989
+ type_arguments: Array<string>;
990
+ /**
991
+ * Arguments of the function
992
+ */
993
+ arguments: Array<any>;
994
+ };
995
+ type ScriptPayloadResponse = {
996
+ type: string;
997
+ code: MoveScriptBytecode;
998
+ /**
999
+ * Type arguments of the function
1000
+ */
1001
+ type_arguments: Array<string>;
1002
+ /**
1003
+ * Arguments of the function
1004
+ */
1005
+ arguments: Array<any>;
1006
+ };
1007
+ type MultisigPayloadResponse = {
1008
+ type: string;
1009
+ multisig_address: string;
1010
+ transaction_payload?: EntryFunctionPayloadResponse;
1011
+ };
1012
+ type GenesisPayload = {
1013
+ type: string;
1014
+ write_set: WriteSet;
1015
+ };
1016
+ /**
1017
+ * Move script bytecode
1018
+ */
1019
+ type MoveScriptBytecode = {
1020
+ bytecode: string;
1021
+ abi?: MoveFunction;
1022
+ };
1023
+ /**
1024
+ * These are the JSON representations of transaction signatures returned from the node API.
1025
+ */
1026
+ type TransactionSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature | TransactionMultiAgentSignature | TransactionFeePayerSignature;
1027
+ declare function isEd25519Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
1028
+ declare function isSecp256k1Signature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
1029
+ declare function isMultiAgentSignature(signature: TransactionSignature): signature is TransactionMultiAgentSignature;
1030
+ declare function isFeePayerSignature(signature: TransactionSignature): signature is TransactionFeePayerSignature;
1031
+ declare function isMultiEd25519Signature(signature: TransactionSignature): signature is TransactionMultiEd25519Signature;
1032
+ type TransactionEd25519Signature = {
1033
+ type: string;
1034
+ public_key: string;
1035
+ signature: "ed25519_signature";
1036
+ };
1037
+ type TransactionSecp256k1Signature = {
1038
+ type: string;
1039
+ public_key: string;
1040
+ signature: "secp256k1_ecdsa_signature";
1041
+ };
1042
+ type TransactionMultiEd25519Signature = {
1043
+ type: "multi_ed25519_signature";
1044
+ /**
1045
+ * The public keys for the Ed25519 signature
1046
+ */
1047
+ public_keys: Array<string>;
1048
+ /**
1049
+ * Signature associated with the public keys in the same order
1050
+ */
1051
+ signatures: Array<string>;
1052
+ /**
1053
+ * The number of signatures required for a successful transaction
1054
+ */
1055
+ threshold: number;
1056
+ bitmap: string;
1057
+ };
1058
+ type TransactionMultiAgentSignature = {
1059
+ type: "multi_agent_signature";
1060
+ sender: AccountSignature;
1061
+ /**
1062
+ * The other involved parties' addresses
1063
+ */
1064
+ secondary_signer_addresses: Array<string>;
1065
+ /**
1066
+ * The associated signatures, in the same order as the secondary addresses
1067
+ */
1068
+ secondary_signers: Array<AccountSignature>;
1069
+ };
1070
+ type TransactionFeePayerSignature = {
1071
+ type: "fee_payer_signature";
1072
+ sender: AccountSignature;
1073
+ /**
1074
+ * The other involved parties' addresses
1075
+ */
1076
+ secondary_signer_addresses: Array<string>;
1077
+ /**
1078
+ * The associated signatures, in the same order as the secondary addresses
1079
+ */
1080
+ secondary_signers: Array<AccountSignature>;
1081
+ fee_payer_address: string;
1082
+ fee_payer_signer: AccountSignature;
1083
+ };
1084
+ /**
1085
+ * The union of all single account signatures.
1086
+ */
1087
+ type AccountSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature;
1088
+ type WriteSet = ScriptWriteSet | DirectWriteSet;
1089
+ type ScriptWriteSet = {
1090
+ type: string;
1091
+ execute_as: string;
1092
+ script: ScriptPayloadResponse;
1093
+ };
1094
+ type DirectWriteSet = {
1095
+ type: string;
1096
+ changes: Array<WriteSetChange>;
1097
+ events: Array<Event>;
1098
+ };
1099
+ type EventGuid = {
1100
+ creation_number: string;
1101
+ account_address: string;
1102
+ };
1103
+ type Event = {
1104
+ guid: EventGuid;
1105
+ sequence_number: string;
1106
+ type: string;
1107
+ /**
1108
+ * The JSON representation of the event
1109
+ */
1110
+ data: any;
1111
+ };
1112
+ /**
1113
+ * Map of Move types to local TypeScript types
1114
+ */
1115
+ type MoveUint8Type = number;
1116
+ type MoveUint16Type = number;
1117
+ type MoveUint32Type = number;
1118
+ type MoveUint64Type = string;
1119
+ type MoveUint128Type = string;
1120
+ type MoveUint256Type = string;
1121
+ type MoveAddressType = string;
1122
+ type MoveObjectType = string;
1123
+ type MoveOptionType = MoveType | null | undefined;
1124
+ /**
1125
+ * This is the format for a fully qualified struct, resource, or entry function in Move.
1126
+ */
1127
+ type MoveStructId = `${string}::${string}::${string}`;
1128
+ type MoveFunctionId = MoveStructId;
1129
+ type MoveStructType = {};
1130
+ type MoveType = boolean | string | MoveUint8Type | MoveUint16Type | MoveUint32Type | MoveUint64Type | MoveUint128Type | MoveUint256Type | MoveAddressType | MoveObjectType | MoveStructType | Array<MoveType>;
1131
+ /**
1132
+ * Possible Move values acceptable by move functions (entry, view)
1133
+ *
1134
+ * Map of a Move value to the corresponding TypeScript value
1135
+ *
1136
+ * `Bool -> boolean`
1137
+ *
1138
+ * `u8, u16, u32 -> number`
1139
+ *
1140
+ * `u64, u128, u256 -> string`
1141
+ *
1142
+ * `String -> string`
1143
+ *
1144
+ * `Address -> 0x${string}`
1145
+ *
1146
+ * `Struct - 0x${string}::${string}::${string}`
1147
+ *
1148
+ * `Object -> 0x${string}`
1149
+ *
1150
+ * `Vector -> Array<MoveValue>`
1151
+ *
1152
+ * `Option -> MoveValue | null | undefined`
1153
+ */
1154
+ type MoveValue = boolean | string | MoveUint8Type | MoveUint16Type | MoveUint32Type | MoveUint64Type | MoveUint128Type | MoveUint256Type | MoveAddressType | MoveObjectType | MoveStructId | MoveOptionType | Array<MoveValue>;
1155
+ /**
1156
+ * Move module id is a string representation of Move module.
1157
+ * Module name is case-sensitive.
1158
+ */
1159
+ type MoveModuleId = `${string}::${string}`;
1160
+ /**
1161
+ * Move function visibility
1162
+ */
1163
+ declare enum MoveFunctionVisibility {
1164
+ PRIVATE = "private",
1165
+ PUBLIC = "public",
1166
+ FRIEND = "friend"
1167
+ }
1168
+ /**
1169
+ * Move function ability
1170
+ */
1171
+ declare enum MoveAbility {
1172
+ STORE = "store",
1173
+ DROP = "drop",
1174
+ KEY = "key",
1175
+ COPY = "copy"
1176
+ }
1177
+ /**
1178
+ * Move abilities tied to the generic type param and associated with the function that uses it
1179
+ */
1180
+ type MoveFunctionGenericTypeParam = {
1181
+ constraints: Array<MoveAbility>;
1182
+ };
1183
+ /**
1184
+ * Move struct field
1185
+ */
1186
+ type MoveStructField = {
1187
+ name: string;
1188
+ type: string;
1189
+ };
1190
+ /**
1191
+ * A Move module
1192
+ */
1193
+ type MoveModule = {
1194
+ address: string;
1195
+ name: string;
1196
+ /**
1197
+ * Friends of the module
1198
+ */
1199
+ friends: Array<MoveModuleId>;
1200
+ /**
1201
+ * Public functions of the module
1202
+ */
1203
+ exposed_functions: Array<MoveFunction>;
1204
+ /**
1205
+ * Structs of the module
1206
+ */
1207
+ structs: Array<MoveStruct>;
1208
+ };
1209
+ /**
1210
+ * A move struct
1211
+ */
1212
+ type MoveStruct = {
1213
+ name: string;
1214
+ /**
1215
+ * Whether the struct is a native struct of Move
1216
+ */
1217
+ is_native: boolean;
1218
+ /**
1219
+ * Abilities associated with the struct
1220
+ */
1221
+ abilities: Array<MoveAbility>;
1222
+ /**
1223
+ * Generic types associated with the struct
1224
+ */
1225
+ generic_type_params: Array<MoveFunctionGenericTypeParam>;
1226
+ /**
1227
+ * Fields associated with the struct
1228
+ */
1229
+ fields: Array<MoveStructField>;
1230
+ };
1231
+ /**
1232
+ * Move function
1233
+ */
1234
+ type MoveFunction = {
1235
+ name: string;
1236
+ visibility: MoveFunctionVisibility;
1237
+ /**
1238
+ * Whether the function can be called as an entry function directly in a transaction
1239
+ */
1240
+ is_entry: boolean;
1241
+ /**
1242
+ * Whether the function is a view function or not
1243
+ */
1244
+ is_view: boolean;
1245
+ /**
1246
+ * Generic type params associated with the Move function
1247
+ */
1248
+ generic_type_params: Array<MoveFunctionGenericTypeParam>;
1249
+ /**
1250
+ * Parameters associated with the move function
1251
+ */
1252
+ params: Array<string>;
1253
+ /**
1254
+ * Return type of the function
1255
+ */
1256
+ return: Array<string>;
1257
+ };
1258
+ declare enum RoleType {
1259
+ VALIDATOR = "validator",
1260
+ FULL_NODE = "full_node"
1261
+ }
1262
+ type LedgerInfo = {
1263
+ /**
1264
+ * Chain ID of the current chain
1265
+ */
1266
+ chain_id: number;
1267
+ epoch: string;
1268
+ ledger_version: string;
1269
+ oldest_ledger_version: string;
1270
+ ledger_timestamp: string;
1271
+ node_role: RoleType;
1272
+ oldest_block_height: string;
1273
+ block_height: string;
1274
+ /**
1275
+ * Git hash of the build of the API endpoint. Can be used to determine the exact
1276
+ * software version used by the API endpoint.
1277
+ */
1278
+ git_hash?: string;
1279
+ };
1280
+ /**
1281
+ * A Block type
1282
+ */
1283
+ type Block = {
1284
+ block_height: string;
1285
+ block_hash: string;
1286
+ block_timestamp: string;
1287
+ first_version: string;
1288
+ last_version: string;
1289
+ /**
1290
+ * The transactions in the block in sequential order
1291
+ */
1292
+ transactions?: Array<TransactionResponse>;
1293
+ };
1294
+ /**
1295
+ * Table Item request for the GetTableItem API
1296
+ */
1297
+ type TableItemRequest = {
1298
+ key_type: MoveValue;
1299
+ value_type: MoveValue;
1300
+ /**
1301
+ * The value of the table item's key
1302
+ */
1303
+ key: any;
1304
+ };
1305
+ /**
1306
+ * A list of Authentication Key schemes that are supported by Aptos.
1307
+ *
1308
+ * They are combinations of signing schemes and derive schemes.
1309
+ */
1310
+ type AuthenticationKeyScheme = SigningScheme | DeriveScheme;
1311
+ declare enum SigningScheme {
1312
+ /**
1313
+ * For Ed25519PublicKey
1314
+ */
1315
+ Ed25519 = 0,
1316
+ /**
1317
+ * For MultiEd25519PublicKey
1318
+ */
1319
+ MultiEd25519 = 1,
1320
+ /**
1321
+ * For SingleKey ecdsa
1322
+ */
1323
+ SingleKey = 2,
1324
+ MultiKey = 3
1325
+ }
1326
+ declare enum SigningSchemeInput {
1327
+ /**
1328
+ * For Ed25519PublicKey
1329
+ */
1330
+ Ed25519 = 0,
1331
+ /**
1332
+ * For Secp256k1Ecdsa
1333
+ */
1334
+ Secp256k1Ecdsa = 2
1335
+ }
1336
+ /**
1337
+ * Scheme used for deriving account addresses from other data
1338
+ */
1339
+ declare enum DeriveScheme {
1340
+ /**
1341
+ * Derives an address using an AUID, used for objects
1342
+ */
1343
+ DeriveAuid = 251,
1344
+ /**
1345
+ * Derives an address from another object address
1346
+ */
1347
+ DeriveObjectAddressFromObject = 252,
1348
+ /**
1349
+ * Derives an address from a GUID, used for objects
1350
+ */
1351
+ DeriveObjectAddressFromGuid = 253,
1352
+ /**
1353
+ * Derives an address from seed bytes, used for named objects
1354
+ */
1355
+ DeriveObjectAddressFromSeed = 254,
1356
+ /**
1357
+ * Derives an address from seed bytes, used for resource accounts
1358
+ */
1359
+ DeriveResourceAccountAddress = 255
1360
+ }
1361
+ /**
1362
+ * Option properties to pass for waitForTransaction() function
1363
+ */
1364
+ type WaitForTransactionOptions = {
1365
+ timeoutSecs?: number;
1366
+ checkSuccess?: boolean;
1367
+ waitForIndexer?: boolean;
1368
+ };
1369
+ /**
1370
+ * Input type to generate an account using Single Signer
1371
+ * Ed25519 or Legacy Ed25519
1372
+ */
1373
+ type GenerateAccountWithEd25519 = {
1374
+ scheme: SigningSchemeInput.Ed25519;
1375
+ legacy: boolean;
1376
+ };
1377
+ /**
1378
+ * Input type to generate an account using Single Signer
1379
+ * Secp256k1
1380
+ */
1381
+ type GenerateAccountWithSingleSignerSecp256k1Key = {
1382
+ scheme: SigningSchemeInput.Secp256k1Ecdsa;
1383
+ legacy?: false;
1384
+ };
1385
+ type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
1386
+
1387
+ /**
1388
+ * This interface exists to define Deserializable<T> inputs for functions that
1389
+ * deserialize a byte buffer into a type T.
1390
+ * It is not intended to be implemented or extended, because Typescript has no support
1391
+ * for static methods in interfaces.
1392
+ */
1393
+ interface Deserializable<T> {
1394
+ deserialize(deserializer: Deserializer): T;
1395
+ }
1396
+ declare class Deserializer {
1397
+ private buffer;
1398
+ private offset;
1399
+ constructor(data: Uint8Array);
1400
+ private read;
1401
+ /**
1402
+ * Deserializes a string. UTF8 string is supported. Reads the string's bytes length "l" first,
1403
+ * and then reads "l" bytes of content. Decodes the byte array into a string.
1404
+ *
1405
+ * BCS layout for "string": string_length | string_content
1406
+ * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
1407
+ *
1408
+ * @example
1409
+ * ```ts
1410
+ * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
1411
+ * assert(deserializer.deserializeStr() === "1234abcd");
1412
+ * ```
1413
+ */
1414
+ deserializeStr(): string;
1415
+ /**
1416
+ * Deserializes an array of bytes.
1417
+ *
1418
+ * BCS layout for "bytes": bytes_length | bytes
1419
+ * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
1420
+ */
1421
+ deserializeBytes(): Uint8Array;
1422
+ /**
1423
+ * Deserializes an array of bytes. The number of bytes to read is already known.
1424
+ *
1425
+ */
1426
+ deserializeFixedBytes(len: number): Uint8Array;
1427
+ /**
1428
+ * Deserializes a boolean value.
1429
+ *
1430
+ * BCS layout for "boolean": One byte. "0x01" for true and "0x00" for false.
1431
+ */
1432
+ deserializeBool(): boolean;
1433
+ /**
1434
+ * Deserializes a uint8 number.
1435
+ *
1436
+ * BCS layout for "uint8": One byte. Binary format in little-endian representation.
1437
+ */
1438
+ deserializeU8(): Uint8;
1439
+ /**
1440
+ * Deserializes a uint16 number.
1441
+ *
1442
+ * BCS layout for "uint16": Two bytes. Binary format in little-endian representation.
1443
+ * @example
1444
+ * ```ts
1445
+ * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));
1446
+ * assert(deserializer.deserializeU16() === 4660);
1447
+ * ```
1448
+ */
1449
+ deserializeU16(): Uint16;
1450
+ /**
1451
+ * Deserializes a uint32 number.
1452
+ *
1453
+ * BCS layout for "uint32": Four bytes. Binary format in little-endian representation.
1454
+ * @example
1455
+ * ```ts
1456
+ * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));
1457
+ * assert(deserializer.deserializeU32() === 305419896);
1458
+ * ```
1459
+ */
1460
+ deserializeU32(): Uint32;
1461
+ /**
1462
+ * Deserializes a uint64 number.
1463
+ *
1464
+ * BCS layout for "uint64": Eight bytes. Binary format in little-endian representation.
1465
+ * @example
1466
+ * ```ts
1467
+ * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));
1468
+ * assert(deserializer.deserializeU64() === 1311768467750121216);
1469
+ * ```
1470
+ */
1471
+ deserializeU64(): Uint64;
1472
+ /**
1473
+ * Deserializes a uint128 number.
1474
+ *
1475
+ * BCS layout for "uint128": Sixteen bytes. Binary format in little-endian representation.
1476
+ */
1477
+ deserializeU128(): Uint128;
1478
+ /**
1479
+ * Deserializes a uint256 number.
1480
+ *
1481
+ * BCS layout for "uint256": Thirty-two bytes. Binary format in little-endian representation.
1482
+ */
1483
+ deserializeU256(): Uint256;
1484
+ /**
1485
+ * Deserializes a uleb128 encoded uint32 number.
1486
+ *
1487
+ * BCS use uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values
1488
+ */
1489
+ deserializeUleb128AsU32(): Uint32;
1490
+ /**
1491
+ * Helper function that primarily exists to support alternative syntax for deserialization.
1492
+ * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use
1493
+ * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.
1494
+ *
1495
+ * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));
1496
+ * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function
1497
+ * // value is now an instance of MyClass
1498
+ * // equivalent to `const value = MyClass.deserialize(deserializer)`
1499
+ * @param cls The BCS-deserializable class to deserialize the buffered bytes into.
1500
+ *
1501
+ * @returns the deserialized value of class type T
1502
+ */
1503
+ deserialize<T>(cls: Deserializable<T>): T;
1504
+ /**
1505
+ * Deserializes an array of BCS Deserializable values given an existing Deserializer
1506
+ * instance with a loaded byte buffer.
1507
+ *
1508
+ * @param cls The BCS-deserializable class to deserialize the buffered bytes into.
1509
+ * @example
1510
+ * // serialize a vector of addresses
1511
+ * const addresses = new Array<AccountAddress>(
1512
+ * AccountAddress.from("0x1"),
1513
+ * AccountAddress.from("0x2"),
1514
+ * AccountAddress.from("0xa"),
1515
+ * AccountAddress.from("0xb"),
1516
+ * );
1517
+ * const serializer = new Serializer();
1518
+ * serializer.serializeVector(addresses);
1519
+ * const serializedBytes = serializer.toUint8Array();
1520
+ *
1521
+ * // deserialize the bytes into an array of addresses
1522
+ * const deserializer = new Deserializer(serializedBytes);
1523
+ * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);
1524
+ * // deserializedAddresses is now an array of AccountAddress instances
1525
+ * @returns an array of deserialized values of type T
1526
+ */
1527
+ deserializeVector<T>(cls: Deserializable<T>): Array<T>;
1528
+ }
1529
+
1530
+ /**
1531
+ * This error is used to explain why parsing failed.
1532
+ */
1533
+ declare class ParsingError<T> extends Error {
1534
+ /**
1535
+ * This provides a programmatic way to access why parsing failed. Downstream devs
1536
+ * might want to use this to build their own error messages if the default error
1537
+ * messages are not suitable for their use case. This should be an enum.
1538
+ */
1539
+ invalidReason: T;
1540
+ constructor(message: string, invalidReason: T);
1541
+ }
1542
+ /**
1543
+ * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,
1544
+ * this type is returned from "defensive" functions like isValid.
1545
+ */
1546
+ type ParsingResult<T> = {
1547
+ /**
1548
+ * True if valid, false otherwise.
1549
+ */
1550
+ valid: boolean;
1551
+ /**
1552
+ * If valid is false, this will be a code explaining why parsing failed.
1553
+ */
1554
+ invalidReason?: T;
1555
+ /**
1556
+ * If valid is false, this will be a string explaining why parsing failed.
1557
+ */
1558
+ invalidReasonMessage?: string;
1559
+ };
1560
+
1561
+ /**
1562
+ * This enum is used to explain why parsing might have failed.
1563
+ */
1564
+ declare enum HexInvalidReason {
1565
+ TOO_SHORT = "too_short",
1566
+ INVALID_LENGTH = "invalid_length",
1567
+ INVALID_HEX_CHARS = "invalid_hex_chars"
1568
+ }
1569
+ /**
1570
+ * NOTE: Do not use this class when working with account addresses, use AccountAddress.
1571
+ *
1572
+ * NOTE: When accepting hex data as input to a function, prefer to accept HexInput and
1573
+ * then use the static helper methods of this class to convert it into the desired
1574
+ * format. This enables the greatest flexibility for the developer.
1575
+ *
1576
+ * Hex is a helper class for working with hex data. Hex data, when represented as a
1577
+ * string, generally looks like this, for example: 0xaabbcc, 45cd32, etc.
1578
+ *
1579
+ * You might use this class like this:
1580
+ *
1581
+ * ```ts
1582
+ * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {
1583
+ * const txnHashString = Hex.fromHexInput(txnHash).toString();
1584
+ * return await getTransactionByHashInner(txnHashString);
1585
+ * }
1586
+ * ```
1587
+ *
1588
+ * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string
1589
+ * with a leading 0x prefix, regardless of what the input format was.
1590
+ *
1591
+ * These are some other ways to chain the functions together:
1592
+ * - `Hex.fromHexString({ hexInput: "0x1f" }).toUint8Array()`
1593
+ * - `new Hex([1, 3]).toStringWithoutPrefix()`
1594
+ */
1595
+ declare class Hex {
1596
+ private readonly data;
1597
+ /**
1598
+ * Create a new Hex instance from a Uint8Array.
1599
+ *
1600
+ * @param data Uint8Array
1601
+ */
1602
+ constructor(data: Uint8Array);
1603
+ /**
1604
+ * Get the inner hex data. The inner data is already a Uint8Array so no conversion
1605
+ * is taking place here, it just returns the inner data.
1606
+ *
1607
+ * @returns Hex data as Uint8Array
1608
+ */
1609
+ toUint8Array(): Uint8Array;
1610
+ /**
1611
+ * Get the hex data as a string without the 0x prefix.
1612
+ *
1613
+ * @returns Hex string without 0x prefix
1614
+ */
1615
+ toStringWithoutPrefix(): string;
1616
+ /**
1617
+ * Get the hex data as a string with the 0x prefix.
1618
+ *
1619
+ * @returns Hex string with 0x prefix
1620
+ */
1621
+ toString(): string;
1622
+ /**
1623
+ * Static method to convert a hex string to Hex
1624
+ *
1625
+ * @param str A hex string, with or without the 0x prefix
1626
+ *
1627
+ * @returns Hex
1628
+ */
1629
+ static fromHexString(str: string): Hex;
1630
+ /**
1631
+ * Static method to convert an instance of HexInput to Hex
1632
+ *
1633
+ * @param hexInput A HexInput (string or Uint8Array)
1634
+ *
1635
+ * @returns Hex
1636
+ */
1637
+ static fromHexInput(hexInput: HexInput): Hex;
1638
+ /**
1639
+ * Check if the string is valid hex.
1640
+ *
1641
+ * @param str A hex string representing byte data.
1642
+ *
1643
+ * @returns valid = true if the string is valid, false if not. If the string is not
1644
+ * valid, invalidReason and invalidReasonMessage will be set explaining why it is
1645
+ * invalid.
1646
+ */
1647
+ static isValid(str: string): ParsingResult<HexInvalidReason>;
1648
+ /**
1649
+ * Return whether Hex instances are equal. Hex instances are considered equal if
1650
+ * their underlying byte data is identical.
1651
+ *
1652
+ * @param other The Hex instance to compare to.
1653
+ * @returns true if the Hex instances are equal, false if not.
1654
+ */
1655
+ equals(other: Hex): boolean;
1656
+ }
1657
+
1658
+ declare abstract class Serializable {
1659
+ abstract serialize(serializer: Serializer): void;
1660
+ /**
1661
+ * Serializes a `Serializable` value to its BCS representation.
1662
+ * This function is the Typescript SDK equivalent of `bcs::to_bytes` in Move.
1663
+ * @returns the BCS representation of the Serializable instance as a byte buffer
1664
+ */
1665
+ bcsToBytes(): Uint8Array;
1666
+ /**
1667
+ * Helper function to get a value's BCS-serialized bytes as a Hex instance.
1668
+ * @returns a Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array
1669
+ */
1670
+ bcsToHex(): Hex;
1671
+ }
1672
+ declare class Serializer {
1673
+ private buffer;
1674
+ private offset;
1675
+ constructor(length?: number);
1676
+ private ensureBufferWillHandleSize;
1677
+ protected appendToBuffer(values: Uint8Array): void;
1678
+ private serializeWithFunction;
1679
+ /**
1680
+ * Serializes a string. UTF8 string is supported.
1681
+ *
1682
+ * The number of bytes in the string content is serialized first, as a uleb128-encoded u32 integer.
1683
+ * Then the string content is serialized as UTF8 encoded bytes.
1684
+ *
1685
+ * BCS layout for "string": string_length | string_content
1686
+ * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
1687
+ *
1688
+ * @example
1689
+ * ```ts
1690
+ * const serializer = new Serializer();
1691
+ * serializer.serializeStr("1234abcd");
1692
+ * assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
1693
+ * ```
1694
+ */
1695
+ serializeStr(value: string): void;
1696
+ /**
1697
+ * Serializes an array of bytes.
1698
+ *
1699
+ * BCS layout for "bytes": bytes_length | bytes
1700
+ * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
1701
+ */
1702
+ serializeBytes(value: Uint8Array): void;
1703
+ /**
1704
+ * Serializes an array of bytes with known length. Therefore, length doesn't need to be
1705
+ * serialized to help deserialization.
1706
+ *
1707
+ * When deserializing, the number of bytes to deserialize needs to be passed in.
1708
+ */
1709
+ serializeFixedBytes(value: Uint8Array): void;
1710
+ /**
1711
+ * Serializes a boolean value.
1712
+ *
1713
+ * BCS layout for "boolean": One byte. "0x01" for true and "0x00" for false.
1714
+ */
1715
+ serializeBool(value: boolean): void;
1716
+ /**
1717
+ * Serializes a uint8 number.
1718
+ *
1719
+ * BCS layout for "uint8": One byte. Binary format in little-endian representation.
1720
+ */
1721
+ serializeU8(value: Uint8): void;
1722
+ /**
1723
+ * Serializes a uint16 number.
1724
+ *
1725
+ * BCS layout for "uint16": Two bytes. Binary format in little-endian representation.
1726
+ * @example
1727
+ * ```ts
1728
+ * const serializer = new Serializer();
1729
+ * serializer.serializeU16(4660);
1730
+ * assert(serializer.toUint8Array() === new Uint8Array([0x34, 0x12]));
1731
+ * ```
1732
+ */
1733
+ serializeU16(value: Uint16): void;
1734
+ /**
1735
+ * Serializes a uint32 number.
1736
+ *
1737
+ * BCS layout for "uint32": Four bytes. Binary format in little-endian representation.
1738
+ * @example
1739
+ * ```ts
1740
+ * const serializer = new Serializer();
1741
+ * serializer.serializeU32(305419896);
1742
+ * assert(serializer.toUint8Array() === new Uint8Array([0x78, 0x56, 0x34, 0x12]));
1743
+ * ```
1744
+ */
1745
+ serializeU32(value: Uint32): void;
1746
+ /**
1747
+ * Serializes a uint64 number.
1748
+ *
1749
+ * BCS layout for "uint64": Eight bytes. Binary format in little-endian representation.
1750
+ * @example
1751
+ * ```ts
1752
+ * const serializer = new Serializer();
1753
+ * serializer.serializeU64(1311768467750121216);
1754
+ * assert(serializer.toUint8Array() === new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));
1755
+ * ```
1756
+ */
1757
+ serializeU64(value: AnyNumber): void;
1758
+ /**
1759
+ * Serializes a uint128 number.
1760
+ *
1761
+ * BCS layout for "uint128": Sixteen bytes. Binary format in little-endian representation.
1762
+ */
1763
+ serializeU128(value: AnyNumber): void;
1764
+ /**
1765
+ * Serializes a uint256 number.
1766
+ *
1767
+ * BCS layout for "uint256": Sixteen bytes. Binary format in little-endian representation.
1768
+ */
1769
+ serializeU256(value: AnyNumber): void;
1770
+ /**
1771
+ * Serializes a uint32 number with uleb128.
1772
+ *
1773
+ * BCS uses uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values
1774
+ */
1775
+ serializeU32AsUleb128(val: Uint32): void;
1776
+ /**
1777
+ * Returns the buffered bytes
1778
+ */
1779
+ toUint8Array(): Uint8Array;
1780
+ /**
1781
+ * Serializes a `Serializable` value, facilitating composable serialization.
1782
+ *
1783
+ * @param value The Serializable value to serialize
1784
+ *
1785
+ * @example
1786
+ * // Define the MoveStruct class that implements the Serializable interface
1787
+ * class MoveStruct extends Serializable {
1788
+ * constructor(
1789
+ * public creatorAddress: AccountAddress, // where AccountAddress extends Serializable
1790
+ * public collectionName: string,
1791
+ * public tokenName: string
1792
+ * ) {}
1793
+ *
1794
+ * serialize(serializer: Serializer): void {
1795
+ * serializer.serialize(this.creatorAddress); // Composable serialization of another Serializable object
1796
+ * serializer.serializeStr(this.collectionName);
1797
+ * serializer.serializeStr(this.tokenName);
1798
+ * }
1799
+ * }
1800
+ *
1801
+ * // Construct a MoveStruct
1802
+ * const moveStruct = new MoveStruct(new AccountAddress(...), "MyCollection", "TokenA");
1803
+ *
1804
+ * // Serialize a string, a u64 number, and a MoveStruct instance.
1805
+ * const serializer = new Serializer();
1806
+ * serializer.serializeStr("ExampleString");
1807
+ * serializer.serializeU64(12345678);
1808
+ * serializer.serialize(moveStruct);
1809
+ *
1810
+ * // Get the bytes from the Serializer instance
1811
+ * const serializedBytes = serializer.toUint8Array();
1812
+ *
1813
+ * @returns the serializer instance
1814
+ */
1815
+ serialize<T extends Serializable>(value: T): void;
1816
+ /**
1817
+ * Serializes an array of BCS Serializable values to a serializer instance.
1818
+ * Note that this does not return anything. The bytes are added to the serializer instance's byte buffer.
1819
+ *
1820
+ * @param values The array of BCS Serializable values
1821
+ * @example
1822
+ * const addresses = new Array<AccountAddress>(
1823
+ * AccountAddress.from("0x1"),
1824
+ * AccountAddress.from("0x2"),
1825
+ * AccountAddress.from("0xa"),
1826
+ * AccountAddress.from("0xb"),
1827
+ * );
1828
+ * const serializer = new Serializer();
1829
+ * serializer.serializeVector(addresses);
1830
+ * const serializedBytes = serializer.toUint8Array();
1831
+ * // serializedBytes is now the BCS-serialized bytes
1832
+ * // The equivalent value in Move would be:
1833
+ * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
1834
+ */
1835
+ serializeVector<T extends Serializable>(values: Array<T>): void;
1836
+ }
1837
+ declare function ensureBoolean(value: unknown): asserts value is boolean;
1838
+ declare const outOfRangeErrorMessage: (value: AnyNumber, min: AnyNumber, max: AnyNumber) => string;
1839
+ declare function validateNumberInRange<T extends AnyNumber>(value: T, minValue: T, maxValue: T): void;
1840
+
1841
+ interface TransactionArgument extends EntryFunctionArgument, ScriptFunctionArgument {
1842
+ }
1843
+ interface EntryFunctionArgument {
1844
+ /**
1845
+ * Serialize an argument to BCS-serialized bytes.
1846
+ */
1847
+ serialize(serializer: Serializer): void;
1848
+ /**
1849
+ * Serialize an argument as a type-agnostic, fixed byte sequence. The byte sequence contains
1850
+ * the number of the following bytes followed by the BCS-serialized bytes for a typed argument.
1851
+ */
1852
+ serializeForEntryFunction(serializer: Serializer): void;
1853
+ bcsToBytes(): Uint8Array;
1854
+ bcsToHex(): Hex;
1855
+ }
1856
+ interface ScriptFunctionArgument {
1857
+ /**
1858
+ * Serialize an argument to BCS-serialized bytes.
1859
+ */
1860
+ serialize(serializer: Serializer): void;
1861
+ /**
1862
+ * Serialize an argument to BCS-serialized bytes as a type aware byte sequence.
1863
+ * The byte sequence contains an enum variant index followed by the BCS-serialized
1864
+ * bytes for a typed argument.
1865
+ */
1866
+ serializeForScriptFunction(serializer: Serializer): void;
1867
+ bcsToBytes(): Uint8Array;
1868
+ bcsToHex(): Hex;
1869
+ }
1870
+
1871
+ /**
1872
+ * This enum is used to explain why an address was invalid.
1873
+ */
1874
+ declare enum AddressInvalidReason {
1875
+ INCORRECT_NUMBER_OF_BYTES = "incorrect_number_of_bytes",
1876
+ INVALID_HEX_CHARS = "invalid_hex_chars",
1877
+ TOO_SHORT = "too_short",
1878
+ TOO_LONG = "too_long",
1879
+ LEADING_ZERO_X_REQUIRED = "leading_zero_x_required",
1880
+ LONG_FORM_REQUIRED_UNLESS_SPECIAL = "long_form_required_unless_special",
1881
+ INVALID_PADDING_ZEROES = "INVALID_PADDING_ZEROES"
1882
+ }
1883
+ type AccountAddressInput = HexInput | AccountAddress;
1884
+ /**
1885
+ * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction
1886
+ * hashes, use the Hex class.
1887
+ *
1888
+ * AccountAddress is used for working with account addresses. Account addresses, when
1889
+ * represented as a string, generally look like these examples:
1890
+ * - 0x1
1891
+ * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c
1892
+ *
1893
+ * Proper formatting and parsing of account addresses is defined by AIP-40.
1894
+ * To learn more about the standard, read the AIP here:
1895
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
1896
+ *
1897
+ * The comments in this class make frequent reference to the LONG and SHORT formats,
1898
+ * as well as "special" addresses. To learn what these refer to see AIP-40.
1899
+ */
1900
+ declare class AccountAddress extends Serializable implements TransactionArgument {
1901
+ /**
1902
+ * This is the internal representation of an account address.
1903
+ */
1904
+ readonly data: Uint8Array;
1905
+ /**
1906
+ * The number of bytes that make up an account address.
1907
+ */
1908
+ static readonly LENGTH: number;
1909
+ /**
1910
+ * The length of an address string in LONG form without a leading 0x.
1911
+ */
1912
+ static readonly LONG_STRING_LENGTH: number;
1913
+ static ZERO: AccountAddress;
1914
+ static ONE: AccountAddress;
1915
+ static TWO: AccountAddress;
1916
+ static THREE: AccountAddress;
1917
+ static FOUR: AccountAddress;
1918
+ /**
1919
+ * Creates an instance of AccountAddress from a Uint8Array.
1920
+ *
1921
+ * @param args.data A Uint8Array representing an account address.
1922
+ */
1923
+ constructor(input: Uint8Array);
1924
+ /**
1925
+ * Returns whether an address is special, where special is defined as 0x0 to 0xf
1926
+ * inclusive. In other words, the last byte of the address must be < 0b10000 (16)
1927
+ * and every other byte must be zero.
1928
+ *
1929
+ * For more information on how special addresses are defined see AIP-40:
1930
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
1931
+ *
1932
+ * @returns true if the address is special, false if not.
1933
+ */
1934
+ isSpecial(): boolean;
1935
+ /**
1936
+ * Return the AccountAddress as a string as per AIP-40.
1937
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
1938
+ *
1939
+ * In short, it means that special addresses are represented in SHORT form, meaning
1940
+ * 0x0 through to 0xf inclusive, and every other address is represented in LONG form,
1941
+ * meaning 0x + 64 hex characters.
1942
+ *
1943
+ * @returns AccountAddress as a string conforming to AIP-40.
1944
+ */
1945
+ toString(): `0x${string}`;
1946
+ /**
1947
+ * NOTE: Prefer to use `toString` where possible.
1948
+ *
1949
+ * Return the AccountAddress as a string as per AIP-40 but without the leading 0x.
1950
+ *
1951
+ * Learn more by reading the docstring of `toString`.
1952
+ *
1953
+ * @returns AccountAddress as a string conforming to AIP-40 but without the leading 0x.
1954
+ */
1955
+ toStringWithoutPrefix(): string;
1956
+ /**
1957
+ * NOTE: Prefer to use `toString` where possible.
1958
+ *
1959
+ * Whereas toString will format special addresses (as defined by isSpecial) using the
1960
+ * SHORT form (no leading 0s), this format the address in the LONG format
1961
+ * unconditionally.
1962
+ *
1963
+ * This means it will be 0x + 64 hex characters.
1964
+ *
1965
+ * @returns AccountAddress as a string in LONG form.
1966
+ */
1967
+ toStringLong(): `0x${string}`;
1968
+ /**
1969
+ * NOTE: Prefer to use `toString` where possible.
1970
+ *
1971
+ * Whereas toString will format special addresses (as defined by isSpecial) using the
1972
+ * SHORT form (no leading 0s), this function will include leading zeroes. The string
1973
+ * will not have a leading zero.
1974
+ *
1975
+ * This means it will be 64 hex characters without a leading 0x.
1976
+ *
1977
+ * @returns AccountAddress as a string in LONG form without a leading 0x.
1978
+ */
1979
+ toStringLongWithoutPrefix(): string;
1980
+ /**
1981
+ * Get the inner hex data. The inner data is already a Uint8Array so no conversion
1982
+ * is taking place here, it just returns the inner data.
1983
+ *
1984
+ * @returns Hex data as Uint8Array
1985
+ */
1986
+ toUint8Array(): Uint8Array;
1987
+ /**
1988
+ * Serialize the AccountAddress to a Serializer instance's data buffer.
1989
+ * @param serializer The serializer to serialize the AccountAddress to.
1990
+ * @returns void
1991
+ * @example
1992
+ * const serializer = new Serializer();
1993
+ * const address = AccountAddress.fromString("0x1");
1994
+ * address.serialize(serializer);
1995
+ * const bytes = serializer.toUint8Array();
1996
+ * // `bytes` is now the BCS-serialized address.
1997
+ */
1998
+ serialize(serializer: Serializer): void;
1999
+ serializeForEntryFunction(serializer: Serializer): void;
2000
+ serializeForScriptFunction(serializer: Serializer): void;
2001
+ /**
2002
+ * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.
2003
+ * @param deserializer The deserializer to deserialize the AccountAddress from.
2004
+ * @returns An instance of AccountAddress.
2005
+ * @example
2006
+ * const bytes = hexToBytes("0x0102030405060708091011121314151617181920212223242526272829303132");
2007
+ * const deserializer = new Deserializer(bytes);
2008
+ * const address = AccountAddress.deserialize(deserializer);
2009
+ * // `address` is now an instance of AccountAddress.
2010
+ */
2011
+ static deserialize(deserializer: Deserializer): AccountAddress;
2012
+ /**
2013
+ * NOTE: This function has strict parsing behavior. For relaxed behavior, please use
2014
+ * the `fromString` function.
2015
+ *
2016
+ * Creates an instance of AccountAddress from a hex string.
2017
+ *
2018
+ * This function allows only the strictest formats defined by AIP-40. In short this
2019
+ * means only the following formats are accepted:
2020
+ *
2021
+ * - LONG
2022
+ * - SHORT for special addresses
2023
+ *
2024
+ * Where:
2025
+ * - LONG is defined as 0x + 64 hex characters.
2026
+ * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.
2027
+ *
2028
+ * This means the following are not accepted:
2029
+ * - SHORT for non-special addresses.
2030
+ * - Any address without a leading 0x.
2031
+ *
2032
+ * Learn more about the different address formats by reading AIP-40:
2033
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
2034
+ *
2035
+ * @param input A hex string representing an account address.
2036
+ *
2037
+ * @returns An instance of AccountAddress.
2038
+ */
2039
+ static fromStringStrict(input: string): AccountAddress;
2040
+ /**
2041
+ * NOTE: This function has relaxed parsing behavior. For strict behavior, please use
2042
+ * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this
2043
+ * function, `fromString` is only provided for backwards compatibility.
2044
+ *
2045
+ * Creates an instance of AccountAddress from a hex string.
2046
+ *
2047
+ * This function allows all formats defined by AIP-40. In short this means the
2048
+ * following formats are accepted:
2049
+ *
2050
+ * - LONG, with or without leading 0x
2051
+ * - SHORT, with or without leading 0x
2052
+ *
2053
+ * Where:
2054
+ * - LONG is 64 hex characters.
2055
+ * - SHORT is 1 to 63 hex characters inclusive.
2056
+ * - Padding zeroes are allowed, e.g. 0x0123 is valid.
2057
+ *
2058
+ * Learn more about the different address formats by reading AIP-40:
2059
+ * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
2060
+ *
2061
+ * @param input A hex string representing an account address.
2062
+ *
2063
+ * @returns An instance of AccountAddress.
2064
+ */
2065
+ static fromString(input: string): AccountAddress;
2066
+ /**
2067
+ * Convenience method for creating an AccountAddress from all known inputs.
2068
+ *
2069
+ * This handles, Uint8array, string, and AccountAddress itself
2070
+ * @param input
2071
+ */
2072
+ static from(input: AccountAddressInput): AccountAddress;
2073
+ /**
2074
+ * Convenience method for creating an AccountAddress from all known inputs.
2075
+ *
2076
+ * This handles, Uint8array, string, and AccountAddress itself
2077
+ * @param input
2078
+ */
2079
+ static fromStrict(input: AccountAddressInput): AccountAddress;
2080
+ /**
2081
+ * Check if the string is a valid AccountAddress.
2082
+ *
2083
+ * @param args.input A hex string representing an account address.
2084
+ * @param args.strict If true, use strict parsing behavior. If false, use relaxed parsing behavior.
2085
+ *
2086
+ * @returns valid = true if the string is valid, valid = false if not. If the string
2087
+ * is not valid, invalidReason will be set explaining why it is invalid.
2088
+ */
2089
+ static isValid(args: {
2090
+ input: AccountAddressInput;
2091
+ strict?: boolean;
2092
+ }): ParsingResult<AddressInvalidReason>;
2093
+ /**
2094
+ * Return whether AccountAddresses are equal. AccountAddresses are considered equal
2095
+ * if their underlying byte data is identical.
2096
+ *
2097
+ * @param other The AccountAddress to compare to.
2098
+ * @returns true if the AccountAddresses are equal, false if not.
2099
+ */
2100
+ equals(other: AccountAddress): boolean;
2101
+ }
2102
+
2103
+ export { type GetFungibleAssetMetadataResponse as $, type AnyNumber as A, type MoveFunctionGenericTypeParam as B, type Client as C, Deserializer as D, type EntryFunctionArgument as E, type FullNodeConfig as F, type GetAccountOwnedTokensQueryResponse as G, type HexInput as H, type IndexerConfig as I, type GetCollectionDataResponse as J, type GetTokenDataResponse as K, type LedgerVersionArg as L, type MoveModuleBytecode as M, Network as N, type OrderByArg as O, type PaginationArgs as P, type GetCurrentTokenOwnershipResponse as Q, type GetOwnedTokensResponse as R, Serializable as S, type TransactionArgument as T, type Uint8 as U, type GetTokenActivityResponse as V, type WhereArg as W, type GetEventsResponse as X, type WaitForTransactionOptions as Y, type UserTransactionResponse as Z, type MoveFunction as _, Serializer as a, type TransactionSignature as a$, type GetFungibleAssetActivitiesResponse as a0, type GetCurrentFungibleAssetBalancesResponse as a1, type LedgerInfo as a2, type Block as a3, type TableItemRequest as a4, type MoveValue as a5, type GetChainTopUserTransactionsResponse as a6, type GraphqlQuery as a7, type GetProcessorStatusResponse as a8, type GetANSNameResponse as a9, type ClientHeadersType as aA, TransactionResponseType as aB, isPendingTransactionResponse as aC, isUserTransactionResponse as aD, isGenesisTransactionResponse as aE, isBlockMetadataTransactionResponse as aF, isStateCheckpointTransactionResponse as aG, isValidatorTransactionResponse as aH, type GenesisTransactionResponse as aI, type BlockMetadataTransactionResponse as aJ, type StateCheckpointTransactionResponse as aK, type ValidatorTransactionResponse as aL, type WriteSetChange as aM, type WriteSetChangeDeleteModule as aN, type WriteSetChangeDeleteResource as aO, type WriteSetChangeDeleteTableItem as aP, type WriteSetChangeWriteModule as aQ, type WriteSetChangeWriteResource as aR, type WriteSetChangeWriteTableItem as aS, type DecodedTableData as aT, type DeletedTableData as aU, type TransactionPayloadResponse as aV, type EntryFunctionPayloadResponse as aW, type ScriptPayloadResponse as aX, type MultisigPayloadResponse as aY, type GenesisPayload as aZ, type MoveScriptBytecode as a_, type GetNumberOfDelegatorsResponse as aa, type GetDelegatedStakingActivitiesResponse as ab, type PendingTransactionResponse as ac, type CommittedTransactionResponse as ad, type GasEstimation as ae, type AptosRequest as af, type ClientRequest as ag, type ClientResponse as ah, MimeType as ai, ensureBoolean as aj, outOfRangeErrorMessage as ak, validateNumberInRange as al, AddressInvalidReason as am, ParsingError as an, type ParsingResult as ao, HexInvalidReason as ap, TypeTagVariants as aq, ScriptTransactionArgumentVariants as ar, TransactionPayloadVariants as as, TransactionVariants as at, TransactionAuthenticatorVariant as au, AccountAuthenticatorVariant as av, AnySignatureVariant as aw, type Uint64 as ax, type Uint128 as ay, type Uint256 as az, type Uint16 as b, isEd25519Signature as b0, isSecp256k1Signature as b1, isMultiAgentSignature as b2, isFeePayerSignature as b3, isMultiEd25519Signature as b4, type TransactionEd25519Signature as b5, type TransactionSecp256k1Signature as b6, type TransactionMultiEd25519Signature as b7, type TransactionMultiAgentSignature as b8, type TransactionFeePayerSignature as b9, type GenerateAccount as bA, type OrderBy as bB, type OrderByValue as bC, type TokenStandard as bD, NetworkToIndexerAPI as bE, NetworkToNodeAPI as bF, NetworkToFaucetAPI as bG, NetworkToChainId as bH, NetworkToNetworkName as bI, type AccountSignature as ba, type WriteSet as bb, type ScriptWriteSet as bc, type DirectWriteSet as bd, type EventGuid as be, type Event as bf, type MoveUint8Type as bg, type MoveUint16Type as bh, type MoveUint32Type as bi, type MoveUint64Type as bj, type MoveUint128Type as bk, type MoveUint256Type as bl, type MoveAddressType as bm, type MoveObjectType as bn, type MoveOptionType as bo, type MoveStructType as bp, type MoveType as bq, MoveFunctionVisibility as br, MoveAbility as bs, type MoveStructField as bt, type MoveModule as bu, type MoveStruct as bv, RoleType as bw, DeriveScheme as bx, type GenerateAccountWithEd25519 as by, type GenerateAccountWithSingleSignerSecp256k1Key as bz, type Uint32 as c, type Deserializable as d, Hex as e, type AuthenticationKeyScheme as f, AccountAddress as g, AnyPublicKeyVariant as h, type AccountAddressInput as i, SigningSchemeInput as j, SigningScheme as k, type ClientConfig as l, type FaucetConfig as m, type AptosSettings as n, type AccountData as o, type TransactionResponse as p, type MoveResource as q, type MoveStructId as r, type TokenStandardArg as s, type GetAccountOwnedTokensFromCollectionResponse as t, type GetAccountCollectionsWithOwnedTokenResponse as u, type GetAccountCoinsDataResponse as v, type GetAccountOwnedObjectsResponse as w, type MoveModuleId as x, type ScriptFunctionArgument as y, type MoveFunctionId as z };