@aptos-labs/ts-sdk 1.13.0-zeta.1 → 1.13.1-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 (303) hide show
  1. package/dist/common/index.d.ts +25 -27
  2. package/dist/common/index.js +14 -14
  3. package/dist/common/index.js.map +1 -1
  4. package/dist/esm/{Ed25519Account-hkKk3b4Z.d.mts → Ed25519Account-8gJF5t3F.d.mts} +2 -2
  5. package/dist/esm/account/Account.d.mts +1 -1
  6. package/dist/esm/account/Account.mjs +1 -1
  7. package/dist/esm/account/Ed25519Account.d.mts +1 -1
  8. package/dist/esm/account/Ed25519Account.mjs +1 -1
  9. package/dist/esm/account/EphemeralKeyPair.d.mts +9 -7
  10. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  11. package/dist/esm/account/KeylessAccount.d.mts +8 -6
  12. package/dist/esm/account/KeylessAccount.mjs +1 -1
  13. package/dist/esm/account/MultiKeyAccount.d.mts +1 -1
  14. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  15. package/dist/esm/account/SingleKeyAccount.d.mts +6 -6
  16. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  17. package/dist/esm/account/index.d.mts +1 -1
  18. package/dist/esm/account/index.mjs +1 -1
  19. package/dist/esm/api/account.d.mts +1 -1
  20. package/dist/esm/api/account.mjs +1 -1
  21. package/dist/esm/api/ans.d.mts +13 -13
  22. package/dist/esm/api/ans.mjs +1 -1
  23. package/dist/esm/api/aptos.d.mts +1 -2
  24. package/dist/esm/api/aptos.mjs +1 -1
  25. package/dist/esm/api/aptosConfig.mjs +1 -1
  26. package/dist/esm/api/coin.mjs +1 -1
  27. package/dist/esm/api/digitalAsset.d.mts +9 -9
  28. package/dist/esm/api/digitalAsset.mjs +1 -1
  29. package/dist/esm/api/event.mjs +1 -1
  30. package/dist/esm/api/faucet.mjs +1 -1
  31. package/dist/esm/api/fungibleAsset.d.mts +13 -13
  32. package/dist/esm/api/fungibleAsset.mjs +1 -1
  33. package/dist/esm/api/general.mjs +1 -1
  34. package/dist/esm/api/index.d.mts +1 -2
  35. package/dist/esm/api/index.mjs +1 -1
  36. package/dist/esm/api/keyless.d.mts +10 -18
  37. package/dist/esm/api/keyless.mjs +1 -1
  38. package/dist/esm/api/staking.mjs +1 -1
  39. package/dist/esm/api/transaction.d.mts +1 -1
  40. package/dist/esm/api/transaction.mjs +1 -1
  41. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  42. package/dist/esm/api/transactionSubmission/management.d.mts +1 -1
  43. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  45. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  46. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  47. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  48. package/dist/esm/api/utils.mjs +1 -1
  49. package/dist/esm/bcs/index.mjs +1 -1
  50. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  51. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  52. package/dist/esm/{chunk-OAOJVE5X.mjs → chunk-2OTMSEHI.mjs} +2 -2
  53. package/dist/esm/chunk-3OA7CG6N.mjs +2 -0
  54. package/dist/esm/chunk-3OA7CG6N.mjs.map +1 -0
  55. package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
  56. package/dist/esm/chunk-4QMXOWHP.mjs.map +1 -0
  57. package/dist/esm/{chunk-CHL5NDZD.mjs → chunk-534GCQ37.mjs} +2 -2
  58. package/dist/esm/{chunk-KMHJNUXU.mjs → chunk-6DA64TSG.mjs} +2 -2
  59. package/dist/esm/{chunk-XESYWLDD.mjs → chunk-6YDD6LGX.mjs} +2 -2
  60. package/dist/esm/{chunk-XESYWLDD.mjs.map → chunk-6YDD6LGX.mjs.map} +1 -1
  61. package/dist/esm/{chunk-ULUMROUJ.mjs → chunk-7YMBWSKN.mjs} +2 -2
  62. package/dist/esm/{chunk-ULUMROUJ.mjs.map → chunk-7YMBWSKN.mjs.map} +1 -1
  63. package/dist/esm/{chunk-ZUDMSBVZ.mjs → chunk-AE7X4LVG.mjs} +2 -2
  64. package/dist/esm/chunk-AE7X4LVG.mjs.map +1 -0
  65. package/dist/esm/{chunk-ODA4KV4Q.mjs → chunk-ASRAJ24P.mjs} +2 -2
  66. package/dist/esm/{chunk-Q6CZDSLM.mjs → chunk-BIU5KNPT.mjs} +2 -2
  67. package/dist/esm/{chunk-4AOGG725.mjs → chunk-C2HDZYYQ.mjs} +2 -2
  68. package/dist/esm/chunk-CFJEOZMV.mjs +2 -0
  69. package/dist/esm/{chunk-LVYKZS54.mjs.map → chunk-CFJEOZMV.mjs.map} +1 -1
  70. package/dist/esm/chunk-COLCWAPL.mjs +2 -0
  71. package/dist/esm/chunk-COLCWAPL.mjs.map +1 -0
  72. package/dist/esm/{chunk-KWDJ4YOP.mjs → chunk-CW7JVCSV.mjs} +2 -2
  73. package/dist/esm/{chunk-KWDJ4YOP.mjs.map → chunk-CW7JVCSV.mjs.map} +1 -1
  74. package/dist/esm/chunk-D2DIZHP3.mjs +2 -0
  75. package/dist/esm/chunk-D2DIZHP3.mjs.map +1 -0
  76. package/dist/esm/{chunk-J5SQQQPI.mjs → chunk-EGTGR3R4.mjs} +2 -2
  77. package/dist/esm/{chunk-YNBWXDRS.mjs → chunk-FB6T6ZQP.mjs} +2 -2
  78. package/dist/esm/{chunk-XJFGX3E4.mjs → chunk-G4QU37E6.mjs} +2 -2
  79. package/dist/esm/chunk-G4QU37E6.mjs.map +1 -0
  80. package/dist/esm/{chunk-2I2XAOH7.mjs → chunk-GVZZTEYV.mjs} +2 -2
  81. package/dist/esm/{chunk-T3QZ5HSE.mjs → chunk-HZFOKUQZ.mjs} +2 -2
  82. package/dist/esm/{chunk-T3QZ5HSE.mjs.map → chunk-HZFOKUQZ.mjs.map} +1 -1
  83. package/dist/esm/{chunk-NU6UF6RM.mjs → chunk-I657KZIO.mjs} +2 -2
  84. package/dist/esm/{chunk-EMFDNUP2.mjs → chunk-IO2NZ5PR.mjs} +2 -2
  85. package/dist/esm/{chunk-TR6Q7RSZ.mjs → chunk-JP6UNRLO.mjs} +2 -2
  86. package/dist/esm/{chunk-BQCIUNLZ.mjs → chunk-KFKE46CF.mjs} +2 -2
  87. package/dist/esm/{chunk-R25D6NBC.mjs → chunk-LB4KMZNQ.mjs} +2 -2
  88. package/dist/esm/{chunk-R25D6NBC.mjs.map → chunk-LB4KMZNQ.mjs.map} +1 -1
  89. package/dist/esm/{chunk-NJWTXEHT.mjs → chunk-M3VGAYMW.mjs} +2 -2
  90. package/dist/esm/{chunk-NJWTXEHT.mjs.map → chunk-M3VGAYMW.mjs.map} +1 -1
  91. package/dist/esm/{chunk-KBSAS57Q.mjs → chunk-MUEDPI2Z.mjs} +2 -2
  92. package/dist/esm/{chunk-RXMGJBCP.mjs → chunk-N35ARFH3.mjs} +2 -2
  93. package/dist/esm/{chunk-HTO4EQNT.mjs → chunk-ND5A52N4.mjs} +2 -2
  94. package/dist/esm/{chunk-HTO4EQNT.mjs.map → chunk-ND5A52N4.mjs.map} +1 -1
  95. package/dist/esm/{chunk-ZGWWPB3D.mjs → chunk-NKSAU5OX.mjs} +2 -2
  96. package/dist/esm/{chunk-2FKQJL3H.mjs → chunk-NMYQ2LMC.mjs} +2 -2
  97. package/dist/esm/{chunk-2FKQJL3H.mjs.map → chunk-NMYQ2LMC.mjs.map} +1 -1
  98. package/dist/esm/chunk-OF256KD5.mjs +2 -0
  99. package/dist/esm/chunk-OF256KD5.mjs.map +1 -0
  100. package/dist/esm/{chunk-ACOL3VVP.mjs → chunk-OKRUEVF3.mjs} +1 -1
  101. package/dist/esm/chunk-OKRUEVF3.mjs.map +1 -0
  102. package/dist/esm/{chunk-YP3RMVL3.mjs → chunk-OQKD5SSG.mjs} +2 -2
  103. package/dist/esm/chunk-ORMDVSRG.mjs +2 -0
  104. package/dist/esm/chunk-ORMDVSRG.mjs.map +1 -0
  105. package/dist/esm/{chunk-P4UY6YKM.mjs → chunk-P2JP6PSD.mjs} +2 -2
  106. package/dist/esm/{chunk-7M3U2I23.mjs → chunk-PCLBZIT4.mjs} +2 -2
  107. package/dist/esm/chunk-PSTPEDI3.mjs +2 -0
  108. package/dist/esm/{chunk-WF737YNO.mjs.map → chunk-PSTPEDI3.mjs.map} +1 -1
  109. package/dist/esm/{chunk-VJCQBX6V.mjs → chunk-QBWI223M.mjs} +2 -2
  110. package/dist/esm/{chunk-XJ3HRNOP.mjs → chunk-QEKSGA7S.mjs} +2 -2
  111. package/dist/esm/chunk-QEKSGA7S.mjs.map +1 -0
  112. package/dist/esm/{chunk-2VCKY2ZJ.mjs → chunk-QFK75K2K.mjs} +2 -2
  113. package/dist/esm/chunk-S5YUB2BI.mjs +2 -0
  114. package/dist/esm/chunk-S5YUB2BI.mjs.map +1 -0
  115. package/dist/esm/{chunk-YIG37BG2.mjs → chunk-SC7NXRMV.mjs} +2 -2
  116. package/dist/esm/chunk-SQNDWIVJ.mjs +2 -0
  117. package/dist/esm/chunk-SQNDWIVJ.mjs.map +1 -0
  118. package/dist/esm/{chunk-VAZQVN5V.mjs → chunk-TCMSBGBS.mjs} +1 -1
  119. package/dist/esm/chunk-TCMSBGBS.mjs.map +1 -0
  120. package/dist/esm/chunk-UAFAZSOH.mjs +2 -0
  121. package/dist/esm/chunk-UAFAZSOH.mjs.map +1 -0
  122. package/dist/esm/{chunk-OVXWFD2N.mjs → chunk-UMFYNNCG.mjs} +2 -2
  123. package/dist/esm/{chunk-OVXWFD2N.mjs.map → chunk-UMFYNNCG.mjs.map} +1 -1
  124. package/dist/esm/{chunk-2Z4N3GLA.mjs → chunk-VG2J3UTS.mjs} +2 -2
  125. package/dist/esm/{chunk-2Z4N3GLA.mjs.map → chunk-VG2J3UTS.mjs.map} +1 -1
  126. package/dist/esm/{chunk-TT2VLL52.mjs → chunk-VSPQRNEG.mjs} +2 -2
  127. package/dist/esm/chunk-VSPQRNEG.mjs.map +1 -0
  128. package/dist/esm/{chunk-ZG6HOK6A.mjs → chunk-VSWIMQAB.mjs} +2 -2
  129. package/dist/esm/{chunk-ZG6HOK6A.mjs.map → chunk-VSWIMQAB.mjs.map} +1 -1
  130. package/dist/esm/{chunk-EY3FIYMV.mjs → chunk-W2MKEIHI.mjs} +2 -2
  131. package/dist/esm/{chunk-CYWA4AJF.mjs → chunk-WAWBXQ6B.mjs} +2 -2
  132. package/dist/esm/{chunk-2QGT5DK3.mjs → chunk-WR5L4STD.mjs} +2 -2
  133. package/dist/esm/{chunk-SCPXFKEK.mjs → chunk-Y4VKIX2V.mjs} +2 -2
  134. package/dist/esm/{chunk-SCPXFKEK.mjs.map → chunk-Y4VKIX2V.mjs.map} +1 -1
  135. package/dist/esm/{chunk-V7VV5QW4.mjs → chunk-Y5DMKMLF.mjs} +2 -2
  136. package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
  137. package/dist/esm/{chunk-2HXKDHMA.mjs.map → chunk-YE5B2S5L.mjs.map} +1 -1
  138. package/dist/esm/{chunk-5D65Z2SG.mjs → chunk-YGWIVUJP.mjs} +2 -2
  139. package/dist/esm/{chunk-MKHPGY3O.mjs → chunk-YIIDPNGQ.mjs} +2 -2
  140. package/dist/esm/{chunk-U426PZNM.mjs → chunk-YMVFNEBO.mjs} +2 -2
  141. package/dist/esm/client/core.mjs +1 -1
  142. package/dist/esm/client/get.mjs +1 -1
  143. package/dist/esm/client/index.mjs +1 -1
  144. package/dist/esm/client/post.mjs +1 -1
  145. package/dist/esm/core/account/index.d.mts +12 -0
  146. package/dist/esm/core/account/index.mjs +2 -0
  147. package/dist/esm/core/account/index.mjs.map +1 -0
  148. package/dist/esm/core/account/utils/address.mjs +1 -1
  149. package/dist/esm/core/account/utils/index.mjs +1 -1
  150. package/dist/esm/core/accountAddress.mjs +1 -1
  151. package/dist/esm/core/authenticationKey.mjs +1 -1
  152. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  153. package/dist/esm/core/crypto/ephemeral.d.mts +2 -1
  154. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  155. package/dist/esm/core/crypto/index.mjs +1 -1
  156. package/dist/esm/core/crypto/keyless.d.mts +2 -2
  157. package/dist/esm/core/crypto/keyless.mjs +1 -1
  158. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  159. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  160. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  161. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  162. package/dist/esm/core/crypto/signature.mjs +1 -1
  163. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  164. package/dist/esm/core/index.mjs +1 -1
  165. package/dist/esm/index.d.mts +1 -1
  166. package/dist/esm/index.mjs +1 -1
  167. package/dist/esm/internal/account.d.mts +1 -1
  168. package/dist/esm/internal/account.mjs +1 -1
  169. package/dist/esm/internal/ans.d.mts +3 -3
  170. package/dist/esm/internal/ans.mjs +1 -1
  171. package/dist/esm/internal/coin.mjs +1 -1
  172. package/dist/esm/internal/digitalAsset.d.mts +9 -9
  173. package/dist/esm/internal/digitalAsset.mjs +1 -1
  174. package/dist/esm/internal/event.mjs +1 -1
  175. package/dist/esm/internal/faucet.mjs +1 -1
  176. package/dist/esm/internal/fungibleAsset.d.mts +13 -13
  177. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  178. package/dist/esm/internal/general.mjs +1 -1
  179. package/dist/esm/internal/keyless.d.mts +2 -4
  180. package/dist/esm/internal/keyless.mjs +1 -1
  181. package/dist/esm/internal/staking.mjs +1 -1
  182. package/dist/esm/internal/transaction.mjs +1 -1
  183. package/dist/esm/internal/transactionSubmission.d.mts +1 -1
  184. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  185. package/dist/esm/internal/view.mjs +1 -1
  186. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  187. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  188. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  189. package/dist/esm/transactions/index.mjs +1 -1
  190. package/dist/esm/transactions/instances/index.mjs +1 -1
  191. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  192. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  193. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  194. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  195. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  196. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  197. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  198. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -1
  199. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  200. package/dist/esm/transactions/management/index.d.mts +1 -1
  201. package/dist/esm/transactions/management/index.mjs +1 -1
  202. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  203. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  204. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  205. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  206. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  207. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  208. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  209. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  210. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  211. package/dist/esm/types/index.mjs +1 -1
  212. package/dist/esm/utils/apiEndpoints.mjs +1 -1
  213. package/dist/esm/utils/const.d.mts +2 -2
  214. package/dist/esm/utils/const.mjs +1 -1
  215. package/dist/esm/utils/index.mjs +1 -1
  216. package/dist/esm/version.d.mts +1 -1
  217. package/dist/esm/version.mjs +1 -1
  218. package/package.json +1 -1
  219. package/src/account/Ed25519Account.ts +1 -1
  220. package/src/account/EphemeralKeyPair.ts +39 -10
  221. package/src/account/KeylessAccount.ts +38 -18
  222. package/src/account/MultiKeyAccount.ts +1 -3
  223. package/src/account/SingleKeyAccount.ts +3 -4
  224. package/src/api/account.ts +1 -1
  225. package/src/api/ans.ts +1 -1
  226. package/src/api/aptosConfig.ts +1 -1
  227. package/src/api/digitalAsset.ts +1 -1
  228. package/src/api/fungibleAsset.ts +1 -1
  229. package/src/api/keyless.ts +3 -22
  230. package/src/api/transaction.ts +1 -1
  231. package/src/client/post.ts +1 -2
  232. package/src/core/account/index.ts +2 -0
  233. package/src/core/crypto/ed25519.ts +4 -6
  234. package/src/core/crypto/ephemeral.ts +4 -2
  235. package/src/core/crypto/keyless.ts +9 -3
  236. package/src/core/crypto/multiKey.ts +3 -5
  237. package/src/core/crypto/singleKey.ts +3 -3
  238. package/src/internal/ans.ts +1 -1
  239. package/src/internal/digitalAsset.ts +1 -1
  240. package/src/internal/fungibleAsset.ts +1 -1
  241. package/src/internal/keyless.ts +3 -19
  242. package/src/internal/transactionSubmission.ts +3 -1
  243. package/src/transactions/transactionBuilder/index.ts +0 -1
  244. package/src/transactions/transactionBuilder/signingMessage.ts +13 -18
  245. package/src/transactions/transactionBuilder/transactionBuilder.ts +48 -37
  246. package/src/types/index.ts +0 -1
  247. package/src/utils/apiEndpoints.ts +1 -0
  248. package/src/utils/const.ts +2 -2
  249. package/src/version.ts +1 -1
  250. package/dist/esm/chunk-2HXKDHMA.mjs +0 -2
  251. package/dist/esm/chunk-2MPLQPZT.mjs +0 -2
  252. package/dist/esm/chunk-2MPLQPZT.mjs.map +0 -1
  253. package/dist/esm/chunk-3J2Q7O57.mjs +0 -2
  254. package/dist/esm/chunk-3J2Q7O57.mjs.map +0 -1
  255. package/dist/esm/chunk-6OKRMOWR.mjs +0 -2
  256. package/dist/esm/chunk-6OKRMOWR.mjs.map +0 -1
  257. package/dist/esm/chunk-ACOL3VVP.mjs.map +0 -1
  258. package/dist/esm/chunk-ATXQWKVH.mjs +0 -2
  259. package/dist/esm/chunk-ATXQWKVH.mjs.map +0 -1
  260. package/dist/esm/chunk-LVYKZS54.mjs +0 -2
  261. package/dist/esm/chunk-MAFSWKAF.mjs +0 -2
  262. package/dist/esm/chunk-MAFSWKAF.mjs.map +0 -1
  263. package/dist/esm/chunk-MX3YIOU5.mjs +0 -2
  264. package/dist/esm/chunk-MX3YIOU5.mjs.map +0 -1
  265. package/dist/esm/chunk-TT2VLL52.mjs.map +0 -1
  266. package/dist/esm/chunk-VAZQVN5V.mjs.map +0 -1
  267. package/dist/esm/chunk-WF737YNO.mjs +0 -2
  268. package/dist/esm/chunk-XJ3HRNOP.mjs.map +0 -1
  269. package/dist/esm/chunk-XJFGX3E4.mjs.map +0 -1
  270. package/dist/esm/chunk-YPBHGSXY.mjs +0 -2
  271. package/dist/esm/chunk-YPBHGSXY.mjs.map +0 -1
  272. package/dist/esm/chunk-YU7DNMEA.mjs +0 -2
  273. package/dist/esm/chunk-YU7DNMEA.mjs.map +0 -1
  274. package/dist/esm/chunk-ZUDMSBVZ.mjs.map +0 -1
  275. /package/dist/esm/{chunk-OAOJVE5X.mjs.map → chunk-2OTMSEHI.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-CHL5NDZD.mjs.map → chunk-534GCQ37.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-KMHJNUXU.mjs.map → chunk-6DA64TSG.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-ODA4KV4Q.mjs.map → chunk-ASRAJ24P.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-Q6CZDSLM.mjs.map → chunk-BIU5KNPT.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-4AOGG725.mjs.map → chunk-C2HDZYYQ.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-J5SQQQPI.mjs.map → chunk-EGTGR3R4.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-YNBWXDRS.mjs.map → chunk-FB6T6ZQP.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-2I2XAOH7.mjs.map → chunk-GVZZTEYV.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-NU6UF6RM.mjs.map → chunk-I657KZIO.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-EMFDNUP2.mjs.map → chunk-IO2NZ5PR.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-TR6Q7RSZ.mjs.map → chunk-JP6UNRLO.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-BQCIUNLZ.mjs.map → chunk-KFKE46CF.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-KBSAS57Q.mjs.map → chunk-MUEDPI2Z.mjs.map} +0 -0
  289. /package/dist/esm/{chunk-RXMGJBCP.mjs.map → chunk-N35ARFH3.mjs.map} +0 -0
  290. /package/dist/esm/{chunk-ZGWWPB3D.mjs.map → chunk-NKSAU5OX.mjs.map} +0 -0
  291. /package/dist/esm/{chunk-YP3RMVL3.mjs.map → chunk-OQKD5SSG.mjs.map} +0 -0
  292. /package/dist/esm/{chunk-P4UY6YKM.mjs.map → chunk-P2JP6PSD.mjs.map} +0 -0
  293. /package/dist/esm/{chunk-7M3U2I23.mjs.map → chunk-PCLBZIT4.mjs.map} +0 -0
  294. /package/dist/esm/{chunk-VJCQBX6V.mjs.map → chunk-QBWI223M.mjs.map} +0 -0
  295. /package/dist/esm/{chunk-2VCKY2ZJ.mjs.map → chunk-QFK75K2K.mjs.map} +0 -0
  296. /package/dist/esm/{chunk-YIG37BG2.mjs.map → chunk-SC7NXRMV.mjs.map} +0 -0
  297. /package/dist/esm/{chunk-EY3FIYMV.mjs.map → chunk-W2MKEIHI.mjs.map} +0 -0
  298. /package/dist/esm/{chunk-CYWA4AJF.mjs.map → chunk-WAWBXQ6B.mjs.map} +0 -0
  299. /package/dist/esm/{chunk-2QGT5DK3.mjs.map → chunk-WR5L4STD.mjs.map} +0 -0
  300. /package/dist/esm/{chunk-V7VV5QW4.mjs.map → chunk-Y5DMKMLF.mjs.map} +0 -0
  301. /package/dist/esm/{chunk-5D65Z2SG.mjs.map → chunk-YGWIVUJP.mjs.map} +0 -0
  302. /package/dist/esm/{chunk-MKHPGY3O.mjs.map → chunk-YIIDPNGQ.mjs.map} +0 -0
  303. /package/dist/esm/{chunk-U426PZNM.mjs.map → chunk-YMVFNEBO.mjs.map} +0 -0
