@aptos-labs/ts-sdk 5.0.0 → 5.1.1-side-effect-free.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/{account-BDwBREvt.d.ts → account-Dr4y1uZG.d.ts} +8 -2
- package/dist/common/chunk-AWFAHZSB.js +4 -0
- package/dist/common/{chunk-6MMUUJHX.js.map → chunk-AWFAHZSB.js.map} +1 -1
- 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 +339 -10
- package/dist/common/index.js +33 -33
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-8ETkcAk_.d.mts → Ed25519Account-CPwej6wB.d.mts} +1 -1
- package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs.map +1 -1
- package/dist/esm/account/AbstractedAccount.d.mts +2 -2
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.mjs.map +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/Account.mjs.map +1 -1
- package/dist/esm/account/AccountUtils.d.mts +3 -3
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/AccountUtils.mjs.map +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +2 -2
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.mjs.map +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs.map +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs.map +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs.map +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +3 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs.map +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +2 -2
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.mjs.map +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +3 -3
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs.map +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs.map +1 -1
- package/dist/esm/account/index.d.mts +3 -3
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/index.mjs.map +1 -1
- package/dist/esm/account/utils.d.mts +1 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/account/utils.mjs.map +1 -1
- package/dist/esm/{account-ClxOwjdh.d.mts → account-BortO8g2.d.mts} +6 -1
- package/dist/esm/api/account/abstraction.d.mts +1 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account/abstraction.mjs.map +1 -1
- package/dist/esm/api/account.d.mts +30 -9
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/account.mjs.map +1 -1
- package/dist/esm/api/ans.d.mts +2 -2
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/ans.mjs.map +1 -1
- package/dist/esm/api/aptos.d.mts +3 -3
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptos.mjs.map +1 -1
- package/dist/esm/api/aptosConfig.d.mts +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/aptosConfig.mjs.map +1 -1
- package/dist/esm/api/coin.d.mts +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/coin.mjs.map +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs.map +1 -1
- package/dist/esm/api/faucet.d.mts +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/faucet.mjs.map +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +2 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs.map +1 -1
- package/dist/esm/api/general.d.mts +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/general.mjs.map +1 -1
- package/dist/esm/api/index.d.mts +3 -3
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/index.mjs.map +1 -1
- package/dist/esm/api/keyless.d.mts +3 -3
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/keyless.mjs.map +1 -1
- package/dist/esm/api/object.d.mts +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/object.mjs.map +1 -1
- package/dist/esm/api/staking.d.mts +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/staking.mjs.map +1 -1
- package/dist/esm/api/table.d.mts +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/table.mjs.map +1 -1
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transaction.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/helpers.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
- package/dist/esm/api/transactionSubmission/helpers.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +2 -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 +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs.map +1 -1
- package/dist/esm/api/utils.d.mts +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/api/utils.mjs.map +1 -1
- package/dist/esm/bcs/consts.d.mts +1 -1
- package/dist/esm/bcs/consts.mjs +1 -1
- package/dist/esm/bcs/consts.mjs.map +1 -1
- package/dist/esm/bcs/deserializer.d.mts +1 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/deserializer.mjs.map +1 -1
- package/dist/esm/bcs/index.d.mts +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/index.mjs.map +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -1
- package/dist/esm/bcs/serializer.d.mts +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs.map +1 -1
- package/dist/esm/cli/index.d.mts +1 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/index.mjs.map +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/localNode.mjs.map +1 -1
- package/dist/esm/cli/move.d.mts +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/cli/move.mjs.map +1 -1
- package/dist/esm/client/core.d.mts +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/core.mjs.map +1 -1
- package/dist/esm/client/get.d.mts +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/get.mjs.map +1 -1
- package/dist/esm/client/index.d.mts +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/index.mjs.map +1 -1
- package/dist/esm/client/post.d.mts +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/client/post.mjs.map +1 -1
- package/dist/esm/core/account/index.d.mts +2 -2
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/index.mjs.map +1 -1
- package/dist/esm/core/account/utils/address.d.mts +13 -2
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs.map +1 -1
- package/dist/esm/core/account/utils/index.d.mts +2 -2
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs.map +1 -1
- package/dist/esm/core/accountAddress.d.mts +1 -1
- package/dist/esm/core/accountAddress.mjs +3 -1
- package/dist/esm/core/accountAddress.mjs.map +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs.map +1 -1
- package/dist/esm/core/common.mjs +1 -1
- package/dist/esm/core/common.mjs.map +1 -1
- package/dist/esm/core/crypto/abstraction.d.mts +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs.map +1 -1
- package/dist/esm/core/crypto/deserializationUtils.d.mts +1 -1
- package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
- package/dist/esm/core/crypto/deserializationUtils.mjs.map +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs.map +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs.map +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -2
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs.map +1 -1
- package/dist/esm/core/crypto/hdKey.mjs +1 -1
- package/dist/esm/core/crypto/hdKey.mjs.map +1 -1
- package/dist/esm/core/crypto/index.d.mts +3 -2
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs.map +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +2 -2
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs.map +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +3 -1
- package/dist/esm/core/crypto/multiKey.mjs.map +1 -1
- package/dist/esm/core/crypto/poseidon.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.mjs.map +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +1 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.mjs.map +1 -1
- package/dist/esm/core/crypto/proof.d.mts +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs.map +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs.map +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs.map +1 -1
- package/dist/esm/core/crypto/secp256r1.d.mts +306 -0
- package/dist/esm/core/crypto/secp256r1.mjs +2 -0
- package/dist/esm/core/crypto/secp256r1.mjs.map +1 -0
- package/dist/esm/core/crypto/signature.d.mts +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs.map +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs.map +1 -1
- package/dist/esm/core/crypto/types.d.mts +1 -1
- package/dist/esm/core/crypto/types.mjs +0 -1
- package/dist/esm/core/crypto/utils.d.mts +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/crypto/utils.mjs.map +1 -1
- package/dist/esm/core/hex.d.mts +1 -1
- package/dist/esm/core/hex.mjs +1 -1
- package/dist/esm/core/hex.mjs.map +1 -1
- package/dist/esm/core/index.d.mts +4 -3
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/core/index.mjs.map +1 -1
- package/dist/esm/errors/index.d.mts +1 -1
- package/dist/esm/errors/index.mjs +6 -1
- package/dist/esm/errors/index.mjs.map +1 -1
- package/dist/esm/{federatedKeyless-CUPEnP-W.d.mts → federatedKeyless-CTzDAQTu.d.mts} +1 -1
- package/dist/esm/index.d.mts +5 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/internal/abstraction.d.mts +1 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/abstraction.mjs.map +1 -1
- package/dist/esm/internal/account.d.mts +21 -3
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/account.mjs.map +1 -1
- package/dist/esm/internal/ans.d.mts +2 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/ans.mjs.map +1 -1
- package/dist/esm/internal/coin.d.mts +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/coin.mjs.map +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +2 -2
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs.map +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/faucet.mjs.map +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +2 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs.map +1 -1
- package/dist/esm/internal/general.d.mts +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/general.mjs.map +1 -1
- package/dist/esm/internal/keyless.d.mts +3 -3
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/keyless.mjs.map +1 -1
- package/dist/esm/internal/object.d.mts +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/object.mjs.map +1 -1
- package/dist/esm/internal/staking.d.mts +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/staking.mjs.map +1 -1
- package/dist/esm/internal/table.d.mts +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/table.mjs.map +1 -1
- package/dist/esm/internal/transaction.d.mts +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transaction.mjs.map +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs.map +1 -1
- package/dist/esm/internal/utils/index.d.mts +1 -1
- package/dist/esm/internal/utils/index.mjs +1 -1
- package/dist/esm/internal/utils/index.mjs.map +1 -1
- package/dist/esm/internal/utils/utils.d.mts +1 -1
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/utils/utils.mjs.map +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/internal/view.mjs.map +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs.map +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs.map +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -1
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/index.mjs.map +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs.map +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs.map +1 -1
- package/dist/esm/transactions/instances/index.d.mts +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs.map +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs.map +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionArgument.mjs +0 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +1 -1
- package/dist/esm/transactions/management/asyncQueue.mjs +1 -1
- package/dist/esm/transactions/management/asyncQueue.mjs.map +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs.map +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs.map +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs.map +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs.map +1 -1
- package/dist/esm/transactions/types.d.mts +1 -1
- package/dist/esm/transactions/types.mjs +0 -1
- package/dist/esm/types/abstraction.mjs +1 -1
- package/dist/esm/types/abstraction.mjs.map +1 -1
- package/dist/esm/types/generated/queries.mjs +493 -1
- package/dist/esm/types/generated/queries.mjs.map +1 -1
- 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 +1 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/index.mjs.map +1 -1
- package/dist/esm/types/indexer.mjs +0 -1
- package/dist/esm/types/types.d.mts +1 -1
- package/dist/esm/types/types.mjs +1 -1
- package/dist/esm/types/types.mjs.map +1 -1
- package/dist/esm/utils/apiEndpoints.d.mts +1 -0
- package/dist/esm/utils/apiEndpoints.mjs +1 -1
- package/dist/esm/utils/apiEndpoints.mjs.map +1 -1
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/const.mjs.map +1 -1
- package/dist/esm/utils/helpers.d.mts +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/helpers.mjs.map +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/index.mjs.map +1 -1
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/utils/memoize.mjs.map +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs.map +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/version.mjs.map +1 -1
- package/package.json +40 -22
- package/src/api/account.ts +32 -7
- package/src/api/aptos.ts +25 -14
- package/src/core/account/utils/address.ts +22 -0
- package/src/core/crypto/index.ts +1 -0
- package/src/core/crypto/privateKey.ts +1 -0
- package/src/core/crypto/secp256k1.ts +9 -1
- package/src/core/crypto/secp256r1.ts +495 -0
- package/src/core/crypto/singleKey.ts +11 -0
- package/src/internal/account.ts +33 -0
- package/src/internal/ans.ts +1 -0
- package/src/types/types.ts +5 -0
- package/src/utils/apiEndpoints.ts +7 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-6MMUUJHX.js +0 -4
- package/dist/esm/chunk-35DKMW7Q.mjs +0 -2
- package/dist/esm/chunk-35DKMW7Q.mjs.map +0 -1
- package/dist/esm/chunk-4QMXOWHP.mjs +0 -1
- package/dist/esm/chunk-4QMXOWHP.mjs.map +0 -1
- package/dist/esm/chunk-4RXKALLC.mjs +0 -2
- package/dist/esm/chunk-4RXKALLC.mjs.map +0 -1
- package/dist/esm/chunk-4WPQQPUF.mjs +0 -1
- package/dist/esm/chunk-4WPQQPUF.mjs.map +0 -1
- package/dist/esm/chunk-56CNRT2K.mjs +0 -2
- package/dist/esm/chunk-56CNRT2K.mjs.map +0 -1
- package/dist/esm/chunk-5FI4545P.mjs +0 -2
- package/dist/esm/chunk-5FI4545P.mjs.map +0 -1
- package/dist/esm/chunk-5HXLZHDW.mjs +0 -1
- package/dist/esm/chunk-5HXLZHDW.mjs.map +0 -1
- package/dist/esm/chunk-6WDVDEQZ.mjs +0 -7
- package/dist/esm/chunk-6WDVDEQZ.mjs.map +0 -1
- package/dist/esm/chunk-7DQDJ2SA.mjs +0 -2
- package/dist/esm/chunk-7DQDJ2SA.mjs.map +0 -1
- package/dist/esm/chunk-7ECCT6PK.mjs +0 -1
- package/dist/esm/chunk-7ECCT6PK.mjs.map +0 -1
- package/dist/esm/chunk-A5L76YP7.mjs +0 -2
- package/dist/esm/chunk-A5L76YP7.mjs.map +0 -1
- package/dist/esm/chunk-B563XRSZ.mjs +0 -2
- package/dist/esm/chunk-B563XRSZ.mjs.map +0 -1
- package/dist/esm/chunk-C3Q23D22.mjs +0 -2
- package/dist/esm/chunk-C3Q23D22.mjs.map +0 -1
- package/dist/esm/chunk-CW35YAMN.mjs +0 -2
- package/dist/esm/chunk-CW35YAMN.mjs.map +0 -1
- package/dist/esm/chunk-DIGP2ALY.mjs +0 -4
- package/dist/esm/chunk-DIGP2ALY.mjs.map +0 -1
- package/dist/esm/chunk-DNRUDMMV.mjs +0 -2
- package/dist/esm/chunk-DNRUDMMV.mjs.map +0 -1
- package/dist/esm/chunk-EBMEXURY.mjs +0 -2
- package/dist/esm/chunk-EBMEXURY.mjs.map +0 -1
- package/dist/esm/chunk-EM52Z7T7.mjs +0 -2
- package/dist/esm/chunk-EM52Z7T7.mjs.map +0 -1
- package/dist/esm/chunk-ES2KP6BS.mjs +0 -2
- package/dist/esm/chunk-ES2KP6BS.mjs.map +0 -1
- package/dist/esm/chunk-FD6FGKYY.mjs +0 -1
- package/dist/esm/chunk-FD6FGKYY.mjs.map +0 -1
- package/dist/esm/chunk-FGFLPH5K.mjs +0 -2
- package/dist/esm/chunk-FGFLPH5K.mjs.map +0 -1
- package/dist/esm/chunk-FLZPUYXQ.mjs +0 -2
- package/dist/esm/chunk-FLZPUYXQ.mjs.map +0 -1
- package/dist/esm/chunk-FZY4PMEE.mjs +0 -1
- package/dist/esm/chunk-FZY4PMEE.mjs.map +0 -1
- package/dist/esm/chunk-G3MHXDYA.mjs +0 -1
- package/dist/esm/chunk-G3MHXDYA.mjs.map +0 -1
- package/dist/esm/chunk-GFFKEZ56.mjs +0 -2
- package/dist/esm/chunk-GFFKEZ56.mjs.map +0 -1
- package/dist/esm/chunk-GMQCQDW4.mjs +0 -2
- package/dist/esm/chunk-GMQCQDW4.mjs.map +0 -1
- package/dist/esm/chunk-GOXRBEIJ.mjs +0 -2
- package/dist/esm/chunk-GOXRBEIJ.mjs.map +0 -1
- package/dist/esm/chunk-HGLO5LDS.mjs +0 -1
- package/dist/esm/chunk-HGLO5LDS.mjs.map +0 -1
- package/dist/esm/chunk-HNBKTJPN.mjs +0 -2
- package/dist/esm/chunk-HNBKTJPN.mjs.map +0 -1
- package/dist/esm/chunk-HNBVYE3N.mjs +0 -2
- package/dist/esm/chunk-HNBVYE3N.mjs.map +0 -1
- package/dist/esm/chunk-IF4UU2MT.mjs +0 -2
- package/dist/esm/chunk-IF4UU2MT.mjs.map +0 -1
- package/dist/esm/chunk-IJE2LVZG.mjs +0 -2
- package/dist/esm/chunk-IJE2LVZG.mjs.map +0 -1
- package/dist/esm/chunk-KDMSOCZY.mjs +0 -2
- package/dist/esm/chunk-KDMSOCZY.mjs.map +0 -1
- package/dist/esm/chunk-LWL57YFU.mjs +0 -2
- package/dist/esm/chunk-LWL57YFU.mjs.map +0 -1
- package/dist/esm/chunk-MT2RJ7H3.mjs +0 -2
- package/dist/esm/chunk-MT2RJ7H3.mjs.map +0 -1
- package/dist/esm/chunk-N3O3ULF7.mjs +0 -2
- package/dist/esm/chunk-N3O3ULF7.mjs.map +0 -1
- package/dist/esm/chunk-N6YTF76Q.mjs +0 -2
- package/dist/esm/chunk-N6YTF76Q.mjs.map +0 -1
- package/dist/esm/chunk-NECL5FCQ.mjs +0 -1
- package/dist/esm/chunk-NECL5FCQ.mjs.map +0 -1
- package/dist/esm/chunk-OLILO7VD.mjs +0 -2
- package/dist/esm/chunk-OLILO7VD.mjs.map +0 -1
- package/dist/esm/chunk-ORMOQWWH.mjs +0 -2
- package/dist/esm/chunk-ORMOQWWH.mjs.map +0 -1
- package/dist/esm/chunk-Q4W3WJ2U.mjs +0 -2
- package/dist/esm/chunk-Q4W3WJ2U.mjs.map +0 -1
- package/dist/esm/chunk-QREVMGQZ.mjs +0 -2
- package/dist/esm/chunk-QREVMGQZ.mjs.map +0 -1
- package/dist/esm/chunk-RCSJFTST.mjs +0 -2
- package/dist/esm/chunk-RCSJFTST.mjs.map +0 -1
- package/dist/esm/chunk-RGKRCZ36.mjs +0 -4
- package/dist/esm/chunk-RGKRCZ36.mjs.map +0 -1
- package/dist/esm/chunk-ROT6S6BM.mjs +0 -2
- package/dist/esm/chunk-ROT6S6BM.mjs.map +0 -1
- package/dist/esm/chunk-RQX6JOEN.mjs +0 -2
- package/dist/esm/chunk-RQX6JOEN.mjs.map +0 -1
- package/dist/esm/chunk-STY74NUA.mjs +0 -2
- package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
- package/dist/esm/chunk-TGRLDWXV.mjs +0 -2
- package/dist/esm/chunk-TGRLDWXV.mjs.map +0 -1
- package/dist/esm/chunk-TOBQ5UE6.mjs +0 -2
- package/dist/esm/chunk-TOBQ5UE6.mjs.map +0 -1
- package/dist/esm/chunk-UL777LTI.mjs +0 -494
- package/dist/esm/chunk-UL777LTI.mjs.map +0 -1
- package/dist/esm/chunk-UYVPNUH3.mjs +0 -1
- package/dist/esm/chunk-UYVPNUH3.mjs.map +0 -1
- package/dist/esm/chunk-V3MBJJTL.mjs +0 -1
- package/dist/esm/chunk-V3MBJJTL.mjs.map +0 -1
- package/dist/esm/chunk-V74WPKSY.mjs +0 -2
- package/dist/esm/chunk-V74WPKSY.mjs.map +0 -1
- package/dist/esm/chunk-WCMW2L3P.mjs +0 -2
- package/dist/esm/chunk-WCMW2L3P.mjs.map +0 -1
- package/dist/esm/chunk-WSR5EBJM.mjs +0 -2
- package/dist/esm/chunk-WSR5EBJM.mjs.map +0 -1
- package/dist/esm/chunk-XJJVJOX5.mjs +0 -2
- package/dist/esm/chunk-XJJVJOX5.mjs.map +0 -1
- package/dist/esm/chunk-XKUIMGKU.mjs +0 -2
- package/dist/esm/chunk-XKUIMGKU.mjs.map +0 -1
- package/dist/esm/chunk-YOZBVVKL.mjs +0 -2
- package/dist/esm/chunk-YOZBVVKL.mjs.map +0 -1
- package/dist/esm/chunk-ZP4DWSQA.mjs +0 -2
- package/dist/esm/chunk-ZP4DWSQA.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account as AccountModule } from \"../account\";\nimport {\n AccountAddress,\n AccountAddressInput,\n createObjectAddress,\n BaseAccountPublicKey,\n PrivateKeyInput,\n} from \"../core\";\nimport {\n AccountData,\n AnyNumber,\n CursorPaginationArgs,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n GetObjectDataQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n MoveValue,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinsCount,\n getAccountCoinsData,\n getAccountCollectionsWithOwnedTokens,\n getAccountOwnedObjects,\n getAccountOwnedTokens,\n getAccountOwnedTokensFromCollectionAddress,\n getAccountsForPublicKey,\n getAccountTokensCount,\n getAccountTransactionsCount,\n getBalance,\n getInfo,\n getModule,\n getModules,\n getModulesPage,\n getResource,\n getResources,\n getResourcesPage,\n getTransactions,\n lookupOriginalAccountAddress,\n deriveOwnedAccountsFromSigner,\n AccountInfo,\n} from \"../internal/account\";\nimport { APTOS_COIN, APTOS_FA, ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\nimport { view } from \"../internal/view\";\nimport { isEncodedStruct, parseEncodedStruct } from \"../utils\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { AccountAbstraction } from \"./account/abstraction\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n * @group Account\n */\nexport class Account {\n abstraction: AccountAbstraction;\n\n /**\n * Creates an instance of the Aptos client with the provided configuration.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Initialize the Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET }); // specify your own network if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n constructor(readonly config: AptosConfig) {\n this.abstraction = new AccountAbstraction(config);\n }\n\n /**\n * Queries the current state for an Aptos account given its account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.accountAddress - The Aptos account address to query.\n * @returns The account data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve account information for a specific address\n * const accountInfo = await aptos.getAccountInfo({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(accountInfo);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountInfo(args: { accountAddress: AccountAddressInput }): Promise<AccountData> {\n return getInfo({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for all modules in an account given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query modules for.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.\n *\n * @returns - The account modules associated with the specified address.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account modules for a specific account\n * const accountModules = await aptos.getAccountModules({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // limiting to 10 modules\n * },\n * });\n *\n * console.log(accountModules);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModules(args: {\n accountAddress: AccountAddressInput;\n options?: { limit?: number } & LedgerVersionArg;\n }): Promise<MoveModuleBytecode[]> {\n return getModules({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a page of modules in an account given an account address.\n *\n * @param args.accountAddress - The Aptos account address to query modules for.\n * @param args.options.cursor - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.\n *\n * @returns - The account modules associated with the specified address. Along with a cursor for future pagination. If the cursor is undefined, it means there are no more modules to fetch.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account modules for a specific account\n * const {modules, cursor} = await aptos.getAccountModulesPage({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * cursor: undefined, // starting from the first module\n * limit: 10, // limiting to 10 modules\n * },\n * });\n *\n * console.log(modules);\n * console.log(`More to fetch: ${cursor !== undefined}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModulesPage(args: {\n accountAddress: AccountAddressInput;\n options?: CursorPaginationArgs & LedgerVersionArg;\n }): Promise<{ modules: MoveModuleBytecode[]; cursor: string | undefined }> {\n return getModulesPage({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a specific account module given an account address and module name.\n *\n * @param args.accountAddress - The Aptos account address.\n * @param args.moduleName - The name of the module.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns The account module associated with the specified account address and module name.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the account module for a specific account address and module name\n * const module = await aptos.getAccountModule({\n * accountAddress: \"0x1\", // replace with a real account address\n * moduleName: \"MyModule\" // specify the module name\n * });\n *\n * console.log(module);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n }): Promise<MoveModuleBytecode> {\n return getModule({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries account transactions given an account address.\n * This function may call the API multiple times to auto paginate and retrieve all account transactions.\n *\n * @param args.accountAddress - The Aptos account address to query transactions for.\n * @param args.options - Optional pagination arguments.\n * @param args.options.offset - The number of transactions to start returning results from.\n * @param args.options.limit - The maximum number of results to return.\n *\n * @returns The account transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch transactions for a specific account\n * const transactions = await aptos.getAccountTransactions({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first transaction\n * limit: 10, // limiting to 10 transactions\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactions(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all account resources given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query resources for.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Account resources.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account resources for a specific account address\n * const resources = await aptos.getAccountResources({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(resources);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResources(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveResource[]> {\n return getResources({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a page of account resources given an account address.\n *\n * @param args.accountAddress - The Aptos account address to query resources for.\n * @param args.options.cursor - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Account resources.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account resources for a specific account address\n * const resources = await aptos.getAccountResourcesPage({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * cursor: undefined, // starting from the first resource\n * limit: 10, // limiting to 10 resources\n * },\n * });\n * console.log(resources);\n * console.log(`More to fetch: ${resources.cursor !== undefined}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResourcesPage(args: {\n accountAddress: AccountAddressInput;\n options?: CursorPaginationArgs & LedgerVersionArg;\n }): Promise<{ resources: MoveResource[]; cursor: string | undefined }> {\n return getResourcesPage({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a specific account resource given an account address and resource type.\n *\n * @template T - The typed output of the resource.\n * @param args.accountAddress - The Aptos account address to query.\n * @param args.resourceType - The string representation of an on-chain Move struct type, e.g., \"0x1::aptos_coin::AptosCoin\".\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns The account resource of the specified type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the account resource for a specific account address and resource type\n * const resource = await aptos.getAccountResource({\n * accountAddress: \"0x1\", // replace with a real account address\n * resourceType: \"0x1::aptos_coin::AptosCoin\"\n * });\n *\n * console.log(resource);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return getResource<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Looks up the account address for a given authentication key, handling both rotated and non-rotated keys.\n *\n * @param args.authenticationKey - The authentication key for which to look up the account address.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Promise<AccountAddress> - The account address associated with the authentication key.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Look up the original account address for a given authentication key\n * const accountAddress = await aptos.lookupOriginalAccountAddress({\n * authenticationKey: \"0x1\", // replace with a real authentication key\n * });\n *\n * console.log(\"Original Account Address:\", accountAddress);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async lookupOriginalAccountAddress(args: {\n authenticationKey: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: LedgerVersionArg;\n }): Promise<AccountAddress> {\n return lookupOriginalAccountAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the current count of tokens owned by a specified account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address to query the token count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The current count of tokens owned by the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of tokens owned by the account\n * const tokensCount = await aptos.getAccountTokensCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(`Tokens Count: ${tokensCount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTokensCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTokensCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the tokens currently owned by a specified account, including NFTs and fungible tokens.\n * If desired, you can filter the results by a specific token standard.\n *\n * @param args.accountAddress The account address for which to retrieve owned tokens.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard Optional filter for the NFT standard to query for.\n * @param args.options.offset Optional number to start returning results from.\n * @param args.options.limit Optional number of results to return.\n * @param args.options.orderBy Optional order to sort the tokens by.\n * @returns An array of tokens with their respective data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the tokens owned by a specific account\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify how many tokens to return\n * orderBy: \"created_at\", // specify the order of the results\n * },\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all current tokens of a specific collection that an account owns by the collection address.\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the tokens for.\n * @param args.collectionAddress - The address of the collection being queried.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to, before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number token to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Tokens array with the token data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get tokens owned by a specific account in a specific collection\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({\n * accountAddress: \"0x1\", // replace with a real account address\n * collectionAddress: \"0x2\", // replace with a real collection address\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokensFromCollectionAddress(args: {\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokensFromCollectionAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for all collections that an account currently has tokens for, including NFTs, fungible tokens, and soulbound tokens.\n * If you want to filter by a specific token standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the collections for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number of the collection to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Collections array with the collections data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get account collections with owned tokens for a specific account\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * tokenStandard: \"NFT\", // specify the token standard if needed\n * limit: 10, // specify the number of results to return\n * },\n * });\n *\n * console.log(accountCollectionsWithOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCollectionsWithOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountCollectionsWithOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of transactions submitted by an account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address we want to get the total count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns Current count of transactions made by an account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of transactions for a specific account\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * });\n *\n * console.log(accountTransactionsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactionsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the coins data for a specified account.\n *\n * @param args.accountAddress - The account address for which to retrieve the coin's data.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.offset - Optional. The number of coins to start returning results from.\n * @param args.options.limit - Optional. The number of results to return.\n * @param args.options.orderBy - Optional. The order to sort the coins by.\n * @param args.options.where - Optional. Filter the results by specific criteria.\n * @returns An array containing the coins data for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching coins data for a specific account\n * const accountCoinsData = await aptos.getAccountCoinsData({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of results to return\n * orderBy: { asset_type: \"asc\" }, // specify the order of results\n * },\n * });\n *\n * console.log(accountCoinsData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs &\n OrderByArg<GetAccountCoinsDataResponse[0]> &\n WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetAccountCoinsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsData({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the current count of an account's coins aggregated across all types.\n *\n * @param args The parameters for the account coins count query.\n * @param args.accountAddress The account address we want to get the total count for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current count of the aggregated coins for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the account coins count for a specific account\n * const accountCoinsCount = await aptos.getAccountCoinsCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account Coins Count:\", accountCoinsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current amount of APT for a specified account. If the account does not exist, it will return 0.\n *\n * @param args The arguments for the account query.\n * @param args.accountAddress The account address for which to retrieve the APT amount.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current amount of APT for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the APT amount for a specific account\n * const accountAPTAmount = await aptos.getAccountAPTAmount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account APT Amount:\", accountAPTAmount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountAPTAmount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n return this.getAccountCoinAmount({ coinType: APTOS_COIN, faMetadataAddress: APTOS_FA, ...args });\n }\n\n /**\n * Queries the current amount of a specified coin held by an account.\n *\n * @deprecated Use `getBalance({ accountAddress, asset })` instead.\n * This method is slated for removal in a future release.\n *\n * @param args The parameters for querying the account's coin amount.\n * @param args.accountAddress The account address to query for the coin amount.\n * @param args.coinType The coin type to query. Note: If not provided, it may be automatically populated if `faMetadataAddress`\n * is specified.\n * @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically\n * populated if `coinType` is specified.\n * @returns The current amount of the specified coin held by the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Prefer the new API\n * const amount = await aptos.getBalance({ accountAddress: \"0x1\", asset: \"0x1::aptos_coin::AptosCoin\" });\n * console.log(`Balance: ${amount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType?: MoveStructId;\n faMetadataAddress?: AccountAddressInput;\n }): Promise<number> {\n const { accountAddress, coinType, faMetadataAddress } = args;\n\n // Attempt to populate the CoinType field if the FA address is provided.\n // We cannot do this internally due to dependency cycles issue.\n let coinAssetType: MoveStructId | undefined = coinType;\n if (coinType === undefined && faMetadataAddress !== undefined) {\n coinAssetType = await memoizeAsync(\n async () => {\n try {\n const pairedCoinTypeStruct = (\n await view<[{ vec: [MoveStructId] }]>({\n aptosConfig: this.config,\n payload: { function: \"0x1::coin::paired_coin\", functionArguments: [faMetadataAddress] },\n })\n )[0];\n\n // Check if the Option has a value, and if so, parse the struct\n if (pairedCoinTypeStruct.vec.length > 0 && isEncodedStruct(pairedCoinTypeStruct.vec[0])) {\n return parseEncodedStruct(pairedCoinTypeStruct.vec[0]);\n }\n } catch (error) {\n /* No paired coin type found */\n }\n return undefined;\n },\n `coin-mapping-${faMetadataAddress.toString()}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n }\n\n let faAddress: string;\n\n if (coinType !== undefined && faMetadataAddress !== undefined) {\n faAddress = AccountAddress.from(faMetadataAddress).toStringLong();\n } else if (coinType !== undefined && faMetadataAddress === undefined) {\n // TODO Move to a separate function as defined in the AIP for coin migration\n if (coinType === APTOS_COIN) {\n faAddress = AccountAddress.A.toStringLong();\n } else {\n faAddress = createObjectAddress(AccountAddress.A, coinType).toStringLong();\n }\n } else if (coinType === undefined && faMetadataAddress !== undefined) {\n const addr = AccountAddress.from(faMetadataAddress);\n faAddress = addr.toStringLong();\n if (addr === AccountAddress.A) {\n coinAssetType = APTOS_COIN;\n }\n // The paired CoinType should be populated outside of this function in another\n // async call. We cannot do this internally due to dependency cycles issue.\n } else {\n throw new Error(\"Either coinType, faMetadataAddress, or both must be provided\");\n }\n\n // When there is a coin mapping, use that first, otherwise use the fungible asset address\n // TODO: This function's signature at the top, returns number, but it could be greater than can be represented\n if (coinAssetType !== undefined) {\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::coin::balance\",\n typeArguments: [coinAssetType],\n functionArguments: [accountAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::primary_fungible_store::balance\",\n typeArguments: [\"0x1::object::ObjectCore\"],\n functionArguments: [accountAddress, faAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n\n /**\n * Retrieves the balance for an account and asset.\n *\n * @param args The parameters for the balance query.\n * @param args.accountAddress The account address to query.\n * @param args.asset The asset to query: Move struct ID (e.g., `0x1::aptos_coin::AptosCoin`) or FA metadata address.\n * @returns The balance as a number.\n *\n * @example\n * ```ts\n * const aptos = new Aptos(new AptosConfig());\n * // APT coin by type\n * const apt = await aptos.getBalance({ accountAddress: \"0x1\", asset: \"0x1::aptos_coin::AptosCoin\" });\n * // Some FA by metadata address\n * const fa = await aptos.getBalance({ accountAddress: \"0x1\", asset: \"0xa\" });\n * ```\n * @group Account\n */\n async getBalance(args: {\n accountAddress: AccountAddressInput;\n asset: MoveStructId | AccountAddressInput;\n }): Promise<number> {\n return getBalance({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries an account's owned objects.\n *\n * @param args.accountAddress The account address we want to get the objects for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.offset The starting position to start returning results from.\n * @param args.options.limit The number of results to return.\n * @param args.options.orderBy The order to sort the objects by.\n * @returns Objects array with the object data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the objects owned by the specified account\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: {\n * offset: 0, // optional, specify if needed\n * limit: 10, // optional, specify if needed\n * orderBy: \"created_at\", // optional, specify if needed\n * },\n * });\n *\n * console.log(accountOwnedObjects);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getAccountOwnedObjects({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Derives an account by providing a private key. This function resolves the provided private key type and derives the public\n * key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and auth key using the SingleKey\n * scheme locally.\n * If the privateKey is an ED25519 type, it looks up the authentication key on chain to determine whether it is a Legacy ED25519\n * key or a Unified ED25519 key, and then derives the account based on that.\n *\n * @param args - The arguments for deriving the account.\n * @param args.privateKey - An account private key.\n * @returns The derived Account type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519PrivateKey } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Deriving an account from a private key\n * const account = await aptos.deriveAccountFromPrivateKey({\n * privateKey: new Ed25519PrivateKey(\"0x123\") // replace with a real private key\n * });\n *\n * console.log(account);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n * @deprecated Note that more inspection is needed by the user to determine which account exists on-chain\n */\n async deriveAccountFromPrivateKey(args: {\n privateKey: PrivateKeyInput;\n minimumLedgerVersion?: AnyNumber;\n options?: {\n throwIfNoAccountFound?: boolean;\n };\n }): Promise<AccountModule> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,\n });\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.OBJECT_PROCESSOR,\n });\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Derives all accounts owned by a signer. This function takes a signer (either an Account or PrivateKey)\n * and returns all accounts that can be derived from it, ordered by the most recently used account first.\n *\n * Note, this function will not return accounts that require more than one signer to be used.\n *\n * @param args - The arguments for deriving owned accounts\n * @param args.signer - The signer to derive accounts from (Account or PrivateKey)\n * @param args.minimumLedgerVersion - The minimum ledger version to wait for before querying\n * @param args.options.includeUnverified - Whether to include unverified accounts in the results. Unverified accounts\n * are accounts that can be authenticated with the signer, but there is no history of the signer using the account.\n * Default is false.\n * @param args.options.noMultiKey - If true, do not include multi-key accounts in the results. Default is false.\n * @returns Promise resolving to an array of derived Account objects\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function getOwnedAccounts() {\n * const signer = Ed25519Account.generate();\n * const accounts = await aptos.deriveOwnedAccountsFromSigner({\n * signer\n * });\n * const account = accounts[0];\n * console.log(account);\n * }\n * ```\n * @group Account\n */\n async deriveOwnedAccountsFromSigner(args: {\n signer: AccountModule | PrivateKeyInput;\n minimumLedgerVersion?: AnyNumber;\n options?: { includeUnverified?: boolean; noMultiKey?: boolean };\n }): Promise<AccountModule[]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,\n });\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.OBJECT_PROCESSOR,\n });\n return deriveOwnedAccountsFromSigner({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Gets all account info (address, account public key, last transaction version) that have are associated with a public key and **related public keys**\n *\n * For a given public key, it will query all multikeys that the public key is part of. Then for the provided public key and\n * any multikeys found in the previous step, it will query for any accounts that have an auth key that matches any of the\n * public keys.\n *\n * Note: If an Ed25519PublicKey or an AnyPublicKey that wraps Ed25519PublicKey is passed in, it will query for both legacy and single singer cases.\n *\n * @param args - The arguments for getting accounts for a public key\n * @param args.publicKey - The public key to look up accounts for\n * @param args.minimumLedgerVersion - The minimum ledger version to wait for before querying\n * @param args.options.includeUnverified - Whether to include unverified accounts in the results. Unverified accounts\n * are accounts that can be authenticated with the signer, but there is no history of the signer using the account. Default\n * is false.\n * @param args.options.noMultiKey - Whether to exclude multi-key accounts in the results. Default is false.\n * @returns Promise resolving to an array of account addresses and their associated public keys\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519PrivateKey } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function getAccounts() {\n * const privateKey = Ed25519PrivateKey.generate();\n * const publicKey = privateKey.publicKey();\n * const accounts = await aptos.getAccountsForPublicKey({\n * publicKey\n * });\n * console.log(accounts);\n * }\n * ```\n * @group Account\n */\n async getAccountsForPublicKey(args: {\n publicKey: BaseAccountPublicKey;\n minimumLedgerVersion?: AnyNumber;\n options?: { includeUnverified?: boolean; noMultiKey?: boolean };\n }): Promise<AccountInfo[]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_RESTORATION_PROCESSOR,\n });\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.OBJECT_PROCESSOR,\n });\n return getAccountsForPublicKey({\n aptosConfig: this.config,\n ...args,\n });\n }\n}\n"],"mappings":"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","names":["AccountAddress","createObjectAddress","deriveAccountFromPrivateKey","getAccountCoinsCount","getAccountCoinsData","getAccountCollectionsWithOwnedTokens","getAccountOwnedObjects","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountsForPublicKey","getAccountTokensCount","getAccountTransactionsCount","getBalance","getInfo","getModule","getModules","getModulesPage","getResource","getResources","getResourcesPage","getTransactions","lookupOriginalAccountAddress","deriveOwnedAccountsFromSigner","APTOS_COIN","APTOS_FA","ProcessorType","waitForIndexerOnVersion","view","isEncodedStruct","parseEncodedStruct","memoizeAsync","AccountAbstraction","Account","config","args","accountAddress","coinType","faMetadataAddress","coinAssetType","pairedCoinTypeStruct","faAddress","addr","balanceStr"]}
|
package/dist/esm/api/ans.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetANSNameResponse } from '../types/indexer.mjs';
|
|
2
|
-
import { A as AptosConfig, n as AccountAddress, m as AccountAddressInput, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-
|
|
3
|
-
import { A as Account } from '../Ed25519Account-
|
|
2
|
+
import { A as AptosConfig, n as AccountAddress, m as AccountAddressInput, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-BortO8g2.mjs';
|
|
3
|
+
import { A as Account } from '../Ed25519Account-CPwej6wB.mjs';
|
|
4
4
|
import { RegisterNameParameters, GetAccountNamesArgs, GetAccountDomainsArgs, GetAccountSubdomainsArgs, GetDomainSubdomainsArgs } from '../internal/ans.mjs';
|
|
5
5
|
import '../types/generated/operations.mjs';
|
|
6
6
|
import '../types/generated/types.mjs';
|
package/dist/esm/api/ans.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getExpiration as e,getOwnerAddress as s,registerName as t,getPrimaryName as o,setPrimaryName as r,getTargetAddress as i,setTargetAddress as a,renewDomain as m,getName as c,getAccountDomains as g,getAccountSubdomains as u,getAccountNames as p,getDomainSubdomains as A}from"../internal/ans";class k{constructor(n){this.config=n}async getOwnerAddress(n){return s({aptosConfig:this.config,...n})}async getExpiration(n){return e({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return t({aptosConfig:this.config,...n})}async renewDomain(n){return m({aptosConfig:this.config,...n})}async getName(n){return c({aptosConfig:this.config,...n})}async getAccountNames(n){return p({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return A({aptosConfig:this.config,...n})}}export{k as ANS};
|
|
2
2
|
//# sourceMappingURL=ans.mjs.map
|
package/dist/esm/api/ans.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/ans.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../account\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport {\n RegisterNameParameters,\n getExpiration,\n getOwnerAddress,\n registerName,\n getPrimaryName,\n setPrimaryName,\n getTargetAddress,\n setTargetAddress,\n renewDomain,\n getName,\n getAccountDomains,\n GetAccountDomainsArgs,\n GetAccountSubdomainsArgs,\n getAccountSubdomains,\n getAccountNames,\n GetAccountNamesArgs,\n getDomainSubdomains,\n GetDomainSubdomainsArgs,\n} from \"../internal/ans\";\nimport { GetANSNameResponse } from \"../types\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to handle all `ANS` operations.\n * @group ANS\n */\nexport class ANS {\n /**\n * Initializes a new instance of the Aptos class with the provided configuration.\n * This allows you to interact with the Aptos blockchain using the specified network settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., mainnet, testnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n * @param config.faucetUrl - The URL of the faucet to use for funding accounts.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for connecting to the Aptos testnet\n * const config = new AptosConfig({ network: Network.TESTNET });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Retrieve the owner address of a specified domain name or subdomain name from the contract.\n *\n * @param args - The arguments for retrieving the owner address.\n * @param args.name - A string representing the name of the domain or subdomain to retrieve the owner address for.\n *\n * @returns AccountAddress if the name is owned, undefined otherwise.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve the owner address of \"test.aptos\"\n * const owner = await aptos.getOwnerAddress({ name: \"test.aptos\" });\n * console.log(owner); // Logs the owner address or undefined if not owned\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getOwnerAddress(args: { name: string }): Promise<AccountAddress | undefined> {\n return getOwnerAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the expiration time of a domain name or subdomain name from the contract.\n *\n * @param args - The arguments for retrieving the expiration.\n * @param args.name - A string of the name to retrieve.\n *\n * @returns number as a unix timestamp in milliseconds.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the expiration time for the domain \"test.aptos\"\n * const exp = await aptos.getExpiration({ name: \"test.aptos\" });\n *\n * // Log the expiration date\n * console.log(new Date(exp)); // Outputs the expiration date\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getExpiration(args: { name: string }): Promise<number | undefined> {\n return getExpiration({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the target address of a domain or subdomain name, which indicates the address the name points to for use on-chain.\n * Note that the target address can point to addresses that do not own the name.\n *\n * @param args - The arguments for retrieving the target address.\n * @param args.name - A string representing the name, which can be a primary name, a subdomain, or a combination (e.g.,\n * \"primary\", \"primary.apt\", \"secondary.primary\", \"secondary.primary.apt\").\n *\n * @returns AccountAddress if the name has a target, undefined otherwise.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve the target address for the specified domain name\n * const targetAddr = await aptos.getTargetAddress({ name: \"test.aptos\" });\n *\n * console.log(targetAddr); // Logs the target address, e.g., 0x123...\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getTargetAddress(args: { name: string }): Promise<AccountAddress | undefined> {\n return getTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the target address of a domain or subdomain name, pointing it to a specified address for use on-chain.\n * The target address can be different from the owner of the name.\n *\n * @param args - The arguments for setting the target address.\n * @param args.sender - The account initiating the transaction.\n * @param args.name - A string representing the domain or subdomain name (e.g., \"test.aptos\").\n * @param args.address - The AccountAddressInput of the address to set the domain or subdomain to.\n * @param args.options - Optional settings for generating the transaction.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Setting the target address for a domain name\n * const sender = Account.generate(); // replace with a real account\n * const address = \"0x1\"; // replace with a real account address\n *\n * await aptos.setTargetAddress({\n * sender: sender,\n * name: \"test.aptos\",\n * address: address,\n * });\n *\n * const targetAddress = await aptos.getTargetAddress({ name: \"test.aptos\" });\n * console.log(targetAddress); // Should log the address set for \"test.aptos\"\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async setTargetAddress(args: {\n sender: Account;\n name: string;\n address: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return setTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the primary name for an account. An account can have multiple names, but only one primary name, which may not exist.\n *\n * @param args - The arguments for retrieving the primary name.\n * @param args.address - An AccountAddressInput (address) of the account.\n *\n * @returns A string if the account has a primary name, undefined otherwise.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve the primary name for the specified account address\n * const name = await aptos.getPrimaryName({ address: \"0x1\" }); // replace with a real account address\n * console.log(name);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getPrimaryName(args: { address: AccountAddressInput }): Promise<string | undefined> {\n return getPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the primary name for the sender account, allowing them to designate a single primary name among potentially multiple\n * names. An account may not have a primary name.\n *\n * @param args - The arguments for setting the primary name.\n * @param args.sender - The sender account.\n * @param args.name - A string representing the name to set as primary (e.g., \"test.aptos\").\n * @param args.options - Optional transaction options.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Set the primary name for the sender account\n * const sender = Account.generate(); // replace with a real account\n * await aptos.setPrimaryName({ sender, name: \"test.aptos\" });\n *\n * const primaryName = await aptos.getPrimaryName({ address: sender.accountAddress });\n * console.log(\"Primary Name:\", primaryName); // Should log: \"Primary Name: test.aptos\"\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async setPrimaryName(args: {\n sender: Account;\n name?: string;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return setPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Registers a new name.\n *\n * This function allows you to register a domain or subdomain name with specific expiration policies and options.\n *\n * @param args.sender - The sender account.\n * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix. Examples include:\n * \"test\", \"test.apt\", \"test.aptos.apt\", etc.\n * @param args.expiration - An object with the expiration policy of the name.\n * @param args.expiration.policy - 'domain' | 'subdomain:follow-domain' | 'subdomain:independent'.\n * - domain: Years is required and the name will expire after the given number of years.\n * - subdomain:follow-domain: The name will expire at the same time as the domain name.\n * - subdomain:independent: The name will expire at the given date.\n * @param args.expiration.expirationDate - An epoch number in milliseconds of the date when the subdomain will expire. Only\n * applicable when the policy is set to 'subdomain:independent'.\n * @param args.transferable - Determines if the subdomain being minted is soul-bound. Applicable only to subdomains.\n * @param args.targetAddress optional - The address the domain name will resolve to. If not provided, the sender's address will\n * be used.\n * @param args.toAddress optional - The address to send the domain name to. If not provided, the transaction will be sent to the\n * router.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Registering a subdomain name assuming def.apt is already registered and belongs to the sender alice.\n * const txn = await aptos.registerName({\n * sender: \"0x1\", // replace with a real sender account\n * name: \"test.aptos.apt\",\n * expiration: {\n * policy: \"subdomain:independent\",\n * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000, // expires in 30 days\n * },\n * });\n *\n * console.log(\"Transaction:\", txn);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async registerName(args: Omit<RegisterNameParameters, \"aptosConfig\">): Promise<SimpleTransaction> {\n return registerName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Renews a domain name for one year.\n * If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.\n *\n * @param args - The arguments for renewing the domain.\n * @param args.sender - The sender account, which must be the domain owner.\n * @param args.name - A string representing the domain to renew. Subdomains cannot be renewed.\n * @param args.years - The number of years to renew the name. Currently, only one year is permitted.\n * @param args.options - Optional transaction options.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Renew the domain \"test\" for one year\n * const transaction = await aptos.renewDomain({\n * sender: Account.generate(), // replace with a real account\n * name: \"test\"\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async renewDomain(args: {\n sender: Account;\n name: string;\n years?: 1;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return renewDomain({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches a single name from the indexer based on the provided name argument.\n *\n * @param args - The arguments for retrieving the name.\n * @param args.name - A string of the name to retrieve, e.g. \"test.aptos.apt\" or \"test.apt\" or \"test\".\n * Can be inclusive or exclusive of the .apt suffix and can be a subdomain.\n *\n * @returns A promise of an ANSName or undefined if the name is not active.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching a name from the indexer\n * const name = await aptos.getName({ name: \"test.aptos\" }); // replace with a real name\n * console.log(name);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getName(args: { name: string }): Promise<GetANSNameResponse[0] | undefined> {\n return getName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all names for an account, including both top-level domains and subdomains.\n *\n * @param args - The arguments for fetching account names.\n * @param args.accountAddress - An AccountAddressInput of the address to retrieve names for.\n * @param args.options - Optional parameters for fetching names.\n * @param args.options.offset - Optional, the offset to start from when fetching names.\n * @param args.options.limit - Optional, a number of the names to fetch per request.\n * @param args.options.orderBy - The order to sort the names by.\n * @param args.options.where - Additional filters to apply to the query.\n *\n * @returns A promise of an array of ANSName.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch account names for a specific address\n * const accountNames = await aptos.getAccountNames({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify how many names to fetch\n * orderBy: \"name\", // specify the order by which to sort the names\n * },\n * });\n *\n * console.log(accountNames);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getAccountNames(args: GetAccountNamesArgs): Promise<GetANSNameResponse> {\n return getAccountNames({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all top-level domain names for a specified account.\n *\n * @param args - The arguments for retrieving account domains.\n * @param args.accountAddress - An AccountAddressInput of the address to retrieve domain names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names.\n * @param args.options.limit - Optional, a number of the names to fetch per request.\n * @param args.options.orderBy - The order to sort the names by.\n * @param args.options.where - Additional filters to apply to the query.\n *\n * @returns A promise of an array of ANSName.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching all top-level domain names for a specific account\n * const domains = await aptos.getAccountDomains({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of names to fetch\n * offset: 0, // specify the offset for pagination\n * orderBy: \"created_at\", // specify the order by which to sort the names\n * where: {\n * // additional filters can be specified here\n * },\n * },\n * });\n *\n * console.log(domains);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getAccountDomains(args: GetAccountDomainsArgs): Promise<GetANSNameResponse> {\n return getAccountDomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomain names for a specified account.\n *\n * @param args - The arguments for retrieving subdomains.\n * @param args.accountAddress - The address to retrieve subdomain names for.\n * @param args.options - Optional parameters for fetching subdomains.\n * @param args.options.offset - The offset to start from when fetching names.\n * @param args.options.limit - The number of names to fetch per request.\n * @param args.options.orderBy - The order to sort the names by.\n * @param args.options.where - Additional filters to apply to the query.\n *\n * @returns A promise of an array of ANSName.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching subdomain names for a specific account\n * const subdomains = await aptos.getAccountSubdomains({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of subdomains to fetch\n * offset: 0, // specify the offset for pagination\n * orderBy: \"name\", // specify the order by which to sort the names\n * },\n * });\n *\n * console.log(subdomains);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<GetANSNameResponse> {\n return getAccountSubdomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomain names for a given domain, excluding the domain itself.\n *\n * @param args - The arguments for fetching subdomains.\n * @param args.domain - A string of the domain name, e.g., \"test.apt\" or \"test\" (without the suffix of .apt).\n * @param args.options - Optional parameters for fetching subdomains.\n * @param args.options.offset - Optional, the offset to start from when fetching names.\n * @param args.options.limit - Optional, the number of names to fetch per request.\n * @param args.options.orderBy - The order to sort the names by.\n * @param args.options.where - Additional filters to apply to the query.\n *\n * @returns A promise that resolves to an array of ANSName.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching subdomains for a specific domain\n * const subdomains = await aptos.getDomainSubdomains({\n * domain: \"test\", // replace with your domain\n * options: {\n * limit: 10, // specify the number of subdomains to fetch\n * offset: 0, // specify the starting point for fetching\n * orderBy: \"name\", // specify the order by which to sort the results\n * },\n * });\n *\n * console.log(subdomains);\n * }\n * runExample().catch(console.error);\n * ```\n * @group ANS\n */\n async getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<GetANSNameResponse> {\n return getDomainSubdomains({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAKA,OAEE,iBAAAA,EACA,mBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,kBAAAC,EACA,oBAAAC,EACA,oBAAAC,EACA,eAAAC,EACA,WAAAC,EACA,qBAAAC,EAGA,wBAAAC,EACA,mBAAAC,EAEA,uBAAAC,MAEK,kBAUA,MAAMC,CAAI,CA2Bf,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CA0B3C,MAAM,gBAAgBC,EAA6D,CACjF,OAAOd,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGc,CAAK,CAAC,CAC9D,CA4BA,MAAM,cAAcA,EAAqD,CACvE,OAAOf,EAAc,CAAE,YAAa,KAAK,OAAQ,GAAGe,CAAK,CAAC,CAC5D,CA6BA,MAAM,iBAAiBA,EAA6D,CAClF,OAAOV,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGU,CAAK,CAAC,CAC/D,CAuCA,MAAM,iBAAiBA,EAKQ,CAC7B,OAAOT,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGS,CAAK,CAAC,CAC/D,CA0BA,MAAM,eAAeA,EAAqE,CACxF,OAAOZ,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGY,CAAK,CAAC,CAC7D,CAgCA,MAAM,eAAeA,EAIU,CAC7B,OAAOX,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGW,CAAK,CAAC,CAC7D,CAiDA,MAAM,aAAaA,EAA+E,CAChG,OAAOb,EAAa,CAAE,YAAa,KAAK,OAAQ,GAAGa,CAAK,CAAC,CAC3D,CAkCA,MAAM,YAAYA,EAKa,CAC7B,OAAOR,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGQ,CAAK,CAAC,CAC1D,CA2BA,MAAM,QAAQA,EAAoE,CAChF,OAAOP,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGO,CAAK,CAAC,CACtD,CAsCA,MAAM,gBAAgBA,EAAwD,CAC5E,OAAOJ,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGI,CAAK,CAAC,CAC9D,CAyCA,MAAM,kBAAkBA,EAA0D,CAChF,OAAON,EAAkB,CAAE,YAAa,KAAK,OAAQ,GAAGM,CAAK,CAAC,CAChE,CAuCA,MAAM,qBAAqBA,EAA6D,CACtF,OAAOL,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,CACnE,CAuCA,MAAM,oBAAoBA,EAA4D,CACpF,OAAOH,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGG,CAAK,CAAC,CAClE,CACF","names":["getExpiration","getOwnerAddress","registerName","getPrimaryName","setPrimaryName","getTargetAddress","setTargetAddress","renewDomain","getName","getAccountDomains","getAccountSubdomains","getAccountNames","getDomainSubdomains","ANS","config","args"]}
|
package/dist/esm/api/aptos.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Account } from './account.mjs';
|
|
2
|
-
import { A as AptosConfig } from '../account-
|
|
2
|
+
import { A as AptosConfig } from '../account-BortO8g2.mjs';
|
|
3
3
|
import { Coin } from './coin.mjs';
|
|
4
4
|
import { DigitalAsset } from './digitalAsset.mjs';
|
|
5
5
|
import { Faucet } from './faucet.mjs';
|
|
@@ -14,7 +14,7 @@ import { AptosObject } from './object.mjs';
|
|
|
14
14
|
import '../types/indexer.mjs';
|
|
15
15
|
import '../types/generated/operations.mjs';
|
|
16
16
|
import '../types/generated/types.mjs';
|
|
17
|
-
import '../Ed25519Account-
|
|
17
|
+
import '../Ed25519Account-CPwej6wB.mjs';
|
|
18
18
|
import '../core/crypto/types.mjs';
|
|
19
19
|
import '../utils/apiEndpoints.mjs';
|
|
20
20
|
import '../utils/const.mjs';
|
|
@@ -33,7 +33,7 @@ import 'eventemitter3';
|
|
|
33
33
|
import '../transactions/management/transactionWorker.mjs';
|
|
34
34
|
import '../transactions/management/accountSequenceNumber.mjs';
|
|
35
35
|
import '../transactions/management/asyncQueue.mjs';
|
|
36
|
-
import '../federatedKeyless-
|
|
36
|
+
import '../federatedKeyless-CTzDAQTu.mjs';
|
|
37
37
|
import '../core/crypto/ephemeral.mjs';
|
|
38
38
|
import '../core/crypto/proof.mjs';
|
|
39
39
|
import '../types/keyless.mjs';
|
package/dist/esm/api/aptos.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Account as r}from"./account";import{AptosConfig as k}from"./aptosConfig";import{Coin as a}from"./coin";import{DigitalAsset as c}from"./digitalAsset";import{Faucet as l}from"./faucet";import{FungibleAsset as f}from"./fungibleAsset";import{General as g}from"./general";import{ANS as p}from"./ans";import{Staking as u}from"./staking";import{Transaction as b}from"./transaction";import{Table as m}from"./table";import{Keyless as h}from"./keyless";import{AptosObject as A}from"./object";import{AccountAbstraction as y}from"./account/abstraction";class t{constructor(n){O(),this.config=n??new k,this.account=new r(this.config),this.abstraction=new y(this.config),this.ans=new p(this.config),this.coin=new a(this.config),this.digitalAsset=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new u(this.config),this.transaction=new b(this.config),this.table=new m(this.config),this.keyless=new h(this.config),this.object=new A(this.config)}setIgnoreTransactionSubmitter(n){this.config.setIgnoreTransactionSubmitter(n)}}function e(s,n,w){Object.getOwnPropertyNames(n.prototype).forEach(o=>{const i=Object.getOwnPropertyDescriptor(n.prototype,o);i&&Object.defineProperty(s.prototype,o,{value:function(...j){return this[w][o](...j)},writable:i.writable,configurable:i.configurable,enumerable:i.enumerable})})}let d=!1;function O(){d||(e(t,r,"account"),e(t,y,"abstraction"),e(t,p,"ans"),e(t,a,"coin"),e(t,c,"digitalAsset"),e(t,Event,"event"),e(t,l,"faucet"),e(t,f,"fungibleAsset"),e(t,g,"general"),e(t,u,"staking"),e(t,b,"transaction"),e(t,m,"table"),e(t,h,"keyless"),e(t,A,"object"),d=!0)}export{t as Aptos};
|
|
2
2
|
//# sourceMappingURL=aptos.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/aptos.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"./account\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { Coin } from \"./coin\";\nimport { DigitalAsset } from \"./digitalAsset\";\nimport { Faucet } from \"./faucet\";\nimport { FungibleAsset } from \"./fungibleAsset\";\nimport { General } from \"./general\";\nimport { ANS } from \"./ans\";\nimport { Staking } from \"./staking\";\nimport { Transaction } from \"./transaction\";\nimport { Table } from \"./table\";\nimport { Keyless } from \"./keyless\";\nimport { AptosObject } from \"./object\";\nimport { AccountAbstraction } from \"./account/abstraction\";\n\n/**\n * The main entry point for interacting with the Aptos APIs,\n * providing access to various functionalities organized into\n * distinct namespaces.\n *\n * To utilize the SDK, instantiate a new Aptos object to gain\n * access to the complete range of SDK features.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for connecting to the Aptos testnet\n * const config = new AptosConfig({ network: Network.TESTNET });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\nexport class Aptos {\n readonly config: AptosConfig;\n\n readonly account: Account;\n\n readonly ans: ANS;\n\n readonly coin: Coin;\n\n readonly digitalAsset: DigitalAsset;\n\n readonly faucet: Faucet;\n\n readonly fungibleAsset: FungibleAsset;\n\n readonly general: General;\n\n readonly staking: Staking;\n\n readonly transaction: Transaction;\n\n readonly table: Table;\n\n readonly keyless: Keyless;\n\n readonly object: AptosObject;\n\n /**\n * Initializes a new instance of the Aptos client with the provided configuration settings.\n * This allows you to interact with various Aptos functionalities such as accounts, transactions, and events.\n *\n * @param settings - Configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with default settings\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own settings if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n constructor(config?: AptosConfig) {\n ensureMixinsApplied();\n this.config = config ?? new AptosConfig();\n this.account = new Account(this.config);\n this.abstraction = new AccountAbstraction(this.config);\n this.ans = new ANS(this.config);\n this.coin = new Coin(this.config);\n this.digitalAsset = new DigitalAsset(this.config);\n this.faucet = new Faucet(this.config);\n this.fungibleAsset = new FungibleAsset(this.config);\n this.general = new General(this.config);\n this.staking = new Staking(this.config);\n this.transaction = new Transaction(this.config);\n this.table = new Table(this.config);\n this.keyless = new Keyless(this.config);\n this.object = new AptosObject(this.config);\n }\n\n setIgnoreTransactionSubmitter(ignore: boolean) {\n this.config.setIgnoreTransactionSubmitter(ignore);\n }\n}\n\n// extends Aptos interface so all the methods and properties\n// from the other classes will be recognized by typescript.\nexport interface Aptos\n extends Account,\n ANS,\n Coin,\n DigitalAsset,\n Event,\n Faucet,\n FungibleAsset,\n General,\n Keyless,\n Staking,\n Table,\n AptosObject,\n Omit<Transaction, \"build\" | \"simulate\" | \"submit\" | \"batch\"> {}\n\n/**\nIn TypeScript, we can’t inherit or extend from more than one class,\nMixins helps us to get around that by creating a partial classes\nthat we can combine to form a single class that contains all the methods and properties from the partial classes.\n{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}\n\nHere, we combine any subclass and the Aptos class.\n * @group Client\n*/\nfunction applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {\n // Mixin instance methods\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor) return;\n\n // Define new method that calls through baseClassProp\n Object.defineProperty(targetClass.prototype, propertyName, {\n value: function (...args: any[]) {\n return (this as any)[baseClassProp][propertyName](...args);\n },\n writable: propertyDescriptor.writable,\n configurable: propertyDescriptor.configurable,\n enumerable: propertyDescriptor.enumerable,\n });\n });\n}\n\nlet mixinsApplied = false;\n\nfunction ensureMixinsApplied() {\n if (mixinsApplied) {\n return;\n }\n\n applyMixin(Aptos, Account, \"account\");\n applyMixin(Aptos, AccountAbstraction, \"abstraction\");\n applyMixin(Aptos, ANS, \"ans\");\n applyMixin(Aptos, Coin, \"coin\");\n applyMixin(Aptos, DigitalAsset, \"digitalAsset\");\n applyMixin(Aptos, Event, \"event\");\n applyMixin(Aptos, Faucet, \"faucet\");\n applyMixin(Aptos, FungibleAsset, \"fungibleAsset\");\n applyMixin(Aptos, General, \"general\");\n applyMixin(Aptos, Staking, \"staking\");\n applyMixin(Aptos, Transaction, \"transaction\");\n applyMixin(Aptos, Table, \"table\");\n applyMixin(Aptos, Keyless, \"keyless\");\n applyMixin(Aptos, AptosObject, \"object\");\n\n mixinsApplied = true;\n}\n"],"mappings":"AAGA,OAAS,WAAAA,MAAe,YACxB,OAAS,eAAAC,MAAmB,gBAC5B,OAAS,QAAAC,MAAY,SACrB,OAAS,gBAAAC,MAAoB,iBAC7B,OAAS,UAAAC,MAAc,WACvB,OAAS,iBAAAC,MAAqB,kBAC9B,OAAS,WAAAC,MAAe,YACxB,OAAS,OAAAC,MAAW,QACpB,OAAS,WAAAC,MAAe,YACxB,OAAS,eAAAC,MAAmB,gBAC5B,OAAS,SAAAC,MAAa,UACtB,OAAS,WAAAC,MAAe,YACxB,OAAS,eAAAC,MAAmB,WAC5B,OAAS,sBAAAC,MAA0B,wBA2B5B,MAAMC,CAAM,CAgDjB,YAAYC,EAAsB,CAChCC,EAAoB,EACpB,KAAK,OAASD,GAAU,IAAId,EAC5B,KAAK,QAAU,IAAID,EAAQ,KAAK,MAAM,EACtC,KAAK,YAAc,IAAIa,EAAmB,KAAK,MAAM,EACrD,KAAK,IAAM,IAAIN,EAAI,KAAK,MAAM,EAC9B,KAAK,KAAO,IAAIL,EAAK,KAAK,MAAM,EAChC,KAAK,aAAe,IAAIC,EAAa,KAAK,MAAM,EAChD,KAAK,OAAS,IAAIC,EAAO,KAAK,MAAM,EACpC,KAAK,cAAgB,IAAIC,EAAc,KAAK,MAAM,EAClD,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,QAAU,IAAIE,EAAQ,KAAK,MAAM,EACtC,KAAK,YAAc,IAAIC,EAAY,KAAK,MAAM,EAC9C,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,OAAS,IAAIC,EAAY,KAAK,MAAM,CAC3C,CAEA,8BAA8BK,EAAiB,CAC7C,KAAK,OAAO,8BAA8BA,CAAM,CAClD,CACF,CA4BA,SAASC,EAAWC,EAAkBC,EAAgBC,EAAuB,CAE3E,OAAO,oBAAoBD,EAAU,SAAS,EAAE,QAASE,GAAiB,CACxE,MAAMC,EAAqB,OAAO,yBAAyBH,EAAU,UAAWE,CAAY,EACvFC,GAGL,OAAO,eAAeJ,EAAY,UAAWG,EAAc,CACzD,MAAO,YAAaE,EAAa,CAC/B,OAAQ,KAAaH,CAAa,EAAEC,CAAY,EAAE,GAAGE,CAAI,CAC3D,EACA,SAAUD,EAAmB,SAC7B,aAAcA,EAAmB,aACjC,WAAYA,EAAmB,UACjC,CAAC,CACH,CAAC,CACH,CAEA,IAAIE,EAAgB,GAEpB,SAAST,GAAsB,CACzBS,IAIJP,EAAWJ,EAAOd,EAAS,SAAS,EACpCkB,EAAWJ,EAAOD,EAAoB,aAAa,EACnDK,EAAWJ,EAAOP,EAAK,KAAK,EAC5BW,EAAWJ,EAAOZ,EAAM,MAAM,EAC9BgB,EAAWJ,EAAOX,EAAc,cAAc,EAC9Ce,EAAWJ,EAAO,MAAO,OAAO,EAChCI,EAAWJ,EAAOV,EAAQ,QAAQ,EAClCc,EAAWJ,EAAOT,EAAe,eAAe,EAChDa,EAAWJ,EAAOR,EAAS,SAAS,EACpCY,EAAWJ,EAAON,EAAS,SAAS,EACpCU,EAAWJ,EAAOL,EAAa,aAAa,EAC5CS,EAAWJ,EAAOJ,EAAO,OAAO,EAChCQ,EAAWJ,EAAOH,EAAS,SAAS,EACpCO,EAAWJ,EAAOF,EAAa,QAAQ,EAEvCa,EAAgB,GAClB","names":["Account","AptosConfig","Coin","DigitalAsset","Faucet","FungibleAsset","General","ANS","Staking","Transaction","Table","Keyless","AptosObject","AccountAbstraction","Aptos","config","ensureMixinsApplied","ignore","applyMixin","targetClass","baseClass","baseClassProp","propertyName","propertyDescriptor","args","mixinsApplied"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../
|
|
1
|
+
import t from"@aptos-labs/aptos-client";import{NetworkToNodeAPI as u,NetworkToFaucetAPI as f,NetworkToIndexerAPI as a,Network as r,NetworkToPepperAPI as o,NetworkToProverAPI as i}from"../utils/apiEndpoints";import{AptosApiType as n,DEFAULT_MAX_GAS_AMOUNT as l,DEFAULT_TXN_EXP_SEC_FROM_NOW as s}from"../utils/const";class I{constructor(e){if(e?.fullnode||e?.indexer||e?.faucet||e?.pepper||e?.prover){if(e?.network===r.CUSTOM)console.info("Note: using CUSTOM network will require queries to lookup ChainId");else if(!e?.network)throw new Error("Custom endpoints require a network to be specified")}this.network=e?.network??r.DEVNET,this.fullnode=e?.fullnode,this.faucet=e?.faucet,this.pepper=e?.pepper,this.prover=e?.prover,this.indexer=e?.indexer,this.client=e?.client??{provider:t},this.clientConfig=e?.clientConfig??{},this.fullnodeConfig=e?.fullnodeConfig??{},this.indexerConfig=e?.indexerConfig??{},this.faucetConfig=e?.faucetConfig??{},this.transactionGenerationConfig=e?.transactionGenerationConfig??{},this.pluginConfig=e?.pluginSettings?{...e.pluginSettings,IGNORE_TRANSACTION_SUBMITTER:!1}:void 0}getRequestUrl(e){switch(e){case n.FULLNODE:if(this.fullnode!==void 0)return this.fullnode;if(this.network===r.CUSTOM)throw new Error("Please provide a custom full node url");return u[this.network];case n.FAUCET:if(this.faucet!==void 0)return this.faucet;if(this.network===r.TESTNET)throw new Error("There is no way to programmatically mint testnet APT, you must use the minting site at https://aptos.dev/network/faucet");if(this.network===r.MAINNET)throw new Error("There is no mainnet faucet");if(this.network===r.CUSTOM)throw new Error("Please provide a custom faucet url");return f[this.network];case n.INDEXER:if(this.indexer!==void 0)return this.indexer;if(this.network===r.CUSTOM)throw new Error("Please provide a custom indexer url");return a[this.network];case n.PEPPER:if(this.pepper!==void 0)return this.pepper;if(this.network===r.CUSTOM)throw new Error("Please provide a custom pepper service url");return o[this.network];case n.PROVER:if(this.prover!==void 0)return this.prover;if(this.network===r.CUSTOM)throw new Error("Please provide a custom prover service url");return i[this.network];default:throw Error(`apiType ${e} is not supported`)}}isPepperServiceRequest(e){return o[this.network]===e}isProverServiceRequest(e){return i[this.network]===e}getDefaultMaxGasAmount(){return this.transactionGenerationConfig?.defaultMaxGasAmount??l}getDefaultTxnExpirySecFromNow(){return this.transactionGenerationConfig?.defaultTxnExpirySecFromNow??s}setIgnoreTransactionSubmitter(e){this.pluginConfig&&(this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER=e)}getTransactionSubmitter(){if(this.pluginConfig!==void 0&&this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER!==!0)return this.pluginConfig.TRANSACTION_SUBMITTER}}export{I as AptosConfig};
|
|
2
2
|
//# sourceMappingURL=aptosConfig.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/aptosConfig.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport aptosClient from \"@aptos-labs/aptos-client\";\nimport {\n AptosSettings,\n ClientConfig,\n Client,\n FullNodeConfig,\n IndexerConfig,\n FaucetConfig,\n TransactionGenerationConfig,\n PluginConfig,\n TransactionSubmitter,\n} from \"../types\";\nimport {\n NetworkToNodeAPI,\n NetworkToFaucetAPI,\n NetworkToIndexerAPI,\n Network,\n NetworkToPepperAPI,\n NetworkToProverAPI,\n} from \"../utils/apiEndpoints\";\nimport { AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW } from \"../utils/const\";\n\n/**\n * Represents the configuration settings for an Aptos SDK client instance.\n * This class allows customization of various endpoints and client settings.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for connecting to the Aptos testnet\n * const config = new AptosConfig({ network: Network.TESTNET });\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\nexport class AptosConfig {\n /**\n * The Network that this SDK is associated with. Defaults to DEVNET\n * @group Client\n */\n readonly network: Network;\n\n /**\n * The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client\n * @group Client\n */\n readonly client: Client;\n\n /**\n * The optional hardcoded fullnode URL to send requests to instead of using the network\n * @group Client\n */\n readonly fullnode?: string;\n\n /**\n * The optional hardcoded faucet URL to send requests to instead of using the network\n * @group Client\n */\n readonly faucet?: string;\n\n /**\n * The optional hardcoded pepper service URL to send requests to instead of using the network\n * @group Client\n */\n readonly pepper?: string;\n\n /**\n * The optional hardcoded prover service URL to send requests to instead of using the network\n * @group Client\n */\n readonly prover?: string;\n\n /**\n * The optional hardcoded indexer URL to send requests to instead of using the network\n * @group Client\n */\n readonly indexer?: string;\n\n /**\n * Optional client configurations\n * @group Client\n */\n readonly clientConfig?: ClientConfig;\n\n /**\n * Optional specific Fullnode configurations\n * @group Client\n */\n readonly fullnodeConfig?: FullNodeConfig;\n\n /**\n * Optional specific Indexer configurations\n * @group Client\n */\n readonly indexerConfig?: IndexerConfig;\n\n /**\n * Optional specific Faucet configurations\n * @group Client\n */\n readonly faucetConfig?: FaucetConfig;\n\n /**\n * Optional specific Transaction Generation configurations\n * @group Client\n */\n readonly transactionGenerationConfig?: TransactionGenerationConfig;\n\n /**\n * Optional plugin config to override client behavior.\n * @group Client\n */\n private pluginConfig?: PluginConfig;\n\n /**\n * Initializes an instance of the Aptos client with the specified settings.\n * This allows users to configure various aspects of the client, such as network and endpoints.\n *\n * @param settings - Optional configuration settings for the Aptos client.\n * @param settings.network - The network to connect to, defaults to `Network.DEVNET`.\n * @param settings.fullnode - The fullnode endpoint to use for requests.\n * @param settings.faucet - The faucet endpoint for obtaining test tokens.\n * @param settings.pepper - The pepper used for transaction signing.\n * @param settings.prover - The prover endpoint for transaction verification.\n * @param settings.indexer - The indexer endpoint for querying blockchain data.\n * @param settings.client - Custom client settings, defaults to a standard Aptos client.\n * @param settings.clientConfig - Additional configuration for the client.\n * @param settings.fullnodeConfig - Additional configuration for the fullnode.\n * @param settings.indexerConfig - Additional configuration for the indexer.\n * @param settings.faucetConfig - Additional configuration for the faucet.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with default settings\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify the network\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n constructor(settings?: AptosSettings) {\n // If there are any endpoint overrides, they are custom networks, keep that in mind\n if (settings?.fullnode || settings?.indexer || settings?.faucet || settings?.pepper || settings?.prover) {\n if (settings?.network === Network.CUSTOM) {\n console.info(\"Note: using CUSTOM network will require queries to lookup ChainId\");\n } else if (!settings?.network) {\n throw new Error(\"Custom endpoints require a network to be specified\");\n }\n }\n\n this.network = settings?.network ?? Network.DEVNET;\n this.fullnode = settings?.fullnode;\n this.faucet = settings?.faucet;\n this.pepper = settings?.pepper;\n this.prover = settings?.prover;\n this.indexer = settings?.indexer;\n this.client = settings?.client ?? { provider: aptosClient };\n this.clientConfig = settings?.clientConfig ?? {};\n this.fullnodeConfig = settings?.fullnodeConfig ?? {};\n this.indexerConfig = settings?.indexerConfig ?? {};\n this.faucetConfig = settings?.faucetConfig ?? {};\n this.transactionGenerationConfig = settings?.transactionGenerationConfig ?? {};\n this.pluginConfig = settings?.pluginSettings\n ? {\n ...settings.pluginSettings,\n IGNORE_TRANSACTION_SUBMITTER: false,\n }\n : undefined;\n }\n\n /**\n * Returns the URL endpoint to send the request to based on the specified API type.\n * If a custom URL was provided in the configuration, that URL is returned. Otherwise, the URL endpoint is derived from the network.\n *\n * @param apiType - The type of Aptos API to get the URL for. This can be one of the following: FULLNODE, FAUCET, INDEXER, PEPPER, PROVER.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, AptosApiType } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the request URL for the FULLNODE API\n * const url = config.getRequestUrl(AptosApiType.FULLNODE);\n * console.log(\"Request URL for FULLNODE:\", url);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n getRequestUrl(apiType: AptosApiType): string {\n switch (apiType) {\n case AptosApiType.FULLNODE:\n if (this.fullnode !== undefined) return this.fullnode;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom full node url\");\n return NetworkToNodeAPI[this.network];\n case AptosApiType.FAUCET:\n if (this.faucet !== undefined) return this.faucet;\n if (this.network === Network.TESTNET) {\n throw new Error(\n \"There is no way to programmatically mint testnet APT, you must use the minting site at https://aptos.dev/network/faucet\",\n );\n }\n if (this.network === Network.MAINNET) {\n throw new Error(\"There is no mainnet faucet\");\n }\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom faucet url\");\n return NetworkToFaucetAPI[this.network];\n case AptosApiType.INDEXER:\n if (this.indexer !== undefined) return this.indexer;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom indexer url\");\n return NetworkToIndexerAPI[this.network];\n case AptosApiType.PEPPER:\n if (this.pepper !== undefined) return this.pepper;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom pepper service url\");\n return NetworkToPepperAPI[this.network];\n case AptosApiType.PROVER:\n if (this.prover !== undefined) return this.prover;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom prover service url\");\n return NetworkToProverAPI[this.network];\n default:\n throw Error(`apiType ${apiType} is not supported`);\n }\n }\n\n /**\n * Checks if the provided URL is a known pepper service endpoint.\n *\n * @param url - The URL to check against the known pepper service endpoints.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const url = \"https://example.pepper.service\"; // replace with a real pepper service URL\n *\n * // Check if the URL is a known pepper service endpoint\n * const isPepperService = config.isPepperServiceRequest(url);\n *\n * console.log(`Is the URL a known pepper service? ${isPepperService}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Client\n */\n isPepperServiceRequest(url: string): boolean {\n return NetworkToPepperAPI[this.network] === url;\n }\n\n /**\n * Checks if the provided URL is a known prover service endpoint.\n *\n * @param url - The URL to check against known prover service endpoints.\n * @returns A boolean indicating whether the URL is a known prover service endpoint.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * // Check if the URL is a known prover service endpoint\n * const url = \"https://prover.testnet.aptos.dev\"; // replace with a real URL if needed\n * const isProver = config.isProverServiceRequest(url);\n *\n * console.log(`Is the URL a known prover service? ${isProver}`);\n * ```\n * @group Client\n */\n isProverServiceRequest(url: string): boolean {\n return NetworkToProverAPI[this.network] === url;\n }\n\n getDefaultMaxGasAmount(): number {\n return this.transactionGenerationConfig?.defaultMaxGasAmount ?? DEFAULT_MAX_GAS_AMOUNT;\n }\n\n getDefaultTxnExpirySecFromNow(): number {\n return this.transactionGenerationConfig?.defaultTxnExpirySecFromNow ?? DEFAULT_TXN_EXP_SEC_FROM_NOW;\n }\n\n /**\n * If you have set a custom transaction submitter, you can use this to determine\n * whether to use it or not. For example, to stop using the transaction submitter:\n *\n * @example\n * ```\n * aptos.config.setIgnoreTransactionSubmitter(true);\n * ```\n *\n * @group Client\n */\n setIgnoreTransactionSubmitter(ignore: boolean) {\n if (this.pluginConfig) {\n this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER = ignore;\n }\n }\n\n /**\n * If a custom transaction submitter has been specified in the PluginConfig and\n * IGNORE_TRANSACTION_SUBMITTER is false, this will return a transaction submitter\n * that should be used instead of the default transaction submission behavior.\n */\n getTransactionSubmitter(): TransactionSubmitter | undefined {\n if (this.pluginConfig === undefined) {\n return undefined;\n }\n\n if (this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER === true) {\n return undefined;\n }\n\n return this.pluginConfig.TRANSACTION_SUBMITTER;\n }\n}\n"],"mappings":"AAGA,OAAOA,MAAiB,2BAYxB,OACE,oBAAAC,EACA,sBAAAC,EACA,uBAAAC,EACA,WAAAC,EACA,sBAAAC,EACA,sBAAAC,MACK,wBACP,OAAS,gBAAAC,EAAc,0BAAAC,EAAwB,gCAAAC,MAAoC,iBAuB5E,MAAMC,CAAY,CA+GvB,YAAYC,EAA0B,CAEpC,GAAIA,GAAU,UAAYA,GAAU,SAAWA,GAAU,QAAUA,GAAU,QAAUA,GAAU,QAC/F,GAAIA,GAAU,UAAYP,EAAQ,OAChC,QAAQ,KAAK,mEAAmE,UACvE,CAACO,GAAU,QACpB,MAAM,IAAI,MAAM,oDAAoD,EAIxE,KAAK,QAAUA,GAAU,SAAWP,EAAQ,OAC5C,KAAK,SAAWO,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUX,CAAY,EAC1D,KAAK,aAAeW,GAAU,cAAgB,CAAC,EAC/C,KAAK,eAAiBA,GAAU,gBAAkB,CAAC,EACnD,KAAK,cAAgBA,GAAU,eAAiB,CAAC,EACjD,KAAK,aAAeA,GAAU,cAAgB,CAAC,EAC/C,KAAK,4BAA8BA,GAAU,6BAA+B,CAAC,EAC7E,KAAK,aAAeA,GAAU,eAC1B,CACE,GAAGA,EAAS,eACZ,6BAA8B,EAChC,EACA,MACN,CAwBA,cAAcC,EAA+B,CAC3C,OAAQA,EAAS,CACf,KAAKL,EAAa,SAChB,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOH,EAAiB,KAAK,OAAO,EACtC,KAAKM,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,QAC3B,MAAM,IAAI,MACR,yHACF,EAEF,GAAI,KAAK,UAAYA,EAAQ,QAC3B,MAAM,IAAI,MAAM,4BAA4B,EAE9C,GAAI,KAAK,UAAYA,EAAQ,OAAQ,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOF,EAAmB,KAAK,OAAO,EACxC,KAAKK,EAAa,QAChB,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOD,EAAoB,KAAK,OAAO,EACzC,KAAKI,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,KAAKE,EAAa,OAChB,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAYH,EAAQ,OAAQ,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOE,EAAmB,KAAK,OAAO,EACxC,QACE,MAAM,MAAM,WAAWM,CAAO,mBAAmB,CACrD,CACF,CA0BA,uBAAuBC,EAAsB,CAC3C,OAAOR,EAAmB,KAAK,OAAO,IAAMQ,CAC9C,CAuBA,uBAAuBA,EAAsB,CAC3C,OAAOP,EAAmB,KAAK,OAAO,IAAMO,CAC9C,CAEA,wBAAiC,CAC/B,OAAO,KAAK,6BAA6B,qBAAuBL,CAClE,CAEA,+BAAwC,CACtC,OAAO,KAAK,6BAA6B,4BAA8BC,CACzE,CAaA,8BAA8BK,EAAiB,CACzC,KAAK,eACP,KAAK,aAAa,6BAA+BA,EAErD,CAOA,yBAA4D,CAC1D,GAAI,KAAK,eAAiB,QAItB,KAAK,aAAa,+BAAiC,GAIvD,OAAO,KAAK,aAAa,qBAC3B,CACF","names":["aptosClient","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI","Network","NetworkToPepperAPI","NetworkToProverAPI","AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","AptosConfig","settings","apiType","url","ignore"]}
|
package/dist/esm/api/coin.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AptosConfig, m as AccountAddressInput, bN as AnyNumber, d8 as MoveStructId, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-
|
|
1
|
+
import { A as AptosConfig, m as AccountAddressInput, bN as AnyNumber, d8 as MoveStructId, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-BortO8g2.mjs';
|
|
2
2
|
import '../types/indexer.mjs';
|
|
3
3
|
import '../types/generated/operations.mjs';
|
|
4
4
|
import '../types/generated/types.mjs';
|
package/dist/esm/api/coin.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{transferCoinTransaction as o}from"../internal/coin";class I{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}}export{I as Coin};
|
|
2
2
|
//# sourceMappingURL=coin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/coin.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AccountAddressInput } from \"../core\";\nimport { transferCoinTransaction } from \"../internal/coin\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AnyNumber, MoveStructId } from \"../types\";\nimport { AptosConfig } from \"./aptosConfig\";\n\n/**\n * A class to handle all `Coin` operations.\n * @group Coin\n */\nexport class Coin {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Coin\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Generate a transfer coin transaction that can be simulated, signed, and submitted.\n * This function helps you create a transaction to transfer a specified amount of coins\n * from one account to another within the Aptos network.\n *\n * @param args The arguments for the transfer transaction.\n * @param args.sender The sender account address.\n * @param args.recipient The recipient account address.\n * @param args.amount The amount of coins to transfer.\n * @param args.coinType Optional. The coin struct type to transfer. Defaults to 0x1::aptos_coin::AptosCoin.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns SimpleTransaction\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Generate a transfer coin transaction\n * const transaction = await aptos.transferCoinTransaction({\n * sender: \"0x1\", // replace with a real sender account address\n * recipient: \"0x2\", // replace with a real recipient account address\n * amount: 10,\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Coin\n */\n async transferCoinTransaction(args: {\n sender: AccountAddressInput;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n coinType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferCoinTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"AAIA,OAAS,2BAAAA,MAA+B,mBAUjC,MAAMC,CAAK,CAsBhB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAqC3C,MAAM,wBAAwBC,EAMC,CAC7B,OAAOH,EAAwB,CAAE,YAAa,KAAK,OAAQ,GAAGG,CAAK,CAAC,CACtE,CACF","names":["transferCoinTransaction","Coin","config","args"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetCollectionDataResponse, GetTokenDataResponse, GetCurrentTokenOwnershipResponse, GetOwnedTokensResponse, GetTokenActivityResponse } from '../types/indexer.mjs';
|
|
2
|
-
import { A as AptosConfig, m as AccountAddressInput, bN as AnyNumber, bR as TokenStandardArg, bP as PaginationArgs, bS as OrderByArg, aT as InputGenerateTransactionOptions, at as SimpleTransaction, n as AccountAddress, d8 as MoveStructId } from '../account-
|
|
3
|
-
import { A as Account } from '../Ed25519Account-
|
|
2
|
+
import { A as AptosConfig, m as AccountAddressInput, bN as AnyNumber, bR as TokenStandardArg, bP as PaginationArgs, bS as OrderByArg, aT as InputGenerateTransactionOptions, at as SimpleTransaction, n as AccountAddress, d8 as MoveStructId } from '../account-BortO8g2.mjs';
|
|
3
|
+
import { A as Account } from '../Ed25519Account-CPwej6wB.mjs';
|
|
4
4
|
import { CreateCollectionOptions, PropertyType, PropertyValue } from '../internal/digitalAsset.mjs';
|
|
5
5
|
import '../types/generated/operations.mjs';
|
|
6
6
|
import '../types/generated/types.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{AccountAddress as c}from"../core";import{addDigitalAssetPropertyTransaction as p,addDigitalAssetTypedPropertyTransaction as d,burnDigitalAssetTransaction as g,createCollectionTransaction as A,freezeDigitalAssetTransferTransaction as u,getCollectionData as y,getCollectionDataByCollectionId as l,getCollectionDataByCreatorAddress as m,getCollectionDataByCreatorAddressAndCollectionName as T,getCollectionId as f,getCurrentDigitalAssetOwnership as C,getDigitalAssetActivity as I,getDigitalAssetData as O,getOwnedDigitalAssets as P,mintDigitalAssetTransaction as D,mintSoulBoundTransaction as V,removeDigitalAssetPropertyTransaction as S,setDigitalAssetDescriptionTransaction as h,setDigitalAssetNameTransaction as R,setDigitalAssetURITransaction as G,transferDigitalAssetTransaction as L,unfreezeDigitalAssetTransferTransaction as N,updateDigitalAssetPropertyTransaction as _,updateDigitalAssetTypedPropertyTransaction as w}from"../internal/digitalAsset";import{ProcessorType as e}from"../utils/const";import{waitForIndexerOnVersion as n}from"./utils";class at{constructor(t){this.config=t}async getCollectionData(t){await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR});const{creatorAddress:i,collectionName:o,options:s}=t,a=c.from(i),r={collection_name:{_eq:o},creator_address:{_eq:a.toStringLong()}};return s?.tokenStandard&&(r.token_standard={_eq:s?.tokenStandard??"v2"}),y({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),T({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),m({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),l({aptosConfig:this.config,...t})}async getCollectionId(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),f({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),O({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),C({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),P({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await n({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:e.TOKEN_V2_PROCESSOR}),I({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return A({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return D({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return L({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return V({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return g({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return u({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return N({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return h({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return R({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return G({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return p({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return _({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return d({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return w({aptosConfig:this.config,...t})}}export{at as DigitalAsset};
|
|
2
2
|
//# sourceMappingURL=digitalAsset.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/digitalAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n AnyNumber,\n GetCollectionDataResponse,\n GetCurrentTokenOwnershipResponse,\n GetOwnedTokensResponse,\n GetTokenActivityResponse,\n GetTokenDataResponse,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n} from \"../types\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { Account } from \"../account\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport {\n addDigitalAssetPropertyTransaction,\n addDigitalAssetTypedPropertyTransaction,\n burnDigitalAssetTransaction,\n CreateCollectionOptions,\n createCollectionTransaction,\n freezeDigitalAssetTransferTransaction,\n getCollectionData,\n getCollectionDataByCollectionId,\n getCollectionDataByCreatorAddress,\n getCollectionDataByCreatorAddressAndCollectionName,\n getCollectionId,\n getCurrentDigitalAssetOwnership,\n getDigitalAssetActivity,\n getDigitalAssetData,\n getOwnedDigitalAssets,\n mintDigitalAssetTransaction,\n mintSoulBoundTransaction,\n PropertyType,\n PropertyValue,\n removeDigitalAssetPropertyTransaction,\n setDigitalAssetDescriptionTransaction,\n setDigitalAssetNameTransaction,\n setDigitalAssetURITransaction,\n transferDigitalAssetTransaction,\n unfreezeDigitalAssetTransferTransaction,\n updateDigitalAssetPropertyTransaction,\n updateDigitalAssetTypedPropertyTransaction,\n} from \"../internal/digitalAsset\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to query all `DigitalAsset` related queries on Aptos.\n * @group DigitalAsset\n */\nexport class DigitalAsset {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your desired network\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries data of a specific collection by the collection creator address and the collection name.\n * This function is deprecated; use `getCollectionDataByCreatorAddressAndCollectionName` instead.\n *\n * If a creator account has two collections with the same name in v1 and v2, you can pass an optional `tokenStandard` parameter\n * to query a specific standard.\n *\n * @param args - The arguments for querying the collection data.\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options - Optional parameters for the query.\n * @param args.options.tokenStandard - The token standard to query.\n * @returns GetCollectionDataResponse - The response type containing the collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Querying collection data by creator address and collection name\n * const collection = await aptos.getCollectionData({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\", // specify your collection name\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionData(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n const { creatorAddress, collectionName, options } = args;\n const address = AccountAddress.from(creatorAddress);\n\n const whereCondition: any = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address.toStringLong() },\n };\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard ?? \"v2\" };\n }\n\n return getCollectionData({ aptosConfig: this.config, options: { where: whereCondition } });\n }\n\n /**\n * Queries data of a specific collection by the collection creator address and the collection name.\n * If a creator account has multiple collections with the same name across different versions,\n * specify the `tokenStandard` parameter to query a specific standard.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - Optional token standard to query.\n * @returns GetCollectionDataResponse - The response type containing collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching collection data by creator address and collection name\n * const collection = await aptos.getCollectionDataByCreatorAddressAndCollectionName({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\",\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: { tokenStandard: \"v2\" } // optional, specify if needed\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCreatorAddressAndCollectionName(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n return getCollectionDataByCreatorAddressAndCollectionName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves data for a specific collection created by a given creator address.\n * This function allows you to query collection data while optionally specifying a minimum ledger version and pagination options.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - Optional token standard to query.\n * @param args.options.pagination - Optional pagination arguments.\n * @returns GetCollectionDataResponse - The response type containing collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve collection data by creator address\n * const collectionData = await aptos.getCollectionDataByCreatorAddress({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * minimumLedgerVersion: 1, // specify the minimum ledger version if needed\n * options: {\n * tokenStandard: \"v2\", // specify the token standard if needed\n * pagination: { limit: 10, offset: 0 } // specify pagination options if needed\n * }\n * });\n *\n * console.log(collectionData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCreatorAddress(args: {\n creatorAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n\n return getCollectionDataByCreatorAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries data of a specific collection by the collection ID.\n *\n * @param args.collectionId - The ID of the collection, which is the same as the address of the collection object.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options - Optional parameters for token standard and pagination.\n * @returns GetCollectionDataResponse - The response type containing the collection data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching collection data by collection ID\n * const collection = await aptos.getCollectionDataByCollectionId({\n * collectionId: \"0x123\", // replace with a real collection ID\n * });\n *\n * console.log(collection);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionDataByCollectionId(args: {\n collectionId: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs;\n }): Promise<GetCollectionDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCollectionDataByCollectionId({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the ID of a specified collection.\n * This ID corresponds to the collection's object address in V2, while V1 does not utilize objects and lacks an address.\n *\n * @param args.creatorAddress - The address of the collection's creator.\n * @param args.collectionName - The name of the collection.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The token standard to query.\n * @returns The collection ID.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the collection ID for a specific creator and collection name\n * const collectionId = await aptos.getCollectionId({\n * creatorAddress: \"0x1\", // replace with a real creator address\n * collectionName: \"myCollection\"\n * });\n *\n * console.log(\"Collection ID:\", collectionId);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCollectionId(args: {\n creatorAddress: AccountAddressInput;\n collectionName: string;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg;\n }): Promise<string> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCollectionId({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves digital asset data using the address of a digital asset.\n *\n * @param args - The parameters for the request.\n * @param args.digitalAssetAddress - The address of the digital asset.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns GetTokenDataResponse containing relevant data for the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching digital asset data for a specific address\n * const digitalAsset = await aptos.getDigitalAssetData({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAsset);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getDigitalAssetData(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetTokenDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getDigitalAssetData({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current ownership data of a specified digital asset using its address.\n *\n * @param args The parameters for the request.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n *\n * @returns GetCurrentTokenOwnershipResponse containing relevant ownership data of the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the current ownership of a digital asset\n * const digitalAssetOwner = await aptos.getCurrentDigitalAssetOwnership({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAssetOwner);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getCurrentDigitalAssetOwnership(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetCurrentTokenOwnershipResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getCurrentDigitalAssetOwnership({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the digital assets owned by a specified address.\n *\n * @param args.ownerAddress The address of the owner.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options Optional pagination and ordering parameters for the response.\n *\n * @returns GetOwnedTokensResponse containing ownership data of the digital assets belonging to the ownerAddress.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching the digital assets owned by the specified address\n * const digitalAssets = await aptos.getOwnedDigitalAssets({\n * ownerAddress: \"0x1\", // replace with a real account address\n * });\n *\n * console.log(digitalAssets);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getOwnedDigitalAssets(args: {\n ownerAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetOwnedTokensResponse[0]>;\n }): Promise<GetOwnedTokensResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getOwnedDigitalAssets({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the activity data for a specified digital asset using its address.\n *\n * @param args - The parameters for the request.\n * @param args.digitalAssetAddress - The address of the digital asset.\n * @param args.minimumLedgerVersion - Optional minimum ledger version to sync up to before querying.\n * @param args.options - Optional pagination and ordering parameters.\n *\n * @returns A promise that resolves to the activity data related to the digital asset.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the activity data for a digital asset\n * const digitalAssetActivity = await aptos.getDigitalAssetActivity({\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(digitalAssetActivity);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async getDigitalAssetActivity(args: {\n digitalAssetAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetTokenActivityResponse[0]>;\n }): Promise<GetTokenActivityResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getDigitalAssetActivity({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Creates a new collection within the specified account.\n *\n * @param args.creator - The account of the collection's creator.\n * @param args.description - The description of the collection.\n * @param args.name - The name of the collection.\n * @param args.uri - The URI to additional info about the collection.\n * @param args.options - Optional parameters for generating the transaction.\n *\n * The parameters below are optional:\n * @param args.maxSupply - Controls the max supply of the digital assets. Defaults to MAX_U64_BIG_INT.\n * @param args.mutableDescription - Controls mutability of the collection's description. Defaults to true.\n * @param args.mutableRoyalty - Controls mutability of the collection's royalty. Defaults to true.\n * @param args.mutableUri - Controls mutability of the collection's URI. Defaults to true.\n * @param args.mutableTokenDescription - Controls mutability of the digital asset's description. Defaults to true.\n * @param args.mutableTokenName - Controls mutability of the digital asset's name. Defaults to true.\n * @param args.mutableTokenProperties - Controls mutability of digital asset's properties. Defaults to true.\n * @param args.mutableTokenUri - Controls mutability of the digital asset's URI. Defaults to true.\n * @param args.tokensBurnableByCreator - Controls whether digital assets can be burnable by the creator. Defaults to true.\n * @param args.tokensFreezableByCreator - Controls whether digital assets can be frozen by the creator. Defaults to true.\n * @param args.royaltyNumerator - The numerator of the royalty to be paid to the creator when a digital asset is transferred.\n * Defaults to 0.\n * @param args.royaltyDenominator - The denominator of the royalty to be paid to the creator when a digital asset is\n * transferred. Defaults to 1.\n *\n * @returns A SimpleTransaction that when submitted will create the collection.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Creating a new collection transaction\n * const transaction = await aptos.createCollectionTransaction({\n * creator: Account.generate(), // Replace with a real account\n * description: \"A unique collection of digital assets.\",\n * name: \"My Digital Collection\",\n * uri: \"https://mycollection.com\",\n * });\n *\n * console.log(\"Transaction created:\", transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async createCollectionTransaction(\n args: {\n creator: Account;\n description: string;\n name: string;\n uri: string;\n options?: InputGenerateTransactionOptions;\n } & CreateCollectionOptions,\n ): Promise<SimpleTransaction> {\n return createCollectionTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Create a transaction to mint a digital asset into the creator's account within an existing collection.\n * This function helps you generate a transaction that can be simulated or submitted to the blockchain for minting a digital asset.\n *\n * @param args.creator - The creator of the collection.\n * @param args.collection - The name of the collection the digital asset belongs to.\n * @param args.description - The description of the digital asset.\n * @param args.name - The name of the digital asset.\n * @param args.uri - The URI to additional info about the digital asset.\n * @param args.propertyKeys - Optional array of property keys for the digital asset.\n * @param args.propertyTypes - Optional array of property types for the digital asset.\n * @param args.propertyValues - Optional array of property values for the digital asset.\n * @param args.options - Optional transaction generation options.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Creating a transaction to mint a digital asset\n * const transaction = await aptos.mintDigitalAssetTransaction({\n * creator: Account.generate(), // replace with a real account\n * collection: \"MyCollection\",\n * description: \"This is a digital asset.\",\n * name: \"MyDigitalAsset\",\n * uri: \"https://example.com/my-digital-asset\",\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async mintDigitalAssetTransaction(args: {\n creator: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return mintDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer ownership of a non-fungible digital asset.\n * This function allows you to transfer a digital asset only if it is not frozen, meaning the ownership transfer is not disabled.\n *\n * @param args The arguments for transferring the digital asset.\n * @param args.sender The sender account of the current digital asset owner.\n * @param args.digitalAssetAddress The address of the digital asset being transferred.\n * @param args.recipient The account address of the recipient.\n * @param args.digitalAssetType Optional. The type of the digital asset, defaults to \"0x4::token::Token\".\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Transfer a digital asset\n * const transaction = await aptos.transferDigitalAssetTransaction({\n * sender: Account.generate(), // replace with a real sender account\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * recipient: \"0x456\", // replace with a real recipient account address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async transferDigitalAssetTransaction(args: {\n sender: Account;\n digitalAssetAddress: AccountAddressInput;\n recipient: AccountAddress;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Mint a soul bound digital asset into a recipient's account.\n * This function allows you to create a unique digital asset that is bound to a specific account.\n *\n * @param args - The arguments for minting the soul bound transaction.\n * @param args.account - The account that mints the digital asset.\n * @param args.collection - The collection name that the digital asset belongs to.\n * @param args.description - The digital asset description.\n * @param args.name - The digital asset name.\n * @param args.uri - The digital asset URL.\n * @param args.recipient - The account address where the digital asset will be created.\n * @param args.propertyKeys - The property keys for storing on-chain properties.\n * @param args.propertyTypes - The type of property values.\n * @param args.propertyValues - The property values to be stored on-chain.\n * @param args.options - Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Mint a soul bound digital asset\n * const transaction = await aptos.mintSoulBoundTransaction({\n * account: Account.generate(), // Replace with a real account\n * collection: \"collectionName\",\n * description: \"collectionDescription\",\n * name: \"digitalAssetName\",\n * uri: \"digital-asset-uri.com\",\n * recipient: \"0x123\" // Replace with a real recipient account address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async mintSoulBoundTransaction(args: {\n account: Account;\n collection: string;\n description: string;\n name: string;\n uri: string;\n recipient: AccountAddressInput;\n propertyKeys?: Array<string>;\n propertyTypes?: Array<PropertyType>;\n propertyValues?: Array<PropertyValue>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return mintSoulBoundTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Burn a digital asset by its creator, allowing for the removal of a specified digital asset from the blockchain.\n *\n * @param args The arguments for burning the digital asset.\n * @param args.creator The creator account that is burning the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset to be burned.\n * @param args.digitalAssetType Optional. The type of the digital asset being burned.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const creator = Account.generate(); // Replace with a real creator account\n * const transaction = await aptos.burnDigitalAssetTransaction({\n * creator: creator,\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async burnDigitalAssetTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return burnDigitalAssetTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Freeze the ability to transfer a specified digital asset.\n * This function allows the creator to restrict the transfer capability of a digital asset.\n *\n * @param args The arguments for freezing the digital asset transfer.\n * @param args.creator The creator account initiating the freeze.\n * @param args.digitalAssetAddress The address of the digital asset to be frozen.\n * @param args.digitalAssetType Optional. The type of the digital asset being frozen.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Freeze the digital asset transfer\n * const transaction = await aptos.freezeDigitalAssetTransaferTransaction({\n * creator: Account.generate(), // Replace with a real account if needed\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async freezeDigitalAssetTransaferTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return freezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Unfreeze the ability to transfer a digital asset.\n * This function allows the specified creator account to unfreeze the transfer of a digital asset identified by its address.\n *\n * @param args The parameters for unfreezing the digital asset transfer.\n * @param args.creator The creator account that is unfreezing the digital asset transfer.\n * @param args.digitalAssetAddress The address of the digital asset to unfreeze.\n * @param args.digitalAssetType Optional. The type of the digital asset being unfrozen.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Unfreeze the ability to transfer a digital asset\n * const transaction = await aptos.unfreezeDigitalAssetTransaferTransaction({\n * creator: Account.generate(), // replace with a real creator account\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n // TODO: Rename Transafer to Transfer\n async unfreezeDigitalAssetTransaferTransaction(args: {\n creator: Account;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return unfreezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the digital asset description to provide additional context or information about the asset.\n *\n * @param args The parameters for setting the digital asset description.\n * @param args.creator The creator account responsible for the digital asset.\n * @param args.description The digital asset description to be set.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Set the digital asset description\n * const transaction = await aptos.setDigitalAssetDescriptionTransaction({\n * creator: Account.generate(), // replace with a real account\n * description: \"This is a digital asset description.\",\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetDescriptionTransaction(args: {\n creator: Account;\n description: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetDescriptionTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the digital asset name, allowing you to define a name for a specific digital asset on the blockchain.\n *\n * @param args The parameters for setting the digital asset name.\n * @param args.creator The creator account responsible for the transaction.\n * @param args.name The desired name for the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset, represented as a Move struct ID.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the blockchain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const creator = Account.generate(); // Generate a new account for the creator\n * const digitalAssetAddress = \"0x123\"; // replace with a real digital asset address\n *\n * // Set the digital asset name\n * const transaction = await aptos.setDigitalAssetNameTransaction({\n * creator: creator,\n * name: \"digitalAssetName\",\n * digitalAssetAddress: digitalAssetAddress,\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetNameTransaction(args: {\n creator: Account;\n name: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetNameTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Set the URI for a digital asset, allowing you to associate a unique identifier with the asset.\n *\n * @param args The parameters for the transaction.\n * @param args.creator The creator account initiating the transaction.\n * @param args.uri The digital asset URI to be set.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Set the URI for a digital asset\n * const transaction = await aptos.setDigitalAssetURITransaction({\n * creator: Account.generate(), // Replace with a real creator account\n * uri: \"digital-asset-uri.com\",\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async setDigitalAssetURITransaction(args: {\n creator: Account;\n uri: string;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return setDigitalAssetURITransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Add a digital asset property to the blockchain.\n * This function allows you to specify a new property for a digital asset, including its key, type, and value.\n *\n * @param args - The arguments for adding a digital asset property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Options for generating the transaction.\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Add a digital asset property\n * const transaction = await aptos.addDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // Replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: true,\n * digitalAssetAddress: \"0x123\", // Replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async addDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return addDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Remove a digital asset property from the blockchain.\n * This function allows you to delete an existing property associated with a digital asset.\n *\n * @param args The parameters required to remove the digital asset property.\n * @param args.creator The account that mints the digital asset.\n * @param args.propertyKey The property key for storing on-chain properties.\n * @param args.propertyType The type of property value.\n * @param args.propertyValue The property value to be stored on-chain.\n * @param args.digitalAssetAddress The digital asset address.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Remove a digital asset property\n * const transaction = await aptos.removeDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: true,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async removeDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return removeDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Update a digital asset property on-chain.\n *\n * @param args The parameters for updating the digital asset property.\n * @param args.creator The account that mints the digital asset.\n * @param args.digitalAssetAddress The address of the digital asset.\n * @param args.propertyKey The property key for storing on-chain properties.\n * @param args.propertyType The type of property value.\n * @param args.propertyValue The property value to be stored on-chain.\n * @param args.digitalAssetType Optional. The type of the digital asset.\n * @param args.options Optional. Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Update a digital asset property\n * const transaction = await aptos.updateDigitalAssetPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"newKey\",\n * propertyType: \"BOOLEAN\",\n * propertyValue: false,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async updateDigitalAssetPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return updateDigitalAssetPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Add a typed digital asset property to the blockchain.\n * This function allows you to define and store a specific property for a digital asset, enabling better categorization and\n * management of digital assets.\n *\n * @param args - The parameters for adding the typed property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - The optional type of the digital asset.\n * @param args.options - Optional transaction generation options.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Adding a typed digital asset property\n * const transaction = await aptos.addDigitalAssetTypedPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"typedKey\",\n * propertyType: \"STRING\",\n * propertyValue: \"hello\",\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async addDigitalAssetTypedPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return addDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Update a typed digital asset property on-chain.\n * This function allows you to modify the properties of a digital asset, enabling dynamic updates to its attributes.\n *\n * @param args - The arguments for updating the digital asset property.\n * @param args.creator - The account that mints the digital asset.\n * @param args.propertyKey - The property key for storing on-chain properties.\n * @param args.propertyType - The type of property value.\n * @param args.propertyValue - The property value to be stored on-chain.\n * @param args.digitalAssetAddress - The digital asset address.\n * @param args.digitalAssetType - (Optional) The type of the digital asset.\n * @param args.options - (Optional) Additional options for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Update a typed digital asset property\n * const transaction = await aptos.updateDigitalAssetTypedPropertyTransaction({\n * creator: Account.generate(), // replace with a real account\n * propertyKey: \"typedKey\",\n * propertyType: \"U8\",\n * propertyValue: 2,\n * digitalAssetAddress: \"0x123\", // replace with a real digital asset address\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group DigitalAsset\n */\n async updateDigitalAssetTypedPropertyTransaction(args: {\n creator: Account;\n propertyKey: string;\n propertyType: PropertyType;\n propertyValue: PropertyValue;\n digitalAssetAddress: AccountAddressInput;\n digitalAssetType?: MoveStructId;\n options?: InputGenerateTransactionOptions;\n }) {\n return updateDigitalAssetTypedPropertyTransaction({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"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","names":["AccountAddress","addDigitalAssetPropertyTransaction","addDigitalAssetTypedPropertyTransaction","burnDigitalAssetTransaction","createCollectionTransaction","freezeDigitalAssetTransferTransaction","getCollectionData","getCollectionDataByCollectionId","getCollectionDataByCreatorAddress","getCollectionDataByCreatorAddressAndCollectionName","getCollectionId","getCurrentDigitalAssetOwnership","getDigitalAssetActivity","getDigitalAssetData","getOwnedDigitalAssets","mintDigitalAssetTransaction","mintSoulBoundTransaction","removeDigitalAssetPropertyTransaction","setDigitalAssetDescriptionTransaction","setDigitalAssetNameTransaction","setDigitalAssetURITransaction","transferDigitalAssetTransaction","unfreezeDigitalAssetTransferTransaction","updateDigitalAssetPropertyTransaction","updateDigitalAssetTypedPropertyTransaction","ProcessorType","waitForIndexerOnVersion","DigitalAsset","config","args","creatorAddress","collectionName","options","address","whereCondition"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AptosConfig, m as AccountAddressInput, du as WaitForTransactionOptions, cm as UserTransactionResponse } from '../account-
|
|
1
|
+
import { A as AptosConfig, m as AccountAddressInput, du as WaitForTransactionOptions, cm as UserTransactionResponse } from '../account-BortO8g2.mjs';
|
|
2
2
|
import '../types/indexer.mjs';
|
|
3
3
|
import '../types/generated/operations.mjs';
|
|
4
4
|
import '../types/generated/types.mjs';
|
package/dist/esm/api/faucet.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fundAccount as t}from"../internal/faucet";import{waitForIndexer as r}from"../internal/transaction";import{ProcessorType as i}from"../utils";class g{constructor(o){this.config=o}async fundAccount(o){const n=await t({aptosConfig:this.config,...o});return(o.options?.waitForIndexer===void 0||o.options?.waitForIndexer)&&await r({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version),processorType:i.FUNGIBLE_ASSET_PROCESSOR}),n}}export{g as Faucet};
|
|
2
2
|
//# sourceMappingURL=faucet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api/faucet.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fundAccount } from \"../internal/faucet\";\nimport { UserTransactionResponse, WaitForTransactionOptions } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexer } from \"../internal/transaction\";\nimport { ProcessorType } from \"../utils\";\n\n/**\n * A class to query all `Faucet` related queries on Aptos.\n * @group Faucet\n */\nexport class Faucet {\n /**\n * Initializes a new instance of the Aptos client with the specified configuration.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a configuration for the Aptos client\n * const config = new AptosConfig({ network: Network.DEVNET }); // specify your own network if needed\n *\n * // Initialize the Aptos client with the configuration\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Faucet\n */\n constructor(readonly config: AptosConfig) {}\n\n /**\n * This function creates an account if it does not exist and mints the specified amount of coins into that account.\n *\n * Note that only devnet has a publicly accessible faucet. For testnet, you must use\n * the minting page at https://aptos.dev/network/faucet.\n *\n * @param args - The arguments for funding the account.\n * @param args.accountAddress - The address of the account to fund.\n * @param args.amount - The amount of tokens to fund the account with.\n * @param args.options - Configuration options for waiting for the transaction.\n * @returns Transaction hash of the transaction that funded the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.DEVNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fund an account with a specified amount of tokens\n * const transaction = await aptos.fundAccount({\n * accountAddress: \"0x1\", // replace with your account address\n * amount: 100,\n * });\n *\n * console.log(\"Transaction hash:\", transaction.hash);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Faucet\n */\n async fundAccount(args: {\n accountAddress: AccountAddressInput;\n amount: number;\n options?: WaitForTransactionOptions;\n }): Promise<UserTransactionResponse> {\n const fundTxn = await fundAccount({ aptosConfig: this.config, ...args });\n\n // If the user explicitly says to NOT wait by setting waitForIndexer to false, then we skip this.\n // But, by default we want to wait for the indexer.\n if (args.options?.waitForIndexer === undefined || args.options?.waitForIndexer) {\n await waitForIndexer({\n aptosConfig: this.config,\n minimumLedgerVersion: BigInt(fundTxn.version),\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n }\n\n return fundTxn;\n }\n}\n"],"mappings":"AAGA,OAAS,eAAAA,MAAmB,qBAI5B,OAAS,kBAAAC,MAAsB,0BAC/B,OAAS,iBAAAC,MAAqB,WAMvB,MAAMC,CAAO,CA0BlB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAkC3C,MAAM,YAAYC,EAImB,CACnC,MAAMC,EAAU,MAAMN,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGK,CAAK,CAAC,EAIvE,OAAIA,EAAK,SAAS,iBAAmB,QAAaA,EAAK,SAAS,iBAC9D,MAAMJ,EAAe,CACnB,YAAa,KAAK,OAClB,qBAAsB,OAAOK,EAAQ,OAAO,EAC5C,cAAeJ,EAAc,wBAC/B,CAAC,EAGII,CACT,CACF","names":["fundAccount","waitForIndexer","ProcessorType","Faucet","config","args","fundTxn"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetFungibleAssetMetadataResponse, GetFungibleAssetActivitiesResponse, GetCurrentFungibleAssetBalancesResponse } from '../types/indexer.mjs';
|
|
2
|
-
import { A as AptosConfig, bN as AnyNumber, bP as PaginationArgs, bT as WhereArg, m as AccountAddressInput, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-
|
|
2
|
+
import { A as AptosConfig, bN as AnyNumber, bP as PaginationArgs, bT as WhereArg, m as AccountAddressInput, aT as InputGenerateTransactionOptions, at as SimpleTransaction } from '../account-BortO8g2.mjs';
|
|
3
3
|
import { FungibleAssetMetadataBoolExp, FungibleAssetActivitiesBoolExp, CurrentFungibleAssetBalancesBoolExp } from '../types/generated/types.mjs';
|
|
4
|
-
import { A as Account } from '../Ed25519Account-
|
|
4
|
+
import { A as Account } from '../Ed25519Account-CPwej6wB.mjs';
|
|
5
5
|
import '../types/generated/operations.mjs';
|
|
6
6
|
import '../utils/apiEndpoints.mjs';
|
|
7
7
|
import '../utils/const.mjs';
|