@aptos-labs/ts-sdk 1.8.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/browser/index.d.ts +1131 -989
  2. package/dist/browser/index.global.js +30 -30
  3. package/dist/browser/index.global.js.map +1 -1
  4. package/dist/common/index.d.ts +1131 -989
  5. package/dist/common/index.js +25 -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.mjs +1 -1
  19. package/dist/esm/api/faucet.mjs +1 -1
  20. package/dist/esm/api/fungibleAsset.d.mts +9 -10
  21. package/dist/esm/api/fungibleAsset.mjs +1 -1
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.d.mts +13 -14
  24. package/dist/esm/api/index.mjs +1 -1
  25. package/dist/esm/api/staking.mjs +1 -1
  26. package/dist/esm/api/transaction.d.mts +5 -6
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.d.mts +8 -8
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/management.d.mts +11 -12
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/sign.d.mts +11 -12
  33. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  34. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  35. package/dist/esm/api/transactionSubmission/simulate.d.mts +11 -11
  36. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/submit.d.mts +6 -6
  38. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  39. package/dist/esm/api/utils.mjs +1 -1
  40. package/dist/esm/bcs/index.mjs +1 -1
  41. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  42. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  43. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  44. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  45. package/dist/esm/bcs/serializer.mjs +1 -1
  46. package/dist/esm/{chunk-GD5TZLBF.mjs → chunk-27XWZ5HH.mjs} +2 -2
  47. package/dist/esm/{chunk-VPQ46CAO.mjs → chunk-2CZ7RDU5.mjs} +2 -2
  48. package/dist/esm/{chunk-SXIFL5DQ.mjs → chunk-2LRDOYKF.mjs} +2 -2
  49. package/dist/esm/chunk-2YB3QA6V.mjs +2 -0
  50. package/dist/esm/chunk-2YB3QA6V.mjs.map +1 -0
  51. package/dist/esm/{chunk-F7CR75CJ.mjs → chunk-3BWYI3KO.mjs} +2 -2
  52. package/dist/esm/chunk-3E4BKDQU.mjs +2 -0
  53. package/dist/esm/chunk-3E4BKDQU.mjs.map +1 -0
  54. package/dist/esm/chunk-3FGD73JA.mjs +2 -0
  55. package/dist/esm/chunk-3FGD73JA.mjs.map +1 -0
  56. package/dist/esm/{chunk-GD4ULEBC.mjs → chunk-4H3C3V6D.mjs} +2 -2
  57. package/dist/esm/{chunk-W4UDMBMU.mjs → chunk-4M3DGBX6.mjs} +2 -2
  58. package/dist/esm/chunk-53HSYUXO.mjs +2 -0
  59. package/dist/esm/chunk-53HSYUXO.mjs.map +1 -0
  60. package/dist/esm/chunk-5VWG45IO.mjs +2 -0
  61. package/dist/esm/chunk-5VWG45IO.mjs.map +1 -0
  62. package/dist/esm/chunk-5ZWEKLOT.mjs +2 -0
  63. package/dist/esm/chunk-5ZWEKLOT.mjs.map +1 -0
  64. package/dist/esm/chunk-637CGNKQ.mjs +2 -0
  65. package/dist/esm/chunk-637CGNKQ.mjs.map +1 -0
  66. package/dist/esm/chunk-6CSXIJR4.mjs +2 -0
  67. package/dist/esm/chunk-6CSXIJR4.mjs.map +1 -0
  68. package/dist/esm/{chunk-4OI7MPFH.mjs → chunk-AKBRO5YS.mjs} +2 -2
  69. package/dist/esm/{chunk-F7MOQC7Z.mjs → chunk-BMDNUQIP.mjs} +2 -2
  70. package/dist/esm/{chunk-EUHPML5E.mjs → chunk-BR6FLUGH.mjs} +2 -2
  71. package/dist/esm/{chunk-6SRENFWH.mjs → chunk-CARQVN57.mjs} +2 -2
  72. package/dist/esm/{chunk-Q5HK3U64.mjs → chunk-DGZIRX6Z.mjs} +2 -2
  73. package/dist/esm/{chunk-2DNPRIS5.mjs → chunk-DWRBQ52O.mjs} +2 -2
  74. package/dist/esm/{chunk-XBVORX5O.mjs → chunk-DZNEBO5A.mjs} +2 -2
  75. package/dist/esm/{chunk-Q3HAJVCM.mjs → chunk-FI2B5BQ2.mjs} +2 -2
  76. package/dist/esm/chunk-FWDKABRW.mjs +2 -0
  77. package/dist/esm/chunk-FWDKABRW.mjs.map +1 -0
  78. package/dist/esm/chunk-G542XORT.mjs +2 -0
  79. package/dist/esm/chunk-G542XORT.mjs.map +1 -0
  80. package/dist/esm/{chunk-4M46AWXX.mjs → chunk-HE4FXVC4.mjs} +2 -2
  81. package/dist/esm/chunk-HEPV52CH.mjs +2 -0
  82. package/dist/esm/chunk-HEPV52CH.mjs.map +1 -0
  83. package/dist/esm/chunk-HIUJDWMR.mjs +2 -0
  84. package/dist/esm/{chunk-MEPX7Z2Z.mjs.map → chunk-HIUJDWMR.mjs.map} +1 -1
  85. package/dist/esm/chunk-HK6O5AUH.mjs +2 -0
  86. package/dist/esm/chunk-HK6O5AUH.mjs.map +1 -0
  87. package/dist/esm/chunk-HWL7DK5X.mjs +2 -0
  88. package/dist/esm/chunk-HWL7DK5X.mjs.map +1 -0
  89. package/dist/esm/{chunk-QKTV6AZ7.mjs → chunk-HZO2FSG5.mjs} +2 -2
  90. package/dist/esm/{chunk-VRSUCKJA.mjs → chunk-IKKFQZDP.mjs} +2 -2
  91. package/dist/esm/{chunk-SPOHAEHR.mjs → chunk-J2P6ERQF.mjs} +2 -2
  92. package/dist/esm/chunk-JK2QAXF2.mjs +2 -0
  93. package/dist/esm/{chunk-XZYPAQCU.mjs.map → chunk-JK2QAXF2.mjs.map} +1 -1
  94. package/dist/esm/{chunk-S64WKSMI.mjs → chunk-JOYBEFKL.mjs} +2 -2
  95. package/dist/esm/{chunk-KJGQ4ILY.mjs → chunk-JW65YQSF.mjs} +2 -2
  96. package/dist/esm/chunk-KUX6GQ2E.mjs +1 -0
  97. package/dist/esm/chunk-L4CAATRY.mjs +2 -0
  98. package/dist/esm/chunk-L4CAATRY.mjs.map +1 -0
  99. package/dist/esm/{chunk-PJNPLRPR.mjs → chunk-L5WL2GGI.mjs} +2 -2
  100. package/dist/esm/chunk-L6NGU7XZ.mjs +2 -0
  101. package/dist/esm/chunk-L6NGU7XZ.mjs.map +1 -0
  102. package/dist/esm/{chunk-QRQAR6XO.mjs → chunk-LF67MEQF.mjs} +2 -2
  103. package/dist/esm/{chunk-AFPJ2XXN.mjs → chunk-M4DLGIKP.mjs} +2 -2
  104. package/dist/esm/{chunk-7D5LHQNS.mjs → chunk-MX5RTG3J.mjs} +2 -2
  105. package/dist/esm/{chunk-B2ZKW23W.mjs → chunk-NL6SHGNC.mjs} +2 -2
  106. package/dist/esm/chunk-ODJTKMBB.mjs +2 -0
  107. package/dist/esm/{chunk-SRZTA6QH.mjs.map → chunk-ODJTKMBB.mjs.map} +1 -1
  108. package/dist/esm/chunk-ODSW4WOX.mjs +2 -0
  109. package/dist/esm/chunk-ODSW4WOX.mjs.map +1 -0
  110. package/dist/esm/chunk-QE4ASJ5K.mjs +1 -0
  111. package/dist/esm/{chunk-ENKMOALS.mjs → chunk-QIKGTKEF.mjs} +2 -2
  112. package/dist/esm/chunk-QIKGTKEF.mjs.map +1 -0
  113. package/dist/esm/{chunk-M3WNE7MU.mjs → chunk-QT4YHSGZ.mjs} +2 -2
  114. package/dist/esm/{chunk-PMWH5IGI.mjs → chunk-QTKWCACE.mjs} +2 -2
  115. package/dist/esm/{chunk-QGIJNA37.mjs → chunk-RD4HGTGK.mjs} +2 -2
  116. package/dist/esm/{chunk-IHCIKE42.mjs → chunk-RG527TGB.mjs} +2 -2
  117. package/dist/esm/{chunk-ENDUXRTK.mjs → chunk-RSV64IPI.mjs} +2 -2
  118. package/dist/esm/{chunk-VKZCIGKY.mjs → chunk-SMND5Q5T.mjs} +2 -2
  119. package/dist/esm/chunk-SPF6BCNU.mjs +2 -0
  120. package/dist/esm/chunk-SPF6BCNU.mjs.map +1 -0
  121. package/dist/esm/{chunk-Y4AKS4CY.mjs → chunk-TCXBCK5T.mjs} +2 -2
  122. package/dist/esm/{chunk-PIXE7MN5.mjs → chunk-UCA6JL25.mjs} +2 -2
  123. package/dist/esm/{chunk-2WFMD6C6.mjs → chunk-UJB36GIR.mjs} +2 -2
  124. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  125. package/dist/esm/{chunk-JJ6Y35DF.mjs → chunk-V5AIOBTO.mjs} +2 -2
  126. package/dist/esm/{chunk-O57QZZF2.mjs → chunk-VEBKGHUV.mjs} +2 -2
  127. package/dist/esm/chunk-VEBKGHUV.mjs.map +1 -0
  128. package/dist/esm/{chunk-PPTG6BDV.mjs → chunk-VRSSKMX4.mjs} +2 -2
  129. package/dist/esm/{chunk-NWRKJFHV.mjs → chunk-X2OCPM7P.mjs} +2 -2
  130. package/dist/esm/{chunk-LATJGGVX.mjs → chunk-X34ZBPWT.mjs} +2 -2
  131. package/dist/esm/{chunk-V2FPYAK7.mjs → chunk-XA37GN3W.mjs} +2 -2
  132. package/dist/esm/{chunk-N4RBQZ2B.mjs → chunk-XGWFFSQ6.mjs} +2 -2
  133. package/dist/esm/{chunk-R56OJ4XC.mjs → chunk-YGW3VAPT.mjs} +2 -2
  134. package/dist/esm/{chunk-2H5Z5EHH.mjs → chunk-YNSKIECV.mjs} +2 -2
  135. package/dist/esm/{chunk-FRLPX47J.mjs → chunk-YXBNTR7V.mjs} +2 -2
  136. package/dist/esm/{chunk-JQVT2K7G.mjs → chunk-ZSPPXKRC.mjs} +2 -2
  137. package/dist/esm/client/core.mjs +1 -1
  138. package/dist/esm/client/get.mjs +1 -1
  139. package/dist/esm/client/index.mjs +1 -1
  140. package/dist/esm/client/post.mjs +1 -1
  141. package/dist/esm/core/account/Account.d.mts +20 -0
  142. package/dist/esm/core/account/Account.mjs +2 -0
  143. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  144. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  145. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  146. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  147. package/dist/esm/core/account/SingleKeyAccount.mjs.map +1 -0
  148. package/dist/esm/core/account/index.d.mts +305 -0
  149. package/dist/esm/core/account/index.mjs +2 -0
  150. package/dist/esm/core/account/index.mjs.map +1 -0
  151. package/dist/esm/core/accountAddress.mjs +1 -1
  152. package/dist/esm/core/authenticationKey.d.mts +7 -68
  153. package/dist/esm/core/authenticationKey.mjs +1 -1
  154. package/dist/esm/core/crypto/ed25519.d.mts +49 -61
  155. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  156. package/dist/esm/core/crypto/index.d.mts +9 -6
  157. package/dist/esm/core/crypto/index.mjs +1 -1
  158. package/dist/esm/core/crypto/multiEd25519.d.mts +17 -14
  159. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  160. package/dist/esm/core/crypto/multiKey.d.mts +70 -17
  161. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  162. package/dist/esm/core/crypto/privateKey.d.mts +35 -0
  163. package/dist/esm/core/crypto/privateKey.mjs +2 -0
  164. package/dist/esm/core/crypto/privateKey.mjs.map +1 -0
  165. package/dist/esm/core/crypto/publicKey.d.mts +13 -0
  166. package/dist/esm/core/crypto/publicKey.mjs +2 -0
  167. package/dist/esm/core/crypto/publicKey.mjs.map +1 -0
  168. package/dist/esm/core/crypto/secp256k1.d.mts +43 -67
  169. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  170. package/dist/esm/core/crypto/signature.d.mts +28 -0
  171. package/dist/esm/core/crypto/signature.mjs +2 -0
  172. package/dist/esm/core/crypto/signature.mjs.map +1 -0
  173. package/dist/esm/core/crypto/singleKey.d.mts +68 -0
  174. package/dist/esm/core/crypto/singleKey.mjs +2 -0
  175. package/dist/esm/core/crypto/singleKey.mjs.map +1 -0
  176. package/dist/esm/core/index.d.mts +9 -8
  177. package/dist/esm/core/index.mjs +1 -1
  178. package/dist/esm/index.d.mts +8 -8
  179. package/dist/esm/index.mjs +1 -1
  180. package/dist/esm/internal/account.d.mts +10 -4
  181. package/dist/esm/internal/account.mjs +1 -1
  182. package/dist/esm/internal/ans.d.mts +11 -12
  183. package/dist/esm/internal/ans.mjs +1 -1
  184. package/dist/esm/internal/coin.d.mts +12 -12
  185. package/dist/esm/internal/coin.mjs +1 -1
  186. package/dist/esm/internal/digitalAsset.d.mts +17 -14
  187. package/dist/esm/internal/digitalAsset.mjs +1 -1
  188. package/dist/esm/internal/event.d.mts +2 -2
  189. package/dist/esm/internal/event.mjs +1 -1
  190. package/dist/esm/internal/faucet.d.mts +4 -4
  191. package/dist/esm/internal/faucet.mjs +1 -1
  192. package/dist/esm/internal/fungibleAsset.d.mts +10 -11
  193. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  194. package/dist/esm/internal/general.mjs +1 -1
  195. package/dist/esm/internal/staking.d.mts +3 -3
  196. package/dist/esm/internal/staking.mjs +1 -1
  197. package/dist/esm/internal/transaction.mjs +1 -1
  198. package/dist/esm/internal/transactionSubmission.d.mts +12 -13
  199. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  200. package/dist/esm/publicKey-lq5djCIY.d.mts +113 -0
  201. package/dist/esm/transactions/authenticator/account.d.mts +6 -4
  202. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  203. package/dist/esm/transactions/authenticator/index.d.mts +6 -6
  204. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  205. package/dist/esm/transactions/authenticator/transaction.d.mts +5 -5
  206. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  207. package/dist/esm/transactions/index.d.mts +6 -7
  208. package/dist/esm/transactions/index.mjs +1 -1
  209. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  210. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  211. package/dist/esm/transactions/instances/index.d.mts +4 -4
  212. package/dist/esm/transactions/instances/index.mjs +1 -1
  213. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  214. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  215. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  216. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -1
  217. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  218. package/dist/esm/transactions/instances/signedTransaction.d.mts +8 -8
  219. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  220. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  221. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  222. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +11 -5
  223. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  224. package/dist/esm/transactions/management/index.d.mts +11 -12
  225. package/dist/esm/transactions/management/index.mjs +1 -1
  226. package/dist/esm/transactions/management/transactionWorker.d.mts +11 -12
  227. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  228. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +10 -10
  229. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  230. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -10
  231. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  232. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +8 -8
  233. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  234. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +9 -10
  235. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  236. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  237. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  238. package/dist/esm/transactions/types.d.mts +9 -9
  239. package/dist/esm/utils/const.d.mts +1 -2
  240. package/dist/esm/utils/const.mjs +1 -1
  241. package/dist/esm/utils/index.d.mts +1 -1
  242. package/dist/esm/utils/index.mjs +1 -1
  243. package/dist/esm/version.d.mts +1 -1
  244. package/dist/esm/version.mjs +1 -1
  245. package/package.json +1 -1
  246. package/src/api/aptosConfig.ts +2 -2
  247. package/src/api/digitalAsset.ts +20 -0
  248. package/src/core/account/Account.ts +245 -0
  249. package/src/core/account/Ed25519Account.ts +88 -0
  250. package/src/core/account/SingleKeyAccount.ts +120 -0
  251. package/src/core/account/index.ts +3 -0
  252. package/src/core/authenticationKey.ts +18 -52
  253. package/src/core/crypto/ed25519.ts +118 -104
  254. package/src/core/crypto/index.ts +6 -5
  255. package/src/core/crypto/multiEd25519.ts +98 -44
  256. package/src/core/crypto/multiKey.ts +192 -34
  257. package/src/core/crypto/privateKey.ts +25 -0
  258. package/src/core/crypto/publicKey.ts +52 -0
  259. package/src/core/crypto/secp256k1.ts +108 -111
  260. package/src/core/crypto/signature.ts +46 -0
  261. package/src/core/crypto/singleKey.ts +180 -0
  262. package/src/internal/account.ts +5 -3
  263. package/src/internal/digitalAsset.ts +26 -0
  264. package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +0 -1
  265. package/src/transactions/authenticator/account.ts +1 -2
  266. package/src/transactions/instances/rotationProofChallenge.ts +1 -1
  267. package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -21
  268. package/src/transactions/types.ts +1 -1
  269. package/src/utils/const.ts +0 -4
  270. package/src/version.ts +1 -1
  271. package/dist/esm/chunk-2QV6HI3M.mjs +0 -2
  272. package/dist/esm/chunk-2QV6HI3M.mjs.map +0 -1
  273. package/dist/esm/chunk-7IGH7N52.mjs +0 -2
  274. package/dist/esm/chunk-7IGH7N52.mjs.map +0 -1
  275. package/dist/esm/chunk-CCUD52OF.mjs +0 -2
  276. package/dist/esm/chunk-CCUD52OF.mjs.map +0 -1
  277. package/dist/esm/chunk-ENKMOALS.mjs.map +0 -1
  278. package/dist/esm/chunk-ERWQOVBF.mjs +0 -2
  279. package/dist/esm/chunk-ERWQOVBF.mjs.map +0 -1
  280. package/dist/esm/chunk-FBFMQZTM.mjs +0 -2
  281. package/dist/esm/chunk-FBFMQZTM.mjs.map +0 -1
  282. package/dist/esm/chunk-FP5DPRYL.mjs +0 -2
  283. package/dist/esm/chunk-FP5DPRYL.mjs.map +0 -1
  284. package/dist/esm/chunk-HHJBCGAQ.mjs +0 -2
  285. package/dist/esm/chunk-HHJBCGAQ.mjs.map +0 -1
  286. package/dist/esm/chunk-I7WRJY7K.mjs +0 -2
  287. package/dist/esm/chunk-I7WRJY7K.mjs.map +0 -1
  288. package/dist/esm/chunk-LHJSG5NE.mjs +0 -2
  289. package/dist/esm/chunk-LHJSG5NE.mjs.map +0 -1
  290. package/dist/esm/chunk-MEPX7Z2Z.mjs +0 -2
  291. package/dist/esm/chunk-O57QZZF2.mjs.map +0 -1
  292. package/dist/esm/chunk-S3FBGS3W.mjs +0 -2
  293. package/dist/esm/chunk-S3FBGS3W.mjs.map +0 -1
  294. package/dist/esm/chunk-SBMJNU2O.mjs +0 -2
  295. package/dist/esm/chunk-SBMJNU2O.mjs.map +0 -1
  296. package/dist/esm/chunk-SRZTA6QH.mjs +0 -2
  297. package/dist/esm/chunk-UCHGKGCF.mjs +0 -2
  298. package/dist/esm/chunk-UCHGKGCF.mjs.map +0 -1
  299. package/dist/esm/chunk-UIVJXLRM.mjs +0 -1
  300. package/dist/esm/chunk-V6JFR2CB.mjs +0 -2
  301. package/dist/esm/chunk-V6JFR2CB.mjs.map +0 -1
  302. package/dist/esm/chunk-XZYPAQCU.mjs +0 -2
  303. package/dist/esm/chunk-YL2EDK5M.mjs +0 -2
  304. package/dist/esm/chunk-YL2EDK5M.mjs.map +0 -1
  305. package/dist/esm/chunk-ZFIMVSCR.mjs +0 -2
  306. package/dist/esm/chunk-ZFIMVSCR.mjs.map +0 -1
  307. package/dist/esm/core/account.d.mts +0 -184
  308. package/dist/esm/core/account.mjs +0 -2
  309. package/dist/esm/core/crypto/anyPublicKey.d.mts +0 -59
  310. package/dist/esm/core/crypto/anyPublicKey.mjs +0 -2
  311. package/dist/esm/core/crypto/anySignature.d.mts +0 -31
  312. package/dist/esm/core/crypto/anySignature.mjs +0 -2
  313. package/dist/esm/core/crypto/asymmetricCrypto.d.mts +0 -74
  314. package/dist/esm/core/crypto/asymmetricCrypto.mjs +0 -2
  315. package/src/core/account.ts +0 -282
  316. package/src/core/crypto/anyPublicKey.ts +0 -92
  317. package/src/core/crypto/anySignature.ts +0 -56
  318. package/src/core/crypto/asymmetricCrypto.ts +0 -77
  319. /package/dist/esm/{chunk-GD5TZLBF.mjs.map → chunk-27XWZ5HH.mjs.map} +0 -0
  320. /package/dist/esm/{chunk-VPQ46CAO.mjs.map → chunk-2CZ7RDU5.mjs.map} +0 -0
  321. /package/dist/esm/{chunk-SXIFL5DQ.mjs.map → chunk-2LRDOYKF.mjs.map} +0 -0
  322. /package/dist/esm/{chunk-F7CR75CJ.mjs.map → chunk-3BWYI3KO.mjs.map} +0 -0
  323. /package/dist/esm/{chunk-GD4ULEBC.mjs.map → chunk-4H3C3V6D.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-W4UDMBMU.mjs.map → chunk-4M3DGBX6.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-4OI7MPFH.mjs.map → chunk-AKBRO5YS.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-F7MOQC7Z.mjs.map → chunk-BMDNUQIP.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-EUHPML5E.mjs.map → chunk-BR6FLUGH.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-6SRENFWH.mjs.map → chunk-CARQVN57.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-Q5HK3U64.mjs.map → chunk-DGZIRX6Z.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-2DNPRIS5.mjs.map → chunk-DWRBQ52O.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-XBVORX5O.mjs.map → chunk-DZNEBO5A.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-Q3HAJVCM.mjs.map → chunk-FI2B5BQ2.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-4M46AWXX.mjs.map → chunk-HE4FXVC4.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-QKTV6AZ7.mjs.map → chunk-HZO2FSG5.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-VRSUCKJA.mjs.map → chunk-IKKFQZDP.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-SPOHAEHR.mjs.map → chunk-J2P6ERQF.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-S64WKSMI.mjs.map → chunk-JOYBEFKL.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-KJGQ4ILY.mjs.map → chunk-JW65YQSF.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-UIVJXLRM.mjs.map → chunk-KUX6GQ2E.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-PJNPLRPR.mjs.map → chunk-L5WL2GGI.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-QRQAR6XO.mjs.map → chunk-LF67MEQF.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-AFPJ2XXN.mjs.map → chunk-M4DLGIKP.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-7D5LHQNS.mjs.map → chunk-MX5RTG3J.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-B2ZKW23W.mjs.map → chunk-NL6SHGNC.mjs.map} +0 -0
  345. /package/dist/esm/{core/account.mjs.map → chunk-QE4ASJ5K.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-M3WNE7MU.mjs.map → chunk-QT4YHSGZ.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-PMWH5IGI.mjs.map → chunk-QTKWCACE.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-QGIJNA37.mjs.map → chunk-RD4HGTGK.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-IHCIKE42.mjs.map → chunk-RG527TGB.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-ENDUXRTK.mjs.map → chunk-RSV64IPI.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-VKZCIGKY.mjs.map → chunk-SMND5Q5T.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-Y4AKS4CY.mjs.map → chunk-TCXBCK5T.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-PIXE7MN5.mjs.map → chunk-UCA6JL25.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-2WFMD6C6.mjs.map → chunk-UJB36GIR.mjs.map} +0 -0
  355. /package/dist/esm/{core/crypto/anyPublicKey.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-JJ6Y35DF.mjs.map → chunk-V5AIOBTO.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-PPTG6BDV.mjs.map → chunk-VRSSKMX4.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-NWRKJFHV.mjs.map → chunk-X2OCPM7P.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-LATJGGVX.mjs.map → chunk-X34ZBPWT.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-V2FPYAK7.mjs.map → chunk-XA37GN3W.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-N4RBQZ2B.mjs.map → chunk-XGWFFSQ6.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-R56OJ4XC.mjs.map → chunk-YGW3VAPT.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-2H5Z5EHH.mjs.map → chunk-YNSKIECV.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-FRLPX47J.mjs.map → chunk-YXBNTR7V.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-JQVT2K7G.mjs.map → chunk-ZSPPXKRC.mjs.map} +0 -0
  366. /package/dist/esm/core/{crypto/anySignature.mjs.map → account/Account.mjs.map} +0 -0
  367. /package/dist/esm/core/{crypto/asymmetricCrypto.mjs.map → account/Ed25519Account.mjs.map} +0 -0
