@aptos-labs/ts-sdk 1.27.1 → 1.28.0-zeta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. package/dist/common/{accountAddress-LOYE4_sG.d.ts → accountAddress-0OnKb1b9.d.ts} +5 -3
  2. package/dist/common/chunk-HBPH2AD3.js +2 -0
  3. package/dist/common/chunk-HBPH2AD3.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/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +252 -41
  8. package/dist/common/index.js +28 -28
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-B1VMJOY2.d.mts → Ed25519Account-9zBaZEnp.d.mts} +1 -1
  11. package/dist/esm/account/Account.d.mts +2 -2
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  14. package/dist/esm/account/Ed25519Account.mjs +1 -1
  15. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -1
  16. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  17. package/dist/esm/account/FederatedKeylessAccount.d.mts +75 -0
  18. package/dist/esm/account/FederatedKeylessAccount.mjs +2 -0
  19. package/dist/esm/account/KeylessAccount.d.mts +13 -130
  20. package/dist/esm/account/KeylessAccount.mjs +1 -1
  21. package/dist/esm/account/KeylessAccountCommon.d.mts +207 -0
  22. package/dist/esm/account/KeylessAccountCommon.mjs +2 -0
  23. package/dist/esm/account/MultiKeyAccount.d.mts +4 -3
  24. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  25. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  26. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  27. package/dist/esm/account/index.d.mts +6 -3
  28. package/dist/esm/account/index.mjs +1 -1
  29. package/dist/esm/api/account.d.mts +4 -3
  30. package/dist/esm/api/account.mjs +1 -1
  31. package/dist/esm/api/ans.d.mts +2 -2
  32. package/dist/esm/api/ans.mjs +1 -1
  33. package/dist/esm/api/aptos.d.mts +5 -2
  34. package/dist/esm/api/aptos.mjs +1 -1
  35. package/dist/esm/api/aptosConfig.mjs +1 -1
  36. package/dist/esm/api/coin.d.mts +1 -1
  37. package/dist/esm/api/coin.mjs +1 -1
  38. package/dist/esm/api/digitalAsset.d.mts +2 -2
  39. package/dist/esm/api/digitalAsset.mjs +1 -1
  40. package/dist/esm/api/event.mjs +1 -1
  41. package/dist/esm/api/faucet.mjs +1 -1
  42. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  43. package/dist/esm/api/fungibleAsset.mjs +1 -1
  44. package/dist/esm/api/general.d.mts +1 -1
  45. package/dist/esm/api/general.mjs +1 -1
  46. package/dist/esm/api/index.d.mts +5 -2
  47. package/dist/esm/api/index.mjs +1 -1
  48. package/dist/esm/api/keyless.d.mts +35 -21
  49. package/dist/esm/api/keyless.mjs +1 -1
  50. package/dist/esm/api/object.mjs +1 -1
  51. package/dist/esm/api/staking.mjs +1 -1
  52. package/dist/esm/api/table.mjs +1 -1
  53. package/dist/esm/api/transaction.d.mts +2 -2
  54. package/dist/esm/api/transaction.mjs +1 -1
  55. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  56. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  57. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  58. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  59. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  60. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  61. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  62. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  63. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  64. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  65. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  66. package/dist/esm/api/utils.mjs +1 -1
  67. package/dist/esm/bcs/index.d.mts +1 -1
  68. package/dist/esm/bcs/index.mjs +1 -1
  69. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  70. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  71. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  72. package/dist/esm/bcs/serializable/moveStructs.d.mts +10 -1
  73. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  74. package/dist/esm/bcs/serializer.mjs +1 -1
  75. package/dist/esm/chunk-23J256KA.mjs +2 -0
  76. package/dist/esm/chunk-23J256KA.mjs.map +1 -0
  77. package/dist/esm/{chunk-QE5OL6KN.mjs → chunk-2MDJ763P.mjs} +2 -2
  78. package/dist/esm/{chunk-WFOYGJS5.mjs → chunk-2Z6HETKH.mjs} +2 -2
  79. package/dist/esm/{chunk-G5MGSV7Y.mjs → chunk-3CE63FFN.mjs} +2 -2
  80. package/dist/esm/chunk-3TSO6PDV.mjs +2 -0
  81. package/dist/esm/{chunk-2N2VEGT6.mjs → chunk-3XX3675G.mjs} +2 -2
  82. package/dist/esm/{chunk-ZXYTLPP6.mjs → chunk-4I6IUAHQ.mjs} +2 -2
  83. package/dist/esm/{chunk-UV7M72QD.mjs → chunk-4QVGK2KD.mjs} +2 -2
  84. package/dist/esm/{chunk-SUJLWCRN.mjs → chunk-5FPWLBZT.mjs} +2 -2
  85. package/dist/esm/chunk-5HI4R3A2.mjs +2 -0
  86. package/dist/esm/{chunk-AYX5JMB4.mjs → chunk-5HWJ3SN4.mjs} +2 -2
  87. package/dist/esm/{chunk-3SPU4V2B.mjs → chunk-5RNKD3GW.mjs} +2 -2
  88. package/dist/esm/{chunk-SCHZ67F3.mjs → chunk-5VQK4F5X.mjs} +2 -2
  89. package/dist/esm/{chunk-SCHZ67F3.mjs.map → chunk-5VQK4F5X.mjs.map} +1 -1
  90. package/dist/esm/{chunk-7Y3MRBG6.mjs → chunk-6LC7ZJEI.mjs} +2 -2
  91. package/dist/esm/{chunk-76HTG7Z7.mjs → chunk-7BPKOPP7.mjs} +2 -2
  92. package/dist/esm/chunk-7T5CUI2H.mjs +2 -0
  93. package/dist/esm/{chunk-Q7MD4V7H.mjs.map → chunk-7T5CUI2H.mjs.map} +1 -1
  94. package/dist/esm/{chunk-HRIYZBXY.mjs → chunk-ADLWXCGV.mjs} +2 -2
  95. package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
  96. package/dist/esm/chunk-ASQIKTEF.mjs +2 -0
  97. package/dist/esm/chunk-ASQIKTEF.mjs.map +1 -0
  98. package/dist/esm/{chunk-GNFEBKFV.mjs → chunk-AT2A7OZD.mjs} +2 -2
  99. package/dist/esm/{chunk-A4T373F3.mjs → chunk-AWQNX3RT.mjs} +2 -2
  100. package/dist/esm/{chunk-NWOMSL6K.mjs → chunk-AZ642ORV.mjs} +2 -2
  101. package/dist/esm/chunk-B2RQPJYZ.mjs +2 -0
  102. package/dist/esm/chunk-B2RQPJYZ.mjs.map +1 -0
  103. package/dist/esm/{chunk-52KPINA4.mjs → chunk-B5NYEWNM.mjs} +2 -2
  104. package/dist/esm/chunk-BC5BEOKM.mjs +2 -0
  105. package/dist/esm/{chunk-G7UNU5GI.mjs → chunk-BQPQLOIW.mjs} +2 -2
  106. package/dist/esm/chunk-CBRVPQV6.mjs +2 -0
  107. package/dist/esm/chunk-CBRVPQV6.mjs.map +1 -0
  108. package/dist/esm/chunk-CDIKSNSU.mjs +2 -0
  109. package/dist/esm/{chunk-7AIKM3UF.mjs → chunk-CSNIVFPZ.mjs} +2 -2
  110. package/dist/esm/chunk-DYMN66K5.mjs +2 -0
  111. package/dist/esm/{chunk-4ZMI5G5L.mjs.map → chunk-DYMN66K5.mjs.map} +1 -1
  112. package/dist/esm/{chunk-3NRBTP3S.mjs → chunk-E2WOZVJX.mjs} +2 -2
  113. package/dist/esm/{chunk-H33YIMTU.mjs → chunk-E5LYYWAS.mjs} +2 -2
  114. package/dist/esm/chunk-E7VSBBQM.mjs +2 -0
  115. package/dist/esm/{chunk-YPHH6CAO.mjs.map → chunk-E7VSBBQM.mjs.map} +1 -1
  116. package/dist/esm/{chunk-OHRL766V.mjs → chunk-EDVGFSB5.mjs} +2 -2
  117. package/dist/esm/{chunk-OHRL766V.mjs.map → chunk-EDVGFSB5.mjs.map} +1 -1
  118. package/dist/esm/{chunk-ZQFFRZJ4.mjs → chunk-ELPTV7ZG.mjs} +2 -2
  119. package/dist/esm/chunk-EXP5STXZ.mjs +2 -0
  120. package/dist/esm/chunk-EXP5STXZ.mjs.map +1 -0
  121. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  122. package/dist/esm/{chunk-UWPO7WWS.mjs → chunk-FDD6WNN6.mjs} +2 -2
  123. package/dist/esm/{chunk-6ERHGCK2.mjs → chunk-FDTLBR6D.mjs} +2 -2
  124. package/dist/esm/chunk-FOLCONSQ.mjs +2 -0
  125. package/dist/esm/{chunk-5IUXBOS5.mjs → chunk-FTBXTZM2.mjs} +2 -2
  126. package/dist/esm/{chunk-UO52TECC.mjs → chunk-G6HZPSZ3.mjs} +2 -2
  127. package/dist/esm/chunk-GAEAYY44.mjs +1 -0
  128. package/dist/esm/chunk-GAEAYY44.mjs.map +1 -0
  129. package/dist/esm/{chunk-ZXPBRVOA.mjs → chunk-GKRIMGKW.mjs} +2 -2
  130. package/dist/esm/{chunk-MEKXPGK7.mjs → chunk-GX2II7H4.mjs} +2 -2
  131. package/dist/esm/{chunk-I5XQKNOK.mjs → chunk-H3TJNBHX.mjs} +2 -2
  132. package/dist/esm/{chunk-MLL54PYO.mjs → chunk-HAT5S2XX.mjs} +2 -2
  133. package/dist/esm/{chunk-MLL54PYO.mjs.map → chunk-HAT5S2XX.mjs.map} +1 -1
  134. package/dist/esm/chunk-IA4RELOH.mjs +1 -0
  135. package/dist/esm/chunk-IA4RELOH.mjs.map +1 -0
  136. package/dist/esm/{chunk-USOIC4HO.mjs → chunk-J3PN353M.mjs} +2 -2
  137. package/dist/esm/{chunk-SONTIUAM.mjs → chunk-J45FMNYT.mjs} +2 -2
  138. package/dist/esm/{chunk-HHU7UCFI.mjs → chunk-K7ZPRL7C.mjs} +2 -2
  139. package/dist/esm/chunk-K7ZPRL7C.mjs.map +1 -0
  140. package/dist/esm/{chunk-NRRADUK4.mjs → chunk-KBIYKNM2.mjs} +2 -2
  141. package/dist/esm/{chunk-T2NJUIOQ.mjs → chunk-KSOKGREZ.mjs} +2 -2
  142. package/dist/esm/{chunk-ORXEFE6X.mjs → chunk-LY7ZRAJT.mjs} +2 -2
  143. package/dist/esm/chunk-MSK4O4KB.mjs +2 -0
  144. package/dist/esm/chunk-MSK4O4KB.mjs.map +1 -0
  145. package/dist/esm/{chunk-FOHGSNYZ.mjs → chunk-MYRN7MDF.mjs} +2 -2
  146. package/dist/esm/{chunk-PO33LVUF.mjs → chunk-MZB3J6CV.mjs} +2 -2
  147. package/dist/esm/chunk-N6EC72OZ.mjs +2 -0
  148. package/dist/esm/chunk-ND23H3AK.mjs +2 -0
  149. package/dist/esm/{chunk-JKNTGRSQ.mjs → chunk-NGIPNL7N.mjs} +2 -2
  150. package/dist/esm/{chunk-ZZRSKHWS.mjs → chunk-NOVJ2ROD.mjs} +2 -2
  151. package/dist/esm/chunk-OOVNFKA6.mjs +2 -0
  152. package/dist/esm/{chunk-OEOUZFHD.mjs → chunk-OVI2RY5L.mjs} +2 -2
  153. package/dist/esm/{chunk-FNT3VLRD.mjs → chunk-P4FYT4LC.mjs} +2 -2
  154. package/dist/esm/chunk-PBMXWRZG.mjs +2 -0
  155. package/dist/esm/chunk-PBMXWRZG.mjs.map +1 -0
  156. package/dist/esm/chunk-PEYLPXU6.mjs +2 -0
  157. package/dist/esm/chunk-PEYLPXU6.mjs.map +1 -0
  158. package/dist/esm/chunk-QIOBANW2.mjs +2 -0
  159. package/dist/esm/chunk-QIOBANW2.mjs.map +1 -0
  160. package/dist/esm/chunk-QP2A5ISX.mjs +2 -0
  161. package/dist/esm/{chunk-KEN2VRIM.mjs → chunk-QQGCMXIV.mjs} +2 -2
  162. package/dist/esm/{chunk-O4BBULNE.mjs → chunk-QTTDBQAJ.mjs} +2 -2
  163. package/dist/esm/{chunk-6BYVG7H4.mjs → chunk-QUTP2ACU.mjs} +2 -2
  164. package/dist/esm/{chunk-PY4TS34X.mjs → chunk-RLGIYYI7.mjs} +2 -2
  165. package/dist/esm/{chunk-5L3PLK3W.mjs → chunk-S3I4THN5.mjs} +2 -2
  166. package/dist/esm/{chunk-GHKMF253.mjs → chunk-S7KCJQOA.mjs} +2 -2
  167. package/dist/esm/{chunk-WRRQ7L5K.mjs → chunk-SHOPSMRK.mjs} +2 -2
  168. package/dist/esm/{chunk-YDZBU2DJ.mjs → chunk-SP4PT77Z.mjs} +2 -2
  169. package/dist/esm/chunk-SVO6PVAX.mjs +2 -0
  170. package/dist/esm/chunk-SVO6PVAX.mjs.map +1 -0
  171. package/dist/esm/{chunk-74YFNJ7A.mjs → chunk-SYKVA363.mjs} +2 -2
  172. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  173. package/dist/esm/chunk-TKQEC2WD.mjs +2 -0
  174. package/dist/esm/chunk-TKQEC2WD.mjs.map +1 -0
  175. package/dist/esm/chunk-TVWAYKEP.mjs +2 -0
  176. package/dist/esm/{chunk-CTJX4CUF.mjs → chunk-U72MLMGP.mjs} +2 -2
  177. package/dist/esm/chunk-UAL27G6B.mjs +2 -0
  178. package/dist/esm/chunk-UAL27G6B.mjs.map +1 -0
  179. package/dist/esm/chunk-UW5TIZFE.mjs +2 -0
  180. package/dist/esm/chunk-UYYQZDVB.mjs +2 -0
  181. package/dist/esm/chunk-UYYQZDVB.mjs.map +1 -0
  182. package/dist/esm/{chunk-NMD45OTM.mjs → chunk-VTEOS4PS.mjs} +2 -2
  183. package/dist/esm/{chunk-NCWD4NA3.mjs → chunk-VVWBJKEA.mjs} +2 -2
  184. package/dist/esm/chunk-W2KQ2TSH.mjs +2 -0
  185. package/dist/esm/chunk-W2KQ2TSH.mjs.map +1 -0
  186. package/dist/esm/{chunk-HKMG3LZX.mjs → chunk-YACGA3YS.mjs} +2 -2
  187. package/dist/esm/{chunk-ECKJI2TV.mjs → chunk-YBZI6U43.mjs} +2 -2
  188. package/dist/esm/chunk-YELQZVBK.mjs +2 -0
  189. package/dist/esm/chunk-YELQZVBK.mjs.map +1 -0
  190. package/dist/esm/{chunk-F7NVDHR2.mjs → chunk-YNLAYIFQ.mjs} +2 -2
  191. package/dist/esm/chunk-YNLAYIFQ.mjs.map +1 -0
  192. package/dist/esm/{chunk-2CC67KW5.mjs → chunk-YSVXROOO.mjs} +2 -2
  193. package/dist/esm/chunk-ZAHUEAGT.mjs +2 -0
  194. package/dist/esm/chunk-ZAHUEAGT.mjs.map +1 -0
  195. package/dist/esm/chunk-ZASN3QQQ.mjs +2 -0
  196. package/dist/esm/chunk-ZXVQ2OBJ.mjs +2 -0
  197. package/dist/esm/{chunk-ZEYOFDIO.mjs.map → chunk-ZXVQ2OBJ.mjs.map} +1 -1
  198. package/dist/esm/{chunk-A63SMUOU.mjs → chunk-ZZIMFLVT.mjs} +2 -2
  199. package/dist/esm/cli/index.mjs +1 -1
  200. package/dist/esm/cli/localNode.mjs +1 -1
  201. package/dist/esm/cli/move.mjs +1 -1
  202. package/dist/esm/client/core.mjs +1 -1
  203. package/dist/esm/client/get.mjs +1 -1
  204. package/dist/esm/client/index.mjs +1 -1
  205. package/dist/esm/client/post.mjs +1 -1
  206. package/dist/esm/client/types.mjs +1 -1
  207. package/dist/esm/core/account/index.mjs +1 -1
  208. package/dist/esm/core/account/utils/address.mjs +1 -1
  209. package/dist/esm/core/account/utils/index.mjs +1 -1
  210. package/dist/esm/core/accountAddress.mjs +1 -1
  211. package/dist/esm/core/authenticationKey.d.mts +1 -1
  212. package/dist/esm/core/authenticationKey.mjs +1 -1
  213. package/dist/esm/core/common.mjs +1 -1
  214. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  215. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  216. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  217. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  218. package/dist/esm/core/crypto/federatedKeyless.d.mts +97 -0
  219. package/dist/esm/core/crypto/federatedKeyless.mjs +2 -0
  220. package/dist/esm/core/crypto/federatedKeyless.mjs.map +1 -0
  221. package/dist/esm/core/crypto/index.d.mts +4 -3
  222. package/dist/esm/core/crypto/index.mjs +1 -1
  223. package/dist/esm/core/crypto/keyless.d.mts +1 -1
  224. package/dist/esm/core/crypto/keyless.mjs +1 -1
  225. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  226. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  227. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  228. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  229. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  230. package/dist/esm/core/crypto/proof.mjs +1 -1
  231. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  232. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  233. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  234. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  235. package/dist/esm/core/crypto/signature.mjs +1 -1
  236. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  237. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  238. package/dist/esm/core/crypto/utils.mjs +1 -1
  239. package/dist/esm/core/hex.mjs +1 -1
  240. package/dist/esm/core/index.d.mts +2 -1
  241. package/dist/esm/core/index.mjs +1 -1
  242. package/dist/esm/index.d.mts +9 -6
  243. package/dist/esm/index.mjs +1 -1
  244. package/dist/esm/internal/account.d.mts +2 -2
  245. package/dist/esm/internal/account.mjs +1 -1
  246. package/dist/esm/internal/ans.d.mts +2 -2
  247. package/dist/esm/internal/ans.mjs +1 -1
  248. package/dist/esm/internal/coin.d.mts +1 -1
  249. package/dist/esm/internal/coin.mjs +1 -1
  250. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  251. package/dist/esm/internal/digitalAsset.mjs +1 -1
  252. package/dist/esm/internal/event.mjs +1 -1
  253. package/dist/esm/internal/faucet.mjs +1 -1
  254. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  255. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  256. package/dist/esm/internal/general.mjs +1 -1
  257. package/dist/esm/internal/keyless.d.mts +25 -14
  258. package/dist/esm/internal/keyless.mjs +1 -1
  259. package/dist/esm/internal/object.mjs +1 -1
  260. package/dist/esm/internal/staking.mjs +1 -1
  261. package/dist/esm/internal/table.mjs +1 -1
  262. package/dist/esm/internal/transaction.mjs +1 -1
  263. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  264. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  265. package/dist/esm/internal/view.d.mts +1 -1
  266. package/dist/esm/internal/view.mjs +1 -1
  267. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  268. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  269. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  270. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  271. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  272. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  273. package/dist/esm/transactions/index.d.mts +1 -1
  274. package/dist/esm/transactions/index.mjs +1 -1
  275. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  276. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  277. package/dist/esm/transactions/instances/index.d.mts +1 -1
  278. package/dist/esm/transactions/instances/index.mjs +1 -1
  279. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  280. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  281. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  282. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  283. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  284. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  285. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  286. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  287. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  288. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  289. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  290. package/dist/esm/transactions/management/index.d.mts +2 -2
  291. package/dist/esm/transactions/management/index.mjs +1 -1
  292. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  293. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  294. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  295. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  296. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  297. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  298. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  299. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  300. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
  301. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  302. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  303. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  304. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  305. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  306. package/dist/esm/transactions/types.d.mts +3 -3
  307. package/dist/esm/types/index.d.mts +4 -2
  308. package/dist/esm/types/index.mjs +1 -1
  309. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  310. package/dist/esm/utils/const.d.mts +2 -1
  311. package/dist/esm/utils/const.mjs +1 -1
  312. package/dist/esm/utils/helpers.d.mts +41 -1
  313. package/dist/esm/utils/helpers.mjs +1 -1
  314. package/dist/esm/utils/index.d.mts +2 -2
  315. package/dist/esm/utils/index.mjs +1 -1
  316. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  317. package/dist/esm/version.d.mts +1 -1
  318. package/dist/esm/version.mjs +1 -1
  319. package/package.json +1 -1
  320. package/src/account/FederatedKeylessAccount.ts +115 -0
  321. package/src/account/KeylessAccount.ts +6 -291
  322. package/src/account/KeylessAccountCommon.ts +329 -0
  323. package/src/account/MultiKeyAccount.ts +4 -4
  324. package/src/account/index.ts +2 -0
  325. package/src/api/account.ts +31 -4
  326. package/src/api/keyless.ts +50 -4
  327. package/src/bcs/serializable/moveStructs.ts +41 -8
  328. package/src/cli/move.ts +1 -1
  329. package/src/core/crypto/federatedKeyless.ts +134 -0
  330. package/src/core/crypto/index.ts +1 -0
  331. package/src/core/crypto/singleKey.ts +6 -0
  332. package/src/internal/account.ts +6 -5
  333. package/src/internal/event.ts +10 -3
  334. package/src/internal/keyless.ts +86 -8
  335. package/src/internal/transactionSubmission.ts +2 -2
  336. package/src/transactions/instances/transactionPayload.ts +3 -1
  337. package/src/transactions/transactionBuilder/transactionBuilder.ts +25 -14
  338. package/src/transactions/types.ts +4 -2
  339. package/src/types/index.ts +2 -0
  340. package/src/utils/apiEndpoints.ts +2 -2
  341. package/src/utils/const.ts +1 -0
  342. package/src/utils/helpers.ts +70 -0
  343. package/src/version.ts +1 -1
  344. package/dist/common/chunk-J4IUXT5W.js +0 -2
  345. package/dist/common/chunk-J4IUXT5W.js.map +0 -1
  346. package/dist/esm/chunk-4SDUQ7AS.mjs +0 -2
  347. package/dist/esm/chunk-4SDUQ7AS.mjs.map +0 -1
  348. package/dist/esm/chunk-4ZMI5G5L.mjs +0 -2
  349. package/dist/esm/chunk-76OH2Z4Q.mjs +0 -2
  350. package/dist/esm/chunk-7Z6DYLCA.mjs +0 -1
  351. package/dist/esm/chunk-AQ4I7VVB.mjs +0 -1
  352. package/dist/esm/chunk-BOYYQAB4.mjs +0 -2
  353. package/dist/esm/chunk-EZIF26UH.mjs +0 -2
  354. package/dist/esm/chunk-EZIF26UH.mjs.map +0 -1
  355. package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
  356. package/dist/esm/chunk-F7NVDHR2.mjs.map +0 -1
  357. package/dist/esm/chunk-GXTEJ7NO.mjs +0 -2
  358. package/dist/esm/chunk-H6YNXJNF.mjs +0 -2
  359. package/dist/esm/chunk-HHU7UCFI.mjs.map +0 -1
  360. package/dist/esm/chunk-KMJ6TF6Y.mjs +0 -2
  361. package/dist/esm/chunk-KMJ6TF6Y.mjs.map +0 -1
  362. package/dist/esm/chunk-L36ZHC7J.mjs +0 -2
  363. package/dist/esm/chunk-L36ZHC7J.mjs.map +0 -1
  364. package/dist/esm/chunk-LDTF3ABK.mjs +0 -2
  365. package/dist/esm/chunk-LDTF3ABK.mjs.map +0 -1
  366. package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
  367. package/dist/esm/chunk-MLDQ2TY2.mjs +0 -2
  368. package/dist/esm/chunk-MQGW234H.mjs +0 -2
  369. package/dist/esm/chunk-NU55IEL4.mjs +0 -2
  370. package/dist/esm/chunk-NU55IEL4.mjs.map +0 -1
  371. package/dist/esm/chunk-P5V7OZNN.mjs +0 -2
  372. package/dist/esm/chunk-Q67DUNMI.mjs +0 -2
  373. package/dist/esm/chunk-Q7MD4V7H.mjs +0 -2
  374. package/dist/esm/chunk-QV6EZL2G.mjs +0 -2
  375. package/dist/esm/chunk-RA3YPQG2.mjs +0 -2
  376. package/dist/esm/chunk-RA3YPQG2.mjs.map +0 -1
  377. package/dist/esm/chunk-TDGQGILY.mjs +0 -2
  378. package/dist/esm/chunk-THRXIXIO.mjs +0 -2
  379. package/dist/esm/chunk-THRXIXIO.mjs.map +0 -1
  380. package/dist/esm/chunk-WABFFJGI.mjs +0 -2
  381. package/dist/esm/chunk-WABFFJGI.mjs.map +0 -1
  382. package/dist/esm/chunk-WHW4Z7TK.mjs +0 -2
  383. package/dist/esm/chunk-WHW4Z7TK.mjs.map +0 -1
  384. package/dist/esm/chunk-Y3HLYCF3.mjs +0 -2
  385. package/dist/esm/chunk-YPHH6CAO.mjs +0 -2
  386. package/dist/esm/chunk-YUNDX5I7.mjs +0 -2
  387. package/dist/esm/chunk-YXITAP46.mjs +0 -2
  388. package/dist/esm/chunk-YXITAP46.mjs.map +0 -1
  389. package/dist/esm/chunk-YY2XW5R4.mjs +0 -2
  390. package/dist/esm/chunk-YY2XW5R4.mjs.map +0 -1
  391. package/dist/esm/chunk-ZEYOFDIO.mjs +0 -2
  392. package/dist/esm/chunk-ZOMXBB6Z.mjs +0 -2
  393. package/dist/esm/chunk-ZOMXBB6Z.mjs.map +0 -1
  394. /package/dist/esm/{chunk-7Z6DYLCA.mjs.map → account/FederatedKeylessAccount.mjs.map} +0 -0
  395. /package/dist/esm/{chunk-AQ4I7VVB.mjs.map → account/KeylessAccountCommon.mjs.map} +0 -0
  396. /package/dist/esm/{chunk-QE5OL6KN.mjs.map → chunk-2MDJ763P.mjs.map} +0 -0
  397. /package/dist/esm/{chunk-WFOYGJS5.mjs.map → chunk-2Z6HETKH.mjs.map} +0 -0
  398. /package/dist/esm/{chunk-G5MGSV7Y.mjs.map → chunk-3CE63FFN.mjs.map} +0 -0
  399. /package/dist/esm/{chunk-TDGQGILY.mjs.map → chunk-3TSO6PDV.mjs.map} +0 -0
  400. /package/dist/esm/{chunk-2N2VEGT6.mjs.map → chunk-3XX3675G.mjs.map} +0 -0
  401. /package/dist/esm/{chunk-ZXYTLPP6.mjs.map → chunk-4I6IUAHQ.mjs.map} +0 -0
  402. /package/dist/esm/{chunk-UV7M72QD.mjs.map → chunk-4QVGK2KD.mjs.map} +0 -0
  403. /package/dist/esm/{chunk-SUJLWCRN.mjs.map → chunk-5FPWLBZT.mjs.map} +0 -0
  404. /package/dist/esm/{chunk-YUNDX5I7.mjs.map → chunk-5HI4R3A2.mjs.map} +0 -0
  405. /package/dist/esm/{chunk-AYX5JMB4.mjs.map → chunk-5HWJ3SN4.mjs.map} +0 -0
  406. /package/dist/esm/{chunk-3SPU4V2B.mjs.map → chunk-5RNKD3GW.mjs.map} +0 -0
  407. /package/dist/esm/{chunk-7Y3MRBG6.mjs.map → chunk-6LC7ZJEI.mjs.map} +0 -0
  408. /package/dist/esm/{chunk-76HTG7Z7.mjs.map → chunk-7BPKOPP7.mjs.map} +0 -0
  409. /package/dist/esm/{chunk-HRIYZBXY.mjs.map → chunk-ADLWXCGV.mjs.map} +0 -0
  410. /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
  411. /package/dist/esm/{chunk-GNFEBKFV.mjs.map → chunk-AT2A7OZD.mjs.map} +0 -0
  412. /package/dist/esm/{chunk-A4T373F3.mjs.map → chunk-AWQNX3RT.mjs.map} +0 -0
  413. /package/dist/esm/{chunk-NWOMSL6K.mjs.map → chunk-AZ642ORV.mjs.map} +0 -0
  414. /package/dist/esm/{chunk-52KPINA4.mjs.map → chunk-B5NYEWNM.mjs.map} +0 -0
  415. /package/dist/esm/{chunk-Q67DUNMI.mjs.map → chunk-BC5BEOKM.mjs.map} +0 -0
  416. /package/dist/esm/{chunk-G7UNU5GI.mjs.map → chunk-BQPQLOIW.mjs.map} +0 -0
  417. /package/dist/esm/{chunk-P5V7OZNN.mjs.map → chunk-CDIKSNSU.mjs.map} +0 -0
  418. /package/dist/esm/{chunk-7AIKM3UF.mjs.map → chunk-CSNIVFPZ.mjs.map} +0 -0
  419. /package/dist/esm/{chunk-3NRBTP3S.mjs.map → chunk-E2WOZVJX.mjs.map} +0 -0
  420. /package/dist/esm/{chunk-H33YIMTU.mjs.map → chunk-E5LYYWAS.mjs.map} +0 -0
  421. /package/dist/esm/{chunk-ZQFFRZJ4.mjs.map → chunk-ELPTV7ZG.mjs.map} +0 -0
  422. /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
  423. /package/dist/esm/{chunk-UWPO7WWS.mjs.map → chunk-FDD6WNN6.mjs.map} +0 -0
  424. /package/dist/esm/{chunk-6ERHGCK2.mjs.map → chunk-FDTLBR6D.mjs.map} +0 -0
  425. /package/dist/esm/{chunk-76OH2Z4Q.mjs.map → chunk-FOLCONSQ.mjs.map} +0 -0
  426. /package/dist/esm/{chunk-5IUXBOS5.mjs.map → chunk-FTBXTZM2.mjs.map} +0 -0
  427. /package/dist/esm/{chunk-UO52TECC.mjs.map → chunk-G6HZPSZ3.mjs.map} +0 -0
  428. /package/dist/esm/{chunk-ZXPBRVOA.mjs.map → chunk-GKRIMGKW.mjs.map} +0 -0
  429. /package/dist/esm/{chunk-MEKXPGK7.mjs.map → chunk-GX2II7H4.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-I5XQKNOK.mjs.map → chunk-H3TJNBHX.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-USOIC4HO.mjs.map → chunk-J3PN353M.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-SONTIUAM.mjs.map → chunk-J45FMNYT.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-NRRADUK4.mjs.map → chunk-KBIYKNM2.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-T2NJUIOQ.mjs.map → chunk-KSOKGREZ.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-ORXEFE6X.mjs.map → chunk-LY7ZRAJT.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-FOHGSNYZ.mjs.map → chunk-MYRN7MDF.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-PO33LVUF.mjs.map → chunk-MZB3J6CV.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-MQGW234H.mjs.map → chunk-N6EC72OZ.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-GXTEJ7NO.mjs.map → chunk-ND23H3AK.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-JKNTGRSQ.mjs.map → chunk-NGIPNL7N.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-ZZRSKHWS.mjs.map → chunk-NOVJ2ROD.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-QV6EZL2G.mjs.map → chunk-OOVNFKA6.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-OEOUZFHD.mjs.map → chunk-OVI2RY5L.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-FNT3VLRD.mjs.map → chunk-P4FYT4LC.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-MLDQ2TY2.mjs.map → chunk-QP2A5ISX.mjs.map} +0 -0
  446. /package/dist/esm/{chunk-KEN2VRIM.mjs.map → chunk-QQGCMXIV.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-O4BBULNE.mjs.map → chunk-QTTDBQAJ.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-6BYVG7H4.mjs.map → chunk-QUTP2ACU.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-PY4TS34X.mjs.map → chunk-RLGIYYI7.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-5L3PLK3W.mjs.map → chunk-S3I4THN5.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-GHKMF253.mjs.map → chunk-S7KCJQOA.mjs.map} +0 -0
  452. /package/dist/esm/{chunk-WRRQ7L5K.mjs.map → chunk-SHOPSMRK.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-YDZBU2DJ.mjs.map → chunk-SP4PT77Z.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-74YFNJ7A.mjs.map → chunk-SYKVA363.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
  456. /package/dist/esm/{chunk-H6YNXJNF.mjs.map → chunk-TVWAYKEP.mjs.map} +0 -0
  457. /package/dist/esm/{chunk-CTJX4CUF.mjs.map → chunk-U72MLMGP.mjs.map} +0 -0
  458. /package/dist/esm/{chunk-BOYYQAB4.mjs.map → chunk-UW5TIZFE.mjs.map} +0 -0
  459. /package/dist/esm/{chunk-NMD45OTM.mjs.map → chunk-VTEOS4PS.mjs.map} +0 -0
  460. /package/dist/esm/{chunk-NCWD4NA3.mjs.map → chunk-VVWBJKEA.mjs.map} +0 -0
  461. /package/dist/esm/{chunk-HKMG3LZX.mjs.map → chunk-YACGA3YS.mjs.map} +0 -0
  462. /package/dist/esm/{chunk-ECKJI2TV.mjs.map → chunk-YBZI6U43.mjs.map} +0 -0
  463. /package/dist/esm/{chunk-2CC67KW5.mjs.map → chunk-YSVXROOO.mjs.map} +0 -0
  464. /package/dist/esm/{chunk-Y3HLYCF3.mjs.map → chunk-ZASN3QQQ.mjs.map} +0 -0
  465. /package/dist/esm/{chunk-A63SMUOU.mjs.map → chunk-ZZIMFLVT.mjs.map} +0 -0
  466. /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
@@ -15,6 +15,7 @@ import {
15
15
  MoveModuleBytecode,
16
16
  MoveResource,
17
17
  MoveStructId,
18
+ MoveValue,
18
19
  OrderByArg,
19
20
  PaginationArgs,
20
21
  TokenStandardArg,
@@ -40,10 +41,12 @@ import {
40
41
  getTransactions,
41
42
  lookupOriginalAccountAddress,
42
43
  } from "../internal/account";
43
- import { APTOS_COIN, ProcessorType } from "../utils/const";
44
+ import { APTOS_COIN, APTOS_FA, ProcessorType } from "../utils/const";
44
45
  import { AptosConfig } from "./aptosConfig";
45
46
  import { waitForIndexerOnVersion } from "./utils";
46
47
  import { CurrentFungibleAssetBalancesBoolExp } from "../types/generated/types";
48
+ import { view } from "../internal/view";
49
+ import { isEncodedStruct, parseEncodedStruct } from "../utils";
47
50
 
48
51
  /**
49
52
  * A class to query all `Account` related queries on Aptos.
@@ -428,7 +431,7 @@ export class Account {
428
431
  accountAddress: AccountAddressInput;
429
432
  minimumLedgerVersion?: AnyNumber;
430
433
  }): Promise<number> {
431
- return this.getAccountCoinAmount({ coinType: APTOS_COIN, ...args });
434
+ return this.getAccountCoinAmount({ coinType: APTOS_COIN, faMetadataAddress: APTOS_FA, ...args });
432
435
  }
433
436
 
434
437
  /**
@@ -438,7 +441,8 @@ export class Account {
438
441
  * const accountCoinAmount = await aptos.getAccountCoinAmount({accountAddress:"0x123", coinType:"0x1::aptos_coin::AptosCoin"})
439
442
  *
440
443
  * @param args.accountAddress The account address we want to get the total count for
441
- * @param args.coinType The coin type to query
444
+ * @param args.coinType The coin type to query.
445
+ * Note: faMetadataAddress will automatically fill this in if not provided when migrated to fungible assets
442
446
  * @param args.faMetadataAddress The fungible asset metadata address to query.
443
447
  * Note: coinType will automatically fill this in if not provided when migrated to fungible assets
444
448
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
@@ -450,12 +454,35 @@ export class Account {
450
454
  faMetadataAddress?: AccountAddressInput;
451
455
  minimumLedgerVersion?: AnyNumber;
452
456
  }): Promise<number> {
457
+ const { coinType, faMetadataAddress } = args;
453
458
  await waitForIndexerOnVersion({
454
459
  config: this.config,
455
460
  minimumLedgerVersion: args.minimumLedgerVersion,
456
461
  processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,
457
462
  });
458
- return getAccountCoinAmount({ aptosConfig: this.config, ...args });
463
+
464
+ // Attempt to populate the CoinType field if the FA address is provided.
465
+ // We cannot do this internally due to dependency cycles issue.
466
+ let coinAssetType: MoveStructId | undefined = coinType;
467
+ if (coinType === undefined && faMetadataAddress !== undefined) {
468
+ try {
469
+ const pairedCoinTypeStruct = (
470
+ await view({
471
+ aptosConfig: this.config,
472
+ payload: { function: "0x1::coin::paired_coin", functionArguments: [faMetadataAddress] },
473
+ })
474
+ ).at(0) as { vec: MoveValue[] };
475
+
476
+ // Check if the Option has a value, and if so, parse the struct
477
+ if (pairedCoinTypeStruct.vec.length > 0 && isEncodedStruct(pairedCoinTypeStruct.vec[0])) {
478
+ coinAssetType = parseEncodedStruct(pairedCoinTypeStruct.vec[0]);
479
+ }
480
+ } catch (error) {
481
+ /* No paired coin type found */
482
+ }
483
+ }
484
+
485
+ return getAccountCoinAmount({ aptosConfig: this.config, ...args, coinType: coinAssetType });
459
486
  }
