@aptos-labs/ts-sdk 1.13.1-zeta.5 → 1.13.2

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 (478) hide show
  1. package/dist/common/index.d.ts +1399 -1821
  2. package/dist/common/index.js +26 -26
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/{Ed25519Account-8gJF5t3F.d.mts → Ed25519Account--qjfup2u.d.mts} +12 -10
  5. package/dist/esm/api/account.d.mts +1 -13
  6. package/dist/esm/api/account.mjs +1 -1
  7. package/dist/esm/api/ans.d.mts +2 -2
  8. package/dist/esm/api/ans.mjs +1 -1
  9. package/dist/esm/api/aptos.d.mts +8 -14
  10. package/dist/esm/api/aptos.mjs +1 -1
  11. package/dist/esm/api/aptosConfig.d.mts +0 -20
  12. package/dist/esm/api/aptosConfig.mjs +1 -1
  13. package/dist/esm/api/coin.d.mts +7 -7
  14. package/dist/esm/api/coin.mjs +1 -1
  15. package/dist/esm/api/digitalAsset.d.mts +1 -1
  16. package/dist/esm/api/digitalAsset.mjs +1 -1
  17. package/dist/esm/api/event.mjs +1 -1
  18. package/dist/esm/api/faucet.mjs +1 -1
  19. package/dist/esm/api/fungibleAsset.d.mts +5 -5
  20. package/dist/esm/api/fungibleAsset.mjs +1 -1
  21. package/dist/esm/api/general.d.mts +7 -7
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.d.mts +8 -13
  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 +1 -1
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/management.d.mts +8 -8
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  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 +6 -6
  36. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  38. package/dist/esm/api/utils.d.mts +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.d.mts +0 -2
  46. package/dist/esm/bcs/serializer.mjs +1 -1
  47. package/dist/esm/{chunk-MRTAMMS3.mjs → chunk-2PFN7LYP.mjs} +2 -2
  48. package/dist/esm/chunk-3426VLAZ.mjs +2 -0
  49. package/dist/esm/chunk-3426VLAZ.mjs.map +1 -0
  50. package/dist/esm/{chunk-PTIZKRON.mjs → chunk-3HV2C4SS.mjs} +2 -2
  51. package/dist/esm/chunk-3OCTOB2E.mjs +2 -0
  52. package/dist/esm/chunk-3OCTOB2E.mjs.map +1 -0
  53. package/dist/esm/{chunk-QJHFD2MT.mjs → chunk-3QBZU5ZD.mjs} +2 -2
  54. package/dist/esm/chunk-3QBZU5ZD.mjs.map +1 -0
  55. package/dist/esm/{chunk-GUWBE3CV.mjs → chunk-3RUY5FQK.mjs} +2 -2
  56. package/dist/esm/chunk-3RUY5FQK.mjs.map +1 -0
  57. package/dist/esm/{chunk-OJ4NIVFW.mjs → chunk-4DNVCOW7.mjs} +2 -2
  58. package/dist/esm/chunk-4DNVCOW7.mjs.map +1 -0
  59. package/dist/esm/{chunk-FFVWTX36.mjs → chunk-4LMAVPA4.mjs} +2 -2
  60. package/dist/esm/{chunk-TVRJ3M7B.mjs → chunk-52C73T26.mjs} +2 -2
  61. package/dist/esm/{chunk-TVRJ3M7B.mjs.map → chunk-52C73T26.mjs.map} +1 -1
  62. package/dist/esm/chunk-5HALZ6JC.mjs +2 -0
  63. package/dist/esm/chunk-5HALZ6JC.mjs.map +1 -0
  64. package/dist/esm/chunk-5OM4V4DR.mjs +2 -0
  65. package/dist/esm/chunk-5TMLAKSH.mjs +2 -0
  66. package/dist/esm/chunk-5TMLAKSH.mjs.map +1 -0
  67. package/dist/esm/{chunk-NCIRQZOJ.mjs → chunk-6IGEUEER.mjs} +2 -2
  68. package/dist/esm/{chunk-IGJCOZGO.mjs → chunk-6MG4JAYB.mjs} +2 -2
  69. package/dist/esm/{chunk-FYJMB23M.mjs → chunk-A556OVZY.mjs} +2 -2
  70. package/dist/esm/chunk-B252RJCU.mjs +2 -0
  71. package/dist/esm/{chunk-HTSXKHXX.mjs.map → chunk-B252RJCU.mjs.map} +1 -1
  72. package/dist/esm/{chunk-7PICPK26.mjs → chunk-BAV4XY7C.mjs} +2 -2
  73. package/dist/esm/{chunk-HGXO74Q3.mjs → chunk-BBU2EE6D.mjs} +2 -2
  74. package/dist/esm/{chunk-D4QQKQXJ.mjs → chunk-BRQYARQ3.mjs} +2 -2
  75. package/dist/esm/{chunk-MWUJCP27.mjs → chunk-BWFJHFBQ.mjs} +2 -2
  76. package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
  77. package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
  78. package/dist/esm/{chunk-3VGX3TXH.mjs → chunk-DMKUAQB7.mjs} +2 -2
  79. package/dist/esm/{chunk-MGOHPDX4.mjs → chunk-DSTKXJMA.mjs} +2 -2
  80. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  81. package/dist/esm/{chunk-W3UCKFFU.mjs → chunk-EJCKCYYI.mjs} +2 -2
  82. package/dist/esm/chunk-FO6ZKE7A.mjs +2 -0
  83. package/dist/esm/chunk-FO6ZKE7A.mjs.map +1 -0
  84. package/dist/esm/{chunk-EB7AI4B4.mjs → chunk-FS3NSGBF.mjs} +2 -2
  85. package/dist/esm/{chunk-JTCWZB3Q.mjs → chunk-FXNFWLQC.mjs} +2 -2
  86. package/dist/esm/chunk-GED6IT3S.mjs +1 -0
  87. package/dist/esm/chunk-GMQQSSEO.mjs +2 -0
  88. package/dist/esm/chunk-GMQQSSEO.mjs.map +1 -0
  89. package/dist/esm/chunk-GNQXMS53.mjs +2 -0
  90. package/dist/esm/chunk-GNQXMS53.mjs.map +1 -0
  91. package/dist/esm/{chunk-AZABJ5QQ.mjs → chunk-GRT5PHL6.mjs} +2 -2
  92. package/dist/esm/{chunk-DORK55K3.mjs → chunk-GS5J57UA.mjs} +2 -2
  93. package/dist/esm/chunk-GS5J57UA.mjs.map +1 -0
  94. package/dist/esm/{chunk-3HL2ZWKG.mjs → chunk-GXYS45Y5.mjs} +2 -2
  95. package/dist/esm/chunk-HLVMEUWD.mjs +2 -0
  96. package/dist/esm/chunk-HLVMEUWD.mjs.map +1 -0
  97. package/dist/esm/chunk-HQSLBTW5.mjs +2 -0
  98. package/dist/esm/chunk-HQSLBTW5.mjs.map +1 -0
  99. package/dist/esm/{chunk-T23OVRNF.mjs → chunk-IOSQVDZI.mjs} +2 -2
  100. package/dist/esm/chunk-IZT6OX3R.mjs +2 -0
  101. package/dist/esm/{chunk-GHVMDDWO.mjs.map → chunk-IZT6OX3R.mjs.map} +1 -1
  102. package/dist/esm/{chunk-VLUJRHOL.mjs → chunk-KDCHX7BI.mjs} +2 -2
  103. package/dist/esm/chunk-KHOHRD2B.mjs +2 -0
  104. package/dist/esm/chunk-KHOHRD2B.mjs.map +1 -0
  105. package/dist/esm/chunk-L6PGWGFF.mjs +2 -0
  106. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  107. package/dist/esm/chunk-LR65XHSF.mjs.map +1 -0
  108. package/dist/esm/{chunk-H5YTHO4L.mjs → chunk-LV2V23Z6.mjs} +2 -2
  109. package/dist/esm/chunk-LV2V23Z6.mjs.map +1 -0
  110. package/dist/esm/chunk-MLWIHWNH.mjs +1 -0
  111. package/dist/esm/chunk-MNBYKY5P.mjs +2 -0
  112. package/dist/esm/{chunk-FJH4H4E5.mjs.map → chunk-MNBYKY5P.mjs.map} +1 -1
  113. package/dist/esm/{chunk-7STYQ5ZE.mjs → chunk-NPFNYP75.mjs} +2 -2
  114. package/dist/esm/{chunk-UT37XKQU.mjs → chunk-OGHE4AQA.mjs} +2 -2
  115. package/dist/esm/chunk-OVJQWQ2N.mjs +2 -0
  116. package/dist/esm/chunk-OVJQWQ2N.mjs.map +1 -0
  117. package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
  118. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  119. package/dist/esm/{chunk-FVU47J7S.mjs → chunk-PIOHC246.mjs} +2 -2
  120. package/dist/esm/chunk-PIOHC246.mjs.map +1 -0
  121. package/dist/esm/{chunk-QI2ILOP4.mjs → chunk-PJLCPRYJ.mjs} +2 -2
  122. package/dist/esm/{chunk-6RBUXB5I.mjs → chunk-QIAHBEEW.mjs} +2 -2
  123. package/dist/esm/{chunk-NC5HHEEM.mjs → chunk-QTRYMRYK.mjs} +2 -2
  124. package/dist/esm/{chunk-Q5T2WL2M.mjs → chunk-QWRH22H4.mjs} +2 -2
  125. package/dist/esm/{chunk-STYDBDYL.mjs → chunk-R5QUBEH6.mjs} +2 -2
  126. package/dist/esm/chunk-R7G3CLRI.mjs +1 -0
  127. package/dist/esm/{chunk-ZNEBMSNC.mjs → chunk-RHBCVCOS.mjs} +2 -2
  128. package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
  129. package/dist/esm/chunk-ROXFCLDT.mjs.map +1 -0
  130. package/dist/esm/{chunk-LJ624HBI.mjs → chunk-RQEWIZ67.mjs} +2 -2
  131. package/dist/esm/{chunk-3FVRXELT.mjs → chunk-TBMAJ6AW.mjs} +2 -2
  132. package/dist/esm/{chunk-ZGTJMNZG.mjs → chunk-TC3VVMPY.mjs} +2 -2
  133. package/dist/esm/{chunk-YQOKWIVY.mjs → chunk-TGG7SWBO.mjs} +2 -2
  134. package/dist/esm/chunk-TGG7SWBO.mjs.map +1 -0
  135. package/dist/esm/{chunk-FEWIHUNW.mjs → chunk-TGXZVNR5.mjs} +2 -2
  136. package/dist/esm/{chunk-TTELTGMA.mjs → chunk-TORRTLWV.mjs} +2 -2
  137. package/dist/esm/chunk-TORRTLWV.mjs.map +1 -0
  138. package/dist/esm/chunk-TQR7M73S.mjs +2 -0
  139. package/dist/esm/chunk-TQR7M73S.mjs.map +1 -0
  140. package/dist/esm/{chunk-PFFAQZHT.mjs → chunk-U43IJHQN.mjs} +2 -2
  141. package/dist/esm/{chunk-GOT527V2.mjs → chunk-UMFJDDYI.mjs} +2 -2
  142. package/dist/esm/chunk-UMFJDDYI.mjs.map +1 -0
  143. package/dist/esm/{chunk-HGZGTBA4.mjs → chunk-UML2VQZT.mjs} +2 -2
  144. package/dist/esm/{chunk-47DNXBM6.mjs → chunk-UPIN5AIO.mjs} +2 -2
  145. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  146. package/dist/esm/chunk-VNO4VHJN.mjs +2 -0
  147. package/dist/esm/chunk-VNO4VHJN.mjs.map +1 -0
  148. package/dist/esm/chunk-WBOLHLPX.mjs +2 -0
  149. package/dist/esm/chunk-WBOLHLPX.mjs.map +1 -0
  150. package/dist/esm/{chunk-COW5IGYC.mjs → chunk-WFZDFFBM.mjs} +2 -2
  151. package/dist/esm/chunk-XDGQTMDV.mjs +2 -0
  152. package/dist/esm/chunk-XDGQTMDV.mjs.map +1 -0
  153. package/dist/esm/{chunk-XHPLLMR5.mjs → chunk-XLPVG4XR.mjs} +2 -2
  154. package/dist/esm/{chunk-YQUZLZL4.mjs → chunk-YBEF3UR3.mjs} +2 -2
  155. package/dist/esm/{chunk-4MHEB5MN.mjs → chunk-YKVKSNH4.mjs} +2 -2
  156. package/dist/esm/chunk-YVSU6GOA.mjs +2 -0
  157. package/dist/esm/chunk-YVSU6GOA.mjs.map +1 -0
  158. package/dist/esm/{chunk-C3L4ETUF.mjs → chunk-ZYYK3UXP.mjs} +2 -2
  159. package/dist/esm/client/core.mjs +1 -1
  160. package/dist/esm/client/get.d.mts +1 -2
  161. package/dist/esm/client/get.mjs +1 -1
  162. package/dist/esm/client/index.d.mts +2 -2
  163. package/dist/esm/client/index.mjs +1 -1
  164. package/dist/esm/client/post.d.mts +1 -3
  165. package/dist/esm/client/post.mjs +1 -1
  166. package/dist/esm/core/account/Account.d.mts +20 -0
  167. package/dist/esm/core/account/Account.mjs +2 -0
  168. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  169. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  170. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  171. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  172. package/dist/esm/core/account/index.d.mts +14 -5
  173. package/dist/esm/core/account/index.mjs +1 -1
  174. package/dist/esm/core/account/utils/address.mjs +1 -1
  175. package/dist/esm/core/account/utils/index.mjs +1 -1
  176. package/dist/esm/core/accountAddress.mjs +1 -1
  177. package/dist/esm/core/authenticationKey.mjs +1 -1
  178. package/dist/esm/core/crypto/ed25519.d.mts +10 -0
  179. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  180. package/dist/esm/core/crypto/hdKey.d.mts +1 -15
  181. package/dist/esm/core/crypto/hdKey.mjs +1 -1
  182. package/dist/esm/core/crypto/index.d.mts +5 -7
  183. package/dist/esm/core/crypto/index.mjs +1 -1
  184. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  185. package/dist/esm/core/crypto/multiKey.d.mts +3 -4
  186. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  187. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  188. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  189. package/dist/esm/core/crypto/signature.mjs +1 -1
  190. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  191. package/dist/esm/core/index.d.mts +7 -6
  192. package/dist/esm/core/index.mjs +1 -1
  193. package/dist/esm/index.d.mts +10 -15
  194. package/dist/esm/index.mjs +1 -1
  195. package/dist/esm/internal/account.d.mts +2 -14
  196. package/dist/esm/internal/account.mjs +1 -1
  197. package/dist/esm/internal/ans.d.mts +1 -1
  198. package/dist/esm/internal/ans.mjs +1 -1
  199. package/dist/esm/internal/coin.d.mts +7 -7
  200. package/dist/esm/internal/coin.mjs +1 -1
  201. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  202. package/dist/esm/internal/digitalAsset.mjs +1 -1
  203. package/dist/esm/internal/event.d.mts +1 -1
  204. package/dist/esm/internal/event.mjs +1 -1
  205. package/dist/esm/internal/faucet.d.mts +1 -1
  206. package/dist/esm/internal/faucet.mjs +1 -1
  207. package/dist/esm/internal/fungibleAsset.d.mts +5 -5
  208. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  209. package/dist/esm/internal/general.mjs +1 -1
  210. package/dist/esm/internal/staking.d.mts +1 -1
  211. package/dist/esm/internal/staking.mjs +1 -1
  212. package/dist/esm/internal/transaction.mjs +1 -1
  213. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  214. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  215. package/dist/esm/internal/view.d.mts +7 -7
  216. package/dist/esm/internal/view.mjs +1 -1
  217. package/dist/esm/transactions/authenticator/account.d.mts +4 -3
  218. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  219. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  220. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  221. package/dist/esm/transactions/index.d.mts +2 -2
  222. package/dist/esm/transactions/index.mjs +1 -1
  223. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  224. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  225. package/dist/esm/transactions/instances/index.mjs +1 -1
  226. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  227. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  228. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  229. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  231. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  232. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  233. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  234. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  235. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -13
  236. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  237. package/dist/esm/transactions/management/index.d.mts +2 -2
  238. package/dist/esm/transactions/management/index.mjs +1 -1
  239. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  240. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  241. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  242. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  243. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  244. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  245. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  246. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  247. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +25 -13
  248. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  249. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  250. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  251. package/dist/esm/transactions/types.d.mts +6 -6
  252. package/dist/esm/types/index.d.mts +3 -17
  253. package/dist/esm/types/index.mjs +1 -1
  254. package/dist/esm/utils/apiEndpoints.d.mts +1 -3
  255. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  256. package/dist/esm/utils/const.d.mts +1 -3
  257. package/dist/esm/utils/const.mjs +1 -1
  258. package/dist/esm/utils/index.d.mts +10 -1
  259. package/dist/esm/utils/index.mjs +1 -1
  260. package/dist/esm/utils/normalizeBundle.d.mts +23 -0
  261. package/dist/esm/utils/normalizeBundle.mjs +2 -0
  262. package/dist/esm/version.d.mts +1 -1
  263. package/dist/esm/version.mjs +1 -1
  264. package/package.json +3 -8
  265. package/src/api/account.ts +1 -2
  266. package/src/api/ans.ts +1 -2
  267. package/src/api/aptos.ts +0 -6
  268. package/src/api/aptosConfig.ts +1 -46
  269. package/src/api/digitalAsset.ts +1 -2
  270. package/src/api/fungibleAsset.ts +1 -2
  271. package/src/api/transaction.ts +1 -2
  272. package/src/api/transactionSubmission/management.ts +1 -1
  273. package/src/api/transactionSubmission/sign.ts +1 -1
  274. package/src/bcs/serializer.ts +0 -18
  275. package/src/client/core.ts +0 -8
  276. package/src/client/get.ts +0 -6
  277. package/src/client/post.ts +0 -12
  278. package/src/{account → core/account}/Account.ts +16 -12
  279. package/src/{account → core/account}/Ed25519Account.ts +7 -13
  280. package/src/{account → core/account}/SingleKeyAccount.ts +8 -13
  281. package/src/core/account/index.ts +3 -1
  282. package/src/core/crypto/ed25519.ts +24 -4
  283. package/src/core/crypto/hdKey.ts +0 -31
  284. package/src/core/crypto/index.ts +0 -2
  285. package/src/core/crypto/multiKey.ts +11 -21
  286. package/src/core/crypto/singleKey.ts +0 -11
  287. package/src/core/index.ts +1 -0
  288. package/src/index.ts +0 -1
  289. package/src/internal/account.ts +1 -1
  290. package/src/internal/ans.ts +1 -2
  291. package/src/internal/digitalAsset.ts +1 -2
  292. package/src/internal/fungibleAsset.ts +1 -2
  293. package/src/internal/transactionSubmission.ts +7 -8
  294. package/src/transactions/authenticator/account.ts +11 -6
  295. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  296. package/src/transactions/management/transactionWorker.ts +2 -8
  297. package/src/transactions/transactionBuilder/index.ts +0 -1
  298. package/src/transactions/transactionBuilder/transactionBuilder.ts +103 -76
  299. package/src/types/index.ts +0 -19
  300. package/src/utils/apiEndpoints.ts +0 -14
  301. package/src/utils/const.ts +0 -2
  302. package/src/utils/index.ts +1 -0
  303. package/src/utils/normalizeBundle.ts +21 -0
  304. package/src/version.ts +1 -1
  305. package/dist/esm/account/Account.d.mts +0 -34
  306. package/dist/esm/account/Account.mjs +0 -2
  307. package/dist/esm/account/Ed25519Account.d.mts +0 -34
  308. package/dist/esm/account/Ed25519Account.mjs +0 -2
  309. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -46
  310. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  311. package/dist/esm/account/KeylessAccount.d.mts +0 -87
  312. package/dist/esm/account/KeylessAccount.mjs +0 -2
  313. package/dist/esm/account/MultiKeyAccount.d.mts +0 -99
  314. package/dist/esm/account/MultiKeyAccount.mjs +0 -2
  315. package/dist/esm/account/SingleKeyAccount.d.mts +0 -34
  316. package/dist/esm/account/SingleKeyAccount.mjs +0 -2
  317. package/dist/esm/account/index.d.mts +0 -39
  318. package/dist/esm/account/index.mjs +0 -2
  319. package/dist/esm/api/keyless.d.mts +0 -65
  320. package/dist/esm/api/keyless.mjs +0 -2
  321. package/dist/esm/chunk-4MS27RPK.mjs +0 -2
  322. package/dist/esm/chunk-4VAQCOR6.mjs +0 -2
  323. package/dist/esm/chunk-4VAQCOR6.mjs.map +0 -1
  324. package/dist/esm/chunk-5VSMDXZ6.mjs +0 -2
  325. package/dist/esm/chunk-5VSMDXZ6.mjs.map +0 -1
  326. package/dist/esm/chunk-6GQAHQGW.mjs +0 -2
  327. package/dist/esm/chunk-6GQAHQGW.mjs.map +0 -1
  328. package/dist/esm/chunk-6M6XXPQQ.mjs +0 -2
  329. package/dist/esm/chunk-6M6XXPQQ.mjs.map +0 -1
  330. package/dist/esm/chunk-7JNPSNL6.mjs +0 -2
  331. package/dist/esm/chunk-7JNPSNL6.mjs.map +0 -1
  332. package/dist/esm/chunk-7QFBF7FS.mjs +0 -2
  333. package/dist/esm/chunk-7QFBF7FS.mjs.map +0 -1
  334. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  335. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  336. package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
  337. package/dist/esm/chunk-C3AEWQ3A.mjs +0 -2
  338. package/dist/esm/chunk-C3AEWQ3A.mjs.map +0 -1
  339. package/dist/esm/chunk-CYDWEPFL.mjs +0 -1
  340. package/dist/esm/chunk-CYDWEPFL.mjs.map +0 -1
  341. package/dist/esm/chunk-D73X3S27.mjs +0 -2
  342. package/dist/esm/chunk-D73X3S27.mjs.map +0 -1
  343. package/dist/esm/chunk-DORK55K3.mjs.map +0 -1
  344. package/dist/esm/chunk-E7HMV2GZ.mjs +0 -2
  345. package/dist/esm/chunk-E7HMV2GZ.mjs.map +0 -1
  346. package/dist/esm/chunk-FJH4H4E5.mjs +0 -2
  347. package/dist/esm/chunk-FLYEALDB.mjs +0 -2
  348. package/dist/esm/chunk-FLYEALDB.mjs.map +0 -1
  349. package/dist/esm/chunk-FTWBJZYH.mjs +0 -2
  350. package/dist/esm/chunk-FTWBJZYH.mjs.map +0 -1
  351. package/dist/esm/chunk-FVU47J7S.mjs.map +0 -1
  352. package/dist/esm/chunk-GHVMDDWO.mjs +0 -2
  353. package/dist/esm/chunk-GOT527V2.mjs.map +0 -1
  354. package/dist/esm/chunk-GUWBE3CV.mjs.map +0 -1
  355. package/dist/esm/chunk-H5YTHO4L.mjs.map +0 -1
  356. package/dist/esm/chunk-HTSXKHXX.mjs +0 -2
  357. package/dist/esm/chunk-IPH435RF.mjs +0 -2
  358. package/dist/esm/chunk-IPH435RF.mjs.map +0 -1
  359. package/dist/esm/chunk-JXCZTOYC.mjs +0 -1
  360. package/dist/esm/chunk-JXCZTOYC.mjs.map +0 -1
  361. package/dist/esm/chunk-KGJITNRZ.mjs +0 -2
  362. package/dist/esm/chunk-KGJITNRZ.mjs.map +0 -1
  363. package/dist/esm/chunk-KY3SB7JG.mjs +0 -2
  364. package/dist/esm/chunk-KY3SB7JG.mjs.map +0 -1
  365. package/dist/esm/chunk-L3OMI2PE.mjs +0 -2
  366. package/dist/esm/chunk-L3OMI2PE.mjs.map +0 -1
  367. package/dist/esm/chunk-LX2KX36Q.mjs +0 -2
  368. package/dist/esm/chunk-LX2KX36Q.mjs.map +0 -1
  369. package/dist/esm/chunk-MIMIRNUQ.mjs +0 -2
  370. package/dist/esm/chunk-MIMIRNUQ.mjs.map +0 -1
  371. package/dist/esm/chunk-MO5LGCZV.mjs +0 -2
  372. package/dist/esm/chunk-MO5LGCZV.mjs.map +0 -1
  373. package/dist/esm/chunk-MQ32XR4V.mjs +0 -2
  374. package/dist/esm/chunk-MQ32XR4V.mjs.map +0 -1
  375. package/dist/esm/chunk-OJ4NIVFW.mjs.map +0 -1
  376. package/dist/esm/chunk-OKRUEVF3.mjs +0 -2
  377. package/dist/esm/chunk-OKRUEVF3.mjs.map +0 -1
  378. package/dist/esm/chunk-OPCSBCGS.mjs +0 -2
  379. package/dist/esm/chunk-OPCSBCGS.mjs.map +0 -1
  380. package/dist/esm/chunk-PKENQYTQ.mjs +0 -2
  381. package/dist/esm/chunk-QJHFD2MT.mjs.map +0 -1
  382. package/dist/esm/chunk-R7BAM2G6.mjs +0 -2
  383. package/dist/esm/chunk-R7BAM2G6.mjs.map +0 -1
  384. package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
  385. package/dist/esm/chunk-RFSO3JRG.mjs.map +0 -1
  386. package/dist/esm/chunk-RQ6M2YQF.mjs +0 -2
  387. package/dist/esm/chunk-RQ6M2YQF.mjs.map +0 -1
  388. package/dist/esm/chunk-S5HG2QUD.mjs +0 -2
  389. package/dist/esm/chunk-S5HG2QUD.mjs.map +0 -1
  390. package/dist/esm/chunk-T7XMSCZV.mjs +0 -2
  391. package/dist/esm/chunk-T7XMSCZV.mjs.map +0 -1
  392. package/dist/esm/chunk-TTELTGMA.mjs.map +0 -1
  393. package/dist/esm/chunk-WPVBC4JS.mjs +0 -2
  394. package/dist/esm/chunk-WPVBC4JS.mjs.map +0 -1
  395. package/dist/esm/chunk-WTVN3XGK.mjs +0 -2
  396. package/dist/esm/chunk-WTVN3XGK.mjs.map +0 -1
  397. package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
  398. package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
  399. package/dist/esm/chunk-YQOKWIVY.mjs.map +0 -1
  400. package/dist/esm/core/crypto/ephemeral.d.mts +0 -77
  401. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  402. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  403. package/dist/esm/core/crypto/keyless.d.mts +0 -217
  404. package/dist/esm/core/crypto/keyless.mjs +0 -2
  405. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  406. package/dist/esm/core/crypto/poseidon.d.mts +0 -7
  407. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  408. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  409. package/dist/esm/internal/keyless.d.mts +0 -65
  410. package/dist/esm/internal/keyless.mjs +0 -2
  411. package/dist/esm/internal/keyless.mjs.map +0 -1
  412. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -47
  413. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +0 -2
  414. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +0 -1
  415. package/dist/esm/types/keyless.d.mts +0 -14
  416. package/dist/esm/types/keyless.mjs +0 -1
  417. package/dist/esm/types/keyless.mjs.map +0 -1
  418. package/src/account/EphemeralKeyPair.ts +0 -115
  419. package/src/account/KeylessAccount.ts +0 -240
  420. package/src/account/MultiKeyAccount.ts +0 -119
  421. package/src/account/index.ts +0 -6
  422. package/src/api/keyless.ts +0 -34
  423. package/src/core/crypto/ephemeral.ts +0 -149
  424. package/src/core/crypto/keyless.ts +0 -508
  425. package/src/core/crypto/poseidon.ts +0 -134
  426. package/src/internal/keyless.ts +0 -185
  427. package/src/transactions/transactionBuilder/signingMessage.ts +0 -70
  428. package/src/types/keyless.ts +0 -6
  429. /package/dist/esm/{chunk-MRTAMMS3.mjs.map → chunk-2PFN7LYP.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-PTIZKRON.mjs.map → chunk-3HV2C4SS.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-FFVWTX36.mjs.map → chunk-4LMAVPA4.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-PKENQYTQ.mjs.map → chunk-5OM4V4DR.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-NCIRQZOJ.mjs.map → chunk-6IGEUEER.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-IGJCOZGO.mjs.map → chunk-6MG4JAYB.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-FYJMB23M.mjs.map → chunk-A556OVZY.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-7PICPK26.mjs.map → chunk-BAV4XY7C.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-HGXO74Q3.mjs.map → chunk-BBU2EE6D.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-D4QQKQXJ.mjs.map → chunk-BRQYARQ3.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-MWUJCP27.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-3VGX3TXH.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-MGOHPDX4.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  442. /package/dist/esm/{account/Account.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-W3UCKFFU.mjs.map → chunk-EJCKCYYI.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-EB7AI4B4.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-JTCWZB3Q.mjs.map → chunk-FXNFWLQC.mjs.map} +0 -0
  446. /package/dist/esm/{account/Ed25519Account.mjs.map → chunk-GED6IT3S.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-AZABJ5QQ.mjs.map → chunk-GRT5PHL6.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-3HL2ZWKG.mjs.map → chunk-GXYS45Y5.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-T23OVRNF.mjs.map → chunk-IOSQVDZI.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-VLUJRHOL.mjs.map → chunk-KDCHX7BI.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-4MS27RPK.mjs.map → chunk-L6PGWGFF.mjs.map} +0 -0
  452. /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-MLWIHWNH.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-7STYQ5ZE.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-UT37XKQU.mjs.map → chunk-OGHE4AQA.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-QI2ILOP4.mjs.map → chunk-PJLCPRYJ.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-6RBUXB5I.mjs.map → chunk-QIAHBEEW.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-NC5HHEEM.mjs.map → chunk-QTRYMRYK.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-Q5T2WL2M.mjs.map → chunk-QWRH22H4.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-STYDBDYL.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  460. /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-R7G3CLRI.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-ZNEBMSNC.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-LJ624HBI.mjs.map → chunk-RQEWIZ67.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-3FVRXELT.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  464. /package/dist/esm/{chunk-ZGTJMNZG.mjs.map → chunk-TC3VVMPY.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-FEWIHUNW.mjs.map → chunk-TGXZVNR5.mjs.map} +0 -0
  466. /package/dist/esm/{chunk-PFFAQZHT.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  467. /package/dist/esm/{chunk-HGZGTBA4.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  468. /package/dist/esm/{chunk-47DNXBM6.mjs.map → chunk-UPIN5AIO.mjs.map} +0 -0
  469. /package/dist/esm/{account/MultiKeyAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  470. /package/dist/esm/{chunk-COW5IGYC.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  471. /package/dist/esm/{chunk-XHPLLMR5.mjs.map → chunk-XLPVG4XR.mjs.map} +0 -0
  472. /package/dist/esm/{chunk-YQUZLZL4.mjs.map → chunk-YBEF3UR3.mjs.map} +0 -0
  473. /package/dist/esm/{chunk-4MHEB5MN.mjs.map → chunk-YKVKSNH4.mjs.map} +0 -0
  474. /package/dist/esm/{chunk-C3L4ETUF.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  475. /package/dist/esm/{account/SingleKeyAccount.mjs.map → core/account/Account.mjs.map} +0 -0
  476. /package/dist/esm/{account/index.mjs.map → core/account/Ed25519Account.mjs.map} +0 -0
  477. /package/dist/esm/{api/keyless.mjs.map → core/account/SingleKeyAccount.mjs.map} +0 -0
  478. /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → utils/normalizeBundle.mjs.map} +0 -0
@@ -3,14 +3,7 @@
3
3
 
4
4
  import aptosClient from "@aptos-labs/aptos-client";
5
5
  import { AptosSettings, ClientConfig, Client, FullNodeConfig, IndexerConfig, FaucetConfig } from "../types";
6
- import {
7
- NetworkToNodeAPI,
8
- NetworkToFaucetAPI,
9
- NetworkToIndexerAPI,
10
- Network,
11
- NetworkToPepperAPI,
12
- NetworkToProverAPI,
13
- } from "../utils/apiEndpoints";
6
+ import { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from "../utils/apiEndpoints";
14
7
  import { AptosApiType } from "../utils/const";
15
8
 
16
9
  /**
@@ -41,16 +34,6 @@ export class AptosConfig {
41
34
  */
42
35
  readonly faucet?: string;
43
36
 
44
- /**
45
- * The optional hardcoded pepper service URL to send requests to instead of using the network
46
- */
47
- readonly pepper?: string;
48
-
49
- /**
50
- * The optional hardcoded prover service URL to send requests to instead of using the network
51
- */
52
- readonly prover?: string;
53
-
54
37
  /**
55
38
  * The optional hardcoded indexer URL to send requests to instead of using the network
56
39
  */
@@ -80,8 +63,6 @@ export class AptosConfig {
80
63
  this.network = settings?.network ?? Network.DEVNET;
81
64
  this.fullnode = settings?.fullnode;
82
65
  this.faucet = settings?.faucet;
83
- this.pepper = settings?.pepper;
84
- this.prover = settings?.prover;
85
66
  this.indexer = settings?.indexer;
86
67
  this.client = settings?.client ?? { provider: aptosClient };
87
68
  this.clientConfig = settings?.clientConfig ?? {};
@@ -114,34 +95,8 @@ export class AptosConfig {
114
95
  if (this.indexer !== undefined) return this.indexer;
115
96
  if (this.network === Network.CUSTOM) throw new Error("Please provide a custom indexer url");
116
97
  return NetworkToIndexerAPI[this.network];
117
- case AptosApiType.PEPPER:
118
- if (this.pepper !== undefined) return this.pepper;
119
- if (this.network === Network.CUSTOM) throw new Error("Please provide a custom pepper service url");
120
- return NetworkToPepperAPI[this.network];
121
- case AptosApiType.PROVER:
122
- if (this.prover !== undefined) return this.prover;
123
- if (this.network === Network.CUSTOM) throw new Error("Please provide a custom prover service url");
124
- return NetworkToProverAPI[this.network];
125
98
  default:
126
99
  throw Error(`apiType ${apiType} is not supported`);
127
100
  }
128
101
  }
129
-
130
- /**
131
- * Checks if the URL is a known pepper service endpoint
132
- *
133
- * @internal
134
- * */
135
- isPepperServiceRequest(url: string): boolean {
136
- return NetworkToPepperAPI[this.network] === url;
137
- }
138
-
139
- /**
140
- * Checks if the URL is a known prover service endpoint
141
- *
142
- * @internal
143
- * */
144
- isProverServiceRequest(url: string): boolean {
145
- return NetworkToProverAPI[this.network] === url;
146
- }
147
102
  }
@@ -13,8 +13,7 @@ import {
13
13
  PaginationArgs,
14
14
  TokenStandardArg,
15
15
  } from "../types";
16
- import { AccountAddress, AccountAddressInput } from "../core";
17
- import { Account } from "../account";
16
+ import { Account, AccountAddress, AccountAddressInput } from "../core";
18
17
  import { InputGenerateTransactionOptions } from "../transactions/types";
19
18
  import {
20
19
  addDigitalAssetPropertyTransaction,
@@ -23,8 +23,7 @@ import {
23
23
  import { ProcessorType } from "../utils/const";
24
24
  import { AptosConfig } from "./aptosConfig";
25
25
  import { waitForIndexerOnVersion } from "./utils";
26
- import { Account } from "../account";
27
- import { AccountAddressInput } from "../core";
26
+ import { Account, AccountAddressInput } from "../core";
28
27
  import { InputGenerateTransactionOptions } from "../transactions";
29
28
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
30
29
 
@@ -33,8 +33,7 @@ import {
33
33
  InputGenerateTransactionOptions,
34
34
  InputGenerateTransactionPayloadData,
35
35
  } from "../transactions";
36
- import { AccountAddressInput, PrivateKey } from "../core";
37
- import { Account } from "../account";
36
+ import { AccountAddressInput, Account, PrivateKey } from "../core";
38
37
  import { Build } from "./transactionSubmission/build";
39
38
  import { Simulate } from "./transactionSubmission/simulate";
40
39
  import { Submit } from "./transactionSubmission/submit";
@@ -2,7 +2,7 @@ import EventEmitter from "eventemitter3";
2
2
  import { TransactionWorkerEvents, TransactionWorker, TransactionWorkerEventsEnum } from "../../transactions/management";
3
3
  import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions";
4
4
  import { AptosConfig } from "../aptosConfig";
5
- import { Account } from "../../account";
5
+ import { Account } from "../../core";
6
6
 
7
7
  export class TransactionManagement extends EventEmitter<TransactionWorkerEvents> {
8
8
  account!: Account;
@@ -1,7 +1,7 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { Account } from "../../account";
4
+ import { Account } from "../../core";
5
5
  import { signTransaction } from "../../internal/transactionSubmission";
6
6
  import { AccountAuthenticator, AnyRawTransaction } from "../../transactions";
7
7
  import { AptosConfig } from "../aptosConfig";
@@ -316,24 +316,6 @@ export class Serializer {
316
316
  item.serialize(this);
317
317
  });
318
318
  }
319
-
320
- serializeOption<T extends Serializable>(value?: T): void {
321
- if (value === undefined) {
322
- this.serializeU32AsUleb128(0);
323
- } else {
324
- this.serializeU32AsUleb128(1);
325
- value.serialize(this);
326
- }
327
- }
328
-
329
- serializeOptionStr(value?: string): void {
330
- if (value === undefined) {
331
- this.serializeU32AsUleb128(0);
332
- } else {
333
- this.serializeU32AsUleb128(1);
334
- this.serializeStr(value);
335
- }
336
- }
337
319
  }
338
320
 
339
321
  export function ensureBoolean(value: unknown): asserts value is boolean {
@@ -106,14 +106,6 @@ export async function aptosRequest<Req extends {}, Res extends {}>(
106
106
  return result;
107
107
  }
108
108
 
109
- if (result.status >= 500) {
110
- throw new AptosApiError(options, result, `${response.data}`);
111
- }
112
-
113
- if (aptosConfig.isPepperServiceRequest(url)) {
114
- throw new AptosApiError(options, result, `${response.data}`);
115
- }
116
-
117
109
  let errorMessage: string;
118
110
 
119
111
  if (result && result.data && "message" in result.data && "error_code" in result.data) {
package/src/client/get.ts CHANGED
@@ -89,12 +89,6 @@ export async function getAptosFullNode<Req extends {}, Res extends {}>(
89
89
  });
90
90
  }
91
91
 
92
- export async function getAptosPepperService<Req extends {}, Res extends {}>(
93
- options: GetAptosRequestOptions,
94
- ): Promise<AptosResponse<Req, Res>> {
95
- return get<Req, Res>({ ...options, type: AptosApiType.PEPPER });
96
- }
97
-
98
92
  /// This function is a helper for paginating using a function wrapping an API
99
93
  export async function paginateWithCursor<Req extends Record<string, any>, Res extends Array<{}>>(
100
94
  options: GetAptosRequestOptions,
@@ -135,15 +135,3 @@ export async function postAptosFaucet<Req extends {}, Res extends {}>(
135
135
  },
136
136
  });
137
137
  }
138
-
139
- export async function postAptosPepperService<Req extends {}, Res extends {}>(
140
- options: PostAptosRequestOptions,
141
- ): Promise<AptosResponse<Req, Res>> {
142
- return post<Req, Res>({ ...options, type: AptosApiType.PEPPER });
143
- }
144
-
145
- export async function postAptosProvingService<Req extends {}, Res extends {}>(
146
- options: PostAptosRequestOptions,
147
- ): Promise<AptosResponse<Req, Res>> {
148
- return post<Req, Res>({ ...options, type: AptosApiType.PROVER });
149
- }
@@ -1,11 +1,10 @@
1
- import type { AccountAuthenticator } from "../transactions/authenticator/account";
2
- import { HexInput, SigningScheme, SigningSchemeInput } from "../types";
3
- import type { AccountAddress, AccountAddressInput } from "../core/accountAddress";
4
- import { AuthenticationKey } from "../core/authenticationKey";
5
- import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../core/crypto";
1
+ import type { AccountAuthenticator } from "../../transactions/authenticator/account";
2
+ import { HexInput, SigningScheme, SigningSchemeInput } from "../../types";
3
+ import type { AccountAddress, AccountAddressInput } from "../accountAddress";
4
+ import { AuthenticationKey } from "../authenticationKey";
5
+ import { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from "../crypto";
6
6
  import { Ed25519Account } from "./Ed25519Account";
7
7
  import { SingleKeyAccount } from "./SingleKeyAccount";
8
- import { AnyRawTransaction } from "../transactions/types";
9
8
 
10
9
  /**
11
10
  * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.
@@ -107,6 +106,13 @@ export interface PrivateKeyFromDerivationPathArgs {
107
106
  * Note: Generating an account instance does not create the account on-chain.
108
107
  */
109
108
  export abstract class Account {
109
+ /**
110
+ * Private key associated with the account.
111
+ * Note: this will be removed in the next major release,
112
+ * as not all accounts have a private key.
113
+ */
114
+ abstract readonly privateKey: PrivateKey;
115
+
110
116
  /**
111
117
  * Public key associated with the account
112
118
  */
@@ -216,11 +222,11 @@ export abstract class Account {
216
222
  }
217
223
 
218
224
  /**
219
- * Sign a transaction using the available signing capabilities.
220
- * @param transaction the raw transaction
221
- * @return the AccountAuthenticator containing the signature og the transaction, together with the account's public key
225
+ * Sign a message using the available signing capabilities.
226
+ * @param message the signing message, as binary input
227
+ * @return the AccountAuthenticator containing the signature, together with the account's public key
222
228
  */
223
- abstract signWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;
229
+ abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;
224
230
 
225
231
  /**
226
232
  * Sign the given message with the private key.
@@ -229,8 +235,6 @@ export abstract class Account {
229
235
  */
230
236
  abstract sign(message: HexInput): Signature;
231
237
 
232
- abstract signTransaction(transaction: AnyRawTransaction): Signature;
233
-
234
238
  /**
235
239
  * @param args.message raw message data in HexInput format
236
240
  * @param args.signature signed message signature
@@ -1,10 +1,8 @@
1
- import { AccountAuthenticatorEd25519 } from "../transactions/authenticator/account";
2
- import { HexInput, SigningScheme } from "../types";
3
- import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
4
- import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../core/crypto";
1
+ import { AccountAuthenticatorEd25519 } from "../../transactions/authenticator/account";
2
+ import { HexInput, SigningScheme } from "../../types";
3
+ import { AccountAddress, AccountAddressInput } from "../accountAddress";
4
+ import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from "../crypto";
5
5
  import type { Account } from "./Account";
6
- import { AnyRawTransaction } from "../transactions/types";
7
- import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
8
6
 
9
7
  export interface Ed25519SignerConstructorArgs {
10
8
  privateKey: Ed25519PrivateKey;
@@ -77,17 +75,13 @@ export class Ed25519Account implements Account {
77
75
  return this.publicKey.verifySignature(args);
78
76
  }
79
77
 
80
- signWithAuthenticator(transaction: AnyRawTransaction) {
81
- const signature = this.privateKey.sign(generateSigningMessageForTransaction(transaction));
78
+ signWithAuthenticator(message: HexInput) {
79
+ const signature = this.privateKey.sign(message);
82
80
  return new AccountAuthenticatorEd25519(this.publicKey, signature);
83
81
  }
84
82
 
85
83
  sign(message: HexInput) {
86
- return this.privateKey.sign(message);
87
- }
88
-
89
- signTransaction(transaction: AnyRawTransaction) {
90
- return this.sign(generateSigningMessageForTransaction(transaction));
84
+ return this.signWithAuthenticator(message).signature;
91
85
  }
92
86
 
93
87
  // endregion
@@ -1,10 +1,8 @@
1
- import { AccountAuthenticatorSingleKey } from "../transactions/authenticator/account";
2
- import { type HexInput, SigningScheme, SigningSchemeInput } from "../types";
3
- import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
4
- import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../core/crypto";
1
+ import { AccountAuthenticatorSingleKey } from "../../transactions/authenticator/account";
2
+ import { type HexInput, SigningScheme, SigningSchemeInput } from "../../types";
3
+ import { AccountAddress, AccountAddressInput } from "../accountAddress";
4
+ import { AnyPublicKey, AnySignature, Ed25519PrivateKey, PrivateKey, Secp256k1PrivateKey } from "../crypto";
5
5
  import type { Account } from "./Account";
6
- import { generateSigningMessageForTransaction } from "../transactions/transactionBuilder/signingMessage";
7
- import { AnyRawTransaction } from "../transactions/types";
8
6
 
9
7
  export interface SingleKeySignerConstructorArgs {
10
8
  privateKey: PrivateKey;
@@ -108,17 +106,14 @@ export class SingleKeyAccount implements Account {
108
106
  return this.publicKey.verifySignature(args);
109
107
  }
110
108
 
111
- signWithAuthenticator(transaction: AnyRawTransaction) {
112
- const signature = this.sign(generateSigningMessageForTransaction(transaction));
109
+ signWithAuthenticator(message: HexInput) {
110
+ const innerSignature = this.privateKey.sign(message);
111
+ const signature = new AnySignature(innerSignature);
113
112
  return new AccountAuthenticatorSingleKey(this.publicKey, signature);
114
113
  }
115
114
 
116
115
  sign(message: HexInput) {
117
- return new AnySignature(this.privateKey.sign(message));
118
- }
119
-
120
- signTransaction(transaction: AnyRawTransaction) {
121
- return this.sign(generateSigningMessageForTransaction(transaction));
116
+ return this.signWithAuthenticator(message).signature;
122
117
  }
123
118
 
124
119
  // endregion
@@ -1,2 +1,4 @@
1
+ export * from "./Ed25519Account";
2
+ export * from "./Account";
3
+ export * from "./SingleKeyAccount";
1
4
  export * from "./utils";
2
-
@@ -7,7 +7,7 @@ import { Serializable, Serializer } from "../../bcs/serializer";
7
7
  import { AuthenticationKey } from "../authenticationKey";
8
8
  import { Hex } from "../hex";
9
9
  import { HexInput, SigningScheme as AuthenticationKeyScheme } from "../../types";
10
- import { isValidHardenedPath, fromDerivationPath as fromDerivationPathInner, mnemonicToSeed } from "./hdKey";
10
+ import { CKDPriv, deriveKey, HARDENED_OFFSET, isValidHardenedPath, mnemonicToSeed, splitPath } from "./hdKey";
11
11
  import { PrivateKey } from "./privateKey";
12
12
  import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
13
13
  import { Signature } from "./signature";
@@ -185,9 +185,29 @@ export class Ed25519PrivateKey extends Serializable implements PrivateKey {
185
185
  if (!isValidHardenedPath(path)) {
186
186
  throw new Error(`Invalid derivation path ${path}`);
187
187
  }
188
- return new Ed25519PrivateKey(
189
- fromDerivationPathInner(path, Ed25519PrivateKey.SLIP_0010_SEED, mnemonicToSeed(mnemonics)),
190
- );
188
+ return Ed25519PrivateKey.fromDerivationPathInner(path, mnemonicToSeed(mnemonics));
189
+ }
190
+
191
+ /**
192
+ * A private inner function so we can separate from the main fromDerivationPath() method
193
+ * to add tests to verify we create the keys correctly.
194
+ *
195
+ * @param path the BIP44 path
196
+ * @param seed the seed phrase created by the mnemonics
197
+ * @param offset the offset used for key derivation, defaults to 0x80000000
198
+ * @returns
199
+ */
200
+ private static fromDerivationPathInner(path: string, seed: Uint8Array, offset = HARDENED_OFFSET): Ed25519PrivateKey {
201
+ const { key, chainCode } = deriveKey(Ed25519PrivateKey.SLIP_0010_SEED, seed);
202
+
203
+ const segments = splitPath(path).map((el) => parseInt(el, 10));
204
+
205
+ // Derive the child key based on the path
206
+ const { key: privateKey } = segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), {
207
+ key,
208
+ chainCode,
209
+ });
210
+ return new Ed25519PrivateKey(privateKey);
191
211
  }
192
212
 
193
213
  // endregion
@@ -4,7 +4,6 @@
4
4
  import { hmac } from "@noble/hashes/hmac";
5
5
  import { sha512 } from "@noble/hashes/sha512";
6
6
  import * as bip39 from "@scure/bip39";
7
- import { HexInput } from "../../types";
8
7
 
9
8
  export type DerivedKeys = {
10
9
  key: Uint8Array;
@@ -16,7 +15,6 @@ export type DerivedKeys = {
16
15
  */
17
16
  export const APTOS_HARDENED_REGEX = /^m\/44'\/637'\/[0-9]+'\/[0-9]+'\/[0-9]+'?$/;
18
17
  export const APTOS_BIP44_REGEX = /^m\/44'\/637'\/[0-9]+'\/[0-9]+\/[0-9]+$/;
19
- export const APTOS_BIP44_DEFAULT_DERIVATION_PATH = "m/44'/637'/0'/0'/0'";
20
18
 
21
19
  /**
22
20
  * A list of supported key types and associated seeds
@@ -93,35 +91,6 @@ const removeApostrophes = (val: string): string => val.replace("'", "");
93
91
  */
94
92
  export const splitPath = (path: string): Array<string> => path.split("/").slice(1).map(removeApostrophes);
95
93
 
96
- /**
97
- * @param path the BIP44 path
98
- * @param seed the seed phrase created by the mnemonics
99
- * @param offset the offset used for key derivation, defaults to 0x80000000
100
- * @returns
101
- */
102
- export function fromDerivationPath(
103
- path: string,
104
- hashSeed: HexInput,
105
- seed: Uint8Array,
106
- offset = HARDENED_OFFSET,
107
- ): Uint8Array {
108
- if (offset === HARDENED_OFFSET && !isValidHardenedPath(path)) {
109
- throw new Error(`Invalid hardened derivation path ${path}`);
110
- } else if (offset !== HARDENED_OFFSET && !isValidBIP44Path(path)) {
111
- throw new Error(`Invalid derivation path ${path}`);
112
- }
113
- const { key, chainCode } = deriveKey(hashSeed, seed);
114
-
115
- const segments = splitPath(path).map((el) => parseInt(el, 10));
116
-
117
- // Derive the child key based on the path
118
- const { key: privateKey } = segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), {
119
- key,
120
- chainCode,
121
- });
122
- return privateKey;
123
- }
124
-
125
94
  /**
126
95
  * Normalizes the mnemonic by removing extra whitespace and making it lowercase
127
96
  * @param mnemonic the mnemonic seed phrase
@@ -5,8 +5,6 @@ export * from "./ed25519";
5
5
  export * from "./hdKey";
6
6
  export * from "./multiEd25519";
7
7
  export * from "./multiKey";
8
- export * from "./ephemeral";
9
- export * from "./keyless";
10
8
  export * from "./privateKey";
11
9
  export * from "./publicKey";
12
10
  export * from "./secp256k1";
@@ -139,19 +139,9 @@ export class MultiKey extends AccountPublicKey {
139
139
 
140
140
  return bitmap;
141
141
  }
142
-
143
- getIndex(publicKey: PublicKey): number {
144
- const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey);
145
- const index = this.publicKeys.findIndex((pk) => pk.toString() === anyPublicKey.toString());
146
-
147
- if (index !== -1) {
148
- return index;
149
- }
150
- throw new Error("Public key not found in MultiKey");
151
- }
152
142
  }
153
143
 
154
- export class MultiSignature extends Signature {
144
+ export class MultiKeySignature extends Signature {
155
145
  /**
156
146
  * Number of bytes in the bitmap representing who signed the transaction (32-bits)
157
147
  */
@@ -160,7 +150,7 @@ export class MultiSignature extends Signature {
160
150
  /**
161
151
  * Maximum number of Ed25519 signatures supported
162
152
  */
163
- static MAX_SIGNATURES_SUPPORTED = MultiSignature.BITMAP_LEN * 8;
153
+ static MAX_SIGNATURES_SUPPORTED = MultiKeySignature.BITMAP_LEN * 8;
164
154
 
165
155
  /**
166
156
  * The list of underlying Ed25519 signatures
@@ -188,8 +178,8 @@ export class MultiSignature extends Signature {
188
178
  super();
189
179
  const { signatures, bitmap } = args;
190
180
 
191
- if (signatures.length > MultiSignature.MAX_SIGNATURES_SUPPORTED) {
192
- throw new Error(`The number of signatures cannot be greater than ${MultiSignature.MAX_SIGNATURES_SUPPORTED}`);
181
+ if (signatures.length > MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
182
+ throw new Error(`The number of signatures cannot be greater than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED}`);
193
183
  }
194
184
 
195
185
  // Make sure that all signatures are normalized to the SingleKey authentication scheme
@@ -198,9 +188,9 @@ export class MultiSignature extends Signature {
198
188
  );
199
189
 
200
190
  if (!(bitmap instanceof Uint8Array)) {
201
- this.bitmap = MultiSignature.createBitmap({ bits: bitmap });
202
- } else if (bitmap.length !== MultiSignature.BITMAP_LEN) {
203
- throw new Error(`"bitmap" length should be ${MultiSignature.BITMAP_LEN}`);
191
+ this.bitmap = MultiKeySignature.createBitmap({ bits: bitmap });
192
+ } else if (bitmap.length !== MultiKeySignature.BITMAP_LEN) {
193
+ throw new Error(`"bitmap" length should be ${MultiKeySignature.BITMAP_LEN}`);
204
194
  } else {
205
195
  this.bitmap = bitmap;
206
196
  }
@@ -236,8 +226,8 @@ export class MultiSignature extends Signature {
236
226
  const dupCheckSet = new Set();
237
227
 
238
228
  bits.forEach((bit: number) => {
239
- if (bit >= MultiSignature.MAX_SIGNATURES_SUPPORTED) {
240
- throw new Error(`Cannot have a signature larger than ${MultiSignature.MAX_SIGNATURES_SUPPORTED - 1}.`);
229
+ if (bit >= MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {
230
+ throw new Error(`Cannot have a signature larger than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED - 1}.`);
241
231
  }
242
232
 
243
233
  if (dupCheckSet.has(bit)) {
@@ -275,7 +265,7 @@ export class MultiSignature extends Signature {
275
265
  serializer.serializeBytes(this.bitmap);
276
266
  }
277
267
 
278
- static deserialize(deserializer: Deserializer): MultiSignature {
268
+ static deserialize(deserializer: Deserializer): MultiKeySignature {
279
269
  const bitmap = deserializer.deserializeBytes();
280
270
  const nSignatures = bitmap.reduce((acc, byte) => acc + bitCount(byte), 0);
281
271
  const signatures: AnySignature[] = [];
@@ -283,7 +273,7 @@ export class MultiSignature extends Signature {
283
273
  const signature = AnySignature.deserialize(deserializer);
284
274
  signatures.push(signature);
285
275
  }
286
- return new MultiSignature({ signatures, bitmap });
276
+ return new MultiKeySignature({ signatures, bitmap });
287
277
  }
288
278
 
289
279
  // endregion
@@ -4,7 +4,6 @@ import { AuthenticationKey } from "../authenticationKey";
4
4
  import { Ed25519PublicKey, Ed25519Signature } from "./ed25519";
5
5
  import { AccountPublicKey, PublicKey, VerifySignatureArgs } from "./publicKey";
6
6
  import { Secp256k1PublicKey, Secp256k1Signature } from "./secp256k1";
7
- import { KeylessPublicKey, KeylessSignature } from "./keyless";
8
7
  import { Signature } from "./signature";
9
8
 
10
9
  /**
@@ -35,8 +34,6 @@ export class AnyPublicKey extends AccountPublicKey {
35
34
  this.variant = AnyPublicKeyVariant.Ed25519;
36
35
  } else if (publicKey instanceof Secp256k1PublicKey) {
37
36
  this.variant = AnyPublicKeyVariant.Secp256k1;
38
- } else if (publicKey instanceof KeylessPublicKey) {
39
- this.variant = AnyPublicKeyVariant.Keyless;
40
37
  } else {
41
38
  throw new Error("Unsupported public key type");
42
39
  }
@@ -88,9 +85,6 @@ export class AnyPublicKey extends AccountPublicKey {
88
85
  case AnyPublicKeyVariant.Secp256k1:
89
86
  publicKey = Secp256k1PublicKey.deserialize(deserializer);
90
87
  break;
91
- case AnyPublicKeyVariant.Keyless:
92
- publicKey = KeylessPublicKey.deserialize(deserializer);
93
- break;
94
88
  default:
95
89
  throw new Error(`Unknown variant index for AnyPublicKey: ${variantIndex}`);
96
90
  }
@@ -144,8 +138,6 @@ export class AnySignature extends Signature {
144
138
  this.variant = AnySignatureVariant.Ed25519;
145
139
  } else if (signature instanceof Secp256k1Signature) {
146
140
  this.variant = AnySignatureVariant.Secp256k1;
147
- } else if (signature instanceof KeylessSignature) {
148
- this.variant = AnySignatureVariant.Keyless;
149
141
  } else {
150
142
  throw new Error("Unsupported signature type");
151
143
  }
@@ -178,9 +170,6 @@ export class AnySignature extends Signature {
178
170
  case AnySignatureVariant.Secp256k1:
179
171
  signature = Secp256k1Signature.deserialize(deserializer);
180
172
  break;
181
- case AnySignatureVariant.Keyless:
182
- signature = KeylessSignature.deserialize(deserializer);
183
- break;
184
173
  default:
185
174
  throw new Error(`Unknown variant index for AnySignature: ${variantIndex}`);
186
175
  }
package/src/core/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ export * from "./account";
4
5
  export * from "./accountAddress";
5
6
  export * from "./authenticationKey";
6
7
  export * from "./common";
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export * from "./account";
5
4
  export * from "./api";
6
5
  export * from "./bcs";
7
6
  export * from "./client";
@@ -11,7 +11,7 @@
11
11
  import { AptosConfig } from "../api/aptosConfig";
12
12
  import { AptosApiError, getAptosFullNode, paginateWithCursor } from "../client";
13
13
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
14
- import { Account } from "../account";
14
+ import { Account } from "../core/account";
15
15
  import { AnyPublicKey, Ed25519PublicKey, PrivateKey } from "../core/crypto";
16
16
  import { getTableItem, queryIndexer } from "./general";
17
17
  import {
@@ -9,8 +9,7 @@
9
9
  */
10
10
 
11
11
  import { AptosConfig } from "../api/aptosConfig";
12
- import { Account } from "../account";
13
- import { AccountAddress, AccountAddressInput } from "../core";
12
+ import { Account, AccountAddress, AccountAddressInput } from "../core";
14
13
  import { InputGenerateTransactionOptions } from "../transactions/types";
15
14
  import { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from "../types";
16
15
  import { GetNamesQuery } from "../types/generated/operations";
@@ -10,8 +10,7 @@
10
10
 
11
11
  import { AptosConfig } from "../api/aptosConfig";
12
12
  import { Bool, MoveString, MoveVector, U64 } from "../bcs";
13
- import { AccountAddress, AccountAddressInput } from "../core";
14
- import { Account } from "../account";
13
+ import { Account, AccountAddress, AccountAddressInput } from "../core";
15
14
  import { EntryFunctionABI, InputGenerateTransactionOptions } from "../transactions/types";
16
15
  import {
17
16
  AnyNumber,
@@ -33,8 +33,7 @@ import {
33
33
  FungibleAssetActivitiesBoolExp,
34
34
  FungibleAssetMetadataBoolExp,
35
35
  } from "../types/generated/types";
36
- import { AccountAddressInput } from "../core";
37
- import { Account } from "../account";
36
+ import { Account, AccountAddressInput } from "../core";
38
37
  import {
39
38
  EntryFunctionABI,
40
39
  InputGenerateTransactionOptions,