@@ -0,0 +1,305 @@
1
+ import { AccountAuthenticatorSingleKey, AccountAuthenticator, AccountAuthenticatorEd25519 } from '../../transactions/authenticator/account.mjs';
2
+ import { SigningSchemeInput, HexInput, SigningScheme } from '../../types/index.mjs';
3
+ import { AccountAddressInput, AccountAddress } from '../accountAddress.mjs';
4
+ import { Ed25519PrivateKey, Ed25519Signature, Ed25519PublicKey } from '../crypto/ed25519.mjs';
5
+ import { a as AccountPublicKey, A as AuthenticationKey, V as VerifySignatureArgs } from '../../publicKey-lq5djCIY.mjs';
6
+ import { Signature } from '../crypto/signature.mjs';
7
+ import { PrivateKey } from '../crypto/privateKey.mjs';
8
+ import { AnySignature, AnyPublicKey } from '../crypto/singleKey.mjs';
9
+ import '../../bcs/deserializer.mjs';
10
+ import '../../utils/apiEndpoints.mjs';
11
+ import '../../types/indexer.mjs';
12
+ import '../../types/generated/operations.mjs';
13
+ import '../../types/generated/types.mjs';
14
+ import '../../bcs/serializer.mjs';
15
+ import '../hex.mjs';
16
+ import '../common.mjs';
17
+ import '../crypto/multiEd25519.mjs';
18
+ import '../../transactions/instances/transactionArgument.mjs';
19
+ import '../crypto/multiKey.mjs';
20
+
21
+ interface SingleKeySignerConstructorArgs {
22
+ privateKey: PrivateKey;
23
+ address?: AccountAddressInput;
24
+ }
25
+ interface SingleKeySignerGenerateArgs {
26
+ scheme?: SigningSchemeInput;
27
+ }
28
+ type SingleKeySignerFromDerivationPathArgs = SingleKeySignerGenerateArgs & {
29
+ path: string;
30
+ mnemonic: string;
31
+ };
32
+ interface VerifySingleKeySignatureArgs {
33
+ message: HexInput;
34
+ signature: AnySignature;
35
+ }
36
+ /**
37
+ * Signer implementation for the SingleKey authentication scheme.
38
+ * This extends a SingleKeyAccount by adding signing capabilities through a valid private key.
39
+ * Currently, the only supported signature schemes are Ed25519 and Secp256k1.
40
+ *
41
+ * Note: Generating a signer instance does not create the account on-chain.
42
+ */
43
+ declare class SingleKeyAccount implements Account {
44
+ /**
45
+ * Private key associated with the account
46
+ */
47
+ readonly privateKey: PrivateKey;
48
+ readonly publicKey: AnyPublicKey;
49
+ readonly accountAddress: AccountAddress;
50
+ readonly signingScheme = SigningScheme.SingleKey;
51
+ constructor(args: SingleKeySignerConstructorArgs);
52
+ /**
53
+ * Derives an account from a randomly generated private key.
54
+ * Default generation is using an Ed25519 key
55
+ * @returns Account with the given signature scheme
56
+ */
57
+ static generate(args?: SingleKeySignerGenerateArgs): SingleKeyAccount;
58
+ /**
59
+ * Derives an account with bip44 path and mnemonics,
60
+ * Default to using an Ed25519 signature scheme.
61
+ *
62
+ * @param args.scheme The signature scheme to derive the private key with
63
+ * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
64
+ * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
65
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
66
+ * @param args.mnemonic the mnemonic seed phrase of the account
67
+ */
68
+ static fromDerivationPath(args: SingleKeySignerFromDerivationPathArgs): SingleKeyAccount;
69
+ verifySignature(args: VerifySingleKeySignatureArgs): boolean;
70
+ signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
71
+ sign(message: HexInput): AnySignature;
72
+ }
73
+
74
+ /**
75
+ * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
76
+ * This is the default input type when passing an `Ed25519PrivateKey`.
77
+ * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.
78
+ */
79
+ interface CreateEd25519AccountFromPrivateKeyArgs {
80
+ privateKey: Ed25519PrivateKey;
81
+ address?: AccountAddressInput;
82
+ legacy?: true;
83
+ }
84
+ /**
85
+ * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.
86
+ * The `legacy` argument needs to be explicitly set to false in order to
87
+ * use the `SingleKey` authentication scheme.
88
+ */
89
+ interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {
90
+ privateKey: Ed25519PrivateKey;
91
+ address?: AccountAddressInput;
92
+ legacy: false;
93
+ }
94
+ /**
95
+ * Arguments for creating an `SingleKeyAccount` from any supported private key
96
+ * that is not an `Ed25519PrivateKey`.
97
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
98
+ */
99
+ interface CreateSingleKeyAccountFromPrivateKeyArgs {
100
+ privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;
101
+ address?: AccountAddressInput;
102
+ legacy?: false;
103
+ }
104
+ /**
105
+ * Arguments for creating an opaque `Account` from any supported private key.
106
+ * This is used when the private key type is not known at compilation time.
107
+ */
108
+ interface CreateAccountFromPrivateKeyArgs {
109
+ privateKey: PrivateKey;
110
+ address?: AccountAddressInput;
111
+ legacy?: boolean;
112
+ }
113
+ /**
114
+ * Arguments for generating an `Ed25519Account`.
115
+ * This is the input type used by default.
116
+ */
117
+ interface GenerateEd25519AccountArgs {
118
+ scheme?: SigningSchemeInput.Ed25519;
119
+ legacy?: true;
120
+ }
121
+ /**
122
+ * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.
123
+ * The `legacy` argument needs to be explicitly set to false,
124
+ * otherwise an `Ed25519Account` will be returned instead.
125
+ */
126
+ interface GenerateEd25519SingleKeyAccountArgs {
127
+ scheme?: SigningSchemeInput.Ed25519;
128
+ legacy: false;
129
+ }
130
+ /**
131
+ * Arguments for generating an `SingleKeyAccount` with any supported private key
132
+ * that is not an `Ed25519PrivateKey`.
133
+ * The `legacy` argument defaults to false and cannot be explicitly set to true.
134
+ */
135
+ interface GenerateSingleKeyAccountArgs {
136
+ scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;
137
+ legacy?: false;
138
+ }
139
+ /**
140
+ * Arguments for generating an opaque `Account`.
141
+ * This is used when the input signature scheme is not known at compilation time.
142
+ */
143
+ interface GenerateAccountArgs {
144
+ scheme?: SigningSchemeInput;
145
+ legacy?: boolean;
146
+ }
147
+ /**
148
+ * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.
149
+ */
150
+ interface PrivateKeyFromDerivationPathArgs {
151
+ path: string;
152
+ mnemonic: string;
153
+ }
154
+ /**
155
+ * Interface for a generic Aptos account.
156
+ *
157
+ * The interface is defined as abstract class to provide a single entrypoint for account generation,
158
+ * either through `Account.generate()` or `Account.fromDerivationPath`.
159
+ * Despite this being an abstract class, it should be treated as an interface and enforced using
160
+ * the `implements` keyword.
161
+ *
162
+ * Note: Generating an account instance does not create the account on-chain.
163
+ */
164
+ declare abstract class Account {
165
+ /**
166
+ * Private key associated with the account.
167
+ * Note: this will be removed in the next major release,
168
+ * as not all accounts have a private key.
169
+ */
170
+ abstract readonly privateKey: PrivateKey;
171
+ /**
172
+ * Public key associated with the account
173
+ */
174
+ abstract readonly publicKey: AccountPublicKey;
175
+ /**
176
+ * Account address associated with the account
177
+ */
178
+ abstract readonly accountAddress: AccountAddress;
179
+ /**
180
+ * Signing scheme used to sign transactions
181
+ */
182
+ abstract signingScheme: SigningScheme;
183
+ /**
184
+ * Derives an account from a randomly generated private key.
185
+ * @param args.scheme The signature scheme to use, to generate the private key
186
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
187
+ * @returns An account compatible with the provided signature scheme
188
+ */
189
+ static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;
190
+ static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;
191
+ static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;
192
+ static generate(args: GenerateAccountArgs): Account;
193
+ /**
194
+ * Creates an account from the provided private key.
195
+ *
196
+ * @param args.privateKey a valid private key
197
+ * @param args.address the account's address. If not provided, it will be derived from the public key.
198
+ * @param args.legacy Whether to use a legacy authentication scheme, when applicable
199
+ */
200
+ static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;
201
+ static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
202
+ static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;
203
+ static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account;
204
+ /**
205
+ * @deprecated use `fromPrivateKey` instead.
206
+ * Instantiates an account given a private key and a specified account address.
207
+ * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
208
+ *
209
+ * @param args.privateKey PrivateKey - the underlying private key for the account
210
+ * @param args.address AccountAddress - The account address the `Account` will sign for
211
+ * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
212
+ * to generating a Legacy Ed25519 keypair
213
+ *
214
+ * @returns Account
215
+ */
216
+ static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs): Account;
217
+ /**
218
+ * Derives an account with bip44 path and mnemonics
219
+ *
220
+ * @param args.scheme The signature scheme to derive the private key with
221
+ * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,
222
+ * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1
223
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
224
+ * @param args.mnemonic the mnemonic seed phrase of the account
225
+ */
226
+ static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;
227
+ static fromDerivationPath(args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
228
+ static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;
229
+ static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account;
230
+ /**
231
+ * @deprecated use `publicKey.authKey()` instead.
232
+ * This key enables account owners to rotate their private key(s)
233
+ * associated with the account without changing the address that hosts their account.
234
+ * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
235
+ *
236
+ * @param args.publicKey PublicKey - public key of the account
237
+ * @returns The authentication key for the associated account
238
+ */
239
+ static authKey(args: {
240
+ publicKey: AccountPublicKey;
241
+ }): AuthenticationKey;
242
+ /**
243
+ * Sign a message using the available signing capabilities.
244
+ * @param message the signing message, as binary input
245
+ * @return the AccountAuthenticator containing the signature, together with the account's public key
246
+ */
247
+ abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
248
+ /**
249
+ * Sign the given message with the private key.
250
+ * @param message in HexInput format
251
+ * @returns AccountSignature
252
+ */
253
+ abstract sign(message: HexInput): Signature;
254
+ /**
255
+ * @param args.message raw message data in HexInput format
256
+ * @param args.signature signed message signature
257
+ */
258
+ verifySignature(args: VerifySignatureArgs): boolean;
259
+ }
260
+
261
+ interface Ed25519SignerConstructorArgs {
262
+ privateKey: Ed25519PrivateKey;
263
+ address?: AccountAddressInput;
264
+ }
265
+ interface Ed25519SignerFromDerivationPathArgs {
266
+ path: string;
267
+ mnemonic: string;
268
+ }
269
+ interface VerifyEd25519SignatureArgs {
270
+ message: HexInput;
271
+ signature: Ed25519Signature;
272
+ }
273
+ /**
274
+ * Signer implementation for the Ed25519 authentication scheme.
275
+ * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.
276
+ *
277
+ * Note: Generating a signer instance does not create the account on-chain.
278
+ */
279
+ declare class Ed25519Account implements Account {
280
+ /**
281
+ * Private key associated with the account
282
+ */
283
+ readonly privateKey: Ed25519PrivateKey;
284
+ readonly publicKey: Ed25519PublicKey;
285
+ readonly accountAddress: AccountAddress;
286
+ readonly signingScheme = SigningScheme.Ed25519;
287
+ constructor(args: Ed25519SignerConstructorArgs);
288
+ /**
289
+ * Derives a signer from a randomly generated private key
290
+ */
291
+ static generate(): Ed25519Account;
292
+ /**
293
+ * Derives an account with bip44 path and mnemonics
294
+ *
295
+ * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'
296
+ * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}
297
+ * @param args.mnemonic the mnemonic seed phrase of the account
298
+ */
299
+ static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs): Ed25519Account;
300
+ verifySignature(args: VerifyEd25519SignatureArgs): boolean;
301
+ signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519;
302
+ sign(message: HexInput): Ed25519Signature;
303
+ }
304
+
305
+ export { Account, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, Ed25519Account, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, type PrivateKeyFromDerivationPathArgs, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type VerifyEd25519SignatureArgs, type VerifySingleKeySignatureArgs };
@@ -0,0 +1,2 @@
1
+ import"../../chunk-QE4ASJ5K.mjs";import{a as c}from"../../chunk-637CGNKQ.mjs";import{a}from"../../chunk-2YB3QA6V.mjs";import{a as b}from"../../chunk-53HSYUXO.mjs";import"../../chunk-6CSXIJR4.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-ODSW4WOX.mjs";import"../../chunk-3FGD73JA.mjs";import"../../chunk-G542XORT.mjs";import"../../chunk-L6NGU7XZ.mjs";import"../../chunk-HK6O5AUH.mjs";import"../../chunk-5VWG45IO.mjs";import"../../chunk-3E4BKDQU.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VRSSKMX4.mjs";import"../../chunk-NL6SHGNC.mjs";import"../../chunk-BMDNUQIP.mjs";import"../../chunk-IKKFQZDP.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-HWL7DK5X.mjs";import"../../chunk-3BWYI3KO.mjs";import"../../chunk-XGWFFSQ6.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as Account,a as Ed25519Account,b as SingleKeyAccount};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{a,b}from"../chunk-F7CR75CJ.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{b as AccountAddress,a as AddressInvalidReason};
1
+ import{a,b}from"../chunk-3BWYI3KO.mjs";import"../chunk-XGWFFSQ6.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{b as AccountAddress,a as AddressInvalidReason};
2
2
  //# sourceMappingURL=accountAddress.mjs.map
