@aptos-labs/ts-sdk 1.7.0 → 1.9.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 (370) hide show
  1. package/dist/browser/index.d.ts +1226 -975
  2. package/dist/browser/index.global.js +32 -30
  3. package/dist/browser/index.global.js.map +1 -1
  4. package/dist/common/index.d.ts +1226 -975
  5. package/dist/common/index.js +27 -25
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/api/account.d.mts +12 -6
  8. package/dist/esm/api/account.mjs +1 -1
  9. package/dist/esm/api/ans.d.mts +11 -12
  10. package/dist/esm/api/ans.mjs +1 -1
  11. package/dist/esm/api/aptos.d.mts +13 -14
  12. package/dist/esm/api/aptos.mjs +1 -1
  13. package/dist/esm/api/aptosConfig.mjs +1 -1
  14. package/dist/esm/api/coin.d.mts +13 -13
  15. package/dist/esm/api/coin.mjs +1 -1
  16. package/dist/esm/api/digitalAsset.d.mts +20 -10
  17. package/dist/esm/api/digitalAsset.mjs +1 -1
  18. package/dist/esm/api/event.d.mts +14 -1
  19. package/dist/esm/api/event.mjs +1 -1
  20. package/dist/esm/api/faucet.mjs +1 -1
  21. package/dist/esm/api/fungibleAsset.d.mts +9 -10
  22. package/dist/esm/api/fungibleAsset.mjs +1 -1
  23. package/dist/esm/api/general.mjs +1 -1
  24. package/dist/esm/api/index.d.mts +13 -14
  25. package/dist/esm/api/index.mjs +1 -1
  26. package/dist/esm/api/staking.mjs +1 -1
  27. package/dist/esm/api/transaction.d.mts +5 -6
  28. package/dist/esm/api/transaction.mjs +1 -1
  29. package/dist/esm/api/transactionSubmission/build.d.mts +8 -8
  30. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  31. package/dist/esm/api/transactionSubmission/management.d.mts +11 -12
  32. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  33. package/dist/esm/api/transactionSubmission/sign.d.mts +11 -12
  34. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  35. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  36. package/dist/esm/api/transactionSubmission/simulate.d.mts +11 -11
  37. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/submit.d.mts +6 -6
  39. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  40. package/dist/esm/api/utils.mjs +1 -1
  41. package/dist/esm/bcs/index.mjs +1 -1
  42. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  43. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  44. package/dist/esm/chunk-2E2JOGE5.mjs +2 -0
  45. package/dist/esm/chunk-2E2JOGE5.mjs.map +1 -0
  46. package/dist/esm/chunk-3EUOBVCT.mjs +2 -0
  47. package/dist/esm/{chunk-A2QH4A6D.mjs.map → chunk-3EUOBVCT.mjs.map} +1 -1
  48. package/dist/esm/{chunk-RNO5ZG3C.mjs → chunk-52RTAMN7.mjs} +2 -2
  49. package/dist/esm/chunk-7BDYKJXX.mjs +2 -0
  50. package/dist/esm/chunk-7BDYKJXX.mjs.map +1 -0
  51. package/dist/esm/{chunk-WQI2RH2S.mjs → chunk-7U36LMP4.mjs} +2 -2
  52. package/dist/esm/{chunk-NWRKJFHV.mjs → chunk-ARIC32W7.mjs} +2 -2
  53. package/dist/esm/{chunk-RIL4SHXC.mjs → chunk-B7M3OWHV.mjs} +2 -2
  54. package/dist/esm/{chunk-C7ZX475J.mjs → chunk-BBUAAJRA.mjs} +2 -2
  55. package/dist/esm/chunk-C3HM7HQP.mjs +2 -0
  56. package/dist/esm/chunk-C3HM7HQP.mjs.map +1 -0
  57. package/dist/esm/{chunk-DRF6AMEZ.mjs → chunk-CHA5DSSD.mjs} +2 -2
  58. package/dist/esm/chunk-CVEJHRAU.mjs +2 -0
  59. package/dist/esm/chunk-CVEJHRAU.mjs.map +1 -0
  60. package/dist/esm/chunk-DE5OOOVY.mjs +2 -0
  61. package/dist/esm/{chunk-3UYBNX3P.mjs.map → chunk-DE5OOOVY.mjs.map} +1 -1
  62. package/dist/esm/{chunk-IKCBGNRD.mjs → chunk-DGOT2VR5.mjs} +2 -2
  63. package/dist/esm/{chunk-GVHOHNHT.mjs → chunk-EF2F7NWO.mjs} +2 -2
  64. package/dist/esm/{chunk-J6RCCKOA.mjs → chunk-EQZ757ES.mjs} +2 -2
  65. package/dist/esm/{chunk-CX5ULWJQ.mjs → chunk-F67Y7YH6.mjs} +2 -2
  66. package/dist/esm/{chunk-JLL7BCD4.mjs → chunk-FVMVV4V3.mjs} +2 -2
  67. package/dist/esm/chunk-FWDKABRW.mjs +2 -0
  68. package/dist/esm/chunk-FWDKABRW.mjs.map +1 -0
  69. package/dist/esm/chunk-G62HQC77.mjs +2 -0
  70. package/dist/esm/chunk-G62HQC77.mjs.map +1 -0
  71. package/dist/esm/{chunk-ESX5X52V.mjs → chunk-GQOOXOTN.mjs} +2 -2
  72. package/dist/esm/chunk-GRJJBGHT.mjs +2 -0
  73. package/dist/esm/chunk-GRJJBGHT.mjs.map +1 -0
  74. package/dist/esm/chunk-HEPV52CH.mjs +2 -0
  75. package/dist/esm/chunk-HEPV52CH.mjs.map +1 -0
  76. package/dist/esm/{chunk-XQIWF5HY.mjs → chunk-I3TCHVQQ.mjs} +2 -2
  77. package/dist/esm/{chunk-3NOQE6U3.mjs → chunk-ILJWEPDW.mjs} +2 -2
  78. package/dist/esm/chunk-INORE66K.mjs +2 -0
  79. package/dist/esm/chunk-INORE66K.mjs.map +1 -0
  80. package/dist/esm/{chunk-5L6SRCJP.mjs → chunk-J6MWD4XN.mjs} +2 -2
  81. package/dist/esm/{chunk-YGMT4GQ5.mjs → chunk-JEHR6GKW.mjs} +2 -2
  82. package/dist/esm/chunk-JEHR6GKW.mjs.map +1 -0
  83. package/dist/esm/chunk-KUX6GQ2E.mjs +1 -0
  84. package/dist/esm/{chunk-6UNBJAV6.mjs → chunk-KWJTVJ7C.mjs} +2 -2
  85. package/dist/esm/chunk-KWJTVJ7C.mjs.map +1 -0
  86. package/dist/esm/{chunk-WK36MJRI.mjs → chunk-LLL2LFYH.mjs} +2 -2
  87. package/dist/esm/chunk-LMXP3JUU.mjs +2 -0
  88. package/dist/esm/chunk-LMXP3JUU.mjs.map +1 -0
  89. package/dist/esm/{chunk-5WXR2O3T.mjs → chunk-N65SOKJQ.mjs} +2 -2
  90. package/dist/esm/{chunk-XOBXX273.mjs → chunk-NL3XVNS5.mjs} +2 -2
  91. package/dist/esm/{chunk-Q7JKS6WV.mjs → chunk-NURFZOR4.mjs} +2 -2
  92. package/dist/esm/{chunk-MKERJNYN.mjs → chunk-OG56TYZE.mjs} +2 -2
  93. package/dist/esm/chunk-Q6WOHF4A.mjs +2 -0
  94. package/dist/esm/chunk-Q6WOHF4A.mjs.map +1 -0
  95. package/dist/esm/chunk-QA4XWNIH.mjs +2 -0
  96. package/dist/esm/chunk-QA4XWNIH.mjs.map +1 -0
  97. package/dist/esm/chunk-QE4ASJ5K.mjs +1 -0
  98. package/dist/esm/chunk-QR72RXBS.mjs +2 -0
  99. package/dist/esm/chunk-QR72RXBS.mjs.map +1 -0
  100. package/dist/esm/{chunk-TVURQPLA.mjs → chunk-R4VJDSIP.mjs} +2 -2
  101. package/dist/esm/{chunk-O57QZZF2.mjs → chunk-S2F6CSH4.mjs} +2 -2
  102. package/dist/esm/chunk-S2F6CSH4.mjs.map +1 -0
  103. package/dist/esm/{chunk-BQSE5HHW.mjs → chunk-S4SEFF4K.mjs} +3 -1
  104. package/dist/esm/chunk-S4SEFF4K.mjs.map +1 -0
  105. package/dist/esm/{chunk-OVSV4Y32.mjs → chunk-SXIFL5DQ.mjs} +2 -2
  106. package/dist/esm/{chunk-OVSV4Y32.mjs.map → chunk-SXIFL5DQ.mjs.map} +1 -1
  107. package/dist/esm/{chunk-Z6XNTGNK.mjs → chunk-TN5BUH4F.mjs} +2 -2
  108. package/dist/esm/chunk-TNVR7SNR.mjs +2 -0
  109. package/dist/esm/chunk-TNVR7SNR.mjs.map +1 -0
  110. package/dist/esm/chunk-TX7UK75Q.mjs +2 -0
  111. package/dist/esm/chunk-TX7UK75Q.mjs.map +1 -0
  112. package/dist/esm/{chunk-YE3DZD6T.mjs → chunk-UIUSDBCL.mjs} +2 -2
  113. package/dist/esm/{chunk-7JTOGYO7.mjs → chunk-UMLDKLDL.mjs} +2 -2
  114. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  115. package/dist/esm/{chunk-6Y3VBRMN.mjs → chunk-VEVBHH3M.mjs} +2 -2
  116. package/dist/esm/{chunk-T5IFXLOP.mjs → chunk-VMXBMAYK.mjs} +2 -2
  117. package/dist/esm/chunk-WKUXBIYB.mjs +2 -0
  118. package/dist/esm/chunk-WKUXBIYB.mjs.map +1 -0
  119. package/dist/esm/chunk-WME5D6YR.mjs +2 -0
  120. package/dist/esm/chunk-WME5D6YR.mjs.map +1 -0
  121. package/dist/esm/chunk-WTHNSNAX.mjs +2 -0
  122. package/dist/esm/chunk-WTHNSNAX.mjs.map +1 -0
  123. package/dist/esm/{chunk-WC2WSKYZ.mjs → chunk-X5C3LYI7.mjs} +2 -2
  124. package/dist/esm/chunk-XKD7W5NO.mjs +2 -0
  125. package/dist/esm/{chunk-UJAX75ON.mjs.map → chunk-XKD7W5NO.mjs.map} +1 -1
  126. package/dist/esm/{chunk-OWZLBIDD.mjs → chunk-XTPFQ4MH.mjs} +2 -2
  127. package/dist/esm/{chunk-D2GNCG27.mjs → chunk-Y5AJLNUD.mjs} +2 -2
  128. package/dist/esm/chunk-YDAA4RG4.mjs +2 -0
  129. package/dist/esm/chunk-YDAA4RG4.mjs.map +1 -0
  130. package/dist/esm/{chunk-ZFPA45OK.mjs → chunk-YR2R3LW4.mjs} +2 -2
  131. package/dist/esm/chunk-YZZO6VDC.mjs +2 -0
  132. package/dist/esm/chunk-YZZO6VDC.mjs.map +1 -0
  133. package/dist/esm/client/core.mjs +1 -1
  134. package/dist/esm/client/get.mjs +1 -1
  135. package/dist/esm/client/index.mjs +1 -1
  136. package/dist/esm/client/post.mjs +1 -1
  137. package/dist/esm/core/account/Account.d.mts +20 -0
  138. package/dist/esm/core/account/Account.mjs +2 -0
  139. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  140. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  141. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  142. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  143. package/dist/esm/core/account/SingleKeyAccount.mjs.map +1 -0
  144. package/dist/esm/core/account/index.d.mts +305 -0
  145. package/dist/esm/core/account/index.mjs +2 -0
  146. package/dist/esm/core/account/index.mjs.map +1 -0
  147. package/dist/esm/core/accountAddress.mjs +1 -1
  148. package/dist/esm/core/authenticationKey.d.mts +7 -68
  149. package/dist/esm/core/authenticationKey.mjs +1 -1
  150. package/dist/esm/core/crypto/ed25519.d.mts +49 -61
  151. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  152. package/dist/esm/core/crypto/index.d.mts +9 -6
  153. package/dist/esm/core/crypto/index.mjs +1 -1
  154. package/dist/esm/core/crypto/multiEd25519.d.mts +17 -14
  155. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  156. package/dist/esm/core/crypto/multiKey.d.mts +70 -17
  157. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  158. package/dist/esm/core/crypto/privateKey.d.mts +35 -0
  159. package/dist/esm/core/crypto/privateKey.mjs +2 -0
  160. package/dist/esm/core/crypto/privateKey.mjs.map +1 -0
  161. package/dist/esm/core/crypto/publicKey.d.mts +13 -0
  162. package/dist/esm/core/crypto/publicKey.mjs +2 -0
  163. package/dist/esm/core/crypto/publicKey.mjs.map +1 -0
  164. package/dist/esm/core/crypto/secp256k1.d.mts +43 -67
  165. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  166. package/dist/esm/core/crypto/signature.d.mts +28 -0
  167. package/dist/esm/core/crypto/signature.mjs +2 -0
  168. package/dist/esm/core/crypto/signature.mjs.map +1 -0
  169. package/dist/esm/core/crypto/singleKey.d.mts +68 -0
  170. package/dist/esm/core/crypto/singleKey.mjs +2 -0
  171. package/dist/esm/core/crypto/singleKey.mjs.map +1 -0
  172. package/dist/esm/core/index.d.mts +9 -8
  173. package/dist/esm/core/index.mjs +1 -1
  174. package/dist/esm/index.d.mts +9 -9
  175. package/dist/esm/index.mjs +1 -1
  176. package/dist/esm/internal/account.d.mts +9 -3
  177. package/dist/esm/internal/account.mjs +1 -1
  178. package/dist/esm/internal/ans.d.mts +10 -11
  179. package/dist/esm/internal/ans.mjs +1 -1
  180. package/dist/esm/internal/coin.d.mts +9 -9
  181. package/dist/esm/internal/coin.mjs +1 -1
  182. package/dist/esm/internal/digitalAsset.d.mts +15 -12
  183. package/dist/esm/internal/digitalAsset.mjs +1 -1
  184. package/dist/esm/internal/event.d.mts +7 -2
  185. package/dist/esm/internal/event.mjs +1 -1
  186. package/dist/esm/internal/faucet.d.mts +1 -1
  187. package/dist/esm/internal/faucet.mjs +1 -1
  188. package/dist/esm/internal/fungibleAsset.d.mts +9 -10
  189. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  190. package/dist/esm/internal/general.mjs +1 -1
  191. package/dist/esm/internal/staking.d.mts +1 -1
  192. package/dist/esm/internal/staking.mjs +1 -1
  193. package/dist/esm/internal/transaction.mjs +1 -1
  194. package/dist/esm/internal/transactionSubmission.d.mts +10 -11
  195. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  196. package/dist/esm/publicKey-lq5djCIY.d.mts +113 -0
  197. package/dist/esm/transactions/authenticator/account.d.mts +6 -4
  198. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  199. package/dist/esm/transactions/authenticator/index.d.mts +6 -6
  200. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  201. package/dist/esm/transactions/authenticator/transaction.d.mts +5 -5
  202. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  203. package/dist/esm/transactions/index.d.mts +6 -7
  204. package/dist/esm/transactions/index.mjs +1 -1
  205. package/dist/esm/transactions/instances/index.d.mts +4 -4
  206. package/dist/esm/transactions/instances/index.mjs +1 -1
  207. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  208. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  209. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  210. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -1
  211. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  212. package/dist/esm/transactions/instances/signedTransaction.d.mts +8 -8
  213. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  214. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  215. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  216. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +11 -5
  217. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  218. package/dist/esm/transactions/management/index.d.mts +11 -12
  219. package/dist/esm/transactions/management/index.mjs +1 -1
  220. package/dist/esm/transactions/management/transactionWorker.d.mts +11 -12
  221. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  222. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +10 -10
  223. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  224. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -10
  225. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  226. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +8 -8
  227. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  228. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +9 -10
  229. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  230. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  231. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  232. package/dist/esm/transactions/types.d.mts +9 -9
  233. package/dist/esm/types/generated/operations.d.mts +6 -0
  234. package/dist/esm/types/generated/queries.d.mts +6 -6
  235. package/dist/esm/types/generated/queries.mjs +1 -1
  236. package/dist/esm/types/generated/types.d.mts +594 -56
  237. package/dist/esm/types/generated/types.mjs +1 -1
  238. package/dist/esm/types/generated/types.mjs.map +1 -1
  239. package/dist/esm/types/index.d.mts +35 -6
  240. package/dist/esm/types/index.mjs +1 -1
  241. package/dist/esm/utils/const.d.mts +1 -2
  242. package/dist/esm/utils/const.mjs +1 -1
  243. package/dist/esm/utils/index.d.mts +1 -1
  244. package/dist/esm/utils/index.mjs +1 -1
  245. package/dist/esm/version.d.mts +1 -1
  246. package/dist/esm/version.mjs +1 -1
  247. package/package.json +16 -16
  248. package/src/api/aptosConfig.ts +2 -2
  249. package/src/api/digitalAsset.ts +20 -0
  250. package/src/api/event.ts +27 -1
  251. package/src/core/account/Account.ts +245 -0
  252. package/src/core/account/Ed25519Account.ts +88 -0
  253. package/src/core/account/SingleKeyAccount.ts +120 -0
  254. package/src/core/account/index.ts +3 -0
  255. package/src/core/authenticationKey.ts +18 -52
  256. package/src/core/crypto/ed25519.ts +118 -104
  257. package/src/core/crypto/index.ts +6 -5
  258. package/src/core/crypto/multiEd25519.ts +98 -44
  259. package/src/core/crypto/multiKey.ts +192 -34
  260. package/src/core/crypto/privateKey.ts +25 -0
  261. package/src/core/crypto/publicKey.ts +52 -0
  262. package/src/core/crypto/secp256k1.ts +108 -111
  263. package/src/core/crypto/signature.ts +46 -0
  264. package/src/core/crypto/singleKey.ts +180 -0
  265. package/src/internal/account.ts +5 -3
  266. package/src/internal/digitalAsset.ts +26 -0
  267. package/src/internal/event.ts +33 -1
  268. package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
  269. package/src/internal/queries/getTokenData.graphql +1 -0
  270. package/src/transactions/authenticator/account.ts +1 -2
  271. package/src/transactions/instances/rotationProofChallenge.ts +1 -1
  272. package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -21
  273. package/src/transactions/types.ts +1 -1
  274. package/src/types/generated/operations.ts +6 -0
  275. package/src/types/generated/queries.ts +2 -0
  276. package/src/types/generated/types.ts +662 -55
  277. package/src/types/index.ts +40 -4
  278. package/src/utils/const.ts +0 -4
  279. package/src/version.ts +1 -1
  280. package/dist/esm/chunk-2QV6HI3M.mjs +0 -2
  281. package/dist/esm/chunk-2QV6HI3M.mjs.map +0 -1
  282. package/dist/esm/chunk-3UYBNX3P.mjs +0 -2
  283. package/dist/esm/chunk-4SAUEZTN.mjs +0 -2
  284. package/dist/esm/chunk-4SAUEZTN.mjs.map +0 -1
  285. package/dist/esm/chunk-6UNBJAV6.mjs.map +0 -1
  286. package/dist/esm/chunk-7IGH7N52.mjs +0 -2
  287. package/dist/esm/chunk-7IGH7N52.mjs.map +0 -1
  288. package/dist/esm/chunk-A2QH4A6D.mjs +0 -2
  289. package/dist/esm/chunk-AA3GRJNL.mjs +0 -2
  290. package/dist/esm/chunk-AA3GRJNL.mjs.map +0 -1
  291. package/dist/esm/chunk-ALFESCPU.mjs +0 -2
  292. package/dist/esm/chunk-ALFESCPU.mjs.map +0 -1
  293. package/dist/esm/chunk-BQSE5HHW.mjs.map +0 -1
  294. package/dist/esm/chunk-CCUD52OF.mjs +0 -2
  295. package/dist/esm/chunk-CCUD52OF.mjs.map +0 -1
  296. package/dist/esm/chunk-ERWQOVBF.mjs +0 -2
  297. package/dist/esm/chunk-ERWQOVBF.mjs.map +0 -1
  298. package/dist/esm/chunk-FBFMQZTM.mjs +0 -2
  299. package/dist/esm/chunk-FBFMQZTM.mjs.map +0 -1
  300. package/dist/esm/chunk-FP5DPRYL.mjs +0 -2
  301. package/dist/esm/chunk-FP5DPRYL.mjs.map +0 -1
  302. package/dist/esm/chunk-HHJBCGAQ.mjs +0 -2
  303. package/dist/esm/chunk-HHJBCGAQ.mjs.map +0 -1
  304. package/dist/esm/chunk-I7WRJY7K.mjs +0 -2
  305. package/dist/esm/chunk-I7WRJY7K.mjs.map +0 -1
  306. package/dist/esm/chunk-INV6U3KS.mjs +0 -2
  307. package/dist/esm/chunk-INV6U3KS.mjs.map +0 -1
  308. package/dist/esm/chunk-O57QZZF2.mjs.map +0 -1
  309. package/dist/esm/chunk-SBMJNU2O.mjs +0 -2
  310. package/dist/esm/chunk-SBMJNU2O.mjs.map +0 -1
  311. package/dist/esm/chunk-SZYATFM7.mjs +0 -2
  312. package/dist/esm/chunk-SZYATFM7.mjs.map +0 -1
  313. package/dist/esm/chunk-UCHGKGCF.mjs +0 -2
  314. package/dist/esm/chunk-UCHGKGCF.mjs.map +0 -1
  315. package/dist/esm/chunk-UIVJXLRM.mjs +0 -1
  316. package/dist/esm/chunk-UJAX75ON.mjs +0 -2
  317. package/dist/esm/chunk-V6JFR2CB.mjs +0 -2
  318. package/dist/esm/chunk-V6JFR2CB.mjs.map +0 -1
  319. package/dist/esm/chunk-YGMT4GQ5.mjs.map +0 -1
  320. package/dist/esm/chunk-ZFIMVSCR.mjs +0 -2
  321. package/dist/esm/chunk-ZFIMVSCR.mjs.map +0 -1
  322. package/dist/esm/chunk-ZIZ7PVK2.mjs +0 -2
  323. package/dist/esm/chunk-ZIZ7PVK2.mjs.map +0 -1
  324. package/dist/esm/core/account.d.mts +0 -184
  325. package/dist/esm/core/account.mjs +0 -2
  326. package/dist/esm/core/crypto/anyPublicKey.d.mts +0 -59
  327. package/dist/esm/core/crypto/anyPublicKey.mjs +0 -2
  328. package/dist/esm/core/crypto/anySignature.d.mts +0 -31
  329. package/dist/esm/core/crypto/anySignature.mjs +0 -2
  330. package/dist/esm/core/crypto/asymmetricCrypto.d.mts +0 -74
  331. package/dist/esm/core/crypto/asymmetricCrypto.mjs +0 -2
  332. package/src/core/account.ts +0 -282
  333. package/src/core/crypto/anyPublicKey.ts +0 -92
  334. package/src/core/crypto/anySignature.ts +0 -56
  335. package/src/core/crypto/asymmetricCrypto.ts +0 -77
  336. /package/dist/esm/{chunk-RNO5ZG3C.mjs.map → chunk-52RTAMN7.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-WQI2RH2S.mjs.map → chunk-7U36LMP4.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-NWRKJFHV.mjs.map → chunk-ARIC32W7.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-RIL4SHXC.mjs.map → chunk-B7M3OWHV.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-C7ZX475J.mjs.map → chunk-BBUAAJRA.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-DRF6AMEZ.mjs.map → chunk-CHA5DSSD.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-IKCBGNRD.mjs.map → chunk-DGOT2VR5.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-GVHOHNHT.mjs.map → chunk-EF2F7NWO.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-J6RCCKOA.mjs.map → chunk-EQZ757ES.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-CX5ULWJQ.mjs.map → chunk-F67Y7YH6.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-JLL7BCD4.mjs.map → chunk-FVMVV4V3.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-ESX5X52V.mjs.map → chunk-GQOOXOTN.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-XQIWF5HY.mjs.map → chunk-I3TCHVQQ.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-3NOQE6U3.mjs.map → chunk-ILJWEPDW.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-5L6SRCJP.mjs.map → chunk-J6MWD4XN.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-UIVJXLRM.mjs.map → chunk-KUX6GQ2E.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-WK36MJRI.mjs.map → chunk-LLL2LFYH.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-5WXR2O3T.mjs.map → chunk-N65SOKJQ.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-XOBXX273.mjs.map → chunk-NL3XVNS5.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-Q7JKS6WV.mjs.map → chunk-NURFZOR4.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-MKERJNYN.mjs.map → chunk-OG56TYZE.mjs.map} +0 -0
  357. /package/dist/esm/{core/account.mjs.map → chunk-QE4ASJ5K.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-TVURQPLA.mjs.map → chunk-R4VJDSIP.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-Z6XNTGNK.mjs.map → chunk-TN5BUH4F.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-YE3DZD6T.mjs.map → chunk-UIUSDBCL.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-7JTOGYO7.mjs.map → chunk-UMLDKLDL.mjs.map} +0 -0
  362. /package/dist/esm/{core/crypto/anyPublicKey.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-6Y3VBRMN.mjs.map → chunk-VEVBHH3M.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-T5IFXLOP.mjs.map → chunk-VMXBMAYK.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-WC2WSKYZ.mjs.map → chunk-X5C3LYI7.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-OWZLBIDD.mjs.map → chunk-XTPFQ4MH.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-D2GNCG27.mjs.map → chunk-Y5AJLNUD.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-ZFPA45OK.mjs.map → chunk-YR2R3LW4.mjs.map} +0 -0
  369. /package/dist/esm/core/{crypto/anySignature.mjs.map → account/Account.mjs.map} +0 -0
  370. /package/dist/esm/core/{crypto/asymmetricCrypto.mjs.map → account/Ed25519Account.mjs.map} +0 -0
