@aptos-labs/ts-sdk 6.0.0 → 6.2.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/README.md +9 -13
- package/dist/common/{account-Dpz_N9h-.d.ts → account-DGpxrkAn.d.ts} +187 -20
- package/dist/common/chunk-2VR6ONNW.js +4 -0
- package/dist/common/chunk-2VR6ONNW.js.map +1 -0
- package/dist/common/cli/index.d.ts +2 -2
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +69 -6
- package/dist/common/index.js +34 -45
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-BW_kXHC2.d.mts → Ed25519Account-BCt2cu_M.d.mts} +2 -2
- package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.d.mts +2 -2
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.d.mts +2 -2
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.d.mts +3 -3
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +2 -2
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.d.mts +2 -2
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.d.mts +26 -2
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +3 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +2 -2
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.d.mts +3 -3
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.d.mts +3 -3
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.d.mts +1 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/{account-CcxnCdYZ.d.mts → account-Dg0ejXHy.d.mts} +172 -8
- package/dist/esm/api/account/abstraction.d.mts +1 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.d.mts +2 -2
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.d.mts +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +3 -3
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +1 -1
- package/dist/esm/api/aptosConfig.mjs +1 -1
- package/dist/esm/api/coin.d.mts +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.d.mts +2 -2
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/faucet.d.mts +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.d.mts +2 -2
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.d.mts +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +3 -3
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.d.mts +3 -3
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.d.mts +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.d.mts +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.d.mts +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.d.mts +2 -2
- package/dist/esm/api/transaction.mjs +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/helpers.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/helpers.mjs +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/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/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +1 -1
- package/dist/esm/bcs/deserializer.d.mts +1 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.d.mts +1 -1
- package/dist/esm/bcs/index.mjs +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/fixedBytes.d.mts +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +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/moveStructs.d.mts +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.d.mts +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-5FNZUL2Y.mjs → chunk-2VBY2V4Z.mjs} +2 -2
- package/dist/esm/chunk-2VHA77EO.mjs +2 -0
- package/dist/esm/chunk-2VHA77EO.mjs.map +1 -0
- package/dist/esm/{chunk-35DKMW7Q.mjs → chunk-44MMFX5F.mjs} +1 -1
- package/dist/esm/chunk-44MMFX5F.mjs.map +1 -0
- package/dist/esm/chunk-5HHC2YG4.mjs +2 -0
- package/dist/esm/chunk-5LMLIRGK.mjs +2 -0
- package/dist/esm/chunk-5LMLIRGK.mjs.map +1 -0
- package/dist/esm/chunk-66F7RP7K.mjs +2 -0
- package/dist/esm/chunk-66F7RP7K.mjs.map +1 -0
- package/dist/esm/chunk-6CD6PDFJ.mjs +4 -0
- package/dist/esm/chunk-6CD6PDFJ.mjs.map +1 -0
- package/dist/esm/{chunk-FW6UHAQV.mjs → chunk-A7SQEK23.mjs} +2 -2
- package/dist/esm/chunk-A7SQEK23.mjs.map +1 -0
- package/dist/esm/{chunk-G3HAIETV.mjs → chunk-ASFFADWS.mjs} +2 -2
- package/dist/esm/chunk-ASFFADWS.mjs.map +1 -0
- package/dist/esm/chunk-AUGTNOKZ.mjs +2 -0
- package/dist/esm/{chunk-RQN6LA7E.mjs.map → chunk-AUGTNOKZ.mjs.map} +1 -1
- package/dist/esm/chunk-BT742BFQ.mjs +2 -0
- package/dist/esm/chunk-BT742BFQ.mjs.map +1 -0
- package/dist/esm/chunk-C2KVLMPH.mjs +2 -0
- package/dist/esm/chunk-C2KVLMPH.mjs.map +1 -0
- package/dist/esm/{chunk-DIFSO4N6.mjs → chunk-CD3EZCI5.mjs} +2 -2
- package/dist/esm/{chunk-43LWUUXS.mjs → chunk-E3DHFXN4.mjs} +2 -2
- package/dist/esm/{chunk-QDJDZ3ON.mjs → chunk-EIWPAECI.mjs} +2 -2
- package/dist/esm/{chunk-GOXRBEIJ.mjs → chunk-F45HI7LU.mjs} +1 -1
- package/dist/esm/chunk-F45HI7LU.mjs.map +1 -0
- package/dist/esm/chunk-F4LHBGG2.mjs +2 -0
- package/dist/esm/chunk-F4LHBGG2.mjs.map +1 -0
- package/dist/esm/{chunk-MEG27LEV.mjs → chunk-FDHHQUS3.mjs} +3 -3
- package/dist/esm/chunk-FDHHQUS3.mjs.map +1 -0
- package/dist/esm/{chunk-LS2HRAVW.mjs → chunk-G5OONGWS.mjs} +1 -12
- package/dist/esm/chunk-G5OONGWS.mjs.map +1 -0
- package/dist/esm/{chunk-F3NI6N7R.mjs → chunk-H2T2SU5O.mjs} +2 -2
- package/dist/esm/chunk-H2T2SU5O.mjs.map +1 -0
- package/dist/esm/chunk-ITZN23GU.mjs +2 -0
- package/dist/esm/{chunk-X674XJNJ.mjs → chunk-KOVWYU53.mjs} +2 -2
- package/dist/esm/{chunk-PXJEKGEG.mjs → chunk-LDK76MDN.mjs} +2 -2
- package/dist/esm/chunk-M65PXVDO.mjs +2 -0
- package/dist/esm/chunk-M65PXVDO.mjs.map +1 -0
- package/dist/esm/{chunk-WZ6FL7CH.mjs → chunk-NWP2VEMB.mjs} +2 -2
- package/dist/esm/chunk-ODNZJSOC.mjs +2 -0
- package/dist/esm/chunk-ODNZJSOC.mjs.map +1 -0
- package/dist/esm/{chunk-6IWGTO2J.mjs → chunk-POQ4FT4E.mjs} +2 -2
- package/dist/esm/{chunk-76SVQZDX.mjs → chunk-Q4KYBAYN.mjs} +2 -2
- package/dist/esm/chunk-Q5ESW36C.mjs +2 -0
- package/dist/esm/chunk-Q5ESW36C.mjs.map +1 -0
- package/dist/esm/{chunk-52PWWLJJ.mjs → chunk-QRW7MQDA.mjs} +2 -2
- package/dist/esm/chunk-QRW7MQDA.mjs.map +1 -0
- package/dist/esm/{chunk-3P474TWM.mjs → chunk-R7PCBRRT.mjs} +2 -2
- package/dist/esm/chunk-T32P4APJ.mjs +2 -0
- package/dist/esm/chunk-T32P4APJ.mjs.map +1 -0
- package/dist/esm/chunk-TAHLOBRG.mjs +2 -0
- package/dist/esm/chunk-TAHLOBRG.mjs.map +1 -0
- package/dist/esm/{chunk-RYOICF37.mjs → chunk-TSPG5VED.mjs} +2 -2
- package/dist/esm/{chunk-56IXVVXX.mjs → chunk-UPHD2B4I.mjs} +2 -2
- package/dist/esm/{chunk-QREVMGQZ.mjs → chunk-UVJW4DPP.mjs} +1 -1
- package/dist/esm/{chunk-QREVMGQZ.mjs.map → chunk-UVJW4DPP.mjs.map} +1 -1
- package/dist/esm/chunk-UYG4XVVO.mjs +2 -0
- package/dist/esm/chunk-UYG4XVVO.mjs.map +1 -0
- package/dist/esm/chunk-WFZFTRRS.mjs +2 -0
- package/dist/esm/chunk-WFZFTRRS.mjs.map +1 -0
- package/dist/esm/{chunk-CUXCVNES.mjs → chunk-X4IR6WX6.mjs} +2 -2
- package/dist/esm/chunk-YJVBGKWM.mjs +2 -0
- package/dist/esm/chunk-YJVBGKWM.mjs.map +1 -0
- package/dist/esm/{chunk-NTLOKAPD.mjs → chunk-YTFJ5W7U.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.d.mts +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +1 -1
- package/dist/esm/cli/move.mjs +1 -1
- package/dist/esm/client/core.d.mts +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.d.mts +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.d.mts +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.d.mts +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.d.mts +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.d.mts +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.d.mts +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.d.mts +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.d.mts +1 -1
- package/dist/esm/core/authenticationKey.mjs +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/deserializationUtils.d.mts +1 -1
- package/dist/esm/core/crypto/deserializationUtils.mjs +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/ephemeral.d.mts +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +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/index.d.mts +2 -2
- package/dist/esm/core/crypto/index.mjs +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/multiEd25519.d.mts +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.d.mts +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/poseidon.mjs +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/proof.d.mts +1 -1
- package/dist/esm/core/crypto/proof.mjs +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/secp256k1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/secp256r1.d.mts +1 -1
- package/dist/esm/core/crypto/secp256r1.mjs +1 -1
- package/dist/esm/core/crypto/signature.d.mts +1 -1
- package/dist/esm/core/crypto/signature.mjs +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/types.d.mts +1 -1
- package/dist/esm/core/crypto/utils.d.mts +1 -1
- package/dist/esm/core/crypto/utils.mjs +1 -1
- package/dist/esm/core/hex.d.mts +1 -1
- package/dist/esm/core/index.d.mts +2 -2
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.d.mts +1 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/{federatedKeyless-BzaYmP03.d.mts → federatedKeyless-BYLu31Sa.d.mts} +13 -2
- package/dist/esm/index.d.mts +5 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.d.mts +1 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.d.mts +3 -3
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +2 -2
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +3 -3
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +4 -4
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +4 -2
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.d.mts +3 -3
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.d.mts +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -2
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.d.mts +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.d.mts +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +2 -2
- package/dist/esm/internal/transactionSubmission.mjs +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/utils.d.mts +1 -1
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/view.d.mts +1 -1
- package/dist/esm/internal/view.mjs +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/index.d.mts +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +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/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +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/identifier.d.mts +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +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/moduleId.d.mts +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +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/rawTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +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/signedTransaction.d.mts +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +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/transactionArgument.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +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/index.d.mts +2 -2
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.d.mts +12 -4
- package/dist/esm/transactions/management/transactionWorker.mjs +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/index.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +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/transactionBuilder.d.mts +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +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/parser.d.mts +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +1 -1
- package/dist/esm/types/generated/operations.d.mts +0 -11
- package/dist/esm/types/generated/queries.d.mts +1 -1
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/index.d.mts +1 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +1 -1
- package/dist/esm/types/types.d.mts +1 -1
- package/dist/esm/types/types.mjs +1 -1
- package/dist/esm/utils/const.d.mts +16 -2
- package/dist/esm/utils/const.mjs +1 -1
- package/dist/esm/utils/helpers.d.mts +21 -2
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +3 -3
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/memoize.d.mts +23 -1
- package/dist/esm/utils/memoize.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.d.mts +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +36 -50
- package/src/account/AbstractKeylessAccount.ts +2 -3
- package/src/account/DerivableAbstractedAccount.ts +1 -3
- package/src/account/EphemeralKeyPair.ts +53 -2
- package/src/account/MultiEd25519Account.ts +0 -2
- package/src/account/MultiKeyAccount.ts +0 -2
- package/src/account/SingleKeyAccount.ts +0 -1
- package/src/api/account.ts +1 -2
- package/src/api/ans.ts +0 -1
- package/src/api/aptos.ts +1 -1
- package/src/api/aptosConfig.ts +12 -1
- package/src/api/transaction.ts +4 -4
- package/src/api/transactionSubmission/build.ts +1 -5
- package/src/api/transactionSubmission/helpers.ts +0 -1
- package/src/api/transactionSubmission/sign.ts +2 -2
- package/src/bcs/deserializer.ts +64 -17
- package/src/bcs/serializable/movePrimitives.ts +15 -28
- package/src/bcs/serializable/moveStructs.ts +4 -6
- package/src/bcs/serializer.ts +147 -12
- package/src/cli/localNode.ts +4 -7
- package/src/cli/move.ts +7 -7
- package/src/client/get.ts +8 -10
- package/src/core/account/utils/address.ts +3 -3
- package/src/core/accountAddress.ts +2 -3
- package/src/core/crypto/abstraction.ts +0 -3
- package/src/core/crypto/ed25519.ts +66 -1
- package/src/core/crypto/federatedKeyless.ts +1 -1
- package/src/core/crypto/keyless.ts +65 -14
- package/src/core/crypto/multiEd25519.ts +1 -3
- package/src/core/crypto/multiKey.ts +4 -7
- package/src/core/crypto/poseidon.ts +0 -1
- package/src/core/crypto/privateKey.ts +2 -5
- package/src/core/crypto/secp256k1.ts +68 -3
- package/src/core/crypto/secp256r1.ts +1 -1
- package/src/core/crypto/singleKey.ts +4 -1
- package/src/core/crypto/utils.ts +6 -3
- package/src/errors/index.ts +4 -5
- package/src/internal/account.ts +21 -30
- package/src/internal/ans.ts +5 -6
- package/src/internal/general.ts +24 -6
- package/src/internal/keyless.ts +1 -1
- package/src/internal/queries/getAccountAddressesForAuthKey.graphql +4 -1
- package/src/internal/queries/getAuthKeysForPublicKey.graphql +4 -1
- package/src/internal/queries/getCollectionData.graphql +0 -11
- package/src/internal/queries/getTableItemsData.graphql +1 -1
- package/src/internal/queries/getTableItemsMetadata.graphql +2 -2
- package/src/internal/transaction.ts +5 -7
- package/src/internal/transactionSubmission.ts +23 -0
- package/src/transactions/authenticator/account.ts +0 -4
- package/src/transactions/authenticator/transaction.ts +0 -2
- package/src/transactions/instances/multiAgentTransaction.ts +0 -2
- package/src/transactions/instances/rawTransaction.ts +0 -2
- package/src/transactions/instances/signedTransaction.ts +0 -2
- package/src/transactions/instances/simpleTransaction.ts +0 -2
- package/src/transactions/instances/transactionPayload.ts +5 -7
- package/src/transactions/management/accountSequenceNumber.ts +0 -4
- package/src/transactions/management/transactionWorker.ts +40 -10
- package/src/transactions/transactionBuilder/remoteAbi.ts +22 -8
- package/src/transactions/transactionBuilder/transactionBuilder.ts +14 -12
- package/src/transactions/typeTag/index.ts +0 -3
- package/src/transactions/typeTag/parser.ts +3 -5
- package/src/types/generated/operations.ts +0 -11
- package/src/types/generated/queries.ts +0 -11
- package/src/types/types.ts +26 -0
- package/src/utils/const.ts +17 -1
- package/src/utils/helpers.ts +47 -8
- package/src/utils/memoize.ts +177 -11
- package/src/version.ts +1 -1
- package/dist/common/chunk-4RHBBU7C.js +0 -4
- package/dist/common/chunk-4RHBBU7C.js.map +0 -1
- package/dist/esm/chunk-2DPQMXUG.mjs +0 -4
- package/dist/esm/chunk-2DPQMXUG.mjs.map +0 -1
- package/dist/esm/chunk-2LCPW76G.mjs +0 -2
- package/dist/esm/chunk-2LCPW76G.mjs.map +0 -1
- package/dist/esm/chunk-2PASUPUO.mjs +0 -2
- package/dist/esm/chunk-2PASUPUO.mjs.map +0 -1
- package/dist/esm/chunk-35DKMW7Q.mjs.map +0 -1
- package/dist/esm/chunk-52PWWLJJ.mjs.map +0 -1
- package/dist/esm/chunk-54C2P534.mjs +0 -2
- package/dist/esm/chunk-54C2P534.mjs.map +0 -1
- package/dist/esm/chunk-BGZDJ5SM.mjs +0 -2
- package/dist/esm/chunk-BGZDJ5SM.mjs.map +0 -1
- package/dist/esm/chunk-C5UZZHA4.mjs +0 -2
- package/dist/esm/chunk-C5UZZHA4.mjs.map +0 -1
- package/dist/esm/chunk-F3NI6N7R.mjs.map +0 -1
- package/dist/esm/chunk-FW6UHAQV.mjs.map +0 -1
- package/dist/esm/chunk-G3HAIETV.mjs.map +0 -1
- package/dist/esm/chunk-GOXRBEIJ.mjs.map +0 -1
- package/dist/esm/chunk-I42Z32Q2.mjs +0 -2
- package/dist/esm/chunk-I42Z32Q2.mjs.map +0 -1
- package/dist/esm/chunk-JN65XG2P.mjs +0 -2
- package/dist/esm/chunk-JN65XG2P.mjs.map +0 -1
- package/dist/esm/chunk-KUF4DKN5.mjs +0 -2
- package/dist/esm/chunk-LD3I4CYO.mjs +0 -2
- package/dist/esm/chunk-LS2HRAVW.mjs.map +0 -1
- package/dist/esm/chunk-MEG27LEV.mjs.map +0 -1
- package/dist/esm/chunk-NCKJ7X57.mjs +0 -2
- package/dist/esm/chunk-NCKJ7X57.mjs.map +0 -1
- package/dist/esm/chunk-NK3Y3PV3.mjs +0 -2
- package/dist/esm/chunk-NK3Y3PV3.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-PYVKCTUN.mjs +0 -2
- package/dist/esm/chunk-PYVKCTUN.mjs.map +0 -1
- package/dist/esm/chunk-QEHKRR3I.mjs +0 -2
- package/dist/esm/chunk-QEHKRR3I.mjs.map +0 -1
- package/dist/esm/chunk-RQN6LA7E.mjs +0 -2
- package/dist/esm/chunk-Y426VCPM.mjs +0 -2
- package/dist/esm/chunk-Y426VCPM.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-5FNZUL2Y.mjs.map → chunk-2VBY2V4Z.mjs.map} +0 -0
- /package/dist/esm/{chunk-KUF4DKN5.mjs.map → chunk-5HHC2YG4.mjs.map} +0 -0
- /package/dist/esm/{chunk-DIFSO4N6.mjs.map → chunk-CD3EZCI5.mjs.map} +0 -0
- /package/dist/esm/{chunk-43LWUUXS.mjs.map → chunk-E3DHFXN4.mjs.map} +0 -0
- /package/dist/esm/{chunk-QDJDZ3ON.mjs.map → chunk-EIWPAECI.mjs.map} +0 -0
- /package/dist/esm/{chunk-LD3I4CYO.mjs.map → chunk-ITZN23GU.mjs.map} +0 -0
- /package/dist/esm/{chunk-X674XJNJ.mjs.map → chunk-KOVWYU53.mjs.map} +0 -0
- /package/dist/esm/{chunk-PXJEKGEG.mjs.map → chunk-LDK76MDN.mjs.map} +0 -0
- /package/dist/esm/{chunk-WZ6FL7CH.mjs.map → chunk-NWP2VEMB.mjs.map} +0 -0
- /package/dist/esm/{chunk-6IWGTO2J.mjs.map → chunk-POQ4FT4E.mjs.map} +0 -0
- /package/dist/esm/{chunk-76SVQZDX.mjs.map → chunk-Q4KYBAYN.mjs.map} +0 -0
- /package/dist/esm/{chunk-3P474TWM.mjs.map → chunk-R7PCBRRT.mjs.map} +0 -0
- /package/dist/esm/{chunk-RYOICF37.mjs.map → chunk-TSPG5VED.mjs.map} +0 -0
- /package/dist/esm/{chunk-56IXVVXX.mjs.map → chunk-UPHD2B4I.mjs.map} +0 -0
- /package/dist/esm/{chunk-CUXCVNES.mjs.map → chunk-X4IR6WX6.mjs.map} +0 -0
- /package/dist/esm/{chunk-NTLOKAPD.mjs.map → chunk-YTFJ5W7U.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# TypeScript SDK for Aptos
|
|
2
2
|
|
|
3
|
-
![License][github-license]
|
|
4
|
-
[![Discord][discord-image]][discord-url]
|
|
5
3
|
[![NPM Package Version][npm-image-version]][npm-url]
|
|
6
4
|

|
|
7
|
-

|
|
8
5
|
[![NPM Package Downloads][npm-image-downloads]][npm-url]
|
|
9
6
|
|
|
10
7
|
The [TypeScript SDK](https://www.npmjs.com/package/@aptos-labs/ts-sdk) allows you to connect, explore, and interact with the Aptos blockchain. You can use it to request data, send transactions, set up test environments, and more!
|
|
11
8
|
|
|
12
|
-
## Learn
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
## Learn More
|
|
10
|
+
|
|
11
|
+
For comprehensive guides, tutorials, and API reference, visit [aptos.dev](https://aptos.dev):
|
|
12
|
+
|
|
13
|
+
- **[Quickstart Guide](https://aptos.dev/en/build/sdks/ts-sdk/quickstart)** - Get up and running quickly
|
|
14
|
+
- **[SDK Tutorials](https://aptos.dev/en/build/sdks/ts-sdk)** - Step-by-step tutorials
|
|
15
|
+
- **[API Reference](https://aptos-labs.github.io/aptos-ts-sdk/)** - Complete API documentation
|
|
16
|
+
- **[Examples](./examples/README.md)** - Code examples and sample applications
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -247,8 +247,4 @@ pnpm jest keyless.test.ts
|
|
|
247
247
|
|
|
248
248
|
[npm-image-version]: https://img.shields.io/npm/v/%40aptos-labs%2Fts-sdk.svg
|
|
249
249
|
[npm-image-downloads]: https://img.shields.io/npm/dm/%40aptos-labs%2Fts-sdk.svg
|
|
250
|
-
[npm-url]: https://npmjs.org/package/@aptos-labs/ts-sdk
|
|
251
|
-
[experimental-url]: https://www.npmjs.com/package/@aptos-labs/ts-sdk/v/experimental
|
|
252
|
-
[discord-image]: https://img.shields.io/discord/945856774056083548?label=Discord&logo=discord&style=flat
|
|
253
|
-
[discord-url]: https://discord.gg/aptosnetwork
|
|
254
|
-
[github-license]: https://img.shields.io/github/license/aptos-labs/aptos-ts-sdk
|
|
250
|
+
[npm-url]: https://npmjs.org/package/@aptos-labs/ts-sdk
|
|
@@ -178,17 +178,6 @@ type GetCollectionDataQuery = {
|
|
|
178
178
|
description: string;
|
|
179
179
|
last_transaction_timestamp: any;
|
|
180
180
|
last_transaction_version: any;
|
|
181
|
-
cdn_asset_uris?: {
|
|
182
|
-
cdn_image_uri?: string | null;
|
|
183
|
-
asset_uri: string;
|
|
184
|
-
animation_optimizer_retry_count: number;
|
|
185
|
-
cdn_animation_uri?: string | null;
|
|
186
|
-
cdn_json_uri?: string | null;
|
|
187
|
-
image_optimizer_retry_count: number;
|
|
188
|
-
json_parser_retry_count: number;
|
|
189
|
-
raw_animation_uri?: string | null;
|
|
190
|
-
raw_image_uri?: string | null;
|
|
191
|
-
} | null;
|
|
192
181
|
}>;
|
|
193
182
|
};
|
|
194
183
|
type GetCurrentFungibleAssetBalancesQuery = {
|
|
@@ -858,6 +847,11 @@ declare abstract class Serializable {
|
|
|
858
847
|
declare class Serializer {
|
|
859
848
|
private buffer;
|
|
860
849
|
private offset;
|
|
850
|
+
/**
|
|
851
|
+
* Reusable DataView instance to reduce allocations during serialization.
|
|
852
|
+
* Recreated when buffer is resized.
|
|
853
|
+
*/
|
|
854
|
+
private dataView;
|
|
861
855
|
/**
|
|
862
856
|
* Constructs a serializer with a buffer of size `length` bytes, 64 bytes by default.
|
|
863
857
|
* The `length` must be greater than 0.
|
|
@@ -869,7 +863,8 @@ declare class Serializer {
|
|
|
869
863
|
constructor(length?: number);
|
|
870
864
|
/**
|
|
871
865
|
* Ensures that the internal buffer can accommodate the specified number of bytes.
|
|
872
|
-
* This function dynamically resizes the buffer
|
|
866
|
+
* This function dynamically resizes the buffer using a growth factor of 1.5x with
|
|
867
|
+
* a minimum growth increment to balance memory usage and reallocation frequency.
|
|
873
868
|
*
|
|
874
869
|
* @param bytes - The number of bytes to ensure the buffer can handle.
|
|
875
870
|
* @group Implementation
|
|
@@ -886,6 +881,7 @@ declare class Serializer {
|
|
|
886
881
|
protected appendToBuffer(values: Uint8Array): void;
|
|
887
882
|
/**
|
|
888
883
|
* Serializes a value into the buffer using the provided function, ensuring the buffer can accommodate the size.
|
|
884
|
+
* Uses the cached DataView instance for better performance.
|
|
889
885
|
*
|
|
890
886
|
* @param fn - The function to serialize the value, which takes a byte offset, the value to serialize, and an optional little-endian flag.
|
|
891
887
|
* @param fn.byteOffset - The byte offset at which to write the value.
|
|
@@ -1087,12 +1083,40 @@ declare class Serializer {
|
|
|
1087
1083
|
* Returns the buffered bytes as a Uint8Array.
|
|
1088
1084
|
*
|
|
1089
1085
|
* This function allows you to retrieve the byte representation of the buffer up to the current offset.
|
|
1086
|
+
* For better performance, returns a view when the buffer is exactly the right size, or copies
|
|
1087
|
+
* only the used portion otherwise.
|
|
1090
1088
|
*
|
|
1091
1089
|
* @returns Uint8Array - The byte array representation of the buffer.
|
|
1092
1090
|
* @group Implementation
|
|
1093
1091
|
* @category BCS
|
|
1094
1092
|
*/
|
|
1095
1093
|
toUint8Array(): Uint8Array;
|
|
1094
|
+
/**
|
|
1095
|
+
* Resets the serializer to its initial state, allowing the buffer to be reused.
|
|
1096
|
+
* This clears the buffer contents to prevent data leakage between uses.
|
|
1097
|
+
*
|
|
1098
|
+
* @group Implementation
|
|
1099
|
+
* @category BCS
|
|
1100
|
+
*/
|
|
1101
|
+
reset(): void;
|
|
1102
|
+
/**
|
|
1103
|
+
* Returns the current number of bytes written to the serializer.
|
|
1104
|
+
*
|
|
1105
|
+
* @returns The number of bytes written.
|
|
1106
|
+
* @group Implementation
|
|
1107
|
+
* @category BCS
|
|
1108
|
+
*/
|
|
1109
|
+
getOffset(): number;
|
|
1110
|
+
/**
|
|
1111
|
+
* Returns a view of the serialized bytes without copying.
|
|
1112
|
+
* WARNING: The returned view is only valid until the next write operation.
|
|
1113
|
+
* Use toUint8Array() if you need a persistent copy.
|
|
1114
|
+
*
|
|
1115
|
+
* @returns A Uint8Array view of the buffer (not a copy).
|
|
1116
|
+
* @group Implementation
|
|
1117
|
+
* @category BCS
|
|
1118
|
+
*/
|
|
1119
|
+
toUint8ArrayView(): Uint8Array;
|
|
1096
1120
|
/**
|
|
1097
1121
|
* Serializes a `Serializable` value, facilitating composable serialization.
|
|
1098
1122
|
*
|
|
@@ -1103,6 +1127,29 @@ declare class Serializer {
|
|
|
1103
1127
|
* @category BCS
|
|
1104
1128
|
*/
|
|
1105
1129
|
serialize<T extends Serializable>(value: T): void;
|
|
1130
|
+
/**
|
|
1131
|
+
* Serializes a Serializable value as a byte array with a length prefix.
|
|
1132
|
+
* This is the optimized pattern for entry function argument serialization.
|
|
1133
|
+
*
|
|
1134
|
+
* Instead of:
|
|
1135
|
+
* ```typescript
|
|
1136
|
+
* const bcsBytes = value.bcsToBytes(); // Creates new Serializer, copies bytes
|
|
1137
|
+
* serializer.serializeBytes(bcsBytes);
|
|
1138
|
+
* ```
|
|
1139
|
+
*
|
|
1140
|
+
* Use:
|
|
1141
|
+
* ```typescript
|
|
1142
|
+
* serializer.serializeAsBytes(value); // Uses pooled Serializer, avoids extra copy
|
|
1143
|
+
* ```
|
|
1144
|
+
*
|
|
1145
|
+
* This method uses a pooled Serializer instance to reduce allocations and
|
|
1146
|
+
* directly appends the serialized bytes with a length prefix.
|
|
1147
|
+
*
|
|
1148
|
+
* @param value - The Serializable value to serialize as bytes.
|
|
1149
|
+
* @group Implementation
|
|
1150
|
+
* @category BCS
|
|
1151
|
+
*/
|
|
1152
|
+
serializeAsBytes<T extends Serializable>(value: T): void;
|
|
1106
1153
|
/**
|
|
1107
1154
|
* Serializes an array of BCS Serializable values to a serializer instance.
|
|
1108
1155
|
* The bytes are added to the serializer instance's byte buffer.
|
|
@@ -1425,6 +1472,7 @@ declare class AccountAddress extends Serializable implements TransactionArgument
|
|
|
1425
1472
|
/**
|
|
1426
1473
|
* Serializes the current instance into a byte sequence suitable for entry functions.
|
|
1427
1474
|
* This allows for the proper encoding of data when interacting with entry functions in the blockchain.
|
|
1475
|
+
* Uses the optimized serializeAsBytes method to reduce allocations.
|
|
1428
1476
|
*
|
|
1429
1477
|
* @param serializer - The serializer instance used to convert the data into bytes.
|
|
1430
1478
|
* @group Implementation
|
|
@@ -1899,7 +1947,12 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1899
1947
|
* @group Implementation
|
|
1900
1948
|
* @category Serialization
|
|
1901
1949
|
*/
|
|
1902
|
-
private
|
|
1950
|
+
private signingKey;
|
|
1951
|
+
/**
|
|
1952
|
+
* Whether the key has been cleared from memory
|
|
1953
|
+
* @private
|
|
1954
|
+
*/
|
|
1955
|
+
private cleared;
|
|
1903
1956
|
/**
|
|
1904
1957
|
* Create a new PrivateKey instance from a Uint8Array or String.
|
|
1905
1958
|
*
|
|
@@ -1945,10 +1998,35 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1945
1998
|
* @category Serialization
|
|
1946
1999
|
*/
|
|
1947
2000
|
private static fromDerivationPathInner;
|
|
2001
|
+
/**
|
|
2002
|
+
* Checks if the key has been cleared and throws an error if so.
|
|
2003
|
+
* @private
|
|
2004
|
+
*/
|
|
2005
|
+
private ensureNotCleared;
|
|
2006
|
+
/**
|
|
2007
|
+
* Clears the private key from memory by overwriting it with random bytes.
|
|
2008
|
+
* After calling this method, the private key can no longer be used for signing or deriving public keys.
|
|
2009
|
+
*
|
|
2010
|
+
* Note: Due to JavaScript's memory management, this cannot guarantee complete removal of
|
|
2011
|
+
* sensitive data from memory, but it significantly reduces the window of exposure.
|
|
2012
|
+
*
|
|
2013
|
+
* @group Implementation
|
|
2014
|
+
* @category Serialization
|
|
2015
|
+
*/
|
|
2016
|
+
clear(): void;
|
|
2017
|
+
/**
|
|
2018
|
+
* Returns whether the private key has been cleared from memory.
|
|
2019
|
+
*
|
|
2020
|
+
* @returns true if the key has been cleared, false otherwise
|
|
2021
|
+
* @group Implementation
|
|
2022
|
+
* @category Serialization
|
|
2023
|
+
*/
|
|
2024
|
+
isCleared(): boolean;
|
|
1948
2025
|
/**
|
|
1949
2026
|
* Derive the Ed25519PublicKey for this private key.
|
|
1950
2027
|
*
|
|
1951
2028
|
* @returns Ed25519PublicKey - The derived public key corresponding to the private key.
|
|
2029
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1952
2030
|
* @group Implementation
|
|
1953
2031
|
* @category Serialization
|
|
1954
2032
|
*/
|
|
@@ -1959,6 +2037,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1959
2037
|
*
|
|
1960
2038
|
* @param message - A message as a string or Uint8Array in HexInput format.
|
|
1961
2039
|
* @returns A digital signature for the provided message.
|
|
2040
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1962
2041
|
* @group Implementation
|
|
1963
2042
|
* @category Serialization
|
|
1964
2043
|
*/
|
|
@@ -1967,6 +2046,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1967
2046
|
* Get the private key in bytes (Uint8Array).
|
|
1968
2047
|
*
|
|
1969
2048
|
* @returns Uint8Array representation of the private key
|
|
2049
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1970
2050
|
* @group Implementation
|
|
1971
2051
|
* @category Serialization
|
|
1972
2052
|
*/
|
|
@@ -1975,6 +2055,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1975
2055
|
* Get the private key as a hex string with the 0x prefix.
|
|
1976
2056
|
*
|
|
1977
2057
|
* @returns string representation of the private key.
|
|
2058
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1978
2059
|
* @group Implementation
|
|
1979
2060
|
* @category Serialization
|
|
1980
2061
|
*/
|
|
@@ -1983,6 +2064,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1983
2064
|
* Get the private key as a hex string with the 0x prefix.
|
|
1984
2065
|
*
|
|
1985
2066
|
* @returns string representation of the private key.
|
|
2067
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1986
2068
|
*/
|
|
1987
2069
|
toHexString(): string;
|
|
1988
2070
|
/**
|
|
@@ -1991,6 +2073,7 @@ declare class Ed25519PrivateKey extends Serializable implements PrivateKey {
|
|
|
1991
2073
|
* [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)
|
|
1992
2074
|
*
|
|
1993
2075
|
* @returns AIP-80 compliant string representation of the private key.
|
|
2076
|
+
* @throws Error if the private key has been cleared from memory.
|
|
1994
2077
|
*/
|
|
1995
2078
|
toAIP80String(): string;
|
|
1996
2079
|
serialize(serializer: Serializer): void;
|
|
@@ -2104,7 +2187,17 @@ declare enum AptosApiType {
|
|
|
2104
2187
|
* @group Implementation
|
|
2105
2188
|
* @category Utils
|
|
2106
2189
|
*/
|
|
2107
|
-
declare const DEFAULT_MAX_GAS_AMOUNT =
|
|
2190
|
+
declare const DEFAULT_MAX_GAS_AMOUNT = 2000000;
|
|
2191
|
+
/**
|
|
2192
|
+
* The minimum max gas amount that the SDK will allow for a transaction.
|
|
2193
|
+
*
|
|
2194
|
+
* This value acts as a floor to prevent transactions from being built with a max gas amount
|
|
2195
|
+
* below the network's minimum transaction gas units, which would cause
|
|
2196
|
+
* MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS errors.
|
|
2197
|
+
* @group Implementation
|
|
2198
|
+
* @category Utils
|
|
2199
|
+
*/
|
|
2200
|
+
declare const MIN_MAX_GAS_AMOUNT = 2000;
|
|
2108
2201
|
/**
|
|
2109
2202
|
* The default transaction expiration seconds from now.
|
|
2110
2203
|
*
|
|
@@ -2170,6 +2263,10 @@ declare enum ProcessorType {
|
|
|
2170
2263
|
* where project-id can contain letters, numbers, hyphens, and underscores
|
|
2171
2264
|
*/
|
|
2172
2265
|
declare const FIREBASE_AUTH_ISS_PATTERN: RegExp;
|
|
2266
|
+
/**
|
|
2267
|
+
* Shared TextEncoder instance for string serialization to avoid repeated instantiation.
|
|
2268
|
+
*/
|
|
2269
|
+
declare const TEXT_ENCODER: TextEncoder;
|
|
2173
2270
|
|
|
2174
2271
|
/**
|
|
2175
2272
|
* Represents the configuration settings for an Aptos SDK client instance.
|
|
@@ -2506,7 +2603,12 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2506
2603
|
* @group Implementation
|
|
2507
2604
|
* @category Serialization
|
|
2508
2605
|
*/
|
|
2509
|
-
private
|
|
2606
|
+
private key;
|
|
2607
|
+
/**
|
|
2608
|
+
* Whether the key has been cleared from memory
|
|
2609
|
+
* @private
|
|
2610
|
+
*/
|
|
2611
|
+
private cleared;
|
|
2510
2612
|
/**
|
|
2511
2613
|
* Create a new PrivateKey instance from a Uint8Array or String.
|
|
2512
2614
|
*
|
|
@@ -2551,12 +2653,37 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2551
2653
|
* @category Serialization
|
|
2552
2654
|
*/
|
|
2553
2655
|
private static fromDerivationPathInner;
|
|
2656
|
+
/**
|
|
2657
|
+
* Checks if the key has been cleared and throws an error if so.
|
|
2658
|
+
* @private
|
|
2659
|
+
*/
|
|
2660
|
+
private ensureNotCleared;
|
|
2661
|
+
/**
|
|
2662
|
+
* Clears the private key from memory by overwriting it with random bytes.
|
|
2663
|
+
* After calling this method, the private key can no longer be used for signing or deriving public keys.
|
|
2664
|
+
*
|
|
2665
|
+
* Note: Due to JavaScript's memory management, this cannot guarantee complete removal of
|
|
2666
|
+
* sensitive data from memory, but it significantly reduces the window of exposure.
|
|
2667
|
+
*
|
|
2668
|
+
* @group Implementation
|
|
2669
|
+
* @category Serialization
|
|
2670
|
+
*/
|
|
2671
|
+
clear(): void;
|
|
2672
|
+
/**
|
|
2673
|
+
* Returns whether the private key has been cleared from memory.
|
|
2674
|
+
*
|
|
2675
|
+
* @returns true if the key has been cleared, false otherwise
|
|
2676
|
+
* @group Implementation
|
|
2677
|
+
* @category Serialization
|
|
2678
|
+
*/
|
|
2679
|
+
isCleared(): boolean;
|
|
2554
2680
|
/**
|
|
2555
2681
|
* Sign the given message with the private key.
|
|
2556
2682
|
* This function generates a cryptographic signature for the provided message, ensuring the signature is canonical and non-malleable.
|
|
2557
2683
|
*
|
|
2558
2684
|
* @param message - A message in HexInput format to be signed.
|
|
2559
2685
|
* @returns Signature - The generated signature for the provided message.
|
|
2686
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2560
2687
|
* @group Implementation
|
|
2561
2688
|
* @category Serialization
|
|
2562
2689
|
*/
|
|
@@ -2565,6 +2692,7 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2565
2692
|
* Derive the Secp256k1PublicKey from this private key.
|
|
2566
2693
|
*
|
|
2567
2694
|
* @returns Secp256k1PublicKey The derived public key.
|
|
2695
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2568
2696
|
* @group Implementation
|
|
2569
2697
|
* @category Serialization
|
|
2570
2698
|
*/
|
|
@@ -2572,7 +2700,8 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2572
2700
|
/**
|
|
2573
2701
|
* Get the private key in bytes (Uint8Array).
|
|
2574
2702
|
*
|
|
2575
|
-
* @returns
|
|
2703
|
+
* @returns Uint8Array representation of the private key
|
|
2704
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2576
2705
|
* @group Implementation
|
|
2577
2706
|
* @category Serialization
|
|
2578
2707
|
*/
|
|
@@ -2581,6 +2710,7 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2581
2710
|
* Get the private key as a string representation.
|
|
2582
2711
|
*
|
|
2583
2712
|
* @returns string representation of the private key
|
|
2713
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2584
2714
|
* @group Implementation
|
|
2585
2715
|
* @category Serialization
|
|
2586
2716
|
*/
|
|
@@ -2589,6 +2719,7 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2589
2719
|
* Get the private key as a hex string with the 0x prefix.
|
|
2590
2720
|
*
|
|
2591
2721
|
* @returns string representation of the private key.
|
|
2722
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2592
2723
|
*/
|
|
2593
2724
|
toHexString(): string;
|
|
2594
2725
|
/**
|
|
@@ -2597,6 +2728,7 @@ declare class Secp256k1PrivateKey extends Serializable implements PrivateKey {
|
|
|
2597
2728
|
* [Read about AIP-80](https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)
|
|
2598
2729
|
*
|
|
2599
2730
|
* @returns AIP-80 compliant string representation of the private key.
|
|
2731
|
+
* @throws Error if the private key has been cleared from memory.
|
|
2600
2732
|
*/
|
|
2601
2733
|
toAIP80String(): string;
|
|
2602
2734
|
serialize(serializer: Serializer): void;
|
|
@@ -4648,6 +4780,7 @@ declare class Bool extends Serializable implements TransactionArgument {
|
|
|
4648
4780
|
/**
|
|
4649
4781
|
* Serializes the current instance for use in an entry function by converting it to a byte sequence.
|
|
4650
4782
|
* This allows the instance to be properly formatted for serialization in transactions.
|
|
4783
|
+
* Uses the optimized serializeAsBytes method to reduce allocations.
|
|
4651
4784
|
*
|
|
4652
4785
|
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
4653
4786
|
* @group Implementation
|
|
@@ -4931,6 +5064,7 @@ declare class MoveVector<T extends Serializable & EntryFunctionArgument> extends
|
|
|
4931
5064
|
/**
|
|
4932
5065
|
* Serializes the current instance into a byte sequence suitable for entry functions.
|
|
4933
5066
|
* This allows the data to be properly formatted for transmission or storage.
|
|
5067
|
+
* Uses the optimized serializeAsBytes method to reduce allocations.
|
|
4934
5068
|
*
|
|
4935
5069
|
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
4936
5070
|
* @group Implementation
|
|
@@ -6110,7 +6244,12 @@ declare enum AnyPublicKeyVariant {
|
|
|
6110
6244
|
Secp256k1 = 1,
|
|
6111
6245
|
Secp256r1 = 2,
|
|
6112
6246
|
Keyless = 3,
|
|
6113
|
-
FederatedKeyless = 4
|
|
6247
|
+
FederatedKeyless = 4,
|
|
6248
|
+
/**
|
|
6249
|
+
* Post-quantum signature scheme (SLH-DSA-SHA2-128s).
|
|
6250
|
+
* Note: Full implementation not yet available in this SDK.
|
|
6251
|
+
*/
|
|
6252
|
+
SlhDsaSha2_128s = 5
|
|
6114
6253
|
}
|
|
6115
6254
|
declare function anyPublicKeyVariantToString(variant: AnyPublicKeyVariant): string;
|
|
6116
6255
|
/**
|
|
@@ -6120,7 +6259,12 @@ declare enum AnySignatureVariant {
|
|
|
6120
6259
|
Ed25519 = 0,
|
|
6121
6260
|
Secp256k1 = 1,
|
|
6122
6261
|
WebAuthn = 2,
|
|
6123
|
-
Keyless = 3
|
|
6262
|
+
Keyless = 3,
|
|
6263
|
+
/**
|
|
6264
|
+
* Post-quantum signature scheme (SLH-DSA-SHA2-128s).
|
|
6265
|
+
* Note: Full implementation not yet available in this SDK.
|
|
6266
|
+
*/
|
|
6267
|
+
SlhDsaSha2_128s = 4
|
|
6124
6268
|
}
|
|
6125
6269
|
/**
|
|
6126
6270
|
* Variants of ephemeral public keys used in cryptographic operations.
|
|
@@ -6253,6 +6397,20 @@ interface WhereArg<T extends {}> {
|
|
|
6253
6397
|
*/
|
|
6254
6398
|
/**
|
|
6255
6399
|
* A configuration object for requests to the server, including API key, extra headers, and cookie handling options.
|
|
6400
|
+
*
|
|
6401
|
+
* Security Note: Consider implementing client-side rate limiting in your application to prevent
|
|
6402
|
+
* accidental API abuse. You can use libraries like 'bottleneck' or 'p-queue' to limit request rates.
|
|
6403
|
+
*
|
|
6404
|
+
* @example
|
|
6405
|
+
* ```typescript
|
|
6406
|
+
* import Bottleneck from 'bottleneck';
|
|
6407
|
+
*
|
|
6408
|
+
* // Create a limiter that allows 10 requests per second
|
|
6409
|
+
* const limiter = new Bottleneck({ minTime: 100, maxConcurrent: 5 });
|
|
6410
|
+
*
|
|
6411
|
+
* // Wrap your Aptos calls with the limiter
|
|
6412
|
+
* const result = await limiter.schedule(() => aptos.getAccountInfo({ accountAddress }));
|
|
6413
|
+
* ```
|
|
6256
6414
|
*/
|
|
6257
6415
|
type ClientConfig = ClientHeadersType & {
|
|
6258
6416
|
WITH_CREDENTIALS?: boolean;
|
|
@@ -7496,6 +7654,12 @@ declare class Deserializer {
|
|
|
7496
7654
|
static fromHex(hex: HexInput): Deserializer;
|
|
7497
7655
|
/**
|
|
7498
7656
|
* Reads a specified number of bytes from the buffer and advances the offset.
|
|
7657
|
+
* Returns a view into the buffer rather than copying for better performance.
|
|
7658
|
+
*
|
|
7659
|
+
* SECURITY NOTE: This returns a view, not a copy. Callers that expose the result
|
|
7660
|
+
* externally MUST call .slice() to create a copy. Internal numeric deserializers
|
|
7661
|
+
* (deserializeU8, deserializeU16, etc.) only read values and don't expose the view.
|
|
7662
|
+
* deserializeBytes() and deserializeFixedBytes() call .slice() before returning.
|
|
7499
7663
|
*
|
|
7500
7664
|
* @param length - The number of bytes to read from the buffer.
|
|
7501
7665
|
* @throws Throws an error if the read operation exceeds the buffer's length.
|
|
@@ -7599,7 +7763,8 @@ declare class Deserializer {
|
|
|
7599
7763
|
* The BCS layout for "bytes" consists of a bytes_length followed by the bytes themselves, where bytes_length is a u32 integer
|
|
7600
7764
|
* encoded as a uleb128 integer, indicating the length of the bytes array.
|
|
7601
7765
|
*
|
|
7602
|
-
* @returns {Uint8Array} The deserialized array of bytes.
|
|
7766
|
+
* @returns {Uint8Array} The deserialized array of bytes (a copy, safe to modify).
|
|
7767
|
+
* @throws {Error} If the length exceeds the maximum allowed (10MB) to prevent memory exhaustion.
|
|
7603
7768
|
* @group Implementation
|
|
7604
7769
|
* @category BCS
|
|
7605
7770
|
*/
|
|
@@ -7608,6 +7773,7 @@ declare class Deserializer {
|
|
|
7608
7773
|
* Deserializes an array of bytes of a specified length.
|
|
7609
7774
|
*
|
|
7610
7775
|
* @param len - The number of bytes to read from the source.
|
|
7776
|
+
* @returns {Uint8Array} The deserialized array of bytes (a copy, safe to modify).
|
|
7611
7777
|
* @group Implementation
|
|
7612
7778
|
* @category BCS
|
|
7613
7779
|
*/
|
|
@@ -7752,6 +7918,7 @@ declare class Deserializer {
|
|
|
7752
7918
|
* This function is used for interpreting lengths of variable-length sequences and tags of enum values in BCS encoding.
|
|
7753
7919
|
*
|
|
7754
7920
|
* @throws {Error} Throws an error if the parsed value exceeds the maximum uint32 number.
|
|
7921
|
+
* @throws {Error} Throws an error if the uleb128 encoding is malformed (too many bytes).
|
|
7755
7922
|
* @returns {number} The deserialized uint32 value.
|
|
7756
7923
|
* @group Implementation
|
|
7757
7924
|
* @category BCS
|
|
@@ -7986,4 +8153,4 @@ declare class AccountAbstractionMessage extends Serializable {
|
|
|
7986
8153
|
static deserialize(deserializer: Deserializer): AccountAbstractionMessage;
|
|
7987
8154
|
}
|
|
7988
8155
|
|
|
7989
|
-
export { type InputMultiSigDataWithRemoteABI as $, AccountAddress as A, Bool as B, I16 as C, Deserializer as D, EphemeralPublicKeyVariant as E, FixedBytes as F, I32 as G, type HexInput as H, I8 as I, I64 as J, I128 as K, type LedgerVersionArg as L, MultiKey as M, I256 as N, type InputGenerateTransactionPayloadDataWithRemoteABI as O, PublicKey as P, type InputGenerateTransactionPayloadData as Q, RawTransaction as R, Serializer as S, type InputScriptData as T, U8 as U, type VerifySignatureArgs as V, type MoveFunction as W, TransactionPayloadScript as X, type InputEntryFunctionDataWithRemoteABI as Y, ZkpVariant as Z, TransactionPayloadEntryFunction as _, AccountPublicKey as a, type GetNumberOfDelegatorsResponse as a$, TransactionPayloadMultiSig as a0, type InputEntryFunctionDataWithABI as a1, type InputMultiSigDataWithABI as a2, type InputViewFunctionDataWithRemoteABI as a3, EntryFunction as a4, type InputViewFunctionDataWithABI as a5, type AnyTransactionPayloadInstance as a6, type InputGenerateTransactionOptions as a7, TransactionInnerPayload as a8, type InputGenerateSingleSignerRawTransactionArgs as a9, type GetAccountOwnedTokensQueryResponse as aA, type GetAccountOwnedTokensFromCollectionResponse as aB, type GetAccountCollectionsWithOwnedTokenResponse as aC, type GetAccountCoinsDataResponse as aD, type WhereArg as aE, type GetObjectDataQueryResponse as aF, type PrivateKeyInput as aG, type GetCollectionDataResponse as aH, type GetTokenDataResponse as aI, type GetCurrentTokenOwnershipResponse as aJ, type GetOwnedTokensResponse as aK, type GetTokenActivityResponse as aL, type WaitForTransactionOptions as aM, type UserTransactionResponse as aN, type GetFungibleAssetMetadataResponse as aO, type GetFungibleAssetActivitiesResponse as aP, type GetCurrentFungibleAssetBalancesResponse as aQ, type LedgerInfo as aR, type Block as aS, type MoveValue as aT, type InputViewFunctionData as aU, type InputViewFunctionJsonData as aV, type GetChainTopUserTransactionsResponse as aW, type GraphqlQuery as aX, ProcessorType as aY, type GetProcessorStatusResponse as aZ, type InputEntryFunctionData as a_, SimpleTransaction as aa, type InputGenerateMultiAgentRawTransactionArgs as ab, MultiAgentTransaction as ac, type InputSimulateTransactionData as ad, AccountAuthenticatorNoAccountAuthenticator as ae, AccountAuthenticatorEd25519 as af, AccountAuthenticatorSingleKey as ag, AccountAuthenticatorMultiKey as ah, type InputSubmitTransactionData as ai, type TypeArgument as aj, TypeTag as ak, type MoveModule as al, type FunctionABI as am, type EntryFunctionABI as an, type ViewFunctionABI as ao, type AnyRawTransaction as ap, type AnyRawTransactionInstance as aq, type AccountData as ar, type MoveModuleBytecode as as, type CursorPaginationArgs as at, type PaginationArgs as au, type TransactionResponse as av, type MoveResource as aw, type MoveStructId as ax, type TokenStandardArg as ay, type OrderByArg as az, AuthenticationKey as b, TransactionExtraConfigV1 as b$, type GetDelegatedStakingActivitiesResponse as b0, type InputSimulateTransactionOptions as b1, type InputTransactionPluginData as b2, type PendingTransactionResponse as b3, type CommittedTransactionResponse as b4, type GasEstimation as b5, Ed25519PrivateKey as b6, type TableItemRequest as b7, type GetTableItemsDataResponse as b8, type GetTableItemsMetadataResponse as b9, isCanonicalEd25519Signature as bA, AbstractMultiKey as bB, Secp256k1PublicKey as bC, Secp256k1PrivateKey as bD, Secp256k1Signature as bE, HexInvalidReason as bF, hexToAsciiString as bG, AccountAbstractionMessage as bH, ChainId as bI, Identifier as bJ, ModuleId as bK, RawTransactionWithData as bL, MultiAgentRawTransaction as bM, FeePayerRawTransaction as bN, type TransactionArgument as bO, type ScriptFunctionArgument as bP, deserializeFromScriptArgument as bQ, TransactionPayload as bR, Script as bS, MultiSig as bT, MultiSigTransactionPayload as bU, TransactionInnerPayloadV1 as bV, TransactionExecutable as bW, TransactionExecutableScript as bX, TransactionExecutableEntryFunction as bY, TransactionExecutableEmpty as bZ, TransactionExtraConfig as b_, SigningScheme as ba, SigningSchemeInput as bb, AnySignature as bc, type GetANSNameResponse as bd, type EntryFunctionArgument as be, MultiKeySignature as bf, AccountAuthenticatorMultiEd25519 as bg, AccountAuthenticatorAbstraction as bh, type MoveFunctionId as bi, type ClientRequest as bj, type Client as bk, type ClientResponse as bl, type AptosRequest as bm, AptosApiType as bn, type AptosResponse as bo, MimeType as bp, type ClientConfig as bq, type Deserializable as br, ensureBoolean as bs, outOfRangeErrorMessage as bt, validateNumberInRange as bu, Serialized as bv, MoveOption as bw, AddressInvalidReason as bx, ParsingError as by, type ParsingResult as bz, type VerifySignatureAsyncArgs as c, type Int128 as c$, TypeTagBool as c0, TypeTagU8 as c1, TypeTagI8 as c2, TypeTagU16 as c3, TypeTagI16 as c4, TypeTagU32 as c5, TypeTagI32 as c6, TypeTagU64 as c7, TypeTagI64 as c8, TypeTagU128 as c9, type OrderBy as cA, type OrderByValue as cB, type TokenStandard as cC, TypeTagVariants as cD, ScriptTransactionArgumentVariants as cE, TransactionPayloadVariants as cF, TransactionInnerPayloadVariants as cG, TransactionExecutableVariants as cH, TransactionExtraConfigVariants as cI, TransactionVariants as cJ, TransactionAuthenticatorVariant as cK, AccountAuthenticatorVariant as cL, PrivateKeyVariants as cM, AnyPublicKeyVariant as cN, anyPublicKeyVariantToString as cO, AnySignatureVariant as cP, EphemeralSignatureVariant as cQ, type Uint8 as cR, type Uint16 as cS, type Uint32 as cT, type Uint64 as cU, type Uint128 as cV, type Uint256 as cW, type Int8 as cX, type Int16 as cY, type Int32 as cZ, type Int64 as c_, TypeTagI128 as ca, TypeTagU256 as cb, TypeTagI256 as cc, TypeTagAddress as cd, TypeTagSigner as ce, TypeTagReference as cf, TypeTagGeneric as cg, TypeTagVector as ch, TypeTagStruct as ci, StructTag as cj, aptosCoinStructTag as ck, stringStructTag as cl, optionStructTag as cm, objectStructTag as cn, type ScriptFunctionArgumentTypes as co, type InputGenerateSequenceNumberTransactionOptions as cp, type InputGenerateOrderlessTransactionOptions as cq, type InputGenerateTransactionPayloadDataWithABI as cr, type InputMultiSigData as cs, type ViewFunctionJsonPayload as ct, type InputGenerateRawTransactionArgs as cu, type InputGenerateSingleSignerRawTransactionData as cv, type InputGenerateMultiAgentRawTransactionData as cw, type InputGenerateTransactionData as cx, type GetAccountAddressesForAuthKeyResponse as cy, type GetEventsResponse as cz, Signature as d, type MoveUint128Type as d$, type Int256 as d0, type AptosSettings as d1, type FullNodeConfig as d2, type IndexerConfig as d3, type FaucetConfig as d4, type TransactionGenerationConfig as d5, type ClientHeadersType as d6, type PluginConfig as d7, type PluginSettings as d8, type TransactionSubmitter as d9, type ScriptPayloadResponse as dA, type MultisigPayloadResponse as dB, type GenesisPayload as dC, type MoveScriptBytecode as dD, type TransactionSignature as dE, isEd25519Signature as dF, isSecp256k1Signature as dG, isMultiAgentSignature as dH, isFeePayerSignature as dI, isMultiEd25519Signature as dJ, isSingleSenderSignature as dK, type TransactionEd25519Signature as dL, type TransactionSecp256k1Signature as dM, type TransactionSingleSenderSignature as dN, type TransactionMultiEd25519Signature as dO, type TransactionMultiAgentSignature as dP, type TransactionFeePayerSignature as dQ, type AccountSignature as dR, type WriteSet as dS, type ScriptWriteSet as dT, type DirectWriteSet as dU, type EventGuid as dV, type Event as dW, type MoveUint8Type as dX, type MoveUint16Type as dY, type MoveUint32Type as dZ, type MoveUint64Type as d_, TransactionResponseType as da, isPendingTransactionResponse as db, isUserTransactionResponse as dc, isGenesisTransactionResponse as dd, isBlockMetadataTransactionResponse as de, isStateCheckpointTransactionResponse as df, isValidatorTransactionResponse as dg, isBlockEpilogueTransactionResponse as dh, type GenesisTransactionResponse as di, type BlockMetadataTransactionResponse as dj, type StateCheckpointTransactionResponse as dk, type ValidatorTransactionResponse as dl, type BlockEndInfo as dm, type BlockEpilogueTransactionResponse as dn, type WriteSetChange as dp, type WriteSetChangeDeleteModule as dq, type WriteSetChangeDeleteResource as dr, type WriteSetChangeDeleteTableItem as ds, type WriteSetChangeWriteModule as dt, type WriteSetChangeWriteResource as du, type WriteSetChangeWriteTableItem as dv, type DecodedTableData as dw, type DeletedTableData as dx, type TransactionPayloadResponse as dy, type EntryFunctionPayloadResponse as dz, AptosConfig as e, type MoveUint256Type as e0, type MoveInt8Type as e1, type MoveInt16Type as e2, type MoveInt32Type as e3, type MoveInt64Type as e4, type MoveInt128Type as e5, type MoveInt256Type as e6, type MoveAddressType as e7, type MoveObjectType as e8, type MoveOptionType as e9, APTOS_FA as eA, RAW_TRANSACTION_SALT as eB, RAW_TRANSACTION_WITH_DATA_SALT as eC, ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT as eD, FIREBASE_AUTH_ISS_PATTERN as eE, type MoveStructType as ea, type MoveType as eb, type MoveModuleId as ec, MoveFunctionVisibility as ed, MoveAbility as ee, type MoveFunctionGenericTypeParam as ef, type MoveStructField as eg, type MoveStruct as eh, RoleType as ei, type AuthenticationKeyScheme as ej, DeriveScheme as ek, type GenerateAccountWithEd25519 as el, type GenerateAccountWithSingleSignerSecp256k1Key as em, type GenerateAccount as en, NetworkToIndexerAPI as eo, NetworkToNodeAPI as ep, NetworkToFaucetAPI as eq, NetworkToPepperAPI as er, NetworkToProverAPI as es, Network as et, NetworkToChainId as eu, NetworkToNetworkName as ev, DEFAULT_MAX_GAS_AMOUNT as ew, DEFAULT_TXN_EXP_SEC_FROM_NOW as ex, DEFAULT_TXN_TIMEOUT_SEC as ey, APTOS_COIN as ez, Serializable as f, EphemeralCertificateVariant as g, type AccountAddressInput as h, PrivateKey as i, Hex as j, Ed25519PublicKey as k, AnyPublicKey as l, MultiEd25519PublicKey as m, Ed25519Signature as n, MultiEd25519Signature as o, AccountAuthenticator as p, MoveString as q, MoveVector as r, U64 as s, type AnyNumber as t, type SimpleEntryFunctionArgumentTypes as u, type EntryFunctionArgumentTypes as v, U16 as w, U32 as x, U128 as y, U256 as z };
|
|
8156
|
+
export { MultiAgentTransaction as $, AccountAddress as A, Bool as B, I64 as C, Deserializer as D, EphemeralPublicKeyVariant as E, FixedBytes as F, I8 as G, type HexInput as H, I128 as I, U128 as J, U16 as K, type LedgerVersionArg as L, MultiKey as M, U256 as N, U32 as O, PublicKey as P, type InputGenerateTransactionPayloadDataWithRemoteABI as Q, RawTransaction as R, Serializer as S, type InputGenerateTransactionPayloadData as T, U8 as U, type VerifySignatureArgs as V, type InputScriptData as W, type InputGenerateSingleSignerRawTransactionArgs as X, SimpleTransaction as Y, ZkpVariant as Z, type InputGenerateMultiAgentRawTransactionArgs as _, AccountPublicKey as a, type GetNumberOfDelegatorsResponse as a$, type AnyTransactionPayloadInstance as a0, TransactionInnerPayload as a1, type InputGenerateTransactionOptions as a2, type InputSubmitTransactionData as a3, type InputSimulateTransactionData as a4, TransactionPayloadScript as a5, type InputEntryFunctionDataWithRemoteABI as a6, TransactionPayloadEntryFunction as a7, type InputMultiSigDataWithRemoteABI as a8, TransactionPayloadMultiSig as a9, type GetAccountOwnedTokensQueryResponse as aA, type GetAccountOwnedTokensFromCollectionResponse as aB, type GetAccountCollectionsWithOwnedTokenResponse as aC, type GetAccountCoinsDataResponse as aD, type WhereArg as aE, type GetObjectDataQueryResponse as aF, type PrivateKeyInput as aG, type GetCollectionDataResponse as aH, type GetTokenDataResponse as aI, type GetCurrentTokenOwnershipResponse as aJ, type GetOwnedTokensResponse as aK, type GetTokenActivityResponse as aL, type WaitForTransactionOptions as aM, type UserTransactionResponse as aN, type GetFungibleAssetMetadataResponse as aO, type GetFungibleAssetActivitiesResponse as aP, type GetCurrentFungibleAssetBalancesResponse as aQ, type LedgerInfo as aR, type Block as aS, type MoveValue as aT, type InputViewFunctionData as aU, type InputViewFunctionJsonData as aV, type GetChainTopUserTransactionsResponse as aW, type GraphqlQuery as aX, ProcessorType as aY, type GetProcessorStatusResponse as aZ, type InputEntryFunctionData as a_, type InputEntryFunctionDataWithABI as aa, type InputMultiSigDataWithABI as ab, type InputViewFunctionDataWithRemoteABI as ac, EntryFunction as ad, type InputViewFunctionDataWithABI as ae, AccountAuthenticatorNoAccountAuthenticator as af, AccountAuthenticatorEd25519 as ag, AccountAuthenticatorSingleKey as ah, AccountAuthenticatorMultiKey as ai, TypeTag as aj, type MoveModule as ak, type FunctionABI as al, type EntryFunctionABI as am, type ViewFunctionABI as an, type TypeArgument as ao, type AnyRawTransaction as ap, type AnyRawTransactionInstance as aq, type AccountData as ar, type MoveModuleBytecode as as, type CursorPaginationArgs as at, type PaginationArgs as au, type TransactionResponse as av, type MoveResource as aw, type MoveStructId as ax, type TokenStandardArg as ay, type OrderByArg as az, AuthenticationKey as b, type GenesisPayload as b$, type GetDelegatedStakingActivitiesResponse as b0, type InputSimulateTransactionOptions as b1, type InputTransactionPluginData as b2, type PendingTransactionResponse as b3, type CommittedTransactionResponse as b4, type GasEstimation as b5, Ed25519PrivateKey as b6, type TableItemRequest as b7, type GetTableItemsDataResponse as b8, type GetTableItemsMetadataResponse as b9, AnySignatureVariant as bA, type AptosSettings as bB, type AuthenticationKeyScheme as bC, type BlockEndInfo as bD, type BlockEpilogueTransactionResponse as bE, type BlockMetadataTransactionResponse as bF, ChainId as bG, type ClientHeadersType as bH, DEFAULT_MAX_GAS_AMOUNT as bI, DEFAULT_TXN_EXP_SEC_FROM_NOW as bJ, DEFAULT_TXN_TIMEOUT_SEC as bK, type DecodedTableData as bL, type DeletedTableData as bM, DeriveScheme as bN, type Deserializable as bO, type DirectWriteSet as bP, type EntryFunctionPayloadResponse as bQ, EphemeralSignatureVariant as bR, type Event as bS, type EventGuid as bT, FIREBASE_AUTH_ISS_PATTERN as bU, type FaucetConfig as bV, FeePayerRawTransaction as bW, type FullNodeConfig as bX, type GenerateAccount as bY, type GenerateAccountWithEd25519 as bZ, type GenerateAccountWithSingleSignerSecp256k1Key as b_, SigningScheme as ba, SigningSchemeInput as bb, AnySignature as bc, type GetANSNameResponse as bd, type EntryFunctionArgument as be, MultiKeySignature as bf, AccountAuthenticatorMultiEd25519 as bg, AccountAuthenticatorAbstraction as bh, type MoveFunctionId as bi, type AptosRequest as bj, AptosApiType as bk, type AptosResponse as bl, type ClientRequest as bm, type Client as bn, type ClientResponse as bo, MimeType as bp, type ClientConfig as bq, ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT as br, APTOS_COIN as bs, APTOS_FA as bt, AbstractMultiKey as bu, AccountAbstractionMessage as bv, AccountAuthenticatorVariant as bw, type AccountSignature as bx, AddressInvalidReason as by, AnyPublicKeyVariant as bz, type VerifySignatureAsyncArgs as c, type PluginConfig as c$, type GenesisTransactionResponse as c0, type GetAccountAddressesForAuthKeyResponse as c1, type GetEventsResponse as c2, HexInvalidReason as c3, Identifier as c4, type IndexerConfig as c5, type InputGenerateMultiAgentRawTransactionData as c6, type InputGenerateOrderlessTransactionOptions as c7, type InputGenerateRawTransactionArgs as c8, type InputGenerateSequenceNumberTransactionOptions as c9, type MoveScriptBytecode as cA, type MoveStruct as cB, type MoveStructField as cC, type MoveStructType as cD, type MoveType as cE, type MoveUint128Type as cF, type MoveUint16Type as cG, type MoveUint256Type as cH, type MoveUint32Type as cI, type MoveUint64Type as cJ, type MoveUint8Type as cK, MultiAgentRawTransaction as cL, MultiSig as cM, MultiSigTransactionPayload as cN, type MultisigPayloadResponse as cO, Network as cP, NetworkToChainId as cQ, NetworkToFaucetAPI as cR, NetworkToIndexerAPI as cS, NetworkToNetworkName as cT, NetworkToNodeAPI as cU, NetworkToPepperAPI as cV, NetworkToProverAPI as cW, type OrderBy as cX, type OrderByValue as cY, ParsingError as cZ, type ParsingResult as c_, type InputGenerateSingleSignerRawTransactionData as ca, type InputGenerateTransactionData as cb, type InputGenerateTransactionPayloadDataWithABI as cc, type InputMultiSigData as cd, type Int128 as ce, type Int16 as cf, type Int256 as cg, type Int32 as ch, type Int64 as ci, type Int8 as cj, MIN_MAX_GAS_AMOUNT as ck, ModuleId as cl, MoveAbility as cm, type MoveAddressType as cn, type MoveFunctionGenericTypeParam as co, MoveFunctionVisibility as cp, type MoveInt128Type as cq, type MoveInt16Type as cr, type MoveInt256Type as cs, type MoveInt32Type as ct, type MoveInt64Type as cu, type MoveInt8Type as cv, type MoveModuleId as cw, type MoveObjectType as cx, MoveOption as cy, type MoveOptionType as cz, Signature as d, TypeTagU64 as d$, type PluginSettings as d0, PrivateKeyVariants as d1, RAW_TRANSACTION_SALT as d2, RAW_TRANSACTION_WITH_DATA_SALT as d3, RawTransactionWithData as d4, RoleType as d5, Script as d6, type ScriptFunctionArgument as d7, type ScriptFunctionArgumentTypes as d8, type ScriptPayloadResponse as d9, type TransactionMultiAgentSignature as dA, type TransactionMultiEd25519Signature as dB, TransactionPayload as dC, type TransactionPayloadResponse as dD, TransactionPayloadVariants as dE, TransactionResponseType as dF, type TransactionSecp256k1Signature as dG, type TransactionSignature as dH, type TransactionSingleSenderSignature as dI, type TransactionSubmitter as dJ, TransactionVariants as dK, TypeTagAddress as dL, TypeTagBool as dM, TypeTagGeneric as dN, TypeTagI128 as dO, TypeTagI16 as dP, TypeTagI256 as dQ, TypeTagI32 as dR, TypeTagI64 as dS, TypeTagI8 as dT, TypeTagReference as dU, TypeTagSigner as dV, TypeTagStruct as dW, TypeTagU128 as dX, TypeTagU16 as dY, TypeTagU256 as dZ, TypeTagU32 as d_, ScriptTransactionArgumentVariants as da, type ScriptWriteSet as db, Secp256k1PrivateKey as dc, Secp256k1PublicKey as dd, Secp256k1Signature as de, Serialized as df, type StateCheckpointTransactionResponse as dg, StructTag as dh, TEXT_ENCODER as di, type TokenStandard as dj, type TransactionArgument as dk, TransactionAuthenticatorVariant as dl, type TransactionEd25519Signature as dm, TransactionExecutable as dn, TransactionExecutableEmpty as dp, TransactionExecutableEntryFunction as dq, TransactionExecutableScript as dr, TransactionExecutableVariants as ds, TransactionExtraConfig as dt, TransactionExtraConfigV1 as du, TransactionExtraConfigVariants as dv, type TransactionFeePayerSignature as dw, type TransactionGenerationConfig as dx, TransactionInnerPayloadV1 as dy, TransactionInnerPayloadVariants as dz, AptosConfig as e, TypeTagU8 as e0, TypeTagVariants as e1, TypeTagVector as e2, type Uint128 as e3, type Uint16 as e4, type Uint256 as e5, type Uint32 as e6, type Uint64 as e7, type Uint8 as e8, type ValidatorTransactionResponse as e9, isUserTransactionResponse as eA, isValidatorTransactionResponse as eB, objectStructTag as eC, optionStructTag as eD, outOfRangeErrorMessage as eE, stringStructTag as eF, validateNumberInRange as eG, type ViewFunctionJsonPayload as ea, type WriteSet as eb, type WriteSetChange as ec, type WriteSetChangeDeleteModule as ed, type WriteSetChangeDeleteResource as ee, type WriteSetChangeDeleteTableItem as ef, type WriteSetChangeWriteModule as eg, type WriteSetChangeWriteResource as eh, type WriteSetChangeWriteTableItem as ei, anyPublicKeyVariantToString as ej, aptosCoinStructTag as ek, deserializeFromScriptArgument as el, ensureBoolean as em, hexToAsciiString as en, isBlockEpilogueTransactionResponse as eo, isBlockMetadataTransactionResponse as ep, isCanonicalEd25519Signature as eq, isEd25519Signature as er, isFeePayerSignature as es, isGenesisTransactionResponse as et, isMultiAgentSignature as eu, isMultiEd25519Signature as ev, isPendingTransactionResponse as ew, isSecp256k1Signature as ex, isSingleSenderSignature as ey, isStateCheckpointTransactionResponse as ez, Serializable as f, EphemeralCertificateVariant as g, type AccountAddressInput as h, PrivateKey as i, Hex as j, Ed25519PublicKey as k, AnyPublicKey as l, MultiEd25519PublicKey as m, Ed25519Signature as n, MultiEd25519Signature as o, AccountAuthenticator as p, MoveString as q, MoveVector as r, U64 as s, type AnyNumber as t, type SimpleEntryFunctionArgumentTypes as u, type MoveFunction as v, type EntryFunctionArgumentTypes as w, I16 as x, I256 as y, I32 as z };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var q=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var g=(r,e,t,n)=>{for(var s=n>1?void 0:n?K(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(s=(n?a(e,t,s):a(s))||s);return n&&s&&q(e,t,s),s};var d=class extends Error{constructor(e,t){super(e),this.invalidReason=t}};var _utils = require('@noble/hashes/utils');var Z=(n=>(n.TOO_SHORT="too_short",n.INVALID_LENGTH="invalid_length",n.INVALID_HEX_CHARS="invalid_hex_chars",n))(Z||{}),f= exports.v =class r{constructor(e){this.data=e}toUint8Array(){return this.data}toStringWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(e){let t=e;if(t.startsWith("0x")&&(t=t.slice(2)),t.length===0)throw new d("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(t.length%2!==0)throw new d("Hex string must be an even number of hex characters.","invalid_length");try{return new r(_utils.hexToBytes.call(void 0, t))}catch(n){throw new d(`Hex string contains invalid hex characters: ${_optionalChain([n, 'optionalAccess', _2 => _2.message])}`,"invalid_hex_chars")}}static fromHexInput(e){return e instanceof Uint8Array?new r(e):r.fromHexString(e)}static hexInputToUint8Array(e){return e instanceof Uint8Array?e:r.fromHexString(e).toUint8Array()}static hexInputToString(e){return r.fromHexInput(e).toString()}static hexInputToStringWithoutPrefix(e){return r.fromHexInput(e).toStringWithoutPrefix()}static isValid(e){try{return r.fromHexString(e),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _3 => _3.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _4 => _4.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}},We= exports.w =r=>new TextDecoder().decode(f.fromHexInput(r).toUint8Array());var Q=(o=>(o.FULLNODE="Fullnode",o.INDEXER="Indexer",o.FAUCET="Faucet",o.PEPPER="Pepper",o.PROVER="Prover",o))(Q||{}),Le= exports.y =2e6,Xe= exports.z =2e3,$e= exports.A =20,qe= exports.B =20,Ke= exports.C ="0x1::aptos_coin::AptosCoin",je= exports.D ="0x000000000000000000000000000000000000000000000000000000000000000a",Ye= exports.E ="APTOS::RawTransaction",Ze= exports.F ="APTOS::RawTransactionWithData",Qe= exports.G ="APTOS::AASigningData",J= exports.H =(h=>(h.ACCOUNT_RESTORATION_PROCESSOR="account_restoration_processor",h.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",h.DEFAULT="default_processor",h.EVENTS_PROCESSOR="events_processor",h.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",h.STAKE_PROCESSOR="stake_processor",h.TOKEN_V2_PROCESSOR="token_v2_processor",h.USER_TRANSACTION_PROCESSOR="user_transaction_processor",h.OBJECT_PROCESSOR="objects_processor",h))(J||{}),Je= exports.I =/^https:\/\/securetoken\.google\.com\/[a-zA-Z0-9-_]+$/,m= exports.J =new TextEncoder;var M=255,N= exports.c =65535,I= exports.d =4294967295,A= exports.e =18446744073709551615n,S= exports.f =340282366920938463463374607431768211455n,E= exports.g =115792089237316195423570985008687907853269984665640564039457584007913129639935n,B= exports.h =-128,O= exports.i =127,C= exports.j =-32768,w= exports.k =32767,k= exports.l =-2147483648,D= exports.m =2147483647,z= exports.n =-9223372036854775808n,F= exports.o =9223372036854775807n,G= exports.p =-170141183460469231731687303715884105728n,P= exports.q =170141183460469231731687303715884105727n,W= exports.r =-57896044618658097711785492504343953926634992332820282019728792003956564819968n,H= exports.s =57896044618658097711785492504343953926634992332820282019728792003956564819967n;var b=class{bcsToBytes(){let e=new u;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return f.fromHexInput(e)}toStringWithoutPrefix(){return this.bcsToHex().toStringWithoutPrefix()}toString(){return`0x${this.toStringWithoutPrefix()}`}},V=256,R=[],ee=8;function te(){let r=R.pop();return r?(r.reset(),r):new u}function re(r){R.length<ee&&R.push(r)}var u=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.dataView=new DataView(this.buffer),this.offset=0}ensureBufferWillHandleSize(e){let t=this.offset+e;if(this.buffer.byteLength>=t)return;let n=Math.max(Math.floor(this.buffer.byteLength*1.5),t+V),s=new ArrayBuffer(n);new Uint8Array(s).set(new Uint8Array(this.buffer,0,this.offset)),this.buffer=s,this.dataView=new DataView(this.buffer)}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,n){this.ensureBufferWillHandleSize(t),e.apply(this.dataView,[this.offset,n,!0]),this.offset+=t}serializeStr(e){this.serializeBytes(m.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){ne(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(I),n=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(n))}serializeU128(e){let t=BigInt(e)&A,n=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(n)}serializeU256(e){let t=BigInt(e)&S,n=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(n)}serializeI8(e){this.serializeWithFunction(DataView.prototype.setInt8,1,e)}serializeI16(e){this.serializeWithFunction(DataView.prototype.setInt16,2,e)}serializeI32(e){this.serializeWithFunction(DataView.prototype.setInt32,4,e)}serializeI64(e){let t=BigInt(e),n=t<0?(BigInt(1)<<BigInt(64))+t:t,s=n&BigInt(I),o=n>>BigInt(32);this.serializeU32(Number(s)),this.serializeU32(Number(o))}serializeI128(e){let t=BigInt(e),n=t<0?(BigInt(1)<<BigInt(128))+t:t,s=n&A,o=n>>BigInt(64);this.serializeU64(s),this.serializeU64(o)}serializeI256(e){let t=BigInt(e),n=t<0?(BigInt(1)<<BigInt(256))+t:t,s=n&S,o=n>>BigInt(128);this.serializeU128(s),this.serializeU128(o)}serializeU32AsUleb128(e){let t=e,n=[];for(;t>>>7;)n.push(t&127|128),t>>>=7;n.push(t),this.appendToBuffer(new Uint8Array(n))}toUint8Array(){return new Uint8Array(this.buffer,0,this.offset).slice()}reset(){this.offset>0&&new Uint8Array(this.buffer,0,this.offset).fill(0),this.offset=0}getOffset(){return this.offset}toUint8ArrayView(){return new Uint8Array(this.buffer,0,this.offset)}serialize(e){e.serialize(this)}serializeAsBytes(e){let t=te();try{e.serialize(t);let n=t.toUint8ArrayView();this.serializeBytes(n)}finally{re(t)}}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}serializeOption(e,t){let n=e!==void 0;this.serializeBool(n),n&&(typeof e=="string"?this.serializeStr(e):e instanceof Uint8Array?t!==void 0?this.serializeFixedBytes(e):this.serializeBytes(e):e.serialize(this))}serializeOptionStr(e){e===void 0?this.serializeU32AsUleb128(0):(this.serializeU32AsUleb128(1),this.serializeStr(e))}};g([l(0,M)],u.prototype,"serializeU8",1),g([l(0,N)],u.prototype,"serializeU16",1),g([l(0,I)],u.prototype,"serializeU32",1),g([l(BigInt(0),A)],u.prototype,"serializeU64",1),g([l(BigInt(0),S)],u.prototype,"serializeU128",1),g([l(BigInt(0),E)],u.prototype,"serializeU256",1),g([l(B,O)],u.prototype,"serializeI8",1),g([l(C,w)],u.prototype,"serializeI16",1),g([l(k,D)],u.prototype,"serializeI32",1),g([l(z,F)],u.prototype,"serializeI64",1),g([l(G,P)],u.prototype,"serializeI128",1),g([l(W,H)],u.prototype,"serializeI256",1),g([l(0,I)],u.prototype,"serializeU32AsUleb128",1);function ne(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var se=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function oe(r,e,t){let n=BigInt(r);if(n>BigInt(t)||n<BigInt(e))throw new Error(se(r,e,t))}function l(r,e){return(t,n,s)=>{let o=s.value;return s.value=function(y){return oe(y,r,e),o.apply(this,[y])},s}}var ie=(s=>(s.JSON="application/json",s.BCS="application/x-bcs",s.BCS_SIGNED_TRANSACTION="application/x.aptos.signed_transaction+bcs",s.BCS_VIEW_FUNCTION="application/x.aptos.view_function+bcs",s))(ie||{}),ae= exports.Q =(i=>(i[i.Bool=0]="Bool",i[i.U8=1]="U8",i[i.U64=2]="U64",i[i.U128=3]="U128",i[i.Address=4]="Address",i[i.Signer=5]="Signer",i[i.Vector=6]="Vector",i[i.Struct=7]="Struct",i[i.U16=8]="U16",i[i.U32=9]="U32",i[i.U256=10]="U256",i[i.I8=11]="I8",i[i.I16=12]="I16",i[i.I32=13]="I32",i[i.I64=14]="I64",i[i.I128=15]="I128",i[i.I256=16]="I256",i[i.Reference=254]="Reference",i[i.Generic=255]="Generic",i))(ae||{}),L= exports.R =(p=>(p[p.U8=0]="U8",p[p.U64=1]="U64",p[p.U128=2]="U128",p[p.Address=3]="Address",p[p.U8Vector=4]="U8Vector",p[p.Bool=5]="Bool",p[p.U16=6]="U16",p[p.U32=7]="U32",p[p.U256=8]="U256",p[p.Serialized=9]="Serialized",p[p.I8=10]="I8",p[p.I16=11]="I16",p[p.I32=12]="I32",p[p.I64=13]="I64",p[p.I128=14]="I128",p[p.I256=15]="I256",p))(L||{}),pe= exports.S =(s=>(s[s.Script=0]="Script",s[s.EntryFunction=2]="EntryFunction",s[s.Multisig=3]="Multisig",s[s.Payload=4]="Payload",s))(pe||{}),ce= exports.T =(e=>(e[e.V1=0]="V1",e))(ce||{}),ue= exports.U =(n=>(n[n.Script=0]="Script",n[n.EntryFunction=1]="EntryFunction",n[n.Empty=2]="Empty",n))(ue||{}),de= exports.V =(e=>(e[e.V1=0]="V1",e))(de||{}),ge= exports.W =(t=>(t[t.MultiAgentTransaction=0]="MultiAgentTransaction",t[t.FeePayerTransaction=1]="FeePayerTransaction",t))(ge||{}),le= exports.X =(o=>(o[o.Ed25519=0]="Ed25519",o[o.MultiEd25519=1]="MultiEd25519",o[o.MultiAgent=2]="MultiAgent",o[o.FeePayer=3]="FeePayer",o[o.SingleSender=4]="SingleSender",o))(le||{}),_e= exports.Y =(a=>(a[a.Ed25519=0]="Ed25519",a[a.MultiEd25519=1]="MultiEd25519",a[a.SingleKey=2]="SingleKey",a[a.MultiKey=3]="MultiKey",a[a.NoAccountAuthenticator=4]="NoAccountAuthenticator",a[a.Abstraction=5]="Abstraction",a))(_e||{}),ye= exports.Z =(n=>(n.Ed25519="ed25519",n.Secp256k1="secp256k1",n.Secp256r1="secp256r1",n))(ye||{}),he= exports._ =(a=>(a[a.Ed25519=0]="Ed25519",a[a.Secp256k1=1]="Secp256k1",a[a.Secp256r1=2]="Secp256r1",a[a.Keyless=3]="Keyless",a[a.FederatedKeyless=4]="FederatedKeyless",a[a.SlhDsaSha2_128s=5]="SlhDsaSha2_128s",a))(he||{});function it(r){switch(r){case 0:return"ed25519";case 1:return"secp256k1";case 2:return"secp256r1";case 3:return"keyless";case 4:return"federated_keyless";case 5:return"slh_dsa_sha2_128s";default:throw new Error("Unknown public key variant")}}var xe=(o=>(o[o.Ed25519=0]="Ed25519",o[o.Secp256k1=1]="Secp256k1",o[o.WebAuthn=2]="WebAuthn",o[o.Keyless=3]="Keyless",o[o.SlhDsaSha2_128s=4]="SlhDsaSha2_128s",o))(xe||{}),fe= exports.ba =(e=>(e[e.Ed25519=0]="Ed25519",e))(fe||{}),me= exports.ca =(e=>(e[e.Ed25519=0]="Ed25519",e))(me||{}),Ie= exports.da =(e=>(e[e.ZkProof=0]="ZkProof",e))(Ie||{}),Ae= exports.ea =(e=>(e[e.Groth16=0]="Groth16",e))(Ae||{}),Se= exports.fa =(y=>(y.Pending="pending_transaction",y.User="user_transaction",y.Genesis="genesis_transaction",y.BlockMetadata="block_metadata_transaction",y.StateCheckpoint="state_checkpoint_transaction",y.Validator="validator_transaction",y.BlockEpilogue="block_epilogue_transaction",y))(Se||{});function at(r){return r.type==="pending_transaction"}function pt(r){return r.type==="user_transaction"}function ct(r){return r.type==="genesis_transaction"}function ut(r){return r.type==="block_metadata_transaction"}function dt(r){return r.type==="state_checkpoint_transaction"}function gt(r){return r.type==="validator_transaction"}function lt(r){return r.type==="block_epilogue_transaction"}function _t(r){return"signature"in r&&r.type==="ed25519_signature"}function yt(r){return"signature"in r&&r.signature==="secp256k1_ecdsa_signature"}function ht(r){return r.type==="multi_agent_signature"}function xt(r){return r.type==="fee_payer_signature"}function ft(r){return r.type==="multi_ed25519_signature"}function mt(r){return r.type==="single_sender"}var be=(n=>(n.PRIVATE="private",n.PUBLIC="public",n.FRIEND="friend",n))(be||{}),Re= exports.ua =(s=>(s.STORE="store",s.DROP="drop",s.KEY="key",s.COPY="copy",s))(Re||{}),Te= exports.va =(t=>(t.VALIDATOR="validator",t.FULL_NODE="full_node",t))(Te||{}),Ue= exports.wa =(s=>(s[s.Ed25519=0]="Ed25519",s[s.MultiEd25519=1]="MultiEd25519",s[s.SingleKey=2]="SingleKey",s[s.MultiKey=3]="MultiKey",s))(Ue||{}),ve= exports.xa =(t=>(t[t.Ed25519=0]="Ed25519",t[t.Secp256k1Ecdsa=2]="Secp256k1Ecdsa",t))(ve||{}),X= exports.ya =(o=>(o[o.DeriveAuid=251]="DeriveAuid",o[o.DeriveObjectAddressFromObject=252]="DeriveObjectAddressFromObject",o[o.DeriveObjectAddressFromGuid=253]="DeriveObjectAddressFromGuid",o[o.DeriveObjectAddressFromSeed=254]="DeriveObjectAddressFromSeed",o[o.DeriveResourceAccountAddress=255]="DeriveResourceAccountAddress",o))(X||{});var Me=(t=>(t[t.Independent=0]="Independent",t[t.FollowsDomain=1]="FollowsDomain",t))(Me||{}),Ne= exports.Aa =(n=>(n.Expired="expired",n.InGracePeriod="in_grace_period",n.Active="active",n))(Ne||{});var Be=(x=>(x.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",x.INVALID_HEX_CHARS="invalid_hex_chars",x.TOO_SHORT="too_short",x.TOO_LONG="too_long",x.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",x.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",x.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",x.INVALID_PADDING_STRICTNESS="INVALID_PADDING_STRICTNESS",x))(Be||{}),c=class c extends b{constructor(e){if(super(),e.length!==c.LENGTH)throw new d("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=e}isSpecial(){return this.data.slice(0,this.data.length-1).every(e=>e===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data);return this.isSpecial()&&(e=e[e.length-1]),e}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toStringShort(){return`0x${this.toStringShortWithoutPrefix()}`}toStringShortWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data).replace(/^0+/,"");return e===""?"0":e}toUint8Array(){return this.data}serialize(e){e.serializeFixedBytes(this.data)}serializeForEntryFunction(e){e.serializeAsBytes(this)}serializeForScriptFunction(e){e.serializeU32AsUleb128(3),e.serialize(this)}static deserialize(e){let t=e.deserializeFixedBytes(c.LENGTH);return new c(t)}static fromStringStrict(e){if(!e.startsWith("0x"))throw new d("Hex string must start with a leading 0x.","leading_zero_x_required");let t=c.fromString(e);if(e.length!==c.LONG_STRING_LENGTH+2)if(t.isSpecial()){if(e.length!==3)throw new d(`The given hex string ${e} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new d(`The given hex string ${e} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return t}static fromString(e,{maxMissingChars:t=4}={}){let n=e;if(e.startsWith("0x")&&(n=e.slice(2)),n.length===0)throw new d("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(n.length>64)throw new d("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");if(t>63||t<0)throw new d(`maxMissingChars must be between or equal to 0 and 63. Received ${t}`,"INVALID_PADDING_STRICTNESS");let s;try{s=_utils.hexToBytes.call(void 0, n.padStart(64,"0"))}catch(a){throw new d(`Hex characters are invalid: ${_optionalChain([a, 'optionalAccess', _5 => _5.message])}`,"invalid_hex_chars")}let o=new c(s);if(n.length<64-t&&!o.isSpecial())throw new d(`Hex string is too short, must be ${64-t} to 64 chars long, excluding the leading 0x. You may need to fix
|
|
2
|
+
the addresss by padding it with 0s before passing it to \`fromString\` (e.g. <addressString>.padStart(64, '0')).
|
|
3
|
+
Received ${e}`,"too_short");return o}static from(e,{maxMissingChars:t=4}={}){return typeof e=="string"?c.fromString(e,{maxMissingChars:t}):e instanceof Uint8Array?new c(e):e}static fromStrict(e){return typeof e=="string"?c.fromStringStrict(e):e instanceof Uint8Array?new c(e):e}static isValid(e){try{return e.strict?c.fromStrict(e.input):c.from(e.input),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _6 => _6.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _7 => _7.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}};c.LENGTH=32,c.LONG_STRING_LENGTH=64,c.ZERO=c.from("0x0"),c.ONE=c.from("0x1"),c.TWO=c.from("0x2"),c.THREE=c.from("0x3"),c.FOUR=c.from("0x4"),c.A=c.from("0xA");var _=c;var _sha3 = require('@noble/hashes/sha3');var v=(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?m.encode(e):e,s=new Uint8Array([...t,...n,254]);return new _(_sha3.sha3_256.call(void 0, s))},Ft= exports.Ea =(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?m.encode(e):e,s=new Uint8Array([...t,...n,255]);return new _(_sha3.sha3_256.call(void 0, s))},Gt= exports.Fa =(r,e)=>{let t=r.bcsToBytes(),n=e.bcsToBytes(),s=new Uint8Array([...t,...n,252]);return new _(_sha3.sha3_256.call(void 0, s))},Pt= exports.Ga =(r,e,t)=>{let n=`${e}::${t}`;return v(r,n)};var _jsbase64 = require('js-base64');function $t(){try{return typeof globalThis<"u"&&"Bun"in globalThis}catch (e2){return!1}}function qt(r){typeof process<"u"&&process.env&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test"||process.env.APTOS_SDK_WARNINGS==="true")&&console.warn(r)}async function Kt(r){return new Promise(e=>{setTimeout(e,r)})}function jt(r){return r instanceof Error?r.message:String(r)}var Yt=()=>Math.floor(Date.now()/1e3);function Zt(r){let e=new Date(r*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function Qt(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return _jsbase64.decode.call(void 0, t)}function Jt(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4!==0;)e+="=";return _jsbase64.Base64.toUint8Array(e)}var Vt=(r,e)=>r*10**e,er= exports.Qa =(r,e)=>r/10**e,$=r=>{let e="";for(let t=2;t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substring(t,t+2),16));return e},tr= exports.Ra =r=>{let{account_address:e,module_name:t,struct_name:n}=r,s=$(t),o=$(n);return`${e}::${s}::${o}`},rr= exports.Sa =r=>typeof r=="object"&&!Array.isArray(r)&&r!==null&&"account_address"in r&&"module_name"in r&&"struct_name"in r&&typeof r.account_address=="string"&&typeof r.module_name=="string"&&typeof r.struct_name=="string";function nr(r){let e=r.split("::");if(e.length!==3)throw new Error(`Invalid function ${r}`);let t=e[0],n=e[1],s=e[2];return{moduleAddress:t,moduleName:n,functionName:s}}function sr(r){let e=r.split("::");return e.length===3&&_.isValid({input:e[0]}).valid}function or(r,e=6,t=5){return`${r.slice(0,e)}...${r.slice(-t)}`}var we="0x1::aptos_coin::AptosCoin";function ke(r){let e=/0x[0-9a-fA-F]+/g;return r.replace(e,t=>_.from(t,{maxMissingChars:63}).toStringShort())}function ir(r){let e=ke(r);return e===we?_.A:v(_.A,e)}exports.a = g; exports.b = M; exports.c = N; exports.d = I; exports.e = A; exports.f = S; exports.g = E; exports.h = B; exports.i = O; exports.j = C; exports.k = w; exports.l = k; exports.m = D; exports.n = z; exports.o = F; exports.p = G; exports.q = P; exports.r = W; exports.s = H; exports.t = d; exports.u = Z; exports.v = f; exports.w = We; exports.x = Q; exports.y = Le; exports.z = Xe; exports.A = $e; exports.B = qe; exports.C = Ke; exports.D = je; exports.E = Ye; exports.F = Ze; exports.G = Qe; exports.H = J; exports.I = Je; exports.J = m; exports.K = b; exports.L = u; exports.M = ne; exports.N = se; exports.O = oe; exports.P = ie; exports.Q = ae; exports.R = L; exports.S = pe; exports.T = ce; exports.U = ue; exports.V = de; exports.W = ge; exports.X = le; exports.Y = _e; exports.Z = ye; exports._ = he; exports.$ = it; exports.aa = xe; exports.ba = fe; exports.ca = me; exports.da = Ie; exports.ea = Ae; exports.fa = Se; exports.ga = at; exports.ha = pt; exports.ia = ct; exports.ja = ut; exports.ka = dt; exports.la = gt; exports.ma = lt; exports.na = _t; exports.oa = yt; exports.pa = ht; exports.qa = xt; exports.ra = ft; exports.sa = mt; exports.ta = be; exports.ua = Re; exports.va = Te; exports.wa = Ue; exports.xa = ve; exports.ya = X; exports.za = Me; exports.Aa = Ne; exports.Ba = Be; exports.Ca = _; exports.Da = v; exports.Ea = Ft; exports.Fa = Gt; exports.Ga = Pt; exports.Ha = $t; exports.Ia = qt; exports.Ja = Kt; exports.Ka = jt; exports.La = Yt; exports.Ma = Zt; exports.Na = Qt; exports.Oa = Jt; exports.Pa = Vt; exports.Qa = er; exports.Ra = tr; exports.Sa = rr; exports.Ta = nr; exports.Ua = sr; exports.Va = or; exports.Wa = ir;
|
|
4
|
+
//# sourceMappingURL=chunk-2VR6ONNW.js.map
|