@@ -1,74 +1,13 @@
1
- import { AccountAddress } from './accountAddress.mjs';
2
- import { PublicKey } from './crypto/asymmetricCrypto.mjs';
3
- import { Hex } from './hex.mjs';
4
- import { HexInput, AuthenticationKeyScheme } from '../types/index.mjs';
5
- import { Serializable, Serializer } from '../bcs/serializer.mjs';
6
- import { Deserializer } from '../bcs/deserializer.mjs';
1
+ import './accountAddress.mjs';
2
+ import '../bcs/deserializer.mjs';
3
+ import '../bcs/serializer.mjs';
4
+ export { A as AuthenticationKey } from '../publicKey-lq5djCIY.mjs';
5
+ import '../types/index.mjs';
6
+ import './hex.mjs';
7
7
  import './common.mjs';
8
8
  import '../transactions/instances/transactionArgument.mjs';
9
9
  import '../utils/apiEndpoints.mjs';
10
10
  import '../types/indexer.mjs';
11
11
  import '../types/generated/operations.mjs';
12
12
  import '../types/generated/types.mjs';
13
-
14
- /**
15
- * Each account stores an authentication key. Authentication key enables account owners to rotate
16
- * their private key(s) associated with the account without changing the address that hosts their account.
17
- * @see {@link https://aptos.dev/concepts/accounts | Account Basics}
18
- *
19
- * Account addresses can be derived from AuthenticationKey
20
- */
21
- declare class AuthenticationKey extends Serializable {
22
- /**
23
- * An authentication key is always a SHA3-256 hash of data, and is always 32 bytes.
24
- *
25
- * The data to hash depends on the underlying public key type and the derivation scheme.
26
- */
27
- static readonly LENGTH: number;
28
- /**
29
- * The raw bytes of the authentication key.
30
- */
31
- readonly data: Hex;
32
- constructor(args: {
33
- data: HexInput;
34
- });
35
- serialize(serializer: Serializer): void;
36
- /**
37
- * Deserialize an AuthenticationKey from the byte buffer in a Deserializer instance.
38
- * @param deserializer The deserializer to deserialize the AuthenticationKey from.
39
- * @returns An instance of AuthenticationKey.
40
- */
41
- static deserialize(deserializer: Deserializer): AuthenticationKey;
42
- toString(): string;
43
- toUint8Array(): Uint8Array;
44
- /**
45
- * Derives an AuthenticationKey from the public key seed bytes and an explicit derivation scheme.
46
- *
47
- * This facilitates targeting a specific scheme for deriving an authentication key from a public key.
48
- *
49
- * @param args - the public key and scheme to use for the derivation
50
- */
51
- static fromPublicKeyAndScheme(args: {
52
- publicKey: PublicKey;
53
- scheme: AuthenticationKeyScheme;
54
- }): AuthenticationKey;
55
- /**
56
- * Converts a PublicKey(s) to an AuthenticationKey, using the derivation scheme inferred from the
57
- * instance of the PublicKey type passed in.
58
- *
59
- * @param args.publicKey
60
- * @returns AuthenticationKey
61
- */
62
- static fromPublicKey(args: {
63
- publicKey: PublicKey;
64
- }): AuthenticationKey;
65
- /**
66
- * Derives an account address from an AuthenticationKey. Since an AccountAddress is also 32 bytes,
67
- * the AuthenticationKey bytes are directly translated to an AccountAddress.
68
- *
69
- * @returns AccountAddress
70
- */
71
- derivedAddress(): AccountAddress;
72
- }
73
-
74
- export { AuthenticationKey };
13
+ import './crypto/signature.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-SBMJNU2O.mjs";import"../chunk-7IGH7N52.mjs";import"../chunk-UCHGKGCF.mjs";import"../chunk-FBFMQZTM.mjs";import"../chunk-ZFIMVSCR.mjs";import"../chunk-I7WRJY7K.mjs";import"../chunk-V6JFR2CB.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-F7CR75CJ.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-PPTG6BDV.mjs";import"../chunk-B2ZKW23W.mjs";import"../chunk-F7MOQC7Z.mjs";import"../chunk-VRSUCKJA.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-N4RBQZ2B.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AuthenticationKey};
1
+ import{a}from"../chunk-HWL7DK5X.mjs";import"../chunk-3BWYI3KO.mjs";import"../chunk-XGWFFSQ6.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NL72WE3E.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AuthenticationKey};
2
2
  //# sourceMappingURL=authenticationKey.mjs.map
