@aptos-labs/ts-sdk 1.39.0 → 2.0.0-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.
- package/dist/common/{accountAddress-D0xKX-UM.d.ts → accountAddress-B3Y4WI-E.d.ts} +47 -11
- package/dist/common/chunk-BNN2XWNR.js +4 -0
- package/dist/common/chunk-BNN2XWNR.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +121 -110
- package/dist/common/index.js +53 -32
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-D9XrCLfE.d.mts → Ed25519Account-D2MdV8Av.d.mts} +2 -2
- package/dist/esm/account/AbstractKeylessAccount.d.mts +2 -3
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.d.mts +1 -2
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +1 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.d.mts +2 -3
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +1 -2
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +1 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +0 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +3 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +1 -2
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +2 -3
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +1 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +2 -3
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.d.mts +0 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/api/account/abstraction.d.mts +0 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.d.mts +97 -7
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +1 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +7 -8
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +0 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +0 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +1 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +0 -1
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +0 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +1 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +0 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +7 -8
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +2 -3
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +0 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +0 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +0 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +2 -3
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +0 -66
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +1 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +1 -2
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +0 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +0 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +0 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +0 -1
- package/dist/esm/bcs/deserializer.d.mts +0 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.d.mts +0 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +0 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +0 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -2
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +0 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +0 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-ARNW34PP.mjs → chunk-2DYSBAZ7.mjs} +2 -2
- package/dist/esm/{chunk-3IHKQH5O.mjs → chunk-34R7FSQF.mjs} +2 -2
- package/dist/esm/{chunk-XF6BISPI.mjs → chunk-3BUKTQDX.mjs} +2 -2
- package/dist/esm/chunk-3FEFJIVT.mjs +2 -0
- package/dist/esm/chunk-3FEFJIVT.mjs.map +1 -0
- package/dist/esm/{chunk-KAYKTT4S.mjs → chunk-4F5EECVQ.mjs} +2 -2
- package/dist/esm/chunk-4YLUM62M.mjs +2 -0
- package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
- package/dist/esm/{chunk-25O4L7YR.mjs → chunk-6UZHMEK3.mjs} +2 -2
- package/dist/esm/{chunk-6Y6ZO7TS.mjs → chunk-6WDVDEQZ.mjs} +2 -2
- package/dist/esm/{chunk-YFFDF22R.mjs → chunk-7DQDJ2SA.mjs} +2 -2
- package/dist/esm/{chunk-ZMT2M6YT.mjs → chunk-B563XRSZ.mjs} +2 -2
- package/dist/esm/{chunk-V7U5Y4AU.mjs → chunk-CO67Y6YE.mjs} +2 -2
- package/dist/esm/{chunk-V7U5Y4AU.mjs.map → chunk-CO67Y6YE.mjs.map} +1 -1
- package/dist/esm/{chunk-WTLQD6MR.mjs → chunk-CQJLK4WE.mjs} +2 -2
- package/dist/esm/{chunk-NJN3EAOM.mjs → chunk-EBMEXURY.mjs} +2 -2
- package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
- package/dist/esm/chunk-FD6FGKYY.mjs.map +1 -0
- package/dist/esm/{chunk-6PKBXYG3.mjs → chunk-FGFLPH5K.mjs} +2 -2
- package/dist/esm/{chunk-GLFZJNF3.mjs → chunk-GPNNEHW4.mjs} +2 -2
- package/dist/esm/chunk-GRPSFJ3N.mjs +4 -0
- package/dist/esm/chunk-GRPSFJ3N.mjs.map +1 -0
- package/dist/esm/chunk-HLF3U7IS.mjs +2 -0
- package/dist/esm/{chunk-L33JDCWL.mjs.map → chunk-HLF3U7IS.mjs.map} +1 -1
- package/dist/esm/{chunk-BUUV6B4P.mjs → chunk-HNBVYE3N.mjs} +2 -2
- package/dist/esm/{chunk-GJ7STZEW.mjs → chunk-HW7TSJI2.mjs} +2 -2
- package/dist/esm/chunk-JCFTAG5Z.mjs +2 -0
- package/dist/esm/{chunk-RJ7F4JDV.mjs.map → chunk-JCFTAG5Z.mjs.map} +1 -1
- package/dist/esm/{chunk-WLUXOUZH.mjs → chunk-MT2RJ7H3.mjs} +2 -2
- package/dist/esm/{chunk-SOJ3OG6X.mjs → chunk-N4VVDQA5.mjs} +2 -2
- package/dist/esm/{chunk-PRUQZNAP.mjs → chunk-N6YTF76Q.mjs} +2 -2
- package/dist/esm/{chunk-C6JRJNK3.mjs → chunk-ORMOQWWH.mjs} +2 -2
- package/dist/esm/{chunk-GYVSI3TS.mjs → chunk-RGKRCZ36.mjs} +2 -2
- package/dist/esm/{chunk-FBCXUC7J.mjs → chunk-RQX6JOEN.mjs} +2 -2
- package/dist/esm/{chunk-BXRBOMHW.mjs → chunk-SVMCNLFC.mjs} +2 -2
- package/dist/esm/{chunk-GQ557FEA.mjs → chunk-TDGLYA35.mjs} +2 -2
- package/dist/esm/{chunk-IXYGZ57N.mjs → chunk-TOBQ5UE6.mjs} +2 -2
- package/dist/esm/{chunk-VHNX2NUR.mjs → chunk-UL777LTI.mjs} +47 -26
- package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
- package/dist/esm/{chunk-YQIAWAPY.mjs → chunk-UQWF24SS.mjs} +2 -2
- package/dist/esm/{chunk-YQIAWAPY.mjs.map → chunk-UQWF24SS.mjs.map} +1 -1
- package/dist/esm/{chunk-P237G6YB.mjs → chunk-V7NWNNBI.mjs} +2 -2
- package/dist/esm/{chunk-Z6KQX6VX.mjs → chunk-WCMW2L3P.mjs} +2 -2
- package/dist/esm/{chunk-BYINW7I2.mjs → chunk-WSR5EBJM.mjs} +2 -2
- package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
- package/dist/esm/{chunk-OYH2T6V5.mjs → chunk-XKUIMGKU.mjs} +2 -2
- package/dist/esm/chunk-XTMUMN74.mjs +2 -0
- package/dist/esm/chunk-XTMUMN74.mjs.map +1 -0
- package/dist/esm/{chunk-JGFKIUG5.mjs → chunk-XTOIL6MB.mjs} +2 -2
- package/dist/esm/{chunk-JGFKIUG5.mjs.map → chunk-XTOIL6MB.mjs.map} +1 -1
- package/dist/esm/cli/index.d.mts +0 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +0 -1
- package/dist/esm/client/core.d.mts +0 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +0 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +0 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +0 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +0 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +0 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +0 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +0 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +0 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.d.mts +0 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -2
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +0 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +1 -2
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +2 -2
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +1 -2
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +10 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +2 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +0 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +0 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +0 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -2
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +0 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +0 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/types.d.mts +25 -0
- package/dist/esm/core/crypto/types.mjs +2 -0
- package/dist/esm/core/crypto/types.mjs.map +1 -0
- package/dist/esm/core/crypto/utils.d.mts +0 -1
- package/dist/esm/core/hex.d.mts +0 -1
- package/dist/esm/core/index.d.mts +2 -2
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +0 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/{federatedKeyless-DAYXjY2Y.d.mts → federatedKeyless-BelAZrlM.d.mts} +2 -2
- package/dist/esm/index.d.mts +7 -8
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.d.mts +0 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.d.mts +43 -15
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +2 -3
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +0 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +0 -1
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +0 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +1 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +0 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +11 -3
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +0 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +0 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +0 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +0 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +1 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/utils/index.d.mts +0 -1
- package/dist/esm/internal/utils/index.mjs +1 -1
- package/dist/esm/internal/utils/utils.d.mts +0 -1
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/view.d.mts +0 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +0 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +0 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +0 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +2 -4
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +0 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +0 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.d.mts +0 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +0 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +0 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +0 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +0 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -2
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +1 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +1 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +0 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -2
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -13
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -3
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +0 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +0 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +2 -11
- package/dist/esm/types/generated/operations.d.mts +37 -10
- package/dist/esm/types/generated/queries.d.mts +6 -2
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +584 -1172
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +2 -3
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +8 -2
- package/dist/esm/types/types.d.mts +25 -4
- package/dist/esm/types/types.mjs +1 -1
- package/dist/esm/utils/const.d.mts +1 -0
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +0 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +0 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +0 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +3 -4
- package/src/account/FederatedKeylessAccount.ts +7 -1
- package/src/account/KeylessAccount.ts +17 -2
- package/src/api/account.ts +122 -2
- package/src/api/aptosConfig.ts +9 -0
- package/src/api/transaction.ts +1 -0
- package/src/api/transactionSubmission/build.ts +2 -85
- package/src/core/crypto/ed25519.ts +1 -1
- package/src/core/crypto/index.ts +1 -0
- package/src/core/crypto/multiEd25519.ts +26 -0
- package/src/core/crypto/multiKey.ts +6 -0
- package/src/core/crypto/secp256k1.ts +1 -1
- package/src/core/crypto/types.ts +9 -0
- package/src/internal/account.ts +523 -53
- package/src/internal/keyless.ts +10 -0
- package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
- package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
- package/src/transactions/index.ts +0 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +1 -26
- package/src/transactions/types.ts +0 -11
- package/src/types/codegen.yaml +1 -1
- package/src/types/generated/operations.ts +39 -8
- package/src/types/generated/queries.ts +53 -0
- package/src/types/generated/types.ts +620 -1239
- package/src/types/index.ts +0 -1
- package/src/types/indexer.ts +8 -0
- package/src/types/types.ts +40 -3
- package/src/utils/const.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-66TIRJFD.js +0 -4
- package/dist/common/chunk-66TIRJFD.js.map +0 -1
- package/dist/esm/chunk-3OLFJ65O.mjs +0 -2
- package/dist/esm/chunk-3OLFJ65O.mjs.map +0 -1
- package/dist/esm/chunk-F2ZTBAJJ.mjs +0 -2
- package/dist/esm/chunk-F2ZTBAJJ.mjs.map +0 -1
- package/dist/esm/chunk-L33JDCWL.mjs +0 -2
- package/dist/esm/chunk-ODAAZLPK.mjs +0 -2
- package/dist/esm/chunk-ODAAZLPK.mjs.map +0 -1
- package/dist/esm/chunk-OYUW6ZN2.mjs +0 -2
- package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
- package/dist/esm/chunk-TAEOFYOF.mjs +0 -4
- package/dist/esm/chunk-TAEOFYOF.mjs.map +0 -1
- package/dist/esm/chunk-TUZHLTDU.mjs +0 -2
- package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
- package/dist/esm/transactions/scriptComposer/index.d.mts +0 -53
- package/dist/esm/transactions/scriptComposer/index.mjs +0 -2
- package/src/transactions/scriptComposer/index.ts +0 -102
- /package/dist/esm/{chunk-ARNW34PP.mjs.map → chunk-2DYSBAZ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-3IHKQH5O.mjs.map → chunk-34R7FSQF.mjs.map} +0 -0
- /package/dist/esm/{chunk-XF6BISPI.mjs.map → chunk-3BUKTQDX.mjs.map} +0 -0
- /package/dist/esm/{chunk-KAYKTT4S.mjs.map → chunk-4F5EECVQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-TUZHLTDU.mjs.map → chunk-4YLUM62M.mjs.map} +0 -0
- /package/dist/esm/{transactions/scriptComposer/index.mjs.map → chunk-5HXLZHDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-25O4L7YR.mjs.map → chunk-6UZHMEK3.mjs.map} +0 -0
- /package/dist/esm/{chunk-6Y6ZO7TS.mjs.map → chunk-6WDVDEQZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YFFDF22R.mjs.map → chunk-7DQDJ2SA.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZMT2M6YT.mjs.map → chunk-B563XRSZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-WTLQD6MR.mjs.map → chunk-CQJLK4WE.mjs.map} +0 -0
- /package/dist/esm/{chunk-NJN3EAOM.mjs.map → chunk-EBMEXURY.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PKBXYG3.mjs.map → chunk-FGFLPH5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-GLFZJNF3.mjs.map → chunk-GPNNEHW4.mjs.map} +0 -0
- /package/dist/esm/{chunk-BUUV6B4P.mjs.map → chunk-HNBVYE3N.mjs.map} +0 -0
- /package/dist/esm/{chunk-GJ7STZEW.mjs.map → chunk-HW7TSJI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-WLUXOUZH.mjs.map → chunk-MT2RJ7H3.mjs.map} +0 -0
- /package/dist/esm/{chunk-SOJ3OG6X.mjs.map → chunk-N4VVDQA5.mjs.map} +0 -0
- /package/dist/esm/{chunk-PRUQZNAP.mjs.map → chunk-N6YTF76Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-C6JRJNK3.mjs.map → chunk-ORMOQWWH.mjs.map} +0 -0
- /package/dist/esm/{chunk-GYVSI3TS.mjs.map → chunk-RGKRCZ36.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBCXUC7J.mjs.map → chunk-RQX6JOEN.mjs.map} +0 -0
- /package/dist/esm/{chunk-BXRBOMHW.mjs.map → chunk-SVMCNLFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-GQ557FEA.mjs.map → chunk-TDGLYA35.mjs.map} +0 -0
- /package/dist/esm/{chunk-IXYGZ57N.mjs.map → chunk-TOBQ5UE6.mjs.map} +0 -0
- /package/dist/esm/{chunk-P237G6YB.mjs.map → chunk-V7NWNNBI.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z6KQX6VX.mjs.map → chunk-WCMW2L3P.mjs.map} +0 -0
- /package/dist/esm/{chunk-BYINW7I2.mjs.map → chunk-WSR5EBJM.mjs.map} +0 -0
- /package/dist/esm/{chunk-OYUW6ZN2.mjs.map → chunk-XJJVJOX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-OYH2T6V5.mjs.map → chunk-XKUIMGKU.mjs.map} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard } from './indexer.mjs';
|
|
2
|
-
export { AccountAuthenticatorVariant, AccountData, AccountSignature, AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, AptosRequest, AptosResponse, AptosSettings, AuthenticationKeyScheme, Block, BlockEndInfo, BlockEpilogueTransactionResponse, BlockMetadataTransactionResponse, Client, ClientConfig, ClientHeadersType, ClientRequest, ClientResponse, CommittedTransactionResponse, CursorPaginationArgs, DecodedTableData, DeletedTableData, DeriveScheme, DirectWriteSet, EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, Event, EventGuid, FaucetConfig, FullNodeConfig, GasEstimation, GenerateAccount, GenerateAccountWithEd25519, GenerateAccountWithSingleSignerSecp256k1Key, GenesisPayload, GenesisTransactionResponse, HexInput, IndexerConfig, LedgerInfo, LedgerVersionArg, MimeType, MoveAbility, MoveAddressType, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveObjectType, MoveOptionType, MoveResource, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructId, MoveStructType, MoveType, MoveUint128Type, MoveUint16Type, MoveUint256Type, MoveUint32Type, MoveUint64Type, MoveUint8Type, MoveValue, MultisigPayloadResponse, OrderByArg, PaginationArgs, PendingTransactionResponse, PrivateKeyVariants, RoleType, ScriptPayloadResponse, ScriptTransactionArgumentVariants, ScriptWriteSet, SigningScheme, SigningSchemeInput, StateCheckpointTransactionResponse, TableItemRequest, TokenStandardArg, TransactionAuthenticatorVariant, TransactionEd25519Signature, TransactionFeePayerSignature, TransactionMultiAgentSignature, TransactionMultiEd25519Signature, TransactionPayloadResponse, TransactionPayloadVariants, TransactionResponse, TransactionResponseType, TransactionSecp256k1Signature, TransactionSignature, TransactionVariants, TypeTagVariants, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8, UserTransactionResponse, ValidatorTransactionResponse, WaitForTransactionOptions, WhereArg, WriteSet, WriteSetChange, WriteSetChangeDeleteModule, WriteSetChangeDeleteResource, WriteSetChangeDeleteTableItem, WriteSetChangeWriteModule, WriteSetChangeWriteResource, WriteSetChangeWriteTableItem, ZkpVariant, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse } from './types.mjs';
|
|
3
|
-
export { CallArgument } from '@aptos-labs/script-composer-pack';
|
|
1
|
+
export { GetANSNameResponse, GetAccountAddressesForAuthKeyResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard } from './indexer.mjs';
|
|
2
|
+
export { AccountAuthenticatorVariant, AccountData, AccountSignature, AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, AptosRequest, AptosResponse, AptosSettings, AuthenticationKeyScheme, Block, BlockEndInfo, BlockEpilogueTransactionResponse, BlockMetadataTransactionResponse, Client, ClientConfig, ClientHeadersType, ClientRequest, ClientResponse, CommittedTransactionResponse, CursorPaginationArgs, DecodedTableData, DeletedTableData, DeriveScheme, DirectWriteSet, EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, Event, EventGuid, FaucetConfig, FullNodeConfig, GasEstimation, GenerateAccount, GenerateAccountWithEd25519, GenerateAccountWithSingleSignerSecp256k1Key, GenesisPayload, GenesisTransactionResponse, HexInput, IndexerConfig, LedgerInfo, LedgerVersionArg, MimeType, MoveAbility, MoveAddressType, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveFunctionVisibility, MoveModule, MoveModuleBytecode, MoveModuleId, MoveObjectType, MoveOptionType, MoveResource, MoveScriptBytecode, MoveStruct, MoveStructField, MoveStructId, MoveStructType, MoveType, MoveUint128Type, MoveUint16Type, MoveUint256Type, MoveUint32Type, MoveUint64Type, MoveUint8Type, MoveValue, MultisigPayloadResponse, OrderByArg, PaginationArgs, PendingTransactionResponse, PrivateKeyVariants, RoleType, ScriptPayloadResponse, ScriptTransactionArgumentVariants, ScriptWriteSet, SigningScheme, SigningSchemeInput, StateCheckpointTransactionResponse, TableItemRequest, TokenStandardArg, TransactionAuthenticatorVariant, TransactionEd25519Signature, TransactionFeePayerSignature, TransactionMultiAgentSignature, TransactionMultiEd25519Signature, TransactionPayloadResponse, TransactionPayloadVariants, TransactionResponse, TransactionResponseType, TransactionSecp256k1Signature, TransactionSignature, TransactionSingleSenderSignature, TransactionVariants, TypeTagVariants, Uint128, Uint16, Uint256, Uint32, Uint64, Uint8, UserTransactionResponse, ValidatorTransactionResponse, WaitForTransactionOptions, WhereArg, WriteSet, WriteSetChange, WriteSetChangeDeleteModule, WriteSetChangeDeleteResource, WriteSetChangeDeleteTableItem, WriteSetChangeWriteModule, WriteSetChangeWriteResource, WriteSetChangeWriteTableItem, ZkpVariant, anyPublicKeyVariantToString, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isSingleSenderSignature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse } from './types.mjs';
|
|
4
3
|
import './generated/operations.mjs';
|
|
5
4
|
import './generated/types.mjs';
|
|
6
5
|
import '../utils/apiEndpoints.mjs';
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../chunk-FD6FGKYY.mjs";import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-3FEFJIVT.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,k as AnySignatureVariant,I as DeriveScheme,n as EphemeralCertificateVariant,l as EphemeralPublicKeyVariant,m as EphemeralSignatureVariant,a as MimeType,E as MoveAbility,D as MoveFunctionVisibility,h as PrivateKeyVariants,F as RoleType,c as ScriptTransactionArgumentVariants,G as SigningScheme,H as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,p as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,o as ZkpVariant,j as anyPublicKeyVariantToString,w as isBlockEpilogueTransactionResponse,t as isBlockMetadataTransactionResponse,x as isEd25519Signature,A as isFeePayerSignature,s as isGenesisTransactionResponse,z as isMultiAgentSignature,B as isMultiEd25519Signature,q as isPendingTransactionResponse,y as isSecp256k1Signature,C as isSingleSenderSignature,u as isStateCheckpointTransactionResponse,r as isUserTransactionResponse,v as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAccountOwnedTokensQuery, GetAccountOwnedTokensFromCollectionQuery, GetAccountCollectionsWithOwnedTokensQuery, GetAccountCoinsDataQuery,
|
|
1
|
+
import { GetObjectDataQuery, GetAccountOwnedTokensQuery, GetAccountOwnedTokensFromCollectionQuery, GetAccountCollectionsWithOwnedTokensQuery, GetAccountCoinsDataQuery, GetAccountAddressesForAuthKeyQuery, GetChainTopUserTransactionsQuery, GetEventsQuery, GetNumberOfDelegatorsQuery, GetDelegatedStakingActivitiesQuery, GetCollectionDataQuery, GetTokenDataQuery, GetProcessorStatusQuery, GetFungibleAssetMetadataQuery, GetFungibleAssetActivitiesQuery, GetCurrentFungibleAssetBalancesQuery, GetTokenActivityQuery, GetCurrentTokenOwnershipQuery, GetTableItemsDataQuery, GetTableItemsMetadataQuery, GetNamesQuery } from './generated/operations.mjs';
|
|
2
2
|
import './generated/types.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -50,6 +50,12 @@ type GetAccountCollectionsWithOwnedTokenResponse = GetAccountCollectionsWithOwne
|
|
|
50
50
|
* @category Types
|
|
51
51
|
*/
|
|
52
52
|
type GetAccountCoinsDataResponse = GetAccountCoinsDataQuery["current_fungible_asset_balances"];
|
|
53
|
+
/**
|
|
54
|
+
* The account addresses for an authentication key.
|
|
55
|
+
* @group Implementation
|
|
56
|
+
* @category Types
|
|
57
|
+
*/
|
|
58
|
+
type GetAccountAddressesForAuthKeyResponse = GetAccountAddressesForAuthKeyQuery["auth_key_account_addresses"];
|
|
53
59
|
/**
|
|
54
60
|
* The response structure for retrieving user transactions from the top of the blockchain.
|
|
55
61
|
* @group Implementation
|
|
@@ -177,4 +183,4 @@ type GraphqlQuery = {
|
|
|
177
183
|
variables?: {};
|
|
178
184
|
};
|
|
179
185
|
|
|
180
|
-
export type { GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard };
|
|
186
|
+
export type { GetANSNameResponse, GetAccountAddressesForAuthKeyResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TokenStandard, OrderBy } from './indexer.mjs';
|
|
2
2
|
import { Network } from '../utils/apiEndpoints.mjs';
|
|
3
|
-
import '@aptos-labs/script-composer-pack';
|
|
4
3
|
import './generated/operations.mjs';
|
|
5
4
|
import './generated/types.mjs';
|
|
6
5
|
|
|
@@ -118,6 +117,7 @@ declare enum AnyPublicKeyVariant {
|
|
|
118
117
|
Keyless = 3,
|
|
119
118
|
FederatedKeyless = 4
|
|
120
119
|
}
|
|
120
|
+
declare function anyPublicKeyVariantToString(variant: AnyPublicKeyVariant): string;
|
|
121
121
|
/**
|
|
122
122
|
* Variants of signature types used for cryptographic operations.
|
|
123
123
|
*/
|
|
@@ -833,7 +833,7 @@ type MoveScriptBytecode = {
|
|
|
833
833
|
/**
|
|
834
834
|
* JSON representations of transaction signatures returned from the node API.
|
|
835
835
|
*/
|
|
836
|
-
type TransactionSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature | TransactionMultiAgentSignature | TransactionFeePayerSignature;
|
|
836
|
+
type TransactionSignature = TransactionEd25519Signature | TransactionSecp256k1Signature | TransactionMultiEd25519Signature | TransactionMultiAgentSignature | TransactionFeePayerSignature | TransactionSingleSenderSignature;
|
|
837
837
|
/**
|
|
838
838
|
* Determine if the provided signature is an Ed25519 signature.
|
|
839
839
|
* This function checks for the presence of the "signature" property
|
|
@@ -842,7 +842,7 @@ type TransactionSignature = TransactionEd25519Signature | TransactionSecp256k1Si
|
|
|
842
842
|
* @param signature - The transaction signature to be checked.
|
|
843
843
|
* @returns A boolean indicating whether the signature is an Ed25519 signature.
|
|
844
844
|
*/
|
|
845
|
-
declare function isEd25519Signature(signature: TransactionSignature): signature is
|
|
845
|
+
declare function isEd25519Signature(signature: TransactionSignature): signature is TransactionEd25519Signature;
|
|
846
846
|
/**
|
|
847
847
|
* Determine if the provided signature is a valid secp256k1 ECDSA signature.
|
|
848
848
|
*
|
|
@@ -871,6 +871,13 @@ declare function isFeePayerSignature(signature: TransactionSignature): signature
|
|
|
871
871
|
* @returns A boolean indicating whether the signature is a multi-ed25519 signature.
|
|
872
872
|
*/
|
|
873
873
|
declare function isMultiEd25519Signature(signature: TransactionSignature): signature is TransactionMultiEd25519Signature;
|
|
874
|
+
/**
|
|
875
|
+
* Determine if the provided signature is of type "single_sender".
|
|
876
|
+
*
|
|
877
|
+
* @param signature - The transaction signature to check.
|
|
878
|
+
* @returns A boolean indicating whether the signature is a single-sender signature.
|
|
879
|
+
*/
|
|
880
|
+
declare function isSingleSenderSignature(signature: TransactionSignature): signature is TransactionSingleSenderSignature;
|
|
874
881
|
/**
|
|
875
882
|
* The signature for a transaction using the Ed25519 algorithm.
|
|
876
883
|
*/
|
|
@@ -887,6 +894,20 @@ type TransactionSecp256k1Signature = {
|
|
|
887
894
|
public_key: string;
|
|
888
895
|
signature: "secp256k1_ecdsa_signature";
|
|
889
896
|
};
|
|
897
|
+
/**
|
|
898
|
+
* The structure for a multi-signature transaction using Ed25519.
|
|
899
|
+
*/
|
|
900
|
+
type TransactionSingleSenderSignature = {
|
|
901
|
+
type: "single_sender";
|
|
902
|
+
public_key: {
|
|
903
|
+
value: string;
|
|
904
|
+
type: string;
|
|
905
|
+
};
|
|
906
|
+
signature: {
|
|
907
|
+
value: string;
|
|
908
|
+
type: string;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
890
911
|
/**
|
|
891
912
|
* The structure for a multi-signature transaction using Ed25519.
|
|
892
913
|
*/
|
|
@@ -1298,4 +1319,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
|
|
|
1298
1319
|
};
|
|
1299
1320
|
type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
|
|
1300
1321
|
|
|
1301
|
-
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosResponse, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockEndInfo, type BlockEpilogueTransactionResponse, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CursorPaginationArgs, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, PrivateKeyVariants, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, ZkpVariant, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
|
|
1322
|
+
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosResponse, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockEndInfo, type BlockEpilogueTransactionResponse, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientHeadersType, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type CursorPaginationArgs, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, EphemeralCertificateVariant, EphemeralPublicKeyVariant, EphemeralSignatureVariant, type Event, type EventGuid, type FaucetConfig, type FullNodeConfig, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type IndexerConfig, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, PrivateKeyVariants, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, type TransactionSingleSenderSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, ZkpVariant, anyPublicKeyVariantToString, isBlockEpilogueTransactionResponse, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isSingleSenderSignature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
|
package/dist/esm/types/types.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-3FEFJIVT.mjs";import"../chunk-KDMSOCZY.mjs";export{g as AccountAuthenticatorVariant,i as AnyPublicKeyVariant,k as AnySignatureVariant,I as DeriveScheme,n as EphemeralCertificateVariant,l as EphemeralPublicKeyVariant,m as EphemeralSignatureVariant,a as MimeType,E as MoveAbility,D as MoveFunctionVisibility,h as PrivateKeyVariants,F as RoleType,c as ScriptTransactionArgumentVariants,G as SigningScheme,H as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,p as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,o as ZkpVariant,j as anyPublicKeyVariantToString,w as isBlockEpilogueTransactionResponse,t as isBlockMetadataTransactionResponse,x as isEd25519Signature,A as isFeePayerSignature,s as isGenesisTransactionResponse,z as isMultiAgentSignature,B as isMultiEd25519Signature,q as isPendingTransactionResponse,y as isSecp256k1Signature,C as isSingleSenderSignature,u as isStateCheckpointTransactionResponse,r as isUserTransactionResponse,v as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -69,6 +69,7 @@ declare const RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData";
|
|
|
69
69
|
* @category Utils
|
|
70
70
|
*/
|
|
71
71
|
declare enum ProcessorType {
|
|
72
|
+
ACCOUNT_RESTORATION_PROCESSOR = "account_restoration_processor",
|
|
72
73
|
ACCOUNT_TRANSACTION_PROCESSOR = "account_transactions_processor",
|
|
73
74
|
DEFAULT = "default_processor",
|
|
74
75
|
EVENTS_PROCESSOR = "events_processor",
|
package/dist/esm/utils/const.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-JCFTAG5Z.mjs";import"../chunk-KDMSOCZY.mjs";export{e as APTOS_COIN,f as APTOS_FA,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,c as DEFAULT_TXN_EXP_SEC_FROM_NOW,d as DEFAULT_TXN_TIMEOUT_SEC,j as FIREBASE_AUTH_ISS_PATTERN,i as ProcessorType,g as RAW_TRANSACTION_SALT,h as RAW_TRANSACTION_WITH_DATA_SALT};
|
|
2
2
|
//# sourceMappingURL=const.mjs.map
|
|
@@ -4,7 +4,6 @@ import '../types/indexer.mjs';
|
|
|
4
4
|
import '../types/generated/operations.mjs';
|
|
5
5
|
import '../types/generated/types.mjs';
|
|
6
6
|
import './apiEndpoints.mjs';
|
|
7
|
-
import '@aptos-labs/script-composer-pack';
|
|
8
7
|
import '../bcs/serializer.mjs';
|
|
9
8
|
import '../core/hex.mjs';
|
|
10
9
|
import '../core/common.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-3FEFJIVT.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{e as base64UrlDecode,f as base64UrlToBytes,g as convertAmountFromHumanReadableToOnChain,h as convertAmountFromOnChainToHumanReadable,d as floorToWholeHour,b as getErrorMessage,k as getFunctionParts,j as isEncodedStruct,l as isValidFunctionInfo,c as nowInSeconds,n as pairedFaMetadataAddress,i as parseEncodedStruct,a as sleep,m as truncateAddress};
|
|
2
2
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -7,7 +7,6 @@ import '../types/types.mjs';
|
|
|
7
7
|
import '../types/indexer.mjs';
|
|
8
8
|
import '../types/generated/operations.mjs';
|
|
9
9
|
import '../types/generated/types.mjs';
|
|
10
|
-
import '@aptos-labs/script-composer-pack';
|
|
11
10
|
import '../bcs/serializer.mjs';
|
|
12
11
|
import '../core/hex.mjs';
|
|
13
12
|
import '../core/common.mjs';
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-HGLO5LDS.mjs";import{a as s}from"../chunk-
|
|
1
|
+
import"../chunk-HGLO5LDS.mjs";import{a as s}from"../chunk-4YLUM62M.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-N4VVDQA5.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-XTOIL6MB.mjs";import{a as t,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G}from"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-3FEFJIVT.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import{a,b,c,d,e,f,g,h}from"../chunk-4RXKALLC.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r}from"../chunk-JCFTAG5Z.mjs";import"../chunk-KDMSOCZY.mjs";export{m as APTOS_COIN,n as APTOS_FA,i as AptosApiType,j as DEFAULT_MAX_GAS_AMOUNT,k as DEFAULT_TXN_EXP_SEC_FROM_NOW,l as DEFAULT_TXN_TIMEOUT_SEC,r as FIREBASE_AUTH_ISS_PATTERN,f as Network,g as NetworkToChainId,c as NetworkToFaucetAPI,a as NetworkToIndexerAPI,h as NetworkToNetworkName,b as NetworkToNodeAPI,d as NetworkToPepperAPI,e as NetworkToProverAPI,q as ProcessorType,o as RAW_TRANSACTION_SALT,p as RAW_TRANSACTION_WITH_DATA_SALT,x as base64UrlDecode,y as base64UrlToBytes,z as convertAmountFromHumanReadableToOnChain,A as convertAmountFromOnChainToHumanReadable,w as floorToWholeHour,u as getErrorMessage,D as getFunctionParts,C as isEncodedStruct,E as isValidFunctionInfo,s as normalizeBundle,v as nowInSeconds,G as pairedFaMetadataAddress,B as parseEncodedStruct,t as sleep,F as truncateAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-4YLUM62M.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-N4VVDQA5.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-XTOIL6MB.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-3FEFJIVT.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=normalizeBundle.mjs.map
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-HLF3U7IS.mjs";import"./chunk-KDMSOCZY.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"_fmt": "prettier 'src/**/*.ts' 'tests/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' 'eslint.config.cjs'",
|
|
40
40
|
"fmt": "pnpm _fmt --write",
|
|
41
41
|
"lint": "eslint '**/*.{cts,mts,ts}'",
|
|
42
|
-
"test": "pnpm jest
|
|
42
|
+
"test": "pnpm jest",
|
|
43
43
|
"unit-test": "pnpm jest tests/unit",
|
|
44
44
|
"e2e-test": "pnpm jest tests/e2e",
|
|
45
45
|
"indexer-codegen": "graphql-codegen --config ./src/types/codegen.yaml && pnpm fmt",
|
|
@@ -51,12 +51,11 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aptos-labs/aptos-cli": "^1.0.2",
|
|
54
|
-
"@aptos-labs/aptos-client": "^
|
|
54
|
+
"@aptos-labs/aptos-client": "^2.0.0",
|
|
55
55
|
"@noble/curves": "^1.6.0",
|
|
56
56
|
"@noble/hashes": "^1.5.0",
|
|
57
57
|
"@scure/bip32": "^1.4.0",
|
|
58
58
|
"@scure/bip39": "^1.3.0",
|
|
59
|
-
"@aptos-labs/script-composer-pack": "^0.0.9",
|
|
60
59
|
"eventemitter3": "^5.0.1",
|
|
61
60
|
"form-data": "^4.0.0",
|
|
62
61
|
"js-base64": "^3.7.7",
|
|
@@ -98,5 +97,5 @@
|
|
|
98
97
|
"typedoc-plugin-missing-exports": "^4.0.0",
|
|
99
98
|
"typescript": "^5.8.2"
|
|
100
99
|
},
|
|
101
|
-
"version": "
|
|
100
|
+
"version": "2.0.0-zeta.0"
|
|
102
101
|
}
|
|
@@ -140,6 +140,7 @@ export class FederatedKeylessAccount extends AbstractKeylessAccount {
|
|
|
140
140
|
uidKey?: string;
|
|
141
141
|
proofFetchCallback?: ProofFetchCallback;
|
|
142
142
|
verificationKey?: Groth16VerificationKey;
|
|
143
|
+
verificationKeyHash?: Uint8Array;
|
|
143
144
|
}): FederatedKeylessAccount {
|
|
144
145
|
const {
|
|
145
146
|
address,
|
|
@@ -151,8 +152,13 @@ export class FederatedKeylessAccount extends AbstractKeylessAccount {
|
|
|
151
152
|
uidKey = "sub",
|
|
152
153
|
proofFetchCallback,
|
|
153
154
|
verificationKey,
|
|
155
|
+
verificationKeyHash,
|
|
154
156
|
} = args;
|
|
155
157
|
|
|
158
|
+
if (verificationKeyHash && verificationKey) {
|
|
159
|
+
throw new Error("Cannot provide both verificationKey and verificationKeyHash");
|
|
160
|
+
}
|
|
161
|
+
|
|
156
162
|
const { iss, aud, uidVal } = getIssAudAndUidVal({ jwt, uidKey });
|
|
157
163
|
return new FederatedKeylessAccount({
|
|
158
164
|
address,
|
|
@@ -166,7 +172,7 @@ export class FederatedKeylessAccount extends AbstractKeylessAccount {
|
|
|
166
172
|
jwkAddress: AccountAddress.from(jwkAddress),
|
|
167
173
|
jwt,
|
|
168
174
|
proofFetchCallback,
|
|
169
|
-
verificationKeyHash: verificationKey ? verificationKey.hash() : undefined,
|
|
175
|
+
verificationKeyHash: verificationKeyHash ?? (verificationKey ? verificationKey.hash() : undefined),
|
|
170
176
|
});
|
|
171
177
|
}
|
|
172
178
|
}
|
|
@@ -143,8 +143,23 @@ export class KeylessAccount extends AbstractKeylessAccount {
|
|
|
143
143
|
uidKey?: string;
|
|
144
144
|
proofFetchCallback?: ProofFetchCallback;
|
|
145
145
|
verificationKey?: Groth16VerificationKey;
|
|
146
|
+
verificationKeyHash?: Uint8Array;
|
|
146
147
|
}): KeylessAccount {
|
|
147
|
-
const {
|
|
148
|
+
const {
|
|
149
|
+
address,
|
|
150
|
+
proof,
|
|
151
|
+
jwt,
|
|
152
|
+
ephemeralKeyPair,
|
|
153
|
+
pepper,
|
|
154
|
+
uidKey = "sub",
|
|
155
|
+
proofFetchCallback,
|
|
156
|
+
verificationKey,
|
|
157
|
+
verificationKeyHash,
|
|
158
|
+
} = args;
|
|
159
|
+
|
|
160
|
+
if (verificationKeyHash && verificationKey) {
|
|
161
|
+
throw new Error("Cannot provide both verificationKey and verificationKeyHash");
|
|
162
|
+
}
|
|
148
163
|
|
|
149
164
|
const { iss, aud, uidVal } = getIssAudAndUidVal({ jwt, uidKey });
|
|
150
165
|
return new KeylessAccount({
|
|
@@ -158,7 +173,7 @@ export class KeylessAccount extends AbstractKeylessAccount {
|
|
|
158
173
|
pepper,
|
|
159
174
|
jwt,
|
|
160
175
|
proofFetchCallback,
|
|
161
|
-
verificationKeyHash: verificationKey ? verificationKey.hash() : undefined,
|
|
176
|
+
verificationKeyHash: verificationKeyHash ?? (verificationKey ? verificationKey.hash() : undefined),
|
|
162
177
|
});
|
|
163
178
|
}
|
|
164
179
|
}
|
package/src/api/account.ts
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { Account as AccountModule } from "../account";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
AccountAddress,
|
|
7
|
+
AccountAddressInput,
|
|
8
|
+
createObjectAddress,
|
|
9
|
+
BaseAccountPublicKey,
|
|
10
|
+
PrivateKeyInput,
|
|
11
|
+
} from "../core";
|
|
6
12
|
import {
|
|
7
13
|
AccountData,
|
|
8
14
|
AnyNumber,
|
|
@@ -31,6 +37,7 @@ import {
|
|
|
31
37
|
getAccountOwnedObjects,
|
|
32
38
|
getAccountOwnedTokens,
|
|
33
39
|
getAccountOwnedTokensFromCollectionAddress,
|
|
40
|
+
getAccountsForPublicKey,
|
|
34
41
|
getAccountTokensCount,
|
|
35
42
|
getAccountTransactionsCount,
|
|
36
43
|
getInfo,
|
|
@@ -42,6 +49,7 @@ import {
|
|
|
42
49
|
getResourcesPage,
|
|
43
50
|
getTransactions,
|
|
44
51
|
lookupOriginalAccountAddress,
|
|
52
|
+
deriveOwnedAccountsFromSigner,
|
|
45
53
|
} from "../internal/account";
|
|
46
54
|
import { APTOS_COIN, APTOS_FA, ProcessorType } from "../utils/const";
|
|
47
55
|
import { AptosConfig } from "./aptosConfig";
|
|
@@ -977,7 +985,119 @@ export class Account {
|
|
|
977
985
|
* @group Account
|
|
978
986
|
* @deprecated Note that more inspection is needed by the user to determine which account exists on-chain
|
|
979
987
|
*/
|
|
980
|
-
async deriveAccountFromPrivateKey(args: {
|
|
988
|
+
async deriveAccountFromPrivateKey(args: {
|
|
989
|
+
privateKey: PrivateKeyInput;
|
|
990
|
+
minimumLedgerVersion?: AnyNumber;
|
|
991
|
+
options?: {
|
|
992
|
+
throwIfNoAccountFound?: boolean;
|
|
993
|
+
};
|
|
994
|
+
}): Promise<AccountModule> {
|
|
995
|
+
await waitForIndexerOnVersion({
|
|
996
|
+
config: this.config,
|
|
997
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
998
|
+
processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,
|
|
999
|
+
});
|
|
981
1000
|
return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });
|
|
982
1001
|
}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Derives all accounts owned by a signer. This function takes a signer (either an Account or PrivateKey)
|
|
1005
|
+
* and returns all accounts that can be derived from it, ordered by the most recently used account first.
|
|
1006
|
+
*
|
|
1007
|
+
* Note, this function will not return accounts that require more than one signer to be used.
|
|
1008
|
+
*
|
|
1009
|
+
* @param args - The arguments for deriving owned accounts
|
|
1010
|
+
* @param args.signer - The signer to derive accounts from (Account or PrivateKey)
|
|
1011
|
+
* @param args.minimumLedgerVersion - The minimum ledger version to wait for before querying
|
|
1012
|
+
* @param args.options.includeUnverified - Whether to include unverified accounts in the results. Unverified accounts
|
|
1013
|
+
* are accounts that can be authenticated with the signer, but there is no history of the signer using the account.
|
|
1014
|
+
* Default is false.
|
|
1015
|
+
* @param args.options.noMultiKey - If true, do not include multi-key accounts in the results. Default is false.
|
|
1016
|
+
* @returns Promise resolving to an array of derived Account objects
|
|
1017
|
+
*
|
|
1018
|
+
* @example
|
|
1019
|
+
* ```typescript
|
|
1020
|
+
* import { Aptos, AptosConfig, Network, Ed25519Account } from "@aptos-labs/ts-sdk";
|
|
1021
|
+
*
|
|
1022
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1023
|
+
* const aptos = new Aptos(config);
|
|
1024
|
+
*
|
|
1025
|
+
* async function getOwnedAccounts() {
|
|
1026
|
+
* const signer = Ed25519Account.generate();
|
|
1027
|
+
* const accounts = await aptos.deriveOwnedAccountsFromSigner({
|
|
1028
|
+
* signer
|
|
1029
|
+
* });
|
|
1030
|
+
* const account = accounts[0];
|
|
1031
|
+
* console.log(account);
|
|
1032
|
+
* }
|
|
1033
|
+
* ```
|
|
1034
|
+
* @group Account
|
|
1035
|
+
*/
|
|
1036
|
+
async deriveOwnedAccountsFromSigner(args: {
|
|
1037
|
+
signer: AccountModule | PrivateKeyInput;
|
|
1038
|
+
minimumLedgerVersion?: AnyNumber;
|
|
1039
|
+
options?: { includeUnverified?: boolean; noMultiKey?: boolean };
|
|
1040
|
+
}): Promise<AccountModule[]> {
|
|
1041
|
+
await waitForIndexerOnVersion({
|
|
1042
|
+
config: this.config,
|
|
1043
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
1044
|
+
processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,
|
|
1045
|
+
});
|
|
1046
|
+
return deriveOwnedAccountsFromSigner({ aptosConfig: this.config, ...args });
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Gets all account info (address, account public key, last transaction version) that have are associated with a public key.
|
|
1051
|
+
*
|
|
1052
|
+
* For a given public key, it will query all multikeys that the public key is part of. Then for the provided public key and
|
|
1053
|
+
* any multikeys found in the previous step, it will query for any accounts that have an auth key that matches any of the
|
|
1054
|
+
* public keys.
|
|
1055
|
+
*
|
|
1056
|
+
* @param args - The arguments for getting accounts for a public key
|
|
1057
|
+
* @param args.publicKey - The public key to look up accounts for
|
|
1058
|
+
* @param args.minimumLedgerVersion - The minimum ledger version to wait for before querying
|
|
1059
|
+
* @param args.options.includeUnverified - Whether to include unverified accounts in the results. Unverified accounts
|
|
1060
|
+
* are accounts that can be authenticated with the signer, but there is no history of the signer using the account. Default
|
|
1061
|
+
* is false.
|
|
1062
|
+
* @param args.options.noMultiKey - Whether to exclude multi-key accounts in the results. Default is false.
|
|
1063
|
+
* @returns Promise resolving to an array of account addresses and their associated public keys
|
|
1064
|
+
*
|
|
1065
|
+
* @example
|
|
1066
|
+
* ```typescript
|
|
1067
|
+
* import { Aptos, AptosConfig, Network, Ed25519PrivateKey } from "@aptos-labs/ts-sdk";
|
|
1068
|
+
*
|
|
1069
|
+
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
1070
|
+
* const aptos = new Aptos(config);
|
|
1071
|
+
*
|
|
1072
|
+
* async function getAccounts() {
|
|
1073
|
+
* const privateKey = Ed25519PrivateKey.generate();
|
|
1074
|
+
* const publicKey = privateKey.publicKey();
|
|
1075
|
+
* const accounts = await aptos.getAccountsForPublicKey({
|
|
1076
|
+
* publicKey
|
|
1077
|
+
* });
|
|
1078
|
+
* console.log(accounts);
|
|
1079
|
+
* }
|
|
1080
|
+
* ```
|
|
1081
|
+
* @group Account
|
|
1082
|
+
*/
|
|
1083
|
+
async getAccountsForPublicKey(args: {
|
|
1084
|
+
publicKey: BaseAccountPublicKey;
|
|
1085
|
+
minimumLedgerVersion?: AnyNumber;
|
|
1086
|
+
options?: { includeUnverified?: boolean; noMultiKey?: boolean };
|
|
1087
|
+
}): Promise<
|
|
1088
|
+
{
|
|
1089
|
+
accountAddress: AccountAddress;
|
|
1090
|
+
publicKey: BaseAccountPublicKey;
|
|
1091
|
+
}[]
|
|
1092
|
+
> {
|
|
1093
|
+
await waitForIndexerOnVersion({
|
|
1094
|
+
config: this.config,
|
|
1095
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
1096
|
+
processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,
|
|
1097
|
+
});
|
|
1098
|
+
return getAccountsForPublicKey({
|
|
1099
|
+
aptosConfig: this.config,
|
|
1100
|
+
...args,
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
983
1103
|
}
|
package/src/api/aptosConfig.ts
CHANGED
|
@@ -134,6 +134,15 @@ export class AptosConfig {
|
|
|
134
134
|
* @group Client
|
|
135
135
|
*/
|
|
136
136
|
constructor(settings?: AptosSettings) {
|
|
137
|
+
// If there are any endpoint overrides, they are custom networks, keep that in mind
|
|
138
|
+
if (settings?.fullnode || settings?.indexer || settings?.faucet || settings?.pepper || settings?.prover) {
|
|
139
|
+
if (settings?.network === Network.CUSTOM) {
|
|
140
|
+
console.info("Note: using CUSTOM network will require queries to lookup ChainId");
|
|
141
|
+
} else if (!settings?.network) {
|
|
142
|
+
throw new Error("Custom endpoints require a network to be specified");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
137
146
|
this.network = settings?.network ?? Network.DEVNET;
|
|
138
147
|
this.fullnode = settings?.fullnode;
|
|
139
148
|
this.faucet = settings?.faucet;
|
package/src/api/transaction.ts
CHANGED
|
@@ -522,6 +522,7 @@ export class Transaction {
|
|
|
522
522
|
async rotateAuthKey(
|
|
523
523
|
args: {
|
|
524
524
|
fromAccount: Account;
|
|
525
|
+
options?: InputGenerateTransactionOptions;
|
|
525
526
|
} & (
|
|
526
527
|
| { toAccount: Account; dangerouslySkipVerification?: never }
|
|
527
528
|
| { toNewPrivateKey: Ed25519PrivateKey; dangerouslySkipVerification?: never }
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { AccountAddressInput } from "../../core";
|
|
5
5
|
import { generateTransaction } from "../../internal/transactionSubmission";
|
|
6
|
-
import {
|
|
7
|
-
InputGenerateTransactionPayloadData,
|
|
8
|
-
InputGenerateTransactionOptions,
|
|
9
|
-
AptosScriptComposer,
|
|
10
|
-
TransactionPayloadScript,
|
|
11
|
-
generateRawTransaction,
|
|
12
|
-
} from "../../transactions";
|
|
6
|
+
import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from "../../transactions";
|
|
13
7
|
import { MultiAgentTransaction } from "../../transactions/instances/multiAgentTransaction";
|
|
14
8
|
import { SimpleTransaction } from "../../transactions/instances/simpleTransaction";
|
|
15
9
|
import { AptosConfig } from "../aptosConfig";
|
|
16
|
-
import { Deserializer } from "../../bcs";
|
|
17
10
|
|
|
18
11
|
/**
|
|
19
12
|
* A class to handle all `Build` transaction operations.
|
|
@@ -103,82 +96,6 @@ export class Build {
|
|
|
103
96
|
return generateTransaction({ aptosConfig: this.config, ...args });
|
|
104
97
|
}
|
|
105
98
|
|
|
106
|
-
/**
|
|
107
|
-
* Build a transaction from a series of Move calls.
|
|
108
|
-
*
|
|
109
|
-
* This function allows you to create a transaction with a list of Move calls.
|
|
110
|
-
*
|
|
111
|
-
* Right now we only tested this logic with single signer and we will add support
|
|
112
|
-
* for mutli agent transactions if needed.
|
|
113
|
-
*
|
|
114
|
-
* @param args.sender - The sender account address.
|
|
115
|
-
* @param args.builder - The closure to construct the list of calls.
|
|
116
|
-
* @param args.options - Optional transaction configurations.
|
|
117
|
-
* @param args.withFeePayer - Whether there is a fee payer for the transaction.
|
|
118
|
-
*
|
|
119
|
-
* @returns SimpleTransaction
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* ```typescript
|
|
123
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
124
|
-
*
|
|
125
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
126
|
-
* const aptos = new Aptos(config);
|
|
127
|
-
*
|
|
128
|
-
* async function runExample() {
|
|
129
|
-
* // Build a transaction from a chained series of Move calls.
|
|
130
|
-
* const transaction = await aptos.transaction.build.scriptComposer({
|
|
131
|
-
* sender: "0x1", // replace with a real sender account address
|
|
132
|
-
* builder: builder: async (builder) => {
|
|
133
|
-
* const coin = await builder.addBatchedCalls({
|
|
134
|
-
* function: "0x1::coin::withdraw",
|
|
135
|
-
* functionArguments: [CallArgument.new_signer(0), 1],
|
|
136
|
-
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
137
|
-
* });
|
|
138
|
-
*
|
|
139
|
-
* // Pass the returned value from the first function call to the second call
|
|
140
|
-
* const fungibleAsset = await builder.addBatchedCalls({
|
|
141
|
-
* function: "0x1::coin::coin_to_fungible_asset",
|
|
142
|
-
* functionArguments: [coin[0]],
|
|
143
|
-
* typeArguments: ["0x1::aptos_coin::AptosCoin"],
|
|
144
|
-
* });
|
|
145
|
-
*
|
|
146
|
-
* await builder.addBatchedCalls({
|
|
147
|
-
* function: "0x1::primary_fungible_store::deposit",
|
|
148
|
-
* functionArguments: [singleSignerED25519SenderAccount.accountAddress, fungibleAsset[0]],
|
|
149
|
-
* typeArguments: [],
|
|
150
|
-
* });
|
|
151
|
-
* return builder;
|
|
152
|
-
* },
|
|
153
|
-
* options: {
|
|
154
|
-
* gasUnitPrice: 100, // specify your own gas unit price if needed
|
|
155
|
-
* maxGasAmount: 1000, // specify your own max gas amount if needed
|
|
156
|
-
* },
|
|
157
|
-
* });
|
|
158
|
-
*
|
|
159
|
-
* console.log(transaction);
|
|
160
|
-
* }
|
|
161
|
-
* runExample().catch(console.error);
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
async scriptComposer(args: {
|
|
165
|
-
sender: AccountAddressInput;
|
|
166
|
-
builder: (builder: AptosScriptComposer) => Promise<AptosScriptComposer>;
|
|
167
|
-
options?: InputGenerateTransactionOptions;
|
|
168
|
-
withFeePayer?: boolean;
|
|
169
|
-
}): Promise<SimpleTransaction> {
|
|
170
|
-
const composer = new AptosScriptComposer(this.config);
|
|
171
|
-
await composer.init();
|
|
172
|
-
const builder = await args.builder(composer);
|
|
173
|
-
const bytes = builder.build();
|
|
174
|
-
const rawTxn = await generateRawTransaction({
|
|
175
|
-
aptosConfig: this.config,
|
|
176
|
-
payload: TransactionPayloadScript.load(new Deserializer(bytes)),
|
|
177
|
-
...args,
|
|
178
|
-
});
|
|
179
|
-
return new SimpleTransaction(rawTxn, args.withFeePayer === true ? AccountAddress.ZERO : undefined);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
99
|
/**
|
|
183
100
|
* Build a multi-agent transaction that allows multiple signers to authorize a transaction.
|
|
184
101
|
*
|
package/src/core/crypto/index.ts
CHANGED