@aptos-labs/ts-sdk 1.33.0 → 1.33.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 (270) hide show
  1. package/dist/common/{accountAddress-fJZJVSBc.d.ts → accountAddress-BHsGaOsa.d.ts} +14 -1
  2. package/dist/common/chunk-F43XVDYJ.js.map +1 -1
  3. package/dist/common/cli/index.d.ts +10 -1
  4. package/dist/common/cli/index.js +1 -1
  5. package/dist/common/cli/index.js.map +1 -1
  6. package/dist/common/index.d.ts +3 -2
  7. package/dist/common/index.js +9 -9
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  10. package/dist/esm/account/Account.mjs +1 -1
  11. package/dist/esm/account/Ed25519Account.mjs +1 -1
  12. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  13. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  14. package/dist/esm/account/KeylessAccount.mjs +1 -1
  15. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  16. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  17. package/dist/esm/account/index.mjs +1 -1
  18. package/dist/esm/api/account.mjs +1 -1
  19. package/dist/esm/api/ans.mjs +1 -1
  20. package/dist/esm/api/aptos.mjs +1 -1
  21. package/dist/esm/api/coin.d.mts +2 -2
  22. package/dist/esm/api/coin.mjs +1 -1
  23. package/dist/esm/api/digitalAsset.mjs +1 -1
  24. package/dist/esm/api/event.mjs +1 -1
  25. package/dist/esm/api/faucet.mjs +1 -1
  26. package/dist/esm/api/fungibleAsset.mjs +1 -1
  27. package/dist/esm/api/general.mjs +1 -1
  28. package/dist/esm/api/index.mjs +1 -1
  29. package/dist/esm/api/keyless.d.mts +1 -1
  30. package/dist/esm/api/keyless.mjs +1 -1
  31. package/dist/esm/api/object.mjs +1 -1
  32. package/dist/esm/api/staking.mjs +1 -1
  33. package/dist/esm/api/table.mjs +1 -1
  34. package/dist/esm/api/transaction.mjs +1 -1
  35. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  39. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  40. package/dist/esm/api/utils.mjs +1 -1
  41. package/dist/esm/bcs/deserializer.d.mts +14 -1
  42. package/dist/esm/bcs/deserializer.mjs +1 -1
  43. package/dist/esm/bcs/index.mjs +1 -1
  44. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  45. package/dist/esm/{chunk-2E3BT4YW.mjs → chunk-2C27NY4D.mjs} +2 -2
  46. package/dist/esm/{chunk-6AEXQEO2.mjs → chunk-2ESU5N3V.mjs} +2 -2
  47. package/dist/esm/{chunk-CK5NDXQT.mjs → chunk-2KSMV5KD.mjs} +2 -2
  48. package/dist/esm/{chunk-4ULPBQ3M.mjs → chunk-2MN7DW2J.mjs} +2 -2
  49. package/dist/esm/{chunk-LK67PZX3.mjs → chunk-2QGJDHME.mjs} +2 -2
  50. package/dist/esm/{chunk-A3USS2NC.mjs → chunk-333QBK32.mjs} +2 -2
  51. package/dist/esm/{chunk-ALOYOMRE.mjs → chunk-33CVOPIN.mjs} +2 -2
  52. package/dist/esm/{chunk-LRN4ALMT.mjs → chunk-372SLYVR.mjs} +2 -2
  53. package/dist/esm/{chunk-WTWWJWKC.mjs → chunk-46O23AOD.mjs} +2 -2
  54. package/dist/esm/{chunk-MV5PGWJQ.mjs → chunk-4DI5SPSK.mjs} +2 -2
  55. package/dist/esm/{chunk-XVPWTWPY.mjs → chunk-4DP3PEYK.mjs} +2 -2
  56. package/dist/esm/{chunk-JKA22FG5.mjs → chunk-4MTSP4S2.mjs} +2 -2
  57. package/dist/esm/{chunk-7ZA434Z3.mjs → chunk-4OV2A6PJ.mjs} +2 -2
  58. package/dist/esm/{chunk-LZ5PSDOS.mjs → chunk-4XB3BB5Z.mjs} +2 -2
  59. package/dist/esm/{chunk-Y5HLXDYG.mjs → chunk-5LGKGWLX.mjs} +2 -2
  60. package/dist/esm/{chunk-P74XXLE4.mjs → chunk-5PVZ4N42.mjs} +2 -2
  61. package/dist/esm/chunk-7N7FEBZA.mjs +2 -0
  62. package/dist/esm/chunk-7N7FEBZA.mjs.map +1 -0
  63. package/dist/esm/{chunk-O4MRRWRI.mjs → chunk-7T26VA2W.mjs} +2 -2
  64. package/dist/esm/{chunk-FH27D7S3.mjs → chunk-7V35JAAF.mjs} +2 -2
  65. package/dist/esm/{chunk-S3YVCCYI.mjs → chunk-ALNQK276.mjs} +2 -2
  66. package/dist/esm/{chunk-5O3RHPER.mjs → chunk-BAEIZAP7.mjs} +2 -2
  67. package/dist/esm/chunk-BUAHUVAD.mjs +2 -0
  68. package/dist/esm/chunk-BUAHUVAD.mjs.map +1 -0
  69. package/dist/esm/{chunk-QLC7SSLJ.mjs → chunk-C2HCRGQU.mjs} +2 -2
  70. package/dist/esm/chunk-CDEYH77E.mjs +2 -0
  71. package/dist/esm/{chunk-FSBEKFEF.mjs → chunk-CX6KECGV.mjs} +2 -2
  72. package/dist/esm/{chunk-MWNYODWU.mjs → chunk-DBTKJMLV.mjs} +2 -2
  73. package/dist/esm/{chunk-H7PDLUNP.mjs → chunk-DC2IESER.mjs} +2 -2
  74. package/dist/esm/{chunk-KPPM2BSC.mjs → chunk-EGV3HFE3.mjs} +2 -2
  75. package/dist/esm/{chunk-JYGAG754.mjs → chunk-ELXJ5A4B.mjs} +2 -2
  76. package/dist/esm/{chunk-BWV6OYLG.mjs → chunk-F2WY2DEY.mjs} +2 -2
  77. package/dist/esm/chunk-FZDEGDUY.mjs +2 -0
  78. package/dist/esm/{chunk-AITN3DO4.mjs.map → chunk-FZDEGDUY.mjs.map} +1 -1
  79. package/dist/esm/{chunk-4IQZOAN7.mjs → chunk-G4KAHJXB.mjs} +2 -2
  80. package/dist/esm/{chunk-4ZNSNWQL.mjs → chunk-GVNK3UMT.mjs} +2 -2
  81. package/dist/esm/{chunk-TTERI67T.mjs → chunk-H3C3VTHS.mjs} +2 -2
  82. package/dist/esm/{chunk-OEM75TVE.mjs → chunk-HMMNQFVM.mjs} +2 -2
  83. package/dist/esm/{chunk-64IZ5PQR.mjs → chunk-IBZKCBN5.mjs} +2 -2
  84. package/dist/esm/{chunk-MCWOKFVH.mjs → chunk-ICMELYCL.mjs} +2 -2
  85. package/dist/esm/{chunk-WXLSHECY.mjs → chunk-IK2NYNKG.mjs} +2 -2
  86. package/dist/esm/chunk-J3E4UMBB.mjs +2 -0
  87. package/dist/esm/chunk-J3E4UMBB.mjs.map +1 -0
  88. package/dist/esm/{chunk-KKLF7DQV.mjs → chunk-JMPHD4BP.mjs} +2 -2
  89. package/dist/esm/{chunk-QZT2M7UA.mjs → chunk-KCWRCWNT.mjs} +2 -2
  90. package/dist/esm/{chunk-L3J2QVIY.mjs → chunk-L4SWQLAJ.mjs} +2 -2
  91. package/dist/esm/{chunk-5XLZACVT.mjs → chunk-LA5HJILW.mjs} +2 -2
  92. package/dist/esm/{chunk-YT3IP57B.mjs → chunk-LKKI2KAP.mjs} +2 -2
  93. package/dist/esm/{chunk-QN7AK5PU.mjs → chunk-LPVGVTWT.mjs} +2 -2
  94. package/dist/esm/{chunk-S22QVNK7.mjs → chunk-N62NUAHT.mjs} +2 -2
  95. package/dist/esm/{chunk-737YW3CY.mjs → chunk-NK67FECB.mjs} +2 -2
  96. package/dist/esm/{chunk-2D7OMWVL.mjs → chunk-NZ7M6NG2.mjs} +2 -2
  97. package/dist/esm/{chunk-VELQA2Y3.mjs → chunk-P6KX7AS2.mjs} +2 -2
  98. package/dist/esm/{chunk-XOOYRVFK.mjs → chunk-PMGK5IHB.mjs} +2 -2
  99. package/dist/esm/{chunk-B5BXB2BB.mjs → chunk-PXMNAP2Q.mjs} +2 -2
  100. package/dist/esm/{chunk-GT7QFXER.mjs → chunk-QI7OREBM.mjs} +2 -2
  101. package/dist/esm/{chunk-OGBU52BQ.mjs → chunk-RCA73RVB.mjs} +2 -2
  102. package/dist/esm/{chunk-VAKNMHOA.mjs → chunk-S5SQJRAV.mjs} +2 -2
  103. package/dist/esm/{chunk-476F5NJ6.mjs → chunk-SK3LIS4Z.mjs} +2 -2
  104. package/dist/esm/{chunk-TQA6HY6A.mjs → chunk-SNYYEVJA.mjs} +2 -2
  105. package/dist/esm/{chunk-LWXBEIFO.mjs → chunk-TCXYTPUR.mjs} +2 -2
  106. package/dist/esm/{chunk-FUC7SLH7.mjs → chunk-U3T4ZT7B.mjs} +2 -2
  107. package/dist/esm/{chunk-RV7PNWDY.mjs → chunk-U6OCK6T4.mjs} +2 -2
  108. package/dist/esm/{chunk-JUQBFGUD.mjs → chunk-UFPYCROT.mjs} +2 -2
  109. package/dist/esm/{chunk-HULCIESG.mjs → chunk-UGIHQFID.mjs} +2 -2
  110. package/dist/esm/{chunk-R2YT2IM5.mjs → chunk-UJSTWN32.mjs} +2 -2
  111. package/dist/esm/{chunk-YITOC4Z6.mjs → chunk-VIZHWYI5.mjs} +2 -2
  112. package/dist/esm/{chunk-P6RNNESB.mjs → chunk-VWGB5BHW.mjs} +2 -2
  113. package/dist/esm/{chunk-QK32EQSF.mjs → chunk-WFK3XRQX.mjs} +2 -2
  114. package/dist/esm/{chunk-D54FD6XE.mjs → chunk-XOLU6UP3.mjs} +2 -2
  115. package/dist/esm/{chunk-I3452DF5.mjs → chunk-XZN344G4.mjs} +2 -2
  116. package/dist/esm/chunk-YD2BMHH7.mjs +2 -0
  117. package/dist/esm/{chunk-YQHOQJRQ.mjs.map → chunk-YD2BMHH7.mjs.map} +1 -1
  118. package/dist/esm/{chunk-HKVZ7CAG.mjs → chunk-YEWZAR76.mjs} +2 -2
  119. package/dist/esm/{chunk-A7TJF3BX.mjs → chunk-YJVZFYBX.mjs} +2 -2
  120. package/dist/esm/{chunk-Q3CWUEXI.mjs → chunk-ZMMLM6ZJ.mjs} +2 -2
  121. package/dist/esm/{chunk-7ZVXQAG4.mjs → chunk-ZMS3AOEZ.mjs} +2 -2
  122. package/dist/esm/{chunk-U7UTBXJD.mjs → chunk-ZXVN3HXB.mjs} +2 -2
  123. package/dist/esm/cli/index.mjs +1 -1
  124. package/dist/esm/cli/move.d.mts +9 -0
  125. package/dist/esm/cli/move.mjs +1 -1
  126. package/dist/esm/client/core.mjs +1 -1
  127. package/dist/esm/client/get.mjs +1 -1
  128. package/dist/esm/client/index.mjs +1 -1
  129. package/dist/esm/client/post.mjs +1 -1
  130. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  131. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  132. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  133. package/dist/esm/core/crypto/index.mjs +1 -1
  134. package/dist/esm/core/crypto/keyless.mjs +1 -1
  135. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  136. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  137. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  138. package/dist/esm/core/crypto/proof.mjs +1 -1
  139. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  140. package/dist/esm/core/crypto/secp256k1.d.mts +1 -0
  141. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  142. package/dist/esm/core/crypto/signature.mjs +1 -1
  143. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  144. package/dist/esm/core/index.mjs +1 -1
  145. package/dist/esm/errors/index.mjs +1 -1
  146. package/dist/esm/index.mjs +1 -1
  147. package/dist/esm/internal/account.mjs +1 -1
  148. package/dist/esm/internal/ans.mjs +1 -1
  149. package/dist/esm/internal/coin.mjs +1 -1
  150. package/dist/esm/internal/digitalAsset.mjs +1 -1
  151. package/dist/esm/internal/event.mjs +1 -1
  152. package/dist/esm/internal/faucet.mjs +1 -1
  153. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  154. package/dist/esm/internal/general.mjs +1 -1
  155. package/dist/esm/internal/keyless.mjs +1 -1
  156. package/dist/esm/internal/object.mjs +1 -1
  157. package/dist/esm/internal/staking.mjs +1 -1
  158. package/dist/esm/internal/table.mjs +1 -1
  159. package/dist/esm/internal/transaction.mjs +1 -1
  160. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  161. package/dist/esm/internal/view.mjs +1 -1
  162. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  163. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  164. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  165. package/dist/esm/transactions/index.mjs +1 -1
  166. package/dist/esm/transactions/instances/index.mjs +1 -1
  167. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  168. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  169. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  170. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  171. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  172. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  173. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  174. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  175. package/dist/esm/transactions/management/index.mjs +1 -1
  176. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  177. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  178. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  179. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  180. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  181. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  182. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  183. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  184. package/dist/esm/utils/index.mjs +1 -1
  185. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  186. package/dist/esm/version.d.mts +1 -1
  187. package/dist/esm/version.mjs +1 -1
  188. package/package.json +1 -1
  189. package/src/bcs/deserializer.ts +17 -1
  190. package/src/cli/move.ts +16 -0
  191. package/src/core/crypto/privateKey.ts +9 -8
  192. package/src/core/crypto/secp256k1.ts +13 -3
  193. package/src/version.ts +1 -1
  194. package/dist/esm/chunk-AITN3DO4.mjs +0 -2
  195. package/dist/esm/chunk-AVZYJAXR.mjs +0 -2
  196. package/dist/esm/chunk-AVZYJAXR.mjs.map +0 -1
  197. package/dist/esm/chunk-D52UKPQF.mjs +0 -2
  198. package/dist/esm/chunk-D52UKPQF.mjs.map +0 -1
  199. package/dist/esm/chunk-SMFTISPN.mjs +0 -2
  200. package/dist/esm/chunk-SMFTISPN.mjs.map +0 -1
  201. package/dist/esm/chunk-UZTJWOLS.mjs +0 -2
  202. package/dist/esm/chunk-YQHOQJRQ.mjs +0 -2
  203. /package/dist/esm/{chunk-2E3BT4YW.mjs.map → chunk-2C27NY4D.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-6AEXQEO2.mjs.map → chunk-2ESU5N3V.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-CK5NDXQT.mjs.map → chunk-2KSMV5KD.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-4ULPBQ3M.mjs.map → chunk-2MN7DW2J.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-LK67PZX3.mjs.map → chunk-2QGJDHME.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-A3USS2NC.mjs.map → chunk-333QBK32.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-ALOYOMRE.mjs.map → chunk-33CVOPIN.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-LRN4ALMT.mjs.map → chunk-372SLYVR.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-WTWWJWKC.mjs.map → chunk-46O23AOD.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-MV5PGWJQ.mjs.map → chunk-4DI5SPSK.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-XVPWTWPY.mjs.map → chunk-4DP3PEYK.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-JKA22FG5.mjs.map → chunk-4MTSP4S2.mjs.map} +0 -0
  215. /package/dist/esm/{chunk-7ZA434Z3.mjs.map → chunk-4OV2A6PJ.mjs.map} +0 -0
  216. /package/dist/esm/{chunk-LZ5PSDOS.mjs.map → chunk-4XB3BB5Z.mjs.map} +0 -0
  217. /package/dist/esm/{chunk-Y5HLXDYG.mjs.map → chunk-5LGKGWLX.mjs.map} +0 -0
  218. /package/dist/esm/{chunk-P74XXLE4.mjs.map → chunk-5PVZ4N42.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-O4MRRWRI.mjs.map → chunk-7T26VA2W.mjs.map} +0 -0
  220. /package/dist/esm/{chunk-FH27D7S3.mjs.map → chunk-7V35JAAF.mjs.map} +0 -0
  221. /package/dist/esm/{chunk-S3YVCCYI.mjs.map → chunk-ALNQK276.mjs.map} +0 -0
  222. /package/dist/esm/{chunk-5O3RHPER.mjs.map → chunk-BAEIZAP7.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-QLC7SSLJ.mjs.map → chunk-C2HCRGQU.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-UZTJWOLS.mjs.map → chunk-CDEYH77E.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-FSBEKFEF.mjs.map → chunk-CX6KECGV.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-MWNYODWU.mjs.map → chunk-DBTKJMLV.mjs.map} +0 -0
  227. /package/dist/esm/{chunk-H7PDLUNP.mjs.map → chunk-DC2IESER.mjs.map} +0 -0
  228. /package/dist/esm/{chunk-KPPM2BSC.mjs.map → chunk-EGV3HFE3.mjs.map} +0 -0
  229. /package/dist/esm/{chunk-JYGAG754.mjs.map → chunk-ELXJ5A4B.mjs.map} +0 -0
  230. /package/dist/esm/{chunk-BWV6OYLG.mjs.map → chunk-F2WY2DEY.mjs.map} +0 -0
  231. /package/dist/esm/{chunk-4IQZOAN7.mjs.map → chunk-G4KAHJXB.mjs.map} +0 -0
  232. /package/dist/esm/{chunk-4ZNSNWQL.mjs.map → chunk-GVNK3UMT.mjs.map} +0 -0
  233. /package/dist/esm/{chunk-TTERI67T.mjs.map → chunk-H3C3VTHS.mjs.map} +0 -0
  234. /package/dist/esm/{chunk-OEM75TVE.mjs.map → chunk-HMMNQFVM.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-64IZ5PQR.mjs.map → chunk-IBZKCBN5.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-MCWOKFVH.mjs.map → chunk-ICMELYCL.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-WXLSHECY.mjs.map → chunk-IK2NYNKG.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-KKLF7DQV.mjs.map → chunk-JMPHD4BP.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-QZT2M7UA.mjs.map → chunk-KCWRCWNT.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-L3J2QVIY.mjs.map → chunk-L4SWQLAJ.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-5XLZACVT.mjs.map → chunk-LA5HJILW.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-YT3IP57B.mjs.map → chunk-LKKI2KAP.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-QN7AK5PU.mjs.map → chunk-LPVGVTWT.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-S22QVNK7.mjs.map → chunk-N62NUAHT.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-737YW3CY.mjs.map → chunk-NK67FECB.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-2D7OMWVL.mjs.map → chunk-NZ7M6NG2.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-VELQA2Y3.mjs.map → chunk-P6KX7AS2.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-XOOYRVFK.mjs.map → chunk-PMGK5IHB.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-B5BXB2BB.mjs.map → chunk-PXMNAP2Q.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-GT7QFXER.mjs.map → chunk-QI7OREBM.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-OGBU52BQ.mjs.map → chunk-RCA73RVB.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-VAKNMHOA.mjs.map → chunk-S5SQJRAV.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-476F5NJ6.mjs.map → chunk-SK3LIS4Z.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-TQA6HY6A.mjs.map → chunk-SNYYEVJA.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-LWXBEIFO.mjs.map → chunk-TCXYTPUR.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-FUC7SLH7.mjs.map → chunk-U3T4ZT7B.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-RV7PNWDY.mjs.map → chunk-U6OCK6T4.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-JUQBFGUD.mjs.map → chunk-UFPYCROT.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-HULCIESG.mjs.map → chunk-UGIHQFID.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-R2YT2IM5.mjs.map → chunk-UJSTWN32.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-YITOC4Z6.mjs.map → chunk-VIZHWYI5.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-P6RNNESB.mjs.map → chunk-VWGB5BHW.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-QK32EQSF.mjs.map → chunk-WFK3XRQX.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-D54FD6XE.mjs.map → chunk-XOLU6UP3.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-I3452DF5.mjs.map → chunk-XZN344G4.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-HKVZ7CAG.mjs.map → chunk-YEWZAR76.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-A7TJF3BX.mjs.map → chunk-YJVZFYBX.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-Q3CWUEXI.mjs.map → chunk-ZMMLM6ZJ.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-7ZVXQAG4.mjs.map → chunk-ZMS3AOEZ.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-U7UTBXJD.mjs.map → chunk-ZXVN3HXB.mjs.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/privateKey.ts"],"sourcesContent":["/* eslint-disable max-len */\n\nimport { HexInput, PrivateKeyVariants } from \"../../types\";\nimport { Hex } from \"../hex\";\nimport { PublicKey } from \"./publicKey\";\nimport { Signature } from \"./signature\";\n\n/**\n * Represents a private key used for signing messages and deriving the associated public key.\n */\nexport interface PrivateKey {\n /**\n * Sign the given message with the private key to create a signature.\n * @param message - The message to be signed, provided in HexInput format.\n * @returns A Signature object representing the signed message.\n */\n sign(message: HexInput): Signature;\n\n /**\n * Derive the public key associated with the private key.\n */\n publicKey(): PublicKey;\n\n /**\n * Get the private key in bytes (Uint8Array).\n */\n toUint8Array(): Uint8Array;\n}\n\nexport class PrivateKey {\n /**\n * The AIP-80 compliant prefixes for each private key type. Append this to a private key's hex representation\n * to get an AIP-80 compliant string.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n */\n public static readonly AIP80_PREFIXES = {\n [PrivateKeyVariants.Ed25519]: \"ed25519-priv-\",\n [PrivateKeyVariants.Secp256k1]: \"secp256k1-priv-\",\n };\n\n /**\n * Format a HexInput to an AIP-80 compliant string.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n *\n * @param privateKey - The HexString or Uint8Array format of the private key.\n * @param privateKeyType - The private key type\n */\n public static formatPrivateKey(privateKey: HexInput, type: PrivateKeyVariants): string {\n const aip80Prefix = PrivateKey.AIP80_PREFIXES[type];\n return `${aip80Prefix}${Hex.fromHexInput(privateKey).toString()}`;\n }\n\n /**\n * Parse a HexInput that may be a HexString, Uint8Array, or a AIP-80 compliant string to a Hex instance.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n *\n * @param value - A HexString, Uint8Array, or a AIP-80 compliant string.\n * @param privateKeyType - The private key type\n * @param strict - If true, the value MUST be compliant with AIP-80.\n */\n public static parseHexInput(value: HexInput, type: PrivateKeyVariants, strict?: boolean): Hex {\n let data: Hex;\n\n const aip80Prefix = PrivateKey.AIP80_PREFIXES[type];\n if (typeof value === \"string\") {\n if (!strict && !value.startsWith(aip80Prefix)) {\n // HexString input\n data = Hex.fromHexInput(value);\n // If the strictness is false, the user has opted into non-AIP-80 compliant private keys.\n if (strict !== false) {\n // eslint-disable-next-line no-console\n console.warn(\n \"[Aptos SDK] It is recommended that private keys are AIP-80 compliant (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md). You can fix the private key by formatting it with `PrivateKey.formatPrivateKey(privateKey: string, type: 'ed25519' | 'secp256k1'): string`.\",\n );\n }\n } else if (value.startsWith(aip80Prefix)) {\n // AIP-80 Compliant String input\n data = Hex.fromHexString(value.split(\"-\")[2]);\n } else {\n if (strict) {\n // The value does not start with the AIP-80 prefix, and strict is true.\n throw new Error(\"Invalid HexString input while parsing private key. Must AIP-80 compliant string.\");\n }\n\n // This condition should never be reached.\n throw new Error(\"Invalid HexString input while parsing private key.\");\n }\n } else {\n // The value is an Uint8Array\n data = Hex.fromHexInput(value);\n // If the strictness is false, the user has opted into non-AIP-80 compliant private keys.\n if (strict !== false) {\n // eslint-disable-next-line no-console\n console.warn(\n \"[Aptos SDK] It is recommended that private keys are parsed as AIP-80 compliant strings instead of Uint8Array (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md). You can fix the private key by formatting it with `PrivateKey.formatPrivateKey(privateKey: Uint8Array, type: 'ed25519' | 'secp256k1'): string`.\",\n );\n }\n }\n\n return data;\n }\n}\n"],"mappings":"yCA6BO,IAAMA,EAAN,MAAMA,CAAW,CAoBtB,OAAc,iBAAiBC,EAAsBC,EAAkC,CAErF,MAAO,GADaF,EAAW,eAAeE,CAAI,CAC7B,GAAGC,EAAI,aAAaF,CAAU,EAAE,SAAS,CAAC,EACjE,CAWA,OAAc,cAAcG,EAAiBF,EAA0BG,EAAuB,CAC5F,IAAIC,EAEEC,EAAcP,EAAW,eAAeE,CAAI,EAClD,GAAI,OAAOE,GAAU,SACnB,GAAI,CAACC,GAAU,CAACD,EAAM,WAAWG,CAAW,EAE1CD,EAAOH,EAAI,aAAaC,CAAK,EAEzBC,IAAW,IAEb,QAAQ,KACN,uRACF,UAEOD,EAAM,WAAWG,CAAW,EAErCD,EAAOH,EAAI,cAAcC,EAAM,MAAM,GAAG,EAAE,CAAC,CAAC,MAE5C,OAAIC,EAEI,IAAI,MAAM,kFAAkF,EAI9F,IAAI,MAAM,oDAAoD,OAItEC,EAAOH,EAAI,aAAaC,CAAK,EAEzBC,IAAW,IAEb,QAAQ,KACN,mUACF,EAIJ,OAAOC,CACT,CACF,EA3EaN,EAOY,eAAiB,CACrC,QAA6B,gBAC7B,UAA+B,iBAClC,EAVK,IAAMQ,EAANR","names":["_PrivateKey","privateKey","type","Hex","value","strict","data","aip80Prefix","PrivateKey"]}