@@ -1,13 +1,17 @@
1
- import { PublicKey, PrivateKey, Signature } from './asymmetricCrypto.mjs';
2
1
  import { Deserializer } from '../../bcs/deserializer.mjs';
3
- import { Serializer } from '../../bcs/serializer.mjs';
2
+ import { Serializer, Serializable } from '../../bcs/serializer.mjs';
3
+ import { a as AccountPublicKey, V as VerifySignatureArgs, A as AuthenticationKey } from '../../publicKey-lq5djCIY.mjs';
4
4
  import { HexInput } from '../../types/index.mjs';
5
+ import { PrivateKey } from './privateKey.mjs';
6
+ import { Signature } from './signature.mjs';
5
7
  import '../../utils/apiEndpoints.mjs';
6
8
  import '../../types/indexer.mjs';
7
9
  import '../../types/generated/operations.mjs';
8
10
  import '../../types/generated/types.mjs';
9
11
  import '../hex.mjs';
10
12
  import '../common.mjs';
13
+ import '../accountAddress.mjs';
14
+ import '../../transactions/instances/transactionArgument.mjs';
11
15
 
12
16
  /**
13
17
  * Represents the public key of an Ed25519 key pair.
@@ -18,7 +22,7 @@ import '../common.mjs';
18
22
  * Ed25519 scheme is represented in the SDK as `Legacy authentication key` and also
19
23
  * as `AnyPublicKey` that represents any `Unified authentication key`
20
24
  */
