@aptos-labs/ts-sdk 1.17.0-zeta.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/dist/common/{accountAddress-jP2Ua0t9.d.ts → accountAddress-ccLvlUQe.d.ts} +5 -97
  2. package/dist/common/chunk-KSEUZTKY.js +2 -0
  3. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/index.d.ts +117 -837
  7. package/dist/common/index.js +28 -28
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/{Ed25519Account-9zBaZEnp.d.mts → Ed25519Account-B1VMJOY2.d.mts} +1 -1
  10. package/dist/esm/account/Account.d.mts +2 -2
  11. package/dist/esm/account/Account.mjs +1 -1
  12. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  13. package/dist/esm/account/Ed25519Account.mjs +1 -1
  14. package/dist/esm/account/MultiKeyAccount.d.mts +7 -13
  15. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  16. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  17. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  18. package/dist/esm/account/index.d.mts +2 -9
  19. package/dist/esm/account/index.mjs +1 -1
  20. package/dist/esm/api/account.d.mts +3 -3
  21. package/dist/esm/api/account.mjs +1 -1
  22. package/dist/esm/api/ans.d.mts +4 -4
  23. package/dist/esm/api/ans.mjs +1 -1
  24. package/dist/esm/api/aptos.d.mts +3 -12
  25. package/dist/esm/api/aptos.mjs +1 -1
  26. package/dist/esm/api/aptosConfig.d.mts +0 -20
  27. package/dist/esm/api/aptosConfig.mjs +1 -1
  28. package/dist/esm/api/coin.d.mts +3 -3
  29. package/dist/esm/api/coin.mjs +1 -1
  30. package/dist/esm/api/digitalAsset.d.mts +4 -4
  31. package/dist/esm/api/digitalAsset.mjs +1 -1
  32. package/dist/esm/api/event.mjs +1 -1
  33. package/dist/esm/api/faucet.mjs +1 -1
  34. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  35. package/dist/esm/api/fungibleAsset.mjs +1 -1
  36. package/dist/esm/api/general.d.mts +1 -1
  37. package/dist/esm/api/general.mjs +1 -1
  38. package/dist/esm/api/index.d.mts +2 -10
  39. package/dist/esm/api/index.mjs +1 -1
  40. package/dist/esm/api/staking.mjs +1 -1
  41. package/dist/esm/api/table.mjs +1 -1
  42. package/dist/esm/api/transaction.d.mts +2 -2
  43. package/dist/esm/api/transaction.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/build.d.mts +3 -3
  45. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  46. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  47. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  48. package/dist/esm/api/transactionSubmission/sign.d.mts +4 -4
  49. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  50. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  51. package/dist/esm/api/transactionSubmission/simulate.d.mts +3 -3
  52. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  53. package/dist/esm/api/transactionSubmission/submit.d.mts +3 -3
  54. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  55. package/dist/esm/api/utils.mjs +1 -1
  56. package/dist/esm/bcs/deserializer.d.mts +0 -32
  57. package/dist/esm/bcs/deserializer.mjs +1 -1
  58. package/dist/esm/bcs/index.mjs +1 -1
  59. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  60. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  61. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  62. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  63. package/dist/esm/bcs/serializer.d.mts +0 -42
  64. package/dist/esm/bcs/serializer.mjs +1 -1
  65. package/dist/esm/{chunk-HXYZECGS.mjs → chunk-2HF2XEHO.mjs} +2 -2
  66. package/dist/esm/{chunk-BO44HPGU.mjs → chunk-2X7A4HUS.mjs} +2 -2
  67. package/dist/esm/{chunk-LDQJ5S77.mjs → chunk-337U6Q6K.mjs} +2 -2
  68. package/dist/esm/{chunk-TUCCV62K.mjs → chunk-35EWRSDK.mjs} +2 -2
  69. package/dist/esm/{chunk-UMLUOYFK.mjs → chunk-36QXVFR5.mjs} +2 -2
  70. package/dist/esm/{chunk-UMLUOYFK.mjs.map → chunk-36QXVFR5.mjs.map} +1 -1
  71. package/dist/esm/{chunk-64VPA7CM.mjs → chunk-3BNA74V5.mjs} +2 -2
  72. package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
  73. package/dist/esm/chunk-3JPVQHOR.mjs.map +1 -0
  74. package/dist/esm/chunk-3N6N3KOS.mjs +2 -0
  75. package/dist/esm/{chunk-HP6YVTTT.mjs.map → chunk-3N6N3KOS.mjs.map} +1 -1
  76. package/dist/esm/{chunk-LIT6V2A6.mjs → chunk-3SPIFLBZ.mjs} +2 -2
  77. package/dist/esm/{chunk-GQC73XWZ.mjs → chunk-3XFID2N4.mjs} +2 -2
  78. package/dist/esm/{chunk-IPFITPKC.mjs → chunk-47IIBESV.mjs} +2 -2
  79. package/dist/esm/{chunk-T5YEMU53.mjs → chunk-4GWNWSZP.mjs} +2 -2
  80. package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
  81. package/dist/esm/chunk-53INTTOI.mjs +2 -0
  82. package/dist/esm/{chunk-EFMAZTIM.mjs → chunk-5EN52MUT.mjs} +2 -2
  83. package/dist/esm/{chunk-QFVQSFBZ.mjs → chunk-5UKBTF7N.mjs} +2 -2
  84. package/dist/esm/chunk-6IFMQ5AS.mjs +2 -0
  85. package/dist/esm/chunk-6IFMQ5AS.mjs.map +1 -0
  86. package/dist/esm/{chunk-UHZWZWJ7.mjs → chunk-6YV3366Z.mjs} +2 -2
  87. package/dist/esm/{chunk-DJPYZIJY.mjs → chunk-73QJNN7O.mjs} +2 -2
  88. package/dist/esm/chunk-746MU2AB.mjs +2 -0
  89. package/dist/esm/chunk-746MU2AB.mjs.map +1 -0
  90. package/dist/esm/chunk-AF5WNJOP.mjs +2 -0
  91. package/dist/esm/{chunk-YRUF6N3U.mjs → chunk-AHW3SKT7.mjs} +2 -2
  92. package/dist/esm/chunk-AQAH67IV.mjs +2 -0
  93. package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
  94. package/dist/esm/{chunk-64CUEMFI.mjs → chunk-BBVIJO6X.mjs} +2 -2
  95. package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
  96. package/dist/esm/{chunk-WIYDJE6F.mjs → chunk-BEVXJJJF.mjs} +2 -2
  97. package/dist/esm/chunk-BRVWHCP3.mjs +2 -0
  98. package/dist/esm/{chunk-2G4IGSGM.mjs.map → chunk-BRVWHCP3.mjs.map} +1 -1
  99. package/dist/esm/chunk-BSVNV6SJ.mjs +2 -0
  100. package/dist/esm/{chunk-SYRND55P.mjs → chunk-CE65OKFI.mjs} +2 -2
  101. package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
  102. package/dist/esm/{chunk-GBQU2OCK.mjs → chunk-CT2BQQTZ.mjs} +2 -2
  103. package/dist/esm/chunk-CYNQRMO5.mjs +2 -0
  104. package/dist/esm/chunk-CYNQRMO5.mjs.map +1 -0
  105. package/dist/esm/{chunk-YA4XTZNZ.mjs → chunk-CZOD4SCZ.mjs} +2 -2
  106. package/dist/esm/chunk-D2LNQMKD.mjs +2 -0
  107. package/dist/esm/chunk-D2LNQMKD.mjs.map +1 -0
  108. package/dist/esm/chunk-DLAIJ2UM.mjs +2 -0
  109. package/dist/esm/chunk-DLAIJ2UM.mjs.map +1 -0
  110. package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
  111. package/dist/esm/{chunk-O7VXANBW.mjs → chunk-FAFJKSVZ.mjs} +2 -2
  112. package/dist/esm/{chunk-7G3RSOWE.mjs → chunk-G2UPF44Z.mjs} +2 -2
  113. package/dist/esm/{chunk-ZIDLP5MI.mjs → chunk-G2XVNF2T.mjs} +2 -2
  114. package/dist/esm/{chunk-FGGRPEQ3.mjs → chunk-G56GPLTB.mjs} +2 -2
  115. package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
  116. package/dist/esm/{chunk-IXFYYWAC.mjs → chunk-GM56MMNJ.mjs} +2 -2
  117. package/dist/esm/{chunk-S5ABQH5R.mjs → chunk-HLC4HAYY.mjs} +2 -2
  118. package/dist/esm/chunk-HYCGMFC2.mjs +2 -0
  119. package/dist/esm/chunk-HYCGMFC2.mjs.map +1 -0
  120. package/dist/esm/chunk-IENCDVPF.mjs +2 -0
  121. package/dist/esm/chunk-IENCDVPF.mjs.map +1 -0
  122. package/dist/esm/{chunk-FNFQA7NS.mjs → chunk-ISIUQQMV.mjs} +2 -2
  123. package/dist/esm/{chunk-JZOTXY77.mjs → chunk-J4VNDDKJ.mjs} +2 -2
  124. package/dist/esm/{chunk-MNTLX37G.mjs → chunk-J4Z6XR5D.mjs} +2 -2
  125. package/dist/esm/{chunk-5WFKJO5L.mjs → chunk-J5I4OZAS.mjs} +2 -2
  126. package/dist/esm/{chunk-X4X5H6NC.mjs → chunk-J6HKAEKY.mjs} +2 -2
  127. package/dist/esm/{chunk-YDNOKWV3.mjs → chunk-JX75UKJX.mjs} +2 -2
  128. package/dist/esm/{chunk-DPWEHSHH.mjs → chunk-KAGLWBIJ.mjs} +2 -2
  129. package/dist/esm/{chunk-X3HGM2KT.mjs → chunk-KZZWY4YI.mjs} +2 -2
  130. package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
  131. package/dist/esm/{chunk-FSO54CI4.mjs → chunk-LGNSPATO.mjs} +2 -2
  132. package/dist/esm/{chunk-SNDFJWYM.mjs → chunk-MCRRHBFQ.mjs} +2 -2
  133. package/dist/esm/chunk-MM5VMKFE.mjs +2 -0
  134. package/dist/esm/chunk-MM5VMKFE.mjs.map +1 -0
  135. package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
  136. package/dist/esm/{chunk-GPWSPT44.mjs → chunk-ND6OMSQU.mjs} +2 -2
  137. package/dist/esm/{chunk-BT6IM25V.mjs → chunk-NUK6JT5I.mjs} +2 -2
  138. package/dist/esm/chunk-OWW6SIDP.mjs +2 -0
  139. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  140. package/dist/esm/chunk-PF57EOJY.mjs +2 -0
  141. package/dist/esm/{chunk-ZV5MKFV7.mjs → chunk-PIVZMT5D.mjs} +2 -2
  142. package/dist/esm/{chunk-FR6UGCOX.mjs → chunk-PZ4SAXY7.mjs} +2 -2
  143. package/dist/esm/chunk-PZ4SAXY7.mjs.map +1 -0
  144. package/dist/esm/{chunk-F3ZVWLDH.mjs → chunk-QRS4DGP3.mjs} +2 -2
  145. package/dist/esm/{chunk-F3ZVWLDH.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
  146. package/dist/esm/{chunk-W63KIXLK.mjs → chunk-R5VVKRJ2.mjs} +2 -2
  147. package/dist/esm/{chunk-7M4C4OZN.mjs → chunk-RNL5TAQT.mjs} +2 -2
  148. package/dist/esm/chunk-ROXFCLDT.mjs +2 -0
  149. package/dist/esm/{chunk-B2RYTKNN.mjs → chunk-RPND23OR.mjs} +2 -2
  150. package/dist/esm/chunk-RTSWVT2Q.mjs +2 -0
  151. package/dist/esm/chunk-RTSWVT2Q.mjs.map +1 -0
  152. package/dist/esm/{chunk-XH33BXEY.mjs → chunk-RWXHA4QZ.mjs} +2 -2
  153. package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
  154. package/dist/esm/{chunk-IBN7ETCB.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
  155. package/dist/esm/chunk-SUAMDMAA.mjs +2 -0
  156. package/dist/esm/{chunk-3SACE4I2.mjs.map → chunk-SUAMDMAA.mjs.map} +1 -1
  157. package/dist/esm/{chunk-XVZBWW46.mjs → chunk-T2AGN5YT.mjs} +2 -2
  158. package/dist/esm/{chunk-HGJMVOBH.mjs → chunk-TQLED4KC.mjs} +2 -2
  159. package/dist/esm/{chunk-MLX6DFMR.mjs → chunk-U3YYSIIT.mjs} +2 -2
  160. package/dist/esm/chunk-UGPALAPN.mjs +2 -0
  161. package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
  162. package/dist/esm/chunk-UTKM2WYS.mjs +2 -0
  163. package/dist/esm/chunk-UTKM2WYS.mjs.map +1 -0
  164. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  165. package/dist/esm/chunk-W33BZ6IQ.mjs +2 -0
  166. package/dist/esm/chunk-W33BZ6IQ.mjs.map +1 -0
  167. package/dist/esm/{chunk-UVTJEMV4.mjs → chunk-YR7JRJ25.mjs} +2 -2
  168. package/dist/esm/{chunk-7UKBRLGM.mjs → chunk-ZHCSSCC5.mjs} +2 -2
  169. package/dist/esm/{chunk-L5ZHZWHI.mjs → chunk-ZRKXS7XG.mjs} +2 -2
  170. package/dist/esm/cli/index.mjs +1 -1
  171. package/dist/esm/cli/localNode.mjs +1 -1
  172. package/dist/esm/client/core.mjs +1 -1
  173. package/dist/esm/client/get.d.mts +1 -8
  174. package/dist/esm/client/get.mjs +1 -1
  175. package/dist/esm/client/index.d.mts +2 -2
  176. package/dist/esm/client/index.mjs +1 -1
  177. package/dist/esm/client/post.d.mts +1 -9
  178. package/dist/esm/client/post.mjs +1 -1
  179. package/dist/esm/client/types.mjs +1 -1
  180. package/dist/esm/core/account/index.mjs +1 -1
  181. package/dist/esm/core/account/utils/address.mjs +1 -1
  182. package/dist/esm/core/account/utils/index.mjs +1 -1
  183. package/dist/esm/core/accountAddress.mjs +1 -1
  184. package/dist/esm/core/authenticationKey.d.mts +1 -1
  185. package/dist/esm/core/authenticationKey.mjs +1 -1
  186. package/dist/esm/core/common.mjs +1 -1
  187. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  188. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  189. package/dist/esm/core/crypto/index.d.mts +1 -7
  190. package/dist/esm/core/crypto/index.mjs +1 -1
  191. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  192. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  193. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  194. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  195. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  196. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  197. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  198. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  199. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  200. package/dist/esm/core/crypto/signature.mjs +1 -1
  201. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  202. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  203. package/dist/esm/core/crypto/utils.mjs +1 -1
  204. package/dist/esm/core/hex.mjs +1 -1
  205. package/dist/esm/core/index.d.mts +1 -7
  206. package/dist/esm/core/index.mjs +1 -1
  207. package/dist/esm/index.d.mts +6 -14
  208. package/dist/esm/index.mjs +1 -1
  209. package/dist/esm/internal/account.d.mts +2 -2
  210. package/dist/esm/internal/account.mjs +1 -1
  211. package/dist/esm/internal/ans.d.mts +2 -2
  212. package/dist/esm/internal/ans.mjs +1 -1
  213. package/dist/esm/internal/coin.d.mts +1 -1
  214. package/dist/esm/internal/coin.mjs +1 -1
  215. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  216. package/dist/esm/internal/digitalAsset.mjs +1 -1
  217. package/dist/esm/internal/event.mjs +1 -1
  218. package/dist/esm/internal/faucet.mjs +1 -1
  219. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  220. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  221. package/dist/esm/internal/general.mjs +1 -1
  222. package/dist/esm/internal/staking.mjs +1 -1
  223. package/dist/esm/internal/table.mjs +1 -1
  224. package/dist/esm/internal/transaction.mjs +1 -1
  225. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  226. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  227. package/dist/esm/internal/view.d.mts +1 -1
  228. package/dist/esm/internal/view.mjs +1 -1
  229. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  230. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  231. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  232. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  233. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  234. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  235. package/dist/esm/transactions/index.d.mts +1 -1
  236. package/dist/esm/transactions/index.mjs +1 -1
  237. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  238. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  239. package/dist/esm/transactions/instances/index.d.mts +1 -1
  240. package/dist/esm/transactions/instances/index.mjs +1 -1
  241. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  242. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  243. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  244. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  245. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  246. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  247. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  248. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  249. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  250. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  251. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  252. package/dist/esm/transactions/management/index.d.mts +2 -2
  253. package/dist/esm/transactions/management/index.mjs +1 -1
  254. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  255. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  256. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  257. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  258. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  259. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  260. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  261. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  262. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -4
  263. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  264. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  265. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  266. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  267. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  268. package/dist/esm/transactions/types.d.mts +1 -1
  269. package/dist/esm/types/index.d.mts +5 -21
  270. package/dist/esm/types/index.mjs +1 -1
  271. package/dist/esm/utils/apiEndpoints.d.mts +1 -3
  272. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  273. package/dist/esm/utils/const.d.mts +1 -3
  274. package/dist/esm/utils/const.mjs +1 -1
  275. package/dist/esm/utils/helpers.d.mts +1 -4
  276. package/dist/esm/utils/helpers.mjs +1 -1
  277. package/dist/esm/utils/index.d.mts +1 -1
  278. package/dist/esm/utils/index.mjs +1 -1
  279. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  280. package/package.json +4 -11
  281. package/src/account/MultiKeyAccount.ts +0 -11
  282. package/src/account/index.ts +0 -2
  283. package/src/api/aptos.ts +0 -6
  284. package/src/api/aptosConfig.ts +1 -46
  285. package/src/bcs/deserializer.ts +0 -46
  286. package/src/bcs/serializer.ts +0 -58
  287. package/src/client/core.ts +0 -4
  288. package/src/client/get.ts +0 -12
  289. package/src/client/post.ts +0 -18
  290. package/src/core/crypto/index.ts +0 -2
  291. package/src/core/crypto/singleKey.ts +0 -11
  292. package/src/internal/transactionSubmission.ts +1 -6
  293. package/src/transactions/management/accountSequenceNumber.ts +8 -5
  294. package/src/transactions/transactionBuilder/signingMessage.ts +1 -4
  295. package/src/transactions/transactionBuilder/transactionBuilder.ts +1 -17
  296. package/src/types/index.ts +2 -24
  297. package/src/utils/apiEndpoints.ts +0 -16
  298. package/src/utils/const.ts +0 -2
  299. package/src/utils/helpers.ts +0 -22
  300. package/dist/common/chunk-BHKSQXUZ.js +0 -2
  301. package/dist/common/chunk-BHKSQXUZ.js.map +0 -1
  302. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -90
  303. package/dist/esm/account/EphemeralKeyPair.mjs +0 -2
  304. package/dist/esm/account/KeylessAccount.d.mts +0 -211
  305. package/dist/esm/account/KeylessAccount.mjs +0 -2
  306. package/dist/esm/api/keyless.d.mts +0 -85
  307. package/dist/esm/api/keyless.mjs +0 -2
  308. package/dist/esm/api/keyless.mjs.map +0 -1
  309. package/dist/esm/chunk-2G4IGSGM.mjs +0 -2
  310. package/dist/esm/chunk-37FFZSIM.mjs +0 -2
  311. package/dist/esm/chunk-37FFZSIM.mjs.map +0 -1
  312. package/dist/esm/chunk-3IFR6T3V.mjs +0 -2
  313. package/dist/esm/chunk-3IFR6T3V.mjs.map +0 -1
  314. package/dist/esm/chunk-3RJZNUCQ.mjs +0 -2
  315. package/dist/esm/chunk-3SACE4I2.mjs +0 -2
  316. package/dist/esm/chunk-472OGHMG.mjs +0 -2
  317. package/dist/esm/chunk-4CUDBBTC.mjs +0 -2
  318. package/dist/esm/chunk-4CUDBBTC.mjs.map +0 -1
  319. package/dist/esm/chunk-4VPCPASN.mjs +0 -2
  320. package/dist/esm/chunk-54LCK6EN.mjs +0 -2
  321. package/dist/esm/chunk-54LCK6EN.mjs.map +0 -1
  322. package/dist/esm/chunk-7BW2N4IE.mjs +0 -2
  323. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  324. package/dist/esm/chunk-7Z6DYLCA.mjs.map +0 -1
  325. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  326. package/dist/esm/chunk-AQ4I7VVB.mjs.map +0 -1
  327. package/dist/esm/chunk-BCZGONNO.mjs +0 -2
  328. package/dist/esm/chunk-BCZGONNO.mjs.map +0 -1
  329. package/dist/esm/chunk-BLWJZXAD.mjs +0 -2
  330. package/dist/esm/chunk-BLWJZXAD.mjs.map +0 -1
  331. package/dist/esm/chunk-CPDSBH23.mjs +0 -2
  332. package/dist/esm/chunk-CPDSBH23.mjs.map +0 -1
  333. package/dist/esm/chunk-EHL3WIK3.mjs +0 -2
  334. package/dist/esm/chunk-EHL3WIK3.mjs.map +0 -1
  335. package/dist/esm/chunk-FBPNHF54.mjs +0 -2
  336. package/dist/esm/chunk-FIG65OJD.mjs +0 -2
  337. package/dist/esm/chunk-FR6UGCOX.mjs.map +0 -1
  338. package/dist/esm/chunk-GRHLQDHF.mjs +0 -2
  339. package/dist/esm/chunk-GSCM444Z.mjs +0 -2
  340. package/dist/esm/chunk-HP6YVTTT.mjs +0 -2
  341. package/dist/esm/chunk-IBDBKQMF.mjs +0 -2
  342. package/dist/esm/chunk-IBDBKQMF.mjs.map +0 -1
  343. package/dist/esm/chunk-IBN7ETCB.mjs +0 -2
  344. package/dist/esm/chunk-IT7YNITU.mjs +0 -2
  345. package/dist/esm/chunk-IVVWQKCF.mjs +0 -2
  346. package/dist/esm/chunk-IVVWQKCF.mjs.map +0 -1
  347. package/dist/esm/chunk-J3DCBYOY.mjs +0 -2
  348. package/dist/esm/chunk-J3DCBYOY.mjs.map +0 -1
  349. package/dist/esm/chunk-L5CPAOUM.mjs +0 -2
  350. package/dist/esm/chunk-L5CPAOUM.mjs.map +0 -1
  351. package/dist/esm/chunk-NMD45OTM.mjs +0 -2
  352. package/dist/esm/chunk-NMD45OTM.mjs.map +0 -1
  353. package/dist/esm/chunk-NW3WUTTD.mjs +0 -2
  354. package/dist/esm/chunk-Q6LFIZ3L.mjs +0 -2
  355. package/dist/esm/chunk-Q6LFIZ3L.mjs.map +0 -1
  356. package/dist/esm/chunk-QSMVCD52.mjs +0 -2
  357. package/dist/esm/chunk-QSMVCD52.mjs.map +0 -1
  358. package/dist/esm/chunk-R2TZZVTU.mjs +0 -2
  359. package/dist/esm/chunk-R2TZZVTU.mjs.map +0 -1
  360. package/dist/esm/chunk-SCHZ67F3.mjs +0 -2
  361. package/dist/esm/chunk-SCHZ67F3.mjs.map +0 -1
  362. package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
  363. package/dist/esm/chunk-U3S4AX6K.mjs +0 -2
  364. package/dist/esm/chunk-U3S4AX6K.mjs.map +0 -1
  365. package/dist/esm/chunk-U5F4NL24.mjs +0 -2
  366. package/dist/esm/chunk-VIX4BX35.mjs +0 -2
  367. package/dist/esm/chunk-VIX4BX35.mjs.map +0 -1
  368. package/dist/esm/chunk-WA2NTBYY.mjs +0 -2
  369. package/dist/esm/chunk-YD5IB4TH.mjs +0 -2
  370. package/dist/esm/chunk-YD5IB4TH.mjs.map +0 -1
  371. package/dist/esm/chunk-YE5B2S5L.mjs +0 -2
  372. package/dist/esm/chunk-YE5B2S5L.mjs.map +0 -1
  373. package/dist/esm/chunk-YTQVMLFD.mjs +0 -2
  374. package/dist/esm/chunk-YTQVMLFD.mjs.map +0 -1
  375. package/dist/esm/core/crypto/cryptoHashable.d.mts +0 -21
  376. package/dist/esm/core/crypto/cryptoHashable.mjs +0 -2
  377. package/dist/esm/core/crypto/cryptoHashable.mjs.map +0 -1
  378. package/dist/esm/core/crypto/ephemeral.d.mts +0 -73
  379. package/dist/esm/core/crypto/ephemeral.mjs +0 -2
  380. package/dist/esm/core/crypto/ephemeral.mjs.map +0 -1
  381. package/dist/esm/core/crypto/keyless.d.mts +0 -321
  382. package/dist/esm/core/crypto/keyless.mjs +0 -2
  383. package/dist/esm/core/crypto/keyless.mjs.map +0 -1
  384. package/dist/esm/core/crypto/poseidon.d.mts +0 -19
  385. package/dist/esm/core/crypto/poseidon.mjs +0 -2
  386. package/dist/esm/core/crypto/poseidon.mjs.map +0 -1
  387. package/dist/esm/core/crypto/proof.d.mts +0 -21
  388. package/dist/esm/core/crypto/proof.mjs +0 -2
  389. package/dist/esm/core/crypto/proof.mjs.map +0 -1
  390. package/dist/esm/internal/keyless.d.mts +0 -73
  391. package/dist/esm/internal/keyless.mjs +0 -2
  392. package/dist/esm/internal/keyless.mjs.map +0 -1
  393. package/dist/esm/types/keyless.d.mts +0 -52
  394. package/dist/esm/types/keyless.mjs +0 -1
  395. package/dist/esm/types/keyless.mjs.map +0 -1
  396. package/src/account/EphemeralKeyPair.ts +0 -158
  397. package/src/account/KeylessAccount.ts +0 -367
  398. package/src/api/keyless.ts +0 -51
  399. package/src/core/crypto/cryptoHashable.ts +0 -16
  400. package/src/core/crypto/ephemeral.ts +0 -138
  401. package/src/core/crypto/keyless.ts +0 -679
  402. package/src/core/crypto/poseidon.ts +0 -144
  403. package/src/core/crypto/proof.ts +0 -16
  404. package/src/internal/keyless.ts +0 -121
  405. package/src/types/keyless.ts +0 -42
  406. /package/dist/esm/{chunk-HXYZECGS.mjs.map → chunk-2HF2XEHO.mjs.map} +0 -0
  407. /package/dist/esm/{chunk-BO44HPGU.mjs.map → chunk-2X7A4HUS.mjs.map} +0 -0
  408. /package/dist/esm/{chunk-LDQJ5S77.mjs.map → chunk-337U6Q6K.mjs.map} +0 -0
  409. /package/dist/esm/{chunk-TUCCV62K.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
  410. /package/dist/esm/{chunk-64VPA7CM.mjs.map → chunk-3BNA74V5.mjs.map} +0 -0
  411. /package/dist/esm/{chunk-LIT6V2A6.mjs.map → chunk-3SPIFLBZ.mjs.map} +0 -0
  412. /package/dist/esm/{chunk-GQC73XWZ.mjs.map → chunk-3XFID2N4.mjs.map} +0 -0
  413. /package/dist/esm/{chunk-IPFITPKC.mjs.map → chunk-47IIBESV.mjs.map} +0 -0
  414. /package/dist/esm/{chunk-T5YEMU53.mjs.map → chunk-4GWNWSZP.mjs.map} +0 -0
  415. /package/dist/esm/{chunk-WA2NTBYY.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
  416. /package/dist/esm/{chunk-472OGHMG.mjs.map → chunk-53INTTOI.mjs.map} +0 -0
  417. /package/dist/esm/{chunk-EFMAZTIM.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
  418. /package/dist/esm/{chunk-QFVQSFBZ.mjs.map → chunk-5UKBTF7N.mjs.map} +0 -0
  419. /package/dist/esm/{chunk-UHZWZWJ7.mjs.map → chunk-6YV3366Z.mjs.map} +0 -0
  420. /package/dist/esm/{chunk-DJPYZIJY.mjs.map → chunk-73QJNN7O.mjs.map} +0 -0
  421. /package/dist/esm/{chunk-FIG65OJD.mjs.map → chunk-AF5WNJOP.mjs.map} +0 -0
  422. /package/dist/esm/{chunk-YRUF6N3U.mjs.map → chunk-AHW3SKT7.mjs.map} +0 -0
  423. /package/dist/esm/{chunk-U5F4NL24.mjs.map → chunk-AQAH67IV.mjs.map} +0 -0
  424. /package/dist/esm/{chunk-GSCM444Z.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
  425. /package/dist/esm/{chunk-64CUEMFI.mjs.map → chunk-BBVIJO6X.mjs.map} +0 -0
  426. /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
  427. /package/dist/esm/{chunk-WIYDJE6F.mjs.map → chunk-BEVXJJJF.mjs.map} +0 -0
  428. /package/dist/esm/{chunk-IT7YNITU.mjs.map → chunk-BSVNV6SJ.mjs.map} +0 -0
  429. /package/dist/esm/{chunk-SYRND55P.mjs.map → chunk-CE65OKFI.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-7BW2N4IE.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-GBQU2OCK.mjs.map → chunk-CT2BQQTZ.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-YA4XTZNZ.mjs.map → chunk-CZOD4SCZ.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-O7VXANBW.mjs.map → chunk-FAFJKSVZ.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-7G3RSOWE.mjs.map → chunk-G2UPF44Z.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-ZIDLP5MI.mjs.map → chunk-G2XVNF2T.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-FGGRPEQ3.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-IXFYYWAC.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-S5ABQH5R.mjs.map → chunk-HLC4HAYY.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-FNFQA7NS.mjs.map → chunk-ISIUQQMV.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-JZOTXY77.mjs.map → chunk-J4VNDDKJ.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-MNTLX37G.mjs.map → chunk-J4Z6XR5D.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-5WFKJO5L.mjs.map → chunk-J5I4OZAS.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-X4X5H6NC.mjs.map → chunk-J6HKAEKY.mjs.map} +0 -0
  446. /package/dist/esm/{chunk-YDNOKWV3.mjs.map → chunk-JX75UKJX.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-DPWEHSHH.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-X3HGM2KT.mjs.map → chunk-KZZWY4YI.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-FSO54CI4.mjs.map → chunk-LGNSPATO.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-SNDFJWYM.mjs.map → chunk-MCRRHBFQ.mjs.map} +0 -0
  452. /package/dist/esm/{chunk-GRHLQDHF.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-GPWSPT44.mjs.map → chunk-ND6OMSQU.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-BT6IM25V.mjs.map → chunk-NUK6JT5I.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-NW3WUTTD.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-ZV5MKFV7.mjs.map → chunk-PIVZMT5D.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-W63KIXLK.mjs.map → chunk-R5VVKRJ2.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-7M4C4OZN.mjs.map → chunk-RNL5TAQT.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-3RJZNUCQ.mjs.map → chunk-ROXFCLDT.mjs.map} +0 -0
  460. /package/dist/esm/{chunk-B2RYTKNN.mjs.map → chunk-RPND23OR.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-XH33BXEY.mjs.map → chunk-RWXHA4QZ.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-XVZBWW46.mjs.map → chunk-T2AGN5YT.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-HGJMVOBH.mjs.map → chunk-TQLED4KC.mjs.map} +0 -0
  464. /package/dist/esm/{chunk-MLX6DFMR.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-4VPCPASN.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
  466. /package/dist/esm/{account/EphemeralKeyPair.mjs.map → chunk-UO3NZ5AH.mjs.map} +0 -0
  467. /package/dist/esm/{account/KeylessAccount.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  468. /package/dist/esm/{chunk-UVTJEMV4.mjs.map → chunk-YR7JRJ25.mjs.map} +0 -0
  469. /package/dist/esm/{chunk-7UKBRLGM.mjs.map → chunk-ZHCSSCC5.mjs.map} +0 -0
  470. /package/dist/esm/{chunk-L5ZHZWHI.mjs.map → chunk-ZRKXS7XG.mjs.map} +0 -0
  471. /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
@@ -8,7 +8,7 @@ import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
8
8
  import { RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT } from "../../utils/const";
9
9
  import { FeePayerRawTransaction, MultiAgentRawTransaction } from "../instances";
10
10
  import { AnyRawTransaction, AnyRawTransactionInstance } from "../types";
11
- import { Serializable } from "../../bcs/serializer";
11
+ import { Serializable } from "../../bcs";
12
12
 
13
13
  /**
14
14
  * Derive the raw transaction type - FeePayerRawTransaction or MultiAgentRawTransaction or RawTransaction
@@ -61,9 +61,6 @@ export function generateSigningMessage(bytes: Uint8Array, domainSeparator: strin
61
61
  }
62
62
 
63
63
  /**
64
- * @deprected
65
- * Use CryptoHashable instead by having your class implement it and call hash() to get the signing message.
66
- *
67
64
  * Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
68
65
  * its constructor as the domain separator.
69
66
  *
@@ -9,13 +9,7 @@
9
9
  import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
10
10
  import { AptosConfig } from "../../api/aptosConfig";
11
11
  import { AccountAddress, AccountAddressInput, Hex, PublicKey } from "../../core";
12
- import {
13
- AnyPublicKey,
14
- AnySignature,
15
- KeylessPublicKey,
16
- Secp256k1PublicKey,
17
- Secp256k1Signature,
18
- } from "../../core/crypto";
12
+ import { AnyPublicKey, AnySignature, Secp256k1PublicKey, Secp256k1Signature } from "../../core/crypto";
19
13
  import { Ed25519PublicKey, Ed25519Signature } from "../../core/crypto/ed25519";
20
14
  import { getInfo } from "../../internal/account";
21
15
  import { getLedgerInfo } from "../../internal/general";
@@ -451,11 +445,6 @@ export function generateSignedTransactionForSimulation(args: InputSimulateTransa
451
445
  }
452
446
 
453
447
  export function getAuthenticatorForSimulation(publicKey: PublicKey) {
454
- if (publicKey instanceof KeylessPublicKey || publicKey instanceof Secp256k1PublicKey) {
455
- // eslint-disable-next-line no-param-reassign
456
- publicKey = new AnyPublicKey(publicKey);
457
- }
458
-
459
448
  // TODO add support for AnyMultiKey
460
449
  if (publicKey instanceof AnyPublicKey) {
461
450
  if (publicKey.publicKey instanceof Ed25519PublicKey) {
@@ -464,11 +453,6 @@ export function getAuthenticatorForSimulation(publicKey: PublicKey) {
464
453
  if (publicKey.publicKey instanceof Secp256k1PublicKey) {
465
454
  return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Secp256k1Signature(new Uint8Array(64))));
466
455
  }
467
- if (publicKey.publicKey instanceof KeylessPublicKey) {
468
- // TODO: Replace with the line below one simulation works properly for Keyless
469
- // return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(KeylessSignature.getSimulationSignature()));
470
- return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Ed25519Signature(new Uint8Array(64))));
471
- }
472
456
  }
473
457
 
474
458
  // legacy code
@@ -108,29 +108,11 @@ export enum AccountAuthenticatorVariant {
108
108
  export enum AnyPublicKeyVariant {
109
109
  Ed25519 = 0,
110
110
  Secp256k1 = 1,
111
- Keyless = 3,
112
111
  }
113
112
 
114
113
  export enum AnySignatureVariant {
115
114
  Ed25519 = 0,
116
115
  Secp256k1 = 1,
117
- Keyless = 3,
118
- }
119
-
120
- export enum EphemeralPublicKeyVariant {
121
- Ed25519 = 0,
122
- }
123
-
124
- export enum EphemeralSignatureVariant {
125
- Ed25519 = 0,
126
- }
127
-
128
- export enum EphemeralCertificateVariant {
129
- ZkProof = 0,
130
- }
131
-
132
- export enum ZkpVariant {
133
- Groth16 = 0,
134
116
  }
135
117
 
136
118
  /**
@@ -158,10 +140,6 @@ export type AptosSettings = {
158
140
 
159
141
  readonly indexer?: string;
160
142
 
161
- readonly pepper?: string;
162
-
163
- readonly prover?: string;
164
-
165
143
  readonly clientConfig?: ClientConfig;
166
144
 
167
145
  readonly client?: Client;
@@ -322,9 +300,9 @@ export type GasEstimation = {
322
300
  prioritized_gas_estimate?: number;
323
301
  };
324
302
 
325
- export type MoveResource<T = {}> = {
303
+ export type MoveResource = {
326
304
  type: MoveStructId;
327
- data: T;
305
+ data: {};
328
306
  };
329
307
 
330
308
  export type AccountData = {
@@ -22,22 +22,6 @@ export const NetworkToFaucetAPI: Record<string, string> = {
22
22
  local: "http://127.0.0.1:8081",
23
23
  };
24
24
 
25
- export const NetworkToPepperAPI: Record<string, string> = {
26
- mainnet: "https://api.mainnet.aptoslabs.com/keyless/pepper/v0",
27
- testnet: "https://api.testnet.aptoslabs.com/keyless/pepper/v0",
28
- devnet: "https://api.devnet.aptoslabs.com/keyless/pepper/v0",
29
- // Use the devnet service for local environment
30
- local: "https://api.devnet.aptoslabs.com/keyless/pepper/v0",
31
- };
32
-
33
- export const NetworkToProverAPI: Record<string, string> = {
34
- mainnet: "https://api.mainnet.aptoslabs.com/keyless/prover/v0",
35
- testnet: "https://api.testnet.aptoslabs.com/keyless/prover/v0",
36
- devnet: "https://api.devnet.aptoslabs.com/keyless/prover/v0",
37
- // Use the devnet service for local environment
38
- local: "https://api.devnet.aptoslabs.com/keyless/prover/v0",
39
- };
40
-
41
25
  export enum Network {
42
26
  MAINNET = "mainnet",
43
27
  TESTNET = "testnet",
@@ -8,8 +8,6 @@ export enum AptosApiType {
8
8
  FULLNODE = "Fullnode",
9
9
  INDEXER = "Indexer",
10
10
  FAUCET = "Faucet",
11
- PEPPER = "Pepper",
12
- PROVER = "Prover",
13
11
  }
14
12
 
15
13
  /**
@@ -1,8 +1,6 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { decode } from "js-base64";
5
-
6
4
  /**
7
5
  * Sleep the current thread for the given amount of time
8
6
  * @param timeMs time in milliseconds to sleep
@@ -12,23 +10,3 @@ export async function sleep(timeMs: number): Promise<null> {
12
10
  setTimeout(resolve, timeMs);
13
11
  });
14
12
  }
15
-
16
- export const nowInSeconds = () => Math.floor(Date.now() / 1000);
17
-
18
- export function floorToWholeHour(timestampInSeconds: number): number {
19
- const date = new Date(timestampInSeconds * 1000);
20
- // Reset minutes and seconds to zero
21
- date.setMinutes(0);
22
- date.setSeconds(0);
23
- date.setMilliseconds(0);
24
- return Math.floor(date.getTime() / 1000);
25
- }
26
-
27
- export function base64UrlDecode(base64Url: string): string {
28
- // Replace base64url-specific characters
29
- const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
30
- // Pad the string with '=' characters if needed
31
- const paddedBase64 = base64 + "==".substring(0, (3 - (base64.length % 3)) % 3);
32
- const decodedString = decode(paddedBase64);
33
- return decodedString;
34
- }
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var d=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=(o,e,t,r)=>{for(var n=r>1?void 0:r?i(e,t):e,s=o.length-1,c;s>=0;s--)(c=o[s])&&(n=(r?c(e,t,n):c(n))||n);return r&&n&&d(e,t,n),n};var _jsbase64 = require('js-base64');async function m(o){return new Promise(e=>{setTimeout(e,o)})}var p=()=>Math.floor(Date.now()/1e3);function f(o){let e=new Date(o*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function b(o){let e=o.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return _jsbase64.decode.call(void 0, t)}exports.a = l; exports.b = m; exports.c = p; exports.d = f; exports.e = b;
2
- //# sourceMappingURL=chunk-BHKSQXUZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/helpers.ts"],"names":["decode","sleep","timeMs","resolve","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64"],"mappings":"wMAGA,OAAS,UAAAA,MAAc,YAMvB,eAAsBC,EAAMC,EAA+B,CACzD,OAAO,IAAI,QAASC,GAAY,CAC9B,WAAWA,EAASD,CAAM,CAC5B,CAAC,CACH,CAEO,IAAME,EAAe,IAAM,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAEvD,SAASC,EAAiBC,EAAoC,CACnE,IAAMC,EAAO,IAAI,KAAKD,EAAqB,GAAI,EAE/C,OAAAC,EAAK,WAAW,CAAC,EACjBA,EAAK,WAAW,CAAC,EACjBA,EAAK,gBAAgB,CAAC,EACf,KAAK,MAAMA,EAAK,QAAQ,EAAI,GAAI,CACzC,CAEO,SAASC,EAAgBC,EAA2B,CAEzD,IAAMC,EAASD,EAAU,QAAQ,KAAM,GAAG,EAAE,QAAQ,KAAM,GAAG,EAEvDE,EAAeD,EAAS,KAAK,UAAU,GAAI,EAAKA,EAAO,OAAS,GAAM,CAAC,EAE7E,OADsBV,EAAOW,CAAY,CAE3C","sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\n\n/**\n * Sleep the current thread for the given amount of time\n * @param timeMs time in milliseconds to sleep\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n"]}
@@ -1,90 +0,0 @@
1
- import { Deserializer } from '../bcs/deserializer.mjs';
2
- import { Serializable, Serializer } from '../bcs/serializer.mjs';
3
- import { HexInput, EphemeralPublicKeyVariant } from '../types/index.mjs';
4
- import { PrivateKey } from '../core/crypto/privateKey.mjs';
5
- import { EphemeralPublicKey, EphemeralSignature } from '../core/crypto/ephemeral.mjs';
6
- import '../core/hex.mjs';
7
- import '../core/common.mjs';
8
- import '../utils/apiEndpoints.mjs';
9
- import '../types/indexer.mjs';
10
- import '../types/generated/operations.mjs';
11
- import '../types/generated/types.mjs';
12
- import '../publicKey-lq5djCIY.mjs';
13
- import '../core/accountAddress.mjs';
14
- import '../transactions/instances/transactionArgument.mjs';
15
- import '../core/crypto/signature.mjs';
16
-
17
- /**
18
- * A class which contains a key pair that is used in signing transactions via the Keyless authentication scheme. This key pair
19
- * is ephemeral and has an expiration time. For more details on how this class is used -
20
- * https://aptos.dev/guides/keyless-accounts/#1-present-the-user-with-a-sign-in-with-idp-button-on-the-ui
21
- */
22
- declare class EphemeralKeyPair extends Serializable {
23
- static readonly BLINDER_LENGTH: number;
24
- /**
25
- * A byte array of length BLINDER_LENGTH used to obfuscate the public key from the IdP.
26
- * Used in calculating the nonce passed to the IdP and as a secret witness in proof generation.
27
- */
28
- readonly blinder: Uint8Array;
29
- /**
30
- * A timestamp in seconds indicating when the ephemeral key pair is expired. After expiry, a new
31
- * EphemeralKeyPair must be generated and a new JWT needs to be created.
32
- */
33
- readonly expiryDateSecs: number;
34
- /**
35
- * The value passed to the IdP when the user authenticates. It comprises of a hash of the
36
- * ephermeral public key, expiry date, and blinder.
37
- */
38
- readonly nonce: string;
39
- /**
40
- * A private key used to sign transactions. This private key is not tied to any account on the chain as it
41
- * is ephemeral (not permanent) in nature.
42
- */
43
- private privateKey;
44
- /**
45
- * A public key used to verify transactions. This public key is not tied to any account on the chain as it
46
- * is ephemeral (not permanent) in nature.
47
- */
48
- private publicKey;
49
- constructor(args: {
50
- privateKey: PrivateKey;
51
- expiryDateSecs?: number;
52
- blinder?: HexInput;
53
- });
54
- /**
55
- * Returns the public key of the key pair.
56
- * @return EphemeralPublicKey
57
- */
58
- getPublicKey(): EphemeralPublicKey;
59
- /**
60
- * Returns the public key of the key pair.
61
- * @return boolean
62
- */
63
- isExpired(): boolean;
64
- serialize(serializer: Serializer): void;
65
- static deserialize(deserializer: Deserializer): EphemeralKeyPair;
66
- static fromBytes(bytes: Uint8Array): EphemeralKeyPair;
67
- /**
68
- * Returns the public key of the key pair.
69
- * @param scheme the type of keypair to use for the EphemeralKeyPair. Only Ed25519 supported for now.
70
- * @param expiryDateSecs the date of expiry.
71
- * @return boolean
72
- */
73
- static generate(args?: {
74
- scheme?: EphemeralPublicKeyVariant;
75
- expiryDateSecs?: number;
76
- }): EphemeralKeyPair;
77
- /**
78
- * From the ephemeral public key, expiry timestamp, and blinder, calculate the nonce to be used at authentication via OIDC.
79
- * @returns string
80
- */
81
- private generateNonce;
82
- /**
83
- * Sign the given message with the private key.
84
- * @param data in HexInput format
85
- * @returns EphemeralSignature
86
- */
87
- sign(data: HexInput): EphemeralSignature;
88
- }
89
-
90
- export { EphemeralKeyPair };
@@ -1,2 +0,0 @@
1
- import{a}from"../chunk-QSMVCD52.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as EphemeralKeyPair};
2
- //# sourceMappingURL=EphemeralKeyPair.mjs.map
@@ -1,211 +0,0 @@
1
- import { SigningScheme, HexInput } from '../types/index.mjs';
2
- import { AccountAddress } from '../core/accountAddress.mjs';
3
- import { Deserializer } from '../bcs/deserializer.mjs';
4
- import { Serializable, Serializer } from '../bcs/serializer.mjs';
5
- import { Signature } from '../core/crypto/signature.mjs';
6
- import { KeylessPublicKey, ZeroKnowledgeSig, KeylessSignature, ZkProof } from '../core/crypto/keyless.mjs';
7
- import { A as Account } from '../Ed25519Account-9zBaZEnp.mjs';
8
- import { EphemeralKeyPair } from './EphemeralKeyPair.mjs';
9
- import { AccountAuthenticatorSingleKey } from '../transactions/authenticator/account.mjs';
10
- import { AnyRawTransaction, AnyRawTransactionInstance } from '../transactions/types.mjs';
11
- import { CryptoHashable, AptsoDomainSeparator } from '../core/crypto/cryptoHashable.mjs';
12
- import '../utils/apiEndpoints.mjs';
13
- import '../types/indexer.mjs';
14
- import '../types/generated/operations.mjs';
15
- import '../types/generated/types.mjs';
16
- import '../core/common.mjs';
17
- import '../transactions/instances/transactionArgument.mjs';
18
- import '../core/hex.mjs';
19
- import '../publicKey-lq5djCIY.mjs';
20
- import '../core/crypto/ephemeral.mjs';
21
- import '../core/crypto/proof.mjs';
22
- import '../types/keyless.mjs';
23
- import '../api/aptosConfig.mjs';
24
- import '../utils/const.mjs';
25
- import '../core/crypto/ed25519.mjs';
26
- import '../core/crypto/privateKey.mjs';
27
- import '../core/crypto/singleKey.mjs';
28
- import '../core/crypto/multiEd25519.mjs';
29
- import '../core/crypto/multiKey.mjs';
30
- import '../bcs/serializable/moveStructs.mjs';
31
- import '../bcs/serializable/movePrimitives.mjs';
32
- import '../bcs/serializable/fixedBytes.mjs';
33
- import '../transactions/instances/rawTransaction.mjs';
34
- import '../transactions/instances/chainId.mjs';
35
- import '../transactions/instances/transactionPayload.mjs';
36
- import '../transactions/instances/identifier.mjs';
37
- import '../transactions/instances/moduleId.mjs';
38
- import '../transactions/typeTag/index.mjs';
39
- import '../transactions/instances/simpleTransaction.mjs';
40
- import '../transactions/instances/multiAgentTransaction.mjs';
41
-
42
- /**
43
- * Account implementation for the Keyless authentication scheme.
44
- *
45
- * Used to represent a Keyless based account and sign transactions with it.
46
- *
47
- * Use KeylessAccount.fromJWTAndProof to instantiate a KeylessAccount with a JWT, proof and EphemeralKeyPair.
48
- *
49
- * When the proof expires or the JWT becomes invalid, the KeylessAccount must be instantiated again with a new JWT,
50
- * EphemeralKeyPair, and corresponding proof.
51
- */
52
- declare class KeylessAccount extends Serializable implements Account {
53
- static readonly PEPPER_LENGTH: number;
54
- /**
55
- * The KeylessPublicKey associated with the account
56
- */
57
- readonly publicKey: KeylessPublicKey;
58
- /**
59
- * The EphemeralKeyPair used to generate sign.
60
- */
61
- readonly ephemeralKeyPair: EphemeralKeyPair;
62
- /**
63
- * The claim on the JWT to identify a user. This is typically 'sub' or 'email'.
64
- */
65
- readonly uidKey: string;
66
- /**
67
- * The value of the uidKey claim on the JWT. This intended to be a stable user identifier.
68
- */
69
- readonly uidVal: string;
70
- /**
71
- * The value of the 'aud' claim on the JWT, also known as client ID. This is the identifier for the dApp's
72
- * OIDC registration with the identity provider.
73
- */
74
- readonly aud: string;
75
- /**
76
- * A value contains 31 bytes of entropy that preserves privacy of the account. Typically fetched from a pepper provider.
77
- */
78
- readonly pepper: Uint8Array;
79
- /**
80
- * Account address associated with the account
81
- */
82
- readonly accountAddress: AccountAddress;
83
- /**
84
- * The zero knowledge signature (if ready) which contains the proof used to validate the EphemeralKeyPair.
85
- */
86
- proof: ZeroKnowledgeSig | undefined;
87
- /**
88
- * The proof of the EphemeralKeyPair or a promise that provides the proof. This is used to allow for awaiting on
89
- * fetching the proof.
90
- */
91
- readonly proofOrPromise: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
92
- /**
93
- * Signing scheme used to sign transactions
94
- */
95
- readonly signingScheme: SigningScheme;
96
- /**
97
- * The JWT token used to derive the account
98
- */
99
- private jwt;
100
- /**
101
- * A value that caches the JWT's validity. A JWT becomes invalid when it's corresponding JWK is rotated from the
102
- * identity provider's JWK keyset.
103
- */
104
- private isJwtValid;
105
- /**
106
- * An event emitter used to assist in handling asycronous proof fetching.
107
- */
108
- private readonly emitter;
109
- constructor(args: {
110
- address?: AccountAddress;
111
- ephemeralKeyPair: EphemeralKeyPair;
112
- iss: string;
113
- uidKey: string;
114
- uidVal: string;
115
- aud: string;
116
- pepper: HexInput;
117
- proofOrFetcher: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
118
- proofFetchCallback?: ProofFetchCallback;
119
- jwt: string;
120
- });
121
- /**
122
- * This initializes the asyncronous proof fetch
123
- * @return
124
- */
125
- init(promise: Promise<ZeroKnowledgeSig>): Promise<void>;
126
- serialize(serializer: Serializer): void;
127
- static deserialize(deserializer: Deserializer): KeylessAccount;
128
- /**
129
- * Checks if the proof is expired. If so the account must be rederived with a new EphemeralKeyPair
130
- * and JWT token.
131
- * @return boolean
132
- */
133
- isExpired(): boolean;
134
- /**
135
- * Sign a message using Keyless.
136
- * @param message the message to sign, as binary input
137
- * @return the AccountAuthenticator containing the signature, together with the account's public key
138
- */
139
- signWithAuthenticator(message: HexInput): AccountAuthenticatorSingleKey;
140
- /**
141
- * Sign a transaction using Keyless.
142
- * @param transaction the raw transaction
143
- * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key
144
- */
145
- signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorSingleKey;
146
- /**
147
- * Waits for asyncronous proof fetching to finish.
148
- * @return
149
- */
150
- waitForProofFetch(): Promise<void>;
151
- /**
152
- * Sign the given message using Keyless.
153
- * @param message in HexInput format
154
- * @returns Signature
155
- */
156
- sign(data: HexInput): KeylessSignature;
157
- /**
158
- * Sign the given transaction with Keyless.
159
- * Signs the transaction and proof to guard against proof malleability.
160
- * @param transaction the transaction to be signed
161
- * @returns KeylessSignature
162
- */
163
- signTransaction(transaction: AnyRawTransaction): KeylessSignature;
164
- verifySignature(args: {
165
- message: HexInput;
166
- signature: Signature;
167
- }): boolean;
168
- static fromBytes(bytes: Uint8Array): KeylessAccount;
169
- static create(args: {
170
- proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
171
- jwt: string;
172
- ephemeralKeyPair: EphemeralKeyPair;
173
- pepper: HexInput;
174
- uidKey?: string;
175
- proofFetchCallback?: ProofFetchCallback;
176
- }): KeylessAccount;
177
- }
178
- /**
179
- * A container class to hold a transaction and a proof. It implements CryptoHashable which is used to create
180
- * the signing message for Keyless transactions. We sign over the proof to ensure non-malleability.
181
- */
182
- declare class TransactionAndProof extends CryptoHashable {
183
- /**
184
- * The transaction to sign.
185
- */
186
- transaction: AnyRawTransactionInstance;
187
- /**
188
- * The zero knowledge proof used in signing the transaction.
189
- */
190
- proof?: ZkProof;
191
- /**
192
- * The domain separator prefix used when hashing.
193
- */
194
- domainSeparator: AptsoDomainSeparator;
195
- constructor(transaction: AnyRawTransactionInstance, proof?: ZkProof);
196
- serialize(serializer: Serializer): void;
197
- }
198
- type ProofFetchSuccess = {
199
- status: "Success";
200
- };
201
- type ProofFetchFailure = {
202
- status: "Failed";
203
- error: string;
204
- };
205
- type ProofFetchStatus = ProofFetchSuccess | ProofFetchFailure;
206
- type ProofFetchCallback = (status: ProofFetchStatus) => Promise<void>;
207
- interface ProofFetchEvents {
208
- proofFetchFinish: (status: ProofFetchStatus) => void;
209
- }
210
-
211
- export { KeylessAccount, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, TransactionAndProof };
@@ -1,2 +0,0 @@
1
- import{a,b}from"../chunk-J3DCBYOY.mjs";import"../chunk-YD5IB4TH.mjs";import"../chunk-QSMVCD52.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-FR6UGCOX.mjs";import"../chunk-4NMDYPUD.mjs";import"../chunk-YRUF6N3U.mjs";import"../chunk-IXFYYWAC.mjs";import"../chunk-IT7YNITU.mjs";import"../chunk-YDNOKWV3.mjs";import"../chunk-472OGHMG.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-FIG65OJD.mjs";import"../chunk-MLX6DFMR.mjs";import"../chunk-TUCCV62K.mjs";import"../chunk-NW3WUTTD.mjs";import"../chunk-GSCM444Z.mjs";import"../chunk-U5F4NL24.mjs";import"../chunk-HP6YVTTT.mjs";import"../chunk-RFSO3JRG.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as KeylessAccount,b as TransactionAndProof};
2
- //# sourceMappingURL=KeylessAccount.mjs.map
@@ -1,85 +0,0 @@
1
- import { HexInput } from '../types/index.mjs';
2
- import { AptosConfig } from './aptosConfig.mjs';
3
- import { EphemeralKeyPair } from '../account/EphemeralKeyPair.mjs';
4
- import { ProofFetchCallback, KeylessAccount } from '../account/KeylessAccount.mjs';
5
- import '../utils/apiEndpoints.mjs';
6
- import '../types/indexer.mjs';
7
- import '../types/generated/operations.mjs';
8
- import '../types/generated/types.mjs';
9
- import '../utils/const.mjs';
10
- import '../bcs/deserializer.mjs';
11
- import '../bcs/serializer.mjs';
12
- import '../core/hex.mjs';
13
- import '../core/common.mjs';
14
- import '../core/crypto/privateKey.mjs';
15
- import '../publicKey-lq5djCIY.mjs';
16
- import '../core/accountAddress.mjs';
17
- import '../transactions/instances/transactionArgument.mjs';
18
- import '../core/crypto/signature.mjs';
19
- import '../core/crypto/ephemeral.mjs';
20
- import '../core/crypto/keyless.mjs';
21
- import '../core/crypto/proof.mjs';
22
- import '../types/keyless.mjs';
23
- import '../Ed25519Account-9zBaZEnp.mjs';
24
- import '../transactions/authenticator/account.mjs';
25
- import '../core/crypto/ed25519.mjs';
26
- import '../core/crypto/multiEd25519.mjs';
27
- import '../core/crypto/multiKey.mjs';
28
- import '../core/crypto/singleKey.mjs';
29
- import '../transactions/types.mjs';
30
- import '../bcs/serializable/moveStructs.mjs';
31
- import '../bcs/serializable/movePrimitives.mjs';
32
- import '../bcs/serializable/fixedBytes.mjs';
33
- import '../transactions/instances/rawTransaction.mjs';
34
- import '../transactions/instances/chainId.mjs';
35
- import '../transactions/instances/transactionPayload.mjs';
36
- import '../transactions/instances/identifier.mjs';
37
- import '../transactions/instances/moduleId.mjs';
38
- import '../transactions/typeTag/index.mjs';
39
- import '../transactions/instances/simpleTransaction.mjs';
40
- import '../transactions/instances/multiAgentTransaction.mjs';
41
- import '../core/crypto/cryptoHashable.mjs';
42
-
43
- /**
44
- * A class to query all `Keyless` related queries on Aptos.
45
- *
46
- * More documentation on how to integrate Keyless Accounts see the below
47
- * https://aptos.dev/guides/keyless-accounts/#aptos-keyless-integration-guide
48
- */
49
- declare class Keyless {
50
- readonly config: AptosConfig;
51
- constructor(config: AptosConfig);
52
- /**
53
- * Fetches the pepper from the Aptos pepper service API.
54
- *
55
- * @param args.jwt JWT token
56
- * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
57
- * @returns The pepper which is a Uint8Array of length 31.
58
- */
59
- getPepper(args: {
60
- jwt: string;
61
- ephemeralKeyPair: EphemeralKeyPair;
62
- }): Promise<Uint8Array>;
63
- /**
64
- * Fetches the pepper from the Aptos pepper service API.
65
- *
66
- * @param args.jwt JWT token
67
- * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
68
- * @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
69
- * @param args.pepper the pepper
70
- * @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done in the background. Once
71
- * fetching finishes the callback function will be called. This should be used to provide a more responsive user experience as now
72
- * they are not blocked on fetching the proof. Thus the function will return much more quickly.
73
- *
74
- * @returns A KeylessAccount that can be used to sign transactions
75
- */
76
- deriveKeylessAccount(args: {
77
- jwt: string;
78
- ephemeralKeyPair: EphemeralKeyPair;
79
- uidKey?: string;
80
- pepper?: HexInput;
81
- proofFetchCallback?: ProofFetchCallback;
82
- }): Promise<KeylessAccount>;
83
- }
84
-
85
- export { Keyless };
@@ -1,2 +0,0 @@
1
- import{a}from"../chunk-R2TZZVTU.mjs";import"../chunk-EHL3WIK3.mjs";import"../chunk-7Z6DYLCA.mjs";import"../chunk-QFVQSFBZ.mjs";import"../chunk-WIYDJE6F.mjs";import"../chunk-BLWJZXAD.mjs";import"../chunk-J3DCBYOY.mjs";import"../chunk-YD5IB4TH.mjs";import"../chunk-QSMVCD52.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-L5ZHZWHI.mjs";import"../chunk-FR6UGCOX.mjs";import"../chunk-4NMDYPUD.mjs";import"../chunk-YRUF6N3U.mjs";import"../chunk-IXFYYWAC.mjs";import"../chunk-IT7YNITU.mjs";import"../chunk-YDNOKWV3.mjs";import"../chunk-472OGHMG.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-FIG65OJD.mjs";import"../chunk-MLX6DFMR.mjs";import"../chunk-TUCCV62K.mjs";import"../chunk-NW3WUTTD.mjs";import"../chunk-GSCM444Z.mjs";import"../chunk-U5F4NL24.mjs";import"../chunk-HP6YVTTT.mjs";import"../chunk-RFSO3JRG.mjs";import"../chunk-AQ4I7VVB.mjs";import"../chunk-SNDFJWYM.mjs";import"../chunk-ZV5MKFV7.mjs";import"../chunk-4CUDBBTC.mjs";import"../chunk-BO44HPGU.mjs";import"../chunk-54LCK6EN.mjs";import"../chunk-37FFZSIM.mjs";import"../chunk-L5CPAOUM.mjs";import"../chunk-IVVWQKCF.mjs";import"../chunk-KUX6GQ2E.mjs";import"../chunk-XVZBWW46.mjs";import"../chunk-WA2NTBYY.mjs";import"../chunk-4VPCPASN.mjs";import"../chunk-TJDC5PWD.mjs";import"../chunk-LR65XHSF.mjs";import"../chunk-EFMAZTIM.mjs";import"../chunk-F3ZVWLDH.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-IBDBKQMF.mjs";import"../chunk-2G4IGSGM.mjs";import"../chunk-3SACE4I2.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-3RJZNUCQ.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-GRHLQDHF.mjs";import"../chunk-7BW2N4IE.mjs";import"../chunk-FGGRPEQ3.mjs";import"../chunk-IBN7ETCB.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-3IFR6T3V.mjs";import"../chunk-UMLUOYFK.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-YE5B2S5L.mjs";import"../chunk-4BJA3QUQ.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Keyless};
2
- //# sourceMappingURL=keyless.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- import{b as p}from"./chunk-3SACE4I2.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
2
- //# sourceMappingURL=chunk-2G4IGSGM.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as r}from"./chunk-UMLUOYFK.mjs";import{b as t}from"./chunk-AOCNYMMX.mjs";var e=class extends r{toString(){let s=this.bcsToBytes();return t.fromHexInput(s).toString()}};export{e as a};
2
- //# sourceMappingURL=chunk-37FFZSIM.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/proof.ts"],"sourcesContent":["import { Serializable } from \"../../bcs\";\nimport { Hex } from \"../hex\";\n\n/**\n * An abstract representation of a crypto proof.\n * associated to a specific zero knowledge proof schemes e.g. Groth16, PLONK\n */\nexport abstract class Proof extends Serializable {\n /**\n * Get the proof as a hex string with a 0x prefix e.g. 0x123456...\n */\n toString(): string {\n const bytes = this.bcsToBytes();\n return Hex.fromHexInput(bytes).toString();\n }\n}\n"],"mappings":"kFAOO,IAAeA,EAAf,cAA6BC,CAAa,CAI/C,UAAmB,CACjB,IAAMC,EAAQ,KAAK,WAAW,EAC9B,OAAOC,EAAI,aAAaD,CAAK,EAAE,SAAS,CAC1C,CACF","names":["Proof","Serializable","bytes","Hex"]}
@@ -1,2 +0,0 @@
1
- import{c as r}from"./chunk-56CNRT2K.mjs";var n=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}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOptionStr(){if(this.deserializeUleb128AsU32()===1)return this.deserializeStr()}deserializeOption(e){if(this.deserializeUleb128AsU32()===1)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<r;){let t=this.deserializeU8();if(e|=BigInt(t&127)<<BigInt(i),!(t&128))break;i+=7}if(e>r)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(),t=new Array;for(let s=0;s<i;s+=1)t.push(this.deserialize(e));return t}};export{n as a};
2
- //# sourceMappingURL=chunk-3IFR6T3V.mjs.map