@aptos-labs/ts-sdk 1.17.0-zeta.1 → 1.18.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 (401) hide show
  1. package/dist/common/{accountAddress-jP2Ua0t9.d.ts → accountAddress-Lv-GSihU.d.ts} +10 -8
  2. package/dist/common/cli/index.d.ts +1 -1
  3. package/dist/common/index.d.ts +30 -54
  4. package/dist/common/index.js +9 -7
  5. package/dist/common/index.js.map +1 -1
  6. package/dist/esm/{Ed25519Account-9zBaZEnp.d.mts → Ed25519Account-B1VMJOY2.d.mts} +1 -1
  7. package/dist/esm/account/Account.d.mts +2 -2
  8. package/dist/esm/account/Account.mjs +1 -1
  9. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  10. package/dist/esm/account/Ed25519Account.mjs +1 -1
  11. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -6
  12. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  13. package/dist/esm/account/KeylessAccount.d.mts +7 -38
  14. package/dist/esm/account/KeylessAccount.mjs +1 -1
  15. package/dist/esm/account/MultiKeyAccount.d.mts +2 -2
  16. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  17. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  18. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  19. package/dist/esm/account/index.d.mts +3 -4
  20. package/dist/esm/account/index.mjs +1 -1
  21. package/dist/esm/api/account.d.mts +2 -2
  22. package/dist/esm/api/account.mjs +1 -1
  23. package/dist/esm/api/ans.d.mts +2 -2
  24. package/dist/esm/api/ans.mjs +1 -1
  25. package/dist/esm/api/aptos.d.mts +5 -6
  26. package/dist/esm/api/aptos.mjs +1 -1
  27. package/dist/esm/api/coin.d.mts +1 -1
  28. package/dist/esm/api/coin.mjs +1 -1
  29. package/dist/esm/api/digitalAsset.d.mts +2 -2
  30. package/dist/esm/api/digitalAsset.mjs +1 -1
  31. package/dist/esm/api/event.mjs +1 -1
  32. package/dist/esm/api/faucet.mjs +1 -1
  33. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  34. package/dist/esm/api/fungibleAsset.mjs +1 -1
  35. package/dist/esm/api/general.d.mts +1 -1
  36. package/dist/esm/api/general.mjs +1 -1
  37. package/dist/esm/api/index.d.mts +5 -6
  38. package/dist/esm/api/index.mjs +1 -1
  39. package/dist/esm/api/keyless.d.mts +27 -8
  40. package/dist/esm/api/keyless.mjs +1 -1
  41. package/dist/esm/api/staking.mjs +1 -1
  42. package/dist/esm/api/table.mjs +1 -1
  43. package/dist/esm/api/transaction.d.mts +2 -2
  44. package/dist/esm/api/transaction.mjs +1 -1
  45. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  46. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  47. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  48. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  49. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  50. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  51. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  52. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  53. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  54. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  55. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  56. package/dist/esm/api/utils.mjs +1 -1
  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.mjs +1 -1
  64. package/dist/esm/{chunk-IBDBKQMF.mjs → chunk-27EDTWDR.mjs} +2 -2
  65. package/dist/esm/{chunk-MNTLX37G.mjs → chunk-27IBTALL.mjs} +2 -2
  66. package/dist/esm/chunk-3DSVH6LX.mjs +2 -0
  67. package/dist/esm/chunk-3DSVH6LX.mjs.map +1 -0
  68. package/dist/esm/{chunk-JLXE5JF6.mjs → chunk-3XA2PJT3.mjs} +2 -2
  69. package/dist/esm/{chunk-MLX6DFMR.mjs → chunk-42XI3HFJ.mjs} +2 -2
  70. package/dist/esm/{chunk-ASK3DESW.mjs → chunk-4435A7EV.mjs} +2 -2
  71. package/dist/esm/{chunk-U2R36WTE.mjs → chunk-4IMYC7VX.mjs} +2 -2
  72. package/dist/esm/{chunk-ZMHGGT4E.mjs → chunk-4OMMO2ZM.mjs} +2 -2
  73. package/dist/esm/chunk-4TODRUKS.mjs +2 -0
  74. package/dist/esm/{chunk-PBMSO6WI.mjs → chunk-5AVPZE2Z.mjs} +2 -2
  75. package/dist/esm/{chunk-FR6UGCOX.mjs → chunk-5YKVCBMZ.mjs} +2 -2
  76. package/dist/esm/chunk-5YKVCBMZ.mjs.map +1 -0
  77. package/dist/esm/{chunk-VJFCEX7W.mjs → chunk-6AO7XFMJ.mjs} +2 -2
  78. package/dist/esm/{chunk-T5YEMU53.mjs → chunk-6J7KF4CI.mjs} +2 -2
  79. package/dist/esm/chunk-6QGVRNV6.mjs +2 -0
  80. package/dist/esm/{chunk-IBN7ETCB.mjs.map → chunk-6QGVRNV6.mjs.map} +1 -1
  81. package/dist/esm/{chunk-IXFYYWAC.mjs → chunk-6RI3QGKV.mjs} +2 -2
  82. package/dist/esm/chunk-772PPMHG.mjs +2 -0
  83. package/dist/esm/{chunk-TCK35M7E.mjs → chunk-774QDXM7.mjs} +2 -2
  84. package/dist/esm/{chunk-KDLQ2V3L.mjs → chunk-A5XE22JG.mjs} +2 -2
  85. package/dist/esm/chunk-ANH2FYMX.mjs +2 -0
  86. package/dist/esm/{chunk-WIYDJE6F.mjs → chunk-AX7L7E42.mjs} +2 -2
  87. package/dist/esm/{chunk-XVZBWW46.mjs → chunk-B3UIFT2G.mjs} +2 -2
  88. package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
  89. package/dist/esm/chunk-BF4ZE37Q.mjs +2 -0
  90. package/dist/esm/chunk-BI5F4IYT.mjs +2 -0
  91. package/dist/esm/chunk-BI5F4IYT.mjs.map +1 -0
  92. package/dist/esm/{chunk-Y4E6NTAS.mjs → chunk-BTTZZ2IQ.mjs} +2 -2
  93. package/dist/esm/{chunk-L5ZHZWHI.mjs → chunk-C75WI2DU.mjs} +2 -2
  94. package/dist/esm/{chunk-R5THMTSP.mjs → chunk-CDTDQXTN.mjs} +2 -2
  95. package/dist/esm/{chunk-4CUDBBTC.mjs → chunk-CR2SYJYG.mjs} +2 -2
  96. package/dist/esm/{chunk-4CUDBBTC.mjs.map → chunk-CR2SYJYG.mjs.map} +1 -1
  97. package/dist/esm/{chunk-J7HG6SQO.mjs → chunk-CVHPBWAE.mjs} +2 -2
  98. package/dist/esm/chunk-DBDIEGAX.mjs +2 -0
  99. package/dist/esm/{chunk-HP6YVTTT.mjs.map → chunk-DBDIEGAX.mjs.map} +1 -1
  100. package/dist/esm/{chunk-SNDFJWYM.mjs → chunk-DIJ7EEXC.mjs} +2 -2
  101. package/dist/esm/{chunk-OHZHYL3E.mjs → chunk-DKEUYXWU.mjs} +2 -2
  102. package/dist/esm/chunk-DZXM2MQY.mjs +2 -0
  103. package/dist/esm/chunk-DZXM2MQY.mjs.map +1 -0
  104. package/dist/esm/chunk-E37YRKWK.mjs +2 -0
  105. package/dist/esm/{chunk-IFAWCHUG.mjs → chunk-ENKXK5WP.mjs} +2 -2
  106. package/dist/esm/{chunk-P67NJHS5.mjs → chunk-EPYUPOEE.mjs} +2 -2
  107. package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
  108. package/dist/esm/{chunk-ZIDLP5MI.mjs → chunk-FDVU4LJF.mjs} +2 -2
  109. package/dist/esm/{chunk-YRUF6N3U.mjs → chunk-FY7RZWGY.mjs} +2 -2
  110. package/dist/esm/chunk-G4UKDWKT.mjs +2 -0
  111. package/dist/esm/{chunk-DPWEHSHH.mjs → chunk-GBCAP4Z5.mjs} +2 -2
  112. package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
  113. package/dist/esm/{chunk-YA4XTZNZ.mjs → chunk-GWUK3P3Y.mjs} +2 -2
  114. package/dist/esm/{chunk-S3EDNXZE.mjs → chunk-HIHKTLLM.mjs} +20 -18
  115. package/dist/esm/chunk-HIHKTLLM.mjs.map +1 -0
  116. package/dist/esm/{chunk-UMLUOYFK.mjs → chunk-HPZ2S4FE.mjs} +2 -2
  117. package/dist/esm/{chunk-UMLUOYFK.mjs.map → chunk-HPZ2S4FE.mjs.map} +1 -1
  118. package/dist/esm/chunk-HZCFCP4P.mjs +2 -0
  119. package/dist/esm/{chunk-M3KFXIQ6.mjs.map → chunk-HZCFCP4P.mjs.map} +1 -1
  120. package/dist/esm/chunk-IMGLHDIA.mjs +2 -0
  121. package/dist/esm/{chunk-2G4IGSGM.mjs → chunk-IPBKWCHZ.mjs} +2 -2
  122. package/dist/esm/chunk-IYZMBB6Z.mjs +2 -0
  123. package/dist/esm/chunk-IYZMBB6Z.mjs.map +1 -0
  124. package/dist/esm/{chunk-TAT3K5M7.mjs → chunk-JBI3MFD3.mjs} +2 -2
  125. package/dist/esm/{chunk-VAKWRPVP.mjs → chunk-JWNKY2N3.mjs} +2 -2
  126. package/dist/esm/chunk-KZWAQOS5.mjs +2 -0
  127. package/dist/esm/chunk-KZWAQOS5.mjs.map +1 -0
  128. package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
  129. package/dist/esm/chunk-LXLISEQ4.mjs +2 -0
  130. package/dist/esm/chunk-M2QV232A.mjs +2 -0
  131. package/dist/esm/{chunk-7M6OCGHL.mjs → chunk-MIEL2ZWA.mjs} +2 -2
  132. package/dist/esm/{chunk-XH33BXEY.mjs → chunk-MRYNASDY.mjs} +2 -2
  133. package/dist/esm/chunk-MS4MRLGA.mjs +2 -0
  134. package/dist/esm/{chunk-YDNOKWV3.mjs → chunk-NCKTBQKI.mjs} +2 -2
  135. package/dist/esm/{chunk-QFVQSFBZ.mjs → chunk-O5IXBRSF.mjs} +2 -2
  136. package/dist/esm/{chunk-DJPYZIJY.mjs → chunk-OFERLF6R.mjs} +2 -2
  137. package/dist/esm/chunk-P2YIFHMW.mjs +2 -0
  138. package/dist/esm/{chunk-4BJA3QUQ.mjs.map → chunk-P2YIFHMW.mjs.map} +1 -1
  139. package/dist/esm/{chunk-BO44HPGU.mjs → chunk-PI34ZZ2Q.mjs} +2 -2
  140. package/dist/esm/{chunk-2H24BEJI.mjs → chunk-PPJYFA3V.mjs} +2 -2
  141. package/dist/esm/chunk-PS4JR3KO.mjs +2 -0
  142. package/dist/esm/{chunk-54LCK6EN.mjs.map → chunk-PS4JR3KO.mjs.map} +1 -1
  143. package/dist/esm/{chunk-3SACE4I2.mjs → chunk-Q5M2JKZ5.mjs} +2 -2
  144. package/dist/esm/{chunk-TUCCV62K.mjs → chunk-QUHKUJEO.mjs} +2 -2
  145. package/dist/esm/{chunk-ET4WC6TJ.mjs → chunk-RQ7N6FTV.mjs} +2 -2
  146. package/dist/esm/{chunk-MRUDDEJ3.mjs → chunk-S2FOCEY3.mjs} +2 -2
  147. package/dist/esm/{chunk-EQF5MW2W.mjs → chunk-SZ2FGGM6.mjs} +2 -2
  148. package/dist/esm/{chunk-KGKEU2WI.mjs → chunk-TSTGVIAU.mjs} +2 -2
  149. package/dist/esm/{chunk-F3ZVWLDH.mjs → chunk-TYS55ZIF.mjs} +2 -2
  150. package/dist/esm/{chunk-F3ZVWLDH.mjs.map → chunk-TYS55ZIF.mjs.map} +1 -1
  151. package/dist/esm/{chunk-L5CPAOUM.mjs → chunk-VJZVCHIS.mjs} +2 -2
  152. package/dist/esm/{chunk-XBVVP7O2.mjs → chunk-WRKH7MMI.mjs} +2 -2
  153. package/dist/esm/chunk-WV5AD4IE.mjs +2 -0
  154. package/dist/esm/{chunk-EFMAZTIM.mjs → chunk-XAFM4JZX.mjs} +2 -2
  155. package/dist/esm/{chunk-FGGRPEQ3.mjs → chunk-XAISUKMY.mjs} +2 -2
  156. package/dist/esm/{chunk-O6QLAP7N.mjs → chunk-XEYFKOYN.mjs} +2 -2
  157. package/dist/esm/{chunk-5C5GZJ57.mjs → chunk-XHCH7LG5.mjs} +2 -2
  158. package/dist/esm/{chunk-CKQ74DYE.mjs → chunk-XQM7P7PK.mjs} +2 -2
  159. package/dist/esm/{chunk-3AIEYUPP.mjs → chunk-XZMPH72M.mjs} +2 -2
  160. package/dist/esm/{chunk-5X5GQF3E.mjs → chunk-Y5PEEKOM.mjs} +2 -2
  161. package/dist/esm/chunk-YJCZU6PR.mjs +2 -0
  162. package/dist/esm/{chunk-ZV5MKFV7.mjs → chunk-YLDLEASQ.mjs} +2 -2
  163. package/dist/esm/{chunk-5UXARGTJ.mjs → chunk-YOJC4OXK.mjs} +2 -2
  164. package/dist/esm/{chunk-HJAB473N.mjs → chunk-YXRXKYCR.mjs} +2 -2
  165. package/dist/esm/client/core.mjs +1 -1
  166. package/dist/esm/client/get.mjs +1 -1
  167. package/dist/esm/client/index.mjs +1 -1
  168. package/dist/esm/client/post.mjs +1 -1
  169. package/dist/esm/client/types.mjs +1 -1
  170. package/dist/esm/core/account/index.mjs +1 -1
  171. package/dist/esm/core/account/utils/address.mjs +1 -1
  172. package/dist/esm/core/account/utils/index.mjs +1 -1
  173. package/dist/esm/core/accountAddress.mjs +1 -1
  174. package/dist/esm/core/authenticationKey.d.mts +1 -1
  175. package/dist/esm/core/authenticationKey.mjs +1 -1
  176. package/dist/esm/core/common.mjs +1 -1
  177. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  178. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  179. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  180. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  181. package/dist/esm/core/crypto/index.d.mts +1 -1
  182. package/dist/esm/core/crypto/index.mjs +1 -1
  183. package/dist/esm/core/crypto/keyless.d.mts +2 -2
  184. package/dist/esm/core/crypto/keyless.mjs +1 -1
  185. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  186. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  187. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  188. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  189. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  190. package/dist/esm/core/crypto/proof.mjs +1 -1
  191. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  192. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  193. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  194. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  195. package/dist/esm/core/crypto/signature.mjs +1 -1
  196. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  197. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  198. package/dist/esm/core/crypto/utils.mjs +1 -1
  199. package/dist/esm/core/hex.mjs +1 -1
  200. package/dist/esm/core/index.d.mts +1 -1
  201. package/dist/esm/core/index.mjs +1 -1
  202. package/dist/esm/index.d.mts +3 -4
  203. package/dist/esm/index.mjs +1 -1
  204. package/dist/esm/internal/account.d.mts +2 -2
  205. package/dist/esm/internal/account.mjs +1 -1
  206. package/dist/esm/internal/ans.d.mts +2 -2
  207. package/dist/esm/internal/ans.mjs +1 -1
  208. package/dist/esm/internal/coin.d.mts +1 -1
  209. package/dist/esm/internal/coin.mjs +1 -1
  210. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  211. package/dist/esm/internal/digitalAsset.mjs +1 -1
  212. package/dist/esm/internal/event.mjs +1 -1
  213. package/dist/esm/internal/faucet.mjs +1 -1
  214. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  215. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  216. package/dist/esm/internal/general.mjs +1 -1
  217. package/dist/esm/internal/keyless.d.mts +3 -4
  218. package/dist/esm/internal/keyless.mjs +1 -1
  219. package/dist/esm/internal/staking.mjs +1 -1
  220. package/dist/esm/internal/table.mjs +1 -1
  221. package/dist/esm/internal/transaction.mjs +1 -1
  222. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  223. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  224. package/dist/esm/internal/view.d.mts +1 -1
  225. package/dist/esm/internal/view.mjs +1 -1
  226. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  227. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  228. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  229. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  230. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  231. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  232. package/dist/esm/transactions/index.d.mts +1 -1
  233. package/dist/esm/transactions/index.mjs +1 -1
  234. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  235. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  236. package/dist/esm/transactions/instances/index.d.mts +1 -1
  237. package/dist/esm/transactions/instances/index.mjs +1 -1
  238. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  239. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  240. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  241. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  242. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  243. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  244. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  245. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  246. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  247. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  248. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  249. package/dist/esm/transactions/management/index.d.mts +2 -2
  250. package/dist/esm/transactions/management/index.mjs +1 -1
  251. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  252. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  253. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  254. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  255. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  256. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  257. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  258. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  259. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +2 -2
  260. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  261. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  262. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  263. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  264. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  265. package/dist/esm/transactions/types.d.mts +1 -1
  266. package/dist/esm/types/generated/operations.d.mts +14 -12
  267. package/dist/esm/types/generated/queries.d.mts +4 -4
  268. package/dist/esm/types/generated/queries.mjs +1 -1
  269. package/dist/esm/types/generated/types.d.mts +20 -2
  270. package/dist/esm/types/generated/types.mjs +1 -1
  271. package/dist/esm/types/generated/types.mjs.map +1 -1
  272. package/dist/esm/types/keyless.d.mts +0 -1
  273. package/dist/esm/utils/index.mjs +1 -1
  274. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  275. package/dist/esm/version.d.mts +1 -1
  276. package/dist/esm/version.mjs +1 -1
  277. package/package.json +2 -3
  278. package/src/account/EphemeralKeyPair.ts +5 -13
  279. package/src/account/KeylessAccount.ts +24 -14
  280. package/src/account/MultiKeyAccount.ts +2 -1
  281. package/src/api/keyless.ts +30 -3
  282. package/src/bcs/deserializer.ts +4 -10
  283. package/src/bcs/serializer.ts +3 -4
  284. package/src/core/crypto/keyless.ts +1 -1
  285. package/src/internal/keyless.ts +24 -16
  286. package/src/internal/queries/getFungibleAssetMetadata.graphql +2 -0
  287. package/src/transactions/transactionBuilder/signingMessage.ts +2 -2
  288. package/src/types/generated/operations.ts +14 -12
  289. package/src/types/generated/queries.ts +30 -3
  290. package/src/types/generated/types.ts +20 -2
  291. package/src/types/keyless.ts +1 -1
  292. package/src/version.ts +1 -1
  293. package/dist/esm/chunk-37FFZSIM.mjs +0 -2
  294. package/dist/esm/chunk-3IFR6T3V.mjs +0 -2
  295. package/dist/esm/chunk-3IFR6T3V.mjs.map +0 -1
  296. package/dist/esm/chunk-3RJZNUCQ.mjs +0 -2
  297. package/dist/esm/chunk-472OGHMG.mjs +0 -2
  298. package/dist/esm/chunk-474YDCFP.mjs +0 -2
  299. package/dist/esm/chunk-474YDCFP.mjs.map +0 -1
  300. package/dist/esm/chunk-4BJA3QUQ.mjs +0 -2
  301. package/dist/esm/chunk-4VPCPASN.mjs +0 -2
  302. package/dist/esm/chunk-4W7T4HRZ.mjs +0 -2
  303. package/dist/esm/chunk-4W7T4HRZ.mjs.map +0 -1
  304. package/dist/esm/chunk-54LCK6EN.mjs +0 -2
  305. package/dist/esm/chunk-5SEAQESO.mjs +0 -2
  306. package/dist/esm/chunk-5SEAQESO.mjs.map +0 -1
  307. package/dist/esm/chunk-7BW2N4IE.mjs +0 -2
  308. package/dist/esm/chunk-FBPNHF54.mjs +0 -2
  309. package/dist/esm/chunk-FIG65OJD.mjs +0 -2
  310. package/dist/esm/chunk-FR6UGCOX.mjs.map +0 -1
  311. package/dist/esm/chunk-GRHLQDHF.mjs +0 -2
  312. package/dist/esm/chunk-GSCM444Z.mjs +0 -2
  313. package/dist/esm/chunk-HP6YVTTT.mjs +0 -2
  314. package/dist/esm/chunk-IBN7ETCB.mjs +0 -2
  315. package/dist/esm/chunk-IEVABWIO.mjs +0 -2
  316. package/dist/esm/chunk-IEVABWIO.mjs.map +0 -1
  317. package/dist/esm/chunk-IT7YNITU.mjs +0 -2
  318. package/dist/esm/chunk-M3KFXIQ6.mjs +0 -2
  319. package/dist/esm/chunk-NW3WUTTD.mjs +0 -2
  320. package/dist/esm/chunk-S3EDNXZE.mjs.map +0 -1
  321. package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
  322. package/dist/esm/chunk-U5F4NL24.mjs +0 -2
  323. package/dist/esm/chunk-WA2NTBYY.mjs +0 -2
  324. package/dist/esm/chunk-YD5IB4TH.mjs +0 -2
  325. package/dist/esm/chunk-YD5IB4TH.mjs.map +0 -1
  326. package/dist/esm/core/crypto/cryptoHashable.d.mts +0 -21
  327. package/dist/esm/core/crypto/cryptoHashable.mjs +0 -2
  328. package/dist/esm/core/crypto/cryptoHashable.mjs.map +0 -1
  329. package/src/core/crypto/cryptoHashable.ts +0 -16
  330. /package/dist/esm/{chunk-IBDBKQMF.mjs.map → chunk-27EDTWDR.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-MNTLX37G.mjs.map → chunk-27IBTALL.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-JLXE5JF6.mjs.map → chunk-3XA2PJT3.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-MLX6DFMR.mjs.map → chunk-42XI3HFJ.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-ASK3DESW.mjs.map → chunk-4435A7EV.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-U2R36WTE.mjs.map → chunk-4IMYC7VX.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-ZMHGGT4E.mjs.map → chunk-4OMMO2ZM.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-IT7YNITU.mjs.map → chunk-4TODRUKS.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-PBMSO6WI.mjs.map → chunk-5AVPZE2Z.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-VJFCEX7W.mjs.map → chunk-6AO7XFMJ.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-T5YEMU53.mjs.map → chunk-6J7KF4CI.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-IXFYYWAC.mjs.map → chunk-6RI3QGKV.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-U5F4NL24.mjs.map → chunk-772PPMHG.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-TCK35M7E.mjs.map → chunk-774QDXM7.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-KDLQ2V3L.mjs.map → chunk-A5XE22JG.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-472OGHMG.mjs.map → chunk-ANH2FYMX.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-WIYDJE6F.mjs.map → chunk-AX7L7E42.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-XVZBWW46.mjs.map → chunk-B3UIFT2G.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-4VPCPASN.mjs.map → chunk-BF4ZE37Q.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-Y4E6NTAS.mjs.map → chunk-BTTZZ2IQ.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-L5ZHZWHI.mjs.map → chunk-C75WI2DU.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-R5THMTSP.mjs.map → chunk-CDTDQXTN.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-J7HG6SQO.mjs.map → chunk-CVHPBWAE.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-SNDFJWYM.mjs.map → chunk-DIJ7EEXC.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-OHZHYL3E.mjs.map → chunk-DKEUYXWU.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-GSCM444Z.mjs.map → chunk-E37YRKWK.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-IFAWCHUG.mjs.map → chunk-ENKXK5WP.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-P67NJHS5.mjs.map → chunk-EPYUPOEE.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-ZIDLP5MI.mjs.map → chunk-FDVU4LJF.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-YRUF6N3U.mjs.map → chunk-FY7RZWGY.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-FIG65OJD.mjs.map → chunk-G4UKDWKT.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-DPWEHSHH.mjs.map → chunk-GBCAP4Z5.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-YA4XTZNZ.mjs.map → chunk-GWUK3P3Y.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-WA2NTBYY.mjs.map → chunk-IMGLHDIA.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-2G4IGSGM.mjs.map → chunk-IPBKWCHZ.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-TAT3K5M7.mjs.map → chunk-JBI3MFD3.mjs.map} +0 -0
  369. /package/dist/esm/{chunk-VAKWRPVP.mjs.map → chunk-JWNKY2N3.mjs.map} +0 -0
  370. /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
  371. /package/dist/esm/{chunk-NW3WUTTD.mjs.map → chunk-LXLISEQ4.mjs.map} +0 -0
  372. /package/dist/esm/{chunk-37FFZSIM.mjs.map → chunk-M2QV232A.mjs.map} +0 -0
  373. /package/dist/esm/{chunk-7M6OCGHL.mjs.map → chunk-MIEL2ZWA.mjs.map} +0 -0
  374. /package/dist/esm/{chunk-XH33BXEY.mjs.map → chunk-MRYNASDY.mjs.map} +0 -0
  375. /package/dist/esm/{chunk-7BW2N4IE.mjs.map → chunk-MS4MRLGA.mjs.map} +0 -0
  376. /package/dist/esm/{chunk-YDNOKWV3.mjs.map → chunk-NCKTBQKI.mjs.map} +0 -0
  377. /package/dist/esm/{chunk-QFVQSFBZ.mjs.map → chunk-O5IXBRSF.mjs.map} +0 -0
  378. /package/dist/esm/{chunk-DJPYZIJY.mjs.map → chunk-OFERLF6R.mjs.map} +0 -0
  379. /package/dist/esm/{chunk-BO44HPGU.mjs.map → chunk-PI34ZZ2Q.mjs.map} +0 -0
  380. /package/dist/esm/{chunk-2H24BEJI.mjs.map → chunk-PPJYFA3V.mjs.map} +0 -0
  381. /package/dist/esm/{chunk-3SACE4I2.mjs.map → chunk-Q5M2JKZ5.mjs.map} +0 -0
  382. /package/dist/esm/{chunk-TUCCV62K.mjs.map → chunk-QUHKUJEO.mjs.map} +0 -0
  383. /package/dist/esm/{chunk-ET4WC6TJ.mjs.map → chunk-RQ7N6FTV.mjs.map} +0 -0
  384. /package/dist/esm/{chunk-MRUDDEJ3.mjs.map → chunk-S2FOCEY3.mjs.map} +0 -0
  385. /package/dist/esm/{chunk-EQF5MW2W.mjs.map → chunk-SZ2FGGM6.mjs.map} +0 -0
  386. /package/dist/esm/{chunk-KGKEU2WI.mjs.map → chunk-TSTGVIAU.mjs.map} +0 -0
  387. /package/dist/esm/{chunk-L5CPAOUM.mjs.map → chunk-VJZVCHIS.mjs.map} +0 -0
  388. /package/dist/esm/{chunk-XBVVP7O2.mjs.map → chunk-WRKH7MMI.mjs.map} +0 -0
  389. /package/dist/esm/{chunk-3RJZNUCQ.mjs.map → chunk-WV5AD4IE.mjs.map} +0 -0
  390. /package/dist/esm/{chunk-EFMAZTIM.mjs.map → chunk-XAFM4JZX.mjs.map} +0 -0
  391. /package/dist/esm/{chunk-FGGRPEQ3.mjs.map → chunk-XAISUKMY.mjs.map} +0 -0
  392. /package/dist/esm/{chunk-O6QLAP7N.mjs.map → chunk-XEYFKOYN.mjs.map} +0 -0
  393. /package/dist/esm/{chunk-5C5GZJ57.mjs.map → chunk-XHCH7LG5.mjs.map} +0 -0
  394. /package/dist/esm/{chunk-CKQ74DYE.mjs.map → chunk-XQM7P7PK.mjs.map} +0 -0
  395. /package/dist/esm/{chunk-3AIEYUPP.mjs.map → chunk-XZMPH72M.mjs.map} +0 -0
  396. /package/dist/esm/{chunk-5X5GQF3E.mjs.map → chunk-Y5PEEKOM.mjs.map} +0 -0
  397. /package/dist/esm/{chunk-GRHLQDHF.mjs.map → chunk-YJCZU6PR.mjs.map} +0 -0
  398. /package/dist/esm/{chunk-ZV5MKFV7.mjs.map → chunk-YLDLEASQ.mjs.map} +0 -0
  399. /package/dist/esm/{chunk-5UXARGTJ.mjs.map → chunk-YOJC4OXK.mjs.map} +0 -0
  400. /package/dist/esm/{chunk-HJAB473N.mjs.map → chunk-YXRXKYCR.mjs.map} +0 -0
  401. /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