21
- declare class Ed25519PublicKey extends PublicKey {
25
+ declare class Ed25519PublicKey extends AccountPublicKey {
22
26
  /**
23
27
  * Length of an Ed25519 public key
24
28
  */
@@ -34,36 +38,30 @@ declare class Ed25519PublicKey extends PublicKey {
34
38
  * @param hexInput A HexInput (string or Uint8Array)
35
39
  */
36
40
  constructor(hexInput: HexInput);
41
+ /**
42
+ * Verifies a signed data with a public key
43
+ * @param args.message a signed message
44
+ * @param args.signature the signature of the message
45
+ */
46
+ verifySignature(args: VerifySignatureArgs): boolean;
47
+ authKey(): AuthenticationKey;
37
48
  /**
38
49
  * Get the public key in bytes (Uint8Array).
39
50
  *
40
51
  * @returns Uint8Array representation of the public key
41
52
  */
42
53
  toUint8Array(): Uint8Array;
43
- /**
44
- * Get the public key as a hex string with the 0x prefix.
45
- *
46
- * @returns string representation of the public key
47
- */
48
- toString(): string;
49
- /**
50
- * Verifies a signed data with a public key
51
- * @param args.message a signed message
52
- * @param args.signature the signature of the message
53
- */
54
- verifySignature(args: {
55
- message: HexInput;
56
- signature: Ed25519Signature;
57
- }): boolean;
58
54
  serialize(serializer: Serializer): void;
59
55
  static deserialize(deserializer: Deserializer): Ed25519PublicKey;
60
- static load(deserializer: Deserializer): Ed25519PublicKey;
61
- static isPublicKey(publicKey: PublicKey): publicKey is Ed25519PublicKey;
56
+ /**
57
+ * @deprecated use `instanceof Ed25519PublicKey` instead.
58
+ */
59
+ static isPublicKey(publicKey: AccountPublicKey): publicKey is Ed25519PublicKey;
62
60
  }
63
61
  /**
64
62
  * Represents the private key of an Ed25519 key pair.
65
63
  */
66
- declare class Ed25519PrivateKey extends PrivateKey {
64
+ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
67
65
  /**
68
66
  * Length of an Ed25519 private key
69
67
  */
@@ -84,39 +82,12 @@ declare class Ed25519PrivateKey extends PrivateKey {
84
82
  * @param hexInput HexInput (string or Uint8Array)
85
83
  */
86
84
  constructor(hexInput: HexInput);
87
- /**
88
- * Get the private key in bytes (Uint8Array).
89
- *
90
- * @returns Uint8Array representation of the private key
91
- */
92
- toUint8Array(): Uint8Array;
93
- /**
94
- * Get the private key as a hex string with the 0x prefix.
95
- *
96
- * @returns string representation of the private key
97
- */
98
- toString(): string;
99
- /**
100
- * Sign the given message with the private key.
101
- *
102
- * @param message in HexInput format
103
- * @returns Signature
104
- */
105
- sign(message: HexInput): Ed25519Signature;
106
- serialize(serializer: Serializer): void;
107
- static deserialize(deserializer: Deserializer): Ed25519PrivateKey;
108
85
  /**
109
86
  * Generate a new random private key.
110
87
  *
111
88
  * @returns Ed25519PrivateKey
112
89
  */
113
90
  static generate(): Ed25519PrivateKey;
114
- /**
115
- * Derive the Ed25519PublicKey for this private key.
116
- *
117
- * @returns Ed25519PublicKey
118
- */
119
- publicKey(): Ed25519PublicKey;
120
91
  /**
121
92
  * Derives a private key from a mnemonic seed phrase.
122
93
  *
@@ -139,6 +110,36 @@ declare class Ed25519PrivateKey extends PrivateKey {
139
110
  * @returns
140
111
  */
141
112
  private static fromDerivationPathInner;
113
+ /**
114
+ * Derive the Ed25519PublicKey for this private key.
115
+ *
116
+ * @returns Ed25519PublicKey
117
+ */
118
+ publicKey(): Ed25519PublicKey;
119
+ /**
120
+ * Sign the given message with the private key.
121
+ *
122
+ * @param message in HexInput format
123
+ * @returns Signature
124
+ */
125
+ sign(message: HexInput): Ed25519Signature;
126
+ /**
127
+ * Get the private key in bytes (Uint8Array).
128
+ *
129
+ * @returns Uint8Array representation of the private key
130
+ */
131
+ toUint8Array(): Uint8Array;
132
+ /**
133
+ * Get the private key as a hex string with the 0x prefix.
134
+ *
135
+ * @returns string representation of the private key
136
+ */
137
+ toString(): string;
138
+ serialize(serializer: Serializer): void;
139
+ static deserialize(deserializer: Deserializer): Ed25519PrivateKey;
140
+ /**
141
+ * @deprecated use `instanceof Ed25519PrivateKey` instead.
142
+ */
142
143
  static isPrivateKey(privateKey: PrivateKey): privateKey is Ed25519PrivateKey;
143
144
  }
144
145
  /**
@@ -155,22 +156,9 @@ declare class Ed25519Signature extends Signature {
155
156
  */
156
157
  private readonly data;
157
158
  constructor(hexInput: HexInput);
158
- /**
159
- * Get the signature in bytes (Uint8Array).
160
- *
161
- * @returns Uint8Array representation of the signature
162
- */
163
159
  toUint8Array(): Uint8Array;
164
- /**
165
- * Get the signature as a hex string with the 0x prefix.
166
- *
167
- * @returns string representation of the signature
168
- */
169
- toString(): string;
170
160
  serialize(serializer: Serializer): void;
171
161
  static deserialize(deserializer: Deserializer): Ed25519Signature;
172
- static load(deserializer: Deserializer): Ed25519Signature;
173
- static isSignature(signature: Signature): signature is Ed25519Signature;
174
162
  }
175
163
 
176
164
  export { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature };
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-ZFIMVSCR.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
1
+ import{a,b,c}from"../../chunk-HK6O5AUH.mjs";import"../../chunk-5VWG45IO.mjs";import"../../chunk-3E4BKDQU.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VRSSKMX4.mjs";import"../../chunk-NL6SHGNC.mjs";import"../../chunk-BMDNUQIP.mjs";import"../../chunk-IKKFQZDP.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-HWL7DK5X.mjs";import"../../chunk-3BWYI3KO.mjs";import"../../chunk-XGWFFSQ6.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
2
2
  //# sourceMappingURL=ed25519.mjs.map
@@ -1,11 +1,13 @@
1
- export { PrivateKey, PublicKey, Signature } from './asymmetricCrypto.mjs';
2
1
  export { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from './ed25519.mjs';
2
+ export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED_OFFSET, KeyType, deriveKey, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, splitPath } from './hdKey.mjs';
3
3
  export { MultiEd25519PublicKey, MultiEd25519Signature } from './multiEd25519.mjs';
4
+ export { MultiKey, MultiKeySignature } from './multiKey.mjs';
5
+ export { PrivateKey } from './privateKey.mjs';
6
+ export { a as AccountPublicKey, P as PublicKey, V as VerifySignatureArgs } from '../../publicKey-lq5djCIY.mjs';
4
7
  export { Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature } from './secp256k1.mjs';
5
- export { MultiKey } from './multiKey.mjs';
6
- export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED_OFFSET, KeyType, deriveKey, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, splitPath } from './hdKey.mjs';
7
- export { AnyPublicKey } from './anyPublicKey.mjs';
8
- export { AnySignature } from './anySignature.mjs';
8
+ export { Signature } from './signature.mjs';
9
+ export { AnyPublicKey, AnySignature } from './singleKey.mjs';
10
+ import '../../bcs/deserializer.mjs';
9
11
  import '../../types/index.mjs';
10
12
  import '../../utils/apiEndpoints.mjs';
11
13
  import '../../types/indexer.mjs';
@@ -14,4 +16,5 @@ import '../../types/generated/types.mjs';
14
16
  import '../../bcs/serializer.mjs';
15
17
  import '../hex.mjs';
16
18
  import '../common.mjs';
17
- import '../../bcs/deserializer.mjs';
19
+ import '../accountAddress.mjs';
20
+ import '../../transactions/instances/transactionArgument.mjs';
@@ -1,2 +1,2 @@
1
- import"../../chunk-UIVJXLRM.mjs";import{a as x}from"../../chunk-2QV6HI3M.mjs";import{a as q,b as r}from"../../chunk-7IGH7N52.mjs";import{a as w}from"../../chunk-UCHGKGCF.mjs";import{a as v}from"../../chunk-FBFMQZTM.mjs";import{a as n,b as o,c as p}from"../../chunk-ZFIMVSCR.mjs";import{a as s,b as t,c as u}from"../../chunk-I7WRJY7K.mjs";import{a,b,c}from"../../chunk-V6JFR2CB.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j,h as k,i as l,j as m}from"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{e as APTOS_BIP44_REGEX,d as APTOS_HARDENED_REGEX,v as AnyPublicKey,x as AnySignature,k as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,g as HARDENED_OFFSET,f as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,w as MultiKey,b as PrivateKey,a as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,c as Signature,j as deriveKey,h as isValidBIP44Path,i as isValidHardenedPath,m as mnemonicToSeed,l as splitPath};
1
+ import"../../chunk-UVSRX4SV.mjs";import{a as q,b as r}from"../../chunk-ODSW4WOX.mjs";import{a as x,b as y}from"../../chunk-3FGD73JA.mjs";import{a as v,b as w}from"../../chunk-G542XORT.mjs";import{a as s,b as t,c as u}from"../../chunk-L6NGU7XZ.mjs";import{a as n,b as o,c as p}from"../../chunk-HK6O5AUH.mjs";import{a as k,b as l}from"../../chunk-5VWG45IO.mjs";import{a as m}from"../../chunk-3E4BKDQU.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-VRSSKMX4.mjs";import"../../chunk-NL6SHGNC.mjs";import"../../chunk-BMDNUQIP.mjs";import"../../chunk-IKKFQZDP.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-HWL7DK5X.mjs";import"../../chunk-3BWYI3KO.mjs";import"../../chunk-XGWFFSQ6.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,l as AccountPublicKey,v as AnyPublicKey,w as AnySignature,h as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,d as HARDENED_OFFSET,c as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,x as MultiKey,y as MultiKeySignature,k as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,m as Signature,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
2
2
  //# sourceMappingURL=index.mjs.map