@@ -252,15 +252,17 @@ declare enum TransactionResponseType {
252
252
  User = "user_transaction",
253
253
  Genesis = "genesis_transaction",
254
254
  BlockMetadata = "block_metadata_transaction",
255
- StateCheckpoint = "state_checkpoint_transaction"
255
+ StateCheckpoint = "state_checkpoint_transaction",
256
+ Validator = "validator_transaction"
256
257
  }
257
258
  type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
258
- type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse;
259
+ type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
259
260
  declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
260
261
  declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
261
262
  declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
262
263
  declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
263
264
  declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
265
+ declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
264
266
  type PendingTransactionResponse = {
265
267
  type: TransactionResponseType.Pending;
266
268
  hash: string;
@@ -278,7 +280,7 @@ type UserTransactionResponse = {
278
280
  hash: string;
279
281
  state_change_hash: string;
280
282
  event_root_hash: string;
281
- state_checkpoint_hash?: string;
283
+ state_checkpoint_hash: string | null;
282
284
  gas_used: string;
283
285
  /**
284
286
  * Whether the transaction was successful
@@ -339,7 +341,7 @@ type BlockMetadataTransactionResponse = {
339
341
  hash: string;
340
342
  state_change_hash: string;
341
343
  event_root_hash: string;
342
- state_checkpoint_hash?: string;
344
+ state_checkpoint_hash: string | null;
343
345
  gas_used: string;
344
346
  /**
345
347
  * Whether the transaction was successful
@@ -378,7 +380,30 @@ type StateCheckpointTransactionResponse = {
378
380
  hash: string;
379
381
  state_change_hash: string;
380
382
  event_root_hash: string;
381
- state_checkpoint_hash?: string;
383
+ state_checkpoint_hash: string | null;
384
+ gas_used: string;
385
+ /**
386
+ * Whether the transaction was successful
387
+ */
388
+ success: boolean;
389
+ /**
390
+ * The VM status of the transaction, can tell useful information in a failure
391
+ */
392
+ vm_status: string;
393
+ accumulator_root_hash: string;
394
+ /**
395
+ * Final state of resources changed by the transaction
396
+ */
397
+ changes: Array<WriteSetChange>;
398
+ timestamp: string;
399
+ };
400
+ type ValidatorTransactionResponse = {
401
+ type: TransactionResponseType.Validator;
402
+ version: string;
403
+ hash: string;
404
+ state_change_hash: string;
405
+ event_root_hash: string;
406
+ state_checkpoint_hash: string | null;
382
407
  gas_used: string;
383
408
  /**
384
409
  * Whether the transaction was successful
@@ -393,6 +418,10 @@ type StateCheckpointTransactionResponse = {
393
418
  * Final state of resources changed by the transaction
394
419
  */
395
420
  changes: Array<WriteSetChange>;
421
+ /**
422
+ * The events emitted by the validator transaction
423
+ */
424
+ events: Array<Event>;
396
425
  timestamp: string;
397
426
  };
398
427
  /**
@@ -901,4 +930,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
901
930
  };
902
931
  type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
903
932
 
904
- export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse };
933
+ export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-ALFESCPU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,z as DeriveScheme,a as MimeType,v as MoveAbility,u as MoveFunctionVisibility,w as RoleType,c as ScriptTransactionArgumentVariants,x as SigningScheme,y as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,p as isEd25519Signature,s as isFeePayerSignature,m as isGenesisTransactionResponse,r as isMultiAgentSignature,t as isMultiEd25519Signature,k as isPendingTransactionResponse,q as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse};
1
+ import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,A as DeriveScheme,a as MimeType,w as MoveAbility,v as MoveFunctionVisibility,x as RoleType,c as ScriptTransactionArgumentVariants,y as SigningScheme,z as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,q as isEd25519Signature,t as isFeePayerSignature,m as isGenesisTransactionResponse,s as isMultiAgentSignature,u as isMultiEd25519Signature,k as isPendingTransactionResponse,r as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse,p as isValidatorTransactionResponse};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -6,7 +6,6 @@ declare enum AptosApiType {
6
6
  INDEXER = 1,
7
7
  FAUCET = 2
8
8
  }
9
- declare const DEFAULT_NETWORK = Network.DEVNET;
10
9
  /**
11
10
  * The default max gas amount when none is given.
12
11
  *
@@ -54,4 +53,4 @@ declare enum ProcessorType {
54
53
  USER_TRANSACTION_PROCESSOR = "user_transaction_processor"
55
54
  }
56
55
 
57
- export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_NETWORK, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT };
56
+ export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT };
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i}from"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-FVA2OPG4.mjs";export{f as APTOS_COIN,a as AptosApiType,c as DEFAULT_MAX_GAS_AMOUNT,b as DEFAULT_NETWORK,d as DEFAULT_TXN_EXP_SEC_FROM_NOW,e as DEFAULT_TXN_TIMEOUT_SEC,i as ProcessorType,g as RAW_TRANSACTION_SALT,h as RAW_TRANSACTION_WITH_DATA_SALT};
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-HEPV52CH.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT};
2
2
  //# sourceMappingURL=const.mjs.map
@@ -1,2 +1,2 @@
1
1
  export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, NetworkToNetworkName, NetworkToNodeAPI } from './apiEndpoints.mjs';
2
- export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_NETWORK, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from './const.mjs';
2
+ export { APTOS_COIN, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from './const.mjs';
@@ -1,2 +1,2 @@
1
- import"../chunk-CYDWEPFL.mjs";import{a as g,b as h,c as i,d as j,e as k,f as l,g as m,h as n,i as o}from"../chunk-HHJBCGAQ.mjs";import{a,b,c,d,e,f}from"../chunk-77SKA4HT.mjs";import"../chunk-FVA2OPG4.mjs";export{l as APTOS_COIN,g as AptosApiType,i as DEFAULT_MAX_GAS_AMOUNT,h as DEFAULT_NETWORK,j as DEFAULT_TXN_EXP_SEC_FROM_NOW,k as DEFAULT_TXN_TIMEOUT_SEC,d as Network,e as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,f as NetworkToNetworkName,b as NetworkToNodeAPI,o as ProcessorType,m as RAW_TRANSACTION_SALT,n as RAW_TRANSACTION_WITH_DATA_SALT};
1
+ import"../chunk-CYDWEPFL.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-77SKA4HT.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-HEPV52CH.mjs";import"../chunk-FVA2OPG4.mjs";export{e as APTOS_COIN,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,l as Network,m as NetworkToChainId,k as NetworkToFaucetAPI,i as NetworkToIndexerAPI,n as NetworkToNetworkName,j as NetworkToNodeAPI,h as ProcessorType,f as RAW_TRANSACTION_SALT,g as RAW_TRANSACTION_WITH_DATA_SALT};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * hardcoded for now, we would want to have it injected dynamically
5
5
  */
6
- declare const VERSION = "1.6.0";
6
+ declare const VERSION = "1.9.0";
7
7
 
8
8
  export { VERSION };
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-3UYBNX3P.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
1
+ import{a}from"./chunk-DE5OOOVY.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -30,6 +30,20 @@
30
30
  "dist",
31
31
  "src"
32
32
  ],