460
487
 
461
488
  /**
@@ -1,9 +1,16 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
5
- import { ZeroKnowledgeSig } from "../core";
6
- import { deriveKeylessAccount, getPepper, getProof } from "../internal/keyless";
4
+ import { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
5
+ import { FederatedKeylessAccount } from "../account/FederatedKeylessAccount";
6
+ import { AccountAddressInput, ZeroKnowledgeSig } from "../core";
7
+ import {
8
+ deriveKeylessAccount,
9
+ getPepper,
10
+ getProof,
11
+ updateFederatedKeylessJwkSetTransaction,
12
+ } from "../internal/keyless";
13
+ import { SimpleTransaction } from "../transactions";
7
14
  import { HexInput } from "../types";
8
15
  import { AptosConfig } from "./aptosConfig";
9
16
 
@@ -52,12 +59,30 @@ export class Keyless {
52
59
  return getProof({ aptosConfig: this.config, ...args });
53
60
  }
54
61
 
62
+ async deriveKeylessAccount(args: {
63
+ jwt: string;
64
+ ephemeralKeyPair: EphemeralKeyPair;
65
+ uidKey?: string;
66
+ pepper?: HexInput;
67
+ proofFetchCallback?: ProofFetchCallback;
68
+ }): Promise<KeylessAccount>;
69
+
70
+ async deriveKeylessAccount(args: {
71
+ jwt: string;
72
+ ephemeralKeyPair: EphemeralKeyPair;
73
+ jwkAddress: AccountAddressInput;
74
+ uidKey?: string;
75
+ pepper?: HexInput;
76
+ proofFetchCallback?: ProofFetchCallback;
77
+ }): Promise<FederatedKeylessAccount>;
78
+
55
79
  /**
56
80
  * Derives the Keyless Account from the JWT token and corresponding EphemeralKeyPair. It will lookup the pepper from
57
81
  * the pepper service if not explicitly provided. It will compute the proof via the proving service. It will ch
58
82
  *
59
83
  * @param args.jwt JWT token
60
84
  * @param args.ephemeralKeyPair the EphemeralKeyPair used to generate the nonce in the JWT token
85
+ * @param args.jwkAddress the where the JWKs used to verify signatures are found. Setting the value derives a FederatedKeylessAccount
61
86
  * @param args.uidKey a key in the JWT token to use to set the uidVal in the IdCommitment
62
87
  * @param args.pepper the pepper
63
88
  * @param args.proofFetchCallback a callback function that if set, the fetch of the proof will be done in the background. Once
@@ -69,10 +94,31 @@ export class Keyless {
69
94
  async deriveKeylessAccount(args: {
70
95
  jwt: string;
71
96
  ephemeralKeyPair: EphemeralKeyPair;
97
+ jwkAddress?: AccountAddressInput;
72
98
  uidKey?: string;
73
99
  pepper?: HexInput;
74
100
  proofFetchCallback?: ProofFetchCallback;
75
- }): Promise<KeylessAccount> {
101
+ }): Promise<KeylessAccount | FederatedKeylessAccount> {
76
102
  return deriveKeylessAccount({ aptosConfig: this.config, ...args });
77
103
  }
104
+
105
+ /**
106
+ * This installs a set of FederatedJWKs at an address for a given iss.
107
+ *
108
+ * It will fetch the JWK set from the well-known endpoint and update the FederatedJWKs at the sender's address
109
+ * to reflect it.
110
+ *
111
+ * @param args.sender The account that will install the JWKs
112
+ * @param args.iss the iss claim of the federated OIDC provider.
113
+ * @param args.jwksUrl the URL to find the corresponding JWKs. For supported IDP providers this parameter in not necessary.
114
+ *
115
+ * @returns The pending transaction that results from submission.
116
+ */
117
+ async updateFederatedKeylessJwkSetTransaction(args: {
118
+ sender: Account;
119
+ iss: string;
120
+ jwksUrl?: string;
121
+ }): Promise<SimpleTransaction> {
122
+ return updateFederatedKeylessJwkSetTransaction({ aptosConfig: this.config, ...args });
123
+ }
78
124
  }
