@aptos-labs/ts-sdk 2.0.0 → 2.0.1-zeta.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 (551) hide show
  1. package/dist/common/{accountAddress-D0xKX-UM.d.ts → accountAddress-Dx2Y6__i.d.ts} +55 -11
  2. package/dist/common/chunk-BNN2XWNR.js +4 -0
  3. package/dist/common/chunk-BNN2XWNR.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 +153 -9
  8. package/dist/common/index.js +53 -32
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  11. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/AccountUtils.mjs +1 -1
  14. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Ed25519Account.mjs +1 -1
  16. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  17. package/dist/esm/account/FederatedKeylessAccount.d.mts +1 -0
  18. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  19. package/dist/esm/account/KeylessAccount.d.mts +1 -0
  20. package/dist/esm/account/KeylessAccount.mjs +1 -1
  21. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  22. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  23. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  24. package/dist/esm/account/index.mjs +1 -1
  25. package/dist/esm/account/utils.mjs +1 -1
  26. package/dist/esm/api/account/abstraction.mjs +1 -1
  27. package/dist/esm/api/account.d.mts +96 -5
  28. package/dist/esm/api/account.mjs +1 -1
  29. package/dist/esm/api/ans.mjs +1 -1
  30. package/dist/esm/api/aptos.d.mts +6 -4
  31. package/dist/esm/api/aptos.mjs +1 -1
  32. package/dist/esm/api/aptosConfig.mjs +1 -1
  33. package/dist/esm/api/coin.mjs +1 -1
  34. package/dist/esm/api/digitalAsset.mjs +1 -1
  35. package/dist/esm/api/event.mjs +1 -1
  36. package/dist/esm/api/faucet.mjs +1 -1
  37. package/dist/esm/api/fungibleAsset.mjs +1 -1
  38. package/dist/esm/api/general.mjs +1 -1
  39. package/dist/esm/api/index.d.mts +6 -4
  40. package/dist/esm/api/index.mjs +1 -1
  41. package/dist/esm/api/keyless.mjs +1 -1
  42. package/dist/esm/api/object.mjs +1 -1
  43. package/dist/esm/api/staking.mjs +1 -1
  44. package/dist/esm/api/table.mjs +1 -1
  45. package/dist/esm/api/transaction.d.mts +1 -0
  46. package/dist/esm/api/transaction.mjs +1 -1
  47. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  48. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  49. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  50. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  51. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  52. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  53. package/dist/esm/api/utils.mjs +1 -1
  54. package/dist/esm/bcs/deserializer.d.mts +8 -0
  55. package/dist/esm/bcs/deserializer.mjs +1 -1
  56. package/dist/esm/bcs/index.mjs +1 -1
  57. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  58. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  59. package/dist/esm/{chunk-TLFZOAAB.mjs → chunk-2XQKGWHQ.mjs} +2 -2
  60. package/dist/esm/{chunk-2UBI3AZJ.mjs → chunk-34DNOEXM.mjs} +2 -2
  61. package/dist/esm/chunk-3FEFJIVT.mjs +2 -0
  62. package/dist/esm/chunk-3FEFJIVT.mjs.map +1 -0
  63. package/dist/esm/{chunk-34R7FSQF.mjs → chunk-57J5YBMT.mjs} +2 -2
  64. package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
  65. package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
  66. package/dist/esm/{chunk-G7WH6GQP.mjs → chunk-CFQFFP6N.mjs} +2 -2
  67. package/dist/esm/{chunk-4JT5AESZ.mjs → chunk-CO67Y6YE.mjs} +2 -2
  68. package/dist/esm/chunk-CW35YAMN.mjs +2 -0
  69. package/dist/esm/{chunk-HW7TSJI2.mjs → chunk-CZYH3G7E.mjs} +2 -2
  70. package/dist/esm/{chunk-SE2VS7WM.mjs → chunk-DWQQIYFI.mjs} +2 -2
  71. package/dist/esm/chunk-FLZPUYXQ.mjs +2 -0
  72. package/dist/esm/chunk-FLZPUYXQ.mjs.map +1 -0
  73. package/dist/esm/{chunk-6UZHMEK3.mjs → chunk-HETYL3WN.mjs} +2 -2
  74. package/dist/esm/chunk-JCFTAG5Z.mjs +2 -0
  75. package/dist/esm/{chunk-RJ7F4JDV.mjs.map → chunk-JCFTAG5Z.mjs.map} +1 -1
  76. package/dist/esm/{chunk-ZNLOQO4Q.mjs → chunk-JPJH4LRA.mjs} +2 -2
  77. package/dist/esm/chunk-PPHXE342.mjs +4 -0
  78. package/dist/esm/chunk-PPHXE342.mjs.map +1 -0
  79. package/dist/esm/{chunk-G6HENV5D.mjs → chunk-Q4W3WJ2U.mjs} +2 -2
  80. package/dist/esm/{chunk-EF4FA5I6.mjs → chunk-RQX6JOEN.mjs} +2 -2
  81. package/dist/esm/{chunk-VHNX2NUR.mjs → chunk-UL777LTI.mjs} +47 -26
  82. package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
  83. package/dist/esm/{chunk-TDGLYA35.mjs → chunk-UOP7GBXB.mjs} +2 -2
  84. package/dist/esm/{chunk-K43K3YG7.mjs → chunk-UQWF24SS.mjs} +2 -2
  85. package/dist/esm/{chunk-USB3LA6B.mjs → chunk-VDNJWUHZ.mjs} +2 -2
  86. package/dist/esm/chunk-VEGW6HP5.mjs +2 -0
  87. package/dist/esm/{chunk-HLF3U7IS.mjs.map → chunk-VEGW6HP5.mjs.map} +1 -1
  88. package/dist/esm/{chunk-MA4QUN6P.mjs → chunk-XZSENMD7.mjs} +2 -2
  89. package/dist/esm/cli/index.mjs +1 -1
  90. package/dist/esm/cli/localNode.mjs +1 -1
  91. package/dist/esm/client/core.mjs +1 -1
  92. package/dist/esm/client/get.mjs +1 -1
  93. package/dist/esm/client/index.mjs +1 -1
  94. package/dist/esm/client/post.mjs +1 -1
  95. package/dist/esm/core/account/index.mjs +1 -1
  96. package/dist/esm/core/account/utils/address.mjs +1 -1
  97. package/dist/esm/core/account/utils/index.mjs +1 -1
  98. package/dist/esm/core/accountAddress.mjs +1 -1
  99. package/dist/esm/core/authenticationKey.mjs +1 -1
  100. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  101. package/dist/esm/core/crypto/deserializationUtils.d.mts +36 -0
  102. package/dist/esm/core/crypto/deserializationUtils.mjs +2 -0
  103. package/dist/esm/core/crypto/deserializationUtils.mjs.map +1 -0
  104. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  105. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  106. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  107. package/dist/esm/core/crypto/index.d.mts +2 -0
  108. package/dist/esm/core/crypto/index.mjs +1 -1
  109. package/dist/esm/core/crypto/keyless.mjs +1 -1
  110. package/dist/esm/core/crypto/multiEd25519.d.mts +10 -0
  111. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  112. package/dist/esm/core/crypto/multiKey.d.mts +2 -0
  113. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  114. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  115. package/dist/esm/core/crypto/proof.mjs +1 -1
  116. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  117. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  118. package/dist/esm/core/crypto/signature.mjs +1 -1
  119. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  120. package/dist/esm/core/crypto/types.d.mts +25 -0
  121. package/dist/esm/core/crypto/types.mjs +2 -0
  122. package/dist/esm/core/crypto/types.mjs.map +1 -0
  123. package/dist/esm/core/index.d.mts +2 -0
  124. package/dist/esm/core/index.mjs +1 -1
  125. package/dist/esm/errors/index.mjs +1 -1
  126. package/dist/esm/index.d.mts +5 -2
  127. package/dist/esm/index.mjs +1 -1
  128. package/dist/esm/internal/abstraction.mjs +1 -1
  129. package/dist/esm/internal/account.d.mts +44 -14
  130. package/dist/esm/internal/account.mjs +1 -1
  131. package/dist/esm/internal/ans.mjs +1 -1
  132. package/dist/esm/internal/coin.mjs +1 -1
  133. package/dist/esm/internal/digitalAsset.mjs +1 -1
  134. package/dist/esm/internal/event.mjs +1 -1
  135. package/dist/esm/internal/faucet.mjs +1 -1
  136. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  137. package/dist/esm/internal/general.mjs +1 -1
  138. package/dist/esm/internal/keyless.d.mts +9 -0
  139. package/dist/esm/internal/keyless.mjs +1 -1
  140. package/dist/esm/internal/object.mjs +1 -1
  141. package/dist/esm/internal/staking.mjs +1 -1
  142. package/dist/esm/internal/table.mjs +1 -1
  143. package/dist/esm/internal/transaction.mjs +1 -1
  144. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  145. package/dist/esm/internal/utils/index.mjs +1 -1
  146. package/dist/esm/internal/utils/utils.mjs +1 -1
  147. package/dist/esm/internal/view.mjs +1 -1
  148. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  149. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  150. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  151. package/dist/esm/transactions/index.mjs +1 -1
  152. package/dist/esm/transactions/instances/index.mjs +1 -1
  153. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  154. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  155. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  156. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  157. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  158. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  159. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  160. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  161. package/dist/esm/transactions/management/index.mjs +1 -1
  162. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  163. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  164. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  165. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  166. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  167. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  168. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  169. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  170. package/dist/esm/types/generated/operations.d.mts +37 -10
  171. package/dist/esm/types/generated/queries.d.mts +6 -2
  172. package/dist/esm/types/generated/queries.mjs +1 -1
  173. package/dist/esm/types/generated/types.d.mts +584 -1172
  174. package/dist/esm/types/generated/types.mjs +1 -1
  175. package/dist/esm/types/generated/types.mjs.map +1 -1
  176. package/dist/esm/types/index.d.mts +2 -2
  177. package/dist/esm/types/index.mjs +1 -1
  178. package/dist/esm/types/indexer.d.mts +8 -2
  179. package/dist/esm/types/types.d.mts +25 -3
  180. package/dist/esm/types/types.mjs +1 -1
  181. package/dist/esm/utils/const.d.mts +1 -0
  182. package/dist/esm/utils/const.mjs +1 -1
  183. package/dist/esm/utils/helpers.mjs +1 -1
  184. package/dist/esm/utils/index.mjs +1 -1
  185. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  186. package/dist/esm/version.d.mts +1 -1
  187. package/dist/esm/version.mjs +1 -1
  188. package/package.json +3 -3
  189. package/src/account/FederatedKeylessAccount.ts +7 -1
  190. package/src/account/KeylessAccount.ts +17 -2
  191. package/src/api/account.ts +120 -2
  192. package/src/api/transaction.ts +1 -0
  193. package/src/bcs/deserializer.ts +13 -0
  194. package/src/core/crypto/deserializationUtils.ts +106 -0
  195. package/src/core/crypto/index.ts +2 -0
  196. package/src/core/crypto/multiEd25519.ts +26 -0
  197. package/src/core/crypto/multiKey.ts +6 -0
  198. package/src/core/crypto/types.ts +9 -0
  199. package/src/internal/account.ts +523 -53
  200. package/src/internal/keyless.ts +10 -0
  201. package/src/internal/move/jwks/build/jwk/BuildInfo.yaml +56 -0
  202. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/account.mv +0 -0
  203. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator.mv +0 -0
  204. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_factory.mv +0 -0
  205. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_v2.mv +0 -0
  206. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_account.mv +0 -0
  207. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_coin.mv +0 -0
  208. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_governance.mv +0 -0
  209. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/block.mv +0 -0
  210. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_id.mv +0 -0
  211. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_status.mv +0 -0
  212. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/code.mv +0 -0
  213. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/coin.mv +0 -0
  214. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/config_buffer.mv +0 -0
  215. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/consensus_config.mv +0 -0
  216. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/create_signer.mv +0 -0
  217. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/delegation_pool.mv +0 -0
  218. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dispatchable_fungible_asset.mv +0 -0
  219. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dkg.mv +0 -0
  220. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/event.mv +0 -0
  221. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/execution_config.mv +0 -0
  222. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/function_info.mv +0 -0
  223. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/fungible_asset.mv +0 -0
  224. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/gas_schedule.mv +0 -0
  225. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/genesis.mv +0 -0
  226. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/governance_proposal.mv +0 -0
  227. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/guid.mv +0 -0
  228. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwk_consensus_config.mv +0 -0
  229. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwks.mv +0 -0
  230. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/keyless_account.mv +0 -0
  231. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/managed_coin.mv +0 -0
  232. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/multisig_account.mv +0 -0
  233. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object.mv +0 -0
  234. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object_code_deployment.mv +0 -0
  235. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/optional_aggregator.mv +0 -0
  236. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/primary_fungible_store.mv +0 -0
  237. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness.mv +0 -0
  238. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_api_v0_config.mv +0 -0
  239. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config.mv +0 -0
  240. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config_seqnum.mv +0 -0
  241. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration.mv +0 -0
  242. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_state.mv +0 -0
  243. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_with_dkg.mv +0 -0
  244. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/resource_account.mv +0 -0
  245. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/stake.mv +0 -0
  246. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_config.mv +0 -0
  247. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_contract.mv +0 -0
  248. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_proxy.mv +0 -0
  249. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/state_storage.mv +0 -0
  250. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/storage_gas.mv +0 -0
  251. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/system_addresses.mv +0 -0
  252. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/timestamp.mv +0 -0
  253. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_context.mv +0 -0
  254. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_fee.mv +0 -0
  255. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_validation.mv +0 -0
  256. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/util.mv +0 -0
  257. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/validator_consensus_info.mv +0 -0
  258. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/version.mv +0 -0
  259. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/vesting.mv +0 -0
  260. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/voting.mv +0 -0
  261. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/any.mv +0 -0
  262. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/aptos_hash.mv +0 -0
  263. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/big_vector.mv +0 -0
  264. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381.mv +0 -0
  265. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381_algebra.mv +0 -0
  266. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bn254_algebra.mv +0 -0
  267. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/capability.mv +0 -0
  268. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/comparator.mv +0 -0
  269. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/copyable_any.mv +0 -0
  270. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/crypto_algebra.mv +0 -0
  271. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/debug.mv +0 -0
  272. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ed25519.mv +0 -0
  273. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/fixed_point64.mv +0 -0
  274. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/from_bcs.mv +0 -0
  275. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math128.mv +0 -0
  276. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math64.mv +0 -0
  277. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed.mv +0 -0
  278. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed64.mv +0 -0
  279. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/multi_ed25519.mv +0 -0
  280. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64.mv +0 -0
  281. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64_unbound.mv +0 -0
  282. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255.mv +0 -0
  283. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_bulletproofs.mv +0 -0
  284. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_elgamal.mv +0 -0
  285. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_pedersen.mv +0 -0
  286. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/secp256k1.mv +0 -0
  287. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/simple_map.mv +0 -0
  288. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_table.mv +0 -0
  289. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_vector.mv +0 -0
  290. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/string_utils.mv +0 -0
  291. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table.mv +0 -0
  292. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table_with_length.mv +0 -0
  293. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/type_info.mv +0 -0
  294. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/acl.mv +0 -0
  295. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bcs.mv +0 -0
  296. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bit_vector.mv +0 -0
  297. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/error.mv +0 -0
  298. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/features.mv +0 -0
  299. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/fixed_point32.mv +0 -0
  300. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/hash.mv +0 -0
  301. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/option.mv +0 -0
  302. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/signer.mv +0 -0
  303. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/string.mv +0 -0
  304. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/vector.mv +0 -0
  305. package/src/internal/move/jwks/build/jwk/bytecode_scripts/main.mv +0 -0
  306. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/account.mvsm +0 -0
  307. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator.mvsm +0 -0
  308. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_factory.mvsm +0 -0
  309. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_v2.mvsm +0 -0
  310. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_account.mvsm +0 -0
  311. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_coin.mvsm +0 -0
  312. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_governance.mvsm +0 -0
  313. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/block.mvsm +0 -0
  314. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_id.mvsm +0 -0
  315. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_status.mvsm +0 -0
  316. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/code.mvsm +0 -0
  317. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/coin.mvsm +0 -0
  318. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/config_buffer.mvsm +0 -0
  319. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/consensus_config.mvsm +0 -0
  320. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/create_signer.mvsm +0 -0
  321. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/delegation_pool.mvsm +0 -0
  322. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dispatchable_fungible_asset.mvsm +0 -0
  323. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dkg.mvsm +0 -0
  324. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/event.mvsm +0 -0
  325. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/execution_config.mvsm +0 -0
  326. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/function_info.mvsm +0 -0
  327. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/fungible_asset.mvsm +0 -0
  328. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/gas_schedule.mvsm +0 -0
  329. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/genesis.mvsm +0 -0
  330. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/governance_proposal.mvsm +0 -0
  331. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/guid.mvsm +0 -0
  332. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwk_consensus_config.mvsm +0 -0
  333. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwks.mvsm +0 -0
  334. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/keyless_account.mvsm +0 -0
  335. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/managed_coin.mvsm +0 -0
  336. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/multisig_account.mvsm +0 -0
  337. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object.mvsm +0 -0
  338. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object_code_deployment.mvsm +0 -0
  339. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/optional_aggregator.mvsm +0 -0
  340. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/primary_fungible_store.mvsm +0 -0
  341. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness.mvsm +0 -0
  342. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_api_v0_config.mvsm +0 -0
  343. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config.mvsm +0 -0
  344. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config_seqnum.mvsm +0 -0
  345. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration.mvsm +0 -0
  346. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_state.mvsm +0 -0
  347. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_with_dkg.mvsm +0 -0
  348. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/resource_account.mvsm +0 -0
  349. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/stake.mvsm +0 -0
  350. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_config.mvsm +0 -0
  351. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_contract.mvsm +0 -0
  352. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_proxy.mvsm +0 -0
  353. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/state_storage.mvsm +0 -0
  354. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/storage_gas.mvsm +0 -0
  355. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/system_addresses.mvsm +0 -0
  356. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/timestamp.mvsm +0 -0
  357. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_context.mvsm +0 -0
  358. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_fee.mvsm +0 -0
  359. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_validation.mvsm +0 -0
  360. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/util.mvsm +0 -0
  361. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/validator_consensus_info.mvsm +0 -0
  362. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/version.mvsm +0 -0
  363. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/vesting.mvsm +0 -0
  364. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/voting.mvsm +0 -0
  365. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/any.mvsm +0 -0
  366. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/aptos_hash.mvsm +0 -0
  367. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/big_vector.mvsm +0 -0
  368. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381.mvsm +0 -0
  369. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381_algebra.mvsm +0 -0
  370. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bn254_algebra.mvsm +0 -0
  371. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/capability.mvsm +0 -0
  372. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/comparator.mvsm +0 -0
  373. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/copyable_any.mvsm +0 -0
  374. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/crypto_algebra.mvsm +0 -0
  375. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/debug.mvsm +0 -0
  376. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ed25519.mvsm +0 -0
  377. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/fixed_point64.mvsm +0 -0
  378. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/from_bcs.mvsm +0 -0
  379. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math128.mvsm +0 -0
  380. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math64.mvsm +0 -0
  381. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed.mvsm +0 -0
  382. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed64.mvsm +0 -0
  383. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/multi_ed25519.mvsm +0 -0
  384. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64.mvsm +0 -0
  385. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64_unbound.mvsm +0 -0
  386. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255.mvsm +0 -0
  387. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_bulletproofs.mvsm +0 -0
  388. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_elgamal.mvsm +0 -0
  389. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_pedersen.mvsm +0 -0
  390. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/secp256k1.mvsm +0 -0
  391. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/simple_map.mvsm +0 -0
  392. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_table.mvsm +0 -0
  393. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_vector.mvsm +0 -0
  394. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/string_utils.mvsm +0 -0
  395. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table.mvsm +0 -0
  396. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table_with_length.mvsm +0 -0
  397. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/type_info.mvsm +0 -0
  398. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/acl.mvsm +0 -0
  399. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bcs.mvsm +0 -0
  400. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bit_vector.mvsm +0 -0
  401. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/error.mvsm +0 -0
  402. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/features.mvsm +0 -0
  403. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/fixed_point32.mvsm +0 -0
  404. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/hash.mvsm +0 -0
  405. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/option.mvsm +0 -0
  406. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/signer.mvsm +0 -0
  407. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/string.mvsm +0 -0
  408. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/vector.mvsm +0 -0
  409. package/src/internal/move/jwks/build/jwk/source_maps/main.mvsm +0 -0
  410. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/account.move +1533 -0
  411. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator.move +48 -0
  412. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_factory.move +66 -0
  413. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_v2.move +280 -0
  414. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_account.move +443 -0
  415. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_coin.move +204 -0
  416. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_governance.move +1387 -0
  417. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/block.move +394 -0
  418. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_id.move +41 -0
  419. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_status.move +48 -0
  420. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/code.move +367 -0
  421. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/coin.move +2214 -0
  422. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/config_buffer.move +101 -0
  423. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/consensus_config.move +77 -0
  424. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/create_signer.move +21 -0
  425. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/delegation_pool.move +5568 -0
  426. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dispatchable_fungible_asset.move +228 -0
  427. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dkg.move +121 -0
  428. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/event.move +92 -0
  429. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/execution_config.move +66 -0
  430. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/function_info.move +100 -0
  431. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/fungible_asset.move +1566 -0
  432. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/gas_schedule.move +176 -0
  433. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/genesis.move +550 -0
  434. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/governance_proposal.move +23 -0
  435. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/guid.move +68 -0
  436. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwk_consensus_config.move +148 -0
  437. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwks.move +817 -0
  438. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/keyless_account.move +312 -0
  439. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/managed_coin.move +205 -0
  440. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/multisig_account.move +2477 -0
  441. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object.move +1073 -0
  442. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object_code_deployment.move +147 -0
  443. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/optional_aggregator.move +295 -0
  444. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/primary_fungible_store.move +405 -0
  445. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness.move +574 -0
  446. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_api_v0_config.move +57 -0
  447. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config.move +153 -0
  448. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config_seqnum.move +49 -0
  449. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration.move +237 -0
  450. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_state.move +132 -0
  451. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_with_dkg.move +69 -0
  452. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/resource_account.move +267 -0
  453. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/stake.move +3286 -0
  454. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_config.move +686 -0
  455. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_contract.move +1618 -0
  456. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_proxy.move +228 -0
  457. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/state_storage.move +90 -0
  458. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/storage_gas.move +622 -0
  459. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/system_addresses.move +82 -0
  460. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/timestamp.move +88 -0
  461. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_context.move +262 -0
  462. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_fee.move +457 -0
  463. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_validation.move +501 -0
  464. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/util.move +16 -0
  465. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/validator_consensus_info.move +42 -0
  466. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/version.move +115 -0
  467. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/vesting.move +2183 -0
  468. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/voting.move +1279 -0
  469. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/any.move +57 -0
  470. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/aptos_hash.move +253 -0
  471. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/big_vector.move +469 -0
  472. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381.move +985 -0
  473. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381_algebra.move +802 -0
  474. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bn254_algebra.move +855 -0
  475. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/capability.move +193 -0
  476. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/comparator.move +173 -0
  477. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/copyable_any.move +45 -0
  478. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/crypto_algebra.move +351 -0
  479. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/debug.move +278 -0
  480. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ed25519.move +262 -0
  481. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/fixed_point64.move +447 -0
  482. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/from_bcs.move +91 -0
  483. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math128.move +381 -0
  484. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math64.move +336 -0
  485. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed.move +139 -0
  486. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed64.move +142 -0
  487. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/multi_ed25519.move +482 -0
  488. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64.move +571 -0
  489. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64_unbound.move +270 -0
  490. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255.move +1310 -0
  491. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_bulletproofs.move +253 -0
  492. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_elgamal.move +234 -0
  493. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_pedersen.move +158 -0
  494. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/secp256k1.move +114 -0
  495. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/simple_map.move +319 -0
  496. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_table.move +769 -0
  497. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_vector.move +766 -0
  498. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/string_utils.move +148 -0
  499. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table.move +152 -0
  500. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table_with_length.move +141 -0
  501. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/type_info.move +351 -0
  502. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/acl.move +46 -0
  503. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bcs.move +27 -0
  504. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bit_vector.move +239 -0
  505. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/error.move +88 -0
  506. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/features.move +780 -0
  507. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/fixed_point32.move +295 -0
  508. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/hash.move +8 -0
  509. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/option.move +356 -0
  510. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/signer.move +21 -0
  511. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/string.move +93 -0
  512. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/vector.move +669 -0
  513. package/src/internal/move/jwks/build/jwk/sources/main.move +20 -0
  514. package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
  515. package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
  516. package/src/types/codegen.yaml +1 -1
  517. package/src/types/generated/operations.ts +39 -8
  518. package/src/types/generated/queries.ts +53 -0
  519. package/src/types/generated/types.ts +620 -1239
  520. package/src/types/indexer.ts +8 -0
  521. package/src/types/types.ts +40 -3
  522. package/src/utils/const.ts +1 -0
  523. package/src/version.ts +1 -1
  524. package/dist/common/chunk-ZMDE3DNL.js +0 -4
  525. package/dist/common/chunk-ZMDE3DNL.js.map +0 -1
  526. package/dist/esm/chunk-5YLNYSBT.mjs +0 -4
  527. package/dist/esm/chunk-5YLNYSBT.mjs.map +0 -1
  528. package/dist/esm/chunk-DLIBG6H7.mjs +0 -2
  529. package/dist/esm/chunk-DLIBG6H7.mjs.map +0 -1
  530. package/dist/esm/chunk-HLF3U7IS.mjs +0 -2
  531. package/dist/esm/chunk-ODAAZLPK.mjs +0 -2
  532. package/dist/esm/chunk-ODAAZLPK.mjs.map +0 -1
  533. package/dist/esm/chunk-RIRJNQ7B.mjs +0 -2
  534. package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
  535. package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
  536. /package/dist/esm/{chunk-TLFZOAAB.mjs.map → chunk-2XQKGWHQ.mjs.map} +0 -0
  537. /package/dist/esm/{chunk-2UBI3AZJ.mjs.map → chunk-34DNOEXM.mjs.map} +0 -0
  538. /package/dist/esm/{chunk-34R7FSQF.mjs.map → chunk-57J5YBMT.mjs.map} +0 -0
  539. /package/dist/esm/{chunk-G7WH6GQP.mjs.map → chunk-CFQFFP6N.mjs.map} +0 -0
  540. /package/dist/esm/{chunk-4JT5AESZ.mjs.map → chunk-CO67Y6YE.mjs.map} +0 -0
  541. /package/dist/esm/{chunk-RIRJNQ7B.mjs.map → chunk-CW35YAMN.mjs.map} +0 -0
  542. /package/dist/esm/{chunk-HW7TSJI2.mjs.map → chunk-CZYH3G7E.mjs.map} +0 -0
  543. /package/dist/esm/{chunk-SE2VS7WM.mjs.map → chunk-DWQQIYFI.mjs.map} +0 -0
  544. /package/dist/esm/{chunk-6UZHMEK3.mjs.map → chunk-HETYL3WN.mjs.map} +0 -0
  545. /package/dist/esm/{chunk-ZNLOQO4Q.mjs.map → chunk-JPJH4LRA.mjs.map} +0 -0
  546. /package/dist/esm/{chunk-G6HENV5D.mjs.map → chunk-Q4W3WJ2U.mjs.map} +0 -0
  547. /package/dist/esm/{chunk-EF4FA5I6.mjs.map → chunk-RQX6JOEN.mjs.map} +0 -0
  548. /package/dist/esm/{chunk-TDGLYA35.mjs.map → chunk-UOP7GBXB.mjs.map} +0 -0
  549. /package/dist/esm/{chunk-K43K3YG7.mjs.map → chunk-UQWF24SS.mjs.map} +0 -0
  550. /package/dist/esm/{chunk-USB3LA6B.mjs.map → chunk-VDNJWUHZ.mjs.map} +0 -0
  551. /package/dist/esm/{chunk-MA4QUN6P.mjs.map → chunk-XZSENMD7.mjs.map} +0 -0