33
+ "scripts": {
34
+ "build:clean": "rm -rf dist",
35
+ "build": "pnpm build:clean && tsup",
36
+ "_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' '.eslintrc.js'",
37
+ "fmt": "pnpm _fmt --write",
38
+ "lint": "eslint 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.ts'",
39
+ "test": "pnpm jest",
40
+ "unit-test": "pnpm jest tests/unit",
41
+ "e2e-test": "pnpm jest tests/e2e",
42
+ "indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
43
+ "doc": "scripts/generateDocs.sh",
44
+ "check-version": "scripts/checkVersion.sh",
45
+ "update-version": "scripts/updateVersion.sh && pnpm doc"
46
+ },
33
47
  "dependencies": {
34
48
  "@aptos-labs/aptos-client": "^0.1.0",
35
49
  "@noble/curves": "^1.2.0",
@@ -70,19 +84,5 @@
70
84
  "typedoc": "^0.25.4",
71
85
  "typescript": "^5.3.3"
72
86
  },
73
- "version": "1.7.0",
74
- "scripts": {
75
- "build:clean": "rm -rf dist",
76
- "build": "pnpm build:clean && tsup",
77
- "_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' '.eslintrc.js'",
78
- "fmt": "pnpm _fmt --write",
79
- "lint": "eslint 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.ts'",
80
- "test": "pnpm jest",
81
- "unit-test": "pnpm jest tests/unit",
82
- "e2e-test": "pnpm jest tests/e2e",
83
- "indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
84
- "doc": "scripts/generateDocs.sh",
85
- "check-version": "scripts/checkVersion.sh",
86
- "update-version": "scripts/updateVersion.sh && pnpm doc"
87
- }
88
- }
87
+ "version": "1.9.0"
88
+ }
@@ -4,7 +4,7 @@
4
4
  import aptosClient from "@aptos-labs/aptos-client";