@@ -25,7 +25,6 @@ type PepperFetchRequest = {
25
25
  derivation_path: string;
26
26
  };
27
27
  type PepperFetchResponse = {
28
- signature: string;
29
28
  pepper: string;
30
29
  address: string;
31
30
  };
@@ -1,2 +1,2 @@
1
- import"../chunk-GED6IT3S.mjs";import{a as q}from"../chunk-3RJZNUCQ.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{a,b,c,d,e,f,g,h}from"../chunk-SCHZ67F3.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p}from"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{m as APTOS_COIN,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,p as ProcessorType,n as RAW_TRANSACTION_SALT,o as RAW_TRANSACTION_WITH_DATA_SALT,q as normalizeBundle};
1
+ import"../chunk-GED6IT3S.mjs";import{a as q}from"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YJCZU6PR.mjs";import"../chunk-MS4MRLGA.mjs";import"../chunk-XAISUKMY.mjs";import"../chunk-6QGVRNV6.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-HPZ2S4FE.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-SCHZ67F3.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p}from"../chunk-YE5B2S5L.mjs";import"../chunk-FVA2OPG4.mjs";export{m as APTOS_COIN,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,p as ProcessorType,n as RAW_TRANSACTION_SALT,o as RAW_TRANSACTION_WITH_DATA_SALT,q as normalizeBundle};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-3RJZNUCQ.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-FVA2OPG4.mjs";export{a as normalizeBundle};
1
+ import{a}from"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-YJCZU6PR.mjs";import"../chunk-MS4MRLGA.mjs";import"../chunk-XAISUKMY.mjs";import"../chunk-6QGVRNV6.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-Q6LFIZ3L.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-HPZ2S4FE.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-FVA2OPG4.mjs";export{a as normalizeBundle};
2
2
  //# sourceMappingURL=normalizeBundle.mjs.map
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * hardcoded for now, we would want to have it injected dynamically
5
5
  */
