@aptos-labs/ts-sdk 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/common/{account-DvGDel4s.d.ts → account-Dpz_N9h-.d.ts} +225 -7
- package/dist/common/chunk-4RHBBU7C.js +4 -0
- package/dist/common/chunk-4RHBBU7C.js.map +1 -0
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +228 -28
- package/dist/common/index.js +39 -34
- package/dist/common/index.js.map +1 -1
- package/dist/esm/{Ed25519Account-C25CwEJi.d.mts → Ed25519Account-BW_kXHC2.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-Bwu9vUe3.d.mts → account-CcxnCdYZ.d.mts} +220 -7
- 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 +92 -26
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +4 -3
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/aptosConfig.d.mts +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 +4 -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/sign.mjs.map +1 -1
- package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.d.mts +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/consts.d.mts +1 -1
- package/dist/esm/bcs/deserializer.d.mts +1 -1
- package/dist/esm/bcs/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/fixedBytes.d.mts +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/chunk-2DPQMXUG.mjs +4 -0
- package/dist/esm/chunk-2DPQMXUG.mjs.map +1 -0
- package/dist/esm/chunk-54C2P534.mjs +2 -0
- package/dist/esm/chunk-54C2P534.mjs.map +1 -0
- package/dist/esm/{chunk-IKTH33UN.mjs → chunk-56IXVVXX.mjs} +2 -2
- package/dist/esm/{chunk-K2TQQFRV.mjs → chunk-76SVQZDX.mjs} +2 -2
- package/dist/esm/{chunk-A2G3V23K.mjs → chunk-BGZDJ5SM.mjs} +2 -2
- package/dist/esm/{chunk-TRIYATBI.mjs → chunk-CUXCVNES.mjs} +2 -2
- package/dist/esm/chunk-DE5K76I2.mjs +1 -0
- package/dist/esm/{chunk-UXUMXAUZ.mjs → chunk-F3NI6N7R.mjs} +2 -2
- package/dist/esm/chunk-FW6UHAQV.mjs +2 -0
- package/dist/esm/{chunk-VS5NYRHW.mjs.map → chunk-FW6UHAQV.mjs.map} +1 -1
- package/dist/esm/{chunk-J426EZGD.mjs → chunk-JN65XG2P.mjs} +2 -2
- package/dist/esm/{chunk-UL777LTI.mjs → chunk-LS2HRAVW.mjs} +24 -19
- package/dist/esm/chunk-LS2HRAVW.mjs.map +1 -0
- package/dist/esm/chunk-NK3Y3PV3.mjs +2 -0
- package/dist/esm/{chunk-5ABS6RDR.mjs.map → chunk-NK3Y3PV3.mjs.map} +1 -1
- package/dist/esm/chunk-NP2IAUME.mjs +2 -0
- package/dist/esm/chunk-NP2IAUME.mjs.map +1 -0
- package/dist/esm/{chunk-G2VFBYHG.mjs → chunk-NTLOKAPD.mjs} +2 -2
- package/dist/esm/{chunk-IFWE34P5.mjs → chunk-PXJEKGEG.mjs} +2 -2
- package/dist/esm/chunk-QEHKRR3I.mjs +2 -0
- package/dist/esm/chunk-QEHKRR3I.mjs.map +1 -0
- package/dist/esm/chunk-RQN6LA7E.mjs +2 -0
- package/dist/esm/{chunk-AEXYYFIZ.mjs.map → chunk-RQN6LA7E.mjs.map} +1 -1
- package/dist/esm/{chunk-HIAEKFG6.mjs → chunk-WZ6FL7CH.mjs} +2 -2
- package/dist/esm/{chunk-LND3GTJ3.mjs → chunk-X674XJNJ.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-BfOrG2BM.d.mts → federatedKeyless-BzaYmP03.d.mts} +1 -1
- package/dist/esm/index.d.mts +5 -4
- 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 +85 -33
- 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 +2 -2
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.d.mts +1 -1
- package/dist/esm/transactions/instances/identifier.d.mts +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 +32 -2
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -2
- 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/ans.d.mts +109 -0
- package/dist/esm/types/ans.mjs +2 -0
- package/dist/esm/types/ans.mjs.map +1 -0
- package/dist/esm/types/generated/operations.d.mts +5 -0
- package/dist/esm/types/generated/queries.d.mts +27 -27
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +191 -7
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +2 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/types.d.mts +1 -1
- package/dist/esm/types/types.mjs +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 +2 -2
- package/src/api/ans.ts +70 -25
- package/src/bcs/serializable/movePrimitives.ts +12 -14
- package/src/bcs/serializable/moveStructs.ts +205 -1
- package/src/internal/ans.ts +279 -109
- package/src/internal/queries/getNames.graphql +5 -0
- package/src/transactions/instances/transactionPayload.ts +27 -1
- package/src/transactions/transactionBuilder/helpers.ts +67 -1
- package/src/transactions/transactionBuilder/remoteAbi.ts +124 -1
- package/src/transactions/transactionBuilder/transactionBuilder.ts +4 -4
- package/src/transactions/types.ts +20 -2
- package/src/types/ans.ts +110 -0
- package/src/types/generated/operations.ts +1 -0
- package/src/types/generated/queries.ts +163 -76
- package/src/types/generated/types.ts +216 -6
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +58 -0
- package/src/version.ts +1 -1
- package/dist/common/chunk-JQCMXTY7.js +0 -4
- package/dist/common/chunk-JQCMXTY7.js.map +0 -1
- package/dist/esm/chunk-5ABS6RDR.mjs +0 -2
- package/dist/esm/chunk-6XLLQB5P.mjs +0 -2
- package/dist/esm/chunk-6XLLQB5P.mjs.map +0 -1
- package/dist/esm/chunk-76PXED26.mjs +0 -4
- package/dist/esm/chunk-76PXED26.mjs.map +0 -1
- package/dist/esm/chunk-AEXYYFIZ.mjs +0 -2
- package/dist/esm/chunk-BIQOJ3OK.mjs +0 -2
- package/dist/esm/chunk-BIQOJ3OK.mjs.map +0 -1
- package/dist/esm/chunk-FD6FGKYY.mjs +0 -1
- package/dist/esm/chunk-UL777LTI.mjs.map +0 -1
- package/dist/esm/chunk-VS5NYRHW.mjs +0 -2
- /package/dist/esm/{chunk-IKTH33UN.mjs.map → chunk-56IXVVXX.mjs.map} +0 -0
- /package/dist/esm/{chunk-K2TQQFRV.mjs.map → chunk-76SVQZDX.mjs.map} +0 -0
- /package/dist/esm/{chunk-A2G3V23K.mjs.map → chunk-BGZDJ5SM.mjs.map} +0 -0
- /package/dist/esm/{chunk-TRIYATBI.mjs.map → chunk-CUXCVNES.mjs.map} +0 -0
- /package/dist/esm/{chunk-FD6FGKYY.mjs.map → chunk-DE5K76I2.mjs.map} +0 -0
- /package/dist/esm/{chunk-UXUMXAUZ.mjs.map → chunk-F3NI6N7R.mjs.map} +0 -0
- /package/dist/esm/{chunk-J426EZGD.mjs.map → chunk-JN65XG2P.mjs.map} +0 -0
- /package/dist/esm/{chunk-G2VFBYHG.mjs.map → chunk-NTLOKAPD.mjs.map} +0 -0
- /package/dist/esm/{chunk-IFWE34P5.mjs.map → chunk-PXJEKGEG.mjs.map} +0 -0
- /package/dist/esm/{chunk-HIAEKFG6.mjs.map → chunk-WZ6FL7CH.mjs.map} +0 -0
- /package/dist/esm/{chunk-LND3GTJ3.mjs.map → chunk-X674XJNJ.mjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { Bool, U128, U16, U256, U32, U64, U8 } from "./movePrimitives";
|
|
4
|
+
import { Bool, U128, U16, U256, U32, U64, U8, I8, I16, I32, I64, I128, I256 } from "./movePrimitives";
|
|
5
5
|
import { Serializable, Serializer } from "../serializer";
|
|
6
6
|
import { Deserializable, Deserializer } from "../deserializer";
|
|
7
7
|
import { AnyNumber, HexInput, ScriptTransactionArgumentVariants } from "../../types";
|
|
@@ -256,6 +256,108 @@ export class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
256
256
|
return new MoveVector<Bool>(values.map((v) => new Bool(v)));
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Factory method to generate a MoveVector<I8> from an array of numbers.
|
|
261
|
+
*
|
|
262
|
+
* @param values - The values used to fill the MoveVector.
|
|
263
|
+
* @returns A MoveVector<I8> with the inner values.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```typescript
|
|
267
|
+
* const v = MoveVector.I8([-1, 0, 1, 127]);
|
|
268
|
+
* ```
|
|
269
|
+
* @group Implementation
|
|
270
|
+
* @category BCS
|
|
271
|
+
*/
|
|
272
|
+
static I8(values: Array<number>): MoveVector<I8> {
|
|
273
|
+
return new MoveVector<I8>(values.map((v) => new I8(v)));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Factory method to generate a MoveVector<I16> from an array of numbers.
|
|
278
|
+
*
|
|
279
|
+
* @param values - The values used to fill the MoveVector.
|
|
280
|
+
* @returns A MoveVector<I16> with the inner values.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```typescript
|
|
284
|
+
* const v = MoveVector.I16([-1, 0, 1, 32767]);
|
|
285
|
+
* ```
|
|
286
|
+
* @group Implementation
|
|
287
|
+
* @category BCS
|
|
288
|
+
*/
|
|
289
|
+
static I16(values: Array<number>): MoveVector<I16> {
|
|
290
|
+
return new MoveVector<I16>(values.map((v) => new I16(v)));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Factory method to generate a MoveVector<I32> from an array of numbers.
|
|
295
|
+
*
|
|
296
|
+
* @param values - The values used to fill the MoveVector.
|
|
297
|
+
* @returns A MoveVector<I32> with the inner values.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* const v = MoveVector.I32([-1, 0, 1, 2147483647]);
|
|
302
|
+
* ```
|
|
303
|
+
* @group Implementation
|
|
304
|
+
* @category BCS
|
|
305
|
+
*/
|
|
306
|
+
static I32(values: Array<number>): MoveVector<I32> {
|
|
307
|
+
return new MoveVector<I32>(values.map((v) => new I32(v)));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Factory method to generate a MoveVector<I64> from an array of numbers or bigints.
|
|
312
|
+
*
|
|
313
|
+
* @param values - The values used to fill the MoveVector.
|
|
314
|
+
* @returns A MoveVector<I64> with the inner values.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```typescript
|
|
318
|
+
* const v = MoveVector.I64([-1n, 0n, 1n, 9223372036854775807n]);
|
|
319
|
+
* ```
|
|
320
|
+
* @group Implementation
|
|
321
|
+
* @category BCS
|
|
322
|
+
*/
|
|
323
|
+
static I64(values: Array<AnyNumber>): MoveVector<I64> {
|
|
324
|
+
return new MoveVector<I64>(values.map((v) => new I64(v)));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Factory method to generate a MoveVector<I128> from an array of numbers or bigints.
|
|
329
|
+
*
|
|
330
|
+
* @param values - The values used to fill the MoveVector.
|
|
331
|
+
* @returns A MoveVector<I128> with the inner values.
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```typescript
|
|
335
|
+
* const v = MoveVector.I128([-1n, 0n, 1n]);
|
|
336
|
+
* ```
|
|
337
|
+
* @group Implementation
|
|
338
|
+
* @category BCS
|
|
339
|
+
*/
|
|
340
|
+
static I128(values: Array<AnyNumber>): MoveVector<I128> {
|
|
341
|
+
return new MoveVector<I128>(values.map((v) => new I128(v)));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Factory method to generate a MoveVector<I256> from an array of numbers or bigints.
|
|
346
|
+
*
|
|
347
|
+
* @param values - The values used to fill the MoveVector.
|
|
348
|
+
* @returns A MoveVector<I256> with the inner values.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```typescript
|
|
352
|
+
* const v = MoveVector.I256([-1n, 0n, 1n]);
|
|
353
|
+
* ```
|
|
354
|
+
* @group Implementation
|
|
355
|
+
* @category BCS
|
|
356
|
+
*/
|
|
357
|
+
static I256(values: Array<AnyNumber>): MoveVector<I256> {
|
|
358
|
+
return new MoveVector<I256>(values.map((v) => new I256(v)));
|
|
359
|
+
}
|
|
360
|
+
|
|
259
361
|
/**
|
|
260
362
|
* Factory method to generate a MoveVector<MoveString> from a `string` or `undefined`.
|
|
261
363
|
* This function creates a MoveVector that encapsulates a MoveString if the provided value is not null or undefined.
|
|
@@ -593,6 +695,108 @@ export class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
593
695
|
return new MoveOption<Bool>(value !== null && value !== undefined ? new Bool(value) : undefined);
|
|
594
696
|
}
|
|
595
697
|
|
|
698
|
+
/**
|
|
699
|
+
* Factory method to generate a MoveOption<I8> from a `number` or `undefined`.
|
|
700
|
+
*
|
|
701
|
+
* @example
|
|
702
|
+
* MoveOption.I8(1).isSome() === true;
|
|
703
|
+
* MoveOption.I8().isSome() === false;
|
|
704
|
+
* MoveOption.I8(undefined).isSome() === false;
|
|
705
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
706
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
707
|
+
* @returns a MoveOption<I8> with an inner value `value`
|
|
708
|
+
* @group Implementation
|
|
709
|
+
* @category BCS
|
|
710
|
+
*/
|
|
711
|
+
static I8(value?: number | null): MoveOption<I8> {
|
|
712
|
+
return new MoveOption<I8>(value !== null && value !== undefined ? new I8(value) : undefined);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Factory method to generate a MoveOption<I16> from a `number` or `undefined`.
|
|
717
|
+
*
|
|
718
|
+
* @example
|
|
719
|
+
* MoveOption.I16(1).isSome() === true;
|
|
720
|
+
* MoveOption.I16().isSome() === false;
|
|
721
|
+
* MoveOption.I16(undefined).isSome() === false;
|
|
722
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
723
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
724
|
+
* @returns a MoveOption<I16> with an inner value `value`
|
|
725
|
+
* @group Implementation
|
|
726
|
+
* @category BCS
|
|
727
|
+
*/
|
|
728
|
+
static I16(value?: number | null): MoveOption<I16> {
|
|
729
|
+
return new MoveOption<I16>(value !== null && value !== undefined ? new I16(value) : undefined);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Factory method to generate a MoveOption<I32> from a `number` or `undefined`.
|
|
734
|
+
*
|
|
735
|
+
* @example
|
|
736
|
+
* MoveOption.I32(1).isSome() === true;
|
|
737
|
+
* MoveOption.I32().isSome() === false;
|
|
738
|
+
* MoveOption.I32(undefined).isSome() === false;
|
|
739
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
740
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
741
|
+
* @returns a MoveOption<I32> with an inner value `value`
|
|
742
|
+
* @group Implementation
|
|
743
|
+
* @category BCS
|
|
744
|
+
*/
|
|
745
|
+
static I32(value?: number | null): MoveOption<I32> {
|
|
746
|
+
return new MoveOption<I32>(value !== null && value !== undefined ? new I32(value) : undefined);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Factory method to generate a MoveOption<I64> from a `number` or a `bigint` or `undefined`.
|
|
751
|
+
*
|
|
752
|
+
* @example
|
|
753
|
+
* MoveOption.I64(1).isSome() === true;
|
|
754
|
+
* MoveOption.I64().isSome() === false;
|
|
755
|
+
* MoveOption.I64(undefined).isSome() === false;
|
|
756
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
757
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
758
|
+
* @returns a MoveOption<I64> with an inner value `value`
|
|
759
|
+
* @group Implementation
|
|
760
|
+
* @category BCS
|
|
761
|
+
*/
|
|
762
|
+
static I64(value?: AnyNumber | null): MoveOption<I64> {
|
|
763
|
+
return new MoveOption<I64>(value !== null && value !== undefined ? new I64(value) : undefined);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Factory method to generate a MoveOption<I128> from a `number` or a `bigint` or `undefined`.
|
|
768
|
+
*
|
|
769
|
+
* @example
|
|
770
|
+
* MoveOption.I128(1).isSome() === true;
|
|
771
|
+
* MoveOption.I128().isSome() === false;
|
|
772
|
+
* MoveOption.I128(undefined).isSome() === false;
|
|
773
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
774
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
775
|
+
* @returns a MoveOption<I128> with an inner value `value`
|
|
776
|
+
* @group Implementation
|
|
777
|
+
* @category BCS
|
|
778
|
+
*/
|
|
779
|
+
static I128(value?: AnyNumber | null): MoveOption<I128> {
|
|
780
|
+
return new MoveOption<I128>(value !== null && value !== undefined ? new I128(value) : undefined);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Factory method to generate a MoveOption<I256> from a `number` or a `bigint` or `undefined`.
|
|
785
|
+
*
|
|
786
|
+
* @example
|
|
787
|
+
* MoveOption.I256(1).isSome() === true;
|
|
788
|
+
* MoveOption.I256().isSome() === false;
|
|
789
|
+
* MoveOption.I256(undefined).isSome() === false;
|
|
790
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined
|
|
791
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
792
|
+
* @returns a MoveOption<I256> with an inner value `value`
|
|
793
|
+
* @group Implementation
|
|
794
|
+
* @category BCS
|
|
795
|
+
*/
|
|
796
|
+
static I256(value?: AnyNumber | null): MoveOption<I256> {
|
|
797
|
+
return new MoveOption<I256>(value !== null && value !== undefined ? new I256(value) : undefined);
|
|
798
|
+
}
|
|
799
|
+
|
|
596
800
|
/**
|
|
597
801
|
* Factory method to generate a MoveOption<MoveString> from a `string` or `undefined`.
|
|
598
802
|
*
|