@moveindustries/ts-sdk 5.1.4
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/LICENSE +201 -0
- package/README.md +66 -0
- package/dist/common/accountAddress-DoqkxUqw.d.ts +7769 -0
- package/dist/common/chunk-56DGDNEY.js +4 -0
- package/dist/common/chunk-56DGDNEY.js.map +1 -0
- package/dist/common/cli/index.d.ts +316 -0
- package/dist/common/cli/index.js +2 -0
- package/dist/common/cli/index.js.map +1 -0
- package/dist/common/index.d.ts +10643 -0
- package/dist/common/index.js +482 -0
- package/dist/common/index.js.map +1 -0
- package/dist/esm/Ed25519Account-DsqenvLJ.d.mts +628 -0
- package/dist/esm/account/AbstractKeylessAccount.d.mts +336 -0
- package/dist/esm/account/AbstractKeylessAccount.mjs +2 -0
- package/dist/esm/account/AbstractKeylessAccount.mjs.map +1 -0
- package/dist/esm/account/AbstractedAccount.d.mts +64 -0
- package/dist/esm/account/AbstractedAccount.mjs +2 -0
- package/dist/esm/account/AbstractedAccount.mjs.map +1 -0
- package/dist/esm/account/Account.d.mts +8 -0
- package/dist/esm/account/Account.mjs +2 -0
- package/dist/esm/account/Account.mjs.map +1 -0
- package/dist/esm/account/AccountUtils.d.mts +38 -0
- package/dist/esm/account/AccountUtils.mjs +2 -0
- package/dist/esm/account/AccountUtils.mjs.map +1 -0
- package/dist/esm/account/DerivableAbstractedAccount.d.mts +59 -0
- package/dist/esm/account/DerivableAbstractedAccount.mjs +2 -0
- package/dist/esm/account/DerivableAbstractedAccount.mjs.map +1 -0
- package/dist/esm/account/Ed25519Account.d.mts +8 -0
- package/dist/esm/account/Ed25519Account.mjs +2 -0
- package/dist/esm/account/Ed25519Account.mjs.map +1 -0
- package/dist/esm/account/EphemeralKeyPair.d.mts +141 -0
- package/dist/esm/account/EphemeralKeyPair.mjs +2 -0
- package/dist/esm/account/EphemeralKeyPair.mjs.map +1 -0
- package/dist/esm/account/FederatedKeylessAccount.d.mts +118 -0
- package/dist/esm/account/FederatedKeylessAccount.mjs +2 -0
- package/dist/esm/account/FederatedKeylessAccount.mjs.map +1 -0
- package/dist/esm/account/KeylessAccount.d.mts +124 -0
- package/dist/esm/account/KeylessAccount.mjs +2 -0
- package/dist/esm/account/KeylessAccount.mjs.map +1 -0
- package/dist/esm/account/MultiEd25519Account.d.mts +102 -0
- package/dist/esm/account/MultiEd25519Account.mjs +2 -0
- package/dist/esm/account/MultiEd25519Account.mjs.map +1 -0
- package/dist/esm/account/MultiKeyAccount.d.mts +206 -0
- package/dist/esm/account/MultiKeyAccount.mjs +2 -0
- package/dist/esm/account/MultiKeyAccount.mjs.map +1 -0
- package/dist/esm/account/SingleKeyAccount.d.mts +8 -0
- package/dist/esm/account/SingleKeyAccount.mjs +2 -0
- package/dist/esm/account/SingleKeyAccount.mjs.map +1 -0
- package/dist/esm/account/index.d.mts +24 -0
- package/dist/esm/account/index.mjs +2 -0
- package/dist/esm/account/index.mjs.map +1 -0
- package/dist/esm/account/utils.d.mts +14 -0
- package/dist/esm/account/utils.mjs +2 -0
- package/dist/esm/account/utils.mjs.map +1 -0
- package/dist/esm/accountAddress-CNXtapt1.d.mts +6979 -0
- package/dist/esm/api/account/abstraction.d.mts +181 -0
- package/dist/esm/api/account/abstraction.mjs +2 -0
- package/dist/esm/api/account/abstraction.mjs.map +1 -0
- package/dist/esm/api/account.d.mts +852 -0
- package/dist/esm/api/account.mjs +2 -0
- package/dist/esm/api/account.mjs.map +1 -0
- package/dist/esm/api/ans.d.mts +504 -0
- package/dist/esm/api/ans.mjs +2 -0
- package/dist/esm/api/ans.mjs.map +1 -0
- package/dist/esm/api/coin.d.mts +81 -0
- package/dist/esm/api/coin.mjs +2 -0
- package/dist/esm/api/coin.mjs.map +1 -0
- package/dist/esm/api/digitalAsset.d.mts +1030 -0
- package/dist/esm/api/digitalAsset.mjs +2 -0
- package/dist/esm/api/digitalAsset.mjs.map +1 -0
- package/dist/esm/api/faucet.d.mts +80 -0
- package/dist/esm/api/faucet.mjs +2 -0
- package/dist/esm/api/faucet.mjs.map +1 -0
- package/dist/esm/api/fungibleAsset.d.mts +288 -0
- package/dist/esm/api/fungibleAsset.mjs +2 -0
- package/dist/esm/api/fungibleAsset.mjs.map +1 -0
- package/dist/esm/api/general.d.mts +303 -0
- package/dist/esm/api/general.mjs +2 -0
- package/dist/esm/api/general.mjs.map +1 -0
- package/dist/esm/api/index.d.mts +46 -0
- package/dist/esm/api/index.mjs +2 -0
- package/dist/esm/api/index.mjs.map +1 -0
- package/dist/esm/api/keyless.d.mts +170 -0
- package/dist/esm/api/keyless.mjs +2 -0
- package/dist/esm/api/keyless.mjs.map +1 -0
- package/dist/esm/api/movement.d.mts +113 -0
- package/dist/esm/api/movement.mjs +2 -0
- package/dist/esm/api/movement.mjs.map +1 -0
- package/dist/esm/api/movementConfig.d.mts +7 -0
- package/dist/esm/api/movementConfig.mjs +2 -0
- package/dist/esm/api/movementConfig.mjs.map +1 -0
- package/dist/esm/api/object.d.mts +80 -0
- package/dist/esm/api/object.mjs +2 -0
- package/dist/esm/api/object.mjs.map +1 -0
- package/dist/esm/api/staking.d.mts +134 -0
- package/dist/esm/api/staking.mjs +2 -0
- package/dist/esm/api/staking.mjs.map +1 -0
- package/dist/esm/api/table.d.mts +169 -0
- package/dist/esm/api/table.mjs +2 -0
- package/dist/esm/api/table.mjs.map +1 -0
- package/dist/esm/api/transaction.d.mts +679 -0
- package/dist/esm/api/transaction.mjs +2 -0
- package/dist/esm/api/transaction.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/build.d.mts +141 -0
- package/dist/esm/api/transactionSubmission/build.mjs +2 -0
- package/dist/esm/api/transactionSubmission/build.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/helpers.d.mts +98 -0
- package/dist/esm/api/transactionSubmission/helpers.mjs +2 -0
- package/dist/esm/api/transactionSubmission/helpers.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/management.d.mts +168 -0
- package/dist/esm/api/transactionSubmission/management.mjs +2 -0
- package/dist/esm/api/transactionSubmission/management.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/sign.d.mts +124 -0
- package/dist/esm/api/transactionSubmission/sign.mjs +2 -0
- package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/simulate.d.mts +181 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs +2 -0
- package/dist/esm/api/transactionSubmission/simulate.mjs.map +1 -0
- package/dist/esm/api/transactionSubmission/submit.d.mts +142 -0
- package/dist/esm/api/transactionSubmission/submit.mjs +2 -0
- package/dist/esm/api/transactionSubmission/submit.mjs.map +1 -0
- package/dist/esm/api/utils.d.mts +45 -0
- package/dist/esm/api/utils.mjs +2 -0
- package/dist/esm/api/utils.mjs.map +1 -0
- package/dist/esm/bcs/consts.d.mts +28 -0
- package/dist/esm/bcs/consts.mjs +2 -0
- package/dist/esm/bcs/consts.mjs.map +1 -0
- package/dist/esm/bcs/deserializer.d.mts +7 -0
- package/dist/esm/bcs/deserializer.mjs +2 -0
- package/dist/esm/bcs/deserializer.mjs.map +1 -0
- package/dist/esm/bcs/index.d.mts +8 -0
- package/dist/esm/bcs/index.mjs +2 -0
- package/dist/esm/bcs/index.mjs.map +1 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +65 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/fixedBytes.d.mts +7 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs +2 -0
- package/dist/esm/bcs/serializable/fixedBytes.mjs.map +1 -0
- package/dist/esm/bcs/serializable/movePrimitives.d.mts +7 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs +2 -0
- package/dist/esm/bcs/serializable/movePrimitives.mjs.map +1 -0
- package/dist/esm/bcs/serializable/moveStructs.d.mts +7 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs +2 -0
- package/dist/esm/bcs/serializable/moveStructs.mjs.map +1 -0
- package/dist/esm/bcs/serializer.d.mts +7 -0
- package/dist/esm/bcs/serializer.mjs +2 -0
- package/dist/esm/bcs/serializer.mjs.map +1 -0
- package/dist/esm/chunk-2KDUIZKB.mjs +2 -0
- package/dist/esm/chunk-2KDUIZKB.mjs.map +1 -0
- package/dist/esm/chunk-2QTV4AOE.mjs +2 -0
- package/dist/esm/chunk-2QTV4AOE.mjs.map +1 -0
- package/dist/esm/chunk-47V7UGV5.mjs +4 -0
- package/dist/esm/chunk-47V7UGV5.mjs.map +1 -0
- package/dist/esm/chunk-4QMXOWHP.mjs +1 -0
- package/dist/esm/chunk-4QMXOWHP.mjs.map +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs +1 -0
- package/dist/esm/chunk-4WPQQPUF.mjs.map +1 -0
- package/dist/esm/chunk-5HXLZHDW.mjs +1 -0
- package/dist/esm/chunk-5HXLZHDW.mjs.map +1 -0
- package/dist/esm/chunk-5IMQPJ6J.mjs +2 -0
- package/dist/esm/chunk-5IMQPJ6J.mjs.map +1 -0
- package/dist/esm/chunk-5ZKA765G.mjs +2 -0
- package/dist/esm/chunk-5ZKA765G.mjs.map +1 -0
- package/dist/esm/chunk-6NO4QKAO.mjs +2 -0
- package/dist/esm/chunk-6NO4QKAO.mjs.map +1 -0
- package/dist/esm/chunk-7ECCT6PK.mjs +1 -0
- package/dist/esm/chunk-7ECCT6PK.mjs.map +1 -0
- package/dist/esm/chunk-7TTTMBAK.mjs +2 -0
- package/dist/esm/chunk-7TTTMBAK.mjs.map +1 -0
- package/dist/esm/chunk-A5L76YP7.mjs +2 -0
- package/dist/esm/chunk-A5L76YP7.mjs.map +1 -0
- package/dist/esm/chunk-ANTEUWH6.mjs +2 -0
- package/dist/esm/chunk-ANTEUWH6.mjs.map +1 -0
- package/dist/esm/chunk-CHWDP6AR.mjs +2 -0
- package/dist/esm/chunk-CHWDP6AR.mjs.map +1 -0
- package/dist/esm/chunk-CRCE7R4D.mjs +2 -0
- package/dist/esm/chunk-CRCE7R4D.mjs.map +1 -0
- package/dist/esm/chunk-D6HPXGEP.mjs +2 -0
- package/dist/esm/chunk-D6HPXGEP.mjs.map +1 -0
- package/dist/esm/chunk-DS6QB6HG.mjs +4 -0
- package/dist/esm/chunk-DS6QB6HG.mjs.map +1 -0
- package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
- package/dist/esm/chunk-FD6FGKYY.mjs.map +1 -0
- package/dist/esm/chunk-FJRPU2NH.mjs +2 -0
- package/dist/esm/chunk-FJRPU2NH.mjs.map +1 -0
- package/dist/esm/chunk-FS5ZJKO7.mjs +2 -0
- package/dist/esm/chunk-FS5ZJKO7.mjs.map +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs +1 -0
- package/dist/esm/chunk-FZY4PMEE.mjs.map +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
- package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
- package/dist/esm/chunk-GOXRBEIJ.mjs +2 -0
- package/dist/esm/chunk-GOXRBEIJ.mjs.map +1 -0
- package/dist/esm/chunk-HGLO5LDS.mjs +1 -0
- package/dist/esm/chunk-HGLO5LDS.mjs.map +1 -0
- package/dist/esm/chunk-HL2JMZ7N.mjs +2 -0
- package/dist/esm/chunk-HL2JMZ7N.mjs.map +1 -0
- package/dist/esm/chunk-I6YGBK5S.mjs +2 -0
- package/dist/esm/chunk-I6YGBK5S.mjs.map +1 -0
- package/dist/esm/chunk-K4NT6TTN.mjs +2 -0
- package/dist/esm/chunk-K4NT6TTN.mjs.map +1 -0
- package/dist/esm/chunk-KDMSOCZY.mjs +2 -0
- package/dist/esm/chunk-KDMSOCZY.mjs.map +1 -0
- package/dist/esm/chunk-KPJGWDSQ.mjs +7 -0
- package/dist/esm/chunk-KPJGWDSQ.mjs.map +1 -0
- package/dist/esm/chunk-MEWW7VTQ.mjs +2 -0
- package/dist/esm/chunk-MEWW7VTQ.mjs.map +1 -0
- package/dist/esm/chunk-NECL5FCQ.mjs +1 -0
- package/dist/esm/chunk-NECL5FCQ.mjs.map +1 -0
- package/dist/esm/chunk-NMFJJOGW.mjs +2 -0
- package/dist/esm/chunk-NMFJJOGW.mjs.map +1 -0
- package/dist/esm/chunk-NQUZ4UHR.mjs +2 -0
- package/dist/esm/chunk-NQUZ4UHR.mjs.map +1 -0
- package/dist/esm/chunk-NUB6KE73.mjs +2 -0
- package/dist/esm/chunk-NUB6KE73.mjs.map +1 -0
- package/dist/esm/chunk-OOOAVIMQ.mjs +2 -0
- package/dist/esm/chunk-OOOAVIMQ.mjs.map +1 -0
- package/dist/esm/chunk-PCESRJYO.mjs +2 -0
- package/dist/esm/chunk-PCESRJYO.mjs.map +1 -0
- package/dist/esm/chunk-PHRRBT44.mjs +2 -0
- package/dist/esm/chunk-PHRRBT44.mjs.map +1 -0
- package/dist/esm/chunk-PZ233FIY.mjs +2 -0
- package/dist/esm/chunk-PZ233FIY.mjs.map +1 -0
- package/dist/esm/chunk-R2G23RIY.mjs +2 -0
- package/dist/esm/chunk-R2G23RIY.mjs.map +1 -0
- package/dist/esm/chunk-RL4YPMN4.mjs +2 -0
- package/dist/esm/chunk-RL4YPMN4.mjs.map +1 -0
- package/dist/esm/chunk-RUIFVDWM.mjs +2 -0
- package/dist/esm/chunk-RUIFVDWM.mjs.map +1 -0
- package/dist/esm/chunk-RXHPS4IU.mjs +2 -0
- package/dist/esm/chunk-RXHPS4IU.mjs.map +1 -0
- package/dist/esm/chunk-S4D2KBYN.mjs +2 -0
- package/dist/esm/chunk-S4D2KBYN.mjs.map +1 -0
- package/dist/esm/chunk-SRXFRTHK.mjs +2 -0
- package/dist/esm/chunk-SRXFRTHK.mjs.map +1 -0
- package/dist/esm/chunk-SYXDZA4K.mjs +2 -0
- package/dist/esm/chunk-SYXDZA4K.mjs.map +1 -0
- package/dist/esm/chunk-UI4OF6CP.mjs +2 -0
- package/dist/esm/chunk-UI4OF6CP.mjs.map +1 -0
- package/dist/esm/chunk-UL777LTI.mjs +494 -0
- package/dist/esm/chunk-UL777LTI.mjs.map +1 -0
- package/dist/esm/chunk-UVP74ONT.mjs +2 -0
- package/dist/esm/chunk-UVP74ONT.mjs.map +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs +1 -0
- package/dist/esm/chunk-UYVPNUH3.mjs.map +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs +1 -0
- package/dist/esm/chunk-V3MBJJTL.mjs.map +1 -0
- package/dist/esm/chunk-V3O2SBO4.mjs +2 -0
- package/dist/esm/chunk-V3O2SBO4.mjs.map +1 -0
- package/dist/esm/chunk-VEZCMPUG.mjs +2 -0
- package/dist/esm/chunk-VEZCMPUG.mjs.map +1 -0
- package/dist/esm/chunk-VW3WBAAD.mjs +2 -0
- package/dist/esm/chunk-VW3WBAAD.mjs.map +1 -0
- package/dist/esm/chunk-WFAH73WN.mjs +2 -0
- package/dist/esm/chunk-WFAH73WN.mjs.map +1 -0
- package/dist/esm/chunk-WVDICMU4.mjs +2 -0
- package/dist/esm/chunk-WVDICMU4.mjs.map +1 -0
- package/dist/esm/chunk-XCURF77K.mjs +2 -0
- package/dist/esm/chunk-XCURF77K.mjs.map +1 -0
- package/dist/esm/chunk-Y6YW4BAZ.mjs +2 -0
- package/dist/esm/chunk-Y6YW4BAZ.mjs.map +1 -0
- package/dist/esm/chunk-YFFYA5U3.mjs +2 -0
- package/dist/esm/chunk-YFFYA5U3.mjs.map +1 -0
- package/dist/esm/chunk-YOHEYPDP.mjs +2 -0
- package/dist/esm/chunk-YOHEYPDP.mjs.map +1 -0
- package/dist/esm/chunk-ZP4DWSQA.mjs +2 -0
- package/dist/esm/chunk-ZP4DWSQA.mjs.map +1 -0
- package/dist/esm/cli/index.d.mts +10 -0
- package/dist/esm/cli/index.mjs +2 -0
- package/dist/esm/cli/index.mjs.map +1 -0
- package/dist/esm/cli/localNode.d.mts +67 -0
- package/dist/esm/cli/localNode.mjs +2 -0
- package/dist/esm/cli/localNode.mjs.map +1 -0
- package/dist/esm/cli/move.d.mts +257 -0
- package/dist/esm/cli/move.mjs +2 -0
- package/dist/esm/cli/move.mjs.map +1 -0
- package/dist/esm/client/core.d.mts +42 -0
- package/dist/esm/client/core.mjs +2 -0
- package/dist/esm/client/core.mjs.map +1 -0
- package/dist/esm/client/get.d.mts +125 -0
- package/dist/esm/client/get.mjs +2 -0
- package/dist/esm/client/get.mjs.map +1 -0
- package/dist/esm/client/index.d.mts +10 -0
- package/dist/esm/client/index.mjs +2 -0
- package/dist/esm/client/index.mjs.map +1 -0
- package/dist/esm/client/post.d.mts +158 -0
- package/dist/esm/client/post.mjs +2 -0
- package/dist/esm/client/post.mjs.map +1 -0
- package/dist/esm/core/account/index.d.mts +8 -0
- package/dist/esm/core/account/index.mjs +2 -0
- package/dist/esm/core/account/index.mjs.map +1 -0
- package/dist/esm/core/account/utils/address.d.mts +55 -0
- package/dist/esm/core/account/utils/address.mjs +2 -0
- package/dist/esm/core/account/utils/address.mjs.map +1 -0
- package/dist/esm/core/account/utils/index.d.mts +8 -0
- package/dist/esm/core/account/utils/index.mjs +2 -0
- package/dist/esm/core/account/utils/index.mjs.map +1 -0
- package/dist/esm/core/accountAddress.d.mts +7 -0
- package/dist/esm/core/accountAddress.mjs +2 -0
- package/dist/esm/core/accountAddress.mjs.map +1 -0
- package/dist/esm/core/authenticationKey.d.mts +7 -0
- package/dist/esm/core/authenticationKey.mjs +2 -0
- package/dist/esm/core/authenticationKey.mjs.map +1 -0
- package/dist/esm/core/common.d.mts +52 -0
- package/dist/esm/core/common.mjs +2 -0
- package/dist/esm/core/common.mjs.map +1 -0
- package/dist/esm/core/crypto/abstraction.d.mts +24 -0
- package/dist/esm/core/crypto/abstraction.mjs +2 -0
- package/dist/esm/core/crypto/abstraction.mjs.map +1 -0
- package/dist/esm/core/crypto/deserializationUtils.d.mts +28 -0
- package/dist/esm/core/crypto/deserializationUtils.mjs +2 -0
- package/dist/esm/core/crypto/deserializationUtils.mjs.map +1 -0
- package/dist/esm/core/crypto/ed25519.d.mts +7 -0
- package/dist/esm/core/crypto/ed25519.mjs +2 -0
- package/dist/esm/core/crypto/ed25519.mjs.map +1 -0
- package/dist/esm/core/crypto/ephemeral.d.mts +116 -0
- package/dist/esm/core/crypto/ephemeral.mjs +2 -0
- package/dist/esm/core/crypto/ephemeral.mjs.map +1 -0
- package/dist/esm/core/crypto/federatedKeyless.d.mts +13 -0
- package/dist/esm/core/crypto/federatedKeyless.mjs +2 -0
- package/dist/esm/core/crypto/federatedKeyless.mjs.map +1 -0
- package/dist/esm/core/crypto/hdKey.d.mts +95 -0
- package/dist/esm/core/crypto/hdKey.mjs +2 -0
- package/dist/esm/core/crypto/hdKey.mjs.map +1 -0
- package/dist/esm/core/crypto/index.d.mts +19 -0
- package/dist/esm/core/crypto/index.mjs +2 -0
- package/dist/esm/core/crypto/index.mjs.map +1 -0
- package/dist/esm/core/crypto/keyless.d.mts +13 -0
- package/dist/esm/core/crypto/keyless.mjs +2 -0
- package/dist/esm/core/crypto/keyless.mjs.map +1 -0
- package/dist/esm/core/crypto/multiEd25519.d.mts +7 -0
- package/dist/esm/core/crypto/multiEd25519.mjs +2 -0
- package/dist/esm/core/crypto/multiEd25519.mjs.map +1 -0
- package/dist/esm/core/crypto/multiKey.d.mts +7 -0
- package/dist/esm/core/crypto/multiKey.mjs +2 -0
- package/dist/esm/core/crypto/multiKey.mjs.map +1 -0
- package/dist/esm/core/crypto/poseidon.d.mts +59 -0
- package/dist/esm/core/crypto/poseidon.mjs +2 -0
- package/dist/esm/core/crypto/poseidon.mjs.map +1 -0
- package/dist/esm/core/crypto/privateKey.d.mts +7 -0
- package/dist/esm/core/crypto/privateKey.mjs +2 -0
- package/dist/esm/core/crypto/privateKey.mjs.map +1 -0
- package/dist/esm/core/crypto/proof.d.mts +18 -0
- package/dist/esm/core/crypto/proof.mjs +2 -0
- package/dist/esm/core/crypto/proof.mjs.map +1 -0
- package/dist/esm/core/crypto/publicKey.d.mts +7 -0
- package/dist/esm/core/crypto/publicKey.mjs +2 -0
- package/dist/esm/core/crypto/publicKey.mjs.map +1 -0
- package/dist/esm/core/crypto/secp256k1.d.mts +7 -0
- package/dist/esm/core/crypto/secp256k1.mjs +2 -0
- package/dist/esm/core/crypto/secp256k1.mjs.map +1 -0
- package/dist/esm/core/crypto/secp256r1.d.mts +306 -0
- package/dist/esm/core/crypto/secp256r1.mjs +2 -0
- package/dist/esm/core/crypto/secp256r1.mjs.map +1 -0
- package/dist/esm/core/crypto/signature.d.mts +7 -0
- package/dist/esm/core/crypto/signature.mjs +2 -0
- package/dist/esm/core/crypto/signature.mjs.map +1 -0
- package/dist/esm/core/crypto/singleKey.d.mts +7 -0
- package/dist/esm/core/crypto/singleKey.mjs +2 -0
- package/dist/esm/core/crypto/singleKey.mjs.map +1 -0
- package/dist/esm/core/crypto/types.d.mts +11 -0
- package/dist/esm/core/crypto/types.mjs +2 -0
- package/dist/esm/core/crypto/types.mjs.map +1 -0
- package/dist/esm/core/crypto/utils.d.mts +23 -0
- package/dist/esm/core/crypto/utils.mjs +2 -0
- package/dist/esm/core/crypto/utils.mjs.map +1 -0
- package/dist/esm/core/hex.d.mts +7 -0
- package/dist/esm/core/hex.mjs +2 -0
- package/dist/esm/core/hex.mjs.map +1 -0
- package/dist/esm/core/index.d.mts +20 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/index.mjs.map +1 -0
- package/dist/esm/errors/index.d.mts +131 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/errors/index.mjs.map +1 -0
- package/dist/esm/federatedKeyless-D-d9d5aC.d.mts +869 -0
- package/dist/esm/index.d.mts +71 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/internal/abstraction.d.mts +27 -0
- package/dist/esm/internal/abstraction.mjs +2 -0
- package/dist/esm/internal/abstraction.mjs.map +1 -0
- package/dist/esm/internal/account.d.mts +453 -0
- package/dist/esm/internal/account.mjs +2 -0
- package/dist/esm/internal/account.mjs.map +1 -0
- package/dist/esm/internal/ans.d.mts +365 -0
- package/dist/esm/internal/ans.mjs +2 -0
- package/dist/esm/internal/ans.mjs.map +1 -0
- package/dist/esm/internal/coin.d.mts +31 -0
- package/dist/esm/internal/coin.mjs +2 -0
- package/dist/esm/internal/coin.mjs.map +1 -0
- package/dist/esm/internal/digitalAsset.d.mts +580 -0
- package/dist/esm/internal/digitalAsset.mjs +2 -0
- package/dist/esm/internal/digitalAsset.mjs.map +1 -0
- package/dist/esm/internal/faucet.d.mts +39 -0
- package/dist/esm/internal/faucet.mjs +2 -0
- package/dist/esm/internal/faucet.mjs.map +1 -0
- package/dist/esm/internal/fungibleAsset.d.mts +112 -0
- package/dist/esm/internal/fungibleAsset.mjs +2 -0
- package/dist/esm/internal/fungibleAsset.mjs.map +1 -0
- package/dist/esm/internal/general.d.mts +92 -0
- package/dist/esm/internal/general.mjs +2 -0
- package/dist/esm/internal/general.mjs.map +1 -0
- package/dist/esm/internal/keyless.d.mts +111 -0
- package/dist/esm/internal/keyless.mjs +2 -0
- package/dist/esm/internal/keyless.mjs.map +1 -0
- package/dist/esm/internal/object.d.mts +42 -0
- package/dist/esm/internal/object.mjs +2 -0
- package/dist/esm/internal/object.mjs.map +1 -0
- package/dist/esm/internal/staking.d.mts +60 -0
- package/dist/esm/internal/staking.mjs +2 -0
- package/dist/esm/internal/staking.mjs.map +1 -0
- package/dist/esm/internal/table.d.mts +66 -0
- package/dist/esm/internal/table.mjs +2 -0
- package/dist/esm/internal/table.mjs.map +1 -0
- package/dist/esm/internal/transaction.d.mts +199 -0
- package/dist/esm/internal/transaction.mjs +2 -0
- package/dist/esm/internal/transaction.mjs.map +1 -0
- package/dist/esm/internal/transactionSubmission.d.mts +165 -0
- package/dist/esm/internal/transactionSubmission.mjs +2 -0
- package/dist/esm/internal/transactionSubmission.mjs.map +1 -0
- package/dist/esm/internal/utils/index.d.mts +8 -0
- package/dist/esm/internal/utils/index.mjs +2 -0
- package/dist/esm/internal/utils/index.mjs.map +1 -0
- package/dist/esm/internal/utils/utils.d.mts +41 -0
- package/dist/esm/internal/utils/utils.mjs +2 -0
- package/dist/esm/internal/utils/utils.mjs.map +1 -0
- package/dist/esm/internal/view.d.mts +20 -0
- package/dist/esm/internal/view.mjs +2 -0
- package/dist/esm/internal/view.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/account.d.mts +7 -0
- package/dist/esm/transactions/authenticator/account.mjs +2 -0
- package/dist/esm/transactions/authenticator/account.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/index.d.mts +8 -0
- package/dist/esm/transactions/authenticator/index.mjs +2 -0
- package/dist/esm/transactions/authenticator/index.mjs.map +1 -0
- package/dist/esm/transactions/authenticator/transaction.d.mts +152 -0
- package/dist/esm/transactions/authenticator/transaction.mjs +2 -0
- package/dist/esm/transactions/authenticator/transaction.mjs.map +1 -0
- package/dist/esm/transactions/index.d.mts +15 -0
- package/dist/esm/transactions/index.mjs +2 -0
- package/dist/esm/transactions/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/chainId.d.mts +7 -0
- package/dist/esm/transactions/instances/chainId.mjs +2 -0
- package/dist/esm/transactions/instances/chainId.mjs.map +1 -0
- package/dist/esm/transactions/instances/identifier.d.mts +7 -0
- package/dist/esm/transactions/instances/identifier.mjs +2 -0
- package/dist/esm/transactions/instances/identifier.mjs.map +1 -0
- package/dist/esm/transactions/instances/index.d.mts +10 -0
- package/dist/esm/transactions/instances/index.mjs +2 -0
- package/dist/esm/transactions/instances/index.mjs.map +1 -0
- package/dist/esm/transactions/instances/moduleId.d.mts +7 -0
- package/dist/esm/transactions/instances/moduleId.mjs +2 -0
- package/dist/esm/transactions/instances/moduleId.mjs.map +1 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +7 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/rawTransaction.d.mts +7 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/rawTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +58 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +2 -0
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs.map +1 -0
- package/dist/esm/transactions/instances/signedTransaction.d.mts +59 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/signedTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/simpleTransaction.d.mts +7 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs +2 -0
- package/dist/esm/transactions/instances/simpleTransaction.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionArgument.d.mts +7 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs +2 -0
- package/dist/esm/transactions/instances/transactionArgument.mjs.map +1 -0
- package/dist/esm/transactions/instances/transactionPayload.d.mts +7 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs +2 -0
- package/dist/esm/transactions/instances/transactionPayload.mjs.map +1 -0
- package/dist/esm/transactions/management/accountSequenceNumber.d.mts +123 -0
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +2 -0
- package/dist/esm/transactions/management/accountSequenceNumber.mjs.map +1 -0
- package/dist/esm/transactions/management/asyncQueue.d.mts +77 -0
- package/dist/esm/transactions/management/asyncQueue.mjs +2 -0
- package/dist/esm/transactions/management/asyncQueue.mjs.map +1 -0
- package/dist/esm/transactions/management/index.d.mts +12 -0
- package/dist/esm/transactions/management/index.mjs +2 -0
- package/dist/esm/transactions/management/index.mjs.map +1 -0
- package/dist/esm/transactions/management/transactionWorker.d.mts +210 -0
- package/dist/esm/transactions/management/transactionWorker.mjs +2 -0
- package/dist/esm/transactions/management/transactionWorker.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/helpers.d.mts +159 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/helpers.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/index.d.mts +11 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/index.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +104 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +62 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +192 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +2 -0
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/index.d.mts +7 -0
- package/dist/esm/transactions/typeTag/index.mjs +2 -0
- package/dist/esm/transactions/typeTag/index.mjs.map +1 -0
- package/dist/esm/transactions/typeTag/parser.d.mts +81 -0
- package/dist/esm/transactions/typeTag/parser.mjs +2 -0
- package/dist/esm/transactions/typeTag/parser.mjs.map +1 -0
- package/dist/esm/transactions/types.d.mts +7 -0
- package/dist/esm/transactions/types.mjs +2 -0
- package/dist/esm/transactions/types.mjs.map +1 -0
- package/dist/esm/types/abstraction.d.mts +15 -0
- package/dist/esm/types/abstraction.mjs +2 -0
- package/dist/esm/types/abstraction.mjs.map +1 -0
- package/dist/esm/types/generated/operations.d.mts +709 -0
- package/dist/esm/types/generated/operations.mjs +1 -0
- package/dist/esm/types/generated/operations.mjs.map +1 -0
- package/dist/esm/types/generated/queries.d.mts +66 -0
- package/dist/esm/types/generated/queries.mjs +2 -0
- package/dist/esm/types/generated/queries.mjs.map +1 -0
- package/dist/esm/types/generated/types.d.mts +9495 -0
- package/dist/esm/types/generated/types.mjs +2 -0
- package/dist/esm/types/generated/types.mjs.map +1 -0
- package/dist/esm/types/index.d.mts +7 -0
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/indexer.d.mts +186 -0
- package/dist/esm/types/indexer.mjs +2 -0
- package/dist/esm/types/indexer.mjs.map +1 -0
- package/dist/esm/types/keyless.d.mts +102 -0
- package/dist/esm/types/keyless.mjs +1 -0
- package/dist/esm/types/keyless.mjs.map +1 -0
- package/dist/esm/types/types.d.mts +7 -0
- package/dist/esm/types/types.mjs +2 -0
- package/dist/esm/types/types.mjs.map +1 -0
- package/dist/esm/utils/apiEndpoints.d.mts +51 -0
- package/dist/esm/utils/apiEndpoints.mjs +2 -0
- package/dist/esm/utils/apiEndpoints.mjs.map +1 -0
- package/dist/esm/utils/const.d.mts +90 -0
- package/dist/esm/utils/const.mjs +2 -0
- package/dist/esm/utils/const.mjs.map +1 -0
- package/dist/esm/utils/helpers.d.mts +174 -0
- package/dist/esm/utils/helpers.mjs +2 -0
- package/dist/esm/utils/helpers.mjs.map +1 -0
- package/dist/esm/utils/index.d.mts +9 -0
- package/dist/esm/utils/index.mjs +2 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/dist/esm/utils/memoize.d.mts +26 -0
- package/dist/esm/utils/memoize.mjs +2 -0
- package/dist/esm/utils/memoize.mjs.map +1 -0
- package/dist/esm/utils/normalizeBundle.d.mts +35 -0
- package/dist/esm/utils/normalizeBundle.mjs +2 -0
- package/dist/esm/utils/normalizeBundle.mjs.map +1 -0
- package/dist/esm/version.d.mts +8 -0
- package/dist/esm/version.mjs +2 -0
- package/dist/esm/version.mjs.map +1 -0
- package/package.json +98 -0
- package/src/account/AbstractKeylessAccount.ts +579 -0
- package/src/account/AbstractedAccount.ts +124 -0
- package/src/account/Account.ts +354 -0
- package/src/account/AccountUtils.ts +216 -0
- package/src/account/DerivableAbstractedAccount.ts +103 -0
- package/src/account/Ed25519Account.ts +210 -0
- package/src/account/EphemeralKeyPair.ts +222 -0
- package/src/account/FederatedKeylessAccount.ts +178 -0
- package/src/account/KeylessAccount.ts +179 -0
- package/src/account/MultiEd25519Account.ts +181 -0
- package/src/account/MultiKeyAccount.ts +296 -0
- package/src/account/SingleKeyAccount.ts +277 -0
- package/src/account/index.ts +12 -0
- package/src/account/utils.ts +16 -0
- package/src/api/account/abstraction.ts +239 -0
- package/src/api/account.ts +1128 -0
- package/src/api/ans.ts +550 -0
- package/src/api/coin.ts +83 -0
- package/src/api/digitalAsset.ts +1203 -0
- package/src/api/faucet.ts +94 -0
- package/src/api/fungibleAsset.ts +371 -0
- package/src/api/general.ts +351 -0
- package/src/api/index.ts +6 -0
- package/src/api/keyless.ts +227 -0
- package/src/api/movement.ts +171 -0
- package/src/api/movementConfig.ts +334 -0
- package/src/api/object.ts +90 -0
- package/src/api/staking.ts +161 -0
- package/src/api/table.ts +193 -0
- package/src/api/transaction.ts +784 -0
- package/src/api/transactionSubmission/build.ts +153 -0
- package/src/api/transactionSubmission/helpers.ts +112 -0
- package/src/api/transactionSubmission/management.ts +211 -0
- package/src/api/transactionSubmission/sign.ts +142 -0
- package/src/api/transactionSubmission/simulate.ts +192 -0
- package/src/api/transactionSubmission/submit.ts +156 -0
- package/src/api/utils.ts +48 -0
- package/src/bcs/consts.ts +28 -0
- package/src/bcs/deserializer.ts +550 -0
- package/src/bcs/index.ts +10 -0
- package/src/bcs/serializable/entryFunctionBytes.ts +92 -0
- package/src/bcs/serializable/fixedBytes.ts +107 -0
- package/src/bcs/serializable/movePrimitives.ts +564 -0
- package/src/bcs/serializable/moveStructs.ts +619 -0
- package/src/bcs/serializer.ts +641 -0
- package/src/cli/index.ts +2 -0
- package/src/cli/localNode.ts +169 -0
- package/src/cli/move.ts +474 -0
- package/src/client/core.ts +120 -0
- package/src/client/get.ts +262 -0
- package/src/client/index.ts +7 -0
- package/src/client/post.ts +245 -0
- package/src/core/account/index.ts +1 -0
- package/src/core/account/utils/address.ts +85 -0
- package/src/core/account/utils/index.ts +1 -0
- package/src/core/accountAddress.ts +524 -0
- package/src/core/authenticationKey.ts +157 -0
- package/src/core/common.ts +60 -0
- package/src/core/crypto/abstraction.ts +52 -0
- package/src/core/crypto/deserializationUtils.ts +106 -0
- package/src/core/crypto/ed25519.ts +493 -0
- package/src/core/crypto/ephemeral.ts +185 -0
- package/src/core/crypto/federatedKeyless.ts +169 -0
- package/src/core/crypto/hdKey.ts +136 -0
- package/src/core/crypto/index.ts +21 -0
- package/src/core/crypto/keyless.ts +1700 -0
- package/src/core/crypto/multiEd25519.ts +434 -0
- package/src/core/crypto/multiKey.ts +498 -0
- package/src/core/crypto/poseidon.ts +231 -0
- package/src/core/crypto/privateKey.ts +115 -0
- package/src/core/crypto/proof.ts +9 -0
- package/src/core/crypto/publicKey.ts +106 -0
- package/src/core/crypto/secp256k1.ts +451 -0
- package/src/core/crypto/secp256r1.ts +495 -0
- package/src/core/crypto/signature.ts +57 -0
- package/src/core/crypto/singleKey.ts +351 -0
- package/src/core/crypto/types.ts +9 -0
- package/src/core/crypto/utils.ts +63 -0
- package/src/core/hex.ts +241 -0
- package/src/core/index.ts +10 -0
- package/src/errors/index.ts +457 -0
- package/src/index.ts +14 -0
- package/src/internal/abstraction.ts +79 -0
- package/src/internal/account.ts +1484 -0
- package/src/internal/ans.ts +853 -0
- package/src/internal/coin.ts +49 -0
- package/src/internal/digitalAsset.ts +1291 -0
- package/src/internal/faucet.ts +71 -0
- package/src/internal/fungibleAsset.ts +233 -0
- package/src/internal/general.ts +161 -0
- package/src/internal/keyless.ts +297 -0
- package/src/internal/object.ts +68 -0
- package/src/internal/queries/TokenActivitiesFieldsFragment.graphql +17 -0
- package/src/internal/queries/ansTokenFragment.graphql +11 -0
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +46 -0
- package/src/internal/queries/getAccountAddressesForAuthKey.graphql +8 -0
- package/src/internal/queries/getAccountCoinCount.graphql +7 -0
- package/src/internal/queries/getAccountCoinsData.graphql +32 -0
- package/src/internal/queries/getAccountCollectionsWithOwnedTokens.graphql +33 -0
- package/src/internal/queries/getAccountOwnedTokens.graphql +11 -0
- package/src/internal/queries/getAccountOwnedTokensByTokenData.graphql +11 -0
- package/src/internal/queries/getAccountOwnedTokensFromCollectionAddress.graphql +11 -0
- package/src/internal/queries/getAccountTokensCount.graphql +7 -0
- package/src/internal/queries/getAccountTransactionsCount.graphql +7 -0
- package/src/internal/queries/getAuthKeysForPublicKey.graphql +11 -0
- package/src/internal/queries/getChainTopUserTransactions.graphql +5 -0
- package/src/internal/queries/getCollectionData.graphql +29 -0
- package/src/internal/queries/getCurrentFungibleAssetBalances.graphql +17 -0
- package/src/internal/queries/getDelegatedStakingActivities.graphql +12 -0
- package/src/internal/queries/getEvents.graphql +13 -0
- package/src/internal/queries/getFungibleAssetActivities.graphql +20 -0
- package/src/internal/queries/getFungibleAssetMetadata.graphql +18 -0
- package/src/internal/queries/getNames.graphql +11 -0
- package/src/internal/queries/getNumberOfDelegatorsQuery.graphql +9 -0
- package/src/internal/queries/getObjectData.graphql +16 -0
- package/src/internal/queries/getProcessorStatus.graphql +7 -0
- package/src/internal/queries/getTableItemsData.graphql +15 -0
- package/src/internal/queries/getTableItemsMetadata.graphql +12 -0
- package/src/internal/queries/getTokenActivity.graphql +11 -0
- package/src/internal/queries/getTokenCurrentOwner.graphql +11 -0
- package/src/internal/queries/getTokenData.graphql +39 -0
- package/src/internal/staking.ts +96 -0
- package/src/internal/table.ts +117 -0
- package/src/internal/transaction.ts +503 -0
- package/src/internal/transactionSubmission.ts +454 -0
- package/src/internal/utils/index.ts +4 -0
- package/src/internal/utils/utils.ts +86 -0
- package/src/internal/view.ts +61 -0
- package/src/transactions/authenticator/account.ts +405 -0
- package/src/transactions/authenticator/index.ts +6 -0
- package/src/transactions/authenticator/transaction.ts +288 -0
- package/src/transactions/index.ts +10 -0
- package/src/transactions/instances/chainId.ts +53 -0
- package/src/transactions/instances/identifier.ts +54 -0
- package/src/transactions/instances/index.ts +14 -0
- package/src/transactions/instances/moduleId.ts +77 -0
- package/src/transactions/instances/multiAgentTransaction.ts +92 -0
- package/src/transactions/instances/rawTransaction.ts +256 -0
- package/src/transactions/instances/rotationProofChallenge.ts +86 -0
- package/src/transactions/instances/signedTransaction.ts +73 -0
- package/src/transactions/instances/simpleTransaction.ts +83 -0
- package/src/transactions/instances/transactionArgument.ts +79 -0
- package/src/transactions/instances/transactionPayload.ts +676 -0
- package/src/transactions/management/accountSequenceNumber.ts +226 -0
- package/src/transactions/management/asyncQueue.ts +126 -0
- package/src/transactions/management/index.ts +2 -0
- package/src/transactions/management/transactionWorker.ts +396 -0
- package/src/transactions/transactionBuilder/helpers.ts +319 -0
- package/src/transactions/transactionBuilder/index.ts +8 -0
- package/src/transactions/transactionBuilder/remoteAbi.ts +655 -0
- package/src/transactions/transactionBuilder/signingMessage.ts +111 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +863 -0
- package/src/transactions/typeTag/index.ts +926 -0
- package/src/transactions/typeTag/parser.ts +434 -0
- package/src/transactions/types.ts +518 -0
- package/src/types/abstraction.ts +14 -0
- package/src/types/codegen.yaml +33 -0
- package/src/types/generated/operations.ts +738 -0
- package/src/types/generated/queries.ts +926 -0
- package/src/types/generated/types.ts +10421 -0
- package/src/types/index.ts +2 -0
- package/src/types/indexer.ts +240 -0
- package/src/types/keyless.ts +94 -0
- package/src/types/types.ts +1713 -0
- package/src/utils/apiEndpoints.ts +107 -0
- package/src/utils/const.ts +100 -0
- package/src/utils/helpers.ts +287 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/memoize.ts +76 -0
- package/src/utils/normalizeBundle.ts +34 -0
- package/src/version.ts +9 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Account } from "./account";
|
|
5
|
+
import { AccountAbstraction } from "./account/abstraction";
|
|
6
|
+
import { ANS } from "./ans";
|
|
7
|
+
import { Coin } from "./coin";
|
|
8
|
+
import { DigitalAsset } from "./digitalAsset";
|
|
9
|
+
import { Faucet } from "./faucet";
|
|
10
|
+
import { FungibleAsset } from "./fungibleAsset";
|
|
11
|
+
import { General } from "./general";
|
|
12
|
+
import { Keyless } from "./keyless";
|
|
13
|
+
import { MovementConfig } from "./movementConfig";
|
|
14
|
+
import { MovementObject } from "./object";
|
|
15
|
+
import { Staking } from "./staking";
|
|
16
|
+
import { Table } from "./table";
|
|
17
|
+
import { Transaction } from "./transaction";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The main entry point for interacting with the Movement APIs,
|
|
21
|
+
* providing access to various functionalities organized into
|
|
22
|
+
* distinct namespaces.
|
|
23
|
+
*
|
|
24
|
+
* To utilize the SDK, instantiate a new Movement object to gain
|
|
25
|
+
* access to the complete range of SDK features.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
30
|
+
*
|
|
31
|
+
* async function runExample() {
|
|
32
|
+
* // Create a configuration for connecting to the Movement testnet
|
|
33
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
34
|
+
*
|
|
35
|
+
* // Initialize the Movement client with the configuration
|
|
36
|
+
* const movement = new Movement(config);
|
|
37
|
+
*
|
|
38
|
+
* console.log("Movement client initialized:", aptos);
|
|
39
|
+
* }
|
|
40
|
+
* runExample().catch(console.error);
|
|
41
|
+
* ```
|
|
42
|
+
* @group Client
|
|
43
|
+
*/
|
|
44
|
+
export class Movement {
|
|
45
|
+
readonly config: MovementConfig;
|
|
46
|
+
|
|
47
|
+
readonly account: Account;
|
|
48
|
+
|
|
49
|
+
readonly ans: ANS;
|
|
50
|
+
|
|
51
|
+
readonly coin: Coin;
|
|
52
|
+
|
|
53
|
+
readonly digitalAsset: DigitalAsset;
|
|
54
|
+
|
|
55
|
+
readonly faucet: Faucet;
|
|
56
|
+
|
|
57
|
+
readonly fungibleAsset: FungibleAsset;
|
|
58
|
+
|
|
59
|
+
readonly general: General;
|
|
60
|
+
|
|
61
|
+
readonly staking: Staking;
|
|
62
|
+
|
|
63
|
+
readonly transaction: Transaction;
|
|
64
|
+
|
|
65
|
+
readonly table: Table;
|
|
66
|
+
|
|
67
|
+
readonly keyless: Keyless;
|
|
68
|
+
|
|
69
|
+
readonly object: MovementObject;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Initializes a new instance of the Movement client with the provided configuration settings.
|
|
73
|
+
* This allows you to interact with various Movement functionalities such as accounts, transactions, and events.
|
|
74
|
+
*
|
|
75
|
+
* @param settings - Configuration settings for the Movement client.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
80
|
+
*
|
|
81
|
+
* async function runExample() {
|
|
82
|
+
* // Create a new Movement client with default settings
|
|
83
|
+
* const config = new MovementConfig({ network: Network.TESTNET }); // Specify your own settings if needed
|
|
84
|
+
* const movement = new Movement(config);
|
|
85
|
+
*
|
|
86
|
+
* console.log("Movement client initialized:", aptos);
|
|
87
|
+
* }
|
|
88
|
+
* runExample().catch(console.error);
|
|
89
|
+
* ```
|
|
90
|
+
* @group Client
|
|
91
|
+
*/
|
|
92
|
+
constructor(config?: MovementConfig) {
|
|
93
|
+
this.config = config ?? new MovementConfig();
|
|
94
|
+
this.account = new Account(this.config);
|
|
95
|
+
this.abstraction = new AccountAbstraction(this.config);
|
|
96
|
+
this.ans = new ANS(this.config);
|
|
97
|
+
this.coin = new Coin(this.config);
|
|
98
|
+
this.digitalAsset = new DigitalAsset(this.config);
|
|
99
|
+
this.faucet = new Faucet(this.config);
|
|
100
|
+
this.fungibleAsset = new FungibleAsset(this.config);
|
|
101
|
+
this.general = new General(this.config);
|
|
102
|
+
this.staking = new Staking(this.config);
|
|
103
|
+
this.transaction = new Transaction(this.config);
|
|
104
|
+
this.table = new Table(this.config);
|
|
105
|
+
this.keyless = new Keyless(this.config);
|
|
106
|
+
this.object = new MovementObject(this.config);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
setIgnoreTransactionSubmitter(ignore: boolean) {
|
|
110
|
+
this.config.setIgnoreTransactionSubmitter(ignore);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// extends Movement interface so all the methods and properties
|
|
115
|
+
// from the other classes will be recognized by typescript.
|
|
116
|
+
export interface Movement
|
|
117
|
+
extends Account,
|
|
118
|
+
ANS,
|
|
119
|
+
Coin,
|
|
120
|
+
DigitalAsset,
|
|
121
|
+
Event,
|
|
122
|
+
Faucet,
|
|
123
|
+
FungibleAsset,
|
|
124
|
+
General,
|
|
125
|
+
Keyless,
|
|
126
|
+
Staking,
|
|
127
|
+
Table,
|
|
128
|
+
MovementObject,
|
|
129
|
+
Omit<Transaction, "build" | "simulate" | "submit" | "batch"> { }
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
In TypeScript, we can’t inherit or extend from more than one class,
|
|
133
|
+
Mixins helps us to get around that by creating a partial classes
|
|
134
|
+
that we can combine to form a single class that contains all the methods and properties from the partial classes.
|
|
135
|
+
{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}
|
|
136
|
+
|
|
137
|
+
Here, we combine any subclass and the Movement class.
|
|
138
|
+
* @group Client
|
|
139
|
+
*/
|
|
140
|
+
function applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {
|
|
141
|
+
// Mixin instance methods
|
|
142
|
+
Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {
|
|
143
|
+
const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);
|
|
144
|
+
if (!propertyDescriptor) return;
|
|
145
|
+
|
|
146
|
+
// Define new method that calls through baseClassProp
|
|
147
|
+
Object.defineProperty(targetClass.prototype, propertyName, {
|
|
148
|
+
value: function (...args: any[]) {
|
|
149
|
+
return (this as any)[baseClassProp][propertyName](...args);
|
|
150
|
+
},
|
|
151
|
+
writable: propertyDescriptor.writable,
|
|
152
|
+
configurable: propertyDescriptor.configurable,
|
|
153
|
+
enumerable: propertyDescriptor.enumerable,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
applyMixin(Movement, Account, "account");
|
|
159
|
+
applyMixin(Movement, AccountAbstraction, "abstraction");
|
|
160
|
+
applyMixin(Movement, ANS, "ans");
|
|
161
|
+
applyMixin(Movement, Coin, "coin");
|
|
162
|
+
applyMixin(Movement, DigitalAsset, "digitalAsset");
|
|
163
|
+
applyMixin(Movement, Event, "event");
|
|
164
|
+
applyMixin(Movement, Faucet, "faucet");
|
|
165
|
+
applyMixin(Movement, FungibleAsset, "fungibleAsset");
|
|
166
|
+
applyMixin(Movement, General, "general");
|
|
167
|
+
applyMixin(Movement, Staking, "staking");
|
|
168
|
+
applyMixin(Movement, Transaction, "transaction");
|
|
169
|
+
applyMixin(Movement, Table, "table");
|
|
170
|
+
applyMixin(Movement, Keyless, "keyless");
|
|
171
|
+
applyMixin(Movement, MovementObject, "object");
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import movementClient from "@moveindustries/movement-client";
|
|
5
|
+
import {
|
|
6
|
+
Client,
|
|
7
|
+
ClientConfig,
|
|
8
|
+
FaucetConfig,
|
|
9
|
+
FullNodeConfig,
|
|
10
|
+
IndexerConfig,
|
|
11
|
+
MovementSettings,
|
|
12
|
+
PluginConfig,
|
|
13
|
+
TransactionGenerationConfig,
|
|
14
|
+
TransactionSubmitter,
|
|
15
|
+
} from "../types";
|
|
16
|
+
import {
|
|
17
|
+
Network,
|
|
18
|
+
NetworkToFaucetAPI,
|
|
19
|
+
NetworkToIndexerAPI,
|
|
20
|
+
NetworkToNodeAPI,
|
|
21
|
+
NetworkToPepperAPI,
|
|
22
|
+
NetworkToProverAPI,
|
|
23
|
+
} from "../utils/apiEndpoints";
|
|
24
|
+
import { DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, MovementApiType } from "../utils/const";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents the configuration settings for an Movement SDK client instance.
|
|
28
|
+
* This class allows customization of various endpoints and client settings.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
33
|
+
*
|
|
34
|
+
* async function runExample() {
|
|
35
|
+
* // Create a configuration for connecting to the Movement testnet
|
|
36
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
37
|
+
*
|
|
38
|
+
* // Initialize the Movement client with the configuration
|
|
39
|
+
* const movement = new Movement(config);
|
|
40
|
+
*
|
|
41
|
+
* console.log("Movement client initialized:", aptos);
|
|
42
|
+
* }
|
|
43
|
+
* runExample().catch(console.error);
|
|
44
|
+
* ```
|
|
45
|
+
* @group Client
|
|
46
|
+
*/
|
|
47
|
+
export class MovementConfig {
|
|
48
|
+
/**
|
|
49
|
+
* The Network that this SDK is associated with. Defaults to DEVNET
|
|
50
|
+
* @group Client
|
|
51
|
+
*/
|
|
52
|
+
readonly network: Network;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The client instance the SDK uses. Defaults to `@moveindustries/movement-client
|
|
56
|
+
* @group Client
|
|
57
|
+
*/
|
|
58
|
+
readonly client: Client;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The optional hardcoded fullnode URL to send requests to instead of using the network
|
|
62
|
+
* @group Client
|
|
63
|
+
*/
|
|
64
|
+
readonly fullnode?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The optional hardcoded faucet URL to send requests to instead of using the network
|
|
68
|
+
* @group Client
|
|
69
|
+
*/
|
|
70
|
+
readonly faucet?: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The optional hardcoded pepper service URL to send requests to instead of using the network
|
|
74
|
+
* @group Client
|
|
75
|
+
*/
|
|
76
|
+
readonly pepper?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The optional hardcoded prover service URL to send requests to instead of using the network
|
|
80
|
+
* @group Client
|
|
81
|
+
*/
|
|
82
|
+
readonly prover?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The optional hardcoded indexer URL to send requests to instead of using the network
|
|
86
|
+
* @group Client
|
|
87
|
+
*/
|
|
88
|
+
readonly indexer?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Optional client configurations
|
|
92
|
+
* @group Client
|
|
93
|
+
*/
|
|
94
|
+
readonly clientConfig?: ClientConfig;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Optional specific Fullnode configurations
|
|
98
|
+
* @group Client
|
|
99
|
+
*/
|
|
100
|
+
readonly fullnodeConfig?: FullNodeConfig;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Optional specific Indexer configurations
|
|
104
|
+
* @group Client
|
|
105
|
+
*/
|
|
106
|
+
readonly indexerConfig?: IndexerConfig;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Optional specific Faucet configurations
|
|
110
|
+
* @group Client
|
|
111
|
+
*/
|
|
112
|
+
readonly faucetConfig?: FaucetConfig;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Optional specific Transaction Generation configurations
|
|
116
|
+
* @group Client
|
|
117
|
+
*/
|
|
118
|
+
readonly transactionGenerationConfig?: TransactionGenerationConfig;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Optional plugin config to override client behavior.
|
|
122
|
+
* @group Client
|
|
123
|
+
*/
|
|
124
|
+
private pluginConfig?: PluginConfig;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Initializes an instance of the Movement client with the specified settings.
|
|
128
|
+
* This allows users to configure various aspects of the client, such as network and endpoints.
|
|
129
|
+
*
|
|
130
|
+
* @param settings - Optional configuration settings for the Movement client.
|
|
131
|
+
* @param settings.network - The network to connect to, defaults to `Network.DEVNET`.
|
|
132
|
+
* @param settings.fullnode - The fullnode endpoint to use for requests.
|
|
133
|
+
* @param settings.faucet - The faucet endpoint for obtaining test tokens.
|
|
134
|
+
* @param settings.pepper - The pepper used for transaction signing.
|
|
135
|
+
* @param settings.prover - The prover endpoint for transaction verification.
|
|
136
|
+
* @param settings.indexer - The indexer endpoint for querying blockchain data.
|
|
137
|
+
* @param settings.client - Custom client settings, defaults to a standard Movement client.
|
|
138
|
+
* @param settings.clientConfig - Additional configuration for the client.
|
|
139
|
+
* @param settings.fullnodeConfig - Additional configuration for the fullnode.
|
|
140
|
+
* @param settings.indexerConfig - Additional configuration for the indexer.
|
|
141
|
+
* @param settings.faucetConfig - Additional configuration for the faucet.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
146
|
+
*
|
|
147
|
+
* async function runExample() {
|
|
148
|
+
* // Create a new Movement client with default settings
|
|
149
|
+
* const config = new MovementConfig({ network: Network.TESTNET }); // Specify the network
|
|
150
|
+
* const movement = new Movement(config);
|
|
151
|
+
*
|
|
152
|
+
* console.log("Movement client initialized:", aptos);
|
|
153
|
+
* }
|
|
154
|
+
* runExample().catch(console.error);
|
|
155
|
+
* ```
|
|
156
|
+
* @group Client
|
|
157
|
+
*/
|
|
158
|
+
constructor(settings?: MovementSettings) {
|
|
159
|
+
// If there are any endpoint overrides, they are custom networks, keep that in mind
|
|
160
|
+
if (settings?.fullnode || settings?.indexer || settings?.faucet || settings?.pepper || settings?.prover) {
|
|
161
|
+
if (settings?.network === Network.CUSTOM) {
|
|
162
|
+
console.info("Note: using CUSTOM network will require queries to lookup ChainId");
|
|
163
|
+
} else if (!settings?.network) {
|
|
164
|
+
throw new Error("Custom endpoints require a network to be specified");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
this.network = settings?.network ?? Network.DEVNET;
|
|
169
|
+
this.fullnode = settings?.fullnode;
|
|
170
|
+
this.faucet = settings?.faucet;
|
|
171
|
+
this.pepper = settings?.pepper;
|
|
172
|
+
this.prover = settings?.prover;
|
|
173
|
+
this.indexer = settings?.indexer;
|
|
174
|
+
this.client = settings?.client ?? { provider: movementClient };
|
|
175
|
+
this.clientConfig = settings?.clientConfig ?? {};
|
|
176
|
+
this.fullnodeConfig = settings?.fullnodeConfig ?? {};
|
|
177
|
+
this.indexerConfig = settings?.indexerConfig ?? {};
|
|
178
|
+
this.faucetConfig = settings?.faucetConfig ?? {};
|
|
179
|
+
this.transactionGenerationConfig = settings?.transactionGenerationConfig ?? {};
|
|
180
|
+
this.pluginConfig = settings?.pluginSettings
|
|
181
|
+
? {
|
|
182
|
+
...settings.pluginSettings,
|
|
183
|
+
IGNORE_TRANSACTION_SUBMITTER: false,
|
|
184
|
+
}
|
|
185
|
+
: undefined;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Returns the URL endpoint to send the request to based on the specified API type.
|
|
190
|
+
* If a custom URL was provided in the configuration, that URL is returned. Otherwise, the URL endpoint is derived from the network.
|
|
191
|
+
*
|
|
192
|
+
* @param apiType - The type of Movement API to get the URL for. This can be one of the following: FULLNODE, FAUCET, INDEXER, PEPPER, PROVER.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* import { Movement, MovementConfig, Network, MovementApiType } from "@moveindustries/ts-sdk";
|
|
197
|
+
*
|
|
198
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
199
|
+
* const movement = new Movement(config);
|
|
200
|
+
*
|
|
201
|
+
* async function runExample() {
|
|
202
|
+
* // Getting the request URL for the FULLNODE API
|
|
203
|
+
* const url = config.getRequestUrl(MovementApiType.FULLNODE);
|
|
204
|
+
* console.log("Request URL for FULLNODE:", url);
|
|
205
|
+
* }
|
|
206
|
+
* runExample().catch(console.error);
|
|
207
|
+
* ```
|
|
208
|
+
* @group Client
|
|
209
|
+
*/
|
|
210
|
+
getRequestUrl(apiType: MovementApiType): string {
|
|
211
|
+
switch (apiType) {
|
|
212
|
+
case MovementApiType.FULLNODE:
|
|
213
|
+
if (this.fullnode !== undefined) return this.fullnode;
|
|
214
|
+
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom full node url");
|
|
215
|
+
return NetworkToNodeAPI[this.network];
|
|
216
|
+
case MovementApiType.FAUCET:
|
|
217
|
+
if (this.faucet !== undefined) return this.faucet;
|
|
218
|
+
if (this.network === Network.MAINNET) {
|
|
219
|
+
throw new Error("There is no mainnet faucet");
|
|
220
|
+
}
|
|
221
|
+
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom faucet url");
|
|
222
|
+
return NetworkToFaucetAPI[this.network];
|
|
223
|
+
case MovementApiType.INDEXER:
|
|
224
|
+
if (this.indexer !== undefined) return this.indexer;
|
|
225
|
+
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom indexer url");
|
|
226
|
+
return NetworkToIndexerAPI[this.network];
|
|
227
|
+
case MovementApiType.PEPPER:
|
|
228
|
+
if (this.pepper !== undefined) return this.pepper;
|
|
229
|
+
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom pepper service url");
|
|
230
|
+
return NetworkToPepperAPI[this.network];
|
|
231
|
+
case MovementApiType.PROVER:
|
|
232
|
+
if (this.prover !== undefined) return this.prover;
|
|
233
|
+
if (this.network === Network.CUSTOM) throw new Error("Please provide a custom prover service url");
|
|
234
|
+
return NetworkToProverAPI[this.network];
|
|
235
|
+
default:
|
|
236
|
+
throw Error(`apiType ${apiType} is not supported`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Checks if the provided URL is a known pepper service endpoint.
|
|
242
|
+
*
|
|
243
|
+
* @param url - The URL to check against the known pepper service endpoints.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
248
|
+
*
|
|
249
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
250
|
+
* const movement = new Movement(config);
|
|
251
|
+
*
|
|
252
|
+
* async function runExample() {
|
|
253
|
+
* const url = "https://example.pepper.service"; // replace with a real pepper service URL
|
|
254
|
+
*
|
|
255
|
+
* // Check if the URL is a known pepper service endpoint
|
|
256
|
+
* const isPepperService = config.isPepperServiceRequest(url);
|
|
257
|
+
*
|
|
258
|
+
* console.log(`Is the URL a known pepper service? ${isPepperService}`);
|
|
259
|
+
* }
|
|
260
|
+
* runExample().catch(console.error);
|
|
261
|
+
* ```
|
|
262
|
+
* @group Client
|
|
263
|
+
*/
|
|
264
|
+
isPepperServiceRequest(url: string): boolean {
|
|
265
|
+
return NetworkToPepperAPI[this.network] === url;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Checks if the provided URL is a known prover service endpoint.
|
|
270
|
+
*
|
|
271
|
+
* @param url - The URL to check against known prover service endpoints.
|
|
272
|
+
* @returns A boolean indicating whether the URL is a known prover service endpoint.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
277
|
+
*
|
|
278
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
279
|
+
* const movement = new Movement(config);
|
|
280
|
+
*
|
|
281
|
+
* // Check if the URL is a known prover service endpoint
|
|
282
|
+
* const url = "https://prover.testnet.movement.dev"; // replace with a real URL if needed
|
|
283
|
+
* const isProver = config.isProverServiceRequest(url);
|
|
284
|
+
*
|
|
285
|
+
* console.log(`Is the URL a known prover service? ${isProver}`);
|
|
286
|
+
* ```
|
|
287
|
+
* @group Client
|
|
288
|
+
*/
|
|
289
|
+
isProverServiceRequest(url: string): boolean {
|
|
290
|
+
return NetworkToProverAPI[this.network] === url;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
getDefaultMaxGasAmount(): number {
|
|
294
|
+
return this.transactionGenerationConfig?.defaultMaxGasAmount ?? DEFAULT_MAX_GAS_AMOUNT;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
getDefaultTxnExpirySecFromNow(): number {
|
|
298
|
+
return this.transactionGenerationConfig?.defaultTxnExpirySecFromNow ?? DEFAULT_TXN_EXP_SEC_FROM_NOW;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* If you have set a custom transaction submitter, you can use this to determine
|
|
303
|
+
* whether to use it or not. For example, to stop using the transaction submitter:
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```
|
|
307
|
+
* movement.config.setIgnoreTransactionSubmitter(true);
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* @group Client
|
|
311
|
+
*/
|
|
312
|
+
setIgnoreTransactionSubmitter(ignore: boolean) {
|
|
313
|
+
if (this.pluginConfig) {
|
|
314
|
+
this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER = ignore;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* If a custom transaction submitter has been specified in the PluginConfig and
|
|
320
|
+
* IGNORE_TRANSACTION_SUBMITTER is false, this will return a transaction submitter
|
|
321
|
+
* that should be used instead of the default transaction submission behavior.
|
|
322
|
+
*/
|
|
323
|
+
getTransactionSubmitter(): TransactionSubmitter | undefined {
|
|
324
|
+
if (this.pluginConfig === undefined) {
|
|
325
|
+
return undefined;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (this.pluginConfig.IGNORE_TRANSACTION_SUBMITTER === true) {
|
|
329
|
+
return undefined;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
return this.pluginConfig.TRANSACTION_SUBMITTER;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { AccountAddressInput } from "../core";
|
|
5
|
+
import { getObjectDataByObjectAddress } from "../internal/object";
|
|
6
|
+
import { AnyNumber, GetObjectDataQueryResponse, OrderByArg, PaginationArgs } from "../types";
|
|
7
|
+
import { ProcessorType } from "../utils";
|
|
8
|
+
import { MovementConfig } from "./movementConfig";
|
|
9
|
+
import { waitForIndexerOnVersion } from "./utils";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class to query all `Object` related queries on Movement.
|
|
13
|
+
* @group Object
|
|
14
|
+
*/
|
|
15
|
+
export class MovementObject {
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of the Movement client with the provided configuration.
|
|
18
|
+
* This allows interaction with the Movement blockchain using the specified settings.
|
|
19
|
+
*
|
|
20
|
+
* @param config - The configuration settings for the Movement client.
|
|
21
|
+
* @param config.network - The network to connect to (e.g., mainnet, testnet).
|
|
22
|
+
* @param config.nodeUrl - The URL of the Movement node to connect to.
|
|
23
|
+
* @param config.faucetUrl - The URL of the faucet for funding accounts (optional).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
28
|
+
*
|
|
29
|
+
* async function runExample() {
|
|
30
|
+
* // Create a configuration for the Movement client
|
|
31
|
+
* const config = new MovementConfig({
|
|
32
|
+
* network: Network.TESTNET, // Specify the desired network
|
|
33
|
+
* nodeUrl: "https://testnet.movement.dev", // Replace with your node URL
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* // Create an instance of the Movement client
|
|
37
|
+
* const movement = new Movement(config);
|
|
38
|
+
*
|
|
39
|
+
* console.log("Movement client created successfully", aptos);
|
|
40
|
+
* }
|
|
41
|
+
* runExample().catch(console.error);
|
|
42
|
+
* ```
|
|
43
|
+
* @group Object
|
|
44
|
+
*/
|
|
45
|
+
constructor(readonly config: MovementConfig) { }
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Fetches the object data based on the specified object address.
|
|
49
|
+
*
|
|
50
|
+
* @param args.objectAddress - The object address to retrieve data for.
|
|
51
|
+
* @param args.minimumLedgerVersion - Optional minimum ledger version to wait for.
|
|
52
|
+
* @param args.options - Optional configuration options for pagination and ordering.
|
|
53
|
+
*
|
|
54
|
+
* @returns The object data corresponding to the provided address.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { Movement, MovementConfig, Network } from "@moveindustries/ts-sdk";
|
|
59
|
+
*
|
|
60
|
+
* const config = new MovementConfig({ network: Network.TESTNET });
|
|
61
|
+
* const movement = new Movement(config);
|
|
62
|
+
*
|
|
63
|
+
* async function runExample() {
|
|
64
|
+
* // Fetching object data by object address
|
|
65
|
+
* const objectData = await movement.getObjectDataByObjectAddress({
|
|
66
|
+
* objectAddress: "0x1", // replace with a real object address
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* console.log(objectData);
|
|
70
|
+
* }
|
|
71
|
+
* runExample().catch(console.error);
|
|
72
|
+
* ```
|
|
73
|
+
* @group Object
|
|
74
|
+
*/
|
|
75
|
+
async getObjectDataByObjectAddress(args: {
|
|
76
|
+
objectAddress: AccountAddressInput;
|
|
77
|
+
minimumLedgerVersion?: AnyNumber;
|
|
78
|
+
options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;
|
|
79
|
+
}): Promise<GetObjectDataQueryResponse[0]> {
|
|
80
|
+
await waitForIndexerOnVersion({
|
|
81
|
+
config: this.config,
|
|
82
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
83
|
+
processorType: ProcessorType.OBJECT_PROCESSOR,
|
|
84
|
+
});
|
|
85
|
+
return getObjectDataByObjectAddress({
|
|
86
|
+
movementConfig: this.config,
|
|
87
|
+
...args,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|