@@ -1,2 +0,0 @@
1
- import{c as t}from"./chunk-56CNRT2K.mjs";var s=class{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let i=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,i}remaining(){return this.buffer.byteLength-this.offset}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOption(e,i){if(this.deserializeBool()){if(e==="string")return this.deserializeStr();if(e==="bytes")return this.deserializeBytes();if(e==="fixedBytes"){if(i===void 0)throw new Error("Fixed bytes length not provided");return this.deserializeFixedBytes(i)}return this.deserialize(e)}}deserializeBytes(){let e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}deserializeFixedBytes(e){return new Uint8Array(this.read(e))}deserializeBool(){let e=new Uint8Array(this.read(1))[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return new DataView(this.read(1)).getUint8(0)}deserializeU16(){return new DataView(this.read(2)).getUint16(0,!0)}deserializeU32(){return new DataView(this.read(4)).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),i=this.deserializeU32();return BigInt(BigInt(i)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),i=this.deserializeU64();return BigInt(i<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),i=this.deserializeU128();return BigInt(i<<BigInt(128)|e)}deserializeUleb128AsU32(){let e=BigInt(0),i=0;for(;e<t;){let r=this.deserializeU8();if(e|=BigInt(r&127)<<BigInt(i),!(r&128))break;i+=7}if(e>t)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let i=this.deserializeUleb128AsU32(),r=new Array;for(let n=0;n<i;n+=1)r.push(this.deserialize(e));return r}};export{s as a};
2
- //# sourceMappingURL=chunk-D52UKPQF.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/bcs/deserializer.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable no-bitwise */\nimport { MAX_U32_NUMBER } from \"./consts\";\nimport { Uint8, Uint16, Uint32, Uint64, Uint128, Uint256 } from \"../types\";\n\n/**\n * This interface exists to define Deserializable<T> inputs for functions that\n * deserialize a byte buffer into a type T.\n * It is not intended to be implemented or extended, because Typescript has no support\n * for static methods in interfaces.\n *\n * @template T - The type that this will deserialize into.\n */\nexport interface Deserializable<T> {\n /**\n * Deserializes the buffered bytes into an instance of the specified class type.\n * This function provides an alternative syntax for deserialization, allowing users to call\n * `deserializer.deserialize(MyClass)` instead of `MyClass.deserialize(deserializer)`.\n *\n * @param deserializer - The deserializer instance with the buffered bytes.\n * @returns The deserialized value of class type T.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * ```\n */\n deserialize(deserializer: Deserializer): T;\n}\n\n/**\n * A class that provides methods for deserializing various data types from a byte buffer.\n * It supports deserialization of primitive types, strings, and complex objects using a BCS (Binary Common Serialization) layout.\n */\nexport class Deserializer {\n private buffer: ArrayBuffer;\n\n private offset: number;\n\n /**\n * Creates a new instance of the class with a copy of the provided data buffer.\n * This prevents outside mutation of the buffer.\n *\n * @param data - The data to be copied into the internal buffer as a Uint8Array.\n */\n constructor(data: Uint8Array) {\n // copies data to prevent outside mutation of buffer.\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n\n /**\n * Reads a specified number of bytes from the buffer and advances the offset.\n *\n * @param length - The number of bytes to read from the buffer.\n * @throws Throws an error if the read operation exceeds the buffer's length.\n */\n private read(length: number): ArrayBuffer {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n\n const bytes = this.buffer.slice(this.offset, this.offset + length);\n this.offset += length;\n return bytes;\n }\n\n /**\n * Returns the number of bytes remaining in the buffer.\n *\n * This information is useful to determine if there's more data to be read.\n *\n * @returns The number of bytes remaining in the buffer.\n */\n remaining(): number {\n return this.buffer.byteLength - this.offset;\n }\n\n /**\n * @deprecated use `deserializeOption` instead.\n * Deserializes a UTF-8 encoded string from a byte array. It first reads the length of the string in bytes,\n * followed by the actual byte content, and decodes it into a string.\n *\n * BCS layout for \"string\": string_length | string_content\n * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.\n *\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));\n * assert(deserializer.deserializeStr() === \"1234abcd\");\n * ```\n */\n deserializeStr(): string {\n const value = this.deserializeBytes();\n const textDecoder = new TextDecoder();\n return textDecoder.decode(value);\n }\n\n /**\n * Deserializes an optional value from the buffer.\n *\n * The BCS layout for Optional<T> starts with a boolean byte (0 if none, 1 if some),\n * followed by the value if present.\n *\n * @template T - The type of the value to deserialize\n * @param type - Either a Deserializable class or one of the string literals: \"string\", \"bytes\", or \"fixedBytes\"\n * @param len - Required length when type is \"fixedBytes\", ignored otherwise\n * @returns The deserialized value if present, undefined otherwise\n *\n * @throws {Error} When \"fixedBytes\" is specified without a length\n *\n * @example\n * ```typescript\n * // Deserialize an optional string\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 97, 98, 99]));\n * const optStr = deserializer.deserializeOption(\"string\");\n * // optStr === \"abc\"\n *\n * // Deserialize an optional custom type\n * const deserializer = new Deserializer(new Uint8Array([0]));\n * const optValue = deserializer.deserializeOption(MyClass);\n * // optValue === undefined\n *\n * // Deserialize optional bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 3, 1, 2, 3]));\n * const optBytes = deserializer.deserializeOption(\"bytes\");\n * // optBytes === Uint8Array[1, 2, 3]\n *\n * // Deserialize optional fixed bytes\n * const deserializer = new Deserializer(new Uint8Array([1, 1, 2, 3, 4]));\n * const optBytes = deserializer.deserializeOption(\"fixedBytes\", 4);\n * // optBytes === Uint8Array[1, 2, 3, 4]\n * ```\n */\n deserializeOption(type: \"string\"): string | undefined;\n deserializeOption(type: \"bytes\"): Uint8Array | undefined;\n deserializeOption(type: \"fixedBytes\", len: number): Uint8Array | undefined;\n deserializeOption<T>(type: Deserializable<T>): T | undefined;\n deserializeOption<T>(\n type: Deserializable<T> | \"string\" | \"bytes\" | \"fixedBytes\",\n len?: number,\n ): T | string | Uint8Array | undefined {\n const exists = this.deserializeBool();\n if (!exists) return undefined;\n\n if (type === \"string\") {\n return this.deserializeStr();\n }\n if (type === \"bytes\") {\n return this.deserializeBytes();\n }\n if (type === \"fixedBytes\") {\n if (len === undefined) {\n throw new Error(\"Fixed bytes length not provided\");\n }\n return this.deserializeFixedBytes(len);\n }\n\n return this.deserialize(type);\n }\n\n /**\n * Deserializes an array of bytes.\n *\n * The BCS layout for \"bytes\" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer\n * encoded as a uleb128 integer, indicating the length of the bytes array.\n *\n * @returns {Uint8Array} The deserialized array of bytes.\n */\n deserializeBytes(): Uint8Array {\n const len = this.deserializeUleb128AsU32();\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes an array of bytes of a specified length.\n *\n * @param len - The number of bytes to read from the source.\n */\n deserializeFixedBytes(len: number): Uint8Array {\n return new Uint8Array(this.read(len));\n }\n\n /**\n * Deserializes a boolean value from a byte stream.\n *\n * The BCS layout for a boolean uses one byte, where \"0x01\" represents true and \"0x00\" represents false.\n * An error is thrown if the byte value is not valid.\n *\n * @returns The deserialized boolean value.\n * @throws Throws an error if the boolean value is invalid.\n */\n deserializeBool(): boolean {\n const bool = new Uint8Array(this.read(1))[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n\n /**\n * Deserializes a uint8 number from the binary data.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n *\n * @returns {number} The deserialized uint8 number.\n */\n deserializeU8(): Uint8 {\n return new DataView(this.read(1)).getUint8(0);\n }\n\n /**\n * Deserializes a uint16 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint16\": Two bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n */\n deserializeU16(): Uint16 {\n return new DataView(this.read(2)).getUint16(0, true);\n }\n\n /**\n * Deserializes a uint32 number from a binary format in little-endian representation.\n *\n * BCS layout for \"uint32\": Four bytes.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n */\n deserializeU32(): Uint32 {\n return new DataView(this.read(4)).getUint32(0, true);\n }\n\n /**\n * Deserializes a uint64 number.\n *\n * This function combines two 32-bit values to return a 64-bit unsigned integer in little-endian representation.\n * @example\n * ```typescript\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n */\n deserializeU64(): Uint64 {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n\n // combine the two 32-bit values and return (little endian)\n return BigInt((BigInt(high) << BigInt(32)) | BigInt(low));\n }\n\n /**\n * Deserializes a uint128 number from its binary representation.\n * This function combines two 64-bit values to return a single uint128 value in little-endian format.\n *\n * @returns {BigInt} The deserialized uint128 number.\n */\n deserializeU128(): Uint128 {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n\n // combine the two 64-bit values and return (little endian)\n return BigInt((high << BigInt(64)) | low);\n }\n\n /**\n * Deserializes a uint256 number from its binary representation.\n *\n * The BCS layout for \"uint256\" consists of thirty-two bytes in little-endian format.\n *\n * @returns {BigInt} The deserialized uint256 number.\n */\n deserializeU256(): Uint256 {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n\n // combine the two 128-bit values and return (little endian)\n return BigInt((high << BigInt(128)) | low);\n }\n\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.\n *\n * @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.\n * @returns {number} The deserialized uint32 value.\n */\n deserializeUleb128AsU32(): Uint32 {\n let value: bigint = BigInt(0);\n let shift = 0;\n\n while (value < MAX_U32_NUMBER) {\n const byte = this.deserializeU8();\n value |= BigInt(byte & 0x7f) << BigInt(shift);\n\n if ((byte & 0x80) === 0) {\n break;\n }\n shift += 7;\n }\n\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n\n return Number(value);\n }\n\n /**\n * Helper function that primarily exists to support alternative syntax for deserialization.\n * That is, if we have a `const deserializer: new Deserializer(...)`, instead of having to use\n * `MyClass.deserialize(deserializer)`, we can call `deserializer.deserialize(MyClass)`.\n *\n * @example const deserializer = new Deserializer(new Uint8Array([1, 2, 3]));\n * const value = deserializer.deserialize(MyClass); // where MyClass has a `deserialize` function\n * // value is now an instance of MyClass\n * // equivalent to `const value = MyClass.deserialize(deserializer)`\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n *\n * @returns the deserialized value of class type T\n */\n deserialize<T>(cls: Deserializable<T>): T {\n // NOTE: `deserialize` in `cls.deserialize(this)` here is a static method defined in `cls`,\n // It is separate from the `deserialize` instance method defined here in Deserializer.\n return cls.deserialize(this);\n }\n\n /**\n * Deserializes an array of BCS Deserializable values given an existing Deserializer instance with a loaded byte buffer.\n *\n * @param cls The BCS-deserializable class to deserialize the buffered bytes into.\n * @returns An array of deserialized values of type T.\n * @example\n * // serialize a vector of addresses\n * const addresses = new Array<AccountAddress>(\n * AccountAddress.from(\"0x1\"),\n * AccountAddress.from(\"0x2\"),\n * AccountAddress.from(\"0xa\"),\n * AccountAddress.from(\"0xb\"),\n * );\n * const serializer = new Serializer();\n * serializer.serializeVector(addresses);\n * const serializedBytes = serializer.toUint8Array();\n *\n * // deserialize the bytes into an array of addresses\n * const deserializer = new Deserializer(serializedBytes);\n * const deserializedAddresses = deserializer.deserializeVector(AccountAddress);\n * // deserializedAddresses is now an array of AccountAddress instances\n */\n deserializeVector<T>(cls: Deserializable<T>): Array<T> {\n const length = this.deserializeUleb128AsU32();\n const vector = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n vector.push(this.deserialize(cls));\n }\n return vector;\n }\n}\n"],"mappings":"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","names":["Deserializer","data","length","bytes","value","type","len","bool","low","high","shift","MAX_U32_NUMBER","byte","cls","vector","i"]}
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-AVZYJAXR.mjs";import{a as f}from"./chunk-MHN6XY4Z.mjs";import{a as v}from"./chunk-4O5XDQDO.mjs";import{a as p}from"./chunk-5B3SMBXQ.mjs";import{e as h,j as d}from"./chunk-OIOGOW6I.mjs";import{a as g}from"./chunk-AJ5JHBAE.mjs";import{b as a}from"./chunk-SPRNSFUV.mjs";import{sha3_256 as H}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as K}from"@scure/bip32";var n=class n extends f{constructor(e){super();let t=a.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:i}=e,l=p(t),c=a.fromHexInput(l).toUint8Array(),x=H(c),A=i.toUint8Array();return o.verify(A,x,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}deserialize(e){let t=e.deserializeBytes();return new y(t)}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}static isInstance(e){return"key"in e&&e.key?.data?.length===n.LENGTH}};n.LENGTH=65;var m=n,r=class r extends g{constructor(e,t){super();let i=u.parseHexInput(e,"secp256k1",t);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.key=i}static generate(){let e=o.utils.randomPrivateKey();return new r(e,!1)}static fromDerivationPath(e,t){if(!h(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,d(t))}static fromDerivationPathInner(e,t){let{privateKey:i}=K.fromMasterSeed(t).derive(e);if(i===null)throw new Error("Invalid key");return new r(i,!1)}sign(e){let t=p(e),i=a.fromHexInput(t),l=H(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array(),{lowS:!0});return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.toHexString()}toHexString(){return this.key.toString()}toAIP80String(){return u.formatPrivateKey(this.key.toString(),"secp256k1")}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t,!1)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32;var S=r,s=class s extends v{constructor(e){super();let t=a.fromHexInput(e);if(t.toUint8Array().length!==s.LENGTH)throw new Error(`Signature length should be ${s.LENGTH}, received ${t.toUint8Array().length}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new s(t)}};s.LENGTH=64;var y=s;export{m as a,S as b,y as c};
2
- //# sourceMappingURL=chunk-SMFTISPN.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/secp256k1.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { sha3_256 } from \"@noble/hashes/sha3\";\nimport { secp256k1 } from \"@noble/curves/secp256k1\";\nimport { HDKey } from \"@scure/bip32\";\nimport { Serializable, Deserializer, Serializer } from \"../../bcs\";\nimport { Hex } from \"../hex\";\nimport { HexInput, PrivateKeyVariants } from \"../../types\";\nimport { isValidBIP44Path, mnemonicToSeed } from \"./hdKey\";\nimport { PrivateKey } from \"./privateKey\";\nimport { PublicKey, VerifySignatureArgs } from \"./publicKey\";\nimport { Signature } from \"./signature\";\nimport { convertSigningMessage } from \"./utils\";\n\n/**\n * Represents a Secp256k1 ECDSA public key.\n *\n * @extends PublicKey\n * @property LENGTH - The length of the Secp256k1 public key in bytes.\n */\nexport class Secp256k1PublicKey extends PublicKey {\n // Secp256k1 ecdsa public keys contain a prefix indicating compression and two 32-byte coordinates.\n static readonly LENGTH: number = 65;\n\n // Hex value of the public key\n private readonly key: Hex;\n\n /**\n * Create a new PublicKey instance from a HexInput, which can be a string or Uint8Array.\n * This constructor validates the length of the provided signature data.\n *\n * @param hexInput - A HexInput (string or Uint8Array) representing the signature data.\n * @throws Error if the length of the signature data is not equal to Secp256k1Signature.LENGTH.\n */\n constructor(hexInput: HexInput) {\n super();\n\n const hex = Hex.fromHexInput(hexInput);\n if (hex.toUint8Array().length !== Secp256k1PublicKey.LENGTH) {\n throw new Error(`PublicKey length should be ${Secp256k1PublicKey.LENGTH}`);\n }\n this.key = hex;\n }\n\n // region PublicKey\n /**\n * Verifies a Secp256k1 signature against the public key.\n *\n * This function checks the validity of a signature for a given message, ensuring that the signature is canonical as a malleability check.\n *\n * @param args - The arguments for verifying the signature.\n * @param args.message - The message that was signed.\n * @param args.signature - The signature to verify against the public key.\n */\n verifySignature(args: VerifySignatureArgs): boolean {\n const { message, signature } = args;\n const messageToVerify = convertSigningMessage(message);\n const messageBytes = Hex.fromHexInput(messageToVerify).toUint8Array();\n const messageSha3Bytes = sha3_256(messageBytes);\n const signatureBytes = signature.toUint8Array();\n return secp256k1.verify(signatureBytes, messageSha3Bytes, this.key.toUint8Array(), { lowS: true });\n }\n\n /**\n * Get the data as a Uint8Array representation.\n *\n * @returns Uint8Array representation of the data.\n */\n toUint8Array(): Uint8Array {\n return this.key.toUint8Array();\n }\n\n // endregion\n\n // region Serializable\n\n /**\n * Serializes the data into a byte array using the provided serializer.\n * This function is essential for converting data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to convert the data.\n */\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.key.toUint8Array());\n }\n\n /**\n * Deserializes a Secp256k1Signature from the provided deserializer.\n * This function allows you to reconstruct a Secp256k1Signature object from its serialized byte representation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n */\n // eslint-disable-next-line class-methods-use-this\n deserialize(deserializer: Deserializer) {\n const hex = deserializer.deserializeBytes();\n return new Secp256k1Signature(hex);\n }\n\n static deserialize(deserializer: Deserializer): Secp256k1PublicKey {\n const bytes = deserializer.deserializeBytes();\n return new Secp256k1PublicKey(bytes);\n }\n\n // endregion\n\n /**\n * Determine if the provided public key is an instance of Secp256k1PublicKey.\n *\n * @deprecated use `instanceof Secp256k1PublicKey` instead\n * @param publicKey - The public key to check.\n */\n static isPublicKey(publicKey: PublicKey): publicKey is Secp256k1PublicKey {\n return publicKey instanceof Secp256k1PublicKey;\n }\n\n /**\n * Determines if the provided public key is a valid instance of a Secp256k1 public key.\n * This function checks for the presence of a \"key\" property and validates the length of the key data.\n *\n * @param publicKey - The public key to validate.\n * @returns A boolean indicating whether the public key is a valid Secp256k1 public key.\n */\n static isInstance(publicKey: PublicKey): publicKey is Secp256k1PublicKey {\n return \"key\" in publicKey && (publicKey.key as any)?.data?.length === Secp256k1PublicKey.LENGTH;\n }\n}\n\n/**\n * Represents a Secp256k1 ECDSA private key, providing functionality to create, sign messages,\n * derive public keys, and serialize/deserialize the key.\n */\nexport class Secp256k1PrivateKey extends Serializable implements PrivateKey {\n /**\n * Length of Secp256k1 ecdsa private key\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The private key bytes\n * @private\n */\n private readonly key: Hex;\n\n // region Constructors\n\n /**\n * Create a new PrivateKey instance from a Uint8Array or String.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n *\n * @param hexInput A HexInput (string or Uint8Array)\n * @param strict If true, private key must AIP-80 compliant.\n */\n constructor(hexInput: HexInput, strict?: boolean) {\n super();\n\n const privateKeyHex = PrivateKey.parseHexInput(hexInput, PrivateKeyVariants.Secp256k1, strict);\n if (privateKeyHex.toUint8Array().length !== Secp256k1PrivateKey.LENGTH) {\n throw new Error(`PrivateKey length should be ${Secp256k1PrivateKey.LENGTH}`);\n }\n\n this.key = privateKeyHex;\n }\n\n /**\n * Generate a new random private key.\n *\n * @returns Secp256k1PrivateKey - A newly generated Secp256k1 private key.\n */\n static generate(): Secp256k1PrivateKey {\n const hexInput = secp256k1.utils.randomPrivateKey();\n return new Secp256k1PrivateKey(hexInput, false);\n }\n\n /**\n * Derives a private key from a mnemonic seed phrase using a specified BIP44 path.\n *\n * @param path - The BIP44 path to derive the key from.\n * @param mnemonics - The mnemonic seed phrase used for key generation.\n *\n * @returns The generated private key.\n *\n * @throws Error if the provided path is not a valid BIP44 path.\n */\n static fromDerivationPath(path: string, mnemonics: string): Secp256k1PrivateKey {\n if (!isValidBIP44Path(path)) {\n throw new Error(`Invalid derivation path ${path}`);\n }\n return Secp256k1PrivateKey.fromDerivationPathInner(path, mnemonicToSeed(mnemonics));\n }\n\n /**\n * Derives a private key from a specified BIP44 path using a given seed.\n * This function is essential for generating keys that follow the hierarchical deterministic (HD) wallet structure.\n *\n * @param path - The BIP44 path used for key derivation.\n * @param seed - The seed phrase created by the mnemonics, represented as a Uint8Array.\n * @returns The generated private key as an instance of Secp256k1PrivateKey.\n * @throws Error if the derived private key is invalid.\n */\n private static fromDerivationPathInner(path: string, seed: Uint8Array): Secp256k1PrivateKey {\n const { privateKey } = HDKey.fromMasterSeed(seed).derive(path);\n // library returns privateKey as Uint8Array | null\n if (privateKey === null) {\n throw new Error(\"Invalid key\");\n }\n\n return new Secp256k1PrivateKey(privateKey, false);\n }\n\n // endregion\n\n // region PrivateKey\n\n /**\n * Sign the given message with the private key.\n * This function generates a cryptographic signature for the provided message, ensuring the signature is canonical and non-malleable.\n *\n * @param message - A message in HexInput format to be signed.\n * @returns Signature - The generated signature for the provided message.\n */\n sign(message: HexInput): Secp256k1Signature {\n const messageToSign = convertSigningMessage(message);\n const messageBytes = Hex.fromHexInput(messageToSign);\n const messageHashBytes = sha3_256(messageBytes.toUint8Array());\n const signature = secp256k1.sign(messageHashBytes, this.key.toUint8Array(), { lowS: true });\n return new Secp256k1Signature(signature.toCompactRawBytes());\n }\n\n /**\n * Derive the Secp256k1PublicKey from this private key.\n *\n * @returns Secp256k1PublicKey The derived public key.\n */\n publicKey(): Secp256k1PublicKey {\n const bytes = secp256k1.getPublicKey(this.key.toUint8Array(), false);\n return new Secp256k1PublicKey(bytes);\n }\n\n /**\n * Get the private key in bytes (Uint8Array).\n *\n * @returns\n */\n toUint8Array(): Uint8Array {\n return this.key.toUint8Array();\n }\n\n /**\n * Get the private key as a string representation.\n *\n * @returns string representation of the private key\n */\n toString(): string {\n return this.toHexString();\n }\n\n /**\n * Get the private key as a hex string with the 0x prefix.\n *\n * @returns string representation of the private key.\n */\n toHexString(): string {\n return this.key.toString();\n }\n\n /**\n * Get the private key as a AIP-80 compliant hex string.\n *\n * [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)\n *\n * @returns AIP-80 compliant string representation of the private key.\n */\n toAIP80String(): string {\n return PrivateKey.formatPrivateKey(this.key.toString(), PrivateKeyVariants.Secp256k1);\n }\n\n // endregion\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.toUint8Array());\n }\n\n static deserialize(deserializer: Deserializer): Secp256k1PrivateKey {\n const bytes = deserializer.deserializeBytes();\n return new Secp256k1PrivateKey(bytes, false);\n }\n\n // endregion\n\n /**\n * Determines if the provided private key is an instance of Secp256k1PrivateKey.\n *\n * @param privateKey - The private key to be checked.\n *\n * @deprecated use `instanceof Secp256k1PrivateKey` instead\n */\n static isPrivateKey(privateKey: PrivateKey): privateKey is Secp256k1PrivateKey {\n return privateKey instanceof Secp256k1PrivateKey;\n }\n}\n\n/**\n * Represents a signature of a message signed using a Secp256k1 ECDSA private key.\n *\n */\nexport class Secp256k1Signature extends Signature {\n /**\n * Secp256k1 ecdsa signatures are 256-bit or 64 bytes\n * @readonly\n */\n static readonly LENGTH = 64;\n\n /**\n * The signature bytes\n * @private\n */\n private readonly data: Hex;\n\n // region Constructors\n\n /**\n * Create a new Signature instance from a Uint8Array or String.\n *\n * @param hexInput A HexInput (string or Uint8Array)\n */\n constructor(hexInput: HexInput) {\n super();\n const data = Hex.fromHexInput(hexInput);\n if (data.toUint8Array().length !== Secp256k1Signature.LENGTH) {\n throw new Error(\n `Signature length should be ${Secp256k1Signature.LENGTH}, received ${data.toUint8Array().length}`,\n );\n }\n this.data = data;\n }\n\n // endregion\n\n // region Signature\n\n toUint8Array(): Uint8Array {\n return this.data.toUint8Array();\n }\n\n // endregion\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.data.toUint8Array());\n }\n\n static deserialize(deserializer: Deserializer): Secp256k1Signature {\n const hex = deserializer.deserializeBytes();\n return new Secp256k1Signature(hex);\n }\n\n // endregion\n}\n"],"mappings":"sSAGA,OAAS,YAAAA,MAAgB,qBACzB,OAAS,aAAAC,MAAiB,0BAC1B,OAAS,SAAAC,MAAa,eAgBf,IAAMC,EAAN,MAAMA,UAA2BC,CAAU,CAchD,YAAYC,EAAoB,CAC9B,MAAM,EAEN,IAAMC,EAAMC,EAAI,aAAaF,CAAQ,EACrC,GAAIC,EAAI,aAAa,EAAE,SAAWH,EAAmB,OACnD,MAAM,IAAI,MAAM,8BAA8BA,EAAmB,MAAM,EAAE,EAE3E,KAAK,IAAMG,CACb,CAYA,gBAAgBE,EAAoC,CAClD,GAAM,CAAE,QAAAC,EAAS,UAAAC,CAAU,EAAIF,EACzBG,EAAkBC,EAAsBH,CAAO,EAC/CI,EAAeN,EAAI,aAAaI,CAAe,EAAE,aAAa,EAC9DG,EAAmBC,EAASF,CAAY,EACxCG,EAAiBN,EAAU,aAAa,EAC9C,OAAOO,EAAU,OAAOD,EAAgBF,EAAkB,KAAK,IAAI,aAAa,EAAG,CAAE,KAAM,EAAK,CAAC,CACnG,CAOA,cAA2B,CACzB,OAAO,KAAK,IAAI,aAAa,CAC/B,CAYA,UAAUI,EAA8B,CACtCA,EAAW,eAAe,KAAK,IAAI,aAAa,CAAC,CACnD,CASA,YAAYC,EAA4B,CACtC,IAAMb,EAAMa,EAAa,iBAAiB,EAC1C,OAAO,IAAIC,EAAmBd,CAAG,CACnC,CAEA,OAAO,YAAYa,EAAgD,CACjE,IAAME,EAAQF,EAAa,iBAAiB,EAC5C,OAAO,IAAIhB,EAAmBkB,CAAK,CACrC,CAUA,OAAO,YAAYC,EAAuD,CACxE,OAAOA,aAAqBnB,CAC9B,CASA,OAAO,WAAWmB,EAAuD,CACvE,MAAO,QAASA,GAAcA,EAAU,KAAa,MAAM,SAAWnB,EAAmB,MAC3F,CACF,EAzGaA,EAEK,OAAiB,GAF5B,IAAMoB,EAANpB,EA+GMqB,EAAN,MAAMA,UAA4BC,CAAmC,CAsB1E,YAAYpB,EAAoBqB,EAAkB,CAChD,MAAM,EAEN,IAAMC,EAAgBC,EAAW,cAAcvB,cAAwCqB,CAAM,EAC7F,GAAIC,EAAc,aAAa,EAAE,SAAWH,EAAoB,OAC9D,MAAM,IAAI,MAAM,+BAA+BA,EAAoB,MAAM,EAAE,EAG7E,KAAK,IAAMG,CACb,CAOA,OAAO,UAAgC,CACrC,IAAMtB,EAAWY,EAAU,MAAM,iBAAiB,EAClD,OAAO,IAAIO,EAAoBnB,EAAU,EAAK,CAChD,CAYA,OAAO,mBAAmBwB,EAAcC,EAAwC,CAC9E,GAAI,CAACC,EAAiBF,CAAI,EACxB,MAAM,IAAI,MAAM,2BAA2BA,CAAI,EAAE,EAEnD,OAAOL,EAAoB,wBAAwBK,EAAMG,EAAeF,CAAS,CAAC,CACpF,CAWA,OAAe,wBAAwBD,EAAcI,EAAuC,CAC1F,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAM,eAAeF,CAAI,EAAE,OAAOJ,CAAI,EAE7D,GAAIK,IAAe,KACjB,MAAM,IAAI,MAAM,aAAa,EAG/B,OAAO,IAAIV,EAAoBU,EAAY,EAAK,CAClD,CAaA,KAAKzB,EAAuC,CAC1C,IAAM2B,EAAgBxB,EAAsBH,CAAO,EAC7CI,EAAeN,EAAI,aAAa6B,CAAa,EAC7CC,EAAmBtB,EAASF,EAAa,aAAa,CAAC,EACvDH,EAAYO,EAAU,KAAKoB,EAAkB,KAAK,IAAI,aAAa,EAAG,CAAE,KAAM,EAAK,CAAC,EAC1F,OAAO,IAAIjB,EAAmBV,EAAU,kBAAkB,CAAC,CAC7D,CAOA,WAAgC,CAC9B,IAAMW,EAAQJ,EAAU,aAAa,KAAK,IAAI,aAAa,EAAG,EAAK,EACnE,OAAO,IAAIM,EAAmBF,CAAK,CACrC,CAOA,cAA2B,CACzB,OAAO,KAAK,IAAI,aAAa,CAC/B,CAOA,UAAmB,CACjB,OAAO,KAAK,YAAY,CAC1B,CAOA,aAAsB,CACpB,OAAO,KAAK,IAAI,SAAS,CAC3B,CASA,eAAwB,CACtB,OAAOO,EAAW,iBAAiB,KAAK,IAAI,SAAS,aAA+B,CACtF,CAMA,UAAUV,EAA8B,CACtCA,EAAW,eAAe,KAAK,aAAa,CAAC,CAC/C,CAEA,OAAO,YAAYC,EAAiD,CAClE,IAAME,EAAQF,EAAa,iBAAiB,EAC5C,OAAO,IAAIK,EAAoBH,EAAO,EAAK,CAC7C,CAWA,OAAO,aAAaa,EAA2D,CAC7E,OAAOA,aAAsBV,CAC/B,CACF,EA3KaA,EAIK,OAAiB,GAJ5B,IAAMc,EAANd,EAiLMe,EAAN,MAAMA,UAA2BC,CAAU,CAoBhD,YAAYnC,EAAoB,CAC9B,MAAM,EACN,IAAMoC,EAAOlC,EAAI,aAAaF,CAAQ,EACtC,GAAIoC,EAAK,aAAa,EAAE,SAAWF,EAAmB,OACpD,MAAM,IAAI,MACR,8BAA8BA,EAAmB,MAAM,cAAcE,EAAK,aAAa,EAAE,MAAM,EACjG,EAEF,KAAK,KAAOA,CACd,CAMA,cAA2B,CACzB,OAAO,KAAK,KAAK,aAAa,CAChC,CAMA,UAAUvB,EAA8B,CACtCA,EAAW,eAAe,KAAK,KAAK,aAAa,CAAC,CACpD,CAEA,OAAO,YAAYC,EAAgD,CACjE,IAAMb,EAAMa,EAAa,iBAAiB,EAC1C,OAAO,IAAIoB,EAAmBjC,CAAG,CACnC,CAGF,EArDaiC,EAKK,OAAS,GALpB,IAAMnB,EAANmB","names":["sha3_256","secp256k1","HDKey","_Secp256k1PublicKey","PublicKey","hexInput","hex","Hex","args","message","signature","messageToVerify","convertSigningMessage","messageBytes","messageSha3Bytes","sha3_256","signatureBytes","secp256k1","serializer","deserializer","Secp256k1Signature","bytes","publicKey","Secp256k1PublicKey","_Secp256k1PrivateKey","Serializable","strict","privateKeyHex","PrivateKey","path","mnemonics","isValidBIP44Path","mnemonicToSeed","seed","privateKey","HDKey","messageToSign","messageHashBytes","Secp256k1PrivateKey","_Secp256k1Signature","Signature","data"]}
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-D52UKPQF.mjs";function t(i,r){let l=r.bcsToBytes(),a=new e(l);return i.deserialize(a)}export{t as a};
2
- //# sourceMappingURL=chunk-UZTJWOLS.mjs.map
@@ -1,2 +0,0 @@
1
- var o="1.33.0";export{o as a};
2
- //# sourceMappingURL=chunk-YQHOQJRQ.mjs.map