@@ -67,13 +67,12 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
67
67
  * @param serializer
68
68
  */
69
69
  serializeForScriptFunction(serializer: Serializer): void {
70
- // runtime check to ensure that you can't serialize anything other than vector<u8>
71
- const isU8 = this.values[0] instanceof U8;
72
- // if the inner array is length 0, we can't check the type because it has no instance, so we assume it's a u8
73
- // it may not be, but we don't care because regardless of a vector's type,
74
- // a zero-length vector is serialized to a single byte value: 0
75
- if (!isU8 && this.values[0] !== undefined) {
76
- throw new Error("Script function arguments only accept u8 vectors");
70
+ // This checks if the type of a non-empty vector is of type other than U8. If so, we use the Serialized
71
+ // transaction argument type to serialize the argument.
72
+ if (this.values[0] !== undefined && !(this.values[0] instanceof U8)) {
73
+ const serialized = new Serialized(this.bcsToBytes());
74
+ serialized.serializeForScriptFunction(serializer);
75
+ return;
77
76
  }
78
77
  serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.U8Vector);
79
78
  serializer.serialize(this);
@@ -225,6 +224,39 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
225
224
  }
226
225
  }
227
226
 
227
+ export class Serialized extends Serializable implements TransactionArgument {
228
+ public readonly value: Uint8Array;
229
+
230
+ constructor(value: HexInput) {
231
+ super();
232
+ this.value = Hex.fromHexInput(value).toUint8Array();
233
+ }
234
+
235
+ serialize(serializer: Serializer): void {
236
+ serializer.serializeBytes(this.value);
237
+ }
238
+
239
+ serializeForEntryFunction(serializer: Serializer): void {
240
+ this.serialize(serializer);
241
+ }
242
+
243
+ serializeForScriptFunction(serializer: Serializer): void {
244
+ serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Serialized);
245
+ this.serialize(serializer);
246
+ }
247
+
248
+ static deserialize(deserializer: Deserializer): Serialized {
249
+ return new Serialized(deserializer.deserializeBytes());
250
+ }
251
+
252
+ toMoveVector<T extends Serializable & EntryFunctionArgument>(cls: Deserializable<T>): MoveVector<T> {
253
+ const deserializer = new Deserializer(this.bcsToBytes());
254
+ deserializer.deserializeUleb128AsU32();
255
+ const vec = deserializer.deserializeVector(cls);
256
+ return new MoveVector(vec);
257
+ }
258
+ }
259
+
228
260
  export class MoveString extends Serializable implements TransactionArgument {
229
261
  public value: string;
230
262
 
@@ -244,7 +276,8 @@ export class MoveString extends Serializable implements TransactionArgument {
244
276
 
245
277
  serializeForScriptFunction(serializer: Serializer): void {
246
278
  // Serialize the string as a fixed byte string, i.e., without the length prefix
247
- const fixedStringBytes = this.bcsToBytes().slice(1);
279
+ const textEncoder = new TextEncoder();
280
+ const fixedStringBytes = textEncoder.encode(this.value);
248
281
  // Put those bytes into a vector<u8> and serialize it as a script function argument
249
282
  const vectorU8 = MoveVector.U8(fixedStringBytes);
250
283
  vectorU8.serializeForScriptFunction(serializer);
package/src/cli/move.ts CHANGED
@@ -425,7 +425,7 @@ export class Move {
425
425
  */
426
426
  // eslint-disable-next-line class-methods-use-this
427
427
  private extractAddressFromOutput(output: string): string {
428
- const match = output.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)\\.");
428
+ const match = output.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");
429
429
  if (match) {
430
430
  return match[1];
431
431
  }
@@ -0,0 +1,134 @@
1
+ // Copyright © Aptos Foundation
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { AccountPublicKey, PublicKey } from "./publicKey";
5
+ import { Deserializer, Serializer } from "../../bcs";
6
+ import { Hex } from "../hex";
7
+ import { HexInput, AnyPublicKeyVariant, SigningScheme } from "../../types";
8
+ import { AuthenticationKey } from "../authenticationKey";
9
+ import { AccountAddress, AccountAddressInput } from "../accountAddress";
10
+ import { KeylessPublicKey, KeylessSignature } from "./keyless";
11
+
12
+ /**
13
+ * Represents the FederatedKeylessPublicKey public key
14
+ *
15
+ * These keys use an onchain address as a source of truth for the JWK used to verify signatures.
16
+ *
17
+ * FederatedKeylessPublicKey authentication key is represented in the SDK as `AnyPublicKey`.
18
+ */
19
+ export class FederatedKeylessPublicKey extends AccountPublicKey {
20
+ /**
21
+ * The address that contains the JWK set to be used for verification.
22
+ */
23
+ readonly jwkAddress: AccountAddress;
24
+
25
+ /**
26
+ * The inner public key which contains the standard Keyless public key.
27
+ */
28
+ readonly keylessPublicKey: KeylessPublicKey;
29
+
30
+ constructor(jwkAddress: AccountAddressInput, keylessPublicKey: KeylessPublicKey) {
31
+ super();
32
+ this.jwkAddress = AccountAddress.from(jwkAddress);
33
+ this.keylessPublicKey = keylessPublicKey;
34
+ }
35
+
36
+ /**
37
+ * Get the authentication key for the federated keyless public key
38
+ *
39
+ * @returns AuthenticationKey
40
+ */
41
+ authKey(): AuthenticationKey {
42
+ const serializer = new Serializer();
43
+ serializer.serializeU32AsUleb128(AnyPublicKeyVariant.FederatedKeyless);
44
+ serializer.serializeFixedBytes(this.bcsToBytes());
45
+ return AuthenticationKey.fromSchemeAndBytes({
46
+ scheme: SigningScheme.SingleKey,
47
+ input: serializer.toUint8Array(),
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Get the public key in bytes (Uint8Array).
53
+ *
54
+ * @returns Uint8Array representation of the public key
55
+ */
56
+ toUint8Array(): Uint8Array {
57
+ return this.bcsToBytes();
58
+ }
59
+
60
+ /**
61
+ * Get the public key as a hex string with the 0x prefix.
62
+ *
63
+ * @returns string representation of the public key
64
+ */
65
+ toString(): string {
66
+ return Hex.fromHexInput(this.toUint8Array()).toString();
67
+ }
68
+
69
+ /**
70
+ * Verifies a signed data with a public key
71
+ *
72
+ * @param args.message message
73
+ * @param args.signature The signature
74
+ * @returns true if the signature is valid
75
+ */
76
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
77
+ verifySignature(args: { message: HexInput; signature: KeylessSignature }): boolean {
78
+ throw new Error("Not yet implemented");
79
+ }
80
+
81
+ serialize(serializer: Serializer): void {
82
+ this.jwkAddress.serialize(serializer);
83
+ this.keylessPublicKey.serialize(serializer);
84
+ }
85
+
86
+ static deserialize(deserializer: Deserializer): FederatedKeylessPublicKey {
87
+ const jwkAddress = AccountAddress.deserialize(deserializer);
88
+ const keylessPublicKey = KeylessPublicKey.deserialize(deserializer);
89
+ return new FederatedKeylessPublicKey(jwkAddress, keylessPublicKey);
90
+ }
91
+
92
+ static isPublicKey(publicKey: PublicKey): publicKey is FederatedKeylessPublicKey {
93
+ return publicKey instanceof FederatedKeylessPublicKey;
94
+ }
95
+
96
+ /**
97
+ * Creates a FederatedKeylessPublicKey from the JWT components plus pepper
98
+ *
99
+ * @param args.iss the iss of the identity
100
+ * @param args.uidKey the key to use to get the uidVal in the JWT token
101
+ * @param args.uidVal the value of the uidKey in the JWT token
102
+ * @param args.aud the client ID of the application
103
+ * @param args.pepper The pepper used to maintain privacy of the account
104
+ * @returns FederatedKeylessPublicKey
105
+ */
106
+ static create(args: {
107
+ iss: string;
108
+ uidKey: string;
109
+ uidVal: string;
110
+ aud: string;
111
+ pepper: HexInput;
112
+ jwkAddress: AccountAddressInput;
113
+ }): FederatedKeylessPublicKey {
114
+ return new FederatedKeylessPublicKey(args.jwkAddress, KeylessPublicKey.create(args));
115
+ }
116
+
117
+ static fromJwtAndPepper(args: {
118
+ jwt: string;
119
+ pepper: HexInput;
120
+ jwkAddress: AccountAddressInput;
121
+ uidKey?: string;
122
+ }): FederatedKeylessPublicKey {
123
+ return new FederatedKeylessPublicKey(args.jwkAddress, KeylessPublicKey.fromJwtAndPepper(args));
124
+ }
125
+
126
+ static isInstance(publicKey: PublicKey) {
127
+ return (
128
+ "jwkAddress" in publicKey &&
129
+ publicKey.jwkAddress instanceof AccountAddress &&
130
+ "keylessPublicKey" in publicKey &&
131
+ publicKey.keylessPublicKey instanceof KeylessPublicKey
132
+ );
133
+ }
134
+ }
@@ -6,6 +6,7 @@ export * from "./hdKey";
6
6
  export * from "./multiEd25519";
7
7
  export * from "./multiKey";
8
8
  export * from "./ephemeral";
9
+ export * from "./federatedKeyless";
9
10
  export * from "./keyless";
10
11
  export * from "./privateKey";
11
12
  export * from "./publicKey";
@@ -6,6 +6,7 @@ import { AccountPublicKey, PublicKey, VerifySignatureArgs } from "./publicKey";
6
6
  import { Secp256k1PublicKey, Secp256k1Signature } from "./secp256k1";
7
7
  import { KeylessPublicKey, KeylessSignature } from "./keyless";
8
8
  import { Signature } from "./signature";
9
+ import { FederatedKeylessPublicKey } from "./federatedKeyless";
9
10
 
10
11
  /**
11
12
  * Represents any public key supported by Aptos.
@@ -37,6 +38,8 @@ export class AnyPublicKey extends AccountPublicKey {
37
38
  this.variant = AnyPublicKeyVariant.Secp256k1;
38
39
  } else if (publicKey instanceof KeylessPublicKey) {
39
40
  this.variant = AnyPublicKeyVariant.Keyless;
41
+ } else if (publicKey instanceof FederatedKeylessPublicKey) {
42
+ this.variant = AnyPublicKeyVariant.FederatedKeyless;
40
43
  } else {
41
44
  throw new Error("Unsupported public key type");
42
45
  }
@@ -91,6 +94,9 @@ export class AnyPublicKey extends AccountPublicKey {
91
94
  case AnyPublicKeyVariant.Keyless:
92
95
  publicKey = KeylessPublicKey.deserialize(deserializer);
93
96
  break;
97
+ case AnyPublicKeyVariant.FederatedKeyless:
98
+ publicKey = FederatedKeylessPublicKey.deserialize(deserializer);
99
+ break;
94
100
  default:
95
101
  throw new Error(`Unknown variant index for AnyPublicKey: ${variantIndex}`);
96
102
  }
@@ -409,26 +409,27 @@ export async function getAccountCoinAmount(args: {
409
409
  faMetadataAddress?: AccountAddressInput;
410
410
  }): Promise<number> {
411
411
  const { aptosConfig, accountAddress, coinType, faMetadataAddress } = args;
412
- let coinAssetType: string | undefined;
412
+
413
+ let coinAssetType: string | undefined = coinType;
413
414
  let faAddress: string;
414
415
 
415
416
  if (coinType !== undefined && faMetadataAddress !== undefined) {
416
417
  faAddress = AccountAddress.from(faMetadataAddress).toStringLong();
417
418
  } else if (coinType !== undefined && faMetadataAddress === undefined) {
418
- coinAssetType = coinType;
419
419
  // TODO Move to a separate function as defined in the AIP for coin migration
420
- if (args.coinType === APTOS_COIN) {
420
+ if (coinType === APTOS_COIN) {
421
421
  faAddress = AccountAddress.A.toStringLong();
422
422
  } else {
423
423
  faAddress = createObjectAddress(AccountAddress.A, coinType).toStringLong();
424
424
  }
425
425
  } else if (coinType === undefined && faMetadataAddress !== undefined) {
426
- // TODO: add a view function lookup for non-APT migrated coins
427
426
  const addr = AccountAddress.from(faMetadataAddress);
428
427
  faAddress = addr.toStringLong();
429
428
  if (addr === AccountAddress.A) {
430
429
  coinAssetType = APTOS_COIN;
431
430
  }
431
+ // The paired CoinType should be populated outside of this function in another
432
+ // async call. We cannot do this internally due to dependency cycles issue.
432
433
  } else {
433
434
  throw new Error("Either coinType, fungibleAssetAddress, or both must be provided");
434
435
  }
@@ -436,7 +437,7 @@ export async function getAccountCoinAmount(args: {
436
437
 
437
438
  // Search by fungible asset address, unless it has a coin it migrated from
438
439
  let where: any = { asset_type: { _eq: faAddress } };
439
- if (coinType !== undefined) {
440
+ if (coinAssetType !== undefined) {
440
441
  where = { asset_type: { _in: [coinAssetType, faAddress] } };
441
442
  }
442
443
 
@@ -31,9 +31,16 @@ export async function getModuleEventsByEventType(args: {
31
31
  const { aptosConfig, eventType, options } = args;
32
32
 
33
33
  const whereCondition: EventsBoolExp = {
34
- account_address: { _eq: "0x0000000000000000000000000000000000000000000000000000000000000000" },
35
- creation_number: { _eq: "0" },
36
- sequence_number: { _eq: "0" },
34
+ _or: [
35
+ // EventHandle events
36
+ { account_address: { _eq: eventType.split("::")[0] } },
37
+ // Module events
38
+ {
39
+ account_address: { _eq: "0x0000000000000000000000000000000000000000000000000000000000000000" },
40
+ sequence_number: { _eq: 0 },
41
+ creation_number: { _eq: 0 },
42
+ },
43
+ ],
37
44
  indexed_type: { _eq: eventType },
38
45
  };
39
46
 
@@ -7,9 +7,11 @@
7
7
  * other namespaces and processes can access these methods without depending on the entire
8
8
  * keyless namespace and without having a dependency cycle error.
9
9
  */
10
+ import { jwtDecode, JwtPayload } from "jwt-decode";
10
11
  import { AptosConfig } from "../api/aptosConfig";
11
12
  import { postAptosPepperService, postAptosProvingService } from "../client";
12
13
  import {
14
+ AccountAddressInput,
13
15
  EphemeralSignature,
14
16
  Groth16Zkp,
15
17
  Hex,
@@ -19,10 +21,14 @@ import {
19
21
  getKeylessConfig,
20
22
  } from "../core";
21
23
  import { HexInput, ZkpVariant } from "../types";
22
- import { EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
24
+ import { Account, EphemeralKeyPair, KeylessAccount, ProofFetchCallback } from "../account";
23
25
  import { PepperFetchRequest, PepperFetchResponse, ProverRequest, ProverResponse } from "../types/keyless";
24
- import { nowInSeconds } from "../utils/helpers";
25
26
  import { lookupOriginalAccountAddress } from "./account";
27
+ import { FederatedKeylessPublicKey } from "../core/crypto/federatedKeyless";
28
+ import { FederatedKeylessAccount } from "../account/FederatedKeylessAccount";
29
+ import { MoveVector } from "../bcs";
30
+ import { generateTransaction } from "./transactionSubmission";
31
+ import { SimpleTransaction } from "../transactions";
26
32
 
27
33
  export async function getPepper(args: {
28
34
  aptosConfig: AptosConfig;
@@ -63,7 +69,7 @@ export async function getProof(args: {
63
69
  throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);
64
70
  }
65
71
  const { maxExpHorizonSecs } = await getKeylessConfig({ aptosConfig });
66
- if (maxExpHorizonSecs < ephemeralKeyPair.expiryDateSecs - nowInSeconds()) {
72
+ if (maxExpHorizonSecs < ephemeralKeyPair.expiryDateSecs - jwtDecode<JwtPayload>(jwt).iat!) {
67
73
  throw Error(`The EphemeralKeyPair is too long lived. It's lifespan must be less than ${maxExpHorizonSecs}`);
68
74
  }
69
75
  const json = {
@@ -76,6 +82,8 @@ export async function getProof(args: {
76
82
  uid_key: uidKey,
77
83
  };
78
84
 
85
+ console.log(JSON.stringify(json))
86
+
79
87
  const { data } = await postAptosProvingService<ProverRequest, ProverResponse>({
80
88
  aptosConfig,
81
89
  path: "prove",
@@ -84,6 +92,8 @@ export async function getProof(args: {
84
92
  overrides: { WITH_CREDENTIALS: false },
85
93
  });
86
94
 
95
+ console.log(JSON.stringify(data))
96
+
87
97
  const proofPoints = data.proof;
88
98
  const groth16Zkp = new Groth16Zkp({
89
99
  a: proofPoints.a,
@@ -106,8 +116,28 @@ export async function deriveKeylessAccount(args: {
106
116
  uidKey?: string;
107
117
  pepper?: HexInput;
108
118
  proofFetchCallback?: ProofFetchCallback;
109
- }): Promise<KeylessAccount> {
110
- const { aptosConfig, jwt, uidKey, proofFetchCallback, pepper = await getPepper(args) } = args;
119
+ }): Promise<KeylessAccount>;
120
+
121
+ export async function deriveKeylessAccount(args: {
122
+ aptosConfig: AptosConfig;
123
+ jwt: string;
124
+ ephemeralKeyPair: EphemeralKeyPair;
125
+ jwkAddress: AccountAddressInput;
126
+ uidKey?: string;
127
+ pepper?: HexInput;
128
+ proofFetchCallback?: ProofFetchCallback;
129
+ }): Promise<FederatedKeylessAccount>;
130
+
131
+ export async function deriveKeylessAccount(args: {
132
+ aptosConfig: AptosConfig;
133
+ jwt: string;
134
+ ephemeralKeyPair: EphemeralKeyPair;
135
+ jwkAddress?: AccountAddressInput;
136
+ uidKey?: string;
137
+ pepper?: HexInput;
138
+ proofFetchCallback?: ProofFetchCallback;
139
+ }): Promise<KeylessAccount | FederatedKeylessAccount> {
140
+ const { aptosConfig, jwt, jwkAddress, uidKey, proofFetchCallback, pepper = await getPepper(args) } = args;
111
141
  const proofPromise = getProof({ ...args, pepper });
112
142
  // If a callback is provided, pass in the proof as a promise to KeylessAccount.create. This will make the proof be fetched in the
113
143
  // background and the callback will handle the outcome of the fetch. This allows the developer to not have to block on the proof fetch
@@ -116,14 +146,62 @@ export async function deriveKeylessAccount(args: {
116
146
  // If no callback is provided, the just await the proof fetch and continue syncronously.
117
147
  const proof = proofFetchCallback ? proofPromise : await proofPromise;
118
148
 
119
- // Look up the original address to handle key rotations
149
+ // Look up the original address to handle key rotations and then instantiate the account.
150
+ if (jwkAddress !== undefined) {
151
+ const publicKey = FederatedKeylessPublicKey.fromJwtAndPepper({ jwt, pepper, jwkAddress, uidKey });
152
+ const address = await lookupOriginalAccountAddress({
153
+ aptosConfig,
154
+ authenticationKey: publicKey.authKey().derivedAddress(),
155
+ });
156
+
157
+ return FederatedKeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback, jwkAddress });
158
+ }
159
+
120
160
  const publicKey = KeylessPublicKey.fromJwtAndPepper({ jwt, pepper, uidKey });
121
161
  const address = await lookupOriginalAccountAddress({
122
162
  aptosConfig,
123
163
  authenticationKey: publicKey.authKey().derivedAddress(),
124
164
  });
165
+ return KeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback });
166
+ }
125
167
 
126
- const keylessAccount = KeylessAccount.create({ ...args, address, proof, pepper, proofFetchCallback });
168
+ interface JWK {
169
+ kty: string; // Key type
170
+ kid: string; // Key ID
171
+ alg: string; // Algorithm used with the key
172
+ n: string; // Modulus (for RSA keys)
173
+ e: string; // Exponent (for RSA keys)
174
+ }
175
+
176
+ interface JWKS {
177
+ keys: JWK[];
178
+ }
127
179
 
128
- return keylessAccount;
180
+ export async function updateFederatedKeylessJwkSetTransaction(args: {
181
+ aptosConfig: AptosConfig;
182
+ sender: Account;
183
+ iss: string;
184
+ jwksUrl?: string;
185
+ }): Promise<SimpleTransaction> {
186
+ const { aptosConfig, sender, iss } = args;
187
+ const jwksUrl = args.jwksUrl ?? (iss.endsWith("/") ? `${iss}.well-known/jwks.json` : `${iss}/.well-known/jwks.json`);
188
+ const response = await fetch(jwksUrl);
189
+ if (!response.ok) {
190
+ throw new Error(`Failed to fetch JWKS: ${response.status} ${response.statusText}`);
191
+ }
192
+ const jwks: JWKS = await response.json();
193
+ return generateTransaction({
194
+ aptosConfig,
195
+ sender: sender.accountAddress,
196
+ data: {
197
+ function: "0x1::jwks::update_federated_jwk_set",
198
+ functionArguments: [
199
+ iss,
200
+ MoveVector.MoveString(jwks.keys.map((key) => key.kid)),
201
+ MoveVector.MoveString(jwks.keys.map((key) => key.alg)),
202
+ MoveVector.MoveString(jwks.keys.map((key) => key.e)),
203
+ MoveVector.MoveString(jwks.keys.map((key) => key.n)),
204
+ ],
205
+ },
206
+ });
129
207
  }
@@ -8,7 +8,7 @@
8
8
  import { AptosConfig } from "../api/aptosConfig";
9
9
  import { MoveVector, U8 } from "../bcs";
10
10
  import { postAptosFullNode } from "../client";
11
- import { Account, KeylessAccount, MultiKeyAccount } from "../account";
11
+ import { Account, KeylessAccountCommon, MultiKeyAccount } from "../account";
12
12
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
13
13
  import { PrivateKey } from "../core/crypto";
14
14
  import { AccountAuthenticator } from "../transactions/authenticator/account";
@@ -277,7 +277,7 @@ export async function signAndSubmitTransaction(args: {
277
277
  const { aptosConfig, signer, transaction } = args;
278
278
  // If the signer contains a KeylessAccount, await proof fetching in case the proof
279
279
  // was fetched asyncronously.
280
- if (signer instanceof KeylessAccount || signer instanceof MultiKeyAccount) {
280
+ if (signer instanceof KeylessAccountCommon || signer instanceof MultiKeyAccount) {
281
281
  await signer.waitForProofFetch();
282
282
  }
283
283
  const authenticator = signTransaction({ signer, transaction });
@@ -7,7 +7,7 @@ import { Deserializer } from "../../bcs/deserializer";
7
7
  import { Serializable, Serializer } from "../../bcs/serializer";
8
8
  import { EntryFunctionBytes } from "../../bcs/serializable/entryFunctionBytes";
9
9
  import { Bool, U128, U16, U256, U32, U64, U8 } from "../../bcs/serializable/movePrimitives";
10
- import { MoveVector } from "../../bcs/serializable/moveStructs";
10
+ import { MoveVector, Serialized } from "../../bcs/serializable/moveStructs";
11
11
  import { AccountAddress } from "../../core";
12
12
  import { Identifier } from "./identifier";
13
13
  import { ModuleId } from "./moduleId";
@@ -40,6 +40,8 @@ export function deserializeFromScriptArgument(deserializer: Deserializer): Trans
40
40
  return U32.deserialize(deserializer);
41
41
  case ScriptTransactionArgumentVariants.U256:
42
42
  return U256.deserialize(deserializer);
43
+ case ScriptTransactionArgumentVariants.Serialized:
44
+ return Serialized.deserialize(deserializer);
43
45
  default:
44
46
  throw new Error(`Unknown variant index for ScriptTransactionArgument: ${index}`);
45
47
  }