@aptos-labs/ts-sdk 1.38.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-5ltp27oM.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 +174 -113
- package/dist/common/index.js +53 -32
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.d.mts +0 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.d.mts +0 -1
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +0 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.d.mts +0 -1
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +0 -1
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +0 -1
- 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 +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +0 -1
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +0 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +0 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +0 -1
- 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 -6
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +0 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +5 -6
- 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 +0 -1
- 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 +50 -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 +5 -6
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +0 -1
- 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 +1 -2
- 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 +0 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +0 -1
- 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/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/fixedBytes.d.mts +0 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +0 -1
- 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/{chunk-NKHYIVN3.mjs → chunk-2DYSBAZ7.mjs} +2 -2
- package/dist/esm/{chunk-CDGBM4JY.mjs → chunk-34R7FSQF.mjs} +2 -2
- package/dist/esm/chunk-3FEFJIVT.mjs +2 -0
- package/dist/esm/chunk-3FEFJIVT.mjs.map +1 -0
- package/dist/esm/{chunk-IRYH7OV4.mjs → chunk-4F5EECVQ.mjs} +2 -2
- package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
- package/dist/esm/{chunk-KBHJPL6Y.mjs → chunk-6UZHMEK3.mjs} +2 -2
- package/dist/esm/{chunk-PUYYROVD.mjs → chunk-CO67Y6YE.mjs} +2 -2
- package/dist/esm/{chunk-PUYYROVD.mjs.map → chunk-CO67Y6YE.mjs.map} +1 -1
- package/dist/esm/{chunk-XZGEJMIL.mjs → chunk-CQJLK4WE.mjs} +2 -2
- package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
- package/dist/esm/chunk-FD6FGKYY.mjs.map +1 -0
- package/dist/esm/{chunk-GSXNMAK2.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-4AU6DSUL.mjs.map → chunk-HLF3U7IS.mjs.map} +1 -1
- package/dist/esm/{chunk-WIBQJBBB.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-QQDTCQQV.mjs → chunk-SVMCNLFC.mjs} +2 -2
- package/dist/esm/{chunk-NAWRVBU4.mjs → chunk-TDGLYA35.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-4CVPCQ56.mjs → chunk-UQWF24SS.mjs} +2 -2
- package/dist/esm/{chunk-4CVPCQ56.mjs.map → chunk-UQWF24SS.mjs.map} +1 -1
- package/dist/esm/{chunk-P23N7FX6.mjs → chunk-V7NWNNBI.mjs} +2 -2
- package/dist/esm/chunk-XTMUMN74.mjs +2 -0
- package/dist/esm/chunk-XTMUMN74.mjs.map +1 -0
- 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 +0 -1
- 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 +0 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +0 -1
- 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 +0 -1
- 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 +2 -3
- 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 +1 -1
- 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/index.d.mts +5 -6
- 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 -14
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +0 -1
- 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 +0 -1
- 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 +24 -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 +9 -1
- 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 +0 -1
- 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/identifier.d.mts +0 -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 +0 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +0 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +0 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +0 -1
- 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 +0 -1
- 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 +1 -10
- 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 +2 -3
- package/src/account/FederatedKeylessAccount.ts +7 -1
- package/src/account/KeylessAccount.ts +17 -2
- package/src/api/account.ts +123 -2
- package/src/api/aptosConfig.ts +9 -0
- package/src/api/fungibleAsset.ts +54 -1
- 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/singleKey.ts +2 -2
- package/src/core/crypto/types.ts +9 -0
- package/src/internal/account.ts +524 -53
- package/src/internal/fungibleAsset.ts +37 -0
- 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-4AU6DSUL.mjs +0 -2
- package/dist/esm/chunk-4N2JPV7H.mjs +0 -4
- package/dist/esm/chunk-4N2JPV7H.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-ODAAZLPK.mjs +0 -2
- package/dist/esm/chunk-ODAAZLPK.mjs.map +0 -1
- package/dist/esm/chunk-RJ7F4JDV.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-NKHYIVN3.mjs.map → chunk-2DYSBAZ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-CDGBM4JY.mjs.map → chunk-34R7FSQF.mjs.map} +0 -0
- /package/dist/esm/{chunk-IRYH7OV4.mjs.map → chunk-4F5EECVQ.mjs.map} +0 -0
- /package/dist/esm/{transactions/scriptComposer/index.mjs.map → chunk-5HXLZHDW.mjs.map} +0 -0
- /package/dist/esm/{chunk-KBHJPL6Y.mjs.map → chunk-6UZHMEK3.mjs.map} +0 -0
- /package/dist/esm/{chunk-XZGEJMIL.mjs.map → chunk-CQJLK4WE.mjs.map} +0 -0
- /package/dist/esm/{chunk-GSXNMAK2.mjs.map → chunk-GPNNEHW4.mjs.map} +0 -0
- /package/dist/esm/{chunk-WIBQJBBB.mjs.map → chunk-HW7TSJI2.mjs.map} +0 -0
- /package/dist/esm/{chunk-QQDTCQQV.mjs.map → chunk-SVMCNLFC.mjs.map} +0 -0
- /package/dist/esm/{chunk-NAWRVBU4.mjs.map → chunk-TDGLYA35.mjs.map} +0 -0
- /package/dist/esm/{chunk-P23N7FX6.mjs.map → chunk-V7NWNNBI.mjs.map} +0 -0
|
@@ -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
|
@@ -92,6 +92,10 @@ export class MultiEd25519PublicKey extends AbstractMultiKey {
|
|
|
92
92
|
this.threshold = threshold;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
getSignaturesRequired(): number {
|
|
96
|
+
return this.threshold;
|
|
97
|
+
}
|
|
98
|
+
|
|
95
99
|
// region AccountPublicKey
|
|
96
100
|
|
|
97
101
|
/**
|
|
@@ -217,6 +221,28 @@ export class MultiEd25519PublicKey extends AbstractMultiKey {
|
|
|
217
221
|
return new MultiEd25519PublicKey({ publicKeys: keys, threshold });
|
|
218
222
|
}
|
|
219
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Deserializes a MultiEd25519Signature from the provided deserializer.
|
|
226
|
+
* This function helps in reconstructing a MultiEd25519Signature object from its serialized byte representation.
|
|
227
|
+
*
|
|
228
|
+
* @param deserializer - The deserializer instance used to read the serialized data.
|
|
229
|
+
* @group Implementation
|
|
230
|
+
* @category Serialization
|
|
231
|
+
*/
|
|
232
|
+
static deserializeWithoutLength(deserializer: Deserializer): MultiEd25519PublicKey {
|
|
233
|
+
const length = deserializer.remaining();
|
|
234
|
+
const bytes = deserializer.deserializeFixedBytes(length);
|
|
235
|
+
const threshold = bytes[bytes.length - 1];
|
|
236
|
+
|
|
237
|
+
const keys: Ed25519PublicKey[] = [];
|
|
238
|
+
|
|
239
|
+
for (let i = 0; i < bytes.length - 1; i += Ed25519PublicKey.LENGTH) {
|
|
240
|
+
const begin = i;
|
|
241
|
+
keys.push(new Ed25519PublicKey(bytes.subarray(begin, begin + Ed25519PublicKey.LENGTH)));
|
|
242
|
+
}
|
|
243
|
+
return new MultiEd25519PublicKey({ publicKeys: keys, threshold });
|
|
244
|
+
}
|
|
245
|
+
|
|
220
246
|
// endregion
|
|
221
247
|
|
|
222
248
|
/**
|
|
@@ -95,6 +95,8 @@ export abstract class AbstractMultiKey extends AccountPublicKey {
|
|
|
95
95
|
}
|
|
96
96
|
throw new Error(`Public key ${publicKey} not found in multi key set ${this.publicKeys}`);
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
abstract getSignaturesRequired(): number;
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
/**
|
|
@@ -162,6 +164,10 @@ export class MultiKey extends AbstractMultiKey {
|
|
|
162
164
|
this.signaturesRequired = signaturesRequired;
|
|
163
165
|
}
|
|
164
166
|
|
|
167
|
+
getSignaturesRequired(): number {
|
|
168
|
+
return this.signaturesRequired;
|
|
169
|
+
}
|
|
170
|
+
|
|
165
171
|
// endregion
|
|
166
172
|
|
|
167
173
|
// region AccountPublicKey
|
|
@@ -149,7 +149,7 @@ export class AnyPublicKey extends AccountPublicKey {
|
|
|
149
149
|
* @group Implementation
|
|
150
150
|
* @category Serialization
|
|
151
151
|
*/
|
|
152
|
-
toUint8Array() {
|
|
152
|
+
toUint8Array(): Uint8Array {
|
|
153
153
|
return this.bcsToBytes();
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -289,7 +289,7 @@ export class AnySignature extends Signature {
|
|
|
289
289
|
|
|
290
290
|
// region AccountSignature
|
|
291
291
|
|
|
292
|
-
toUint8Array() {
|
|
292
|
+
toUint8Array(): Uint8Array {
|
|
293
293
|
// TODO: keep this warning around for a bit, and eventually change this to return `this.signature.toUint8Array()`.
|
|
294
294
|
// eslint-disable-next-line no-console
|
|
295
295
|
console.warn(
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnyPublicKey } from "./singleKey";
|
|
2
|
+
import { Ed25519PublicKey } from "./ed25519";
|
|
3
|
+
import { MultiKey } from "./multiKey";
|
|
4
|
+
import { MultiEd25519PublicKey } from "./multiEd25519";
|
|
5
|
+
|
|
6
|
+
// This type is used to represent the base from of an account's public key.
|
|
7
|
+
// These are the types of public keys that can be used to derive an account's address by appending
|
|
8
|
+
// the signing scheme to the public key as bytes and hashing it.
|
|
9
|
+
export type BaseAccountPublicKey = Ed25519PublicKey | AnyPublicKey | MultiKey | MultiEd25519PublicKey;
|