6
- declare const VERSION = "1.17.0";
6
+ declare const VERSION = "1.18.0";
7
7
 
8
8
  export { VERSION };
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-4BJA3QUQ.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
1
+ import{a}from"./chunk-P2YIFHMW.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aptos-labs/ts-sdk",
3
3
  "description": "Aptos TypeScript SDK",
4
- "packageManager": "pnpm@9.1.4",
4
+ "packageManager": "pnpm@8.9.0",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
7
7
  "node": ">=11.0.0"
@@ -55,7 +55,6 @@
55
55
  "@scure/bip39": "^1.3.0",
56
56
  "eventemitter3": "^5.0.1",
57
57
  "form-data": "^4.0.0",
58
- "jose": "^5.1.3",
59
58
  "js-base64": "^3.7.7",
60
59
  "jwt-decode": "^4.0.0",
61
60
  "poseidon-lite": "^0.2.0"
@@ -92,5 +91,5 @@
92
91
  "typedoc": "^0.25.4",
93
92
  "typescript": "^5.3.3"
94
93
  },
95
- "version": "1.17.0-zeta.1"
94
+ "version": "1.18.0"
96
95
  }
@@ -60,7 +60,11 @@ export class EphemeralKeyPair extends Serializable {
60
60
  // Generate the blinder if not provided
61
61
  this.blinder = blinder !== undefined ? Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();
62
62
  // Calculate the nonce
63
- this.nonce = this.generateNonce();
63
+ const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);
64
+ fields.push(BigInt(this.expiryDateSecs));
65
+ fields.push(bytesToBigIntLE(this.blinder));
66
+ const nonceHash = poseidonHash(fields);
67
+ this.nonce = nonceHash.toString();
64
68
  }