@@ -17,6 +17,8 @@ import {
17
17
  } from "../client";
18
18
  import {
19
19
  AccountData,
20
+ anyPublicKeyVariantToString,
21
+ CommittedTransactionResponse,
20
22
  CursorPaginationArgs,
21
23
  GetAccountCoinsDataResponse,
22
24
  GetAccountCollectionsWithOwnedTokenResponse,
@@ -31,12 +33,28 @@ import {
31
33
  PaginationArgs,
32
34
  PendingTransactionResponse,
33
35
  TokenStandardArg,
34
- TransactionResponse,
35
36
  WhereArg,
36
37
  } from "../types";
37
38
  import { AccountAddress, AccountAddressInput } from "../core/accountAddress";
38
- import { Account, Ed25519Account, MultiEd25519Account } from "../account";
39
- import { AnyPublicKey, Ed25519PublicKey, PrivateKey } from "../core/crypto";
39
+ import {
40
+ Account,
41
+ Ed25519Account,
42
+ FederatedKeylessAccount,
43
+ KeylessAccount,
44
+ MultiEd25519Account,
45
+ MultiKeyAccount,
46
+ SingleKeyAccount,
47
+ } from "../account";
48
+ import {
49
+ AbstractMultiKey,
50
+ AccountPublicKey,
51
+ AnyPublicKey,
52
+ BaseAccountPublicKey,
53
+ Ed25519PublicKey,
54
+ MultiEd25519PublicKey,
55
+ MultiKey,
56
+ PrivateKeyInput,
57
+ } from "../core/crypto";
40
58
  import { queryIndexer } from "./general";
41
59
  import { getModule as getModuleUtil, getInfo as getInfoUtil } from "./utils";
42
60
  import {
@@ -48,6 +66,8 @@ import {
48
66
  GetAccountOwnedTokensQuery,
49
67
  GetAccountTokensCountQuery,
50
68
  GetAccountTransactionsCountQuery,
69
+ GetAuthKeysForPublicKeyQuery,
70
+ GetAccountAddressesForAuthKeyQuery,
51
71
  } from "../types/generated/operations";
52
72
  import {
53
73
  GetAccountCoinsCount,
@@ -58,16 +78,26 @@ import {
58
78
  GetAccountOwnedTokensFromCollection,
59
79
  GetAccountTokensCount,
60
80
  GetAccountTransactionsCount,
81
+ GetAuthKeysForPublicKey,
82
+ GetAccountAddressesForAuthKey,
61
83
  } from "../types/generated/queries";
62
- import { Secp256k1PrivateKey, AuthenticationKey, Ed25519PrivateKey, createObjectAddress } from "../core";
84
+ import { Secp256k1PrivateKey, AuthenticationKey, Ed25519PrivateKey, createObjectAddress, Hex } from "../core";
63
85
  import { CurrentFungibleAssetBalancesBoolExp } from "../types/generated/types";
64
86
  import { getTableItem } from "./table";
65
87
  import { APTOS_COIN } from "../utils";
66
88
  import { AptosApiError } from "../errors";
89
+ import { Deserializer } from "../bcs";
67
90
  import { signAndSubmitTransaction, generateTransaction } from "./transactionSubmission";
68
- import { EntryFunctionABI, RotationProofChallenge, TypeTagU8, TypeTagVector } from "../transactions";
91
+ import {
92
+ EntryFunctionABI,
93
+ InputGenerateTransactionOptions,
94
+ RotationProofChallenge,
95
+ TypeTagU8,
96
+ TypeTagVector,
97
+ } from "../transactions";
69
98
  import { U8, MoveVector } from "../bcs";
70
99
  import { waitForTransaction } from "./transaction";
100
+ import { view } from "./view";
71
101
 
72
102
  /**
73
103
  * Retrieves account information for a specified account address.
@@ -183,9 +213,9 @@ export async function getTransactions(args: {
183
213
  aptosConfig: AptosConfig;
184
214
  accountAddress: AccountAddressInput;
185
215
  options?: PaginationArgs;
186
- }): Promise<TransactionResponse[]> {
216
+ }): Promise<CommittedTransactionResponse[]> {
187
217
  const { aptosConfig, accountAddress, options } = args;
188
- return paginateWithCursor<{}, TransactionResponse[]>({
218
+ return paginateWithCursor<{}, CommittedTransactionResponse[]>({
189
219
  aptosConfig,
190
220
  originMethod: "getTransactions",
191
221
  path: `accounts/${AccountAddress.from(accountAddress).toString()}/transactions`,
@@ -755,61 +785,44 @@ export async function getAccountOwnedObjects(args: {
755
785
 
756
786
  /**
757
787
  * Derives an account from the provided private key and Aptos configuration.
758
- * This function helps in obtaining the account details associated with a given private key,
759
- * considering both unified and legacy authentication schemes.
788
+ *
789
+ * This function queries all owned accounts for the provided private key and returns the most
790
+ * recently used account. If no account is found, it will throw an error unless `throwIfNoAccountFound` is set to false.
791
+ *
792
+ * If `throwIfNoAccountFound` is set to false, the function will return the default account for the private key via `Account.fromPrivateKey`.
760
793
  *
761
794
  * NOTE: There is a potential issue once the unified single signer scheme is adopted by the community.
762
795
  * Because one could create two accounts with the same private key with this new authenticator type,
763
- * well need to determine the order in which we look up the accounts: first unified scheme and then legacy scheme,
796
+ * we'll need to determine the order in which we look up the accounts: first unified scheme and then legacy scheme,
764
797
  * or first legacy scheme and then unified scheme.
765
798
  *
766
799
  * @param args - The arguments for deriving the account.
767
800
  * @param args.aptosConfig - The Aptos configuration used for account lookup.
768
801
  * @param args.privateKey - The private key used to derive the account.
802
+ * @param args.options.throwIfNoAccountFound - If true, throw an error if no existing account is found on chain. Default is false.
769
803
  * @throws Error if the account cannot be derived from the private key.
770
804
  * @group Implementation
771
805
  * @deprecated Note that more inspection is needed by the user to determine which account exists on-chain
772
806
  */
773
807
  export async function deriveAccountFromPrivateKey(args: {
774
808
  aptosConfig: AptosConfig;
775
- privateKey: PrivateKey;
809
+ privateKey: PrivateKeyInput;
810
+ options?: {
811
+ throwIfNoAccountFound?: boolean;
812
+ };
776
813
  }): Promise<Account> {
777
- const { aptosConfig, privateKey } = args;
778
- const publicKey = new AnyPublicKey(privateKey.publicKey());
779
-
780
- if (privateKey instanceof Secp256k1PrivateKey) {
781
- // private key is secp256k1, therefore we know it for sure uses a single signer key
782
- const authKey = AuthenticationKey.fromPublicKey({ publicKey });
783
- const address = authKey.derivedAddress();
784
- return Account.fromPrivateKey({ privateKey, address });
785
- }
814
+ const { aptosConfig, privateKey, options } = args;
815
+ const throwIfNoAccountFound = options?.throwIfNoAccountFound ?? false;
786
816
 
787
- if (privateKey instanceof Ed25519PrivateKey) {
788
- // lookup legacy ed25519
789
- const legacyAuthKey = AuthenticationKey.fromPublicKey({
790
- publicKey: publicKey.publicKey as Ed25519PublicKey,
791
- });
792
- const isLegacyEd25519 = await isAccountExist({ authKey: legacyAuthKey, aptosConfig });
793
- if (isLegacyEd25519) {
794
- const address = legacyAuthKey.derivedAddress();
795
- return Account.fromPrivateKey({ privateKey, address, legacy: true });
796
- }
797
- // lookup single sender ed25519
798
- const singleSenderTransactionAuthenticatorAuthKey = AuthenticationKey.fromPublicKey({
799
- publicKey,
800
- });
801
- const isSingleSenderTransactionAuthenticator = await isAccountExist({
802
- authKey: singleSenderTransactionAuthenticatorAuthKey,
803
- aptosConfig,
804
- });
805
- if (isSingleSenderTransactionAuthenticator) {
806
- const address = singleSenderTransactionAuthenticatorAuthKey.derivedAddress();
807
- return Account.fromPrivateKey({ privateKey, address, legacy: false });
817
+ const accounts = await deriveOwnedAccountsFromPrivateKey({ aptosConfig, privateKey });
818
+ if (accounts.length === 0) {
819
+ if (throwIfNoAccountFound) {
820
+ throw new Error(`No existing account found for private key.`);
808
821
  }
822
+ // If no account is found, return the default account. This is a legacy account for Ed25519 private keys.
823
+ return Account.fromPrivateKey({ privateKey });
809
824
  }
810
- // if we are here, it means we couldn't find an address with an
811
- // auth key that matches the provided private key
812
- throw new Error(`Can't derive account from private key ${privateKey}`);
825
+ return accounts[0];
813
826
  }
814
827
 
815
828
  /**
@@ -830,11 +843,71 @@ export async function isAccountExist(args: { aptosConfig: AptosConfig; authKey:
830
843
  authenticationKey: authKey.derivedAddress(),
831
844
  });
832
845
 
846
+ return doesAccountExistAtAddress({ aptosConfig, accountAddress });
847
+ }
848
+
849
+ /**
850
+ * Checks if an account exists at a given address.
851
+ *
852
+ * @param args - The arguments for checking account existence.
853
+ * @param args.aptosConfig - The configuration for the Aptos client.
854
+ * @param args.accountAddress - The address of the account to check.
855
+ * @param args.options.withAuthKey - An optional authentication key which will also be checked against if provided.
856
+ * @returns A promise that resolves to a boolean indicating whether the account exists.
857
+ * @group Implementation
858
+ */
859
+ async function doesAccountExistAtAddress(args: {
860
+ aptosConfig: AptosConfig;
861
+ accountAddress: AccountAddress;
862
+ options?: { withAuthKey?: AuthenticationKey };
863
+ }): Promise<boolean> {
864
+ const { aptosConfig, accountAddress, options } = args;
833
865
  try {
834
- await getInfo({
835
- aptosConfig,
836
- accountAddress,
837
- });
866
+ // Get the account resources and the balance of the account. We need to check both because
867
+ // an account resource can exist with 0 balance and a balance can exist without an account resource (light accounts).
868
+ const [resources, [balanceStr]] = await Promise.all([
869
+ getResources({
870
+ aptosConfig,
871
+ accountAddress,
872
+ }),
873
+ view<[string]>({
874
+ aptosConfig,
875
+ payload: {
876
+ function: "0x1::coin::balance",
877
+ typeArguments: ["0x1::aptos_coin::AptosCoin"],
878
+ functionArguments: [accountAddress],
879
+ },
880
+ }),
881
+ ]);
882
+ const balance = parseInt(balanceStr, 10);
883
+ const accountResource: MoveResource<{ authentication_key: string }> | undefined = resources.find(
884
+ (r) => r.type === "0x1::account::Account",
885
+ ) as MoveResource<{ authentication_key: string }> | undefined;
886
+
887
+ // If the account resource is not found and the balance is 0, then the account does not exist.
888
+ if (!accountResource && balance === 0) {
889
+ return false;
890
+ }
891
+
892
+ // If no auth key is provided as an argument, return true.
893
+ if (!options?.withAuthKey) {
894
+ return true;
895
+ }
896
+
897
+ // Get the auth key from the account resource if it exists. If the account resource does not exist,
898
+ // then the auth key is the account address by default.
899
+ let authKey;
900
+ if (accountResource) {
901
+ authKey = accountResource.data.authentication_key;
902
+ } else {
903
+ authKey = accountAddress.toStringLong();
904
+ }
905
+
906
+ if (authKey !== options.withAuthKey.toString()) {
907
+ return false;
908
+ }
909
+
910
+ // Else the account exists and the auth key matches.
838
911
  return true;
839
912
  } catch (error: any) {
840
913
  // account not found
@@ -888,27 +961,34 @@ export async function rotateAuthKey(
888
961
  args: {
889
962
  aptosConfig: AptosConfig;
890
963
  fromAccount: Account;
964
+ options?: InputGenerateTransactionOptions;
891
965
  } & (
892
966
  | { toAccount: Account; dangerouslySkipVerification?: never }
893
967
  | { toNewPrivateKey: Ed25519PrivateKey; dangerouslySkipVerification?: never }
894
968
  | { toAuthKey: AuthenticationKey; dangerouslySkipVerification: true }
895
969
  ),
896
970
  ): Promise<PendingTransactionResponse> {
897
- const { aptosConfig, fromAccount, dangerouslySkipVerification } = args;
971
+ const { aptosConfig, fromAccount, dangerouslySkipVerification, options } = args;
898
972
  if ("toNewPrivateKey" in args) {
899
973
  return rotateAuthKeyWithChallenge({
900
974
  aptosConfig,
901
975
  fromAccount,
902
976
  toNewPrivateKey: args.toNewPrivateKey,
977
+ options,
903
978
  });
904
979
  }
905
980
  let authKey: AuthenticationKey;
906
981
  if ("toAccount" in args) {
907
982
  if (args.toAccount instanceof Ed25519Account) {
908
- return rotateAuthKeyWithChallenge({ aptosConfig, fromAccount, toNewPrivateKey: args.toAccount.privateKey });
983
+ return rotateAuthKeyWithChallenge({
984
+ aptosConfig,
985
+ fromAccount,
986
+ toNewPrivateKey: args.toAccount.privateKey,
987
+ options,
988
+ });
909
989
  }
910
990
  if (args.toAccount instanceof MultiEd25519Account) {
911
- return rotateAuthKeyWithChallenge({ aptosConfig, fromAccount, toAccount: args.toAccount });
991
+ return rotateAuthKeyWithChallenge({ aptosConfig, fromAccount, toAccount: args.toAccount, options });
912
992
  }
913
993
  authKey = args.toAccount.publicKey.authKey();
914
994
  } else if ("toAuthKey" in args) {
@@ -921,6 +1001,7 @@ export async function rotateAuthKey(
921
1001
  aptosConfig,
922
1002
  fromAccount,
923
1003
  toAuthKey: authKey,
1004
+ options,
924
1005
  });
925
1006
 
926
1007
  if (dangerouslySkipVerification === true) {
@@ -957,9 +1038,10 @@ async function rotateAuthKeyWithChallenge(
957
1038
  args: {
958
1039
  aptosConfig: AptosConfig;
959
1040
  fromAccount: Account;
1041
+ options?: InputGenerateTransactionOptions;
960
1042
  } & ({ toNewPrivateKey: Ed25519PrivateKey } | { toAccount: MultiEd25519Account }),
961
1043
  ): Promise<PendingTransactionResponse> {
962
- const { aptosConfig, fromAccount } = args;
1044
+ const { aptosConfig, fromAccount, options } = args;
963
1045
  const accountInfo = await getInfo({
964
1046
  aptosConfig,
965
1047
  accountAddress: fromAccount.accountAddress,
@@ -1000,6 +1082,7 @@ async function rotateAuthKeyWithChallenge(
1000
1082
  ],
1001
1083
  abi: rotateAuthKeyAbi,
1002
1084
  },
1085
+ options,
1003
1086
  });
1004
1087
  return signAndSubmitTransaction({
1005
1088
  aptosConfig,
@@ -1017,8 +1100,9 @@ async function rotateAuthKeyUnverified(args: {
1017
1100
  aptosConfig: AptosConfig;
1018
1101
  fromAccount: Account;
1019
1102
  toAuthKey: AuthenticationKey;
1103
+ options?: InputGenerateTransactionOptions;
1020
1104
  }): Promise<PendingTransactionResponse> {
1021
- const { aptosConfig, fromAccount, toAuthKey } = args;
1105
+ const { aptosConfig, fromAccount, toAuthKey, options } = args;
1022
1106
  const authKey = toAuthKey;
1023
1107
  const rawTxn = await generateTransaction({
1024
1108
  aptosConfig,
@@ -1028,6 +1112,7 @@ async function rotateAuthKeyUnverified(args: {
1028
1112
  functionArguments: [MoveVector.U8(authKey.toUint8Array())],
1029
1113
  abi: rotateAuthKeyUnverifiedAbi,
1030
1114
  },
1115
+ options,
1031
1116
  });
1032
1117
  return signAndSubmitTransaction({
1033
1118
  aptosConfig,
@@ -1035,3 +1120,388 @@ async function rotateAuthKeyUnverified(args: {
1035
1120
  transaction: rawTxn,
1036
1121
  });
1037
1122
  }
1123
+
1124
+ export type AccountInfo = {
1125
+ accountAddress: AccountAddress;
1126
+ publicKey: BaseAccountPublicKey;
1127
+ lastTransactionVersion: number;
1128
+ };
1129
+
1130
+ export async function getAccountsForPublicKey(args: {
1131
+ aptosConfig: AptosConfig;
1132
+ publicKey: BaseAccountPublicKey;
1133
+ options?: { includeUnverified?: boolean; noMultiKey?: boolean };
1134
+ }): Promise<AccountInfo[]> {
1135
+ const { aptosConfig, publicKey, options } = args;
1136
+ const noMultiKey = options?.noMultiKey ?? false;
1137
+ if (noMultiKey && publicKey instanceof AbstractMultiKey) {
1138
+ throw new Error("Multi-key accounts are not supported when noMultiKey is true.");
1139
+ }
1140
+ const allPublicKeys: BaseAccountPublicKey[] = [publicKey];
1141
+
1142
+ // For Ed25519, we add the both the legacy Ed25519PublicKey and the new AnyPublicKey form.
1143
+ if (publicKey instanceof AnyPublicKey && publicKey.publicKey instanceof Ed25519PublicKey) {
1144
+ allPublicKeys.push(publicKey.publicKey);
1145
+ } else if (publicKey instanceof Ed25519PublicKey) {
1146
+ allPublicKeys.push(new AnyPublicKey(publicKey));
1147
+ }
1148
+
1149
+ // Run both operations in parallel
1150
+ const [defaultAccountData, multiPublicKeys] = await Promise.all([
1151
+ // Check the provided public key for the default account. In the case of Ed25519, this will check both the legacy Ed25519PublicKey
1152
+ // and the AnyPublicKey form and may an existing account for each.
1153
+ Promise.all(
1154
+ allPublicKeys.map(async (publicKey) => {
1155
+ const addressAndLastTxnVersion = await getDefaultAccountInfoForPublicKey({ aptosConfig, publicKey });
1156
+ if (addressAndLastTxnVersion) {
1157
+ return { ...addressAndLastTxnVersion, publicKey };
1158
+ }
1159
+ return undefined;
1160
+ }),
1161
+ ),
1162
+ // Get multi-keys for the provided public key if not already a multi-key.
1163
+ !(publicKey instanceof AbstractMultiKey) && !noMultiKey
1164
+ ? getMultiKeysForPublicKey({ aptosConfig, publicKey, options })
1165
+ : Promise.resolve([]),
1166
+ ]);
1167
+
1168
+ const result: {
1169
+ accountAddress: AccountAddress;
1170
+ publicKey: BaseAccountPublicKey;
1171
+ lastTransactionVersion: number;
1172
+ }[] = [];
1173
+
1174
+ // Add any default accounts that exist to the result.
1175
+ for (const data of defaultAccountData) {
1176
+ if (data) {
1177
+ result.push(data);
1178
+ }
1179
+ }
1180
+
1181
+ // Add any multi-keys to allPublicKeys
1182
+ allPublicKeys.push(...multiPublicKeys);
1183
+
1184
+ // Get a map of the auth key to the public key for all public keys.
1185
+ const authKeyToPublicKey = new Map(allPublicKeys.map((key) => [key.authKey().toString(), key]));
1186
+
1187
+ // Get the account addresses for the auth keys.
1188
+ const authKeyAccountAddressPairs = await getAccountAddressesForAuthKeys({
1189
+ aptosConfig,
1190
+ authKeys: allPublicKeys.map((key) => key.authKey()),
1191
+ options,
1192
+ });
1193
+
1194
+ for (const authKeyAccountAddressPair of authKeyAccountAddressPairs) {
1195
+ // Skip if the account address is already in the result.
1196
+ // This can happen in the rare edge case where the default account has been rotated but has been rotated back to the original auth key.
1197
+ if (result.find((r) => r.accountAddress === authKeyAccountAddressPair.accountAddress)) {
1198
+ continue;
1199
+ }
1200
+ // Get the public key for the auth key using the map we created earlier.
1201
+ const publicKey = authKeyToPublicKey.get(authKeyAccountAddressPair.authKey.toString());
1202
+ if (!publicKey) {
1203
+ throw new Error(
1204
+ `No publicKey found for authentication key ${authKeyAccountAddressPair.authKey}. This should never happen.`,
1205
+ );
1206
+ }
1207
+ result.push({
1208
+ accountAddress: authKeyAccountAddressPair.accountAddress,
1209
+ publicKey,
1210
+ lastTransactionVersion: authKeyAccountAddressPair.lastTransactionVersion,
1211
+ });
1212
+ }
1213
+ // Sort the result by the last transaction version in descending order (most recent first).
1214
+ return result.sort((a, b) => b.lastTransactionVersion - a.lastTransactionVersion);
1215
+ }
1216
+
1217
+ export async function deriveOwnedAccountsFromSigner(args: {
1218
+ aptosConfig: AptosConfig;
1219
+ signer: Account | PrivateKeyInput;
1220
+ options?: { includeUnverified?: boolean; noMultiKey?: boolean };
1221
+ }): Promise<Account[]> {
1222
+ const { aptosConfig, signer, options } = args;
1223
+
1224
+ if (signer instanceof Ed25519PrivateKey || signer instanceof Secp256k1PrivateKey) {
1225
+ return deriveOwnedAccountsFromPrivateKey({ aptosConfig, privateKey: signer, options });
1226
+ }
1227
+
1228
+ if (signer instanceof Ed25519Account || signer instanceof SingleKeyAccount) {
1229
+ return deriveOwnedAccountsFromPrivateKey({ aptosConfig, privateKey: signer.privateKey, options });
1230
+ }
1231
+
1232
+ if (signer instanceof KeylessAccount || signer instanceof FederatedKeylessAccount) {
1233
+ return deriveOwnedAccountsFromKeylessSigner({ aptosConfig, keylessAccount: signer, options });
1234
+ }
1235
+
1236
+ if (signer instanceof MultiKeyAccount) {
1237
+ if (signer.signers.length === 1) {
1238
+ return deriveOwnedAccountsFromSigner({ aptosConfig, signer: signer.signers[0], options });
1239
+ }
1240
+ }
1241
+
1242
+ if (signer instanceof MultiEd25519Account) {
1243
+ if (signer.signers.length === 1) {
1244
+ return deriveOwnedAccountsFromPrivateKey({ aptosConfig, privateKey: signer.signers[0], options });
1245
+ }
1246
+ }
1247
+
1248
+ throw new Error("Unknown signer type");
1249
+ }
1250
+
1251
+ async function deriveOwnedAccountsFromKeylessSigner(args: {
1252
+ aptosConfig: AptosConfig;
1253
+ keylessAccount: KeylessAccount | FederatedKeylessAccount;
1254
+ options?: { includeUnverified?: boolean; noMultiKey?: boolean };
1255
+ }): Promise<Account[]> {
1256
+ const { aptosConfig, keylessAccount, options } = args;
1257
+ const addressesAndPublicKeys = await getAccountsForPublicKey({
1258
+ aptosConfig,
1259
+ publicKey: keylessAccount.getAnyPublicKey(),
1260
+ options,
1261
+ });
1262
+
1263
+ const keylessAccountParams = {
1264
+ proof: keylessAccount.proofOrPromise,
1265
+ jwt: keylessAccount.jwt,
1266
+ ephemeralKeyPair: keylessAccount.ephemeralKeyPair,
1267
+ pepper: keylessAccount.pepper,
1268
+ verificationKeyHash: keylessAccount.verificationKeyHash,
1269
+ };
1270
+
1271
+ const accounts: Account[] = [];
1272
+ for (const { accountAddress, publicKey } of addressesAndPublicKeys) {
1273
+ if (publicKey instanceof AbstractMultiKey) {
1274
+ if (publicKey.getSignaturesRequired() > 1) {
1275
+ continue;
1276
+ }
1277
+ if (publicKey instanceof MultiEd25519PublicKey) {
1278
+ throw new Error("Keyless authentication cannot be used for multi-ed25519 accounts. This should never happen.");
1279
+ } else if (publicKey instanceof MultiKey) {
1280
+ accounts.push(new MultiKeyAccount({ multiKey: publicKey, signers: [keylessAccount], address: accountAddress }));
1281
+ }
1282
+ } else {
1283
+ if (keylessAccount instanceof FederatedKeylessAccount) {
1284
+ accounts.push(
1285
+ FederatedKeylessAccount.create({
1286
+ ...keylessAccountParams,
1287
+ address: accountAddress,
1288
+ jwkAddress: keylessAccount.publicKey.jwkAddress,
1289
+ }),
1290
+ );
1291
+ } else {
1292
+ accounts.push(
1293
+ KeylessAccount.create({
1294
+ ...keylessAccountParams,
1295
+ address: accountAddress,
1296
+ }),
1297
+ );
1298
+ }
1299
+ }
1300
+ }
1301
+ return accounts;
1302
+ }
1303
+
1304
+ async function deriveOwnedAccountsFromPrivateKey(args: {
1305
+ aptosConfig: AptosConfig;
1306
+ privateKey: Ed25519PrivateKey | Secp256k1PrivateKey;
1307
+ options?: { includeUnverified?: boolean; noMultiKey?: boolean };
1308
+ }): Promise<Account[]> {
1309
+ const { aptosConfig, privateKey, options } = args;
1310
+ const singleKeyAccount = Account.fromPrivateKey({ privateKey, legacy: false });
1311
+ const addressesAndPublicKeys = await getAccountsForPublicKey({
1312
+ aptosConfig,
1313
+ publicKey: new AnyPublicKey(privateKey.publicKey()),
1314
+ options,
1315
+ });
1316
+
1317
+ const accounts: Account[] = [];
1318
+
1319
+ // Iterate through the addressesAndPublicKeys and construct the accounts.
1320
+ for (const { accountAddress, publicKey } of addressesAndPublicKeys) {
1321
+ if (publicKey instanceof AbstractMultiKey) {
1322
+ // Skip multi-key accounts with more than 1 signature required as the user does not have full ownership with just 1 private key.
1323
+ if (publicKey.getSignaturesRequired() > 1) {
1324
+ continue;
1325
+ }
1326
+ // Construct the appropriate multi-key type.
1327
+ if (publicKey instanceof MultiEd25519PublicKey) {
1328
+ accounts.push(
1329
+ new MultiEd25519Account({ publicKey, signers: [privateKey as Ed25519PrivateKey], address: accountAddress }),
1330
+ );
1331
+ } else if (publicKey instanceof MultiKey) {
1332
+ accounts.push(
1333
+ new MultiKeyAccount({ multiKey: publicKey, signers: [singleKeyAccount], address: accountAddress }),
1334
+ );
1335
+ }
1336
+ } else {
1337
+ // Check if the public key is a legacy Ed25519PublicKey, if so, we need to use the legacy account constructor.
1338
+ const isLegacy = publicKey instanceof Ed25519PublicKey;
1339
+ accounts.push(Account.fromPrivateKey({ privateKey, address: accountAddress, legacy: isLegacy }));
1340
+ }
1341
+ }
1342
+ return accounts;
1343
+ }
1344
+
1345
+ /**
1346
+ * Gets the multi-keys for a given public key.
1347
+ *
1348
+ * This function retrieves the multi-keys that contain the provided public key.
1349
+ * It performs the following steps:
1350
+ * 1. Constructs a where condition for the public key where the public key matches the provided public key.
1351
+ * 2. Queries the indexer for the multi-keys.
1352
+ * 3. Returns the multi-keys.
1353
+ *
1354
+ * @param args.aptosConfig - The configuration settings for the Aptos network.
1355
+ * @param args.publicKey - The public key to get the multi-keys for. This public key cannot itself be a multi-key.
1356
+ * @returns The multi-keys (MultiKey or MultiEd25519PublicKey) that contain the given public key.
1357
+ */
1358
+ async function getMultiKeysForPublicKey(args: {
1359
+ aptosConfig: AptosConfig;
1360
+ publicKey: Ed25519PublicKey | AnyPublicKey;
1361
+ options?: { includeUnverified?: boolean };
1362
+ }): Promise<(MultiKey | MultiEd25519PublicKey)[]> {
1363
+ const { aptosConfig, publicKey, options } = args;
1364
+ if (publicKey instanceof AbstractMultiKey) {
1365
+ throw new Error("Public key is a multi-key.");
1366
+ }
1367
+ const includeUnverified = options?.includeUnverified ?? false;
1368
+ const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey);
1369
+ const baseKey = anyPublicKey.publicKey;
1370
+ const variant = anyPublicKeyVariantToString(anyPublicKey.variant);
1371
+
1372
+ const whereCondition: any = {
1373
+ public_key: { _eq: baseKey.toString() },
1374
+ public_key_type: { _eq: variant },
1375
+ ...(includeUnverified ? {} : { is_public_key_used: { _eq: true } }),
1376
+ };
1377
+
1378
+ const graphqlQuery = {
1379
+ query: GetAuthKeysForPublicKey,
1380
+ variables: {
1381
+ where_condition: whereCondition,
1382
+ },
1383
+ };
1384
+
1385
+ const { public_key_auth_keys: data } = await queryIndexer<GetAuthKeysForPublicKeyQuery>({
1386
+ aptosConfig,
1387
+ query: graphqlQuery,
1388
+ originMethod: "getMultiKeysForPublicKey",
1389
+ });
1390
+
1391
+ const authKeys = data.map((entry) => {
1392
+ switch (entry.signature_type) {
1393
+ case "multi_ed25519_signature":
1394
+ return MultiEd25519PublicKey.deserializeWithoutLength(Deserializer.fromHex(entry.account_public_key!));
1395
+ case "multi_key_signature":
1396
+ return MultiKey.deserialize(Deserializer.fromHex(entry.account_public_key!));
1397
+ default:
1398
+ throw new Error(`Unknown multi-signature type: ${entry.signature_type}`);
1399
+ }
1400
+ });
1401
+ return authKeys;
1402
+ }
1403
+
1404
+ /**
1405
+ * Gets the account addresses for the given authentication keys.
1406
+ *
1407
+ * This function retrieves the account addresses that are associated with the provided authentication keys.
1408
+ * It performs the following steps:
1409
+ * 1. Constructs a where condition for the authentication keys where auth key matches any of the provided auth keys.
1410
+ * 2. Queries the indexer for the account addresses and gets the results ordered by the last transaction version (most recent first).
1411
+ * 3. Returns the account addresses.
1412
+ *
1413
+ * @param args.aptosConfig - The configuration settings for the Aptos network.
1414
+ * @param args.authKeys - The authentication keys to get the account addresses for.
1415
+ * @param args.options.includeUnverified - Whether to include unverified accounts in the results. Unverified accounts
1416
+ * are accounts that can be authenticated with the signer, but there is no history of the signer using the account.
1417
+ * Default is false.
1418
+ * @returns The account addresses associated with the given authentication keys.
1419
+ */
1420
+ async function getAccountAddressesForAuthKeys(args: {
1421
+ aptosConfig: AptosConfig;
1422
+ authKeys: AuthenticationKey[];
1423
+ options?: { includeUnverified?: boolean };
1424
+ }): Promise<{ authKey: AuthenticationKey; accountAddress: AccountAddress; lastTransactionVersion: number }[]> {
1425
+ const { aptosConfig, authKeys, options } = args;
1426
+ const includeUnverified = options?.includeUnverified ?? false;
1427
+ if (authKeys.length === 0) {
1428
+ throw new Error("No authentication keys provided");
1429
+ }
1430
+ const whereCondition: any = {
1431
+ auth_key: { _in: authKeys.map((authKey) => authKey.toString()) },
1432
+ ...(includeUnverified ? {} : { is_auth_key_used: { _eq: true } }),
1433
+ };
1434
+
1435
+ const graphqlQuery = {
1436
+ query: GetAccountAddressesForAuthKey,
1437
+ variables: {
1438
+ where_condition: whereCondition,
1439
+ order_by: [{ last_transaction_version: "desc" }],
1440
+ },
1441
+ };
1442
+ const { auth_key_account_addresses: data } = await queryIndexer<GetAccountAddressesForAuthKeyQuery>({
1443
+ aptosConfig,
1444
+ query: graphqlQuery,
1445
+ originMethod: "getAccountAddressesForAuthKeys",
1446
+ });
1447
+ return data.map((entry) => ({
1448
+ authKey: new AuthenticationKey({ data: entry.auth_key }),
1449
+ accountAddress: new AccountAddress(Hex.hexInputToUint8Array(entry.account_address)),
1450
+ lastTransactionVersion: Number(entry.last_transaction_version),
1451
+ }));
1452
+ }
1453
+
1454
+ /**
1455
+ * Returns the last transaction version that was signed by an account.
1456
+ *
1457
+ * If an account was created but has not signed any transactions, the last transaction version will be 0.
1458
+ *
1459
+ * @param args.aptosConfig - The configuration settings for the Aptos network.
1460
+ * @param args.accountAddress - The account address to get the latest transaction version for.
1461
+ * @returns The last transaction version that was signed by the account.
1462
+ */
1463
+ async function getLatestTransactionVersionForAddress(args: {
1464
+ aptosConfig: AptosConfig;
1465
+ accountAddress: AccountAddressInput;
1466
+ }): Promise<number> {
1467
+ const { aptosConfig, accountAddress } = args;
1468
+ const transactions = await getTransactions({ aptosConfig, accountAddress, options: { limit: 1 } });
1469
+ if (transactions.length === 0) {
1470
+ return 0;
1471
+ }
1472
+ return Number(transactions[0].version);
1473
+ }
1474
+
1475
+ /**
1476
+ * Gets the default account info for a given public key. 'Default account' means the account
1477
+ * is address is the same as the auth key derived from the public key and the account auth key has
1478
+ * not been rotated.
1479
+ *
1480
+ * @param args - The arguments for getting the default account info for a given public key.
1481
+ * @param args.aptosConfig - The configuration settings for the Aptos network.
1482
+ * @param args.publicKey - The public key to use to derive the address.
1483
+ * @returns An object containing the account address and the last transaction version, or undefined if the account does not exist.
1484
+ */
1485
+ async function getDefaultAccountInfoForPublicKey(args: {
1486
+ aptosConfig: AptosConfig;
1487
+ publicKey: AccountPublicKey;
1488
+ }): Promise<{ accountAddress: AccountAddress; lastTransactionVersion: number } | undefined> {
1489
+ const { aptosConfig, publicKey } = args;
1490
+ const derivedAddress = publicKey.authKey().derivedAddress();
1491
+
1492
+ const [lastTransactionVersion, exists] = await Promise.all([
1493
+ getLatestTransactionVersionForAddress({
1494
+ aptosConfig,
1495
+ accountAddress: derivedAddress,
1496
+ }),
1497
+ doesAccountExistAtAddress({
1498
+ aptosConfig,
1499
+ accountAddress: derivedAddress,
1500
+ options: { withAuthKey: publicKey.authKey() },
1501
+ }),
1502
+ ]);
1503
+ if (exists) {
1504
+ return { accountAddress: derivedAddress, lastTransactionVersion };
1505
+ }
1506
+ return undefined;
1507
+ }