@@ -3,16 +3,22 @@
3
3
 
4
4
  import { randomBytes } from "@noble/hashes/utils";
5
5
 
6
-
7
- import { EPK_HORIZON_SECS, Ed25519PrivateKey, EphemeralPublicKey, EphemeralSignature, PrivateKey} from "../core/crypto";
6
+ import {
7
+ EPK_HORIZON_SECS,
8
+ Ed25519PrivateKey,
9
+ EphemeralPublicKey,
10
+ EphemeralSignature,
11
+ PrivateKey,
12
+ } from "../core/crypto";
8
13
  import { Hex } from "../core/hex";
9
14
  import { bytesToBigIntLE, padAndPackBytesWithLen, poseidonHash } from "../core/crypto/poseidon";
10
- import { HexInput, SigningSchemeInput } from "../types";
15
+ import { EphemeralPublicKeyVariant, HexInput, SigningSchemeInput } from "../types";
16
+ import { Deserializer, Serializable, Serializer } from "../bcs";
11
17
 
12
- export class EphemeralKeyPair {
18
+ export class EphemeralKeyPair extends Serializable{
13
19
  readonly blinder: Uint8Array;
14
20
 
15
- readonly expiryDateSecs: bigint;
21
+ readonly expiryDateSecs: bigint | number;
16
22
 
17
23
  readonly nonce: string;
18
24
 
@@ -20,7 +26,8 @@ export class EphemeralKeyPair {
20
26
 
21
27
  readonly publicKey: EphemeralPublicKey;
22
28
 
23
- constructor(args: { privateKey: PrivateKey; expiryDateSecs?: bigint; blinder?: HexInput }) {
29
+ constructor(args: { privateKey: PrivateKey; expiryDateSecs?: bigint | number; blinder?: HexInput }) {
30
+ super()
24
31
  const { privateKey, expiryDateSecs, blinder } = args;
25
32
  this.privateKey = privateKey;
26
33
  this.publicKey = new EphemeralPublicKey(privateKey.publicKey());
@@ -29,7 +36,29 @@ export class EphemeralKeyPair {
29
36
  this.nonce = this.generateNonce();
30
37
  }
31
38
 
32
- static generate(args?: {scheme: SigningSchemeInput}): EphemeralKeyPair {
39
+ serialize(serializer: Serializer): void {
40
+ serializer.serializeU32AsUleb128(this.publicKey.variant);
41
+ serializer.serializeBytes(this.privateKey.toUint8Array())
42
+ serializer.serializeU64(this.expiryDateSecs)
43
+ serializer.serializeFixedBytes(this.blinder)
44
+ }
45
+
46
+ static deserialize(deserializer: Deserializer): EphemeralKeyPair {
47
+ const variantIndex = deserializer.deserializeUleb128AsU32();
48
+ let privateKey: PrivateKey;
49
+ switch (variantIndex) {
50
+ case EphemeralPublicKeyVariant.Ed25519:
51
+ privateKey = Ed25519PrivateKey.deserialize(deserializer);
52
+ break;
53
+ default:
54
+ throw new Error(`Unknown variant index for EphemeralPublicKey: ${variantIndex}`);
55
+ }
56
+ const expiryDateSecs = deserializer.deserializeU64();
57
+ const blinder = deserializer.deserializeFixedBytes(31);
58
+ return new EphemeralKeyPair({privateKey, expiryDateSecs, blinder});
59
+ }
60
+
61
+ static generate(args?: { scheme: SigningSchemeInput }): EphemeralKeyPair {
33
62
  let privateKey: PrivateKey;
34
63
 
35
64
  switch (args?.scheme) {
@@ -43,8 +72,8 @@ export class EphemeralKeyPair {
43
72
 
44
73
  generateNonce(): string {
45
74
  const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);
46
- fields.push(BigInt(this.expiryDateSecs))
47
- fields.push(bytesToBigIntLE(this.blinder))
75
+ fields.push(BigInt(this.expiryDateSecs));
76
+ fields.push(bytesToBigIntLE(this.blinder));
48
77
  const nonceHash = poseidonHash(fields);
49
78
  return nonceHash.toString();
50
79
  }
@@ -65,7 +94,7 @@ function generateBlinder(): Uint8Array {
65
94
  }
66
95
 
67
96
  function currentTimeInSeconds(): number {
68
- return Math.floor(new Date().getTime() / 1000)
97
+ return Math.floor(new Date().getTime() / 1000);
69
98
  }
70
99
 
71
100
  function floorToWholeHour(timestampInSeconds: number): number {
@@ -22,7 +22,7 @@ import { Account } from "./Account";
22
22
  import { EphemeralKeyPair } from "./EphemeralKeyPair";
23
23
  import { Hex } from "../core/hex";
24
24
  import { AccountAuthenticatorSingleKey } from "../transactions/authenticator/account";
25
- import { Serializer } from "../bcs";
25
+ import { Deserializer, Serializer } from "../bcs";
26
26
  import { deriveTransactionType, generateSigningMessage } from "../transactions/transactionBuilder/signingMessage";
27
27
  import { AnyRawTransaction } from "../transactions/types";
28
28
 
@@ -44,9 +44,6 @@ export class KeylessAccount implements Account {
44
44
 
45
45
  static readonly SLIP_0010_SEED: string = "32 bytes";
46
46
 
47
- static readonly APTOS_CONNECT_CLIENT_ID: string =
48
- "734998116548-ib6ircv72o1b6l0no9ol4spnnkr8gm69.apps.googleusercontent.com";
49
-
50
47
  publicKey: KeylessPublicKey;
51
48
 
52
49
  ephemeralKeyPair: EphemeralKeyPair;
@@ -102,6 +99,41 @@ export class KeylessAccount implements Account {
102
99
  this.pepper = pepperBytes;
103
100
  }
104
101
 
102
+ async serialize(serializer: Serializer): Promise<void> {
103
+ serializer.serializeStr(this.jwt);
104
+ serializer.serializeStr(this.uidKey);
105
+ serializer.serializeFixedBytes(this.pepper);
106
+ this.ephemeralKeyPair.serialize(serializer);
107
+ const proof = await this.proof;
108
+ proof.serialize(serializer);
109
+ }
110
+
111
+ static deserialize(deserializer: Deserializer): KeylessAccount {
112
+ const jwt = deserializer.deserializeStr();
113
+ const uidKey = deserializer.deserializeStr();
114
+ const pepper = deserializer.deserializeFixedBytes(31);
115
+ const ephemeralKeyPair = EphemeralKeyPair.deserialize(deserializer);
116
+ const proof = SignedGroth16Signature.deserialize(deserializer);
117
+ return KeylessAccount.fromJWTAndProof({
118
+ proofFetcherOrData: proof,
119
+ pepper,
120
+ uidKey,
121
+ jwt,
122
+ ephemeralKeyPair,
123
+ });
124
+ }
125
+
126
+ async bcsToBytes(): Promise<Uint8Array> {
127
+ const serializer = new Serializer();
128
+ await this.serialize(serializer);
129
+ return serializer.toUint8Array();
130
+ }
131
+
132
+ async bcsToHex(): Promise<Hex> {
133
+ const bcsBytes = await this.bcsToBytes();
134
+ return Hex.fromHexInput(bcsBytes);
135
+ }
136
+
105
137
  private async initialize(promise: Promise<SignedGroth16Signature>) {
106
138
  try {
107
139
  this.proof = await promise;
@@ -119,7 +151,7 @@ export class KeylessAccount implements Account {
119
151
 
120
152
  async waitForProofFetch() {
121
153
  if (this.proof instanceof Promise) {
122
- await this.proof
154
+ await this.proof;
123
155
  }
124
156
  }
125
157
 
@@ -138,7 +170,7 @@ export class KeylessAccount implements Account {
138
170
  const serializer = new Serializer();
139
171
  serializer.serializeFixedBytes(Hex.fromHexInput(data).toUint8Array());
140
172
  serializer.serializeOption(this.proof.proof);
141
- const signMess = generateSigningMessage(serializer.toUint8Array(), "TransactionAndProof");
173
+ const signMess = generateSigningMessage(serializer.toUint8Array(), "APTOS::TransactionAndProof");
142
174
 
143
175
  const ephemeralSignature = this.ephemeralKeyPair.sign(signMess);
144
176
 
@@ -178,18 +210,6 @@ export class KeylessAccount implements Account {
178
210
  });
179
211
  }
180
212
 
181
- deriveAptosConnectPublicKey(): KeylessPublicKey {
182
- const { uidKey, uidVal, pepper } = this;
183
- const { iss } = this.publicKey;
184
- const addressSeed = computeAddressSeed({
185
- uidKey,
186
- uidVal,
187
- aud: KeylessAccount.APTOS_CONNECT_CLIENT_ID,
188
- pepper,
189
- });
190
- return new KeylessPublicKey(iss, addressSeed);
191
- }
192
-
193
213
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this
194
214
  verifySignature(args: { message: HexInput; signature: Signature }): boolean {
195
215
  return true;
@@ -78,9 +78,7 @@ export class MultiKeyAccount implements Account {
78
78
 
79
79
  async waitForProofFetch() {
80
80
  const keylessSigners = this.signers.filter((signer) => signer instanceof KeylessAccount) as KeylessAccount[];
81
- await Promise.all(
82
- keylessSigners.filter((signer) => signer.proof instanceof Promise).map( (signer) => signer.proof),
83
- );
81
+ await Promise.all(keylessSigners.filter((signer) => signer.proof instanceof Promise).map((signer) => signer.proof));
84
82
  }
85
83
 
86
84
  /**
@@ -109,17 +109,16 @@ export class SingleKeyAccount implements Account {
109
109
  }
110
110
 
111
111
  signWithAuthenticator(transaction: AnyRawTransaction) {
112
- const innerSignature = this.sign(generateSigningMessageForTransaction(transaction));
113
- const signature = new AnySignature(innerSignature);
112
+ const signature = this.sign(generateSigningMessageForTransaction(transaction));
114
113
  return new AccountAuthenticatorSingleKey(this.publicKey, signature);
115
114
  }
116
115
 
117
116
  sign(message: HexInput) {
118
- return this.privateKey.sign(message);
117
+ return new AnySignature(this.privateKey.sign(message));
119
118
  }
120
119
 
121
120
  signTransaction(transaction: AnyRawTransaction) {
122
- return this.sign(generateSigningMessageForTransaction(transaction))
121
+ return this.sign(generateSigningMessageForTransaction(transaction));
123
122
  }
124
123
 
125
124
  // endregion
@@ -1,7 +1,7 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { Account as AccountModule} from "../account"
4
+ import { Account as AccountModule } from "../account";
5
5
  import { AccountAddress, PrivateKey, AccountAddressInput } from "../core";
6
6
  import {
7
7
  AccountData,
package/src/api/ans.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ import { Account } from "../account";
4
5
  import { AccountAddress, AccountAddressInput } from "../core";
5
6
  import {
6
7
  RegisterNameParameters,
@@ -26,7 +27,6 @@ import { GetANSNameResponse } from "../types";
26
27
  import { InputGenerateTransactionOptions } from "../transactions/types";
27
28
  import { AptosConfig } from "./aptosConfig";
28
29
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
29
- import { Account } from "../account";
30
30
 
31
31
  /**
32
32
  * A class to handle all `ANS` operations
@@ -135,7 +135,7 @@ export class AptosConfig {
135
135
  isPepperServiceRequest(url: string): boolean {
136
136
  return NetworkToPepperAPI[this.network] === url;
137
137
  }
138
-
138
+
139
139
  /**
140
140
  * Checks if the URL is a known prover service endpoint
141
141
  *
@@ -14,6 +14,7 @@ import {
14
14
  TokenStandardArg,
15
15
  } from "../types";
16
16
  import { AccountAddress, AccountAddressInput } from "../core";
17
+ import { Account } from "../account";
17
18
  import { InputGenerateTransactionOptions } from "../transactions/types";
18
19
  import {
19
20
  addDigitalAssetPropertyTransaction,
@@ -45,7 +46,6 @@ import {
45
46
  import { ProcessorType } from "../utils/const";
46
47
  import { AptosConfig } from "./aptosConfig";
47
48
  import { waitForIndexerOnVersion } from "./utils";
48
- import { Account } from "../account";
49
49
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
50
50
 
51
51
  /**
@@ -23,9 +23,9 @@ import {
23
23
  import { ProcessorType } from "../utils/const";
24
24
  import { AptosConfig } from "./aptosConfig";
25
25
  import { waitForIndexerOnVersion } from "./utils";
26
+ import { Account } from "../account";
26
27
  import { AccountAddressInput } from "../core";
27
28
  import { InputGenerateTransactionOptions } from "../transactions";
28
- import { Account } from "../account";
29
29
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
30
30
 
31
31
  /**
@@ -1,28 +1,11 @@
1
1
  // Copyright © Aptos Foundation
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { Account, EphemeralKeyPair, KeylessAccount, MultiKeyAccount } from "../account";
4
+ import { EphemeralKeyPair, KeylessAccount } from "../account";
5
5
  import { deriveKeylessAccount, getPepper } from "../internal/keyless";
6
6
  import { HexInput } from "../types";
7
7
  import { AptosConfig } from "./aptosConfig";
8
8
 
9
- interface BaseDeriveKeylessAccountArgs {
10
- jwt: string;
11
- ephemeralKeyPair: EphemeralKeyPair;
12
- uidKey?: string;
13
- pepper?: HexInput;
14
- extraFieldKey?: string;
15
- fetchProofAsync?: boolean;
16
- }
17
-
18
- interface DeriveKeylessAccountArgs extends BaseDeriveKeylessAccountArgs {
19
- disableConnect: true;
20
- }
21
-
22
- interface DeriveKeylessAccountWithConnectArgs extends BaseDeriveKeylessAccountArgs {
23
- disableConnect?: boolean;
24
- }
25
-
26
9
  /**
27
10
  * A class to query all `OIDB` related queries on Aptos.
28
11
  */
@@ -35,12 +18,10 @@ export class Keyless {
35
18
  * @param args.jwt jwt token
36
19
  * @returns The pepper
37
20
  */
38
- async getPepper(args: { jwt: string, ephemeralKeyPair: EphemeralKeyPair; }): Promise<Uint8Array> {
21
+ async getPepper(args: { jwt: string; ephemeralKeyPair: EphemeralKeyPair }): Promise<Uint8Array> {
39
22
  return getPepper({ aptosConfig: this.config, ...args });
40
23
  }
41
24
 
42
- async deriveKeylessAccount(args: DeriveKeylessAccountArgs): Promise<KeylessAccount>;
43
- async deriveKeylessAccount(args: DeriveKeylessAccountWithConnectArgs): Promise<MultiKeyAccount>;
44
25
  async deriveKeylessAccount(args: {
45
26
  jwt: string;
46
27
  ephemeralKeyPair: EphemeralKeyPair;
@@ -49,7 +30,7 @@ export class Keyless {
49
30
  extraFieldKey?: string;
50
31
  disableConnect?: boolean;
51
32
  fetchProofAsync?: boolean;
52
- }): Promise<Account> {
33
+ }): Promise<KeylessAccount> {
53
34
  return deriveKeylessAccount({ aptosConfig: this.config, ...args });
54
35
  }
55
36
  }
@@ -34,11 +34,11 @@ import {
34
34
  InputGenerateTransactionPayloadData,
35
35
  } from "../transactions";
36
36
  import { AccountAddressInput, PrivateKey } from "../core";
37
+ import { Account } from "../account";
37
38
  import { Build } from "./transactionSubmission/build";
38
39
  import { Simulate } from "./transactionSubmission/simulate";
39
40
  import { Submit } from "./transactionSubmission/submit";
40
41
  import { TransactionManagement } from "./transactionSubmission/management";
41
- import { Account } from "../account/Account";
42
42
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
43
43
 
44
44
  export class Transaction {
@@ -136,7 +136,6 @@ export async function postAptosFaucet<Req extends {}, Res extends {}>(
136
136
  });
137
137
  }
138
138
 
139
-
140
139
  export async function postAptosPepperService<Req extends {}, Res extends {}>(
141
140
  options: PostAptosRequestOptions,
142
141
  ): Promise<AptosResponse<Req, Res>> {
@@ -147,4 +146,4 @@ export async function postAptosProvingService<Req extends {}, Res extends {}>(
147
146
  options: PostAptosRequestOptions,
148
147
  ): Promise<AptosResponse<Req, Res>> {
149
148
  return post<Req, Res>({ ...options, type: AptosApiType.PROVER });
150
- }
149
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./utils";
2
+
@@ -7,11 +7,7 @@ import { Serializable, Serializer } from "../../bcs/serializer";
7
7
  import { AuthenticationKey } from "../authenticationKey";
8
8
  import { Hex } from "../hex";
9
9
  import { HexInput, SigningScheme as AuthenticationKeyScheme } from "../../types";
10
- import {
11
- isValidHardenedPath,
12
- fromDerivationPath as fromDerivationPathInner,
13
- mnemonicToSeed,
14
- } from "./hdKey";
10
+ import { isValidHardenedPath, fromDerivationPath as fromDerivationPathInner, mnemonicToSeed } from "./hdKey";
15
11
  import { PrivateKey } from "./privateKey";
16
12
  import { AccountPublicKey, VerifySignatureArgs } from "./publicKey";
17
13
  import { Signature } from "./signature";
@@ -189,7 +185,9 @@ export class Ed25519PrivateKey extends Serializable implements PrivateKey {
189
185
  if (!isValidHardenedPath(path)) {
190
186
  throw new Error(`Invalid derivation path ${path}`);
191
187
  }
192
- return new Ed25519PrivateKey(fromDerivationPathInner(path, Ed25519PrivateKey.SLIP_0010_SEED, mnemonicToSeed(mnemonics)));
188
+ return new Ed25519PrivateKey(
189
+ fromDerivationPathInner(path, Ed25519PrivateKey.SLIP_0010_SEED, mnemonicToSeed(mnemonics)),
190
+ );
193
191
  }
194
192
 
195
193
  // endregion
@@ -16,12 +16,15 @@ export class EphemeralPublicKey extends PublicKey {
16
16
  */
17
17
  public readonly publicKey: PublicKey;
18
18
 
19
+ public readonly variant: EphemeralPublicKeyVariant;
20
+
19
21
  constructor(publicKey: PublicKey) {
20
22
  super();
21
23
  const publicKeyType = publicKey.constructor.name;
22
24
  switch (publicKeyType) {
23
25
  case Ed25519PublicKey.name:
24
26
  this.publicKey = publicKey;
27
+ this.variant = EphemeralPublicKeyVariant.Ed25519;
25
28
  break;
26
29
  default:
27
30
  throw new Error(`Unsupported key for EphemeralPublicKey - ${publicKeyType}`);
@@ -43,7 +46,7 @@ export class EphemeralPublicKey extends PublicKey {
43
46
  * @returns string representation of the public key
44
47
  */
45
48
  toString(): string {
46
- return this.bcsToHex().toString()
49
+ return this.bcsToHex().toString();
47
50
  }
48
51
 
49
52
  /**
@@ -86,7 +89,6 @@ export class EphemeralPublicKey extends PublicKey {
86
89
  }
87
90
  }
88
91
 
89
-
90
92
  export class EphemeralSignature extends Signature {
91
93
  public readonly signature: Signature;
92
94
 
@@ -243,7 +243,13 @@ export class SignedGroth16Signature extends Signature {
243
243
  trainingWheelsSignature?: EphemeralSignature;
244
244
  }) {
245
245
  super();
246
- const { proof, expHorizonSecs = BigInt(EPK_HORIZON_SECS), trainingWheelsSignature, extraField, overrideAudVal } = args;
246
+ const {
247
+ proof,
248
+ expHorizonSecs = BigInt(EPK_HORIZON_SECS),
249
+ trainingWheelsSignature,
250
+ extraField,
251
+ overrideAudVal,
252
+ } = args;
247
253
  this.proof = proof;
248
254
  this.expHorizonSecs = expHorizonSecs;
249
255
  this.trainingWheelsSignature = trainingWheelsSignature;
@@ -413,7 +419,7 @@ export class KeylessSignature extends Signature {
413
419
 
414
420
  readonly jwtHeader: string;
415
421
 
416
- readonly expiryDateSecs: bigint;
422
+ readonly expiryDateSecs: bigint | number;
417
423
 
418
424
  readonly ephemeralPublicKey: EphemeralPublicKey;
419
425
 
@@ -427,7 +433,7 @@ export class KeylessSignature extends Signature {
427
433
  constructor(args: {
428
434
  jwtHeader: string;
429
435
  openIdSignatureOrZkProof: OpenIdSignatureOrZkProof;
430
- expiryDateSecs: bigint;
436
+ expiryDateSecs: bigint | number;
431
437
  ephemeralPublicKey: EphemeralPublicKey;
432
438
  ephemeralSignature: EphemeralSignature;
433
439
  }) {
@@ -141,15 +141,13 @@ export class MultiKey extends AccountPublicKey {
141
141
  }
142
142
 
143
143
  getIndex(publicKey: PublicKey): number {
144
-
145
- const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey)
144
+ const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey);
146
145
  const index = this.publicKeys.findIndex((pk) => pk.toString() === anyPublicKey.toString());
147
146
 
148
147
  if (index !== -1) {
149
- return index;
150
- }
148
+ return index;
149
+ }
151
150
  throw new Error("Public key not found in MultiKey");
152
-
153
151
  }
154
152
  }
155
153
 
@@ -178,9 +178,9 @@ export class AnySignature extends Signature {
178
178
  case AnySignatureVariant.Secp256k1:
179
179
  signature = Secp256k1Signature.deserialize(deserializer);
180
180
  break;
181
- case AnySignatureVariant.Keyless:
182
- signature = KeylessSignature.deserialize(deserializer);
183
- break;
181
+ case AnySignatureVariant.Keyless:
182
+ signature = KeylessSignature.deserialize(deserializer);
183
+ break;
184
184
  default:
185
185
  throw new Error(`Unknown variant index for AnySignature: ${variantIndex}`);
186
186
  }
@@ -8,8 +8,8 @@
8
8
  * name namespace and without having a dependency cycle error.
9
9
  */
10
10
 
11
- import { Account } from "../account";
12
11
  import { AptosConfig } from "../api/aptosConfig";
12
+ import { Account } from "../account";
13
13
  import { AccountAddress, AccountAddressInput } from "../core";
14
14
  import { InputGenerateTransactionOptions } from "../transactions/types";
15
15
  import { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from "../types";
@@ -11,6 +11,7 @@
11
11
  import { AptosConfig } from "../api/aptosConfig";
12
12
  import { Bool, MoveString, MoveVector, U64 } from "../bcs";
13
13
  import { AccountAddress, AccountAddressInput } from "../core";
14
+ import { Account } from "../account";
14
15
  import { EntryFunctionABI, InputGenerateTransactionOptions } from "../transactions/types";
15
16
  import {
16
17
  AnyNumber,
@@ -53,7 +54,6 @@ import {
53
54
  TypeTagU64,
54
55
  TypeTagVector,
55
56
  } from "../transactions";
56
- import { Account } from "../account";
57
57
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
58
58
 
59
59
  // A property type map for the user input and what Move expects
@@ -34,6 +34,7 @@ import {
34
34
  FungibleAssetMetadataBoolExp,
35
35
  } from "../types/generated/types";
36
36
  import { AccountAddressInput } from "../core";
37
+ import { Account } from "../account";
37
38
  import {
38
39
  EntryFunctionABI,
39
40
  InputGenerateTransactionOptions,
@@ -42,7 +43,6 @@ import {
42
43
  TypeTagU64,
43
44
  } from "../transactions";
44
45
  import { generateTransaction } from "./transactionSubmission";
45
- import { Account } from "../account";
46
46
  import { SimpleTransaction } from "../transactions/instances/simpleTransaction";
47
47
 
48
48
  export async function getFungibleAssetMetadata(args: {
@@ -18,12 +18,11 @@ import {
18
18
  EphemeralSignature,
19
19
  Groth16Zkp,
20
20
  Hex,
21
- MultiKey,
22
21
  SignedGroth16Signature,
23
22
  } from "../core";
24
23
  import { HexInput } from "../types";
25
24
  import { Serializer } from "../bcs";
26
- import { EphemeralKeyPair, KeylessAccount, MultiKeyAccount } from "../account";
25
+ import { EphemeralKeyPair, KeylessAccount } from "../account";
27
26
  import { PepperFetchResponse, ProverResponse } from "../types/keyless";
28
27
 
29
28
  const APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST = "APTOS_KEYLESS_PEPPER_PINKAS_VUF_DST";
@@ -171,15 +170,10 @@ export async function deriveKeylessAccount(args: {
171
170
  uidKey?: string;
172
171
  pepper?: HexInput;
173
172
  extraFieldKey?: string;
174
- disableConnect?: boolean;
175
173
  fetchProofAsync?: boolean;
176
- }): Promise<KeylessAccount | MultiKeyAccount> {
174
+ }): Promise<KeylessAccount> {
177
175
  const { fetchProofAsync } = args;
178
- let { pepper, disableConnect } = args;
179
-
180
- if (pepper || disableConnect) {
181
- disableConnect = true;
182
- }
176
+ let { pepper } = args;
183
177
  if (pepper === undefined) {
184
178
  pepper = await getPepper(args);
185
179
  } else if (Hex.fromHexInput(pepper).toUint8Array().length !== 31) {
@@ -191,15 +185,5 @@ export async function deriveKeylessAccount(args: {
191
185
 
192
186
  const keylessAccount = KeylessAccount.fromJWTAndProof({ ...args, proofFetcherOrData: proof, pepper });
193
187
 
194
- if (disableConnect === true) {
195
188
  return keylessAccount;
196
- }
197
-
198
- const aptosConnectPublicKey = keylessAccount.deriveAptosConnectPublicKey();
199
-
200
- const multiKey = new MultiKey({
201
- publicKeys: [keylessAccount.publicKey, aptosConnectPublicKey],
202
- signaturesRequired: 1,
203
- });
204
- return new MultiKeyAccount({ multiKey, signers: [keylessAccount] });
205
189
  }
@@ -100,10 +100,10 @@ export async function buildTransactionPayload(
100
100
  args: { aptosConfig: AptosConfig } & InputGenerateTransactionData,
101
101
  ): Promise<AnyTransactionPayloadInstance> {
102
102
  const { aptosConfig, data } = args;
103
-
104
103
  // Merge in aptosConfig for remote ABI on non-script payloads
105
104
  let generateTransactionPayloadData: InputGenerateTransactionPayloadDataWithRemoteABI;
106
105
  let payload: AnyTransactionPayloadInstance;
106
+
107
107
  if ("bytecode" in data) {
108
108
  // TODO: Add ABI checking later
109
109
  payload = await generateTransactionPayload(data);
@@ -114,6 +114,7 @@ export async function buildTransactionPayload(
114
114
  function: data.function,
115
115
  functionArguments: data.functionArguments,
116
116
  typeArguments: data.typeArguments,
117
+ abi: data.abi,
117
118
  };
118
119
  payload = await generateTransactionPayload(generateTransactionPayloadData);
119
120
  } else {
@@ -122,6 +123,7 @@ export async function buildTransactionPayload(
122
123
  function: data.function,
123
124
  functionArguments: data.functionArguments,
124
125
  typeArguments: data.typeArguments,
126
+ abi: data.abi,
125
127
  };
126
128
  payload = await generateTransactionPayload(generateTransactionPayloadData);
127
129
  }
@@ -5,4 +5,3 @@ export * from "./helpers";
5
5
  export * from "./transactionBuilder";
6
6
  export * from "./remoteAbi";
7
7
  export * from "./signingMessage";
8
-