65
69
 
66
70
  /**
@@ -124,18 +128,6 @@ export class EphemeralKeyPair extends Serializable {
124
128
  return new EphemeralKeyPair({ privateKey, expiryDateSecs: args?.expiryDateSecs });
125
129
  }
126
130
 
127
- /**
128
- * From the ephemeral public key, expiry timestamp, and blinder, calculate the nonce to be used at authentication via OIDC.
129
- * @returns string
130
- */
131
- private generateNonce(): string {
132
- const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);
133
- fields.push(BigInt(this.expiryDateSecs));
134
- fields.push(bytesToBigIntLE(this.blinder));
135
- const nonceHash = poseidonHash(fields);
136
- return nonceHash.toString();
137
- }
138
-
139
131
  /**
140
132
  * Sign the given message with the private key.
141
133
  * @param data in HexInput format
@@ -21,9 +21,8 @@ import { EphemeralKeyPair } from "./EphemeralKeyPair";
21
21
  import { Hex } from "../core/hex";
22
22
  import { AccountAuthenticatorSingleKey } from "../transactions/authenticator/account";
23
23
  import { Deserializer, Serializable, Serializer } from "../bcs";
24
- import { deriveTransactionType } from "../transactions/transactionBuilder/signingMessage";
24
+ import { deriveTransactionType, generateSigningMessage } from "../transactions/transactionBuilder/signingMessage";
25
25
  import { AnyRawTransaction, AnyRawTransactionInstance } from "../transactions/types";
26
- import { AptsoDomainSeparator, CryptoHashable } from "../core/crypto/cryptoHashable";
27
26
  import { base64UrlDecode } from "../utils/helpers";
28
27
 
29
28
  /**
@@ -101,7 +100,8 @@ export class KeylessAccount extends Serializable implements Account {
101
100
  */
