@aptos-labs/ts-sdk 2.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/account-Bb5REyaT.d.ts +7412 -0
- package/dist/common/chunk-6MMUUJHX.js +4 -0
- package/dist/common/{chunk-ZMDE3DNL.js.map → chunk-6MMUUJHX.js.map} +1 -1
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/index.d.ts +5876 -9769
- package/dist/common/index.js +55 -32
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-D9XrCLfE.d.mts → Ed25519Account-ndmdpFe9.d.mts} +1 -9
- package/dist/esm/account/AbstractKeylessAccount.d.mts +4 -31
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.d.mts +5 -32
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +3 -30
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.d.mts +4 -31
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +5 -32
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +3 -30
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +2 -11
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +5 -31
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +5 -31
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +3 -30
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +5 -32
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +3 -30
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +4 -31
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.d.mts +2 -6
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/account--Q9z_xMN.d.mts +6625 -0
- package/dist/esm/api/account/abstraction.d.mts +2 -29
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.d.mts +95 -31
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +3 -30
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +8 -32
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +4 -187
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +2 -29
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +3 -30
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/event.d.mts +2 -8
- package/dist/esm/api/event.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +2 -8
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +2 -29
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +2 -29
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +6 -31
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +4 -31
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +2 -8
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +2 -8
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +2 -2
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +7 -33
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.d.mts +2 -29
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.d.mts +2 -29
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.d.mts +3 -30
- 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 +2 -29
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +4 -31
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +2 -2
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +3 -1
- package/dist/esm/bcs/deserializer.d.mts +3 -304
- package/dist/esm/bcs/index.d.mts +2 -8
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +3 -7
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +3 -90
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +2 -167
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.d.mts +2 -430
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +3 -325
- package/dist/esm/{chunk-Q4W3WJ2U.mjs → chunk-2BOHKN33.mjs} +2 -2
- package/dist/esm/{chunk-AMAPBD4D.mjs → chunk-4COLMDT3.mjs} +2 -2
- package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
- package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
- package/dist/esm/{chunk-UOP7GBXB.mjs → chunk-5URUYE6H.mjs} +2 -2
- package/dist/esm/chunk-ACNHLCQQ.mjs +6 -0
- package/dist/esm/chunk-ACNHLCQQ.mjs.map +1 -0
- package/dist/esm/{chunk-V74WPKSY.mjs → chunk-FYYEPFML.mjs} +2 -2
- package/dist/esm/chunk-HUWKPKPQ.mjs +2 -0
- package/dist/esm/{chunk-VEGW6HP5.mjs.map → chunk-HUWKPKPQ.mjs.map} +1 -1
- package/dist/esm/chunk-IJE2LVZG.mjs +2 -0
- package/dist/esm/chunk-IJE2LVZG.mjs.map +1 -0
- package/dist/esm/chunk-JCFTAG5Z.mjs +2 -0
- package/dist/esm/{chunk-RJ7F4JDV.mjs.map → chunk-JCFTAG5Z.mjs.map} +1 -1
- package/dist/esm/{chunk-CZYH3G7E.mjs → chunk-MML57K5H.mjs} +2 -2
- package/dist/esm/{chunk-57J5YBMT.mjs → chunk-MNDTFHDB.mjs} +2 -2
- package/dist/esm/{chunk-U7HD6PQV.mjs → chunk-SLWIGOQL.mjs} +2 -2
- package/dist/esm/{chunk-V2QSMVJ5.mjs → chunk-TYYVB2A6.mjs} +2 -2
- package/dist/esm/{chunk-HETYL3WN.mjs → chunk-U3GMNXO4.mjs} +2 -2
- package/dist/esm/{chunk-VHNX2NUR.mjs → chunk-UL777LTI.mjs} +47 -26
- package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
- package/dist/esm/{chunk-GBNAG7KK.mjs → chunk-XZ75T7Q7.mjs} +2 -2
- package/dist/esm/chunk-Y7ZQTLH4.mjs +2 -0
- package/dist/esm/chunk-Y7ZQTLH4.mjs.map +1 -0
- package/dist/esm/{chunk-KRBZ54CY.mjs → chunk-Z5URUE4U.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +3 -7
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +3 -7
- package/dist/esm/client/core.d.mts +3 -3
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +3 -3
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +3 -3
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +3 -7
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +3 -7
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +3 -7
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +3 -329
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +2 -10
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.d.mts +2 -10
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/deserializationUtils.d.mts +2 -10
- package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.d.mts +2 -301
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.d.mts +2 -10
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.d.mts +4 -12
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.d.mts +4 -17
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.d.mts +3 -11
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.d.mts +2 -228
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +2 -254
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.d.mts +2 -71
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.d.mts +3 -4
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.d.mts +2 -10
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.d.mts +2 -274
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +3 -31
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.d.mts +2 -182
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/crypto/types.d.mts +11 -0
- package/dist/esm/core/crypto/types.mjs +2 -0
- package/dist/esm/core/crypto/types.mjs.map +1 -0
- package/dist/esm/core/crypto/utils.d.mts +3 -1
- package/dist/esm/core/hex.d.mts +3 -156
- package/dist/esm/core/index.d.mts +3 -16
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +2 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/{federatedKeyless-DAYXjY2Y.d.mts → federatedKeyless-CiyplsOB.d.mts} +1 -7
- package/dist/esm/index.d.mts +7 -32
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.d.mts +2 -29
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.d.mts +39 -36
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +3 -30
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +3 -30
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +3 -30
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +2 -8
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +3 -9
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +3 -30
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +2 -2
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +14 -32
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +2 -8
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -8
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +2 -2
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +3 -3
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +6 -33
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/utils/index.d.mts +2 -8
- package/dist/esm/internal/utils/index.mjs +1 -1
- package/dist/esm/internal/utils/utils.d.mts +2 -8
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -28
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.d.mts +2 -179
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.d.mts +2 -17
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.d.mts +2 -17
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.d.mts +3 -30
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +3 -44
- package/dist/esm/transactions/instances/identifier.d.mts +2 -44
- package/dist/esm/transactions/instances/index.d.mts +2 -27
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.d.mts +3 -57
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +2 -60
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.d.mts +2 -150
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -12
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.d.mts +2 -23
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +2 -59
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionArgument.d.mts +2 -74
- package/dist/esm/transactions/instances/transactionPayload.d.mts +2 -300
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -29
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.d.mts +2 -29
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +2 -29
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +3 -30
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -29
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -29
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -28
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -29
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +2 -462
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.d.mts +2 -8
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +3 -399
- package/dist/esm/types/generated/operations.d.mts +37 -10
- package/dist/esm/types/generated/queries.d.mts +6 -2
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +584 -1172
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +4 -2
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +8 -2
- package/dist/esm/types/types.d.mts +5 -1298
- package/dist/esm/types/types.mjs +1 -1
- package/dist/esm/utils/const.d.mts +1 -0
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +2 -6
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -6
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +2 -4
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/account/FederatedKeylessAccount.ts +7 -1
- package/src/account/KeylessAccount.ts +17 -2
- package/src/api/account.ts +135 -2
- package/src/api/aptos.ts +6 -2
- package/src/api/aptosConfig.ts +73 -2
- package/src/api/transaction.ts +10 -6
- package/src/api/transactionSubmission/build.ts +5 -1
- package/src/api/transactionSubmission/submit.ts +16 -12
- package/src/core/crypto/index.ts +1 -0
- package/src/core/crypto/multiEd25519.ts +26 -0
- package/src/core/crypto/multiKey.ts +20 -1
- package/src/core/crypto/types.ts +9 -0
- package/src/internal/account.ts +526 -59
- package/src/internal/keyless.ts +10 -0
- package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
- package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
- package/src/internal/transactionSubmission.ts +20 -10
- package/src/transactions/instances/transactionPayload.ts +165 -2
- package/src/transactions/management/transactionWorker.ts +1 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +64 -5
- package/src/transactions/types.ts +61 -10
- package/src/types/codegen.yaml +1 -1
- package/src/types/generated/operations.ts +39 -8
- package/src/types/generated/queries.ts +53 -0
- package/src/types/generated/types.ts +620 -1239
- package/src/types/indexer.ts +8 -0
- package/src/types/types.ts +151 -3
- package/src/utils/const.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/common/accountAddress-AL8HRxQC.d.ts +0 -3148
- package/dist/common/chunk-ZMDE3DNL.js +0 -4
- package/dist/esm/chunk-BK56GLTP.mjs +0 -4
- package/dist/esm/chunk-BK56GLTP.mjs.map +0 -1
- package/dist/esm/chunk-ODAAZLPK.mjs +0 -2
- package/dist/esm/chunk-ODAAZLPK.mjs.map +0 -1
- package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
- package/dist/esm/chunk-VEGW6HP5.mjs +0 -2
- package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
- package/dist/esm/chunk-XTMUMN74.mjs +0 -2
- package/dist/esm/chunk-XTMUMN74.mjs.map +0 -1
- package/dist/esm/publicKey-CJOcUwJK.d.mts +0 -213
- /package/dist/esm/{chunk-Q4W3WJ2U.mjs.map → chunk-2BOHKN33.mjs.map} +0 -0
- /package/dist/esm/{chunk-AMAPBD4D.mjs.map → chunk-4COLMDT3.mjs.map} +0 -0
- /package/dist/esm/{chunk-UOP7GBXB.mjs.map → chunk-5URUYE6H.mjs.map} +0 -0
- /package/dist/esm/{chunk-V74WPKSY.mjs.map → chunk-FYYEPFML.mjs.map} +0 -0
- /package/dist/esm/{chunk-CZYH3G7E.mjs.map → chunk-MML57K5H.mjs.map} +0 -0
- /package/dist/esm/{chunk-57J5YBMT.mjs.map → chunk-MNDTFHDB.mjs.map} +0 -0
- /package/dist/esm/{chunk-U7HD6PQV.mjs.map → chunk-SLWIGOQL.mjs.map} +0 -0
- /package/dist/esm/{chunk-V2QSMVJ5.mjs.map → chunk-TYYVB2A6.mjs.map} +0 -0
- /package/dist/esm/{chunk-HETYL3WN.mjs.map → chunk-U3GMNXO4.mjs.map} +0 -0
- /package/dist/esm/{chunk-GBNAG7KK.mjs.map → chunk-XZ75T7Q7.mjs.map} +0 -0
- /package/dist/esm/{chunk-KRBZ54CY.mjs.map → chunk-Z5URUE4U.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
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":"qHAGA,OAAOA,MAAiB,2BA2CjB,IAAMC,EAAN,KAAkB,CA+GvB,YAAYC,EAA0B,CAEpC,GAAIA,GAAU,UAAYA,GAAU,SAAWA,GAAU,QAAUA,GAAU,QAAUA,GAAU,QAC/F,GAAIA,GAAU,UAAY,SACxB,QAAQ,KAAK,mEAAmE,UACvE,CAACA,GAAU,QACpB,MAAM,IAAI,MAAM,oDAAoD,EAIxE,KAAK,QAAUA,GAAU,SAAW,SACpC,KAAK,SAAWA,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUC,CAAY,EAC1D,KAAK,aAAeD,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,cAAcE,EAA+B,CAC3C,OAAQA,EAAS,CACf,eACE,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,UAAY,SAAgB,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOC,EAAiB,KAAK,OAAO,EACtC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAY,UACnB,MAAM,IAAI,MACR,yHACF,EAEF,GAAI,KAAK,UAAY,UACnB,MAAM,IAAI,MAAM,4BAA4B,EAE9C,GAAI,KAAK,UAAY,SAAgB,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOC,EAAmB,KAAK,OAAO,EACxC,cACE,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,UAAY,SAAgB,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOC,EAAoB,KAAK,OAAO,EACzC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAY,SAAgB,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,UAAY,SAAgB,MAAM,IAAI,MAAM,4CAA4C,EACjG,OAAOC,EAAmB,KAAK,OAAO,EACxC,QACE,MAAM,MAAM,WAAWL,CAAO,mBAAmB,CACrD,CACF,CA0BA,uBAAuBM,EAAsB,CAC3C,OAAOF,EAAmB,KAAK,OAAO,IAAME,CAC9C,CAuBA,uBAAuBA,EAAsB,CAC3C,OAAOD,EAAmB,KAAK,OAAO,IAAMC,CAC9C,CAEA,wBAAiC,CAC/B,OAAO,KAAK,6BAA6B,qBAAuB,GAClE,CAEA,+BAAwC,CACtC,OAAO,KAAK,6BAA6B,4BAA8B,EACzE,CAaA,8BAA8BC,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","AptosConfig","settings","aptosClient","apiType","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI","NetworkToPepperAPI","NetworkToProverAPI","url","ignore"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-YOZBVVKL.mjs";import{e as x,f as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-YOZBVVKL.mjs";import{e as x,f as B}from"./chunk-XZ75T7Q7.mjs";import{b as f,d as A}from"./chunk-MML57K5H.mjs";import{e as b}from"./chunk-6WDVDEQZ.mjs";import{a as d}from"./chunk-7DQDJ2SA.mjs";import{d as C}from"./chunk-JCFTAG5Z.mjs";async function H(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function W(o){let{aptosConfig:n}=o;return k(async()=>{let{data:t}=await f({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function O(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await f({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function y(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function q(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await y({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function R(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await f({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function z(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,e=!0,p=0,i,g,l=200,h=1.5;function c(a){if(!(a instanceof b)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}try{i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(a){c(a)}if(e){let a=Date.now();try{i=await R({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction"}catch(w){c(w)}p=(Date.now()-a)/1e3}for(;e&&!(p>=r);){try{if(i=await y({aptosConfig:n,transactionHash:t}),e=i.type==="pending_transaction",!e)break}catch(a){c(a)}await d(l),p+=l/1e3,l*=h}if(i===void 0)throw g||new m(`Fetching transaction ${t} failed and timed out after ${r} seconds`,i);if(i.type==="pending_transaction")throw new m(`Transaction ${t} timed out in pending state after ${r} seconds`,i);if(!u)return i;if(!i.success)throw new T(`Transaction ${t} failed with an error: ${i.vm_status}`,i);return i}async function U(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),e=BigInt(-1);for(;e<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?e=await x({aptosConfig:n}):e=(await B({aptosConfig:n,processorType:t})).last_success_version,e>=s)break;await d(200)}}var m=class extends Error{constructor(n,t){super(n),this.lastSubmittedTransaction=t}},T=class extends Error{constructor(n,t){super(n),this.transaction=t}};async function X(o){let{aptosConfig:n,ledgerVersion:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function j(o){let{aptosConfig:n,blockHeight:t,options:s}=o,{data:r}=await f({aptosConfig:n,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return P({block:r,...o})}async function P(o){let{aptosConfig:n,block:t,options:s}=o;if(s?.withTransactions){t.transactions=t.transactions??[];let r=t.transactions[t.transactions.length-1],u=BigInt(t.first_version),e=BigInt(t.last_version),p=r?.version,i;if(p===void 0?i=u-1n:i=BigInt(p),i===e)return t;let g=[],l=100n;for(let c=i+1n;c<e;c+=BigInt(100))g.push(H({aptosConfig:n,options:{offset:c,limit:Math.min(Number(l),Number(e-c+1n))}}));let h=await Promise.all(g);for(let c of h)t.transactions.push(...c)}return t}export{H as a,W as b,O as c,y as d,q as e,R as f,z as g,U as h,m as i,T as j,X as k,j as l};
|
|
2
|
+
//# sourceMappingURL=chunk-Z5URUE4U.mjs.map
|
package/dist/esm/cli/index.d.mts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
export { LocalNode } from './localNode.mjs';
|
|
2
2
|
export { Move } from './move.mjs';
|
|
3
3
|
import 'child_process';
|
|
4
|
-
import '../
|
|
5
|
-
import '../bcs/serializer.mjs';
|
|
6
|
-
import '../core/hex.mjs';
|
|
7
|
-
import '../core/common.mjs';
|
|
8
|
-
import '../types/types.mjs';
|
|
4
|
+
import '../account--Q9z_xMN.mjs';
|
|
9
5
|
import '../types/indexer.mjs';
|
|
10
6
|
import '../types/generated/operations.mjs';
|
|
11
7
|
import '../types/generated/types.mjs';
|
|
12
8
|
import '../utils/apiEndpoints.mjs';
|
|
13
|
-
import '../
|
|
14
|
-
import '../
|
|
9
|
+
import '../utils/const.mjs';
|
|
10
|
+
import '../core/common.mjs';
|
package/dist/esm/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"../chunk-B563XRSZ.mjs";import{a as r}from"../chunk-35DKMW7Q.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-
|
|
1
|
+
import{a as o}from"../chunk-B563XRSZ.mjs";import{a as r}from"../chunk-35DKMW7Q.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{o as LocalNode,r as Move};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-B563XRSZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-B563XRSZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{a as LocalNode};
|
|
2
2
|
//# sourceMappingURL=localNode.mjs.map
|
package/dist/esm/cli/move.d.mts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { AccountAddress } from '../
|
|
1
|
+
import { n as AccountAddress } from '../account--Q9z_xMN.mjs';
|
|
2
2
|
import { Network } from '../utils/apiEndpoints.mjs';
|
|
3
|
-
import '../bcs/serializer.mjs';
|
|
4
|
-
import '../core/hex.mjs';
|
|
5
|
-
import '../core/common.mjs';
|
|
6
|
-
import '../types/types.mjs';
|
|
7
3
|
import '../types/indexer.mjs';
|
|
8
4
|
import '../types/generated/operations.mjs';
|
|
9
5
|
import '../types/generated/types.mjs';
|
|
10
|
-
import '../
|
|
11
|
-
import '../
|
|
6
|
+
import '../utils/const.mjs';
|
|
7
|
+
import '../core/common.mjs';
|
|
12
8
|
|
|
13
9
|
/**
|
|
14
10
|
* Class representing a Move package management utility for the Aptos blockchain.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AptosConfig } from '../
|
|
2
|
-
import { ClientRequest, Client, ClientResponse, AptosRequest, AptosResponse } from '../types/types.mjs';
|
|
1
|
+
import { c0 as ClientRequest, c2 as Client, c1 as ClientResponse, c3 as AptosRequest, A as AptosConfig, c4 as AptosResponse } from '../account--Q9z_xMN.mjs';
|
|
3
2
|
import { AptosApiType } from '../utils/const.mjs';
|
|
4
|
-
import '../utils/apiEndpoints.mjs';
|
|
5
3
|
import '../types/indexer.mjs';
|
|
6
4
|
import '../types/generated/operations.mjs';
|
|
7
5
|
import '../types/generated/types.mjs';
|
|
6
|
+
import '../utils/apiEndpoints.mjs';
|
|
7
|
+
import '../core/common.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Sends a request using the specified options and returns the response.
|
package/dist/esm/client/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-U3GMNXO4.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-6WDVDEQZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2BOHKN33.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-JCFTAG5Z.mjs";import"../chunk-HUWKPKPQ.mjs";import"../chunk-KDMSOCZY.mjs";export{b as aptosRequest,a as request};
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AptosConfig } from '../
|
|
2
|
-
import { MimeType, AnyNumber, ClientConfig, AptosResponse } from '../types/types.mjs';
|
|
1
|
+
import { A as AptosConfig, bn as MimeType, bM as AnyNumber, bT as ClientConfig, c4 as AptosResponse } from '../account--Q9z_xMN.mjs';
|
|
3
2
|
import { AptosApiType } from '../utils/const.mjs';
|
|
4
|
-
import '../utils/apiEndpoints.mjs';
|
|
5
3
|
import '../types/indexer.mjs';
|
|
6
4
|
import '../types/generated/operations.mjs';
|
|
7
5
|
import '../types/generated/types.mjs';
|
|
6
|
+
import '../utils/apiEndpoints.mjs';
|
|
7
|
+
import '../core/common.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Options for making a GET request, including configuration for the API client.
|
package/dist/esm/client/get.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-MML57K5H.mjs";import"../chunk-U3GMNXO4.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-6WDVDEQZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2BOHKN33.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-JCFTAG5Z.mjs";import"../chunk-HUWKPKPQ.mjs";import"../chunk-KDMSOCZY.mjs";export{a as get,b as getAptosFullNode,c as getAptosPepperService,f as getPageWithObfuscatedCursor,d as paginateWithCursor,e as paginateWithObfuscatedCursor};
|
|
2
2
|
//# sourceMappingURL=get.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { aptosRequest, request } from './core.mjs';
|
|
2
2
|
export { GetAptosRequestOptions, GetRequestOptions, get, getAptosFullNode, getAptosPepperService, getPageWithObfuscatedCursor, paginateWithCursor, paginateWithObfuscatedCursor } from './get.mjs';
|
|
3
3
|
export { PostAptosRequestOptions, PostRequestOptions, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService } from './post.mjs';
|
|
4
|
-
import '../
|
|
5
|
-
import '../types/types.mjs';
|
|
4
|
+
import '../account--Q9z_xMN.mjs';
|
|
6
5
|
import '../types/indexer.mjs';
|
|
7
6
|
import '../types/generated/operations.mjs';
|
|
8
7
|
import '../types/generated/types.mjs';
|
|
9
8
|
import '../utils/apiEndpoints.mjs';
|
|
10
9
|
import '../utils/const.mjs';
|
|
10
|
+
import '../core/common.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-7ECCT6PK.mjs";import{a as
|
|
1
|
+
import"../chunk-7ECCT6PK.mjs";import{a as c,b as d,c as e,d as f,e as g,f as h}from"../chunk-MML57K5H.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n}from"../chunk-5URUYE6H.mjs";import{a,b}from"../chunk-U3GMNXO4.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-6WDVDEQZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2BOHKN33.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-JCFTAG5Z.mjs";import"../chunk-HUWKPKPQ.mjs";import"../chunk-KDMSOCZY.mjs";export{b as aptosRequest,c as get,d as getAptosFullNode,e as getAptosPepperService,h as getPageWithObfuscatedCursor,f as paginateWithCursor,g as paginateWithObfuscatedCursor,i as post,l as postAptosFaucet,j as postAptosFullNode,k as postAptosIndexer,m as postAptosPepperService,n as postAptosProvingService,a as request};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AptosConfig } from '../
|
|
2
|
-
import { MimeType, AnyNumber, ClientConfig, AptosResponse } from '../types/types.mjs';
|
|
1
|
+
import { A as AptosConfig, bn as MimeType, bM as AnyNumber, bT as ClientConfig, c4 as AptosResponse } from '../account--Q9z_xMN.mjs';
|
|
3
2
|
import { AptosApiType } from '../utils/const.mjs';
|
|
4
|
-
import '../utils/apiEndpoints.mjs';
|
|
5
3
|
import '../types/indexer.mjs';
|
|
6
4
|
import '../types/generated/operations.mjs';
|
|
7
5
|
import '../types/generated/types.mjs';
|
|
6
|
+
import '../utils/apiEndpoints.mjs';
|
|
7
|
+
import '../core/common.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Options for making a POST request, including the API client configuration.
|
package/dist/esm/client/post.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"../chunk-5URUYE6H.mjs";import"../chunk-U3GMNXO4.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-CW35YAMN.mjs";import"../chunk-6WDVDEQZ.mjs";import"../chunk-7DQDJ2SA.mjs";import"../chunk-HNBVYE3N.mjs";import"../chunk-RGKRCZ36.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2BOHKN33.mjs";import"../chunk-ORMOQWWH.mjs";import"../chunk-TOBQ5UE6.mjs";import"../chunk-MT2RJ7H3.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-FLZPUYXQ.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-JCFTAG5Z.mjs";import"../chunk-HUWKPKPQ.mjs";import"../chunk-KDMSOCZY.mjs";export{a as post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer,e as postAptosPepperService,f as postAptosProvingService};
|
|
2
2
|
//# sourceMappingURL=post.mjs.map
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
export { createObjectAddress, createResourceAddress, createTokenAddress } from './utils/address.mjs';
|
|
2
|
-
import '
|
|
3
|
-
import '../../bcs/serializer.mjs';
|
|
4
|
-
import '../hex.mjs';
|
|
5
|
-
import '../common.mjs';
|
|
6
|
-
import '../../types/types.mjs';
|
|
2
|
+
import '../../account--Q9z_xMN.mjs';
|
|
7
3
|
import '../../types/indexer.mjs';
|
|
8
4
|
import '../../types/generated/operations.mjs';
|
|
9
5
|
import '../../types/generated/types.mjs';
|
|
10
6
|
import '../../utils/apiEndpoints.mjs';
|
|
11
|
-
import '../../
|
|
12
|
-
import '
|
|
7
|
+
import '../../utils/const.mjs';
|
|
8
|
+
import '../common.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../chunk-HNBVYE3N.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-
|
|
1
|
+
import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../chunk-HNBVYE3N.mjs";import"../../chunk-RGKRCZ36.mjs";import"../../chunk-FD6FGKYY.mjs";import"../../chunk-IJE2LVZG.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-EBMEXURY.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-KDMSOCZY.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { AccountAddress } from '
|
|
2
|
-
import '../../../bcs/serializer.mjs';
|
|
3
|
-
import '../../hex.mjs';
|
|
4
|
-
import '../../common.mjs';
|
|
5
|
-
import '../../../types/types.mjs';
|
|
1
|
+
import { n as AccountAddress } from '../../../account--Q9z_xMN.mjs';
|
|
6
2
|
import '../../../types/indexer.mjs';
|
|
7
3
|
import '../../../types/generated/operations.mjs';
|
|
8
4
|
import '../../../types/generated/types.mjs';
|
|
9
5
|
import '../../../utils/apiEndpoints.mjs';
|
|
10
|
-
import '../../../
|
|
11
|
-
import '
|
|
6
|
+
import '../../../utils/const.mjs';
|
|
7
|
+
import '../../common.mjs';
|
|
12
8
|
|
|
13
9
|
/**
|
|
14
10
|
* Creates an object address from creator address and seed
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunk-HNBVYE3N.mjs";import"../../../chunk-RGKRCZ36.mjs";import"../../../chunk-FD6FGKYY.mjs";import"../../../chunk-
|
|
1
|
+
import{a,b,c}from"../../../chunk-HNBVYE3N.mjs";import"../../../chunk-RGKRCZ36.mjs";import"../../../chunk-FD6FGKYY.mjs";import"../../../chunk-IJE2LVZG.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-EBMEXURY.mjs";import"../../../chunk-STY74NUA.mjs";import"../../../chunk-IF4UU2MT.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-KDMSOCZY.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=address.mjs.map
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
export { createObjectAddress, createResourceAddress, createTokenAddress } from './address.mjs';
|
|
2
|
-
import '
|
|
3
|
-
import '../../../bcs/serializer.mjs';
|
|
4
|
-
import '../../hex.mjs';
|
|
5
|
-
import '../../common.mjs';
|
|
6
|
-
import '../../../types/types.mjs';
|
|
2
|
+
import '../../../account--Q9z_xMN.mjs';
|
|
7
3
|
import '../../../types/indexer.mjs';
|
|
8
4
|
import '../../../types/generated/operations.mjs';
|
|
9
5
|
import '../../../types/generated/types.mjs';
|
|
10
6
|
import '../../../utils/apiEndpoints.mjs';
|
|
11
|
-
import '../../../
|
|
12
|
-
import '
|
|
7
|
+
import '../../../utils/const.mjs';
|
|
8
|
+
import '../../common.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-HNBVYE3N.mjs";import"../../../chunk-RGKRCZ36.mjs";import"../../../chunk-FD6FGKYY.mjs";import"../../../chunk-
|
|
1
|
+
import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-HNBVYE3N.mjs";import"../../../chunk-RGKRCZ36.mjs";import"../../../chunk-FD6FGKYY.mjs";import"../../../chunk-IJE2LVZG.mjs";import"../../../chunk-4WPQQPUF.mjs";import"../../../chunk-EBMEXURY.mjs";import"../../../chunk-STY74NUA.mjs";import"../../../chunk-IF4UU2MT.mjs";import"../../../chunk-56CNRT2K.mjs";import"../../../chunk-KDMSOCZY.mjs";export{a as createObjectAddress,b as createResourceAddress,c as createTokenAddress};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,333 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { ParsingResult } from './common.mjs';
|
|
4
|
-
import { TransactionArgument } from '../transactions/instances/transactionArgument.mjs';
|
|
5
|
-
import { HexInput } from '../types/types.mjs';
|
|
6
|
-
import './hex.mjs';
|
|
1
|
+
export { n as AccountAddress, m as AccountAddressInput, l as AddressInvalidReason } from '../account--Q9z_xMN.mjs';
|
|
2
|
+
import './common.mjs';
|
|
7
3
|
import '../types/indexer.mjs';
|
|
8
4
|
import '../types/generated/operations.mjs';
|
|
9
5
|
import '../types/generated/types.mjs';
|
|
10
6
|
import '../utils/apiEndpoints.mjs';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Provides reasons for an address was invalid.
|
|
14
|
-
* @group Implementation
|
|
15
|
-
* @category Serialization
|
|
16
|
-
*/
|
|
17
|
-
declare enum AddressInvalidReason {
|
|
18
|
-
INCORRECT_NUMBER_OF_BYTES = "incorrect_number_of_bytes",
|
|
19
|
-
INVALID_HEX_CHARS = "invalid_hex_chars",
|
|
20
|
-
TOO_SHORT = "too_short",
|
|
21
|
-
TOO_LONG = "too_long",
|
|
22
|
-
LEADING_ZERO_X_REQUIRED = "leading_zero_x_required",
|
|
23
|
-
LONG_FORM_REQUIRED_UNLESS_SPECIAL = "long_form_required_unless_special",
|
|
24
|
-
INVALID_PADDING_ZEROES = "INVALID_PADDING_ZEROES",
|
|
25
|
-
INVALID_PADDING_STRICTNESS = "INVALID_PADDING_STRICTNESS"
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The input for an account address, which can be either a hexadecimal string or a standard account address.
|
|
29
|
-
* @group Implementation
|
|
30
|
-
* @category Serialization
|
|
31
|
-
*/
|
|
32
|
-
type AccountAddressInput = HexInput | AccountAddress;
|
|
33
|
-
/**
|
|
34
|
-
* NOTE: Only use this class for account addresses. For other hex data, e.g. transaction
|
|
35
|
-
* hashes, use the Hex class.
|
|
36
|
-
*
|
|
37
|
-
* AccountAddress is used for working with account addresses. Account addresses, when
|
|
38
|
-
* represented as a string, generally look like these examples:
|
|
39
|
-
* - 0x1
|
|
40
|
-
* - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c
|
|
41
|
-
*
|
|
42
|
-
* Proper formatting and parsing of account addresses is defined by AIP-40.
|
|
43
|
-
* To learn more about the standard, read the AIP here:
|
|
44
|
-
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
45
|
-
*
|
|
46
|
-
* The comments in this class make frequent reference to the LONG and SHORT formats,
|
|
47
|
-
* as well as "special" addresses. To learn what these refer to see AIP-40.
|
|
48
|
-
* @group Implementation
|
|
49
|
-
* @category Serialization
|
|
50
|
-
*/
|
|
51
|
-
declare class AccountAddress extends Serializable implements TransactionArgument {
|
|
52
|
-
/**
|
|
53
|
-
* This is the internal representation of an account address.
|
|
54
|
-
* @group Implementation
|
|
55
|
-
* @category Serialization
|
|
56
|
-
*/
|
|
57
|
-
readonly data: Uint8Array;
|
|
58
|
-
/**
|
|
59
|
-
* The number of bytes that make up an account address.
|
|
60
|
-
* @group Implementation
|
|
61
|
-
* @category Serialization
|
|
62
|
-
*/
|
|
63
|
-
static readonly LENGTH: number;
|
|
64
|
-
/**
|
|
65
|
-
* The length of an address string in LONG form without a leading 0x.
|
|
66
|
-
* @group Implementation
|
|
67
|
-
* @category Serialization
|
|
68
|
-
*/
|
|
69
|
-
static readonly LONG_STRING_LENGTH: number;
|
|
70
|
-
static ZERO: AccountAddress;
|
|
71
|
-
static ONE: AccountAddress;
|
|
72
|
-
static TWO: AccountAddress;
|
|
73
|
-
static THREE: AccountAddress;
|
|
74
|
-
static FOUR: AccountAddress;
|
|
75
|
-
static A: AccountAddress;
|
|
76
|
-
/**
|
|
77
|
-
* Creates an instance of AccountAddress from a Uint8Array.
|
|
78
|
-
*
|
|
79
|
-
* This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.
|
|
80
|
-
*
|
|
81
|
-
* @param input A Uint8Array representing an account address.
|
|
82
|
-
* @throws ParsingError if the input length is not equal to 32 bytes.
|
|
83
|
-
* @group Implementation
|
|
84
|
-
* @category Serialization
|
|
85
|
-
*/
|
|
86
|
-
constructor(input: Uint8Array);
|
|
87
|
-
/**
|
|
88
|
-
* Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.
|
|
89
|
-
* In other words, the last byte of the address must be < 0b10000 (16)
|
|
90
|
-
* and every other byte must be zero.
|
|
91
|
-
*
|
|
92
|
-
* For more information on how special addresses are defined, see AIP-40:
|
|
93
|
-
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
94
|
-
*
|
|
95
|
-
* @returns true if the address is special, false otherwise.
|
|
96
|
-
* @group Implementation
|
|
97
|
-
* @category Serialization
|
|
98
|
-
*/
|
|
99
|
-
isSpecial(): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Return the AccountAddress as a string as per AIP-40.
|
|
102
|
-
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
103
|
-
* This representation returns special addresses in SHORT form (0xf)
|
|
104
|
-
* and other addresses in LONG form (0x + 64 characters).
|
|
105
|
-
*
|
|
106
|
-
* @returns AccountAddress as a string conforming to AIP-40.
|
|
107
|
-
* @group Implementation
|
|
108
|
-
* @category Serialization
|
|
109
|
-
*/
|
|
110
|
-
toString(): `0x${string}`;
|
|
111
|
-
/**
|
|
112
|
-
* Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.
|
|
113
|
-
*
|
|
114
|
-
* NOTE: Prefer to use `toString` where possible.
|
|
115
|
-
*
|
|
116
|
-
* @returns AccountAddress as a string without the leading 0x.
|
|
117
|
-
* @group Implementation
|
|
118
|
-
* @category Serialization
|
|
119
|
-
*/
|
|
120
|
-
toStringWithoutPrefix(): string;
|
|
121
|
-
/**
|
|
122
|
-
* Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.
|
|
123
|
-
*
|
|
124
|
-
* NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
|
|
125
|
-
*
|
|
126
|
-
* @returns AccountAddress as a string in LONG form.
|
|
127
|
-
* @group Implementation
|
|
128
|
-
* @category Serialization
|
|
129
|
-
*/
|
|
130
|
-
toStringLong(): `0x${string}`;
|
|
131
|
-
/**
|
|
132
|
-
* Returns the account address as a string in LONG form without a leading 0x.
|
|
133
|
-
* This function will include leading zeroes and will produce a string of 64 hex characters.
|
|
134
|
-
*
|
|
135
|
-
* NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).
|
|
136
|
-
*
|
|
137
|
-
* @returns {string} The account address in LONG form.
|
|
138
|
-
* @group Implementation
|
|
139
|
-
* @category Serialization
|
|
140
|
-
*/
|
|
141
|
-
toStringLongWithoutPrefix(): string;
|
|
142
|
-
/**
|
|
143
|
-
* Convert the account address to a string in SHORT format, which is 0x followed by the shortest
|
|
144
|
-
* possible representation (no leading zeros).
|
|
145
|
-
*
|
|
146
|
-
* @returns AccountAddress as a string in SHORT form.
|
|
147
|
-
* @group Implementation
|
|
148
|
-
* @category Serialization
|
|
149
|
-
*/
|
|
150
|
-
toStringShort(): `0x${string}`;
|
|
151
|
-
/**
|
|
152
|
-
* Returns a lossless short string representation of the address by trimming leading zeros.
|
|
153
|
-
* If the address consists of all zeros, returns "0".
|
|
154
|
-
*
|
|
155
|
-
* @returns A string representation of the address without leading zeros
|
|
156
|
-
* @group Implementation
|
|
157
|
-
* @category Serialization
|
|
158
|
-
*/
|
|
159
|
-
toStringShortWithoutPrefix(): string;
|
|
160
|
-
/**
|
|
161
|
-
* Get the inner data as a Uint8Array.
|
|
162
|
-
* The inner data is already a Uint8Array, so no conversion takes place.
|
|
163
|
-
*
|
|
164
|
-
* @returns Hex data as Uint8Array
|
|
165
|
-
* @group Implementation
|
|
166
|
-
* @category Serialization
|
|
167
|
-
*/
|
|
168
|
-
toUint8Array(): Uint8Array;
|
|
169
|
-
/**
|
|
170
|
-
* Serialize the AccountAddress to a Serializer instance's data buffer.
|
|
171
|
-
* @param serializer The serializer to serialize the AccountAddress to.
|
|
172
|
-
* @returns void
|
|
173
|
-
* @example
|
|
174
|
-
* const serializer = new Serializer();
|
|
175
|
-
* const address = AccountAddress.fromString("0x1");
|
|
176
|
-
* address.serialize(serializer);
|
|
177
|
-
* const bytes = serializer.toUint8Array();
|
|
178
|
-
* // `bytes` is now the BCS-serialized address.
|
|
179
|
-
* @group Implementation
|
|
180
|
-
* @category Serialization
|
|
181
|
-
*/
|
|
182
|
-
serialize(serializer: Serializer): void;
|
|
183
|
-
/**
|
|
184
|
-
* Serializes the current instance into a byte sequence suitable for entry functions.
|
|
185
|
-
* This allows for the proper encoding of data when interacting with entry functions in the blockchain.
|
|
186
|
-
*
|
|
187
|
-
* @param serializer - The serializer instance used to convert the data into bytes.
|
|
188
|
-
* @group Implementation
|
|
189
|
-
* @category Serialization
|
|
190
|
-
*/
|
|
191
|
-
serializeForEntryFunction(serializer: Serializer): void;
|
|
192
|
-
/**
|
|
193
|
-
* Serializes the current instance for use in a script function by encoding it into a byte sequence.
|
|
194
|
-
* This process involves serializing the variant index and the instance data, making it suitable for transmission.
|
|
195
|
-
*
|
|
196
|
-
* @param serializer - The serializer instance used to perform the serialization.
|
|
197
|
-
* @group Implementation
|
|
198
|
-
* @category Serialization
|
|
199
|
-
*/
|
|
200
|
-
serializeForScriptFunction(serializer: Serializer): void;
|
|
201
|
-
/**
|
|
202
|
-
* Deserialize an AccountAddress from the byte buffer in a Deserializer instance.
|
|
203
|
-
* This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.
|
|
204
|
-
* @param deserializer The deserializer to deserialize the AccountAddress from.
|
|
205
|
-
* @returns An instance of AccountAddress.
|
|
206
|
-
* @example
|
|
207
|
-
* const bytes = hexToBytes("0x0102030405060708091011121314151617181920212223242526272829303132");
|
|
208
|
-
* const deserializer = new Deserializer(bytes);
|
|
209
|
-
* const address = AccountAddress.deserialize(deserializer);
|
|
210
|
-
* // `address` is now an instance of AccountAddress.
|
|
211
|
-
* @group Implementation
|
|
212
|
-
* @category Serialization
|
|
213
|
-
*/
|
|
214
|
-
static deserialize(deserializer: Deserializer): AccountAddress;
|
|
215
|
-
/**
|
|
216
|
-
* NOTE: This function has strict parsing behavior. For relaxed behavior, please use
|
|
217
|
-
* the `fromString` function.
|
|
218
|
-
*
|
|
219
|
-
* Creates an instance of AccountAddress from a hex string.
|
|
220
|
-
*
|
|
221
|
-
* This function allows only the strictest formats defined by AIP-40. In short this
|
|
222
|
-
* means only the following formats are accepted:
|
|
223
|
-
*
|
|
224
|
-
* - LONG
|
|
225
|
-
* - SHORT for special addresses
|
|
226
|
-
*
|
|
227
|
-
* Where:
|
|
228
|
-
* - LONG is defined as 0x + 64 hex characters.
|
|
229
|
-
* - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.
|
|
230
|
-
*
|
|
231
|
-
* This means the following are not accepted:
|
|
232
|
-
* - SHORT for non-special addresses.
|
|
233
|
-
* - Any address without a leading 0x.
|
|
234
|
-
*
|
|
235
|
-
* @param input - A hex string representing an account address.
|
|
236
|
-
*
|
|
237
|
-
* @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.
|
|
238
|
-
*
|
|
239
|
-
* @remarks
|
|
240
|
-
*
|
|
241
|
-
* This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.
|
|
242
|
-
*
|
|
243
|
-
* @see AIP-40 documentation for more details on address formats:
|
|
244
|
-
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
245
|
-
*
|
|
246
|
-
* @returns An instance of AccountAddress.
|
|
247
|
-
* @group Implementation
|
|
248
|
-
* @category Serialization
|
|
249
|
-
*/
|
|
250
|
-
static fromStringStrict(input: string): AccountAddress;
|
|
251
|
-
/**
|
|
252
|
-
* NOTE: This function has relaxed parsing behavior. For strict behavior, please use
|
|
253
|
-
* the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this
|
|
254
|
-
* function, `fromString`.
|
|
255
|
-
*
|
|
256
|
-
* Creates an instance of AccountAddress from a hex string.
|
|
257
|
-
*
|
|
258
|
-
* This function allows all formats defined by AIP-40. In short this means the
|
|
259
|
-
* following formats are accepted:
|
|
260
|
-
*
|
|
261
|
-
* - LONG, with or without leading 0x
|
|
262
|
-
* - SHORT*, with or without leading 0x
|
|
263
|
-
*
|
|
264
|
-
* Where:
|
|
265
|
-
* - LONG is 64 hex characters.
|
|
266
|
-
* - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.
|
|
267
|
-
* - Padding zeroes are allowed, e.g. 0x0123 is valid.
|
|
268
|
-
*
|
|
269
|
-
* Learn more about the different address formats by reading AIP-40:
|
|
270
|
-
* https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.
|
|
271
|
-
*
|
|
272
|
-
* @param input A hex string representing an account address.
|
|
273
|
-
* @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.
|
|
274
|
-
*
|
|
275
|
-
* @returns An instance of AccountAddress.
|
|
276
|
-
*
|
|
277
|
-
* @throws ParsingError if the hex string is too short, too long, or contains invalid characters.
|
|
278
|
-
* @group Implementation
|
|
279
|
-
* @category Serialization
|
|
280
|
-
*/
|
|
281
|
-
static fromString(input: string, { maxMissingChars }?: {
|
|
282
|
-
maxMissingChars?: number;
|
|
283
|
-
}): AccountAddress;
|
|
284
|
-
/**
|
|
285
|
-
* Convenience method for creating an AccountAddress from various input types.
|
|
286
|
-
* This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding
|
|
287
|
-
* AccountAddress.
|
|
288
|
-
*
|
|
289
|
-
* @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,
|
|
290
|
-
* or an existing AccountAddress.
|
|
291
|
-
* @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.
|
|
292
|
-
* @group Implementation
|
|
293
|
-
* @category Serialization
|
|
294
|
-
*/
|
|
295
|
-
static from(input: AccountAddressInput, { maxMissingChars }?: {
|
|
296
|
-
maxMissingChars?: number;
|
|
297
|
-
}): AccountAddress;
|
|
298
|
-
/**
|
|
299
|
-
* Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.
|
|
300
|
-
*
|
|
301
|
-
* @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.
|
|
302
|
-
* @group Implementation
|
|
303
|
-
* @category Serialization
|
|
304
|
-
*/
|
|
305
|
-
static fromStrict(input: AccountAddressInput): AccountAddress;
|
|
306
|
-
/**
|
|
307
|
-
* Check if the provided input is a valid AccountAddress.
|
|
308
|
-
*
|
|
309
|
-
* @param args - The arguments for validation.
|
|
310
|
-
* @param args.input - A hex string representing an account address.
|
|
311
|
-
* @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.
|
|
312
|
-
*
|
|
313
|
-
* @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.
|
|
314
|
-
* If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.
|
|
315
|
-
* @group Implementation
|
|
316
|
-
* @category Serialization
|
|
317
|
-
*/
|
|
318
|
-
static isValid(args: {
|
|
319
|
-
input: AccountAddressInput;
|
|
320
|
-
strict?: boolean;
|
|
321
|
-
}): ParsingResult<AddressInvalidReason>;
|
|
322
|
-
/**
|
|
323
|
-
* Determine if two AccountAddresses are equal based on their underlying byte data.
|
|
324
|
-
*
|
|
325
|
-
* @param other - The AccountAddress to compare to.
|
|
326
|
-
* @returns true if the AccountAddresses are equal, false if not.
|
|
327
|
-
* @group Implementation
|
|
328
|
-
* @category Serialization
|
|
329
|
-
*/
|
|
330
|
-
equals(other: AccountAddress): boolean;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export { AccountAddress, type AccountAddressInput, AddressInvalidReason };
|
|
7
|
+
import '../utils/const.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-RGKRCZ36.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-EBMEXURY.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-KDMSOCZY.mjs";export{b as AccountAddress,a as AddressInvalidReason};
|
|
2
2
|
//# sourceMappingURL=accountAddress.mjs.map
|