5
5
  import { AptosSettings, ClientConfig, Client } from "../types";
6
6
  import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/apiEndpoints";
7
- import { AptosApiType, DEFAULT_NETWORK } from "../utils/const";
7
+ import { AptosApiType } from "../utils/const";
8
8
 
9
9
  /**
10
10
  * This class holds the config information for the SDK client instance.
@@ -36,7 +36,7 @@ export class AptosConfig {
36
36
  readonly clientConfig?: ClientConfig;
37
37
 
38
38
  constructor(settings?: AptosSettings) {
39
- this.network = settings?.network ?? DEFAULT_NETWORK;
39
+ this.network = settings?.network ?? Network.DEVNET;
40
40
  this.fullnode = settings?.fullnode;
41
41
  this.faucet = settings?.faucet;
42
42
  this.indexer = settings?.indexer;
@@ -23,6 +23,7 @@ import {
23
23
  createCollectionTransaction,
24
24
  freezeDigitalAssetTransferTransaction,
25
25
  getCollectionData,
26
+ getCollectionDataByCollectionId,
26
27
  getCollectionId,
27
28
  getCurrentDigitalAssetOwnership,
28
29
  getDigitalAssetActivity,
@@ -77,6 +78,25 @@ export class DigitalAsset {
77
78
  return getCollectionData({ aptosConfig: this.config, ...args });
78
79
  }
79
80
 
81
+ /**
82
+ * Queries data of a specific collection by the collection ID.
83
+ *
84
+ * @param args.collectionId the ID of the collection, it's the same thing as the address of the collection object
85
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
86
+ * @returns GetCollectionDataResponse response type
87
+ */
88
+ async getCollectionDataByCollectionId(args: {
89
+ collectionId: AccountAddressInput;
90
+ minimumLedgerVersion?: AnyNumber;
91
+ }): Promise<GetCollectionDataResponse> {
92
+ await waitForIndexerOnVersion({
93
+ config: this.config,
94
+ minimumLedgerVersion: args.minimumLedgerVersion,
95
+ processorType: ProcessorType.TOKEN_V2_PROCESSOR,
96
+ });
97
+ return getCollectionDataByCollectionId({ aptosConfig: this.config, ...args });
98
+ }
99
+
80
100
  /**
81
101
  * Queries a collection's ID.
82
102
  *
package/src/api/event.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { getAccountEventsByCreationNumber, getAccountEventsByEventType, getEvents } from "../internal/event";
4
+ import {
5
+ getAccountEventsByCreationNumber,
6
+ getAccountEventsByEventType,
7
+ getModuleEventsByEventType,
8
+ getEvents,
9
+ } from "../internal/event";
5
10
  import { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from "../types";
6
11
  import { EventsBoolExp } from "../types/generated/types";
7
12
  import { AccountAddressInput } from "../core";
@@ -15,6 +20,27 @@ import { waitForIndexerOnVersion } from "./utils";
15
20
  export class Event {
16
21
  constructor(readonly config: AptosConfig) {}
17
22
 
23
+ /**
24
+ * Get module events by event type
25
+ *
26
+ * @param args.eventType - The event type
27
+ * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
28
+ *
29
+ * @returns Promise<GetEventsResponse>
30
+ */
31
+ async getModuleEventsByEventType(args: {
32
+ eventType: MoveStructId;
33
+ minimumLedgerVersion?: AnyNumber;
34
+ options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
35
+ }): Promise<GetEventsResponse> {
36
+ await waitForIndexerOnVersion({
37
+ config: this.config,
38
+ minimumLedgerVersion: args.minimumLedgerVersion,
39
+ processorType: ProcessorType.EVENTS_PROCESSOR,
40
+ });
41
+ return getModuleEventsByEventType({ aptosConfig: this.config, ...args });
42
+ }
43
+
18
44
  /**
19
45
  * Get events by creation number and an account address
20
46
  *
@@ -0,0 +1,245 @@
1
+ import type { AccountAuthenticator } from "../../transactions/authenticator/account";
2
+ import { HexInput, SigningScheme, SigningSchemeInput } from "../../types";
3
+ import type { AccountAddress, AccountAddressInput } from "../accountAddress";
4
+ import { AuthenticationKey } from "../authenticationKey";
5
+ import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../crypto";
6
+ import { Ed25519Account } from "./Ed25519Account";
7
+ import { SingleKeyAccount } from "./SingleKeyAccount";
8
+
9
+ /**
10
+ * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
11
+ * This is the default input type when passing an `Ed25519PrivateKey`.
12
+ * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
13
+ */
14
+ export interface CreateEd25519AccountFromPrivateKeyArgs {
15
+ privateKey: Ed25519PrivateKey;
16
+ address?: AccountAddressInput;
17
+ legacy?: true;
18
+ }
19
+
20
+ /**
21
+ * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
22
+ * The `legacy` argument needs to be explicitly set to false in order to
23
+ * use the `SingleKey` authentication scheme.
24
+ */
25
+ export interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
26
+ privateKey: Ed25519PrivateKey;
27
+ address?: AccountAddressInput;
28
+ legacy: false;
29
+ }
30
+
31
+ /**
32
+ * Arguments for creating an `SingleKeyAccount` from any supported private key
33
+ * that is not an `Ed25519PrivateKey`.
34
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
35
+ */
36
+ export interface CreateSingleKeyAccountFromPrivateKeyArgs {
37
+ privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
38
+ address?: AccountAddressInput;
39
+ legacy?: false;
40
+ }
41
+
42
+ /**
43
+ * Arguments for creating an opaque `Account` from any supported private key.
44
+ * This is used when the private key type is not known at compilation time.
45
+ */
46
+ export interface CreateAccountFromPrivateKeyArgs {
47
+ privateKey: PrivateKey;
48
+ address?: AccountAddressInput;
49
+ legacy?: boolean;
50
+ }
51
+
52
+ /**
53
+ * Arguments for generating an `Ed25519Account`.
54
+ * This is the input type used by default.
55
+ */
56
+ export interface GenerateEd25519AccountArgs {
57
+ scheme?: SigningSchemeInput.Ed25519;
58
+ legacy?: true;
59
+ }
60
+
61
+ /**
62
+ * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
63
+ * The `legacy` argument needs to be explicitly set to false,
64
+ * otherwise an `Ed25519Account` will be returned instead.
65
+ */
66
+ export interface GenerateEd25519SingleKeyAccountArgs {
67
+ scheme?: SigningSchemeInput.Ed25519;
68
+ legacy: false;
69
+ }
70
+
71
+ /**
72
+ * Arguments for generating an `SingleKeyAccount` with any supported private key
73
+ * that is not an `Ed25519PrivateKey`.
74
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
75
+ */
76
+ export interface GenerateSingleKeyAccountArgs {
77
+ scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
78
+ legacy?: false;
79
+ }
80
+
81
+ /**
82
+ * Arguments for generating an opaque `Account`.
83
+ * This is used when the input signature scheme is not known at compilation time.
84
+ */
85
+ export interface GenerateAccountArgs {
86
+ scheme?: SigningSchemeInput;
87
+ legacy?: boolean;
88
+ }
89
+
90
+ /**
91
+ * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
92
+ */
93
+ export interface PrivateKeyFromDerivationPathArgs {
94
+ path: string;
95
+ mnemonic: string;
96
+ }
97
+
98
+ /**
99
+ * Interface for a generic Aptos account.
100
+ *
101
+ * The interface is defined as abstract class to provide a single entrypoint for account generation,
102
+ * either through `Account.generate()` or `Account.fromDerivationPath`.
103
+ * Despite this being an abstract class, it should be treated as an interface and enforced using
104
+ * the `implements` keyword.
105
+ *
106
+ * Note: Generating an account instance does not create the account on-chain.
107
+ */
108
+ export abstract class Account {
109
+ /**
110
+ * Private key associated with the account.
111
+ * Note: this will be removed in the next major release,
112
+ * as not all accounts have a private key.
113
+ */
114
+ abstract readonly privateKey: PrivateKey;
115
+
116
+ /**
117
+ * Public key associated with the account
118
+ */
119
+ abstract readonly publicKey: AccountPublicKey;
120
+
121
+ /**
122
+ * Account address associated with the account
123
+ */
124
+ abstract readonly accountAddress: AccountAddress;
125
+
126
+ /**
127
+ * Signing scheme used to sign transactions
128
+ */
129
+ abstract signingScheme: SigningScheme;
130
+
131
+ /**
132
+ * Derives an account from a randomly generated private key.
133
+ * @param args.scheme The signature scheme to use, to generate the private key
134
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
135
+ * @returns An account compatible with the provided signature scheme
136
+ */
137
+ static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
138
+ static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
139
+ static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
140
+ static generate(args: GenerateAccountArgs): Account;
141
+ static generate(args: GenerateAccountArgs = {}) {
142
+ const { scheme = SigningSchemeInput.Ed25519, legacy = true } = args;
143
+ if (scheme === SigningSchemeInput.Ed25519 && legacy) {
144
+ return Ed25519Account.generate();
145
+ }
146
+ return SingleKeyAccount.generate({ scheme });
147
+ }
148
+
149
+ /**
150
+ * Creates an account from the provided private key.
151
+ *
152
+ * @param args.privateKey a valid private key
153
+ * @param args.address the account's address. If not provided, it will be derived from the public key.
154
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
155
+ */
156
+ static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
157
+ static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
158
+ static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
159
+ static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account;
160
+ static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs) {
161
+ const { privateKey, address, legacy = true } = args;
162
+ if (privateKey instanceof Ed25519PrivateKey && legacy) {
163
+ return new Ed25519Account({
164
+ privateKey,
165
+ address,
166
+ });
167
+ }
168
+ return new SingleKeyAccount({ privateKey, address });
169
+ }
170
+
171
+ /**
172
+ * @deprecated use `fromPrivateKey` instead.
173
+ * Instantiates an account given a private key and a specified account address.
174
+ * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
175
+ *
176
+ * @param args.privateKey PrivateKey - the underlying private key for the account
177
+ * @param args.address AccountAddress - The account address the `Account` will sign for
178
+ * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
179
+ * to generating a Legacy Ed25519 keypair
180
+ *
181
+ * @returns Account
182
+ */
183
+ static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs) {
184
+ return this.fromPrivateKey(args);
185
+ }
186
+
187
+ /**
188
+ * Derives an account with bip44 path and mnemonics
189
+ *
190
+ * @param args.scheme The signature scheme to derive the private key with
191
+ * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
192
+ * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
193
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
194
+ * @param args.mnemonic the mnemonic seed phrase of the account
195
+ */
196
+ static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
197
+ static fromDerivationPath(
198
+ args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs,
199
+ ): SingleKeyAccount;
200
+ static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
201
+ static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account;
202
+ static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs) {
203
+ const { scheme = SigningSchemeInput.Ed25519, mnemonic, path, legacy = true } = args;
204
+ if (scheme === SigningSchemeInput.Ed25519 && legacy) {
205
+ return Ed25519Account.fromDerivationPath({ mnemonic, path });
206
+ }
207
+ return SingleKeyAccount.fromDerivationPath({ scheme, mnemonic, path });
208
+ }
209
+
210
+ /**
211
+ * @deprecated use `publicKey.authKey()` instead.
212
+ * This key enables account owners to rotate their private key(s)
213
+ * associated with the account without changing the address that hosts their account.
214
+ * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
215
+ *
216
+ * @param args.publicKey PublicKey - public key of the account
217
+ * @returns The authentication key for the associated account
218
+ */
219
+ static authKey(args: { publicKey: AccountPublicKey }): AuthenticationKey {
220
+ const { publicKey } = args;
221
+ return publicKey.authKey();
222
+ }
223
+
224
+ /**
225
+ * Sign a message using the available signing capabilities.
226
+ * @param message the signing message, as binary input
227
+ * @return the AccountAuthenticator containing the signature, together with the account's public key
228
+ */
229
+ abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
230
+
231
+ /**
232
+ * Sign the given message with the private key.
233
+ * @param message in HexInput format
234
+ * @returns AccountSignature
235
+ */
236
+ abstract sign(message: HexInput): Signature;
237
+
238
+ /**
239
+ * @param args.message raw message data in HexInput format
240
+ * @param args.signature signed message signature
241
+ */
242
+ verifySignature(args: VerifySignatureArgs): boolean {
243
+ return this.publicKey.verifySignature(args);
244
+ }
245
+ }
@@ -0,0 +1,88 @@
1
+ import { AccountAuthenticatorEd25519 } from "../../transactions/authenticator/account";
2
+ import { HexInput, SigningScheme } from "../../types";
3
+ import { AccountAddress, AccountAddressInput } from "../accountAddress";
4
+ import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../crypto";
5
+ import type { Account } from "./Account";
6
+
7
+ export interface Ed25519SignerConstructorArgs {
8
+ privateKey: Ed25519PrivateKey;
9
+ address?: AccountAddressInput;
10
+ }
11
+
12
+ export interface Ed25519SignerFromDerivationPathArgs {
13
+ path: string;
14
+ mnemonic: string;
15
+ }
16
+
17
+ export interface VerifyEd25519SignatureArgs {
18
+ message: HexInput;
19
+ signature: Ed25519Signature;
20
+ }
21
+
22
+ /**
23
+ * Signer implementation for the Ed25519 authentication scheme.
24
+ * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
25
+ *
26
+ * Note: Generating a signer instance does not create the account on-chain.
27
+ */
28
+ export class Ed25519Account implements Account {
29
+ /**
30
+ * Private key associated with the account
31
+ */
32
+ readonly privateKey: Ed25519PrivateKey;
33
+
34
+ readonly publicKey: Ed25519PublicKey;
35
+
36
+ readonly accountAddress: AccountAddress;
37
+
38
+ readonly signingScheme = SigningScheme.Ed25519;
39
+
40
+ // region Constructors
41
+
42
+ constructor(args: Ed25519SignerConstructorArgs) {
43
+ const { privateKey, address } = args;
44
+ this.privateKey = privateKey;
45
+ this.publicKey = privateKey.publicKey();
46
+ this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
47
+ }
48
+
49
+ /**
50
+ * Derives a signer from a randomly generated private key
51
+ */
52
+ static generate() {
53
+ const privateKey = Ed25519PrivateKey.generate();
54
+ return new Ed25519Account({ privateKey });
55
+ }
56
+
57
+ /**
58
+ * Derives an account with bip44 path and mnemonics
59
+ *
60
+ * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
61
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
62
+ * @param args.mnemonic the mnemonic seed phrase of the account
63
+ */
64
+ static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs) {
65
+ const { path, mnemonic } = args;
66
+ const privateKey = Ed25519PrivateKey.fromDerivationPath(path, mnemonic);
67
+ return new Ed25519Account({ privateKey });
68
+ }
69
+
70
+ // endregion
71
+
72
+ // region Account
73
+
74
+ verifySignature(args: VerifyEd25519SignatureArgs): boolean {
75
+ return this.publicKey.verifySignature(args);
76
+ }
77
+
78
+ signWithAuthenticator(message: HexInput) {
79
+ const signature = this.privateKey.sign(message);
80
+ return new AccountAuthenticatorEd25519(this.publicKey, signature);
81
+ }
82
+
83
+ sign(message: HexInput) {
84
+ return this.signWithAuthenticator(message).signature;
85
+ }
86
+
87
+ // endregion
88
+ }