@aptos-labs/ts-sdk 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/dist/common/{account-CEmLe1wW.d.ts → account-Bb5REyaT.d.ts} +60 -11
  2. package/dist/common/chunk-6MMUUJHX.js +4 -0
  3. package/dist/common/chunk-6MMUUJHX.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 +121 -9
  8. package/dist/common/index.js +53 -32
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-Ccxj1zdx.d.mts → Ed25519Account-ndmdpFe9.d.mts} +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  13. package/dist/esm/account/AbstractedAccount.d.mts +2 -2
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Account.d.mts +2 -2
  16. package/dist/esm/account/Account.mjs +1 -1
  17. package/dist/esm/account/AccountUtils.d.mts +3 -3
  18. package/dist/esm/account/AccountUtils.mjs +1 -1
  19. package/dist/esm/account/DerivableAbstractedAccount.d.mts +2 -2
  20. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  21. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  22. package/dist/esm/account/Ed25519Account.mjs +1 -1
  23. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -1
  24. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  25. package/dist/esm/account/FederatedKeylessAccount.d.mts +4 -3
  26. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  27. package/dist/esm/account/KeylessAccount.d.mts +4 -3
  28. package/dist/esm/account/KeylessAccount.mjs +1 -1
  29. package/dist/esm/account/MultiEd25519Account.d.mts +2 -2
  30. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  31. package/dist/esm/account/MultiKeyAccount.d.mts +3 -3
  32. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  33. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  34. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  35. package/dist/esm/account/index.d.mts +3 -3
  36. package/dist/esm/account/index.mjs +1 -1
  37. package/dist/esm/account/utils.d.mts +1 -1
  38. package/dist/esm/account/utils.mjs +1 -1
  39. package/dist/esm/{account-9G6tix5T.d.mts → account--Q9z_xMN.d.mts} +37 -3
  40. package/dist/esm/api/account/abstraction.d.mts +1 -1
  41. package/dist/esm/api/account/abstraction.mjs +1 -1
  42. package/dist/esm/api/account.d.mts +94 -3
  43. package/dist/esm/api/account.mjs +1 -1
  44. package/dist/esm/api/ans.d.mts +2 -2
  45. package/dist/esm/api/ans.mjs +1 -1
  46. package/dist/esm/api/aptos.d.mts +6 -4
  47. package/dist/esm/api/aptos.mjs +1 -1
  48. package/dist/esm/api/aptosConfig.d.mts +1 -1
  49. package/dist/esm/api/aptosConfig.mjs +1 -1
  50. package/dist/esm/api/coin.d.mts +1 -1
  51. package/dist/esm/api/coin.mjs +1 -1
  52. package/dist/esm/api/digitalAsset.d.mts +2 -2
  53. package/dist/esm/api/digitalAsset.mjs +1 -1
  54. package/dist/esm/api/event.d.mts +1 -1
  55. package/dist/esm/api/event.mjs +1 -1
  56. package/dist/esm/api/faucet.d.mts +1 -1
  57. package/dist/esm/api/faucet.mjs +1 -1
  58. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  59. package/dist/esm/api/fungibleAsset.mjs +1 -1
  60. package/dist/esm/api/general.d.mts +1 -1
  61. package/dist/esm/api/general.mjs +1 -1
  62. package/dist/esm/api/index.d.mts +6 -4
  63. package/dist/esm/api/index.mjs +1 -1
  64. package/dist/esm/api/keyless.d.mts +3 -3
  65. package/dist/esm/api/keyless.mjs +1 -1
  66. package/dist/esm/api/object.d.mts +1 -1
  67. package/dist/esm/api/object.mjs +1 -1
  68. package/dist/esm/api/staking.d.mts +1 -1
  69. package/dist/esm/api/staking.mjs +1 -1
  70. package/dist/esm/api/table.d.mts +1 -1
  71. package/dist/esm/api/table.mjs +1 -1
  72. package/dist/esm/api/transaction.d.mts +3 -2
  73. package/dist/esm/api/transaction.mjs +1 -1
  74. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  75. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  76. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  77. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  78. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  79. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  80. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  81. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  82. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  83. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  84. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  85. package/dist/esm/api/utils.d.mts +1 -1
  86. package/dist/esm/api/utils.mjs +1 -1
  87. package/dist/esm/bcs/consts.d.mts +1 -1
  88. package/dist/esm/bcs/deserializer.d.mts +1 -1
  89. package/dist/esm/bcs/index.d.mts +1 -1
  90. package/dist/esm/bcs/index.mjs +1 -1
  91. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -1
  92. package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -1
  93. package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -1
  94. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  95. package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -1
  96. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  97. package/dist/esm/bcs/serializer.d.mts +1 -1
  98. package/dist/esm/{chunk-Q4W3WJ2U.mjs → chunk-2BOHKN33.mjs} +2 -2
  99. package/dist/esm/{chunk-SAMHWS73.mjs → chunk-4COLMDT3.mjs} +2 -2
  100. package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
  101. package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
  102. package/dist/esm/{chunk-5ZRPV4YI.mjs → chunk-5URUYE6H.mjs} +2 -2
  103. package/dist/esm/chunk-ACNHLCQQ.mjs +6 -0
  104. package/dist/esm/chunk-ACNHLCQQ.mjs.map +1 -0
  105. package/dist/esm/{chunk-2XQKGWHQ.mjs → chunk-FYYEPFML.mjs} +2 -2
  106. package/dist/esm/chunk-HUWKPKPQ.mjs +2 -0
  107. package/dist/esm/{chunk-HMUIOIBG.mjs.map → chunk-HUWKPKPQ.mjs.map} +1 -1
  108. package/dist/esm/chunk-IJE2LVZG.mjs +2 -0
  109. package/dist/esm/chunk-IJE2LVZG.mjs.map +1 -0
  110. package/dist/esm/chunk-JCFTAG5Z.mjs +2 -0
  111. package/dist/esm/{chunk-RJ7F4JDV.mjs.map → chunk-JCFTAG5Z.mjs.map} +1 -1
  112. package/dist/esm/{chunk-YHGGNYYL.mjs → chunk-MML57K5H.mjs} +2 -2
  113. package/dist/esm/{chunk-PFXXFUBL.mjs → chunk-MNDTFHDB.mjs} +2 -2
  114. package/dist/esm/{chunk-FSP4QM2T.mjs → chunk-SLWIGOQL.mjs} +2 -2
  115. package/dist/esm/{chunk-7T62PEFI.mjs → chunk-TYYVB2A6.mjs} +2 -2
  116. package/dist/esm/{chunk-WOTQ7227.mjs → chunk-U3GMNXO4.mjs} +2 -2
  117. package/dist/esm/{chunk-VHNX2NUR.mjs → chunk-UL777LTI.mjs} +47 -26
  118. package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
  119. package/dist/esm/{chunk-IDHVW7HS.mjs → chunk-XZ75T7Q7.mjs} +2 -2
  120. package/dist/esm/{chunk-UIVX6WSC.mjs → chunk-Y7ZQTLH4.mjs} +2 -2
  121. package/dist/esm/{chunk-R7NQJWDG.mjs → chunk-Z5URUE4U.mjs} +2 -2
  122. package/dist/esm/cli/index.d.mts +1 -1
  123. package/dist/esm/cli/index.mjs +1 -1
  124. package/dist/esm/cli/localNode.mjs +1 -1
  125. package/dist/esm/cli/move.d.mts +1 -1
  126. package/dist/esm/client/core.d.mts +1 -1
  127. package/dist/esm/client/core.mjs +1 -1
  128. package/dist/esm/client/get.d.mts +1 -1
  129. package/dist/esm/client/get.mjs +1 -1
  130. package/dist/esm/client/index.d.mts +1 -1
  131. package/dist/esm/client/index.mjs +1 -1
  132. package/dist/esm/client/post.d.mts +1 -1
  133. package/dist/esm/client/post.mjs +1 -1
  134. package/dist/esm/core/account/index.d.mts +1 -1
  135. package/dist/esm/core/account/index.mjs +1 -1
  136. package/dist/esm/core/account/utils/address.d.mts +1 -1
  137. package/dist/esm/core/account/utils/address.mjs +1 -1
  138. package/dist/esm/core/account/utils/index.d.mts +1 -1
  139. package/dist/esm/core/account/utils/index.mjs +1 -1
  140. package/dist/esm/core/accountAddress.d.mts +1 -1
  141. package/dist/esm/core/accountAddress.mjs +1 -1
  142. package/dist/esm/core/authenticationKey.d.mts +1 -1
  143. package/dist/esm/core/authenticationKey.mjs +1 -1
  144. package/dist/esm/core/crypto/abstraction.d.mts +1 -1
  145. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  146. package/dist/esm/core/crypto/deserializationUtils.d.mts +1 -1
  147. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  148. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  149. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  150. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  151. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  152. package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -2
  153. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  154. package/dist/esm/core/crypto/index.d.mts +3 -2
  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.d.mts +1 -1
  159. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  160. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  161. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  162. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  163. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  164. package/dist/esm/core/crypto/proof.d.mts +1 -1
  165. package/dist/esm/core/crypto/proof.mjs +1 -1
  166. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  167. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  168. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  169. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  170. package/dist/esm/core/crypto/signature.d.mts +1 -1
  171. package/dist/esm/core/crypto/signature.mjs +1 -1
  172. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  173. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  174. package/dist/esm/core/crypto/types.d.mts +11 -0
  175. package/dist/esm/core/crypto/types.mjs +2 -0
  176. package/dist/esm/core/crypto/types.mjs.map +1 -0
  177. package/dist/esm/core/crypto/utils.d.mts +1 -1
  178. package/dist/esm/core/hex.d.mts +1 -1
  179. package/dist/esm/core/index.d.mts +3 -2
  180. package/dist/esm/core/index.mjs +1 -1
  181. package/dist/esm/errors/index.d.mts +1 -1
  182. package/dist/esm/errors/index.mjs +1 -1
  183. package/dist/esm/{federatedKeyless-CVKW5pnz.d.mts → federatedKeyless-CiyplsOB.d.mts} +1 -1
  184. package/dist/esm/index.d.mts +6 -4
  185. package/dist/esm/index.mjs +1 -1
  186. package/dist/esm/internal/abstraction.d.mts +1 -1
  187. package/dist/esm/internal/abstraction.mjs +1 -1
  188. package/dist/esm/internal/account.d.mts +38 -8
  189. package/dist/esm/internal/account.mjs +1 -1
  190. package/dist/esm/internal/ans.d.mts +2 -2
  191. package/dist/esm/internal/ans.mjs +1 -1
  192. package/dist/esm/internal/coin.d.mts +1 -1
  193. package/dist/esm/internal/coin.mjs +1 -1
  194. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  195. package/dist/esm/internal/digitalAsset.mjs +1 -1
  196. package/dist/esm/internal/event.d.mts +1 -1
  197. package/dist/esm/internal/event.mjs +1 -1
  198. package/dist/esm/internal/faucet.d.mts +1 -1
  199. package/dist/esm/internal/faucet.mjs +1 -1
  200. package/dist/esm/internal/fungibleAsset.d.mts +2 -2
  201. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  202. package/dist/esm/internal/general.d.mts +1 -1
  203. package/dist/esm/internal/general.mjs +1 -1
  204. package/dist/esm/internal/keyless.d.mts +12 -3
  205. package/dist/esm/internal/keyless.mjs +1 -1
  206. package/dist/esm/internal/object.d.mts +1 -1
  207. package/dist/esm/internal/object.mjs +1 -1
  208. package/dist/esm/internal/staking.d.mts +1 -1
  209. package/dist/esm/internal/staking.mjs +1 -1
  210. package/dist/esm/internal/table.d.mts +1 -1
  211. package/dist/esm/internal/table.mjs +1 -1
  212. package/dist/esm/internal/transaction.d.mts +1 -1
  213. package/dist/esm/internal/transaction.mjs +1 -1
  214. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  215. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  216. package/dist/esm/internal/utils/index.d.mts +1 -1
  217. package/dist/esm/internal/utils/index.mjs +1 -1
  218. package/dist/esm/internal/utils/utils.d.mts +1 -1
  219. package/dist/esm/internal/utils/utils.mjs +1 -1
  220. package/dist/esm/internal/view.d.mts +1 -1
  221. package/dist/esm/internal/view.mjs +1 -1
  222. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  223. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  224. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  225. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  226. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  227. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  228. package/dist/esm/transactions/index.d.mts +1 -1
  229. package/dist/esm/transactions/index.mjs +1 -1
  230. package/dist/esm/transactions/instances/chainId.d.mts +1 -1
  231. package/dist/esm/transactions/instances/identifier.d.mts +1 -1
  232. package/dist/esm/transactions/instances/index.d.mts +1 -1
  233. package/dist/esm/transactions/instances/index.mjs +1 -1
  234. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  235. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  236. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -1
  237. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  238. package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -1
  239. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  240. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  241. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  242. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  243. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  244. package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -1
  245. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  246. package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -1
  247. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  248. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  249. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  250. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  251. package/dist/esm/transactions/management/index.d.mts +2 -2
  252. package/dist/esm/transactions/management/index.mjs +1 -1
  253. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  254. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  255. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  256. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  257. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  258. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  259. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  260. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  261. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
  262. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  263. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  264. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  265. package/dist/esm/transactions/typeTag/index.d.mts +1 -1
  266. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  267. package/dist/esm/transactions/typeTag/parser.d.mts +1 -1
  268. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  269. package/dist/esm/transactions/types.d.mts +1 -1
  270. package/dist/esm/types/generated/operations.d.mts +37 -10
  271. package/dist/esm/types/generated/queries.d.mts +6 -2
  272. package/dist/esm/types/generated/queries.mjs +1 -1
  273. package/dist/esm/types/generated/types.d.mts +584 -1172
  274. package/dist/esm/types/generated/types.mjs +1 -1
  275. package/dist/esm/types/generated/types.mjs.map +1 -1
  276. package/dist/esm/types/index.d.mts +2 -2
  277. package/dist/esm/types/index.mjs +1 -1
  278. package/dist/esm/types/indexer.d.mts +8 -2
  279. package/dist/esm/types/types.d.mts +1 -1
  280. package/dist/esm/types/types.mjs +1 -1
  281. package/dist/esm/utils/const.d.mts +1 -0
  282. package/dist/esm/utils/const.mjs +1 -1
  283. package/dist/esm/utils/helpers.d.mts +1 -1
  284. package/dist/esm/utils/helpers.mjs +1 -1
  285. package/dist/esm/utils/index.d.mts +1 -1
  286. package/dist/esm/utils/index.mjs +1 -1
  287. package/dist/esm/utils/normalizeBundle.d.mts +1 -1
  288. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  289. package/dist/esm/version.d.mts +1 -1
  290. package/dist/esm/version.mjs +1 -1
  291. package/package.json +19 -18
  292. package/src/account/FederatedKeylessAccount.ts +7 -1
  293. package/src/account/KeylessAccount.ts +17 -2
  294. package/src/api/account.ts +135 -2
  295. package/src/api/transaction.ts +1 -0
  296. package/src/core/crypto/index.ts +1 -0
  297. package/src/core/crypto/multiEd25519.ts +26 -0
  298. package/src/core/crypto/multiKey.ts +6 -0
  299. package/src/core/crypto/types.ts +9 -0
  300. package/src/internal/account.ts +526 -59
  301. package/src/internal/keyless.ts +10 -0
  302. package/src/internal/move/jwks/build/jwk/BuildInfo.yaml +56 -0
  303. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/account.mv +0 -0
  304. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator.mv +0 -0
  305. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_factory.mv +0 -0
  306. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_v2.mv +0 -0
  307. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_account.mv +0 -0
  308. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_coin.mv +0 -0
  309. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_governance.mv +0 -0
  310. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/block.mv +0 -0
  311. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_id.mv +0 -0
  312. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_status.mv +0 -0
  313. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/code.mv +0 -0
  314. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/coin.mv +0 -0
  315. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/config_buffer.mv +0 -0
  316. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/consensus_config.mv +0 -0
  317. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/create_signer.mv +0 -0
  318. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/delegation_pool.mv +0 -0
  319. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dispatchable_fungible_asset.mv +0 -0
  320. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dkg.mv +0 -0
  321. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/event.mv +0 -0
  322. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/execution_config.mv +0 -0
  323. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/function_info.mv +0 -0
  324. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/fungible_asset.mv +0 -0
  325. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/gas_schedule.mv +0 -0
  326. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/genesis.mv +0 -0
  327. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/governance_proposal.mv +0 -0
  328. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/guid.mv +0 -0
  329. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwk_consensus_config.mv +0 -0
  330. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwks.mv +0 -0
  331. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/keyless_account.mv +0 -0
  332. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/managed_coin.mv +0 -0
  333. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/multisig_account.mv +0 -0
  334. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object.mv +0 -0
  335. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object_code_deployment.mv +0 -0
  336. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/optional_aggregator.mv +0 -0
  337. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/primary_fungible_store.mv +0 -0
  338. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness.mv +0 -0
  339. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_api_v0_config.mv +0 -0
  340. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config.mv +0 -0
  341. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config_seqnum.mv +0 -0
  342. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration.mv +0 -0
  343. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_state.mv +0 -0
  344. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_with_dkg.mv +0 -0
  345. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/resource_account.mv +0 -0
  346. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/stake.mv +0 -0
  347. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_config.mv +0 -0
  348. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_contract.mv +0 -0
  349. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_proxy.mv +0 -0
  350. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/state_storage.mv +0 -0
  351. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/storage_gas.mv +0 -0
  352. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/system_addresses.mv +0 -0
  353. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/timestamp.mv +0 -0
  354. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_context.mv +0 -0
  355. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_fee.mv +0 -0
  356. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_validation.mv +0 -0
  357. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/util.mv +0 -0
  358. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/validator_consensus_info.mv +0 -0
  359. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/version.mv +0 -0
  360. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/vesting.mv +0 -0
  361. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/voting.mv +0 -0
  362. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/any.mv +0 -0
  363. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/aptos_hash.mv +0 -0
  364. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/big_vector.mv +0 -0
  365. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381.mv +0 -0
  366. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381_algebra.mv +0 -0
  367. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bn254_algebra.mv +0 -0
  368. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/capability.mv +0 -0
  369. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/comparator.mv +0 -0
  370. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/copyable_any.mv +0 -0
  371. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/crypto_algebra.mv +0 -0
  372. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/debug.mv +0 -0
  373. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ed25519.mv +0 -0
  374. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/fixed_point64.mv +0 -0
  375. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/from_bcs.mv +0 -0
  376. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math128.mv +0 -0
  377. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math64.mv +0 -0
  378. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed.mv +0 -0
  379. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed64.mv +0 -0
  380. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/multi_ed25519.mv +0 -0
  381. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64.mv +0 -0
  382. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64_unbound.mv +0 -0
  383. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255.mv +0 -0
  384. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_bulletproofs.mv +0 -0
  385. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_elgamal.mv +0 -0
  386. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_pedersen.mv +0 -0
  387. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/secp256k1.mv +0 -0
  388. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/simple_map.mv +0 -0
  389. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_table.mv +0 -0
  390. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_vector.mv +0 -0
  391. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/string_utils.mv +0 -0
  392. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table.mv +0 -0
  393. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table_with_length.mv +0 -0
  394. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/type_info.mv +0 -0
  395. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/acl.mv +0 -0
  396. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bcs.mv +0 -0
  397. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bit_vector.mv +0 -0
  398. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/error.mv +0 -0
  399. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/features.mv +0 -0
  400. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/fixed_point32.mv +0 -0
  401. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/hash.mv +0 -0
  402. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/option.mv +0 -0
  403. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/signer.mv +0 -0
  404. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/string.mv +0 -0
  405. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/vector.mv +0 -0
  406. package/src/internal/move/jwks/build/jwk/bytecode_scripts/main.mv +0 -0
  407. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/account.mvsm +0 -0
  408. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator.mvsm +0 -0
  409. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_factory.mvsm +0 -0
  410. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_v2.mvsm +0 -0
  411. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_account.mvsm +0 -0
  412. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_coin.mvsm +0 -0
  413. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_governance.mvsm +0 -0
  414. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/block.mvsm +0 -0
  415. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_id.mvsm +0 -0
  416. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_status.mvsm +0 -0
  417. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/code.mvsm +0 -0
  418. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/coin.mvsm +0 -0
  419. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/config_buffer.mvsm +0 -0
  420. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/consensus_config.mvsm +0 -0
  421. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/create_signer.mvsm +0 -0
  422. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/delegation_pool.mvsm +0 -0
  423. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dispatchable_fungible_asset.mvsm +0 -0
  424. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dkg.mvsm +0 -0
  425. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/event.mvsm +0 -0
  426. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/execution_config.mvsm +0 -0
  427. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/function_info.mvsm +0 -0
  428. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/fungible_asset.mvsm +0 -0
  429. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/gas_schedule.mvsm +0 -0
  430. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/genesis.mvsm +0 -0
  431. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/governance_proposal.mvsm +0 -0
  432. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/guid.mvsm +0 -0
  433. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwk_consensus_config.mvsm +0 -0
  434. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwks.mvsm +0 -0
  435. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/keyless_account.mvsm +0 -0
  436. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/managed_coin.mvsm +0 -0
  437. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/multisig_account.mvsm +0 -0
  438. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object.mvsm +0 -0
  439. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object_code_deployment.mvsm +0 -0
  440. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/optional_aggregator.mvsm +0 -0
  441. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/primary_fungible_store.mvsm +0 -0
  442. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness.mvsm +0 -0
  443. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_api_v0_config.mvsm +0 -0
  444. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config.mvsm +0 -0
  445. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config_seqnum.mvsm +0 -0
  446. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration.mvsm +0 -0
  447. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_state.mvsm +0 -0
  448. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_with_dkg.mvsm +0 -0
  449. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/resource_account.mvsm +0 -0
  450. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/stake.mvsm +0 -0
  451. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_config.mvsm +0 -0
  452. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_contract.mvsm +0 -0
  453. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_proxy.mvsm +0 -0
  454. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/state_storage.mvsm +0 -0
  455. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/storage_gas.mvsm +0 -0
  456. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/system_addresses.mvsm +0 -0
  457. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/timestamp.mvsm +0 -0
  458. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_context.mvsm +0 -0
  459. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_fee.mvsm +0 -0
  460. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_validation.mvsm +0 -0
  461. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/util.mvsm +0 -0
  462. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/validator_consensus_info.mvsm +0 -0
  463. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/version.mvsm +0 -0
  464. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/vesting.mvsm +0 -0
  465. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/voting.mvsm +0 -0
  466. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/any.mvsm +0 -0
  467. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/aptos_hash.mvsm +0 -0
  468. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/big_vector.mvsm +0 -0
  469. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381.mvsm +0 -0
  470. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381_algebra.mvsm +0 -0
  471. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bn254_algebra.mvsm +0 -0
  472. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/capability.mvsm +0 -0
  473. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/comparator.mvsm +0 -0
  474. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/copyable_any.mvsm +0 -0
  475. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/crypto_algebra.mvsm +0 -0
  476. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/debug.mvsm +0 -0
  477. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ed25519.mvsm +0 -0
  478. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/fixed_point64.mvsm +0 -0
  479. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/from_bcs.mvsm +0 -0
  480. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math128.mvsm +0 -0
  481. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math64.mvsm +0 -0
  482. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed.mvsm +0 -0
  483. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed64.mvsm +0 -0
  484. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/multi_ed25519.mvsm +0 -0
  485. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64.mvsm +0 -0
  486. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64_unbound.mvsm +0 -0
  487. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255.mvsm +0 -0
  488. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_bulletproofs.mvsm +0 -0
  489. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_elgamal.mvsm +0 -0
  490. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_pedersen.mvsm +0 -0
  491. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/secp256k1.mvsm +0 -0
  492. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/simple_map.mvsm +0 -0
  493. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_table.mvsm +0 -0
  494. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_vector.mvsm +0 -0
  495. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/string_utils.mvsm +0 -0
  496. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table.mvsm +0 -0
  497. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table_with_length.mvsm +0 -0
  498. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/type_info.mvsm +0 -0
  499. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/acl.mvsm +0 -0
  500. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bcs.mvsm +0 -0
  501. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bit_vector.mvsm +0 -0
  502. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/error.mvsm +0 -0
  503. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/features.mvsm +0 -0
  504. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/fixed_point32.mvsm +0 -0
  505. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/hash.mvsm +0 -0
  506. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/option.mvsm +0 -0
  507. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/signer.mvsm +0 -0
  508. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/string.mvsm +0 -0
  509. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/vector.mvsm +0 -0
  510. package/src/internal/move/jwks/build/jwk/source_maps/main.mvsm +0 -0
  511. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/account.move +1533 -0
  512. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator.move +48 -0
  513. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_factory.move +66 -0
  514. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_v2.move +280 -0
  515. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_account.move +443 -0
  516. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_coin.move +204 -0
  517. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_governance.move +1387 -0
  518. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/block.move +394 -0
  519. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_id.move +41 -0
  520. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_status.move +48 -0
  521. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/code.move +367 -0
  522. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/coin.move +2214 -0
  523. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/config_buffer.move +101 -0
  524. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/consensus_config.move +77 -0
  525. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/create_signer.move +21 -0
  526. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/delegation_pool.move +5568 -0
  527. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dispatchable_fungible_asset.move +228 -0
  528. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dkg.move +121 -0
  529. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/event.move +92 -0
  530. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/execution_config.move +66 -0
  531. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/function_info.move +100 -0
  532. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/fungible_asset.move +1566 -0
  533. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/gas_schedule.move +176 -0
  534. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/genesis.move +550 -0
  535. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/governance_proposal.move +23 -0
  536. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/guid.move +68 -0
  537. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwk_consensus_config.move +148 -0
  538. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwks.move +817 -0
  539. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/keyless_account.move +312 -0
  540. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/managed_coin.move +205 -0
  541. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/multisig_account.move +2477 -0
  542. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object.move +1073 -0
  543. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object_code_deployment.move +147 -0
  544. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/optional_aggregator.move +295 -0
  545. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/primary_fungible_store.move +405 -0
  546. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness.move +574 -0
  547. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_api_v0_config.move +57 -0
  548. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config.move +153 -0
  549. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config_seqnum.move +49 -0
  550. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration.move +237 -0
  551. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_state.move +132 -0
  552. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_with_dkg.move +69 -0
  553. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/resource_account.move +267 -0
  554. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/stake.move +3286 -0
  555. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_config.move +686 -0
  556. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_contract.move +1618 -0
  557. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_proxy.move +228 -0
  558. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/state_storage.move +90 -0
  559. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/storage_gas.move +622 -0
  560. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/system_addresses.move +82 -0
  561. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/timestamp.move +88 -0
  562. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_context.move +262 -0
  563. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_fee.move +457 -0
  564. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_validation.move +501 -0
  565. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/util.move +16 -0
  566. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/validator_consensus_info.move +42 -0
  567. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/version.move +115 -0
  568. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/vesting.move +2183 -0
  569. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/voting.move +1279 -0
  570. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/any.move +57 -0
  571. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/aptos_hash.move +253 -0
  572. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/big_vector.move +469 -0
  573. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381.move +985 -0
  574. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381_algebra.move +802 -0
  575. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bn254_algebra.move +855 -0
  576. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/capability.move +193 -0
  577. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/comparator.move +173 -0
  578. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/copyable_any.move +45 -0
  579. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/crypto_algebra.move +351 -0
  580. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/debug.move +278 -0
  581. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ed25519.move +262 -0
  582. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/fixed_point64.move +447 -0
  583. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/from_bcs.move +91 -0
  584. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math128.move +381 -0
  585. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math64.move +336 -0
  586. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed.move +139 -0
  587. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed64.move +142 -0
  588. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/multi_ed25519.move +482 -0
  589. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64.move +571 -0
  590. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64_unbound.move +270 -0
  591. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255.move +1310 -0
  592. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_bulletproofs.move +253 -0
  593. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_elgamal.move +234 -0
  594. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_pedersen.move +158 -0
  595. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/secp256k1.move +114 -0
  596. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/simple_map.move +319 -0
  597. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_table.move +769 -0
  598. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_vector.move +766 -0
  599. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/string_utils.move +148 -0
  600. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table.move +152 -0
  601. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table_with_length.move +141 -0
  602. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/type_info.move +351 -0
  603. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/acl.move +46 -0
  604. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bcs.move +27 -0
  605. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bit_vector.move +239 -0
  606. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/error.move +88 -0
  607. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/features.move +780 -0
  608. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/fixed_point32.move +295 -0
  609. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/hash.move +8 -0
  610. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/option.move +356 -0
  611. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/signer.move +21 -0
  612. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/string.move +93 -0
  613. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/vector.move +669 -0
  614. package/src/internal/move/jwks/build/jwk/sources/main.move +20 -0
  615. package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
  616. package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
  617. package/src/types/codegen.yaml +1 -1
  618. package/src/types/generated/operations.ts +39 -8
  619. package/src/types/generated/queries.ts +53 -0
  620. package/src/types/generated/types.ts +620 -1239
  621. package/src/types/indexer.ts +8 -0
  622. package/src/types/types.ts +40 -3
  623. package/src/utils/const.ts +1 -0
  624. package/src/version.ts +1 -1
  625. package/dist/common/chunk-5JIJXVJ5.js +0 -4
  626. package/dist/common/chunk-5JIJXVJ5.js.map +0 -1
  627. package/dist/esm/chunk-4H2RMR7D.mjs +0 -2
  628. package/dist/esm/chunk-4H2RMR7D.mjs.map +0 -1
  629. package/dist/esm/chunk-GMDBBVDH.mjs +0 -6
  630. package/dist/esm/chunk-GMDBBVDH.mjs.map +0 -1
  631. package/dist/esm/chunk-HMUIOIBG.mjs +0 -2
  632. package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
  633. package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
  634. /package/dist/esm/{chunk-Q4W3WJ2U.mjs.map → chunk-2BOHKN33.mjs.map} +0 -0
  635. /package/dist/esm/{chunk-SAMHWS73.mjs.map → chunk-4COLMDT3.mjs.map} +0 -0
  636. /package/dist/esm/{chunk-5ZRPV4YI.mjs.map → chunk-5URUYE6H.mjs.map} +0 -0
  637. /package/dist/esm/{chunk-2XQKGWHQ.mjs.map → chunk-FYYEPFML.mjs.map} +0 -0
  638. /package/dist/esm/{chunk-YHGGNYYL.mjs.map → chunk-MML57K5H.mjs.map} +0 -0
  639. /package/dist/esm/{chunk-PFXXFUBL.mjs.map → chunk-MNDTFHDB.mjs.map} +0 -0
  640. /package/dist/esm/{chunk-FSP4QM2T.mjs.map → chunk-SLWIGOQL.mjs.map} +0 -0
  641. /package/dist/esm/{chunk-7T62PEFI.mjs.map → chunk-TYYVB2A6.mjs.map} +0 -0
  642. /package/dist/esm/{chunk-WOTQ7227.mjs.map → chunk-U3GMNXO4.mjs.map} +0 -0
  643. /package/dist/esm/{chunk-IDHVW7HS.mjs.map → chunk-XZ75T7Q7.mjs.map} +0 -0
  644. /package/dist/esm/{chunk-UIVX6WSC.mjs.map → chunk-Y7ZQTLH4.mjs.map} +0 -0
  645. /package/dist/esm/{chunk-R7NQJWDG.mjs.map → chunk-Z5URUE4U.mjs.map} +0 -0
