@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,10 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
export * from "./authenticator";
|
|
5
|
+
export * from "./instances";
|
|
6
|
+
export * from "./transactionBuilder";
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export * from "./typeTag";
|
|
9
|
+
export * from "./typeTag/parser";
|
|
10
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
5
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents a ChainId that can be serialized and deserialized.
|
|
9
|
+
*
|
|
10
|
+
* @extends Serializable
|
|
11
|
+
* @group Implementation
|
|
12
|
+
* @category Transactions
|
|
13
|
+
*/
|
|
14
|
+
export class ChainId extends Serializable {
|
|
15
|
+
public readonly chainId: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Initializes a new instance of the class with the specified chain ID.
|
|
19
|
+
*
|
|
20
|
+
* @param chainId - The ID of the blockchain network to be used.
|
|
21
|
+
* @group Implementation
|
|
22
|
+
* @category Transactions
|
|
23
|
+
*/
|
|
24
|
+
constructor(chainId: number) {
|
|
25
|
+
super();
|
|
26
|
+
this.chainId = chainId;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Serializes the current object using the provided serializer.
|
|
31
|
+
* This function helps in converting the object into a format suitable for transmission or storage.
|
|
32
|
+
*
|
|
33
|
+
* @param serializer - The serializer instance used to perform the serialization.
|
|
34
|
+
* @group Implementation
|
|
35
|
+
* @category Transactions
|
|
36
|
+
*/
|
|
37
|
+
serialize(serializer: Serializer): void {
|
|
38
|
+
serializer.serializeU8(this.chainId);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Deserializes a ChainId from the provided deserializer.
|
|
43
|
+
* This function allows you to reconstruct a ChainId object from serialized data.
|
|
44
|
+
*
|
|
45
|
+
* @param deserializer - The deserializer instance used to read the serialized data.
|
|
46
|
+
* @group Implementation
|
|
47
|
+
* @category Transactions
|
|
48
|
+
*/
|
|
49
|
+
static deserialize(deserializer: Deserializer): ChainId {
|
|
50
|
+
const chainId = deserializer.deserializeU8();
|
|
51
|
+
return new ChainId(chainId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
5
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents an Identifier that can be serialized and deserialized.
|
|
9
|
+
* This class is used to denote the module "name" in "ModuleId" and
|
|
10
|
+
* the "function name" in "EntryFunction".
|
|
11
|
+
*
|
|
12
|
+
* @extends Serializable
|
|
13
|
+
* @group Implementation
|
|
14
|
+
* @category Transactions
|
|
15
|
+
*/
|
|
16
|
+
export class Identifier extends Serializable {
|
|
17
|
+
public identifier: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Creates an instance of the class with a specified identifier.
|
|
21
|
+
*
|
|
22
|
+
* @param identifier - The unique identifier for the instance.
|
|
23
|
+
* @group Implementation
|
|
24
|
+
* @category Transactions
|
|
25
|
+
*/
|
|
26
|
+
constructor(identifier: string) {
|
|
27
|
+
super();
|
|
28
|
+
this.identifier = identifier;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Serializes the identifier of the current instance using the provided serializer.
|
|
33
|
+
*
|
|
34
|
+
* @param serializer - The serializer instance used to perform the serialization.
|
|
35
|
+
* @group Implementation
|
|
36
|
+
* @category Transactions
|
|
37
|
+
*/
|
|
38
|
+
public serialize(serializer: Serializer): void {
|
|
39
|
+
serializer.serializeStr(this.identifier);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Deserializes an identifier from the provided deserializer.
|
|
44
|
+
* This function is useful for reconstructing an Identifier object from a serialized format.
|
|
45
|
+
*
|
|
46
|
+
* @param deserializer - The deserializer instance used to read the serialized data.
|
|
47
|
+
* @group Implementation
|
|
48
|
+
* @category Transactions
|
|
49
|
+
*/
|
|
50
|
+
static deserialize(deserializer: Deserializer): Identifier {
|
|
51
|
+
const identifier = deserializer.deserializeStr();
|
|
52
|
+
return new Identifier(identifier);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
export * from "./chainId";
|
|
5
|
+
export * from "./identifier";
|
|
6
|
+
export * from "./moduleId";
|
|
7
|
+
export * from "./multiAgentTransaction";
|
|
8
|
+
export * from "./rawTransaction";
|
|
9
|
+
export * from "./rotationProofChallenge";
|
|
10
|
+
export * from "./signedTransaction";
|
|
11
|
+
export * from "./simpleTransaction";
|
|
12
|
+
export * from "./transactionArgument";
|
|
13
|
+
export * from "./transactionPayload";
|
|
14
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
5
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
6
|
+
import { AccountAddress } from "../../core";
|
|
7
|
+
import { MoveModuleId } from "../../types";
|
|
8
|
+
import { Identifier } from "./identifier";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents a ModuleId that can be serialized and deserialized.
|
|
12
|
+
* A ModuleId consists of a module address (e.g., "0x1") and a module name (e.g., "coin").
|
|
13
|
+
* @group Implementation
|
|
14
|
+
* @category Transactions
|
|
15
|
+
*/
|
|
16
|
+
export class ModuleId extends Serializable {
|
|
17
|
+
public readonly address: AccountAddress;
|
|
18
|
+
|
|
19
|
+
public readonly name: Identifier;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Initializes a new instance of the module with the specified account address and name.
|
|
23
|
+
*
|
|
24
|
+
* @param address - The account address, e.g., "0x1".
|
|
25
|
+
* @param name - The module name under the specified address, e.g., "coin".
|
|
26
|
+
* @group Implementation
|
|
27
|
+
* @category Transactions
|
|
28
|
+
*/
|
|
29
|
+
constructor(address: AccountAddress, name: Identifier) {
|
|
30
|
+
super();
|
|
31
|
+
this.address = address;
|
|
32
|
+
this.name = name;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Converts a string literal in the format "account_address::module_name" to a ModuleId.
|
|
37
|
+
* @param moduleId - A string literal representing the module identifier.
|
|
38
|
+
* @throws Error if the provided moduleId is not in the correct format.
|
|
39
|
+
* @returns ModuleId - The corresponding ModuleId object.
|
|
40
|
+
* @group Implementation
|
|
41
|
+
* @category Transactions
|
|
42
|
+
*/
|
|
43
|
+
static fromStr(moduleId: MoveModuleId): ModuleId {
|
|
44
|
+
const parts = moduleId.split("::");
|
|
45
|
+
if (parts.length !== 2) {
|
|
46
|
+
throw new Error("Invalid module id.");
|
|
47
|
+
}
|
|
48
|
+
return new ModuleId(AccountAddress.fromString(parts[0]), new Identifier(parts[1]));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Serializes the address and name properties using the provided serializer.
|
|
53
|
+
* This function is essential for converting the object's data into a format suitable for transmission or storage.
|
|
54
|
+
*
|
|
55
|
+
* @param serializer - The serializer instance used to perform the serialization.
|
|
56
|
+
* @group Implementation
|
|
57
|
+
* @category Transactions
|
|
58
|
+
*/
|
|
59
|
+
serialize(serializer: Serializer): void {
|
|
60
|
+
this.address.serialize(serializer);
|
|
61
|
+
this.name.serialize(serializer);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Deserializes a ModuleId from the provided deserializer.
|
|
66
|
+
* This function retrieves the account address and identifier to construct a ModuleId instance.
|
|
67
|
+
*
|
|
68
|
+
* @param deserializer - The deserializer instance used to read the data.
|
|
69
|
+
* @group Implementation
|
|
70
|
+
* @category Transactions
|
|
71
|
+
*/
|
|
72
|
+
static deserialize(deserializer: Deserializer): ModuleId {
|
|
73
|
+
const address = AccountAddress.deserialize(deserializer);
|
|
74
|
+
const name = Identifier.deserialize(deserializer);
|
|
75
|
+
return new ModuleId(address, name);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
5
|
+
|
|
6
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
7
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
8
|
+
import { AccountAddress } from "../../core";
|
|
9
|
+
import { RawTransaction } from "./rawTransaction";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Represents a multi-agent transaction that can be serialized and deserialized.
|
|
13
|
+
* This transaction includes a raw transaction, optional fee payer address, and multiple secondary signer addresses.
|
|
14
|
+
*
|
|
15
|
+
* @param rawTransaction The raw transaction to be executed.
|
|
16
|
+
* @param secondarySignerAddresses An array of secondary signer addresses involved in the transaction.
|
|
17
|
+
* @param feePayerAddress An optional account address that sponsors the transaction's gas fees.
|
|
18
|
+
* @group Implementation
|
|
19
|
+
* @category Transactions
|
|
20
|
+
*/
|
|
21
|
+
export class MultiAgentTransaction extends Serializable {
|
|
22
|
+
public rawTransaction: RawTransaction;
|
|
23
|
+
|
|
24
|
+
public feePayerAddress?: AccountAddress | undefined;
|
|
25
|
+
|
|
26
|
+
public secondarySignerAddresses: AccountAddress[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Represents a MultiAgentTransaction that can be submitted to the Movement chain for execution.
|
|
30
|
+
* This class encapsulates the raw transaction data, the secondary signer addresses, and an optional fee payer address.
|
|
31
|
+
*
|
|
32
|
+
* @param rawTransaction The raw transaction data.
|
|
33
|
+
* @param secondarySignerAddresses An array of secondary signer addresses.
|
|
34
|
+
* @param feePayerAddress An optional account address that sponsors the gas fees.
|
|
35
|
+
* @group Implementation
|
|
36
|
+
* @category Transactions
|
|
37
|
+
*/
|
|
38
|
+
constructor(
|
|
39
|
+
rawTransaction: RawTransaction,
|
|
40
|
+
secondarySignerAddresses: AccountAddress[],
|
|
41
|
+
feePayerAddress?: AccountAddress,
|
|
42
|
+
) {
|
|
43
|
+
super();
|
|
44
|
+
this.rawTransaction = rawTransaction;
|
|
45
|
+
this.feePayerAddress = feePayerAddress;
|
|
46
|
+
this.secondarySignerAddresses = secondarySignerAddresses;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Serializes the transaction data, including the raw transaction, secondary signer addresses, and fee payer address.
|
|
51
|
+
* This function is essential for preparing the transaction for transmission or storage in a serialized format.
|
|
52
|
+
*
|
|
53
|
+
* @param serializer - The serializer instance used to serialize the transaction data.
|
|
54
|
+
* @group Implementation
|
|
55
|
+
* @category Transactions
|
|
56
|
+
*/
|
|
57
|
+
serialize(serializer: Serializer): void {
|
|
58
|
+
this.rawTransaction.serialize(serializer);
|
|
59
|
+
|
|
60
|
+
serializer.serializeVector<AccountAddress>(this.secondarySignerAddresses);
|
|
61
|
+
|
|
62
|
+
if (this.feePayerAddress === undefined) {
|
|
63
|
+
serializer.serializeBool(false);
|
|
64
|
+
} else {
|
|
65
|
+
serializer.serializeBool(true);
|
|
66
|
+
this.feePayerAddress.serialize(serializer);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Deserializes a MultiAgentTransaction from the provided deserializer.
|
|
72
|
+
* This function allows you to reconstruct a MultiAgentTransaction object from its serialized form, including any secondary
|
|
73
|
+
* signer addresses and the fee payer address if present.
|
|
74
|
+
*
|
|
75
|
+
* @param deserializer - The deserializer instance used to read the serialized data.
|
|
76
|
+
* @group Implementation
|
|
77
|
+
* @category Transactions
|
|
78
|
+
*/
|
|
79
|
+
static deserialize(deserializer: Deserializer): MultiAgentTransaction {
|
|
80
|
+
const rawTransaction = RawTransaction.deserialize(deserializer);
|
|
81
|
+
|
|
82
|
+
const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);
|
|
83
|
+
|
|
84
|
+
const feePayerPresent = deserializer.deserializeBool();
|
|
85
|
+
let feePayerAddress;
|
|
86
|
+
if (feePayerPresent) {
|
|
87
|
+
feePayerAddress = AccountAddress.deserialize(deserializer);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return new MultiAgentTransaction(rawTransaction, secondarySignerAddresses, feePayerAddress);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
5
|
+
|
|
6
|
+
import { Deserializer } from "../../bcs/deserializer";
|
|
7
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
8
|
+
import { AccountAddress } from "../../core";
|
|
9
|
+
import { TransactionVariants } from "../../types";
|
|
10
|
+
import { ChainId } from "./chainId";
|
|
11
|
+
import { TransactionPayload } from "./transactionPayload";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents a raw transaction that can be serialized and deserialized.
|
|
15
|
+
* Raw transactions contain the metadata and payloads that can be submitted to the Movement chain for execution.
|
|
16
|
+
* They must be signed before the Movement chain can execute them.
|
|
17
|
+
* @group Implementation
|
|
18
|
+
* @category Transactions
|
|
19
|
+
*/
|
|
20
|
+
export class RawTransaction extends Serializable {
|
|
21
|
+
public readonly sender: AccountAddress;
|
|
22
|
+
|
|
23
|
+
public readonly sequence_number: bigint;
|
|
24
|
+
|
|
25
|
+
public readonly payload: TransactionPayload;
|
|
26
|
+
|
|
27
|
+
public readonly max_gas_amount: bigint;
|
|
28
|
+
|
|
29
|
+
public readonly gas_unit_price: bigint;
|
|
30
|
+
|
|
31
|
+
public readonly expiration_timestamp_secs: bigint;
|
|
32
|
+
|
|
33
|
+
public readonly chain_id: ChainId;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* RawTransactions contain the metadata and payloads that can be submitted to Movement chain for execution.
|
|
37
|
+
* RawTransactions must be signed before Movement chain can execute them.
|
|
38
|
+
*
|
|
39
|
+
* @param sender The sender Account Address
|
|
40
|
+
* @param sequence_number Sequence number of this transaction. This must match the sequence number stored in
|
|
41
|
+
* the sender's account at the time the transaction executes.
|
|
42
|
+
* @param payload Instructions for the Movement Blockchain, including publishing a module,
|
|
43
|
+
* execute an entry function or execute a script payload.
|
|
44
|
+
* @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more
|
|
45
|
+
* than this gas or the transaction will be discarded during validation.
|
|
46
|
+
* @param gas_unit_price Price to be paid per gas unit.
|
|
47
|
+
* @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.
|
|
48
|
+
* @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.
|
|
49
|
+
* @group Implementation
|
|
50
|
+
* @category Transactions
|
|
51
|
+
*/
|
|
52
|
+
constructor(
|
|
53
|
+
sender: AccountAddress,
|
|
54
|
+
sequence_number: bigint,
|
|
55
|
+
payload: TransactionPayload,
|
|
56
|
+
max_gas_amount: bigint,
|
|
57
|
+
gas_unit_price: bigint,
|
|
58
|
+
expiration_timestamp_secs: bigint,
|
|
59
|
+
chain_id: ChainId,
|
|
60
|
+
) {
|
|
61
|
+
super();
|
|
62
|
+
this.sender = sender;
|
|
63
|
+
this.sequence_number = sequence_number;
|
|
64
|
+
this.payload = payload;
|
|
65
|
+
this.max_gas_amount = max_gas_amount;
|
|
66
|
+
this.gas_unit_price = gas_unit_price;
|
|
67
|
+
this.expiration_timestamp_secs = expiration_timestamp_secs;
|
|
68
|
+
this.chain_id = chain_id;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Serializes the transaction data, including the fee payer transaction type, raw transaction, secondary signer addresses,
|
|
73
|
+
* and fee payer address.
|
|
74
|
+
* This function is essential for preparing the transaction for transmission or storage in a serialized format.
|
|
75
|
+
*
|
|
76
|
+
* @param serializer - The serializer instance used to serialize the transaction data.
|
|
77
|
+
* @group Implementation
|
|
78
|
+
* @category Transactions
|
|
79
|
+
*/
|
|
80
|
+
serialize(serializer: Serializer): void {
|
|
81
|
+
this.sender.serialize(serializer);
|
|
82
|
+
serializer.serializeU64(this.sequence_number);
|
|
83
|
+
this.payload.serialize(serializer);
|
|
84
|
+
serializer.serializeU64(this.max_gas_amount);
|
|
85
|
+
serializer.serializeU64(this.gas_unit_price);
|
|
86
|
+
serializer.serializeU64(this.expiration_timestamp_secs);
|
|
87
|
+
this.chain_id.serialize(serializer);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Deserialize a Raw Transaction With Data.
|
|
92
|
+
* This function retrieves the appropriate raw transaction based on the variant index provided by the deserializer.
|
|
93
|
+
*
|
|
94
|
+
* @param deserializer - An instance of the Deserializer used to read the serialized data.
|
|
95
|
+
* @group Implementation
|
|
96
|
+
* @category Transactions
|
|
97
|
+
*/
|
|
98
|
+
static deserialize(deserializer: Deserializer): RawTransaction {
|
|
99
|
+
const sender = AccountAddress.deserialize(deserializer);
|
|
100
|
+
const sequence_number = deserializer.deserializeU64();
|
|
101
|
+
const payload = TransactionPayload.deserialize(deserializer);
|
|
102
|
+
const max_gas_amount = deserializer.deserializeU64();
|
|
103
|
+
const gas_unit_price = deserializer.deserializeU64();
|
|
104
|
+
const expiration_timestamp_secs = deserializer.deserializeU64();
|
|
105
|
+
const chain_id = ChainId.deserialize(deserializer);
|
|
106
|
+
return new RawTransaction(
|
|
107
|
+
sender,
|
|
108
|
+
sequence_number,
|
|
109
|
+
payload,
|
|
110
|
+
max_gas_amount,
|
|
111
|
+
gas_unit_price,
|
|
112
|
+
expiration_timestamp_secs,
|
|
113
|
+
chain_id,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Represents a raw transaction with associated data that can be serialized and deserialized.
|
|
120
|
+
*
|
|
121
|
+
* @extends Serializable
|
|
122
|
+
* @group Implementation
|
|
123
|
+
* @category Transactions
|
|
124
|
+
*/
|
|
125
|
+
export abstract class RawTransactionWithData extends Serializable {
|
|
126
|
+
/**
|
|
127
|
+
* Serialize a Raw Transaction With Data
|
|
128
|
+
* @group Implementation
|
|
129
|
+
* @category Transactions
|
|
130
|
+
*/
|
|
131
|
+
abstract serialize(serializer: Serializer): void;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Deserialize a Raw Transaction With Data
|
|
135
|
+
* @group Implementation
|
|
136
|
+
* @category Transactions
|
|
137
|
+
*/
|
|
138
|
+
static deserialize(deserializer: Deserializer): RawTransactionWithData {
|
|
139
|
+
// index enum variant
|
|
140
|
+
const index = deserializer.deserializeUleb128AsU32();
|
|
141
|
+
switch (index) {
|
|
142
|
+
case TransactionVariants.MultiAgentTransaction:
|
|
143
|
+
return MultiAgentRawTransaction.load(deserializer);
|
|
144
|
+
case TransactionVariants.FeePayerTransaction:
|
|
145
|
+
return FeePayerRawTransaction.load(deserializer);
|
|
146
|
+
default:
|
|
147
|
+
throw new Error(`Unknown variant index for RawTransactionWithData: ${index}`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Represents a multi-agent transaction that can be serialized and deserialized.
|
|
154
|
+
*
|
|
155
|
+
* @extends RawTransactionWithData
|
|
156
|
+
* @group Implementation
|
|
157
|
+
* @category Transactions
|
|
158
|
+
*/
|
|
159
|
+
export class MultiAgentRawTransaction extends RawTransactionWithData {
|
|
160
|
+
/**
|
|
161
|
+
* The raw transaction
|
|
162
|
+
* @group Implementation
|
|
163
|
+
* @category Transactions
|
|
164
|
+
*/
|
|
165
|
+
public readonly raw_txn: RawTransaction;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The secondary signers on this transaction
|
|
169
|
+
* @group Implementation
|
|
170
|
+
* @category Transactions
|
|
171
|
+
*/
|
|
172
|
+
public readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
173
|
+
|
|
174
|
+
constructor(raw_txn: RawTransaction, secondary_signer_addresses: Array<AccountAddress>) {
|
|
175
|
+
super();
|
|
176
|
+
this.raw_txn = raw_txn;
|
|
177
|
+
this.secondary_signer_addresses = secondary_signer_addresses;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
serialize(serializer: Serializer): void {
|
|
181
|
+
serializer.serializeU32AsUleb128(TransactionVariants.MultiAgentTransaction);
|
|
182
|
+
this.raw_txn.serialize(serializer);
|
|
183
|
+
serializer.serializeVector(this.secondary_signer_addresses);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Deserializes a Fee Payer Raw Transaction from the provided deserializer.
|
|
188
|
+
* This function allows you to reconstruct a Fee Payer Raw Transaction object, which includes the raw transaction data,
|
|
189
|
+
* secondary signer addresses, and the fee payer address.
|
|
190
|
+
*
|
|
191
|
+
* @param deserializer - The deserializer used to read the raw transaction data.
|
|
192
|
+
* @returns A FeePayerRawTransaction object constructed from the deserialized data.
|
|
193
|
+
* @group Implementation
|
|
194
|
+
* @category Transactions
|
|
195
|
+
*/
|
|
196
|
+
static load(deserializer: Deserializer): MultiAgentRawTransaction {
|
|
197
|
+
const rawTxn = RawTransaction.deserialize(deserializer);
|
|
198
|
+
const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);
|
|
199
|
+
|
|
200
|
+
return new MultiAgentRawTransaction(rawTxn, secondarySignerAddresses);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Represents a Fee Payer Transaction that can be serialized and deserialized.
|
|
206
|
+
* @group Implementation
|
|
207
|
+
* @category Transactions
|
|
208
|
+
*/
|
|
209
|
+
export class FeePayerRawTransaction extends RawTransactionWithData {
|
|
210
|
+
/**
|
|
211
|
+
* The raw transaction
|
|
212
|
+
* @group Implementation
|
|
213
|
+
* @category Transactions
|
|
214
|
+
*/
|
|
215
|
+
public readonly raw_txn: RawTransaction;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The secondary signers on this transaction - optional and can be empty
|
|
219
|
+
* @group Implementation
|
|
220
|
+
* @category Transactions
|
|
221
|
+
*/
|
|
222
|
+
public readonly secondary_signer_addresses: Array<AccountAddress>;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The fee payer account address
|
|
226
|
+
* @group Implementation
|
|
227
|
+
* @category Transactions
|
|
228
|
+
*/
|
|
229
|
+
public readonly fee_payer_address: AccountAddress;
|
|
230
|
+
|
|
231
|
+
constructor(
|
|
232
|
+
raw_txn: RawTransaction,
|
|
233
|
+
secondary_signer_addresses: Array<AccountAddress>,
|
|
234
|
+
fee_payer_address: AccountAddress,
|
|
235
|
+
) {
|
|
236
|
+
super();
|
|
237
|
+
this.raw_txn = raw_txn;
|
|
238
|
+
this.secondary_signer_addresses = secondary_signer_addresses;
|
|
239
|
+
this.fee_payer_address = fee_payer_address;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
serialize(serializer: Serializer): void {
|
|
243
|
+
serializer.serializeU32AsUleb128(TransactionVariants.FeePayerTransaction);
|
|
244
|
+
this.raw_txn.serialize(serializer);
|
|
245
|
+
serializer.serializeVector(this.secondary_signer_addresses);
|
|
246
|
+
this.fee_payer_address.serialize(serializer);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
static load(deserializer: Deserializer): FeePayerRawTransaction {
|
|
250
|
+
const rawTxn = RawTransaction.deserialize(deserializer);
|
|
251
|
+
const secondarySignerAddresses = deserializer.deserializeVector(AccountAddress);
|
|
252
|
+
const feePayerAddress = AccountAddress.deserialize(deserializer);
|
|
253
|
+
|
|
254
|
+
return new FeePayerRawTransaction(rawTxn, secondarySignerAddresses, feePayerAddress);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copyright © Move Industries
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { MoveString, MoveVector, U64, U8 } from "../../bcs";
|
|
5
|
+
import { Serializable, Serializer } from "../../bcs/serializer";
|
|
6
|
+
import { AccountAddress } from "../../core/accountAddress";
|
|
7
|
+
import { PublicKey } from "../../core/crypto";
|
|
8
|
+
import { AnyNumber } from "../../types";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents a challenge required for the account owner to sign in order to rotate the authentication key.
|
|
12
|
+
* @group Implementation
|
|
13
|
+
* @category Transactions
|
|
14
|
+
*/
|
|
15
|
+
export class RotationProofChallenge extends Serializable {
|
|
16
|
+
// Resource account address
|
|
17
|
+
public readonly accountAddress: AccountAddress = AccountAddress.ONE;
|
|
18
|
+
|
|
19
|
+
// Module name, i.e: 0x1::account
|
|
20
|
+
public readonly moduleName: MoveString = new MoveString("account");
|
|
21
|
+
|
|
22
|
+
// The rotation proof challenge struct name that live under the module
|
|
23
|
+
public readonly structName: MoveString = new MoveString("RotationProofChallenge");
|
|
24
|
+
|
|
25
|
+
// Signer's address
|
|
26
|
+
public readonly originator: AccountAddress;
|
|
27
|
+
|
|
28
|
+
// Signer's current authentication key
|
|
29
|
+
public readonly currentAuthKey: AccountAddress;
|
|
30
|
+
|
|
31
|
+
// New public key to rotate to
|
|
32
|
+
public readonly newPublicKey: MoveVector<U8>;
|
|
33
|
+
|
|
34
|
+
// Sequence number of the account
|
|
35
|
+
public readonly sequenceNumber: U64;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Initializes a new instance of the class with the specified parameters.
|
|
39
|
+
* This constructor sets up the necessary attributes for managing account keys.
|
|
40
|
+
*
|
|
41
|
+
* @param args - The parameters required to create the instance.
|
|
42
|
+
* @param args.sequenceNumber - The sequence number associated with the transaction.
|
|
43
|
+
* @param args.originator - The account address of the originator.
|
|
44
|
+
* @param args.currentAuthKey - The current authentication key of the account.
|
|
45
|
+
* @param args.newPublicKey - The new public key to be set for the account.
|
|
46
|
+
* @group Implementation
|
|
47
|
+
* @category Transactions
|
|
48
|
+
*/
|
|
49
|
+
constructor(args: {
|
|
50
|
+
sequenceNumber: AnyNumber;
|
|
51
|
+
originator: AccountAddress;
|
|
52
|
+
currentAuthKey: AccountAddress;
|
|
53
|
+
newPublicKey: PublicKey;
|
|
54
|
+
}) {
|
|
55
|
+
super();
|
|
56
|
+
this.sequenceNumber = new U64(args.sequenceNumber);
|
|
57
|
+
this.originator = args.originator;
|
|
58
|
+
this.currentAuthKey = args.currentAuthKey;
|
|
59
|
+
this.newPublicKey = MoveVector.U8(args.newPublicKey.toUint8Array());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Serializes the properties of the current instance for transmission or storage.
|
|
64
|
+
* This function helps in converting the instance data into a format suitable for serialization.
|
|
65
|
+
*
|
|
66
|
+
* @param serializer - The serializer used to serialize the instance properties.
|
|
67
|
+
* @param serializer.accountAddress - The account address to serialize.
|
|
68
|
+
* @param serializer.moduleName - The module name to serialize.
|
|
69
|
+
* @param serializer.structName - The struct name to serialize.
|
|
70
|
+
* @param serializer.sequenceNumber - The sequence number to serialize.
|
|
71
|
+
* @param serializer.originator - The originator to serialize.
|
|
72
|
+
* @param serializer.currentAuthKey - The current authentication key to serialize.
|
|
73
|
+
* @param serializer.newPublicKey - The new public key to serialize.
|
|
74
|
+
* @group Implementation
|
|
75
|
+
* @category Transactions
|
|
76
|
+
*/
|
|
77
|
+
serialize(serializer: Serializer): void {
|
|
78
|
+
serializer.serialize(this.accountAddress);
|
|
79
|
+
serializer.serialize(this.moduleName);
|
|
80
|
+
serializer.serialize(this.structName);
|
|
81
|
+
serializer.serialize(this.sequenceNumber);
|
|
82
|
+
serializer.serialize(this.originator);
|
|
83
|
+
serializer.serialize(this.currentAuthKey);
|
|
84
|
+
serializer.serialize(this.newPublicKey);
|
|
85
|
+
}
|
|
86
|
+
}
|