102
101
  private readonly emitter: EventEmitter<ProofFetchEvents>;
103
102
 
104
- constructor(args: {
103
+ // Use the static constructor 'create' instead.
104
+ private constructor(args: {
105
105
  address?: AccountAddress;
106
106
  ephemeralKeyPair: EphemeralKeyPair;
107
107
  iss: string;
@@ -109,12 +109,12 @@ export class KeylessAccount extends Serializable implements Account {
109
109
  uidVal: string;
110
110
  aud: string;
111
111
  pepper: HexInput;
112
- proofOrFetcher: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
112
+ proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
113
113
  proofFetchCallback?: ProofFetchCallback;
114
114
  jwt: string;
115
115
  }) {
116
116
  super();
117
- const { address, ephemeralKeyPair, uidKey, uidVal, aud, pepper, proofOrFetcher, proofFetchCallback, jwt } = args;
117
+ const { address, ephemeralKeyPair, uidKey, uidVal, aud, pepper, proof, proofFetchCallback, jwt } = args;
118
118
  this.ephemeralKeyPair = ephemeralKeyPair;
119
119
  this.publicKey = KeylessPublicKey.create(args);
120
120
  this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
@@ -123,9 +123,9 @@ export class KeylessAccount extends Serializable implements Account {
123
123
  this.aud = aud;
124
124
  this.jwt = jwt;
125
125
  this.emitter = new EventEmitter<ProofFetchEvents>();
126
- this.proofOrPromise = proofOrFetcher;
127
- if (proofOrFetcher instanceof ZeroKnowledgeSig) {
128
- this.proof = proofOrFetcher;
126
+ this.proofOrPromise = proof;
127
+ if (proof instanceof ZeroKnowledgeSig) {
128
+ this.proof = proof;
129
129
  } else {
130
130
  if (proofFetchCallback === undefined) {
131
131
  throw new Error("Must provide callback for async proof fetch");
@@ -134,7 +134,7 @@ export class KeylessAccount extends Serializable implements Account {
134
134
  await proofFetchCallback(status);
135
135
  this.emitter.removeAllListeners();
136
136
  });
137
- this.init(proofOrFetcher);
137
+ this.init(proof);
138
138
  }
139
139
  this.signingScheme = SigningScheme.SingleKey;
140
140
  const pepperBytes = Hex.fromHexInput(pepper).toUint8Array();
@@ -279,6 +279,7 @@ export class KeylessAccount extends Serializable implements Account {
279
279
  }
280
280
 
281
281
  static create(args: {
282
+ address?: AccountAddress;
282
283
  proof: ZeroKnowledgeSig | Promise<ZeroKnowledgeSig>;
283
284
  jwt: string;
284
285
  ephemeralKeyPair: EphemeralKeyPair;
@@ -286,7 +287,7 @@ export class KeylessAccount extends Serializable implements Account {
286
287
  uidKey?: string;
287
288
  proofFetchCallback?: ProofFetchCallback;
288
289
  }): KeylessAccount {
289
- const { proof, jwt, ephemeralKeyPair, pepper, uidKey = "sub", proofFetchCallback } = args;
290
+ const { address, proof, jwt, ephemeralKeyPair, pepper, uidKey = "sub", proofFetchCallback } = args;
290
291
 
291
292
  const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);
292
293
  const iss = jwtPayload.iss!;
@@ -296,7 +297,8 @@ export class KeylessAccount extends Serializable implements Account {
296
297
  const aud = jwtPayload.aud!;
297
298
  const uidVal = jwtPayload[uidKey];
298
299
  return new KeylessAccount({
299
- proofOrFetcher: proof,
300
+ address,
301
+ proof,
300
302
  ephemeralKeyPair,
301
303
  iss,
302
304
  uidKey,
@@ -313,7 +315,7 @@ export class KeylessAccount extends Serializable implements Account {
313
315
  * A container class to hold a transaction and a proof. It implements CryptoHashable which is used to create
314
316
  * the signing message for Keyless transactions. We sign over the proof to ensure non-malleability.
315
317
  */
316
- export class TransactionAndProof extends CryptoHashable {
318
+ class TransactionAndProof extends Serializable {
317
319
  /**
318
320
  * The transaction to sign.
319
321
  */
@@ -327,19 +329,27 @@ export class TransactionAndProof extends CryptoHashable {
327
329
  /**
328
330
  * The domain separator prefix used when hashing.
329
331
  */
330
- domainSeparator: AptsoDomainSeparator;
332
+ readonly domainSeparator = "APTOS::TransactionAndProof";
331
333
 
332
334
  constructor(transaction: AnyRawTransactionInstance, proof?: ZkProof) {
333
335
  super();
334
336
  this.transaction = transaction;
335
337
  this.proof = proof;
336
- this.domainSeparator = "APTOS::TransactionAndProof";
337
338
  }
338
339
 
339
340
  serialize(serializer: Serializer): void {
340
341
  serializer.serializeFixedBytes(this.transaction.bcsToBytes());
341
342
  serializer.serializeOption(this.proof);
342
343
  }
344
+
345
+ /**
346
+ * Hashes the bcs serialized from of the class. This is the typescript corollary to the BCSCryptoHash macro in aptos-core.
347
+ *
348
+ * @returns Uint8Array
349
+ */
350
+ hash(): Uint8Array {
351
+ return generateSigningMessage(this.bcsToBytes(), this.domainSeparator);
352
+ }
343
353
  }
344
354
 
345
355
  export type ProofFetchSuccess = {
@@ -131,7 +131,8 @@ export class MultiKeyAccount implements Account {
131
131
  */
132
132
  async waitForProofFetch() {
133
133
  const keylessSigners = this.signers.filter((signer) => signer instanceof KeylessAccount) as KeylessAccount[];
134
- await Promise.all(keylessSigners.filter((signer) => signer.proof instanceof Promise).map((signer) => signer.proof));
134
+ const promises = keylessSigners.map(async (signer) => signer.waitForProofFetch());
135
+ await Promise.all(promises);
135
136
  }
136
137
 
137
138
  /**
@@ -2,7 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
5
- import { deriveKeylessAccount, getPepper } from "../internal/keyless";
5
+ import { ZeroKnowledgeSig } from "../core";
6
+ import { deriveKeylessAccount, getPepper, getProof } from "../internal/keyless";
6
7
  import { HexInput } from "../types";
7
8
  import { AptosConfig } from "./aptosConfig";
8
9
 
@@ -20,14 +21,40 @@ export class Keyless {
20
21
  *
21
22
  * @param args.jwt JWT token
22
23
  * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
24
+ * @param args.derivationPath a derivation path used for creating multiple accounts per user via the BIP-44 standard. Defaults
25
+ * to "m/44'/637'/0'/0'/0".
23
26
  * @returns The pepper which is a Uint8Array of length 31.
24
27
  */
25
- async getPepper(args: { jwt: string; ephemeralKeyPair: EphemeralKeyPair }): Promise<Uint8Array> {
28
+ async getPepper(args: {
29
+ jwt: string;
30
+ ephemeralKeyPair: EphemeralKeyPair;
31
+ derivationPath?: string;
32
+ }): Promise<Uint8Array> {
26
33
  return getPepper({ aptosConfig: this.config, ...args });
27
34
  }
28
35
 
29
36
  /**
30
- * Fetches the pepper from the Aptos pepper service API.
37
+ * Fetches a proof from the Aptos prover service API.
38
+ *
39
+ * @param args.jwt JWT token
40
+ * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
41
+ * @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
42
+ * @param args.pepper the pepper used for the account. If not provided it will be fetched from the Aptos pepper service
43
+ *
44
+ * @returns The proof which is represented by a ZeroKnowledgeSig.
45
+ */
46
+ async getProof(args: {
47
+ jwt: string;
48
+ ephemeralKeyPair: EphemeralKeyPair;
49
+ pepper?: HexInput;
50
+ uidKey?: string;
51
+ }): Promise<ZeroKnowledgeSig> {
52
+ return getProof({ aptosConfig: this.config, ...args });
53
+ }
54
+
55
+ /**
56
+ * Derives the Keyless Account from the JWT token and corresponding EphemeralKeyPair. It will lookup the pepper from
57
+ * the pepper service if not explicitly provided. It will compute the proof via the proving service. It will ch
31
58
  *
32
59
  * @param args.jwt JWT token
33
60
  * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
@@ -69,11 +69,8 @@ export class Deserializer {
69
69
  * ```
70
70
  */
71
71
  deserializeOptionStr(): string | undefined {
72
- const exists = this.deserializeUleb128AsU32();
73
- if (exists === 1) {
74
- return this.deserializeStr();
75
- }
76
- return undefined;
72
+ const exists = this.deserializeBool();
73
+ return exists ? this.deserializeStr() : undefined;
77
74
  }
78
75
 
79
76
  /**
@@ -95,11 +92,8 @@ export class Deserializer {
95
92
  * @returns the deserialized value of class type T
96
93
  */
97
94
  deserializeOption<T>(cls: Deserializable<T>): T | undefined {
98
- const exists = this.deserializeUleb128AsU32();
99
- if (exists === 1) {
100
- return this.deserialize(cls);
101
- }
102
- return undefined;
95
+ const exists = this.deserializeBool();
96
+ return exists ? this.deserialize(cls) : undefined;
103
97
  }
104
98
 
105
99
  /**
@@ -336,10 +336,9 @@ export class Serializer {
336
336
  * ```
337
337
  */
338
338
  serializeOption<T extends Serializable>(value?: T): void {
339
- if (value === undefined) {
340
- this.serializeU32AsUleb128(0);
341
- } else {
342
- this.serializeU32AsUleb128(1);
339
+ const hasValue = value !== undefined;
340
+ this.serializeBool(hasValue);
341
+ if (hasValue) {
343
342
  value.serialize(this);
344
343
  }
345
344
  }
@@ -155,7 +155,7 @@ export class KeylessPublicKey extends AccountPublicKey {
155
155
  return new KeylessPublicKey(args.iss, computeIdCommitment(args));
156
156
  }
157
157
 
158
- static fromJWTAndPepper(args: { jwt: string; pepper: HexInput; uidKey?: string }): KeylessPublicKey {
158
+ static fromJwtAndPepper(args: { jwt: string; pepper: HexInput; uidKey?: string }): KeylessPublicKey {
159
159
  const { jwt, pepper, uidKey = "sub" } = args;
160
160
  const jwtPayload = jwtDecode<JwtPayload & { [key: string]: string }>(jwt);
161
161
  const iss = jwtPayload.iss!;
@@ -9,11 +9,20 @@
9
9
  */
10
10
  import { AptosConfig } from "../api/aptosConfig";
11
11
  import { postAptosPepperService, postAptosProvingService } from "../client";
12
- import { EphemeralSignature, Groth16Zkp, Hex, ZeroKnowledgeSig, ZkProof, getKeylessConfig } from "../core";
12
+ import {
13
+ EphemeralSignature,
14
+ Groth16Zkp,
15
+ Hex,
16
+ KeylessPublicKey,
17
+ ZeroKnowledgeSig,
18
+ ZkProof,
19
+ getKeylessConfig,
20
+ } from "../core";
13
21
  import { HexInput, ZkpVariant } from "../types";
14
22
  import { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
15
23
  import { PepperFetchRequest, PepperFetchResponse, ProverRequest, ProverResponse } from "../types/keyless";
16
24
  import { nowInSeconds } from "../utils/helpers";
25
+ import { lookupOriginalAccountAddress } from "./account";
17
26
 
18
27
  export async function getPepper(args: {
19
28
  aptosConfig: AptosConfig;
@@ -46,10 +55,13 @@ export async function getProof(args: {
46
55
  aptosConfig: AptosConfig;
47
56
  jwt: string;
48
57
  ephemeralKeyPair: EphemeralKeyPair;
49
- pepper: HexInput;
58
+ pepper?: HexInput;
50
59
  uidKey?: string;
51
60
  }): Promise<ZeroKnowledgeSig> {
52
- const { aptosConfig, jwt, ephemeralKeyPair, pepper, uidKey = "sub" } = args;
61
+ const { aptosConfig, jwt, ephemeralKeyPair, pepper = await getPepper(args), uidKey = "sub" } = args;
62
+ if (Hex.fromHexInput(pepper).toUint8Array().length !== KeylessAccount.PEPPER_LENGTH) {
63
+ throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);
64
+ }
53
65
  const { maxExpHorizonSecs } = await getKeylessConfig({ aptosConfig });
54
66
  if (maxExpHorizonSecs < ephemeralKeyPair.expiryDateSecs - nowInSeconds()) {
55
67
  throw Error(`The EphemeralKeyPair is too long lived. It's lifespan must be less than ${maxExpHorizonSecs}`);
@@ -95,18 +107,7 @@ export async function deriveKeylessAccount(args: {
95
107
  pepper?: HexInput;
96
108
  proofFetchCallback?: ProofFetchCallback;
97
109
  }): Promise<KeylessAccount> {
98
- const { proofFetchCallback } = args;
99
- let { pepper } = args;
100
- if (pepper === undefined) {
101
- pepper = await getPepper(args);
102
- } else {
103
- pepper = Hex.fromHexInput(pepper).toUint8Array();
104
- }
105
-
106
- if (pepper.length !== KeylessAccount.PEPPER_LENGTH) {
107
- throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);
108
- }
109
-
110
+ const { aptosConfig, jwt, uidKey, proofFetchCallback, pepper = await getPepper(args) } = args;
110
111
  const proofPromise = getProof({ ...args, pepper });
111
112
  // If a callback is provided, pass in the proof as a promise to KeylessAccount.create. This will make the proof be fetched in the
112
113
  // background and the callback will handle the outcome of the fetch. This allows the developer to not have to block on the proof fetch
@@ -115,7 +116,14 @@ export async function deriveKeylessAccount(args: {
115
116
  // If no callback is provided, the just await the proof fetch and continue syncronously.
116
117
  const proof = proofFetchCallback ? proofPromise : await proofPromise;
117
118
 
118
- const keylessAccount = KeylessAccount.create({ ...args, proof, pepper, proofFetchCallback });
119
+ // Look up the original address to handle key rotations
120
+ const publicKey = KeylessPublicKey.fromJwtAndPepper({ jwt, pepper, uidKey });
121
+ const address = await lookupOriginalAccountAddress({
122
+ aptosConfig,
123
+ authenticationKey: publicKey.authKey().derivedAddress(),
124
+ });
125
+
126
+ const keylessAccount = KeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback });
119
127
 
120
128
  return keylessAccount;
121
129
  }
@@ -12,5 +12,7 @@ query getFungibleAssetMetadata($where_condition: fungible_asset_metadata_bool_ex
12
12
  name
13
13
  symbol
14
14
  token_standard
15
+ supply_v2
16
+ maximum_v2
15
17
  }
16
18
  }
@@ -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,7 +61,7 @@ export function generateSigningMessage(bytes: Uint8Array, domainSeparator: strin
61
61
  }
62
62
 
63
63
  /**
64
- * @deprected
64
+ * @deprecated
65
65
  * Use CryptoHashable instead by having your class implement it and call hash() to get the signing message.
66
66
  *
67
67
  * Generates the 'signing message' form of a serilizable value. It bcs serializes the value and uses the name of
@@ -49,13 +49,13 @@ export type CurrentTokenOwnershipFieldsFragment = {
49
49
  last_transaction_timestamp: any;
50
50
  last_transaction_version: any;
51
51
  maximum?: any | null;
52
- supply: any;
52
+ supply?: any | null;
53
53
  token_data_id: string;
54
54
  token_name: string;
55
55
  token_properties: any;
56
56
  token_standard: string;
57
57
  token_uri: string;
58
- decimals: any;
58
+ decimals?: any | null;
59
59
  current_collection?: {
60
60
  collection_id: string;
61
61
  collection_name: string;
@@ -206,13 +206,13 @@ export type GetAccountOwnedTokensQuery = {
206
206
  last_transaction_timestamp: any;
207
207
  last_transaction_version: any;
208
208
  maximum?: any | null;
209
- supply: any;
209
+ supply?: any | null;
210
210
  token_data_id: string;
211
211
  token_name: string;
212
212
  token_properties: any;
213
213
  token_standard: string;
214
214
  token_uri: string;
215
- decimals: any;
215
+ decimals?: any | null;
216
216
  current_collection?: {
217
217
  collection_id: string;
218
218
  collection_name: string;
@@ -262,13 +262,13 @@ export type GetAccountOwnedTokensByTokenDataQuery = {
262
262
  last_transaction_timestamp: any;
263
263
  last_transaction_version: any;
264
264
  maximum?: any | null;
265
- supply: any;
265
+ supply?: any | null;
266
266
  token_data_id: string;
267
267
  token_name: string;
268
268
  token_properties: any;
269
269
  token_standard: string;
270
270
  token_uri: string;
271
- decimals: any;
271
+ decimals?: any | null;
272
272
  current_collection?: {
273
273
  collection_id: string;
274
274
  collection_name: string;
@@ -318,13 +318,13 @@ export type GetAccountOwnedTokensFromCollectionQuery = {
318
318
  last_transaction_timestamp: any;
319
319
  last_transaction_version: any;
320
320
  maximum?: any | null;
321
- supply: any;
321
+ supply?: any | null;
322
322
  token_data_id: string;
323
323
  token_name: string;
324
324
  token_properties: any;
325
325
  token_standard: string;
326
326
  token_uri: string;
327
- decimals: any;
327
+ decimals?: any | null;
328
328
  current_collection?: {
329
329
  collection_id: string;
330
330
  collection_name: string;
@@ -496,6 +496,8 @@ export type GetFungibleAssetMetadataQuery = {
496
496
  name: string;
497
497
  symbol: string;
498
498
  token_standard: string;
499
+ supply_v2?: any | null;
500
+ maximum_v2?: any | null;
499
501
  }>;
500
502
  };
501
503
 
@@ -620,13 +622,13 @@ export type GetCurrentTokenOwnershipQuery = {
620
622
  last_transaction_timestamp: any;
621
623
  last_transaction_version: any;
622
624
  maximum?: any | null;
623
- supply: any;
625
+ supply?: any | null;
624
626
  token_data_id: string;
625
627
  token_name: string;
626
628
  token_properties: any;
627
629
  token_standard: string;
628
630
  token_uri: string;
629
- decimals: any;
631
+ decimals?: any | null;
630
632
  current_collection?: {
631
633
  collection_id: string;
632
634
  collection_name: string;
@@ -663,13 +665,13 @@ export type GetTokenDataQuery = {
663
665
  last_transaction_timestamp: any;
664
666
  last_transaction_version: any;
665
667
  maximum?: any | null;
666
- supply: any;
668
+ supply?: any | null;
667
669
  token_data_id: string;
668
670
  token_name: string;
669
671
  token_properties: any;
670
672
  token_standard: string;
671
673
  token_uri: string;
672
- decimals: any;
674
+ decimals?: any | null;
673
675
  current_collection?: {
674
676
  collection_id: string;
675
677
  collection_name: string;