@aptos-labs/ts-sdk 6.3.0 → 6.3.1
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-DGpxrkAn.d.ts → account-2FUAPVPW.d.ts} +15 -4
- package/dist/common/chunk-L5DUJTE3.js +4 -0
- package/dist/common/chunk-L5DUJTE3.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/index.d.ts +2 -2
- package/dist/common/index.js +34 -34
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-BCt2cu_M.d.mts → Ed25519Account-DpZh3fRy.d.mts} +1 -1
- package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/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 +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.d.mts +3 -3
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.d.mts +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-Dg0ejXHy.d.mts → account-sIOs_9XJ.d.mts} +15 -4
- 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/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/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/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-UBPX6GOS.mjs → chunk-226FBOWQ.mjs} +2 -2
- package/dist/esm/{chunk-LTZRUAGD.mjs → chunk-2DQRUJUC.mjs} +2 -2
- package/dist/esm/chunk-2EBXCCLB.mjs +2 -0
- package/dist/esm/chunk-2EBXCCLB.mjs.map +1 -0
- package/dist/esm/{chunk-R7PCBRRT.mjs → chunk-2YA4KQUV.mjs} +2 -2
- package/dist/esm/{chunk-POQ4FT4E.mjs → chunk-3ZC6F5SJ.mjs} +2 -2
- package/dist/esm/{chunk-NTREJSOS.mjs → chunk-4KEZEYCV.mjs} +2 -2
- package/dist/esm/chunk-6T2OBPIF.mjs +4 -0
- package/dist/esm/chunk-6T2OBPIF.mjs.map +1 -0
- package/dist/esm/{chunk-2VBY2V4Z.mjs → chunk-A5H5VKUI.mjs} +2 -2
- package/dist/esm/{chunk-QFUXOL34.mjs → chunk-DPHBSAZQ.mjs} +2 -2
- package/dist/esm/{chunk-CD3EZCI5.mjs → chunk-F4RJMSAW.mjs} +2 -2
- package/dist/esm/{chunk-UYG4XVVO.mjs → chunk-FAOLAKLJ.mjs} +2 -2
- package/dist/esm/{chunk-5LMLIRGK.mjs → chunk-GJYLYE6R.mjs} +2 -2
- package/dist/esm/{chunk-C2KVLMPH.mjs → chunk-GYYSHYO5.mjs} +2 -2
- package/dist/esm/{chunk-ASFFADWS.mjs → chunk-IEW452EO.mjs} +2 -2
- package/dist/esm/{chunk-2CH5QB7U.mjs → chunk-IZF6POVR.mjs} +2 -2
- package/dist/esm/chunk-KKPH2JUV.mjs +2 -0
- package/dist/esm/chunk-KKPH2JUV.mjs.map +1 -0
- package/dist/esm/{chunk-F4LHBGG2.mjs → chunk-LVZ7QMUH.mjs} +2 -2
- package/dist/esm/{chunk-J73MMLF7.mjs → chunk-MKTR4U2R.mjs} +2 -2
- package/dist/esm/{chunk-EIWPAECI.mjs → chunk-NHRPXEUE.mjs} +2 -2
- package/dist/esm/{chunk-OAK2V35A.mjs → chunk-NNXTS2GB.mjs} +2 -2
- package/dist/esm/{chunk-UPHD2B4I.mjs → chunk-NPWYZVHE.mjs} +2 -2
- package/dist/esm/{chunk-WD3SPNH7.mjs → chunk-NTMFADQ7.mjs} +2 -2
- package/dist/esm/{chunk-A7SQEK23.mjs → chunk-QE5MOGUI.mjs} +2 -2
- package/dist/esm/chunk-RB2GC7FW.mjs +2 -0
- package/dist/esm/chunk-RUKFK3OC.mjs +2 -0
- package/dist/esm/chunk-RUKFK3OC.mjs.map +1 -0
- package/dist/esm/chunk-RYCI4VKO.mjs +2 -0
- package/dist/esm/{chunk-WVKZFOPV.mjs.map → chunk-RYCI4VKO.mjs.map} +1 -1
- package/dist/esm/{chunk-TSPG5VED.mjs → chunk-RZNP3WG4.mjs} +2 -2
- package/dist/esm/{chunk-TEI33TO7.mjs → chunk-TBIK7DML.mjs} +2 -2
- package/dist/esm/chunk-UVNAHETD.mjs +2 -0
- package/dist/esm/{chunk-YJVBGKWM.mjs.map → chunk-UVNAHETD.mjs.map} +1 -1
- package/dist/esm/{chunk-E3DHFXN4.mjs → chunk-WOPHK7LB.mjs} +2 -2
- package/dist/esm/{chunk-F5KAWYF5.mjs → chunk-WZZ7PJ3X.mjs} +2 -2
- package/dist/esm/{chunk-QRW7MQDA.mjs → chunk-ZOSOF6ST.mjs} +2 -2
- package/dist/esm/cli/index.d.mts +1 -1
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/cli/move.d.mts +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/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-BYLu31Sa.d.mts → federatedKeyless-Cuo0IGJ6.d.mts} +1 -1
- package/dist/esm/index.d.mts +3 -3
- 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 +2 -2
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.d.mts +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -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/index.d.mts +1 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/types.d.mts +1 -1
- package/dist/esm/utils/helpers.d.mts +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.d.mts +1 -1
- package/dist/esm/utils/index.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 +1 -1
- package/src/bcs/serializable/movePrimitives.ts +21 -15
- package/src/bcs/serializable/moveStructs.ts +5 -5
- package/src/bcs/serializer.ts +19 -0
- package/src/core/accountAddress.ts +3 -3
- package/src/version.ts +1 -1
- package/dist/common/chunk-2VR6ONNW.js +0 -4
- package/dist/common/chunk-2VR6ONNW.js.map +0 -1
- package/dist/esm/chunk-5HHC2YG4.mjs +0 -2
- package/dist/esm/chunk-66F7RP7K.mjs +0 -2
- package/dist/esm/chunk-66F7RP7K.mjs.map +0 -1
- package/dist/esm/chunk-BT742BFQ.mjs +0 -2
- package/dist/esm/chunk-BT742BFQ.mjs.map +0 -1
- package/dist/esm/chunk-FDHHQUS3.mjs +0 -4
- package/dist/esm/chunk-FDHHQUS3.mjs.map +0 -1
- package/dist/esm/chunk-WFZFTRRS.mjs +0 -2
- package/dist/esm/chunk-WFZFTRRS.mjs.map +0 -1
- package/dist/esm/chunk-WVKZFOPV.mjs +0 -2
- package/dist/esm/chunk-YJVBGKWM.mjs +0 -2
- /package/dist/esm/{chunk-UBPX6GOS.mjs.map → chunk-226FBOWQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-LTZRUAGD.mjs.map → chunk-2DQRUJUC.mjs.map} +0 -0
- /package/dist/esm/{chunk-R7PCBRRT.mjs.map → chunk-2YA4KQUV.mjs.map} +0 -0
- /package/dist/esm/{chunk-POQ4FT4E.mjs.map → chunk-3ZC6F5SJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-NTREJSOS.mjs.map → chunk-4KEZEYCV.mjs.map} +0 -0
- /package/dist/esm/{chunk-2VBY2V4Z.mjs.map → chunk-A5H5VKUI.mjs.map} +0 -0
- /package/dist/esm/{chunk-QFUXOL34.mjs.map → chunk-DPHBSAZQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-CD3EZCI5.mjs.map → chunk-F4RJMSAW.mjs.map} +0 -0
- /package/dist/esm/{chunk-UYG4XVVO.mjs.map → chunk-FAOLAKLJ.mjs.map} +0 -0
- /package/dist/esm/{chunk-5LMLIRGK.mjs.map → chunk-GJYLYE6R.mjs.map} +0 -0
- /package/dist/esm/{chunk-C2KVLMPH.mjs.map → chunk-GYYSHYO5.mjs.map} +0 -0
- /package/dist/esm/{chunk-ASFFADWS.mjs.map → chunk-IEW452EO.mjs.map} +0 -0
- /package/dist/esm/{chunk-2CH5QB7U.mjs.map → chunk-IZF6POVR.mjs.map} +0 -0
- /package/dist/esm/{chunk-F4LHBGG2.mjs.map → chunk-LVZ7QMUH.mjs.map} +0 -0
- /package/dist/esm/{chunk-J73MMLF7.mjs.map → chunk-MKTR4U2R.mjs.map} +0 -0
- /package/dist/esm/{chunk-EIWPAECI.mjs.map → chunk-NHRPXEUE.mjs.map} +0 -0
- /package/dist/esm/{chunk-OAK2V35A.mjs.map → chunk-NNXTS2GB.mjs.map} +0 -0
- /package/dist/esm/{chunk-UPHD2B4I.mjs.map → chunk-NPWYZVHE.mjs.map} +0 -0
- /package/dist/esm/{chunk-WD3SPNH7.mjs.map → chunk-NTMFADQ7.mjs.map} +0 -0
- /package/dist/esm/{chunk-A7SQEK23.mjs.map → chunk-QE5MOGUI.mjs.map} +0 -0
- /package/dist/esm/{chunk-5HHC2YG4.mjs.map → chunk-RB2GC7FW.mjs.map} +0 -0
- /package/dist/esm/{chunk-TSPG5VED.mjs.map → chunk-RZNP3WG4.mjs.map} +0 -0
- /package/dist/esm/{chunk-TEI33TO7.mjs.map → chunk-TBIK7DML.mjs.map} +0 -0
- /package/dist/esm/{chunk-E3DHFXN4.mjs.map → chunk-WOPHK7LB.mjs.map} +0 -0
- /package/dist/esm/{chunk-F5KAWYF5.mjs.map → chunk-WZZ7PJ3X.mjs.map} +0 -0
- /package/dist/esm/{chunk-QRW7MQDA.mjs.map → chunk-ZOSOF6ST.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Aa as y,ca as a,da as b,ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o,ra as p,sa as q,ta as r,ua as s,va as t,wa as u,xa as v,ya as w,za as x}from"../../chunk-
|
|
1
|
+
import{Aa as y,ca as a,da as b,ea as c,fa as d,ga as e,ha as f,ia as g,ja as h,ka as i,la as j,ma as k,na as l,oa as m,pa as n,qa as o,ra as p,sa as q,ta as r,ua as s,va as t,wa as u,xa as v,ya as w,za as x}from"../../chunk-IZF6POVR.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-NNXTS2GB.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-3ZC6F5SJ.mjs";import"../../chunk-2YA4KQUV.mjs";import"../../chunk-NPWYZVHE.mjs";import"../../chunk-UVNAHETD.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-F45HI7LU.mjs";import"../../chunk-LVZ7QMUH.mjs";import"../../chunk-RB2GC7FW.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-ZOSOF6ST.mjs";import"../../chunk-NHRPXEUE.mjs";import"../../chunk-A5H5VKUI.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-UVJW4DPP.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-RZNP3WG4.mjs";import"../../chunk-226FBOWQ.mjs";import"../../chunk-4KEZEYCV.mjs";import"../../chunk-NTMFADQ7.mjs";import"../../chunk-WZZ7PJ3X.mjs";import"../../chunk-MKTR4U2R.mjs";import"../../chunk-G5OONGWS.mjs";import"../../chunk-ODNZJSOC.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-TBIK7DML.mjs";import"../../chunk-DPHBSAZQ.mjs";import"../../chunk-2DQRUJUC.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-ITZN23GU.mjs";import"../../chunk-IEW452EO.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-2EBXCCLB.mjs";import"../../chunk-WOPHK7LB.mjs";import"../../chunk-F4RJMSAW.mjs";import"../../chunk-KKPH2JUV.mjs";import"../../chunk-M65PXVDO.mjs";import"../../chunk-FAOLAKLJ.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-GJYLYE6R.mjs";import"../../chunk-GYYSHYO5.mjs";import"../../chunk-6T2OBPIF.mjs";import"../../chunk-DE5K76I2.mjs";import"../../chunk-Q5ESW36C.mjs";import"../../chunk-NP2IAUME.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RUKFK3OC.mjs";import"../../chunk-TAHLOBRG.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-X2TPNKLV.mjs";import"../../chunk-RYCI4VKO.mjs";import"../../chunk-KDMSOCZY.mjs";export{u as StructTag,a as TypeTag,o as TypeTagAddress,b as TypeTagBool,r as TypeTagGeneric,l as TypeTagI128,f as TypeTagI16,n as TypeTagI256,h as TypeTagI32,j as TypeTagI64,d as TypeTagI8,q as TypeTagReference,p as TypeTagSigner,t as TypeTagStruct,k as TypeTagU128,e as TypeTagU16,m as TypeTagU256,g as TypeTagU32,i as TypeTagU64,c as TypeTagU8,s as TypeTagVector,v as aptosCoinStructTag,y as objectStructTag,x as optionStructTag,w as stringStructTag};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{xb as a,yb as b,zb as c}from"../../chunk-
|
|
1
|
+
import{xb as a,yb as b,zb as c}from"../../chunk-IZF6POVR.mjs";import"../../chunk-G3MHXDYA.mjs";import"../../chunk-NNXTS2GB.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-A5L76YP7.mjs";import"../../chunk-3ZC6F5SJ.mjs";import"../../chunk-2YA4KQUV.mjs";import"../../chunk-NPWYZVHE.mjs";import"../../chunk-UVNAHETD.mjs";import"../../chunk-5HXLZHDW.mjs";import"../../chunk-F45HI7LU.mjs";import"../../chunk-LVZ7QMUH.mjs";import"../../chunk-RB2GC7FW.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-ZOSOF6ST.mjs";import"../../chunk-NHRPXEUE.mjs";import"../../chunk-A5H5VKUI.mjs";import"../../chunk-C3Q23D22.mjs";import"../../chunk-UVJW4DPP.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ZP4DWSQA.mjs";import"../../chunk-RZNP3WG4.mjs";import"../../chunk-226FBOWQ.mjs";import"../../chunk-4KEZEYCV.mjs";import"../../chunk-NTMFADQ7.mjs";import"../../chunk-WZZ7PJ3X.mjs";import"../../chunk-MKTR4U2R.mjs";import"../../chunk-G5OONGWS.mjs";import"../../chunk-ODNZJSOC.mjs";import"../../chunk-7ECCT6PK.mjs";import"../../chunk-TBIK7DML.mjs";import"../../chunk-DPHBSAZQ.mjs";import"../../chunk-2DQRUJUC.mjs";import"../../chunk-HGLO5LDS.mjs";import"../../chunk-ITZN23GU.mjs";import"../../chunk-IEW452EO.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-2EBXCCLB.mjs";import"../../chunk-WOPHK7LB.mjs";import"../../chunk-F4RJMSAW.mjs";import"../../chunk-KKPH2JUV.mjs";import"../../chunk-M65PXVDO.mjs";import"../../chunk-FAOLAKLJ.mjs";import"../../chunk-P5HCJN3A.mjs";import"../../chunk-GJYLYE6R.mjs";import"../../chunk-GYYSHYO5.mjs";import"../../chunk-6T2OBPIF.mjs";import"../../chunk-DE5K76I2.mjs";import"../../chunk-Q5ESW36C.mjs";import"../../chunk-NP2IAUME.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-RUKFK3OC.mjs";import"../../chunk-TAHLOBRG.mjs";import"../../chunk-STY74NUA.mjs";import"../../chunk-IF4UU2MT.mjs";import"../../chunk-X2TPNKLV.mjs";import"../../chunk-RYCI4VKO.mjs";import"../../chunk-KDMSOCZY.mjs";export{b as TypeTagParserError,a as TypeTagParserErrorType,c as parseTypeTag};
|
|
2
2
|
//# sourceMappingURL=parser.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as AnyRawTransaction, t as AnyRawTransactionInstance, w as AnyTransactionPayloadInstance, $ as EntryFunctionABI, a1 as EntryFunctionArgumentTypes, ac as FunctionABI, au as InputEntryFunctionData, av as InputEntryFunctionDataWithABI, aw as InputEntryFunctionDataWithRemoteABI, ax as InputGenerateMultiAgentRawTransactionArgs, ay as InputGenerateMultiAgentRawTransactionData, az as InputGenerateOrderlessTransactionOptions, aA as InputGenerateRawTransactionArgs, aB as InputGenerateSequenceNumberTransactionOptions, aC as InputGenerateSingleSignerRawTransactionArgs, aD as InputGenerateSingleSignerRawTransactionData, aE as InputGenerateTransactionData, aF as InputGenerateTransactionOptions, aG as InputGenerateTransactionPayloadData, aH as InputGenerateTransactionPayloadDataWithABI, aI as InputGenerateTransactionPayloadDataWithRemoteABI, aJ as InputMultiSigData, aK as InputMultiSigDataWithABI, aL as InputMultiSigDataWithRemoteABI, aM as InputScriptData, aN as InputSimulateTransactionData, aO as InputSimulateTransactionOptions, aP as InputSubmitTransactionData, aQ as InputTransactionPluginData, aR as InputViewFunctionData, aS as InputViewFunctionDataWithABI, aT as InputViewFunctionDataWithRemoteABI, aU as InputViewFunctionJsonData, bY as ScriptFunctionArgumentTypes, c9 as SimpleEntryFunctionArgumentTypes, cK as TypeArgument, dk as ViewFunctionABI, dl as ViewFunctionJsonPayload } from '../account-
|
|
1
|
+
export { s as AnyRawTransaction, t as AnyRawTransactionInstance, w as AnyTransactionPayloadInstance, $ as EntryFunctionABI, a1 as EntryFunctionArgumentTypes, ac as FunctionABI, au as InputEntryFunctionData, av as InputEntryFunctionDataWithABI, aw as InputEntryFunctionDataWithRemoteABI, ax as InputGenerateMultiAgentRawTransactionArgs, ay as InputGenerateMultiAgentRawTransactionData, az as InputGenerateOrderlessTransactionOptions, aA as InputGenerateRawTransactionArgs, aB as InputGenerateSequenceNumberTransactionOptions, aC as InputGenerateSingleSignerRawTransactionArgs, aD as InputGenerateSingleSignerRawTransactionData, aE as InputGenerateTransactionData, aF as InputGenerateTransactionOptions, aG as InputGenerateTransactionPayloadData, aH as InputGenerateTransactionPayloadDataWithABI, aI as InputGenerateTransactionPayloadDataWithRemoteABI, aJ as InputMultiSigData, aK as InputMultiSigDataWithABI, aL as InputMultiSigDataWithRemoteABI, aM as InputScriptData, aN as InputSimulateTransactionData, aO as InputSimulateTransactionOptions, aP as InputSubmitTransactionData, aQ as InputTransactionPluginData, aR as InputViewFunctionData, aS as InputViewFunctionDataWithABI, aT as InputViewFunctionDataWithRemoteABI, aU as InputViewFunctionJsonData, bY as ScriptFunctionArgumentTypes, c9 as SimpleEntryFunctionArgumentTypes, cK as TypeArgument, dk as ViewFunctionABI, dl as ViewFunctionJsonPayload } from '../account-sIOs_9XJ.mjs';
|
|
2
2
|
import '../types/indexer.mjs';
|
|
3
3
|
import '../types/generated/operations.mjs';
|
|
4
4
|
import '../types/generated/types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { GetANSNameResponse, GetAccountAddressesForAuthKeyResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, OrderBy, OrderByValue, TokenStandard } from './indexer.mjs';
|
|
2
|
-
export { k as AccountAuthenticatorVariant, l as AccountData, n as AccountSignature, p as AnyNumber, r as AnyPublicKeyVariant, v as AnySignatureVariant, y as AptosRequest, z as AptosResponse, B as AptosSettings, D as AuthenticationKeyScheme, E as Block, F as BlockEndInfo, G as BlockEpilogueTransactionResponse, H as BlockMetadataTransactionResponse, K as Client, L as ClientConfig, M as ClientHeadersType, N as ClientRequest, O as ClientResponse, P as CommittedTransactionResponse, Q as CursorPaginationArgs, R as DecodedTableData, S as DeletedTableData, T as DeriveScheme, W as DirectWriteSet, a2 as EntryFunctionPayloadResponse, a3 as EphemeralCertificateVariant, a4 as EphemeralPublicKeyVariant, a5 as EphemeralSignatureVariant, a6 as Event, a7 as EventGuid, a8 as FaucetConfig, ab as FullNodeConfig, ad as GasEstimation, ae as GenerateAccount, af as GenerateAccountWithEd25519, ag as GenerateAccountWithSingleSignerSecp256k1Key, ah as GenesisPayload, ai as GenesisTransactionResponse, ak as HexInput, at as IndexerConfig, aV as Int128, aW as Int16, aX as Int256, aY as Int32, aZ as Int64, a_ as Int8, a$ as LedgerInfo, b0 as LedgerVersionArg, b1 as MimeType, b3 as MoveAbility, b4 as MoveAddressType, b5 as MoveFunction, b6 as MoveFunctionGenericTypeParam, b7 as MoveFunctionId, b8 as MoveFunctionVisibility, b9 as MoveInt128Type, ba as MoveInt16Type, bb as MoveInt256Type, bc as MoveInt32Type, bd as MoveInt64Type, be as MoveInt8Type, bf as MoveModule, bg as MoveModuleBytecode, bh as MoveModuleId, bi as MoveObjectType, bk as MoveOptionType, bl as MoveResource, bm as MoveScriptBytecode, bo as MoveStruct, bp as MoveStructField, bq as MoveStructId, br as MoveStructType, bs as MoveType, bt as MoveUint128Type, bu as MoveUint16Type, bv as MoveUint256Type, bw as MoveUint32Type, bx as MoveUint64Type, by as MoveUint8Type, bz as MoveValue, bJ as MultisigPayloadResponse, bK as OrderByArg, bL as PaginationArgs, bM as PendingTransactionResponse, bN as PluginConfig, bO as PluginSettings, bR as PrivateKeyVariants, bV as RoleType, bZ as ScriptPayloadResponse, b_ as ScriptTransactionArgumentVariants, b$ as ScriptWriteSet, c7 as SigningScheme, c8 as SigningSchemeInput, cb as StateCheckpointTransactionResponse, cd as TableItemRequest, ce as TokenStandardArg, cg as TransactionAuthenticatorVariant, ch as TransactionEd25519Signature, cm as TransactionExecutableVariants, cp as TransactionExtraConfigVariants, cq as TransactionFeePayerSignature, cr as TransactionGenerationConfig, cu as TransactionInnerPayloadVariants, cv as TransactionMultiAgentSignature, cw as TransactionMultiEd25519Signature, cA as TransactionPayloadResponse, cC as TransactionPayloadVariants, cD as TransactionResponse, cE as TransactionResponseType, cF as TransactionSecp256k1Signature, cG as TransactionSignature, cH as TransactionSingleSenderSignature, cI as TransactionSubmitter, cJ as TransactionVariants, d2 as TypeTagVariants, da as Uint128, db as Uint16, dc as Uint256, dd as Uint32, de as Uint64, df as Uint8, dg as UserTransactionResponse, dh as ValidatorTransactionResponse, dm as WaitForTransactionOptions, dn as WhereArg, dp as WriteSet, dq as WriteSetChange, dr as WriteSetChangeDeleteModule, ds as WriteSetChangeDeleteResource, dt as WriteSetChangeDeleteTableItem, du as WriteSetChangeWriteModule, dv as WriteSetChangeWriteResource, dw as WriteSetChangeWriteTableItem, dx as ZkpVariant, dy as anyPublicKeyVariantToString, dD as isBlockEpilogueTransactionResponse, dE as isBlockMetadataTransactionResponse, dG as isEd25519Signature, dH as isFeePayerSignature, dI as isGenesisTransactionResponse, dJ as isMultiAgentSignature, dK as isMultiEd25519Signature, dL as isPendingTransactionResponse, dM as isSecp256k1Signature, dN as isSingleSenderSignature, dO as isStateCheckpointTransactionResponse, dP as isUserTransactionResponse, dQ as isValidatorTransactionResponse } from '../account-
|
|
2
|
+
export { k as AccountAuthenticatorVariant, l as AccountData, n as AccountSignature, p as AnyNumber, r as AnyPublicKeyVariant, v as AnySignatureVariant, y as AptosRequest, z as AptosResponse, B as AptosSettings, D as AuthenticationKeyScheme, E as Block, F as BlockEndInfo, G as BlockEpilogueTransactionResponse, H as BlockMetadataTransactionResponse, K as Client, L as ClientConfig, M as ClientHeadersType, N as ClientRequest, O as ClientResponse, P as CommittedTransactionResponse, Q as CursorPaginationArgs, R as DecodedTableData, S as DeletedTableData, T as DeriveScheme, W as DirectWriteSet, a2 as EntryFunctionPayloadResponse, a3 as EphemeralCertificateVariant, a4 as EphemeralPublicKeyVariant, a5 as EphemeralSignatureVariant, a6 as Event, a7 as EventGuid, a8 as FaucetConfig, ab as FullNodeConfig, ad as GasEstimation, ae as GenerateAccount, af as GenerateAccountWithEd25519, ag as GenerateAccountWithSingleSignerSecp256k1Key, ah as GenesisPayload, ai as GenesisTransactionResponse, ak as HexInput, at as IndexerConfig, aV as Int128, aW as Int16, aX as Int256, aY as Int32, aZ as Int64, a_ as Int8, a$ as LedgerInfo, b0 as LedgerVersionArg, b1 as MimeType, b3 as MoveAbility, b4 as MoveAddressType, b5 as MoveFunction, b6 as MoveFunctionGenericTypeParam, b7 as MoveFunctionId, b8 as MoveFunctionVisibility, b9 as MoveInt128Type, ba as MoveInt16Type, bb as MoveInt256Type, bc as MoveInt32Type, bd as MoveInt64Type, be as MoveInt8Type, bf as MoveModule, bg as MoveModuleBytecode, bh as MoveModuleId, bi as MoveObjectType, bk as MoveOptionType, bl as MoveResource, bm as MoveScriptBytecode, bo as MoveStruct, bp as MoveStructField, bq as MoveStructId, br as MoveStructType, bs as MoveType, bt as MoveUint128Type, bu as MoveUint16Type, bv as MoveUint256Type, bw as MoveUint32Type, bx as MoveUint64Type, by as MoveUint8Type, bz as MoveValue, bJ as MultisigPayloadResponse, bK as OrderByArg, bL as PaginationArgs, bM as PendingTransactionResponse, bN as PluginConfig, bO as PluginSettings, bR as PrivateKeyVariants, bV as RoleType, bZ as ScriptPayloadResponse, b_ as ScriptTransactionArgumentVariants, b$ as ScriptWriteSet, c7 as SigningScheme, c8 as SigningSchemeInput, cb as StateCheckpointTransactionResponse, cd as TableItemRequest, ce as TokenStandardArg, cg as TransactionAuthenticatorVariant, ch as TransactionEd25519Signature, cm as TransactionExecutableVariants, cp as TransactionExtraConfigVariants, cq as TransactionFeePayerSignature, cr as TransactionGenerationConfig, cu as TransactionInnerPayloadVariants, cv as TransactionMultiAgentSignature, cw as TransactionMultiEd25519Signature, cA as TransactionPayloadResponse, cC as TransactionPayloadVariants, cD as TransactionResponse, cE as TransactionResponseType, cF as TransactionSecp256k1Signature, cG as TransactionSignature, cH as TransactionSingleSenderSignature, cI as TransactionSubmitter, cJ as TransactionVariants, d2 as TypeTagVariants, da as Uint128, db as Uint16, dc as Uint256, dd as Uint32, de as Uint64, df as Uint8, dg as UserTransactionResponse, dh as ValidatorTransactionResponse, dm as WaitForTransactionOptions, dn as WhereArg, dp as WriteSet, dq as WriteSetChange, dr as WriteSetChangeDeleteModule, ds as WriteSetChangeDeleteResource, dt as WriteSetChangeDeleteTableItem, du as WriteSetChangeWriteModule, dv as WriteSetChangeWriteResource, dw as WriteSetChangeWriteTableItem, dx as ZkpVariant, dy as anyPublicKeyVariantToString, dD as isBlockEpilogueTransactionResponse, dE as isBlockMetadataTransactionResponse, dG as isEd25519Signature, dH as isFeePayerSignature, dI as isGenesisTransactionResponse, dJ as isMultiAgentSignature, dK as isMultiEd25519Signature, dL as isPendingTransactionResponse, dM as isSecp256k1Signature, dN as isSingleSenderSignature, dO as isStateCheckpointTransactionResponse, dP as isUserTransactionResponse, dQ as isValidatorTransactionResponse } from '../account-sIOs_9XJ.mjs';
|
|
3
3
|
export { AnsName, AnsTokenStandard, ExpirationStatus, RawANSName, SubdomainExpirationPolicy } from './ans.mjs';
|
|
4
4
|
import './generated/operations.mjs';
|
|
5
5
|
import './generated/types.mjs';
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-DE5K76I2.mjs";import{
|
|
1
|
+
import"../chunk-DE5K76I2.mjs";import{A,B,C,D,E,F,G,H,I,J,K,L,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-Q5ESW36C.mjs";import{a as M,b as N}from"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-KDMSOCZY.mjs";export{j as AccountAuthenticatorVariant,l as AnyPublicKeyVariant,n as AnySignatureVariant,L as DeriveScheme,q as EphemeralCertificateVariant,o as EphemeralPublicKeyVariant,p as EphemeralSignatureVariant,N as ExpirationStatus,a as MimeType,H as MoveAbility,G as MoveFunctionVisibility,k as PrivateKeyVariants,I as RoleType,c as ScriptTransactionArgumentVariants,J as SigningScheme,K as SigningSchemeInput,M as SubdomainExpirationPolicy,i as TransactionAuthenticatorVariant,f as TransactionExecutableVariants,g as TransactionExtraConfigVariants,e as TransactionInnerPayloadVariants,d as TransactionPayloadVariants,s as TransactionResponseType,h as TransactionVariants,b as TypeTagVariants,r as ZkpVariant,m as anyPublicKeyVariantToString,z as isBlockEpilogueTransactionResponse,w as isBlockMetadataTransactionResponse,A as isEd25519Signature,D as isFeePayerSignature,v as isGenesisTransactionResponse,C as isMultiAgentSignature,E as isMultiEd25519Signature,t as isPendingTransactionResponse,B as isSecp256k1Signature,F as isSingleSenderSignature,x as isStateCheckpointTransactionResponse,u as isUserTransactionResponse,y as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './indexer.mjs';
|
|
2
|
-
export { k as AccountAuthenticatorVariant, l as AccountData, n as AccountSignature, p as AnyNumber, r as AnyPublicKeyVariant, v as AnySignatureVariant, y as AptosRequest, z as AptosResponse, B as AptosSettings, D as AuthenticationKeyScheme, E as Block, F as BlockEndInfo, G as BlockEpilogueTransactionResponse, H as BlockMetadataTransactionResponse, K as Client, L as ClientConfig, M as ClientHeadersType, N as ClientRequest, O as ClientResponse, P as CommittedTransactionResponse, Q as CursorPaginationArgs, R as DecodedTableData, S as DeletedTableData, T as DeriveScheme, W as DirectWriteSet, a2 as EntryFunctionPayloadResponse, a3 as EphemeralCertificateVariant, a4 as EphemeralPublicKeyVariant, a5 as EphemeralSignatureVariant, a6 as Event, a7 as EventGuid, a8 as FaucetConfig, ab as FullNodeConfig, ad as GasEstimation, ae as GenerateAccount, af as GenerateAccountWithEd25519, ag as GenerateAccountWithSingleSignerSecp256k1Key, ah as GenesisPayload, ai as GenesisTransactionResponse, ak as HexInput, at as IndexerConfig, aV as Int128, aW as Int16, aX as Int256, aY as Int32, aZ as Int64, a_ as Int8, a$ as LedgerInfo, b0 as LedgerVersionArg, b1 as MimeType, b3 as MoveAbility, b4 as MoveAddressType, b5 as MoveFunction, b6 as MoveFunctionGenericTypeParam, b7 as MoveFunctionId, b8 as MoveFunctionVisibility, b9 as MoveInt128Type, ba as MoveInt16Type, bb as MoveInt256Type, bc as MoveInt32Type, bd as MoveInt64Type, be as MoveInt8Type, bf as MoveModule, bg as MoveModuleBytecode, bh as MoveModuleId, bi as MoveObjectType, bk as MoveOptionType, bl as MoveResource, bm as MoveScriptBytecode, bo as MoveStruct, bp as MoveStructField, bq as MoveStructId, br as MoveStructType, bs as MoveType, bt as MoveUint128Type, bu as MoveUint16Type, bv as MoveUint256Type, bw as MoveUint32Type, bx as MoveUint64Type, by as MoveUint8Type, bz as MoveValue, bJ as MultisigPayloadResponse, bK as OrderByArg, bL as PaginationArgs, bM as PendingTransactionResponse, bN as PluginConfig, bO as PluginSettings, bR as PrivateKeyVariants, bV as RoleType, bZ as ScriptPayloadResponse, b_ as ScriptTransactionArgumentVariants, b$ as ScriptWriteSet, c7 as SigningScheme, c8 as SigningSchemeInput, cb as StateCheckpointTransactionResponse, cd as TableItemRequest, ce as TokenStandardArg, cg as TransactionAuthenticatorVariant, ch as TransactionEd25519Signature, cm as TransactionExecutableVariants, cp as TransactionExtraConfigVariants, cq as TransactionFeePayerSignature, cr as TransactionGenerationConfig, cu as TransactionInnerPayloadVariants, cv as TransactionMultiAgentSignature, cw as TransactionMultiEd25519Signature, cA as TransactionPayloadResponse, cC as TransactionPayloadVariants, cD as TransactionResponse, cE as TransactionResponseType, cF as TransactionSecp256k1Signature, cG as TransactionSignature, cH as TransactionSingleSenderSignature, cI as TransactionSubmitter, cJ as TransactionVariants, d2 as TypeTagVariants, da as Uint128, db as Uint16, dc as Uint256, dd as Uint32, de as Uint64, df as Uint8, dg as UserTransactionResponse, dh as ValidatorTransactionResponse, dm as WaitForTransactionOptions, dn as WhereArg, dp as WriteSet, dq as WriteSetChange, dr as WriteSetChangeDeleteModule, ds as WriteSetChangeDeleteResource, dt as WriteSetChangeDeleteTableItem, du as WriteSetChangeWriteModule, dv as WriteSetChangeWriteResource, dw as WriteSetChangeWriteTableItem, dx as ZkpVariant, dy as anyPublicKeyVariantToString, dD as isBlockEpilogueTransactionResponse, dE as isBlockMetadataTransactionResponse, dG as isEd25519Signature, dH as isFeePayerSignature, dI as isGenesisTransactionResponse, dJ as isMultiAgentSignature, dK as isMultiEd25519Signature, dL as isPendingTransactionResponse, dM as isSecp256k1Signature, dN as isSingleSenderSignature, dO as isStateCheckpointTransactionResponse, dP as isUserTransactionResponse, dQ as isValidatorTransactionResponse } from '../account-
|
|
2
|
+
export { k as AccountAuthenticatorVariant, l as AccountData, n as AccountSignature, p as AnyNumber, r as AnyPublicKeyVariant, v as AnySignatureVariant, y as AptosRequest, z as AptosResponse, B as AptosSettings, D as AuthenticationKeyScheme, E as Block, F as BlockEndInfo, G as BlockEpilogueTransactionResponse, H as BlockMetadataTransactionResponse, K as Client, L as ClientConfig, M as ClientHeadersType, N as ClientRequest, O as ClientResponse, P as CommittedTransactionResponse, Q as CursorPaginationArgs, R as DecodedTableData, S as DeletedTableData, T as DeriveScheme, W as DirectWriteSet, a2 as EntryFunctionPayloadResponse, a3 as EphemeralCertificateVariant, a4 as EphemeralPublicKeyVariant, a5 as EphemeralSignatureVariant, a6 as Event, a7 as EventGuid, a8 as FaucetConfig, ab as FullNodeConfig, ad as GasEstimation, ae as GenerateAccount, af as GenerateAccountWithEd25519, ag as GenerateAccountWithSingleSignerSecp256k1Key, ah as GenesisPayload, ai as GenesisTransactionResponse, ak as HexInput, at as IndexerConfig, aV as Int128, aW as Int16, aX as Int256, aY as Int32, aZ as Int64, a_ as Int8, a$ as LedgerInfo, b0 as LedgerVersionArg, b1 as MimeType, b3 as MoveAbility, b4 as MoveAddressType, b5 as MoveFunction, b6 as MoveFunctionGenericTypeParam, b7 as MoveFunctionId, b8 as MoveFunctionVisibility, b9 as MoveInt128Type, ba as MoveInt16Type, bb as MoveInt256Type, bc as MoveInt32Type, bd as MoveInt64Type, be as MoveInt8Type, bf as MoveModule, bg as MoveModuleBytecode, bh as MoveModuleId, bi as MoveObjectType, bk as MoveOptionType, bl as MoveResource, bm as MoveScriptBytecode, bo as MoveStruct, bp as MoveStructField, bq as MoveStructId, br as MoveStructType, bs as MoveType, bt as MoveUint128Type, bu as MoveUint16Type, bv as MoveUint256Type, bw as MoveUint32Type, bx as MoveUint64Type, by as MoveUint8Type, bz as MoveValue, bJ as MultisigPayloadResponse, bK as OrderByArg, bL as PaginationArgs, bM as PendingTransactionResponse, bN as PluginConfig, bO as PluginSettings, bR as PrivateKeyVariants, bV as RoleType, bZ as ScriptPayloadResponse, b_ as ScriptTransactionArgumentVariants, b$ as ScriptWriteSet, c7 as SigningScheme, c8 as SigningSchemeInput, cb as StateCheckpointTransactionResponse, cd as TableItemRequest, ce as TokenStandardArg, cg as TransactionAuthenticatorVariant, ch as TransactionEd25519Signature, cm as TransactionExecutableVariants, cp as TransactionExtraConfigVariants, cq as TransactionFeePayerSignature, cr as TransactionGenerationConfig, cu as TransactionInnerPayloadVariants, cv as TransactionMultiAgentSignature, cw as TransactionMultiEd25519Signature, cA as TransactionPayloadResponse, cC as TransactionPayloadVariants, cD as TransactionResponse, cE as TransactionResponseType, cF as TransactionSecp256k1Signature, cG as TransactionSignature, cH as TransactionSingleSenderSignature, cI as TransactionSubmitter, cJ as TransactionVariants, d2 as TypeTagVariants, da as Uint128, db as Uint16, dc as Uint256, dd as Uint32, de as Uint64, df as Uint8, dg as UserTransactionResponse, dh as ValidatorTransactionResponse, dm as WaitForTransactionOptions, dn as WhereArg, dp as WriteSet, dq as WriteSetChange, dr as WriteSetChangeDeleteModule, ds as WriteSetChangeDeleteResource, dt as WriteSetChangeDeleteTableItem, du as WriteSetChangeWriteModule, dv as WriteSetChangeWriteResource, dw as WriteSetChangeWriteTableItem, dx as ZkpVariant, dy as anyPublicKeyVariantToString, dD as isBlockEpilogueTransactionResponse, dE as isBlockMetadataTransactionResponse, dG as isEd25519Signature, dH as isFeePayerSignature, dI as isGenesisTransactionResponse, dJ as isMultiAgentSignature, dK as isMultiEd25519Signature, dL as isPendingTransactionResponse, dM as isSecp256k1Signature, dN as isSingleSenderSignature, dO as isStateCheckpointTransactionResponse, dP as isUserTransactionResponse, dQ as isValidatorTransactionResponse } from '../account-sIOs_9XJ.mjs';
|
|
3
3
|
import '../utils/apiEndpoints.mjs';
|
|
4
4
|
import './generated/operations.mjs';
|
|
5
5
|
import './generated/types.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b7 as MoveFunctionId, b as AccountAddress, bq as MoveStructId } from '../account-
|
|
1
|
+
import { b7 as MoveFunctionId, b as AccountAddress, bq as MoveStructId } from '../account-sIOs_9XJ.mjs';
|
|
2
2
|
import '../types/indexer.mjs';
|
|
3
3
|
import '../types/generated/operations.mjs';
|
|
4
4
|
import '../types/generated/types.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"../chunk-GJYLYE6R.mjs";import"../chunk-GYYSHYO5.mjs";import"../chunk-6T2OBPIF.mjs";import"../chunk-DE5K76I2.mjs";import"../chunk-Q5ESW36C.mjs";import"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RUKFK3OC.mjs";import"../chunk-TAHLOBRG.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-X2TPNKLV.mjs";import"../chunk-KDMSOCZY.mjs";export{g as base64UrlDecode,h as base64UrlToBytes,i as convertAmountFromHumanReadableToOnChain,j as convertAmountFromOnChainToHumanReadable,f as floorToWholeHour,d as getErrorMessage,m as getFunctionParts,a as isBun,l as isEncodedStruct,n as isValidFunctionInfo,e as nowInSeconds,p as pairedFaMetadataAddress,k as parseEncodedStruct,c as sleep,o as truncateAddress,b as warnIfDevelopment};
|
|
2
2
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -2,7 +2,7 @@ export { Network, NetworkToChainId, NetworkToFaucetAPI, NetworkToIndexerAPI, Net
|
|
|
2
2
|
export { ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT, APTOS_COIN, APTOS_FA, AptosApiType, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, FIREBASE_AUTH_ISS_PATTERN, MIN_MAX_GAS_AMOUNT, ProcessorType, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, TEXT_ENCODER } from './const.mjs';
|
|
3
3
|
export { DeserializableClass, normalizeBundle } from './normalizeBundle.mjs';
|
|
4
4
|
export { base64UrlDecode, base64UrlToBytes, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, floorToWholeHour, getErrorMessage, getFunctionParts, isBun, isEncodedStruct, isValidFunctionInfo, nowInSeconds, pairedFaMetadataAddress, parseEncodedStruct, sleep, truncateAddress, warnIfDevelopment } from './helpers.mjs';
|
|
5
|
-
import '../account-
|
|
5
|
+
import '../account-sIOs_9XJ.mjs';
|
|
6
6
|
import '../types/indexer.mjs';
|
|
7
7
|
import '../types/generated/operations.mjs';
|
|
8
8
|
import '../types/generated/types.mjs';
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-HGLO5LDS.mjs";import{a as L}from"../chunk-ITZN23GU.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import"../chunk-HGLO5LDS.mjs";import{a as L}from"../chunk-ITZN23GU.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2EBXCCLB.mjs";import"../chunk-WOPHK7LB.mjs";import"../chunk-F4RJMSAW.mjs";import"../chunk-KKPH2JUV.mjs";import"../chunk-M65PXVDO.mjs";import{a as D,b as E,c as F,d as G,e as H,f as I,g as J,h as K}from"../chunk-P5HCJN3A.mjs";import{a as n,b as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C}from"../chunk-GJYLYE6R.mjs";import"../chunk-GYYSHYO5.mjs";import"../chunk-6T2OBPIF.mjs";import"../chunk-DE5K76I2.mjs";import"../chunk-Q5ESW36C.mjs";import"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RUKFK3OC.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-TAHLOBRG.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-X2TPNKLV.mjs";import"../chunk-KDMSOCZY.mjs";export{j as ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT,f as APTOS_COIN,g as APTOS_FA,a as AptosApiType,b as DEFAULT_MAX_GAS_AMOUNT,d as DEFAULT_TXN_EXP_SEC_FROM_NOW,e as DEFAULT_TXN_TIMEOUT_SEC,l as FIREBASE_AUTH_ISS_PATTERN,c as MIN_MAX_GAS_AMOUNT,I as Network,J as NetworkToChainId,F as NetworkToFaucetAPI,D as NetworkToIndexerAPI,K as NetworkToNetworkName,E as NetworkToNodeAPI,G as NetworkToPepperAPI,H as NetworkToProverAPI,k as ProcessorType,h as RAW_TRANSACTION_SALT,i as RAW_TRANSACTION_WITH_DATA_SALT,m as TEXT_ENCODER,t as base64UrlDecode,u as base64UrlToBytes,v as convertAmountFromHumanReadableToOnChain,w as convertAmountFromOnChainToHumanReadable,s as floorToWholeHour,q as getErrorMessage,z as getFunctionParts,n as isBun,y as isEncodedStruct,A as isValidFunctionInfo,L as normalizeBundle,r as nowInSeconds,C as pairedFaMetadataAddress,x as parseEncodedStruct,p as sleep,B as truncateAddress,o as warnIfDevelopment};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c3 as Serializable, V as Deserializer } from '../account-
|
|
1
|
+
import { c3 as Serializable, V as Deserializer } from '../account-sIOs_9XJ.mjs';
|
|
2
2
|
import '../types/indexer.mjs';
|
|
3
3
|
import '../types/generated/operations.mjs';
|
|
4
4
|
import '../types/generated/types.mjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-ITZN23GU.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-ITZN23GU.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-2EBXCCLB.mjs";import"../chunk-WOPHK7LB.mjs";import"../chunk-F4RJMSAW.mjs";import"../chunk-KKPH2JUV.mjs";import"../chunk-M65PXVDO.mjs";import"../chunk-DE5K76I2.mjs";import"../chunk-Q5ESW36C.mjs";import"../chunk-NP2IAUME.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-RUKFK3OC.mjs";import"../chunk-TAHLOBRG.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-X2TPNKLV.mjs";import"../chunk-KDMSOCZY.mjs";export{a as normalizeBundle};
|
|
2
2
|
//# sourceMappingURL=normalizeBundle.mjs.map
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-RYCI4VKO.mjs";import"./chunk-KDMSOCZY.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
|
@@ -21,7 +21,13 @@ import {
|
|
|
21
21
|
MAX_I256_BIG_INT,
|
|
22
22
|
} from "../consts";
|
|
23
23
|
import { Deserializer } from "../deserializer";
|
|
24
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
Serializable,
|
|
26
|
+
Serializer,
|
|
27
|
+
ensureBoolean,
|
|
28
|
+
serializeEntryFunctionBytesCompat,
|
|
29
|
+
validateNumberInRange,
|
|
30
|
+
} from "../serializer";
|
|
25
31
|
import { TransactionArgument } from "../../transactions/instances/transactionArgument";
|
|
26
32
|
import { AnyNumber, Uint16, Uint32, Uint8, Int8, Int16, Int32, ScriptTransactionArgumentVariants } from "../../types";
|
|
27
33
|
|
|
@@ -76,14 +82,14 @@ export class Bool extends Serializable implements TransactionArgument {
|
|
|
76
82
|
/**
|
|
77
83
|
* Serializes the current instance for use in an entry function by converting it to a byte sequence.
|
|
78
84
|
* This allows the instance to be properly formatted for serialization in transactions.
|
|
79
|
-
* Uses
|
|
85
|
+
* Uses serializeAsBytes when available, with a fallback for older Serializer versions.
|
|
80
86
|
*
|
|
81
87
|
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
82
88
|
* @group Implementation
|
|
83
89
|
* @category BCS
|
|
84
90
|
*/
|
|
85
91
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
86
|
-
serializer
|
|
92
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
/**
|
|
@@ -138,7 +144,7 @@ export class U8 extends Serializable implements TransactionArgument {
|
|
|
138
144
|
}
|
|
139
145
|
|
|
140
146
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
141
|
-
serializer
|
|
147
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -174,7 +180,7 @@ export class U16 extends Serializable implements TransactionArgument {
|
|
|
174
180
|
}
|
|
175
181
|
|
|
176
182
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
177
|
-
serializer
|
|
183
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
178
184
|
}
|
|
179
185
|
|
|
180
186
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -209,7 +215,7 @@ export class U32 extends Serializable implements TransactionArgument {
|
|
|
209
215
|
}
|
|
210
216
|
|
|
211
217
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
212
|
-
serializer
|
|
218
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
213
219
|
}
|
|
214
220
|
|
|
215
221
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -247,7 +253,7 @@ export class U64 extends Serializable implements TransactionArgument {
|
|
|
247
253
|
}
|
|
248
254
|
|
|
249
255
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
250
|
-
serializer
|
|
256
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
251
257
|
}
|
|
252
258
|
|
|
253
259
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -283,7 +289,7 @@ export class U128 extends Serializable implements TransactionArgument {
|
|
|
283
289
|
}
|
|
284
290
|
|
|
285
291
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
286
|
-
serializer
|
|
292
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
287
293
|
}
|
|
288
294
|
|
|
289
295
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -319,7 +325,7 @@ export class U256 extends Serializable implements TransactionArgument {
|
|
|
319
325
|
}
|
|
320
326
|
|
|
321
327
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
322
|
-
serializer
|
|
328
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
323
329
|
}
|
|
324
330
|
|
|
325
331
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -354,7 +360,7 @@ export class I8 extends Serializable implements TransactionArgument {
|
|
|
354
360
|
}
|
|
355
361
|
|
|
356
362
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
357
|
-
serializer
|
|
363
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
358
364
|
}
|
|
359
365
|
|
|
360
366
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -390,7 +396,7 @@ export class I16 extends Serializable implements TransactionArgument {
|
|
|
390
396
|
}
|
|
391
397
|
|
|
392
398
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
393
|
-
serializer
|
|
399
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
394
400
|
}
|
|
395
401
|
|
|
396
402
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -425,7 +431,7 @@ export class I32 extends Serializable implements TransactionArgument {
|
|
|
425
431
|
}
|
|
426
432
|
|
|
427
433
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
428
|
-
serializer
|
|
434
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
429
435
|
}
|
|
430
436
|
|
|
431
437
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -463,7 +469,7 @@ export class I64 extends Serializable implements TransactionArgument {
|
|
|
463
469
|
}
|
|
464
470
|
|
|
465
471
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
466
|
-
serializer
|
|
472
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
467
473
|
}
|
|
468
474
|
|
|
469
475
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -499,7 +505,7 @@ export class I128 extends Serializable implements TransactionArgument {
|
|
|
499
505
|
}
|
|
500
506
|
|
|
501
507
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
502
|
-
serializer
|
|
508
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
503
509
|
}
|
|
504
510
|
|
|
505
511
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -535,7 +541,7 @@ export class I256 extends Serializable implements TransactionArgument {
|
|
|
535
541
|
}
|
|
536
542
|
|
|
537
543
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
538
|
-
serializer
|
|
544
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
539
545
|
}
|
|
540
546
|
|
|
541
547
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { Bool, U128, U16, U256, U32, U64, U8, I8, I16, I32, I64, I128, I256 } from "./movePrimitives";
|
|
5
|
-
import { Serializable, Serializer } from "../serializer";
|
|
5
|
+
import { Serializable, Serializer, serializeEntryFunctionBytesCompat } from "../serializer";
|
|
6
6
|
import { Deserializable, Deserializer } from "../deserializer";
|
|
7
7
|
import { AnyNumber, HexInput, ScriptTransactionArgumentVariants } from "../../types";
|
|
8
8
|
import { Hex } from "../../core/hex";
|
|
@@ -69,14 +69,14 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
69
69
|
/**
|
|
70
70
|
* Serializes the current instance into a byte sequence suitable for entry functions.
|
|
71
71
|
* This allows the data to be properly formatted for transmission or storage.
|
|
72
|
-
* Uses
|
|
72
|
+
* Uses serializeAsBytes when available, with a fallback for older Serializer versions.
|
|
73
73
|
*
|
|
74
74
|
* @param serializer - The serializer instance used to serialize the byte sequence.
|
|
75
75
|
* @group Implementation
|
|
76
76
|
* @category BCS
|
|
77
77
|
*/
|
|
78
78
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
79
|
-
serializer
|
|
79
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -493,7 +493,7 @@ export class MoveString extends Serializable implements TransactionArgument {
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
496
|
-
serializer
|
|
496
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
serializeForScriptFunction(serializer: Serializer): void {
|
|
@@ -530,7 +530,7 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
533
|
-
serializer
|
|
533
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
/**
|
package/src/bcs/serializer.ts
CHANGED
|
@@ -77,6 +77,25 @@ export abstract class Serializable {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Serialize a Serializable value as length-prefixed bytes into a Serializer,
|
|
82
|
+
* with backwards compatibility for older Serializer implementations that lack
|
|
83
|
+
* the `serializeAsBytes` method. This is critical for cross-version compatibility
|
|
84
|
+
* when SDK objects built with a newer SDK are serialized by an older SDK's Serializer
|
|
85
|
+
* (e.g., wallet extensions bundling an older SDK version).
|
|
86
|
+
*
|
|
87
|
+
* @param serializer - The serializer to write into (may be from any SDK version).
|
|
88
|
+
* @param value - The Serializable value to serialize as bytes.
|
|
89
|
+
*/
|
|
90
|
+
export function serializeEntryFunctionBytesCompat(serializer: Serializer, value: Serializable): void {
|
|
91
|
+
if (typeof (serializer as { serializeAsBytes?: unknown }).serializeAsBytes === "function") {
|
|
92
|
+
serializer.serializeAsBytes(value);
|
|
93
|
+
} else {
|
|
94
|
+
const bcsBytes = value.bcsToBytes();
|
|
95
|
+
serializer.serializeBytes(bcsBytes);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
80
99
|
/**
|
|
81
100
|
* Minimum buffer growth increment to avoid too many small reallocations.
|
|
82
101
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { bytesToHex, hexToBytes } from "@noble/hashes/utils";
|
|
5
|
-
import { Serializable, Serializer } from "../bcs/serializer";
|
|
5
|
+
import { Serializable, Serializer, serializeEntryFunctionBytesCompat } from "../bcs/serializer";
|
|
6
6
|
import { Deserializer } from "../bcs/deserializer";
|
|
7
7
|
import { ParsingError, ParsingResult } from "./common";
|
|
8
8
|
import { TransactionArgument } from "../transactions/instances/transactionArgument";
|
|
@@ -240,14 +240,14 @@ export class AccountAddress extends Serializable implements TransactionArgument
|
|
|
240
240
|
/**
|
|
241
241
|
* Serializes the current instance into a byte sequence suitable for entry functions.
|
|
242
242
|
* This allows for the proper encoding of data when interacting with entry functions in the blockchain.
|
|
243
|
-
* Uses
|
|
243
|
+
* Uses serializeAsBytes when available, with a fallback for older Serializer versions.
|
|
244
244
|
*
|
|
245
245
|
* @param serializer - The serializer instance used to convert the data into bytes.
|
|
246
246
|
* @group Implementation
|
|
247
247
|
* @category Serialization
|
|
248
248
|
*/
|
|
249
249
|
serializeForEntryFunction(serializer: Serializer): void {
|
|
250
|
-
serializer
|
|
250
|
+
serializeEntryFunctionBytesCompat(serializer, this);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/greg/git/aptos-ts-sdk/dist/common/chunk-2VR6ONNW.js","../../src/core/common.ts","../../src/core/hex.ts","../../src/core/accountAddress.ts"],"names":["ParsingError","message","invalidReason","HexInvalidReason","Hex","_Hex","data","bytesToHex"],"mappings":"AAAA,ilBAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CCQhM,IAAMA,CAAAA,CAAN,MAAA,QAA8B,KAAM,CAkBzC,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAkB,CAC7C,KAAA,CAAMD,CAAO,CAAA,CACb,IAAA,CAAK,aAAA,CAAgBC,CACvB,CACF,CAAA,CC3BA,4CAAuC,IAS3BC,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CACjBA,CAAAA,CAAA,iBAAA,CAAoB,mBAAA,CAHVA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAgCCC,CAAAA,aAAN,MAAMC,CAAI,CAUf,WAAA,CAAYC,CAAAA,CAAkB,CAC5B,IAAA,CAAK,IAAA,CAAOA,CACd,CAaA,YAAA,CAAA,CAA2B,CACzB,OAAO,IAAA,CAAK,IACd,CASA,qBAAA,CAAA,CAAgC,CAC9B,OAAOC,+BAAAA,IAAW,CAAK,IAAI,CAC7B,CASA,QAAA,CAAA,CAAmB,CACjB,MAAO,CAAA,EAAA,EAAK,IAAA,CAAK,qBAAA,CAAsB,CAAC,CAAA,CAAA;ACiVsB;AAlWV,SAAA","file":"/Users/greg/git/aptos-ts-sdk/dist/common/chunk-2VR6ONNW.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This error is used to explain why parsing failed.\n * @group Implementation\n * @category Serialization\n */\nexport class ParsingError<T> extends Error {\n /**\n * This provides a programmatic way to access why parsing failed. Downstream devs\n * might want to use this to build their own error messages if the default error\n * messages are not suitable for their use case. This should be an enum.\n * @group Implementation\n * @category Serialization\n */\n public invalidReason: T;\n\n /**\n * Creates an instance of the error with a specified message and invalid reason.\n *\n * @param message The error message that describes the issue.\n * @param invalidReason The reason why the input is considered invalid.\n * @group Implementation\n * @category Serialization\n */\n constructor(message: string, invalidReason: T) {\n super(message);\n this.invalidReason = invalidReason;\n }\n}\n\n/**\n * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,\n * this type is returned from \"defensive\" functions like isValid.\n * @group Implementation\n * @category Serialization\n */\nexport type ParsingResult<T> = {\n /**\n * True if valid, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n valid: boolean;\n\n /**\n * If valid is false, this will be a code explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReason?: T;\n\n /**\n * If valid is false, this will be a string explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReasonMessage?: string;\n};\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { Serializable, Serializer } from \"../bcs/serializer\";\nimport { Deserializer } from \"../bcs/deserializer\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { TransactionArgument } from \"../transactions/instances/transactionArgument\";\nimport { HexInput, ScriptTransactionArgumentVariants } from \"../types\";\n\n/**\n * Provides reasons for an address was invalid.\n * @group Implementation\n * @category Serialization\n */\nexport enum AddressInvalidReason {\n INCORRECT_NUMBER_OF_BYTES = \"incorrect_number_of_bytes\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n TOO_SHORT = \"too_short\",\n TOO_LONG = \"too_long\",\n LEADING_ZERO_X_REQUIRED = \"leading_zero_x_required\",\n LONG_FORM_REQUIRED_UNLESS_SPECIAL = \"long_form_required_unless_special\",\n INVALID_PADDING_ZEROES = \"INVALID_PADDING_ZEROES\",\n INVALID_PADDING_STRICTNESS = \"INVALID_PADDING_STRICTNESS\",\n}\n\n/**\n * The input for an account address, which can be either a hexadecimal string or a standard account address.\n * @group Implementation\n * @category Serialization\n */\nexport type AccountAddressInput = HexInput | AccountAddress;\n\n/**\n * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction\n * hashes, use the Hex class.\n *\n * AccountAddress is used for working with account addresses. Account addresses, when\n * represented as a string, generally look like these examples:\n * - 0x1\n * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c\n *\n * Proper formatting and parsing of account addresses is defined by AIP-40.\n * To learn more about the standard, read the AIP here:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * The comments in this class make frequent reference to the LONG and SHORT formats,\n * as well as \"special\" addresses. To learn what these refer to see AIP-40.\n * @group Implementation\n * @category Serialization\n */\nexport class AccountAddress extends Serializable implements TransactionArgument {\n /**\n * This is the internal representation of an account address.\n * @group Implementation\n * @category Serialization\n */\n readonly data: Uint8Array;\n\n /**\n * The number of bytes that make up an account address.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The length of an address string in LONG form without a leading 0x.\n * @group Implementation\n * @category Serialization\n */\n static readonly LONG_STRING_LENGTH: number = 64;\n\n static ZERO: AccountAddress = AccountAddress.from(\"0x0\");\n\n static ONE: AccountAddress = AccountAddress.from(\"0x1\");\n\n static TWO: AccountAddress = AccountAddress.from(\"0x2\");\n\n static THREE: AccountAddress = AccountAddress.from(\"0x3\");\n\n static FOUR: AccountAddress = AccountAddress.from(\"0x4\");\n\n static A: AccountAddress = AccountAddress.from(\"0xA\");\n\n /**\n * Creates an instance of AccountAddress from a Uint8Array.\n *\n * This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.\n *\n * @param input A Uint8Array representing an account address.\n * @throws ParsingError if the input length is not equal to 32 bytes.\n * @group Implementation\n * @category Serialization\n */\n constructor(input: Uint8Array) {\n super();\n if (input.length !== AccountAddress.LENGTH) {\n throw new ParsingError(\n \"AccountAddress data should be exactly 32 bytes long\",\n AddressInvalidReason.INCORRECT_NUMBER_OF_BYTES,\n );\n }\n this.data = input;\n }\n\n /**\n * Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.\n * In other words, the last byte of the address must be < 0b10000 (16)\n * and every other byte must be zero.\n *\n * For more information on how special addresses are defined, see AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns true if the address is special, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n isSpecial(): boolean {\n return (\n this.data.slice(0, this.data.length - 1).every((byte) => byte === 0) && this.data[this.data.length - 1] < 0b10000\n );\n }\n // ===\n // Methods for representing an instance of AccountAddress as other types.\n // ===\n\n /**\n * Return the AccountAddress as a string as per AIP-40.\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n * This representation returns special addresses in SHORT form (0xf)\n * and other addresses in LONG form (0x + 64 characters).\n *\n * @returns AccountAddress as a string conforming to AIP-40.\n * @group Implementation\n * @category Serialization\n */\n toString(): `0x${string}` {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n /**\n * Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.\n *\n * NOTE: Prefer to use `toString` where possible.\n *\n * @returns AccountAddress as a string without the leading 0x.\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n let hex = bytesToHex(this.data);\n if (this.isSpecial()) {\n hex = hex[hex.length - 1];\n }\n return hex;\n }\n\n /**\n * Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns AccountAddress as a string in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLong(): `0x${string}` {\n return `0x${this.toStringLongWithoutPrefix()}`;\n }\n\n /**\n * Returns the account address as a string in LONG form without a leading 0x.\n * This function will include leading zeroes and will produce a string of 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns {string} The account address in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLongWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Convert the account address to a string in SHORT format, which is 0x followed by the shortest\n * possible representation (no leading zeros).\n *\n * @returns AccountAddress as a string in SHORT form.\n * @group Implementation\n * @category Serialization\n */\n toStringShort(): `0x${string}` {\n return `0x${this.toStringShortWithoutPrefix()}`;\n }\n\n /**\n * Returns a lossless short string representation of the address by trimming leading zeros.\n * If the address consists of all zeros, returns \"0\".\n *\n * @returns A string representation of the address without leading zeros\n * @group Implementation\n * @category Serialization\n */\n toStringShortWithoutPrefix(): string {\n const hex = bytesToHex(this.data).replace(/^0+/, \"\");\n return hex === \"\" ? \"0\" : hex;\n }\n\n /**\n * Get the inner data as a Uint8Array.\n * The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Serialize the AccountAddress to a Serializer instance's data buffer.\n * @param serializer The serializer to serialize the AccountAddress to.\n * @returns void\n * @example\n * const serializer = new Serializer();\n * const address = AccountAddress.fromString(\"0x1\");\n * address.serialize(serializer);\n * const bytes = serializer.toUint8Array();\n * // `bytes` is now the BCS-serialized address.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.data);\n }\n\n /**\n * Serializes the current instance into a byte sequence suitable for entry functions.\n * This allows for the proper encoding of data when interacting with entry functions in the blockchain.\n * Uses the optimized serializeAsBytes method to reduce allocations.\n *\n * @param serializer - The serializer instance used to convert the data into bytes.\n * @group Implementation\n * @category Serialization\n */\n serializeForEntryFunction(serializer: Serializer): void {\n serializer.serializeAsBytes(this);\n }\n\n /**\n * Serializes the current instance for use in a script function by encoding it into a byte sequence.\n * This process involves serializing the variant index and the instance data, making it suitable for transmission.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serializeForScriptFunction(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Address);\n serializer.serialize(this);\n }\n\n /**\n * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.\n * This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.\n * @param deserializer The deserializer to deserialize the AccountAddress from.\n * @returns An instance of AccountAddress.\n * @example\n * const bytes = hexToBytes(\"0x0102030405060708091011121314151617181920212223242526272829303132\");\n * const deserializer = new Deserializer(bytes);\n * const address = AccountAddress.deserialize(deserializer);\n * // `address` is now an instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): AccountAddress {\n const bytes = deserializer.deserializeFixedBytes(AccountAddress.LENGTH);\n return new AccountAddress(bytes);\n }\n\n // ===\n // Methods for creating an instance of AccountAddress from other types.\n // ===\n\n /**\n * NOTE: This function has strict parsing behavior. For relaxed behavior, please use\n * the `fromString` function.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows only the strictest formats defined by AIP-40. In short this\n * means only the following formats are accepted:\n *\n * - LONG\n * - SHORT for special addresses\n *\n * Where:\n * - LONG is defined as 0x + 64 hex characters.\n * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.\n *\n * This means the following are not accepted:\n * - SHORT for non-special addresses.\n * - Any address without a leading 0x.\n *\n * @param input - A hex string representing an account address.\n *\n * @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.\n *\n * @remarks\n *\n * This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.\n *\n * @see AIP-40 documentation for more details on address formats:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns An instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStringStrict(input: string): AccountAddress {\n // Assert the string starts with 0x.\n if (!input.startsWith(\"0x\")) {\n throw new ParsingError(\"Hex string must start with a leading 0x.\", AddressInvalidReason.LEADING_ZERO_X_REQUIRED);\n }\n\n const address = AccountAddress.fromString(input);\n\n // Check if the address is in LONG form. If it is not, this is only allowed for\n // special addresses, in which case we check it is in proper SHORT form.\n if (input.length !== AccountAddress.LONG_STRING_LENGTH + 2) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `The given hex string ${input} is not a special address, it must be represented as 0x + 64 chars.`,\n AddressInvalidReason.LONG_FORM_REQUIRED_UNLESS_SPECIAL,\n );\n } else if (input.length !== 3) {\n // 0x + one hex char is the only valid SHORT form for special addresses.\n throw new ParsingError(\n `The given hex string ${input} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,\n AddressInvalidReason.INVALID_PADDING_ZEROES,\n );\n }\n }\n\n return address;\n }\n\n /**\n * NOTE: This function has relaxed parsing behavior. For strict behavior, please use\n * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this\n * function, `fromString`.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows all formats defined by AIP-40. In short this means the\n * following formats are accepted:\n *\n * - LONG, with or without leading 0x\n * - SHORT*, with or without leading 0x\n *\n * Where:\n * - LONG is 64 hex characters.\n * - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.\n * - Padding zeroes are allowed, e.g. 0x0123 is valid.\n *\n * Learn more about the different address formats by reading AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @param input A hex string representing an account address.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n *\n * @returns An instance of AccountAddress.\n *\n * @throws ParsingError if the hex string is too short, too long, or contains invalid characters.\n * @group Implementation\n * @category Serialization\n */\n static fromString(input: string, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n let parsedInput = input;\n // Remove leading 0x for parsing.\n if (input.startsWith(\"0x\")) {\n parsedInput = input.slice(2);\n }\n\n // Ensure the address string is at least 1 character long.\n if (parsedInput.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_SHORT,\n );\n }\n\n // Ensure the address string is not longer than 64 characters.\n if (parsedInput.length > 64) {\n throw new ParsingError(\n \"Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_LONG,\n );\n }\n\n // Ensure that the maxMissingChars is between or equal to 0 and 63.\n if (maxMissingChars > 63 || maxMissingChars < 0) {\n throw new ParsingError(\n `maxMissingChars must be between or equal to 0 and 63. Received ${maxMissingChars}`,\n AddressInvalidReason.INVALID_PADDING_STRICTNESS,\n );\n }\n\n let addressBytes: Uint8Array;\n try {\n // Pad the address with leading zeroes, so it is 64 chars long and then convert\n // the hex string to bytes. Every two characters in a hex string constitutes a\n // single byte. So a 64 length hex string becomes a 32 byte array.\n addressBytes = hexToBytes(parsedInput.padStart(64, \"0\"));\n } catch (error: any) {\n // At this point the only way this can fail is if the hex string contains\n // invalid characters.\n throw new ParsingError(`Hex characters are invalid: ${error?.message}`, AddressInvalidReason.INVALID_HEX_CHARS);\n }\n\n const address = new AccountAddress(addressBytes);\n\n // Cannot pad the address if it has more than maxMissingChars missing.\n if (parsedInput.length < 64 - maxMissingChars) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `Hex string is too short, must be ${64 - maxMissingChars} to 64 chars long, excluding the leading 0x. You may need to fix \nthe addresss by padding it with 0s before passing it to \\`fromString\\` (e.g. <addressString>.padStart(64, '0')). \nReceived ${input}`,\n AddressInvalidReason.TOO_SHORT,\n );\n }\n }\n\n return address;\n }\n\n /**\n * Convenience method for creating an AccountAddress from various input types.\n * This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding\n * AccountAddress.\n *\n * @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,\n * or an existing AccountAddress.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n * @group Implementation\n * @category Serialization\n */\n static from(input: AccountAddressInput, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromString(input, { maxMissingChars });\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n\n /**\n * Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.\n *\n * @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStrict(input: AccountAddressInput): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromStringStrict(input);\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided input is a valid AccountAddress.\n *\n * @param args - The arguments for validation.\n * @param args.input - A hex string representing an account address.\n * @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.\n *\n * @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.\n * If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.\n * @group Implementation\n * @category Serialization\n */\n static isValid(args: { input: AccountAddressInput; strict?: boolean }): ParsingResult<AddressInvalidReason> {\n try {\n if (args.strict) {\n AccountAddress.fromStrict(args.input);\n } else {\n AccountAddress.from(args.input);\n }\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two AccountAddresses are equal based on their underlying byte data.\n *\n * @param other - The AccountAddress to compare to.\n * @returns true if the AccountAddresses are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: AccountAddress): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m as E}from"./chunk-TAHLOBRG.mjs";import{b as x}from"./chunk-STY74NUA.mjs";import{a as U,b as c,c as h,d as l,e as u,f as b,g as y,h as g,i as z,j as A,k as p,l as _,m as w,n as d,o as N,p as m,q as T,r as M}from"./chunk-X2TPNKLV.mjs";import{a as s}from"./chunk-KDMSOCZY.mjs";var R=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return x.fromHexInput(e)}toStringWithoutPrefix(){return this.bcsToHex().toStringWithoutPrefix()}toString(){return`0x${this.toStringWithoutPrefix()}`}},V=256,I=[],X=8;function W(){let r=I.pop();return r?(r.reset(),r):new n}function F(r){I.length<X&&I.push(r)}var n=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 i=this.offset+e;if(this.buffer.byteLength>=i)return;let t=Math.max(Math.floor(this.buffer.byteLength*1.5),i+V),a=new ArrayBuffer(t);new Uint8Array(a).set(new Uint8Array(this.buffer,0,this.offset)),this.buffer=a,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,i,t){this.ensureBufferWillHandleSize(i),e.apply(this.dataView,[this.offset,t,!0]),this.offset+=i}serializeStr(e){this.serializeBytes(E.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){D(e);let i=e?1:0;this.appendToBuffer(new Uint8Array([i]))}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 i=BigInt(e)&BigInt(h),t=BigInt(e)>>BigInt(32);this.serializeU32(Number(i)),this.serializeU32(Number(t))}serializeU128(e){let i=BigInt(e)&l,t=BigInt(e)>>BigInt(64);this.serializeU64(i),this.serializeU64(t)}serializeU256(e){let i=BigInt(e)&u,t=BigInt(e)>>BigInt(128);this.serializeU128(i),this.serializeU128(t)}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 i=BigInt(e),t=i<0?(BigInt(1)<<BigInt(64))+i:i,a=t&BigInt(h),f=t>>BigInt(32);this.serializeU32(Number(a)),this.serializeU32(Number(f))}serializeI128(e){let i=BigInt(e),t=i<0?(BigInt(1)<<BigInt(128))+i:i,a=t&l,f=t>>BigInt(64);this.serializeU64(a),this.serializeU64(f)}serializeI256(e){let i=BigInt(e),t=i<0?(BigInt(1)<<BigInt(256))+i:i,a=t&u,f=t>>BigInt(128);this.serializeU128(a),this.serializeU128(f)}serializeU32AsUleb128(e){let i=e,t=[];for(;i>>>7;)t.push(i&127|128),i>>>=7;t.push(i),this.appendToBuffer(new Uint8Array(t))}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 i=W();try{e.serialize(i);let t=i.toUint8ArrayView();this.serializeBytes(t)}finally{F(i)}}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(i=>{i.serialize(this)})}serializeOption(e,i){let t=e!==void 0;this.serializeBool(t),t&&(typeof e=="string"?this.serializeStr(e):e instanceof Uint8Array?i!==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))}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,c)],n.prototype,"serializeU16",1),s([o(0,h)],n.prototype,"serializeU32",1),s([o(BigInt(0),l)],n.prototype,"serializeU64",1),s([o(BigInt(0),u)],n.prototype,"serializeU128",1),s([o(BigInt(0),b)],n.prototype,"serializeU256",1),s([o(y,g)],n.prototype,"serializeI8",1),s([o(z,A)],n.prototype,"serializeI16",1),s([o(p,_)],n.prototype,"serializeI32",1),s([o(w,d)],n.prototype,"serializeI64",1),s([o(N,m)],n.prototype,"serializeI128",1),s([o(T,M)],n.prototype,"serializeI256",1),s([o(0,h)],n.prototype,"serializeU32AsUleb128",1);function D(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var G=(r,e,i)=>`${r} is out of range: [${e}, ${i}]`;function S(r,e,i){let t=BigInt(r);if(t>BigInt(i)||t<BigInt(e))throw new Error(G(r,e,i))}function o(r,e){return(i,t,a)=>{let f=a.value;return a.value=function(B){return S(B,r,e),f.apply(this,[B])},a}}export{R as a,n as b,D as c,G as d,S as e};
|
|
2
|
-
//# sourceMappingURL=chunk-66F7RP7K.mjs.map
|