@@ -0,0 +1,482 @@
1
+ /// Exports MultiEd25519 multi-signatures in Move.
2
+ /// This module has the exact same interface as the Ed25519 module.
3
+
4
+ module aptos_std::multi_ed25519 {
5
+ use std::bcs;
6
+ use std::error;
7
+ use std::features;
8
+ use std::option::{Self, Option};
9
+ use std::vector;
10
+ use aptos_std::ed25519;
11
+
12
+ //
13
+ // Error codes
14
+ //
15
+
16
+ /// Wrong number of bytes were given as input when deserializing an Ed25519 public key.
17
+ const E_WRONG_PUBKEY_SIZE: u64 = 1;
18
+
19
+ /// Wrong number of bytes were given as input when deserializing an Ed25519 signature.
20
+ const E_WRONG_SIGNATURE_SIZE: u64 = 2;
21
+
22
+ /// The threshold must be in the range `[1, n]`, where n is the total number of signers.
23
+ const E_INVALID_THRESHOLD_OR_NUMBER_OF_SIGNERS: u64 = 3;
24
+
25
+ /// The native functions have not been rolled out yet.
26
+ const E_NATIVE_FUN_NOT_AVAILABLE: u64 = 4;
27
+
28
+ //
29
+ // Constants
30
+ //
31
+
32
+ /// The identifier of the MultiEd25519 signature scheme, which is used when deriving Aptos authentication keys by hashing
33
+ /// it together with an MultiEd25519 public key.
34
+ const SIGNATURE_SCHEME_ID: u8 = 1;
35
+
36
+ /// The size of an individual Ed25519 public key, in bytes.
37
+ /// (A MultiEd25519 public key consists of several of these, plus the threshold.)
38
+ const INDIVIDUAL_PUBLIC_KEY_NUM_BYTES: u64 = 32;
39
+
40
+ /// The size of an individual Ed25519 signature, in bytes.
41
+ /// (A MultiEd25519 signature consists of several of these, plus the signer bitmap.)
42
+ const INDIVIDUAL_SIGNATURE_NUM_BYTES: u64 = 64;
43
+
44
+ /// When serializing a MultiEd25519 public key, the threshold k will be encoded using this many bytes.
45
+ const THRESHOLD_SIZE_BYTES: u64 = 1;
46
+
47
+ /// When serializing a MultiEd25519 signature, the bitmap that indicates the signers will be encoded using this many
48
+ /// bytes.
49
+ const BITMAP_NUM_OF_BYTES: u64 = 4;
50
+
51
+ /// Max number of ed25519 public keys allowed in multi-ed25519 keys
52
+ const MAX_NUMBER_OF_PUBLIC_KEYS: u64 = 32;
53
+
54
+ //
55
+ // Structs
56
+ //
57
+ #[test_only]
58
+ struct SecretKey has drop {
59
+ bytes: vector<u8>,
60
+ }
61
+
62
+ /// An *unvalidated*, k out of n MultiEd25519 public key. The `bytes` field contains (1) several chunks of
63
+ /// `ed25519::PUBLIC_KEY_NUM_BYTES` bytes, each encoding a Ed25519 PK, and (2) a single byte encoding the threshold k.
64
+ /// *Unvalidated* means there is no guarantee that the underlying PKs are valid elliptic curve points of non-small
65
+ /// order.
66
+ struct UnvalidatedPublicKey has copy, drop, store {
67
+ bytes: vector<u8>
68
+ }
69
+
70
+ /// A *validated* k out of n MultiEd25519 public key. *Validated* means that all the underlying PKs will be
71
+ /// elliptic curve points that are NOT of small-order. It does not necessarily mean they will be prime-order points.
72
+ /// This struct encodes the public key exactly as `UnvalidatedPublicKey`.
73
+ ///
74
+ /// For now, this struct is not used in any verification functions, but it might be in the future.
75
+ struct ValidatedPublicKey has copy, drop, store {
76
+ bytes: vector<u8>
77
+ }
78
+
79
+ /// A purported MultiEd25519 multi-signature that can be verified via `signature_verify_strict` or
80
+ /// `signature_verify_strict_t`. The `bytes` field contains (1) several chunks of `ed25519::SIGNATURE_NUM_BYTES`
81
+ /// bytes, each encoding a Ed25519 signature, and (2) a `BITMAP_NUM_OF_BYTES`-byte bitmap encoding the signer
82
+ /// identities.
83
+ struct Signature has copy, drop, store {
84
+ bytes: vector<u8>
85
+ }
86
+
87
+ //
88
+ // Functions
89
+ //
90
+
91
+ #[test_only]
92
+ public fun generate_keys(threshold: u8, n: u8): (SecretKey, ValidatedPublicKey) {
93
+ assert!(1 <= threshold && threshold <= n, error::invalid_argument(E_INVALID_THRESHOLD_OR_NUMBER_OF_SIGNERS));
94
+ let (sk_bytes, pk_bytes) = generate_keys_internal(threshold, n);
95
+ let sk = SecretKey {
96
+ bytes: sk_bytes
97
+ };
98
+ let pk = ValidatedPublicKey {
99
+ bytes: pk_bytes
100
+ };
101
+ (sk, pk)
102
+ }
103
+
104
+ #[test_only]
105
+ public fun sign_arbitrary_bytes(sk: &SecretKey, msg: vector<u8>) : Signature {
106
+ Signature {
107
+ bytes: sign_internal(sk.bytes, msg)
108
+ }
109
+ }
110
+
111
+ #[test_only]
112
+ public fun sign_struct<T: drop>(sk: &SecretKey, data: T) : Signature {
113
+ let encoded = ed25519::new_signed_message(data);
114
+ Signature {
115
+ bytes: sign_internal(sk.bytes, bcs::to_bytes(&encoded)),
116
+ }
117
+ }
118
+
119
+ /// Parses the input 32 bytes as an *unvalidated* MultiEd25519 public key.
120
+ ///
121
+ /// NOTE: This function could have also checked that the # of sub-PKs is > 0, but it did not. However, since such
122
+ /// invalid PKs are rejected during signature verification (see `bugfix_unvalidated_pk_from_zero_subpks`) they
123
+ /// will not cause problems.
124
+ ///
125
+ /// We could fix this API by adding a new one that checks the # of sub-PKs is > 0, but it is likely not a good idea
126
+ /// to reproduce the PK validation logic in Move. We should not have done so in the first place. Instead, we will
127
+ /// leave it as is and continue assuming `UnvalidatedPublicKey` objects could be invalid PKs that will safely be
128
+ /// rejected during signature verification.
129
+ public fun new_unvalidated_public_key_from_bytes(bytes: vector<u8>): UnvalidatedPublicKey {
130
+ let len = vector::length(&bytes);
131
+ let num_sub_pks = len / INDIVIDUAL_PUBLIC_KEY_NUM_BYTES;
132
+
133
+ assert!(num_sub_pks <= MAX_NUMBER_OF_PUBLIC_KEYS, error::invalid_argument(E_WRONG_PUBKEY_SIZE));
134
+ assert!(len % INDIVIDUAL_PUBLIC_KEY_NUM_BYTES == THRESHOLD_SIZE_BYTES, error::invalid_argument(E_WRONG_PUBKEY_SIZE));
135
+ UnvalidatedPublicKey { bytes }
136
+ }
137
+
138
+ /// DEPRECATED: Use `new_validated_public_key_from_bytes_v2` instead. See `public_key_validate_internal` comments.
139
+ ///
140
+ /// (Incorrectly) parses the input bytes as a *validated* MultiEd25519 public key.
141
+ public fun new_validated_public_key_from_bytes(bytes: vector<u8>): Option<ValidatedPublicKey> {
142
+ // Note that `public_key_validate_internal` will check that `vector::length(&bytes) / INDIVIDUAL_PUBLIC_KEY_NUM_BYTES <= MAX_NUMBER_OF_PUBLIC_KEYS`.
143
+ if (vector::length(&bytes) % INDIVIDUAL_PUBLIC_KEY_NUM_BYTES == THRESHOLD_SIZE_BYTES &&
144
+ public_key_validate_internal(bytes)) {
145
+ option::some(ValidatedPublicKey {
146
+ bytes
147
+ })
148
+ } else {
149
+ option::none<ValidatedPublicKey>()
150
+ }
151
+ }
152
+
153
+ /// Parses the input bytes as a *validated* MultiEd25519 public key (see `public_key_validate_internal_v2`).
154
+ public fun new_validated_public_key_from_bytes_v2(bytes: vector<u8>): Option<ValidatedPublicKey> {
155
+ if (!features::multi_ed25519_pk_validate_v2_enabled()) {
156
+ abort(error::invalid_state(E_NATIVE_FUN_NOT_AVAILABLE))
157
+ };
158
+
159
+ if (public_key_validate_v2_internal(bytes)) {
160
+ option::some(ValidatedPublicKey {
161
+ bytes
162
+ })
163
+ } else {
164
+ option::none<ValidatedPublicKey>()
165
+ }
166
+ }
167
+
168
+ /// Parses the input bytes as a purported MultiEd25519 multi-signature.
169
+ public fun new_signature_from_bytes(bytes: vector<u8>): Signature {
170
+ assert!(vector::length(&bytes) % INDIVIDUAL_SIGNATURE_NUM_BYTES == BITMAP_NUM_OF_BYTES, error::invalid_argument(E_WRONG_SIGNATURE_SIZE));
171
+ Signature { bytes }
172
+ }
173
+
174
+ /// Converts a ValidatedPublicKey to an UnvalidatedPublicKey, which can be used in the strict verification APIs.
175
+ public fun public_key_to_unvalidated(pk: &ValidatedPublicKey): UnvalidatedPublicKey {
176
+ UnvalidatedPublicKey {
177
+ bytes: pk.bytes
178
+ }
179
+ }
180
+
181
+ /// Moves a ValidatedPublicKey into an UnvalidatedPublicKey, which can be used in the strict verification APIs.
182
+ public fun public_key_into_unvalidated(pk: ValidatedPublicKey): UnvalidatedPublicKey {
183
+ UnvalidatedPublicKey {
184
+ bytes: pk.bytes
185
+ }
186
+ }
187
+
188
+ /// Serializes an UnvalidatedPublicKey struct to 32-bytes.
189
+ public fun unvalidated_public_key_to_bytes(pk: &UnvalidatedPublicKey): vector<u8> {
190
+ pk.bytes
191
+ }
192
+
193
+ /// Serializes a ValidatedPublicKey struct to 32-bytes.
194
+ public fun validated_public_key_to_bytes(pk: &ValidatedPublicKey): vector<u8> {
195
+ pk.bytes
196
+ }
197
+
198
+ /// Serializes a Signature struct to 64-bytes.
199
+ public fun signature_to_bytes(sig: &Signature): vector<u8> {
200
+ sig.bytes
201
+ }
202
+
203
+ /// DEPRECATED: Use `public_key_validate_v2` instead. See `public_key_validate_internal` comments.
204
+ ///
205
+ /// Takes in an *unvalidated* public key and attempts to validate it.
206
+ /// Returns `Some(ValidatedPublicKey)` if successful and `None` otherwise.
207
+ public fun public_key_validate(pk: &UnvalidatedPublicKey): Option<ValidatedPublicKey> {
208
+ new_validated_public_key_from_bytes(pk.bytes)
209
+ }
210
+
211
+ /// Takes in an *unvalidated* public key and attempts to validate it.
212
+ /// Returns `Some(ValidatedPublicKey)` if successful and `None` otherwise.
213
+ public fun public_key_validate_v2(pk: &UnvalidatedPublicKey): Option<ValidatedPublicKey> {
214
+ new_validated_public_key_from_bytes_v2(pk.bytes)
215
+ }
216
+
217
+ /// Verifies a purported MultiEd25519 `multisignature` under an *unvalidated* `public_key` on the specified `message`.
218
+ /// This call will validate the public key by checking it is NOT in the small subgroup.
219
+ public fun signature_verify_strict(
220
+ multisignature: &Signature,
221
+ public_key: &UnvalidatedPublicKey,
222
+ message: vector<u8>
223
+ ): bool {
224
+ signature_verify_strict_internal(multisignature.bytes, public_key.bytes, message)
225
+ }
226
+
227
+ /// This function is used to verify a multi-signature on any BCS-serializable type T. For now, it is used to verify the
228
+ /// proof of private key ownership when rotating authentication keys.
229
+ public fun signature_verify_strict_t<T: drop>(multisignature: &Signature, public_key: &UnvalidatedPublicKey, data: T): bool {
230
+ let encoded = ed25519::new_signed_message(data);
231
+
232
+ signature_verify_strict_internal(multisignature.bytes, public_key.bytes, bcs::to_bytes(&encoded))
233
+ }
234
+
235
+ /// Derives the Aptos-specific authentication key of the given Ed25519 public key.
236
+ public fun unvalidated_public_key_to_authentication_key(pk: &UnvalidatedPublicKey): vector<u8> {
237
+ public_key_bytes_to_authentication_key(pk.bytes)
238
+ }
239
+
240
+ /// Returns the number n of sub-PKs in an unvalidated t-out-of-n MultiEd25519 PK.
241
+ /// If this `UnvalidatedPublicKey` would pass validation in `public_key_validate`, then the returned # of sub-PKs
242
+ /// can be relied upon as correct.
243
+ ///
244
+ /// We provide this API as a cheaper alternative to calling `public_key_validate` and then `validated_public_key_num_sub_pks`
245
+ /// when the input `pk` is known to be valid.
246
+ public fun unvalidated_public_key_num_sub_pks(pk: &UnvalidatedPublicKey): u8 {
247
+ let len = vector::length(&pk.bytes);
248
+
249
+ ((len / INDIVIDUAL_PUBLIC_KEY_NUM_BYTES) as u8)
250
+ }
251
+
252
+ /// Returns the number t of sub-PKs in an unvalidated t-out-of-n MultiEd25519 PK (i.e., the threshold) or `None`
253
+ /// if `bytes` does not correctly encode such a PK.
254
+ public fun unvalidated_public_key_threshold(pk: &UnvalidatedPublicKey): Option<u8> {
255
+ check_and_get_threshold(pk.bytes)
256
+ }
257
+
258
+ /// Derives the Aptos-specific authentication key of the given Ed25519 public key.
259
+ public fun validated_public_key_to_authentication_key(pk: &ValidatedPublicKey): vector<u8> {
260
+ public_key_bytes_to_authentication_key(pk.bytes)
261
+ }
262
+
263
+ /// Returns the number n of sub-PKs in a validated t-out-of-n MultiEd25519 PK.
264
+ /// Since the format of this PK has been validated, the returned # of sub-PKs is guaranteed to be correct.
265
+ public fun validated_public_key_num_sub_pks(pk: &ValidatedPublicKey): u8 {
266
+ let len = vector::length(&pk.bytes);
267
+
268
+ ((len / INDIVIDUAL_PUBLIC_KEY_NUM_BYTES) as u8)
269
+ }
270
+
271
+ /// Returns the number t of sub-PKs in a validated t-out-of-n MultiEd25519 PK (i.e., the threshold).
272
+ public fun validated_public_key_threshold(pk: &ValidatedPublicKey): u8 {
273
+ let len = vector::length(&pk.bytes);
274
+ let threshold_byte = *vector::borrow(&pk.bytes, len - 1);
275
+
276
+ threshold_byte
277
+ }
278
+
279
+ /// Checks that the serialized format of a t-out-of-n MultiEd25519 PK correctly encodes 1 <= n <= 32 sub-PKs.
280
+ /// (All `ValidatedPublicKey` objects are guaranteed to pass this check.)
281
+ /// Returns the threshold t <= n of the PK.
282
+ public fun check_and_get_threshold(bytes: vector<u8>): Option<u8> {
283
+ let len = vector::length(&bytes);
284
+ if (len == 0) {
285
+ return option::none<u8>()
286
+ };
287
+
288
+ let threshold_num_of_bytes = len % INDIVIDUAL_PUBLIC_KEY_NUM_BYTES;
289
+ let num_of_keys = len / INDIVIDUAL_PUBLIC_KEY_NUM_BYTES;
290
+ let threshold_byte = *vector::borrow(&bytes, len - 1);
291
+
292
+ if (num_of_keys == 0 || num_of_keys > MAX_NUMBER_OF_PUBLIC_KEYS || threshold_num_of_bytes != 1) {
293
+ return option::none<u8>()
294
+ } else if (threshold_byte == 0 || threshold_byte > (num_of_keys as u8)) {
295
+ return option::none<u8>()
296
+ } else {
297
+ return option::some(threshold_byte)
298
+ }
299
+ }
300
+
301
+ /// Derives the Aptos-specific authentication key of the given Ed25519 public key.
302
+ fun public_key_bytes_to_authentication_key(pk_bytes: vector<u8>): vector<u8> {
303
+ vector::push_back(&mut pk_bytes, SIGNATURE_SCHEME_ID);
304
+ std::hash::sha3_256(pk_bytes)
305
+ }
306
+
307
+ //
308
+ // Native functions
309
+ //
310
+
311
+ /// DEPRECATED: Use `public_key_validate_internal_v2` instead. This function was NOT correctly implemented:
312
+ ///
313
+ /// 1. It does not check that the # of sub public keys is > 0, which leads to invalid `ValidatedPublicKey` objects
314
+ /// against which no signature will verify, since `signature_verify_strict_internal` will reject such invalid PKs.
315
+ /// This is not a security issue, but a correctness issue. See `bugfix_validated_pk_from_zero_subpks`.
316
+ /// 2. It charges too much gas: if the first sub-PK is invalid, it will charge for verifying all remaining sub-PKs.
317
+ ///
318
+ /// DEPRECATES:
319
+ /// - new_validated_public_key_from_bytes
320
+ /// - public_key_validate
321
+ ///
322
+ /// Return `true` if the bytes in `public_key` can be parsed as a valid MultiEd25519 public key: i.e., all underlying
323
+ /// PKs pass point-on-curve and not-in-small-subgroup checks.
324
+ /// Returns `false` otherwise.
325
+ native fun public_key_validate_internal(bytes: vector<u8>): bool;
326
+
327
+ /// Return `true` if the bytes in `public_key` can be parsed as a valid MultiEd25519 public key: i.e., all underlying
328
+ /// sub-PKs pass point-on-curve and not-in-small-subgroup checks.
329
+ /// Returns `false` otherwise.
330
+ native fun public_key_validate_v2_internal(bytes: vector<u8>): bool;
331
+
332
+ /// Return true if the MultiEd25519 `multisignature` on `message` verifies against the MultiEd25519 `public_key`.
333
+ /// Returns `false` if either:
334
+ /// - The PKs in `public_key` do not all pass points-on-curve or not-in-small-subgroup checks,
335
+ /// - The signatures in `multisignature` do not all pass points-on-curve or not-in-small-subgroup checks,
336
+ /// - the `multisignature` on `message` does not verify.
337
+ native fun signature_verify_strict_internal(
338
+ multisignature: vector<u8>,
339
+ public_key: vector<u8>,
340
+ message: vector<u8>
341
+ ): bool;
342
+
343
+ #[test_only]
344
+ native fun generate_keys_internal(threshold: u8, n: u8): (vector<u8>,vector<u8>);
345
+
346
+ #[test_only]
347
+ native fun sign_internal(sk: vector<u8>, message: vector<u8>): vector<u8>;
348
+
349
+ //
350
+ // Tests
351
+ //
352
+
353
+ #[test_only]
354
+ struct TestMessage has copy, drop {
355
+ foo: vector<u8>,
356
+ bar: u64,
357
+ }
358
+
359
+ #[test_only]
360
+ public fun maul_first_signature(sig: &mut Signature) {
361
+ let first_sig_byte = vector::borrow_mut(&mut sig.bytes, 0);
362
+ *first_sig_byte = *first_sig_byte ^ 0xff;
363
+ }
364
+
365
+
366
+ #[test(fx = @std)]
367
+ fun bugfix_validated_pk_from_zero_subpks(fx: signer) {
368
+ features::change_feature_flags_for_testing(&fx, vector[ features::multi_ed25519_pk_validate_v2_feature()], vector[]);
369
+ let bytes = vector<u8>[1u8];
370
+ assert!(vector::length(&bytes) == 1, 1);
371
+
372
+ // Try deserializing a MultiEd25519 `ValidatedPublicKey` with 0 Ed25519 sub-PKs and 1 threshold byte.
373
+ // This would ideally NOT succeed, but it currently does. Regardless, such invalid PKs will be safely dismissed
374
+ // during signature verification.
375
+ let some = new_validated_public_key_from_bytes(bytes);
376
+ assert!(option::is_none(&check_and_get_threshold(bytes)), 1); // ground truth
377
+ assert!(option::is_some(&some), 2); // incorrect
378
+
379
+ // In contrast, the v2 API will fail deserializing, as it should.
380
+ let none = new_validated_public_key_from_bytes_v2(bytes);
381
+ assert!(option::is_none(&none), 3);
382
+ }
383
+
384
+ #[test(fx = @std)]
385
+ fun test_validated_pk_without_threshold_byte(fx: signer) {
386
+ features::change_feature_flags_for_testing(&fx, vector[ features::multi_ed25519_pk_validate_v2_feature()], vector[]);
387
+
388
+ let (_, subpk) = ed25519::generate_keys();
389
+ let bytes = ed25519::validated_public_key_to_bytes(&subpk);
390
+ assert!(vector::length(&bytes) == INDIVIDUAL_PUBLIC_KEY_NUM_BYTES, 1);
391
+
392
+ // Try deserializing a MultiEd25519 `ValidatedPublicKey` with 1 Ed25519 sub-PKs but no threshold byte, which
393
+ // will not succeed,
394
+ let none = new_validated_public_key_from_bytes(bytes);
395
+ assert!(option::is_none(&check_and_get_threshold(bytes)), 1); // ground truth
396
+ assert!(option::is_none(&none), 2); // correct
397
+
398
+ // Similarly, the v2 API will also fail deserializing.
399
+ let none = new_validated_public_key_from_bytes_v2(bytes);
400
+ assert!(option::is_none(&none), 3); // also correct
401
+ }
402
+
403
+ #[test(fx = @std)]
404
+ fun test_validated_pk_from_small_order_subpk(fx: signer) {
405
+ features::change_feature_flags_for_testing(&fx, vector[ features::multi_ed25519_pk_validate_v2_feature()], vector[]);
406
+ let torsion_point_with_threshold_1 = vector<u8>[
407
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
408
+ 0, 0, 1,
409
+ ];
410
+
411
+ assert!(option::extract(&mut check_and_get_threshold(torsion_point_with_threshold_1)) == 1, 1);
412
+
413
+ // Try deserializing a MultiEd25519 `ValidatedPublicKey` with 1 Ed25519 sub-PKs and 1 threshold byte, as it should,
414
+ // except the sub-PK is of small order. This should not succeed,
415
+ let none = new_validated_public_key_from_bytes(torsion_point_with_threshold_1);
416
+ assert!(option::is_none(&none), 2);
417
+
418
+ // Similarly, the v2 API will also fail deserializing.
419
+ let none = new_validated_public_key_from_bytes_v2(torsion_point_with_threshold_1);
420
+ assert!(option::is_none(&none), 3);
421
+ }
422
+
423
+ #[test]
424
+ fun test_gen_sign_verify() {
425
+ let thresholds = vector[1, 1, 2, 2, 3, 15,]; // the thresholds, implicitly encoded in the public keys
426
+ let party_counts = vector[1, 2, 2, 3, 10, 32,];
427
+ let test_case_count = vector::length(&party_counts);
428
+ let test_case_idx = 0;
429
+
430
+ while (test_case_idx < test_case_count) {
431
+ let threshold = *vector::borrow(&thresholds, test_case_idx);
432
+ let group_size = *vector::borrow(&party_counts, test_case_idx);
433
+
434
+ let (sk, pk) = generate_keys(threshold, group_size);
435
+ assert!(validated_public_key_threshold(&pk) == threshold, 1);
436
+ assert!(validated_public_key_num_sub_pks(&pk) == group_size, 2);
437
+ assert!(public_key_validate_v2_internal(pk.bytes), 3);
438
+
439
+ let upk = public_key_into_unvalidated(pk);
440
+ assert!(option::extract(&mut unvalidated_public_key_threshold(&upk)) == threshold, 4);
441
+ assert!(unvalidated_public_key_num_sub_pks(&upk) == group_size, 5);
442
+
443
+ let msg1 = b"Hello Aptos!";
444
+ let sig1 = sign_arbitrary_bytes(&sk, msg1);
445
+ assert!(signature_verify_strict(&sig1, &upk, msg1), 6);
446
+
447
+ let obj2 = TestMessage {
448
+ foo: b"Hello Move!",
449
+ bar: 64,
450
+ };
451
+ let sig2 = sign_struct(&sk, copy obj2);
452
+ assert!(signature_verify_strict_t(&sig2, &upk, copy obj2), 7);
453
+
454
+ test_case_idx = test_case_idx + 1;
455
+ }
456
+ }
457
+
458
+ #[test]
459
+ fun test_threshold_not_met_rejection() {
460
+ let (sk,pk) = generate_keys(4, 5);
461
+ assert!(validated_public_key_threshold(&pk) == 4, 1);
462
+ assert!(validated_public_key_num_sub_pks(&pk) == 5, 2);
463
+ assert!(public_key_validate_v2_internal(pk.bytes), 3);
464
+
465
+ let upk = public_key_into_unvalidated(pk);
466
+ assert!(option::extract(&mut unvalidated_public_key_threshold(&upk)) == 4, 4);
467
+ assert!(unvalidated_public_key_num_sub_pks(&upk) == 5, 5);
468
+
469
+ let msg1 = b"Hello Aptos!";
470
+ let sig1 = sign_arbitrary_bytes(&sk, msg1);
471
+ maul_first_signature(&mut sig1);
472
+ assert!(!signature_verify_strict(&sig1, &upk, msg1), 6);
473
+
474
+ let obj2 = TestMessage {
475
+ foo: b"Hello Move!",
476
+ bar: 64,
477
+ };
478
+ let sig2 = sign_struct(&sk, copy obj2);
479
+ maul_first_signature(&mut sig2);
480
+ assert!(!signature_verify_strict_t(&sig2, &upk, copy obj2), 7);
481
+ }
482
+ }