From 20a19873bfe9993dcfa950a71535ef908a1c1a70 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Tue, 24 Sep 2024 10:09:53 -0500 Subject: [PATCH] Re-gen TS Modules --- .../src/modules/cosmos.bank.v1beta1/module.ts | 48 +-- .../modules/cosmos.bank.v1beta1/registry.ts | 4 +- .../cosmos.distribution.v1beta1/module.ts | 120 +++--- .../cosmos.distribution.v1beta1/registry.ts | 8 +- .../modules/cosmos.feegrant.v1beta1/module.ts | 48 +-- .../cosmos.feegrant.v1beta1/registry.ts | 4 +- .../src/modules/cosmos.gov.v1/module.ts | 48 +-- .../src/modules/cosmos.gov.v1/registry.ts | 4 +- .../src/modules/cosmos.gov.v1beta1/module.ts | 72 ++-- .../modules/cosmos.gov.v1beta1/registry.ts | 8 +- .../modules/cosmos.staking.v1beta1/module.ts | 140 +++---- .../cosmos.staking.v1beta1/registry.ts | 16 +- .../modules/cosmos.upgrade.v1beta1/module.ts | 48 +-- .../cosmos.upgrade.v1beta1/registry.ts | 4 +- .../modules/cosmos.vesting.v1beta1/module.ts | 48 +-- .../cosmos.vesting.v1beta1/registry.ts | 4 +- .../src/modules/cosmwasm.wasm.v1/module.ts | 394 +++++++++--------- .../src/modules/cosmwasm.wasm.v1/registry.ts | 48 +-- .../osmosis.tokenfactory.v1beta1/module.ts | 140 +++---- .../osmosis.tokenfactory.v1beta1/registry.ts | 12 +- .../src/modules/wormchain.wormhole/module.ts | 182 ++++---- .../modules/wormchain.wormhole/registry.ts | 20 +- 22 files changed, 710 insertions(+), 710 deletions(-) diff --git a/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/module.ts index 8c5ada4558..3d9e1190ad 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/module.ts @@ -8,8 +8,8 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; +import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; import { SendAuthorization as typeSendAuthorization} from "./types" import { Params as typeParams} from "./types" @@ -22,13 +22,7 @@ import { Metadata as typeMetadata} from "./types" import { Balance as typeBalance} from "./types" import { DenomOwner as typeDenomOwner} from "./types" -export { MsgMultiSend, MsgSend }; - -type sendMsgMultiSendParams = { - value: MsgMultiSend, - fee?: StdFee, - memo?: string -}; +export { MsgSend, MsgMultiSend }; type sendMsgSendParams = { value: MsgSend, @@ -36,15 +30,21 @@ type sendMsgSendParams = { memo?: string }; - -type msgMultiSendParams = { +type sendMsgMultiSendParams = { value: MsgMultiSend, + fee?: StdFee, + memo?: string }; + type msgSendParams = { value: MsgSend, }; +type msgMultiSendParams = { + value: MsgMultiSend, +}; + export const registry = new Registry(msgTypes); @@ -75,48 +75,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise { + async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) }) + let msg = this.msgSend({ value: MsgSend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise { + async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSend({ value: MsgSend.fromPartial(value) }) + let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message) } }, - msgMultiSend({ value }: msgMultiSendParams): EncodeObject { + msgSend({ value }: msgSendParams): EncodeObject { try { - return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) } + return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSend: Could not create message: ' + e.message) } }, - msgSend({ value }: msgSendParams): EncodeObject { + msgMultiSend({ value }: msgMultiSendParams): EncodeObject { try { - return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) } + return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSend: Could not create message: ' + e.message) + throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/registry.ts index fa729095ec..b4d7c289b6 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.bank.v1beta1/registry.ts @@ -1,11 +1,11 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; +import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], ["/cosmos.bank.v1beta1.MsgSend", MsgSend], + ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/module.ts index b152223109..2d2545ecbf 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/module.ts @@ -8,12 +8,12 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgUpdateParams } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; import { Params as typeParams} from "./types" import { ValidatorHistoricalRewards as typeValidatorHistoricalRewards} from "./types" @@ -35,7 +35,19 @@ import { ValidatorCurrentRewardsRecord as typeValidatorCurrentRewardsRecord} fro import { DelegatorStartingInfoRecord as typeDelegatorStartingInfoRecord} from "./types" import { ValidatorSlashEventRecord as typeValidatorSlashEventRecord} from "./types" -export { MsgUpdateParams, MsgWithdrawDelegatorReward, MsgCommunityPoolSpend, MsgSetWithdrawAddress, MsgFundCommunityPool, MsgWithdrawValidatorCommission }; +export { MsgWithdrawValidatorCommission, MsgSetWithdrawAddress, MsgUpdateParams, MsgWithdrawDelegatorReward, MsgCommunityPoolSpend, MsgFundCommunityPool }; + +type sendMsgWithdrawValidatorCommissionParams = { + value: MsgWithdrawValidatorCommission, + fee?: StdFee, + memo?: string +}; + +type sendMsgSetWithdrawAddressParams = { + value: MsgSetWithdrawAddress, + fee?: StdFee, + memo?: string +}; type sendMsgUpdateParamsParams = { value: MsgUpdateParams, @@ -55,24 +67,20 @@ type sendMsgCommunityPoolSpendParams = { memo?: string }; -type sendMsgSetWithdrawAddressParams = { - value: MsgSetWithdrawAddress, - fee?: StdFee, - memo?: string -}; - type sendMsgFundCommunityPoolParams = { value: MsgFundCommunityPool, fee?: StdFee, memo?: string }; -type sendMsgWithdrawValidatorCommissionParams = { + +type msgWithdrawValidatorCommissionParams = { value: MsgWithdrawValidatorCommission, - fee?: StdFee, - memo?: string }; +type msgSetWithdrawAddressParams = { + value: MsgSetWithdrawAddress, +}; type msgUpdateParamsParams = { value: MsgUpdateParams, @@ -86,18 +94,10 @@ type msgCommunityPoolSpendParams = { value: MsgCommunityPoolSpend, }; -type msgSetWithdrawAddressParams = { - value: MsgSetWithdrawAddress, -}; - type msgFundCommunityPoolParams = { value: MsgFundCommunityPool, }; -type msgWithdrawValidatorCommissionParams = { - value: MsgWithdrawValidatorCommission, -}; - export const registry = new Registry(msgTypes); @@ -128,91 +128,107 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { + async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) + let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message) } }, - async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise { + async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) }) + let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCommunityPoolSpend({ value, fee, memo }: sendMsgCommunityPoolSpendParams): Promise { + async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCommunityPoolSpend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCommunityPoolSpend({ value: MsgCommunityPoolSpend.fromPartial(value) }) + let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCommunityPoolSpend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise { + async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) }) + let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message) } }, - async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise { + async sendMsgCommunityPoolSpend({ value, fee, memo }: sendMsgCommunityPoolSpendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCommunityPoolSpend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) }) + let msg = this.msgCommunityPoolSpend({ value: MsgCommunityPoolSpend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCommunityPoolSpend: Could not broadcast Tx: '+ e.message) } }, - async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise { + async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) }) + let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message) } }, + msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject { + try { + return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message) + } + }, + + msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject { + try { + return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message) + } + }, + msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { try { return { typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } @@ -237,14 +253,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject { - try { - return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message) - } - }, - msgFundCommunityPool({ value }: msgFundCommunityPoolParams): EncodeObject { try { return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( value ) } @@ -253,14 +261,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject { - try { - return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message) - } - }, - } }; diff --git a/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/registry.ts index 1ab4e81149..22012f6d46 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.distribution.v1beta1/registry.ts @@ -1,19 +1,19 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgUpdateParams } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], + ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/module.ts index 99cd7b6bdb..e39a589222 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/module.ts @@ -8,21 +8,15 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; +import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { BasicAllowance as typeBasicAllowance} from "./types" import { PeriodicAllowance as typePeriodicAllowance} from "./types" import { AllowedMsgAllowance as typeAllowedMsgAllowance} from "./types" import { Grant as typeGrant} from "./types" -export { MsgRevokeAllowance, MsgGrantAllowance }; - -type sendMsgRevokeAllowanceParams = { - value: MsgRevokeAllowance, - fee?: StdFee, - memo?: string -}; +export { MsgGrantAllowance, MsgRevokeAllowance }; type sendMsgGrantAllowanceParams = { value: MsgGrantAllowance, @@ -30,15 +24,21 @@ type sendMsgGrantAllowanceParams = { memo?: string }; - -type msgRevokeAllowanceParams = { +type sendMsgRevokeAllowanceParams = { value: MsgRevokeAllowance, + fee?: StdFee, + memo?: string }; + type msgGrantAllowanceParams = { value: MsgGrantAllowance, }; +type msgRevokeAllowanceParams = { + value: MsgRevokeAllowance, +}; + export const registry = new Registry(msgTypes); @@ -69,48 +69,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgRevokeAllowance({ value, fee, memo }: sendMsgRevokeAllowanceParams): Promise { + async sendMsgGrantAllowance({ value, fee, memo }: sendMsgGrantAllowanceParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgRevokeAllowance: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgGrantAllowance: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgRevokeAllowance({ value: MsgRevokeAllowance.fromPartial(value) }) + let msg = this.msgGrantAllowance({ value: MsgGrantAllowance.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgRevokeAllowance: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgGrantAllowance: Could not broadcast Tx: '+ e.message) } }, - async sendMsgGrantAllowance({ value, fee, memo }: sendMsgGrantAllowanceParams): Promise { + async sendMsgRevokeAllowance({ value, fee, memo }: sendMsgRevokeAllowanceParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgGrantAllowance: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgRevokeAllowance: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgGrantAllowance({ value: MsgGrantAllowance.fromPartial(value) }) + let msg = this.msgRevokeAllowance({ value: MsgRevokeAllowance.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgGrantAllowance: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgRevokeAllowance: Could not broadcast Tx: '+ e.message) } }, - msgRevokeAllowance({ value }: msgRevokeAllowanceParams): EncodeObject { + msgGrantAllowance({ value }: msgGrantAllowanceParams): EncodeObject { try { - return { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial( value ) } + return { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgRevokeAllowance: Could not create message: ' + e.message) + throw new Error('TxClient:MsgGrantAllowance: Could not create message: ' + e.message) } }, - msgGrantAllowance({ value }: msgGrantAllowanceParams): EncodeObject { + msgRevokeAllowance({ value }: msgRevokeAllowanceParams): EncodeObject { try { - return { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial( value ) } + return { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgGrantAllowance: Could not create message: ' + e.message) + throw new Error('TxClient:MsgRevokeAllowance: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/registry.ts index f2c8936165..5cc62ebf26 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.feegrant.v1beta1/registry.ts @@ -1,11 +1,11 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; +import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], + ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.gov.v1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.gov.v1/module.ts index bbddd96ba6..d1276d4646 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.gov.v1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.gov.v1/module.ts @@ -10,8 +10,8 @@ import { MissingWalletError } from "../helpers" import { Api } from "./rest"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; import { MsgVote } from "./types/cosmos/gov/v1/tx"; +import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; import { MsgUpdateParams } from "./types/cosmos/gov/v1/tx"; import { WeightedVoteOption as typeWeightedVoteOption} from "./types" @@ -24,7 +24,7 @@ import { VotingParams as typeVotingParams} from "./types" import { TallyParams as typeTallyParams} from "./types" import { Params as typeParams} from "./types" -export { MsgSubmitProposal, MsgVoteWeighted, MsgDeposit, MsgVote, MsgUpdateParams }; +export { MsgSubmitProposal, MsgVoteWeighted, MsgVote, MsgDeposit, MsgUpdateParams }; type sendMsgSubmitProposalParams = { value: MsgSubmitProposal, @@ -38,14 +38,14 @@ type sendMsgVoteWeightedParams = { memo?: string }; -type sendMsgDepositParams = { - value: MsgDeposit, +type sendMsgVoteParams = { + value: MsgVote, fee?: StdFee, memo?: string }; -type sendMsgVoteParams = { - value: MsgVote, +type sendMsgDepositParams = { + value: MsgDeposit, fee?: StdFee, memo?: string }; @@ -65,14 +65,14 @@ type msgVoteWeightedParams = { value: MsgVoteWeighted, }; -type msgDepositParams = { - value: MsgDeposit, -}; - type msgVoteParams = { value: MsgVote, }; +type msgDepositParams = { + value: MsgDeposit, +}; + type msgUpdateParamsParams = { value: MsgUpdateParams, }; @@ -135,31 +135,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { + async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) + let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) } }, - async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { + async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) + let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) } }, @@ -194,19 +194,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgDeposit({ value }: msgDepositParams): EncodeObject { + msgVote({ value }: msgVoteParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) } }, - msgVote({ value }: msgVoteParams): EncodeObject { + msgDeposit({ value }: msgDepositParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.gov.v1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.gov.v1/registry.ts index d720fba9d6..52f693fb2a 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.gov.v1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.gov.v1/registry.ts @@ -2,15 +2,15 @@ import { GeneratedType } from "@cosmjs/proto-signing"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; import { MsgVote } from "./types/cosmos/gov/v1/tx"; +import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; import { MsgUpdateParams } from "./types/cosmos/gov/v1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted], - ["/cosmos.gov.v1.MsgDeposit", MsgDeposit], ["/cosmos.gov.v1.MsgVote", MsgVote], + ["/cosmos.gov.v1.MsgDeposit", MsgDeposit], ["/cosmos.gov.v1.MsgUpdateParams", MsgUpdateParams], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/module.ts index 7f66f85f57..83e0347e56 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/module.ts @@ -8,10 +8,10 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; import { WeightedVoteOption as typeWeightedVoteOption} from "./types" import { TextProposal as typeTextProposal} from "./types" @@ -23,16 +23,16 @@ import { DepositParams as typeDepositParams} from "./types" import { VotingParams as typeVotingParams} from "./types" import { TallyParams as typeTallyParams} from "./types" -export { MsgVote, MsgSubmitProposal, MsgDeposit, MsgVoteWeighted }; +export { MsgSubmitProposal, MsgVoteWeighted, MsgDeposit, MsgVote }; -type sendMsgVoteParams = { - value: MsgVote, +type sendMsgSubmitProposalParams = { + value: MsgSubmitProposal, fee?: StdFee, memo?: string }; -type sendMsgSubmitProposalParams = { - value: MsgSubmitProposal, +type sendMsgVoteWeightedParams = { + value: MsgVoteWeighted, fee?: StdFee, memo?: string }; @@ -43,27 +43,27 @@ type sendMsgDepositParams = { memo?: string }; -type sendMsgVoteWeightedParams = { - value: MsgVoteWeighted, +type sendMsgVoteParams = { + value: MsgVote, fee?: StdFee, memo?: string }; -type msgVoteParams = { - value: MsgVote, -}; - type msgSubmitProposalParams = { value: MsgSubmitProposal, }; +type msgVoteWeightedParams = { + value: MsgVoteWeighted, +}; + type msgDepositParams = { value: MsgDeposit, }; -type msgVoteWeightedParams = { - value: MsgVoteWeighted, +type msgVoteParams = { + value: MsgVote, }; @@ -96,31 +96,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { + async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) + let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { + async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) + let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message) } }, @@ -138,34 +138,34 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise { + async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) }) + let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) } }, - msgVote({ value }: msgVoteParams): EncodeObject { + msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) } }, - msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { + msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message) } }, @@ -177,11 +177,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject { + msgVote({ value }: msgVoteParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/registry.ts index 65db87354e..757c249b9b 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.gov.v1beta1/registry.ts @@ -1,15 +1,15 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], + ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], + ["/cosmos.gov.v1beta1.MsgVote", MsgVote], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/module.ts index d79db514db..59a1a037ef 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/module.ts @@ -8,12 +8,12 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; import { StakeAuthorization as typeStakeAuthorization} from "./types" import { StakeAuthorization_Validators as typeStakeAuthorization_Validators} from "./types" @@ -40,10 +40,22 @@ import { RedelegationResponse as typeRedelegationResponse} from "./types" import { Pool as typePool} from "./types" import { ValidatorUpdates as typeValidatorUpdates} from "./types" -export { MsgDelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgUndelegate, MsgEditValidator, MsgBeginRedelegate }; +export { MsgEditValidator, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate }; -type sendMsgDelegateParams = { - value: MsgDelegate, +type sendMsgEditValidatorParams = { + value: MsgEditValidator, + fee?: StdFee, + memo?: string +}; + +type sendMsgBeginRedelegateParams = { + value: MsgBeginRedelegate, + fee?: StdFee, + memo?: string +}; + +type sendMsgUndelegateParams = { + value: MsgUndelegate, fee?: StdFee, memo?: string }; @@ -60,27 +72,23 @@ type sendMsgCreateValidatorParams = { memo?: string }; -type sendMsgUndelegateParams = { - value: MsgUndelegate, +type sendMsgDelegateParams = { + value: MsgDelegate, fee?: StdFee, memo?: string }; -type sendMsgEditValidatorParams = { + +type msgEditValidatorParams = { value: MsgEditValidator, - fee?: StdFee, - memo?: string }; -type sendMsgBeginRedelegateParams = { +type msgBeginRedelegateParams = { value: MsgBeginRedelegate, - fee?: StdFee, - memo?: string }; - -type msgDelegateParams = { - value: MsgDelegate, +type msgUndelegateParams = { + value: MsgUndelegate, }; type msgCancelUnbondingDelegationParams = { @@ -91,16 +99,8 @@ type msgCreateValidatorParams = { value: MsgCreateValidator, }; -type msgUndelegateParams = { - value: MsgUndelegate, -}; - -type msgEditValidatorParams = { - value: MsgEditValidator, -}; - -type msgBeginRedelegateParams = { - value: MsgBeginRedelegate, +type msgDelegateParams = { + value: MsgDelegate, }; @@ -133,136 +133,136 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise { + async sendMsgEditValidator({ value, fee, memo }: sendMsgEditValidatorParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) }) + let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise { + async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) }) + let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise { + async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) }) + let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise { + async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) }) + let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message) } }, - async sendMsgEditValidator({ value, fee, memo }: sendMsgEditValidatorParams): Promise { + async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) }) + let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message) } }, - async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise { + async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) }) + let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message) } }, - msgDelegate({ value }: msgDelegateParams): EncodeObject { + msgEditValidator({ value }: msgEditValidatorParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message) } }, - msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject { + msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message) + throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message) } }, - msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject { + msgUndelegate({ value }: msgUndelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message) } }, - msgUndelegate({ value }: msgUndelegateParams): EncodeObject { + msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message) } }, - msgEditValidator({ value }: msgEditValidatorParams): EncodeObject { + msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message) } }, - msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject { + msgDelegate({ value }: msgDelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/registry.ts index 5654b53d94..0b81625356 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.staking.v1beta1/registry.ts @@ -1,19 +1,19 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], - ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation], - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], + ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], + ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation], + ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], + ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/module.ts index 4e5600f4b6..5661bbfe61 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/module.ts @@ -8,21 +8,15 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; import { MsgCancelUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; +import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; import { Plan as typePlan} from "./types" import { SoftwareUpgradeProposal as typeSoftwareUpgradeProposal} from "./types" import { CancelSoftwareUpgradeProposal as typeCancelSoftwareUpgradeProposal} from "./types" import { ModuleVersion as typeModuleVersion} from "./types" -export { MsgSoftwareUpgrade, MsgCancelUpgrade }; - -type sendMsgSoftwareUpgradeParams = { - value: MsgSoftwareUpgrade, - fee?: StdFee, - memo?: string -}; +export { MsgCancelUpgrade, MsgSoftwareUpgrade }; type sendMsgCancelUpgradeParams = { value: MsgCancelUpgrade, @@ -30,15 +24,21 @@ type sendMsgCancelUpgradeParams = { memo?: string }; - -type msgSoftwareUpgradeParams = { +type sendMsgSoftwareUpgradeParams = { value: MsgSoftwareUpgrade, + fee?: StdFee, + memo?: string }; + type msgCancelUpgradeParams = { value: MsgCancelUpgrade, }; +type msgSoftwareUpgradeParams = { + value: MsgSoftwareUpgrade, +}; + export const registry = new Registry(msgTypes); @@ -69,48 +69,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgSoftwareUpgrade({ value, fee, memo }: sendMsgSoftwareUpgradeParams): Promise { + async sendMsgCancelUpgrade({ value, fee, memo }: sendMsgCancelUpgradeParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSoftwareUpgrade: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCancelUpgrade: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSoftwareUpgrade({ value: MsgSoftwareUpgrade.fromPartial(value) }) + let msg = this.msgCancelUpgrade({ value: MsgCancelUpgrade.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSoftwareUpgrade: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCancelUpgrade: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCancelUpgrade({ value, fee, memo }: sendMsgCancelUpgradeParams): Promise { + async sendMsgSoftwareUpgrade({ value, fee, memo }: sendMsgSoftwareUpgradeParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCancelUpgrade: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSoftwareUpgrade: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCancelUpgrade({ value: MsgCancelUpgrade.fromPartial(value) }) + let msg = this.msgSoftwareUpgrade({ value: MsgSoftwareUpgrade.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCancelUpgrade: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSoftwareUpgrade: Could not broadcast Tx: '+ e.message) } }, - msgSoftwareUpgrade({ value }: msgSoftwareUpgradeParams): EncodeObject { + msgCancelUpgrade({ value }: msgCancelUpgradeParams): EncodeObject { try { - return { typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", value: MsgSoftwareUpgrade.fromPartial( value ) } + return { typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", value: MsgCancelUpgrade.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSoftwareUpgrade: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelUpgrade: Could not create message: ' + e.message) } }, - msgCancelUpgrade({ value }: msgCancelUpgradeParams): EncodeObject { + msgSoftwareUpgrade({ value }: msgSoftwareUpgradeParams): EncodeObject { try { - return { typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", value: MsgCancelUpgrade.fromPartial( value ) } + return { typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", value: MsgSoftwareUpgrade.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCancelUpgrade: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSoftwareUpgrade: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/registry.ts index 6cc76512c4..6443881615 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.upgrade.v1beta1/registry.ts @@ -1,11 +1,11 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; import { MsgCancelUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; +import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", MsgSoftwareUpgrade], ["/cosmos.upgrade.v1beta1.MsgCancelUpgrade", MsgCancelUpgrade], + ["/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", MsgSoftwareUpgrade], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/module.ts index ccd2773cbc..53386ee7c3 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/module.ts @@ -9,8 +9,8 @@ import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; +import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { BaseVestingAccount as typeBaseVestingAccount} from "./types" import { ContinuousVestingAccount as typeContinuousVestingAccount} from "./types" @@ -19,7 +19,7 @@ import { Period as typePeriod} from "./types" import { PeriodicVestingAccount as typePeriodicVestingAccount} from "./types" import { PermanentLockedAccount as typePermanentLockedAccount} from "./types" -export { MsgCreateVestingAccount, MsgCreatePeriodicVestingAccount, MsgCreatePermanentLockedAccount }; +export { MsgCreateVestingAccount, MsgCreatePermanentLockedAccount, MsgCreatePeriodicVestingAccount }; type sendMsgCreateVestingAccountParams = { value: MsgCreateVestingAccount, @@ -27,14 +27,14 @@ type sendMsgCreateVestingAccountParams = { memo?: string }; -type sendMsgCreatePeriodicVestingAccountParams = { - value: MsgCreatePeriodicVestingAccount, +type sendMsgCreatePermanentLockedAccountParams = { + value: MsgCreatePermanentLockedAccount, fee?: StdFee, memo?: string }; -type sendMsgCreatePermanentLockedAccountParams = { - value: MsgCreatePermanentLockedAccount, +type sendMsgCreatePeriodicVestingAccountParams = { + value: MsgCreatePeriodicVestingAccount, fee?: StdFee, memo?: string }; @@ -44,14 +44,14 @@ type msgCreateVestingAccountParams = { value: MsgCreateVestingAccount, }; -type msgCreatePeriodicVestingAccountParams = { - value: MsgCreatePeriodicVestingAccount, -}; - type msgCreatePermanentLockedAccountParams = { value: MsgCreatePermanentLockedAccount, }; +type msgCreatePeriodicVestingAccountParams = { + value: MsgCreatePeriodicVestingAccount, +}; + export const registry = new Registry(msgTypes); @@ -96,31 +96,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgCreatePeriodicVestingAccount({ value, fee, memo }: sendMsgCreatePeriodicVestingAccountParams): Promise { + async sendMsgCreatePermanentLockedAccount({ value, fee, memo }: sendMsgCreatePermanentLockedAccountParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreatePeriodicVestingAccount: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreatePeriodicVestingAccount({ value: MsgCreatePeriodicVestingAccount.fromPartial(value) }) + let msg = this.msgCreatePermanentLockedAccount({ value: MsgCreatePermanentLockedAccount.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreatePeriodicVestingAccount: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreatePermanentLockedAccount({ value, fee, memo }: sendMsgCreatePermanentLockedAccountParams): Promise { + async sendMsgCreatePeriodicVestingAccount({ value, fee, memo }: sendMsgCreatePeriodicVestingAccountParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreatePeriodicVestingAccount: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreatePermanentLockedAccount({ value: MsgCreatePermanentLockedAccount.fromPartial(value) }) + let msg = this.msgCreatePeriodicVestingAccount({ value: MsgCreatePeriodicVestingAccount.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreatePeriodicVestingAccount: Could not broadcast Tx: '+ e.message) } }, @@ -133,19 +133,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgCreatePeriodicVestingAccount({ value }: msgCreatePeriodicVestingAccountParams): EncodeObject { + msgCreatePermanentLockedAccount({ value }: msgCreatePermanentLockedAccountParams): EncodeObject { try { - return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.fromPartial( value ) } + return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreatePeriodicVestingAccount: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreatePermanentLockedAccount: Could not create message: ' + e.message) } }, - msgCreatePermanentLockedAccount({ value }: msgCreatePermanentLockedAccountParams): EncodeObject { + msgCreatePeriodicVestingAccount({ value }: msgCreatePeriodicVestingAccountParams): EncodeObject { try { - return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.fromPartial( value ) } + return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", value: MsgCreatePeriodicVestingAccount.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreatePermanentLockedAccount: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreatePeriodicVestingAccount: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/registry.ts index a0518806d9..48f71f74b5 100755 --- a/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmos.vesting.v1beta1/registry.ts @@ -1,13 +1,13 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; +import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], - ["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount], ["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount], + ["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount], ]; diff --git a/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/module.ts b/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/module.ts index 2d765f2a72..3d7e5c8910 100755 --- a/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/module.ts +++ b/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/module.ts @@ -8,24 +8,24 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgStoreAndMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgPinCodes } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; +import { MsgSudoContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgAddCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; import { MsgStoreCode } from "./types/cosmwasm/wasm/v1/tx"; import { MsgInstantiateContract2 } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; import { MsgUpdateParams } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgPinCodes } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgAddCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreAndInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgUpdateInstantiateConfig } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; import { MsgRemoveCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; import { MsgUnpinCodes } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreAndMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgSudoContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; +import { MsgUpdateInstantiateConfig } from "./types/cosmwasm/wasm/v1/tx"; import { MsgUpdateAdmin } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgStoreAndInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; import { StoreCodeAuthorization as typeStoreCodeAuthorization} from "./types" import { ContractExecutionAuthorization as typeContractExecutionAuthorization} from "./types" @@ -65,22 +65,22 @@ import { ContractCodeHistoryEntry as typeContractCodeHistoryEntry} from "./types import { AbsoluteTxPosition as typeAbsoluteTxPosition} from "./types" import { Model as typeModel} from "./types" -export { MsgStoreCode, MsgInstantiateContract2, MsgUpdateParams, MsgPinCodes, MsgAddCodeUploadParamsAddresses, MsgClearAdmin, MsgStoreAndInstantiateContract, MsgUpdateInstantiateConfig, MsgInstantiateContract, MsgMigrateContract, MsgRemoveCodeUploadParamsAddresses, MsgUnpinCodes, MsgStoreAndMigrateContract, MsgIBCCloseChannel, MsgExecuteContract, MsgSudoContract, MsgIBCSend, MsgUpdateAdmin }; +export { MsgMigrateContract, MsgStoreAndMigrateContract, MsgInstantiateContract, MsgPinCodes, MsgClearAdmin, MsgIBCSend, MsgSudoContract, MsgExecuteContract, MsgAddCodeUploadParamsAddresses, MsgStoreCode, MsgInstantiateContract2, MsgIBCCloseChannel, MsgUpdateParams, MsgRemoveCodeUploadParamsAddresses, MsgUnpinCodes, MsgUpdateInstantiateConfig, MsgUpdateAdmin, MsgStoreAndInstantiateContract }; -type sendMsgStoreCodeParams = { - value: MsgStoreCode, +type sendMsgMigrateContractParams = { + value: MsgMigrateContract, fee?: StdFee, memo?: string }; -type sendMsgInstantiateContract2Params = { - value: MsgInstantiateContract2, +type sendMsgStoreAndMigrateContractParams = { + value: MsgStoreAndMigrateContract, fee?: StdFee, memo?: string }; -type sendMsgUpdateParamsParams = { - value: MsgUpdateParams, +type sendMsgInstantiateContractParams = { + value: MsgInstantiateContract, fee?: StdFee, memo?: string }; @@ -91,80 +91,74 @@ type sendMsgPinCodesParams = { memo?: string }; -type sendMsgAddCodeUploadParamsAddressesParams = { - value: MsgAddCodeUploadParamsAddresses, - fee?: StdFee, - memo?: string -}; - type sendMsgClearAdminParams = { value: MsgClearAdmin, fee?: StdFee, memo?: string }; -type sendMsgStoreAndInstantiateContractParams = { - value: MsgStoreAndInstantiateContract, +type sendMsgIBCSendParams = { + value: MsgIBCSend, fee?: StdFee, memo?: string }; -type sendMsgUpdateInstantiateConfigParams = { - value: MsgUpdateInstantiateConfig, +type sendMsgSudoContractParams = { + value: MsgSudoContract, fee?: StdFee, memo?: string }; -type sendMsgInstantiateContractParams = { - value: MsgInstantiateContract, +type sendMsgExecuteContractParams = { + value: MsgExecuteContract, fee?: StdFee, memo?: string }; -type sendMsgMigrateContractParams = { - value: MsgMigrateContract, +type sendMsgAddCodeUploadParamsAddressesParams = { + value: MsgAddCodeUploadParamsAddresses, fee?: StdFee, memo?: string }; -type sendMsgRemoveCodeUploadParamsAddressesParams = { - value: MsgRemoveCodeUploadParamsAddresses, +type sendMsgStoreCodeParams = { + value: MsgStoreCode, fee?: StdFee, memo?: string }; -type sendMsgUnpinCodesParams = { - value: MsgUnpinCodes, +type sendMsgInstantiateContract2Params = { + value: MsgInstantiateContract2, fee?: StdFee, memo?: string }; -type sendMsgStoreAndMigrateContractParams = { - value: MsgStoreAndMigrateContract, +type sendMsgIBCCloseChannelParams = { + value: MsgIBCCloseChannel, fee?: StdFee, memo?: string }; -type sendMsgIBCCloseChannelParams = { - value: MsgIBCCloseChannel, +type sendMsgUpdateParamsParams = { + value: MsgUpdateParams, fee?: StdFee, memo?: string }; -type sendMsgExecuteContractParams = { - value: MsgExecuteContract, +type sendMsgRemoveCodeUploadParamsAddressesParams = { + value: MsgRemoveCodeUploadParamsAddresses, fee?: StdFee, memo?: string }; -type sendMsgSudoContractParams = { - value: MsgSudoContract, +type sendMsgUnpinCodesParams = { + value: MsgUnpinCodes, fee?: StdFee, memo?: string }; -type sendMsgIBCSendParams = { - value: MsgIBCSend, +type sendMsgUpdateInstantiateConfigParams = { + value: MsgUpdateInstantiateConfig, fee?: StdFee, memo?: string }; @@ -175,79 +169,85 @@ type sendMsgUpdateAdminParams = { memo?: string }; +type sendMsgStoreAndInstantiateContractParams = { + value: MsgStoreAndInstantiateContract, + fee?: StdFee, + memo?: string +}; -type msgStoreCodeParams = { - value: MsgStoreCode, + +type msgMigrateContractParams = { + value: MsgMigrateContract, }; -type msgInstantiateContract2Params = { - value: MsgInstantiateContract2, +type msgStoreAndMigrateContractParams = { + value: MsgStoreAndMigrateContract, }; -type msgUpdateParamsParams = { - value: MsgUpdateParams, +type msgInstantiateContractParams = { + value: MsgInstantiateContract, }; type msgPinCodesParams = { value: MsgPinCodes, }; -type msgAddCodeUploadParamsAddressesParams = { - value: MsgAddCodeUploadParamsAddresses, -}; - type msgClearAdminParams = { value: MsgClearAdmin, }; -type msgStoreAndInstantiateContractParams = { - value: MsgStoreAndInstantiateContract, -}; - -type msgUpdateInstantiateConfigParams = { - value: MsgUpdateInstantiateConfig, +type msgIBCSendParams = { + value: MsgIBCSend, }; -type msgInstantiateContractParams = { - value: MsgInstantiateContract, +type msgSudoContractParams = { + value: MsgSudoContract, }; -type msgMigrateContractParams = { - value: MsgMigrateContract, +type msgExecuteContractParams = { + value: MsgExecuteContract, }; -type msgRemoveCodeUploadParamsAddressesParams = { - value: MsgRemoveCodeUploadParamsAddresses, +type msgAddCodeUploadParamsAddressesParams = { + value: MsgAddCodeUploadParamsAddresses, }; -type msgUnpinCodesParams = { - value: MsgUnpinCodes, +type msgStoreCodeParams = { + value: MsgStoreCode, }; -type msgStoreAndMigrateContractParams = { - value: MsgStoreAndMigrateContract, +type msgInstantiateContract2Params = { + value: MsgInstantiateContract2, }; type msgIBCCloseChannelParams = { value: MsgIBCCloseChannel, }; -type msgExecuteContractParams = { - value: MsgExecuteContract, +type msgUpdateParamsParams = { + value: MsgUpdateParams, }; -type msgSudoContractParams = { - value: MsgSudoContract, +type msgRemoveCodeUploadParamsAddressesParams = { + value: MsgRemoveCodeUploadParamsAddresses, }; -type msgIBCSendParams = { - value: MsgIBCSend, +type msgUnpinCodesParams = { + value: MsgUnpinCodes, +}; + +type msgUpdateInstantiateConfigParams = { + value: MsgUpdateInstantiateConfig, }; type msgUpdateAdminParams = { value: MsgUpdateAdmin, }; +type msgStoreAndInstantiateContractParams = { + value: MsgStoreAndInstantiateContract, +}; + export const registry = new Registry(msgTypes); @@ -278,45 +278,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgStoreCode({ value, fee, memo }: sendMsgStoreCodeParams): Promise { + async sendMsgMigrateContract({ value, fee, memo }: sendMsgMigrateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgStoreCode: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgMigrateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgStoreCode({ value: MsgStoreCode.fromPartial(value) }) + let msg = this.msgMigrateContract({ value: MsgMigrateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgStoreCode: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgMigrateContract: Could not broadcast Tx: '+ e.message) } }, - async sendMsgInstantiateContract2({ value, fee, memo }: sendMsgInstantiateContract2Params): Promise { + async sendMsgStoreAndMigrateContract({ value, fee, memo }: sendMsgStoreAndMigrateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgInstantiateContract2: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgStoreAndMigrateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgInstantiateContract2({ value: MsgInstantiateContract2.fromPartial(value) }) + let msg = this.msgStoreAndMigrateContract({ value: MsgStoreAndMigrateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgInstantiateContract2: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgStoreAndMigrateContract: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { + async sendMsgInstantiateContract({ value, fee, memo }: sendMsgInstantiateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgInstantiateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) + let msg = this.msgInstantiateContract({ value: MsgInstantiateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgInstantiateContract: Could not broadcast Tx: '+ e.message) } }, @@ -334,224 +334,224 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgAddCodeUploadParamsAddresses({ value, fee, memo }: sendMsgAddCodeUploadParamsAddressesParams): Promise { + async sendMsgClearAdmin({ value, fee, memo }: sendMsgClearAdminParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgAddCodeUploadParamsAddresses: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgClearAdmin: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgAddCodeUploadParamsAddresses({ value: MsgAddCodeUploadParamsAddresses.fromPartial(value) }) + let msg = this.msgClearAdmin({ value: MsgClearAdmin.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgAddCodeUploadParamsAddresses: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgClearAdmin: Could not broadcast Tx: '+ e.message) } }, - async sendMsgClearAdmin({ value, fee, memo }: sendMsgClearAdminParams): Promise { + async sendMsgIBCSend({ value, fee, memo }: sendMsgIBCSendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgClearAdmin: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgIBCSend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgClearAdmin({ value: MsgClearAdmin.fromPartial(value) }) + let msg = this.msgIBCSend({ value: MsgIBCSend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgClearAdmin: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgIBCSend: Could not broadcast Tx: '+ e.message) } }, - async sendMsgStoreAndInstantiateContract({ value, fee, memo }: sendMsgStoreAndInstantiateContractParams): Promise { + async sendMsgSudoContract({ value, fee, memo }: sendMsgSudoContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgStoreAndInstantiateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSudoContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgStoreAndInstantiateContract({ value: MsgStoreAndInstantiateContract.fromPartial(value) }) + let msg = this.msgSudoContract({ value: MsgSudoContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgStoreAndInstantiateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSudoContract: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateInstantiateConfig({ value, fee, memo }: sendMsgUpdateInstantiateConfigParams): Promise { + async sendMsgExecuteContract({ value, fee, memo }: sendMsgExecuteContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateInstantiateConfig: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgExecuteContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateInstantiateConfig({ value: MsgUpdateInstantiateConfig.fromPartial(value) }) + let msg = this.msgExecuteContract({ value: MsgExecuteContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateInstantiateConfig: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgExecuteContract: Could not broadcast Tx: '+ e.message) } }, - async sendMsgInstantiateContract({ value, fee, memo }: sendMsgInstantiateContractParams): Promise { + async sendMsgAddCodeUploadParamsAddresses({ value, fee, memo }: sendMsgAddCodeUploadParamsAddressesParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgInstantiateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgAddCodeUploadParamsAddresses: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgInstantiateContract({ value: MsgInstantiateContract.fromPartial(value) }) + let msg = this.msgAddCodeUploadParamsAddresses({ value: MsgAddCodeUploadParamsAddresses.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgInstantiateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgAddCodeUploadParamsAddresses: Could not broadcast Tx: '+ e.message) } }, - async sendMsgMigrateContract({ value, fee, memo }: sendMsgMigrateContractParams): Promise { + async sendMsgStoreCode({ value, fee, memo }: sendMsgStoreCodeParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgMigrateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgStoreCode: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgMigrateContract({ value: MsgMigrateContract.fromPartial(value) }) + let msg = this.msgStoreCode({ value: MsgStoreCode.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgMigrateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgStoreCode: Could not broadcast Tx: '+ e.message) } }, - async sendMsgRemoveCodeUploadParamsAddresses({ value, fee, memo }: sendMsgRemoveCodeUploadParamsAddressesParams): Promise { + async sendMsgInstantiateContract2({ value, fee, memo }: sendMsgInstantiateContract2Params): Promise { if (!signer) { - throw new Error('TxClient:sendMsgRemoveCodeUploadParamsAddresses: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgInstantiateContract2: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgRemoveCodeUploadParamsAddresses({ value: MsgRemoveCodeUploadParamsAddresses.fromPartial(value) }) + let msg = this.msgInstantiateContract2({ value: MsgInstantiateContract2.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgRemoveCodeUploadParamsAddresses: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgInstantiateContract2: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUnpinCodes({ value, fee, memo }: sendMsgUnpinCodesParams): Promise { + async sendMsgIBCCloseChannel({ value, fee, memo }: sendMsgIBCCloseChannelParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUnpinCodes: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgIBCCloseChannel: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUnpinCodes({ value: MsgUnpinCodes.fromPartial(value) }) + let msg = this.msgIBCCloseChannel({ value: MsgIBCCloseChannel.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUnpinCodes: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgIBCCloseChannel: Could not broadcast Tx: '+ e.message) } }, - async sendMsgStoreAndMigrateContract({ value, fee, memo }: sendMsgStoreAndMigrateContractParams): Promise { + async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgStoreAndMigrateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgStoreAndMigrateContract({ value: MsgStoreAndMigrateContract.fromPartial(value) }) + let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgStoreAndMigrateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) } }, - async sendMsgIBCCloseChannel({ value, fee, memo }: sendMsgIBCCloseChannelParams): Promise { + async sendMsgRemoveCodeUploadParamsAddresses({ value, fee, memo }: sendMsgRemoveCodeUploadParamsAddressesParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgIBCCloseChannel: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgRemoveCodeUploadParamsAddresses: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgIBCCloseChannel({ value: MsgIBCCloseChannel.fromPartial(value) }) + let msg = this.msgRemoveCodeUploadParamsAddresses({ value: MsgRemoveCodeUploadParamsAddresses.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgIBCCloseChannel: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgRemoveCodeUploadParamsAddresses: Could not broadcast Tx: '+ e.message) } }, - async sendMsgExecuteContract({ value, fee, memo }: sendMsgExecuteContractParams): Promise { + async sendMsgUnpinCodes({ value, fee, memo }: sendMsgUnpinCodesParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgExecuteContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUnpinCodes: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgExecuteContract({ value: MsgExecuteContract.fromPartial(value) }) + let msg = this.msgUnpinCodes({ value: MsgUnpinCodes.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgExecuteContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUnpinCodes: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSudoContract({ value, fee, memo }: sendMsgSudoContractParams): Promise { + async sendMsgUpdateInstantiateConfig({ value, fee, memo }: sendMsgUpdateInstantiateConfigParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSudoContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateInstantiateConfig: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSudoContract({ value: MsgSudoContract.fromPartial(value) }) + let msg = this.msgUpdateInstantiateConfig({ value: MsgUpdateInstantiateConfig.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSudoContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateInstantiateConfig: Could not broadcast Tx: '+ e.message) } }, - async sendMsgIBCSend({ value, fee, memo }: sendMsgIBCSendParams): Promise { + async sendMsgUpdateAdmin({ value, fee, memo }: sendMsgUpdateAdminParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgIBCSend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateAdmin: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgIBCSend({ value: MsgIBCSend.fromPartial(value) }) + let msg = this.msgUpdateAdmin({ value: MsgUpdateAdmin.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgIBCSend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateAdmin: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateAdmin({ value, fee, memo }: sendMsgUpdateAdminParams): Promise { + async sendMsgStoreAndInstantiateContract({ value, fee, memo }: sendMsgStoreAndInstantiateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateAdmin: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgStoreAndInstantiateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateAdmin({ value: MsgUpdateAdmin.fromPartial(value) }) + let msg = this.msgStoreAndInstantiateContract({ value: MsgStoreAndInstantiateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateAdmin: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgStoreAndInstantiateContract: Could not broadcast Tx: '+ e.message) } }, - msgStoreCode({ value }: msgStoreCodeParams): EncodeObject { + msgMigrateContract({ value }: msgMigrateContractParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgStoreCode: Could not create message: ' + e.message) + throw new Error('TxClient:MsgMigrateContract: Could not create message: ' + e.message) } }, - msgInstantiateContract2({ value }: msgInstantiateContract2Params): EncodeObject { + msgStoreAndMigrateContract({ value }: msgStoreAndMigrateContractParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgInstantiateContract2: Could not create message: ' + e.message) + throw new Error('TxClient:MsgStoreAndMigrateContract: Could not create message: ' + e.message) } }, - msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { + msgInstantiateContract({ value }: msgInstantiateContractParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) + throw new Error('TxClient:MsgInstantiateContract: Could not create message: ' + e.message) } }, @@ -563,14 +563,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgAddCodeUploadParamsAddresses({ value }: msgAddCodeUploadParamsAddressesParams): EncodeObject { - try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgAddCodeUploadParamsAddresses: Could not create message: ' + e.message) - } - }, - msgClearAdmin({ value }: msgClearAdminParams): EncodeObject { try { return { typeUrl: "/cosmwasm.wasm.v1.MsgClearAdmin", value: MsgClearAdmin.fromPartial( value ) } @@ -579,91 +571,91 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgStoreAndInstantiateContract({ value }: msgStoreAndInstantiateContractParams): EncodeObject { + msgIBCSend({ value }: msgIBCSendParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", value: MsgIBCSend.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgStoreAndInstantiateContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgIBCSend: Could not create message: ' + e.message) } }, - msgUpdateInstantiateConfig({ value }: msgUpdateInstantiateConfigParams): EncodeObject { + msgSudoContract({ value }: msgSudoContractParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateInstantiateConfig: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSudoContract: Could not create message: ' + e.message) } }, - msgInstantiateContract({ value }: msgInstantiateContractParams): EncodeObject { + msgExecuteContract({ value }: msgExecuteContractParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract", value: MsgInstantiateContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgInstantiateContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgExecuteContract: Could not create message: ' + e.message) } }, - msgMigrateContract({ value }: msgMigrateContractParams): EncodeObject { + msgAddCodeUploadParamsAddresses({ value }: msgAddCodeUploadParamsAddressesParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgMigrateContract", value: MsgMigrateContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", value: MsgAddCodeUploadParamsAddresses.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgMigrateContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgAddCodeUploadParamsAddresses: Could not create message: ' + e.message) } }, - msgRemoveCodeUploadParamsAddresses({ value }: msgRemoveCodeUploadParamsAddressesParams): EncodeObject { + msgStoreCode({ value }: msgStoreCodeParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreCode", value: MsgStoreCode.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgRemoveCodeUploadParamsAddresses: Could not create message: ' + e.message) + throw new Error('TxClient:MsgStoreCode: Could not create message: ' + e.message) } }, - msgUnpinCodes({ value }: msgUnpinCodesParams): EncodeObject { + msgInstantiateContract2({ value }: msgInstantiateContract2Params): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgInstantiateContract2", value: MsgInstantiateContract2.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUnpinCodes: Could not create message: ' + e.message) + throw new Error('TxClient:MsgInstantiateContract2: Could not create message: ' + e.message) } }, - msgStoreAndMigrateContract({ value }: msgStoreAndMigrateContractParams): EncodeObject { + msgIBCCloseChannel({ value }: msgIBCCloseChannelParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", value: MsgStoreAndMigrateContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", value: MsgIBCCloseChannel.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgStoreAndMigrateContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgIBCCloseChannel: Could not create message: ' + e.message) } }, - msgIBCCloseChannel({ value }: msgIBCCloseChannelParams): EncodeObject { + msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgIBCCloseChannel", value: MsgIBCCloseChannel.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgIBCCloseChannel: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) } }, - msgExecuteContract({ value }: msgExecuteContractParams): EncodeObject { + msgRemoveCodeUploadParamsAddresses({ value }: msgRemoveCodeUploadParamsAddressesParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract", value: MsgExecuteContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", value: MsgRemoveCodeUploadParamsAddresses.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgExecuteContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgRemoveCodeUploadParamsAddresses: Could not create message: ' + e.message) } }, - msgSudoContract({ value }: msgSudoContractParams): EncodeObject { + msgUnpinCodes({ value }: msgUnpinCodesParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgSudoContract", value: MsgSudoContract.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgUnpinCodes", value: MsgUnpinCodes.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSudoContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUnpinCodes: Could not create message: ' + e.message) } }, - msgIBCSend({ value }: msgIBCSendParams): EncodeObject { + msgUpdateInstantiateConfig({ value }: msgUpdateInstantiateConfigParams): EncodeObject { try { - return { typeUrl: "/cosmwasm.wasm.v1.MsgIBCSend", value: MsgIBCSend.fromPartial( value ) } + return { typeUrl: "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", value: MsgUpdateInstantiateConfig.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgIBCSend: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateInstantiateConfig: Could not create message: ' + e.message) } }, @@ -675,6 +667,14 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, + msgStoreAndInstantiateContract({ value }: msgStoreAndInstantiateContractParams): EncodeObject { + try { + return { typeUrl: "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", value: MsgStoreAndInstantiateContract.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgStoreAndInstantiateContract: Could not create message: ' + e.message) + } + }, + } }; diff --git a/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/registry.ts b/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/registry.ts index bf2378a99f..c1b60f10a3 100755 --- a/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/registry.ts +++ b/wormchain/ts-sdk/src/modules/cosmwasm.wasm.v1/registry.ts @@ -1,43 +1,43 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgStoreAndMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgPinCodes } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; +import { MsgSudoContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgAddCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; import { MsgStoreCode } from "./types/cosmwasm/wasm/v1/tx"; import { MsgInstantiateContract2 } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; import { MsgUpdateParams } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgPinCodes } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgAddCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgClearAdmin } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreAndInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgUpdateInstantiateConfig } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; import { MsgRemoveCodeUploadParamsAddresses } from "./types/cosmwasm/wasm/v1/tx"; import { MsgUnpinCodes } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgStoreAndMigrateContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCCloseChannel } from "./types/cosmwasm/wasm/v1/ibc"; -import { MsgExecuteContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgSudoContract } from "./types/cosmwasm/wasm/v1/tx"; -import { MsgIBCSend } from "./types/cosmwasm/wasm/v1/ibc"; +import { MsgUpdateInstantiateConfig } from "./types/cosmwasm/wasm/v1/tx"; import { MsgUpdateAdmin } from "./types/cosmwasm/wasm/v1/tx"; +import { MsgStoreAndInstantiateContract } from "./types/cosmwasm/wasm/v1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], + ["/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", MsgStoreAndMigrateContract], + ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], + ["/cosmwasm.wasm.v1.MsgPinCodes", MsgPinCodes], + ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], + ["/cosmwasm.wasm.v1.MsgIBCSend", MsgIBCSend], + ["/cosmwasm.wasm.v1.MsgSudoContract", MsgSudoContract], + ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], + ["/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", MsgAddCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgStoreCode", MsgStoreCode], ["/cosmwasm.wasm.v1.MsgInstantiateContract2", MsgInstantiateContract2], + ["/cosmwasm.wasm.v1.MsgIBCCloseChannel", MsgIBCCloseChannel], ["/cosmwasm.wasm.v1.MsgUpdateParams", MsgUpdateParams], - ["/cosmwasm.wasm.v1.MsgPinCodes", MsgPinCodes], - ["/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses", MsgAddCodeUploadParamsAddresses], - ["/cosmwasm.wasm.v1.MsgClearAdmin", MsgClearAdmin], - ["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", MsgStoreAndInstantiateContract], - ["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", MsgUpdateInstantiateConfig], - ["/cosmwasm.wasm.v1.MsgInstantiateContract", MsgInstantiateContract], - ["/cosmwasm.wasm.v1.MsgMigrateContract", MsgMigrateContract], ["/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses", MsgRemoveCodeUploadParamsAddresses], ["/cosmwasm.wasm.v1.MsgUnpinCodes", MsgUnpinCodes], - ["/cosmwasm.wasm.v1.MsgStoreAndMigrateContract", MsgStoreAndMigrateContract], - ["/cosmwasm.wasm.v1.MsgIBCCloseChannel", MsgIBCCloseChannel], - ["/cosmwasm.wasm.v1.MsgExecuteContract", MsgExecuteContract], - ["/cosmwasm.wasm.v1.MsgSudoContract", MsgSudoContract], - ["/cosmwasm.wasm.v1.MsgIBCSend", MsgIBCSend], + ["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig", MsgUpdateInstantiateConfig], ["/cosmwasm.wasm.v1.MsgUpdateAdmin", MsgUpdateAdmin], + ["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract", MsgStoreAndInstantiateContract], ]; diff --git a/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/module.ts b/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/module.ts index 58ec6a3509..2edeb2cacd 100755 --- a/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/module.ts +++ b/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/module.ts @@ -8,78 +8,78 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgSetDenomMetadata } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgCreateDenom } from "./types/osmosis/tokenfactory/v1beta1/tx"; +import { MsgBurn } from "./types/osmosis/tokenfactory/v1beta1/tx"; +import { MsgMint } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgChangeAdmin } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgSetDenomMetadata } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgForceTransfer } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgMint } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgBurn } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { DenomAuthorityMetadata as typeDenomAuthorityMetadata} from "./types" import { GenesisDenom as typeGenesisDenom} from "./types" import { Params as typeParams} from "./types" -export { MsgCreateDenom, MsgChangeAdmin, MsgSetDenomMetadata, MsgForceTransfer, MsgMint, MsgBurn }; +export { MsgSetDenomMetadata, MsgCreateDenom, MsgBurn, MsgMint, MsgChangeAdmin, MsgForceTransfer }; -type sendMsgCreateDenomParams = { - value: MsgCreateDenom, +type sendMsgSetDenomMetadataParams = { + value: MsgSetDenomMetadata, fee?: StdFee, memo?: string }; -type sendMsgChangeAdminParams = { - value: MsgChangeAdmin, +type sendMsgCreateDenomParams = { + value: MsgCreateDenom, fee?: StdFee, memo?: string }; -type sendMsgSetDenomMetadataParams = { - value: MsgSetDenomMetadata, +type sendMsgBurnParams = { + value: MsgBurn, fee?: StdFee, memo?: string }; -type sendMsgForceTransferParams = { - value: MsgForceTransfer, +type sendMsgMintParams = { + value: MsgMint, fee?: StdFee, memo?: string }; -type sendMsgMintParams = { - value: MsgMint, +type sendMsgChangeAdminParams = { + value: MsgChangeAdmin, fee?: StdFee, memo?: string }; -type sendMsgBurnParams = { - value: MsgBurn, +type sendMsgForceTransferParams = { + value: MsgForceTransfer, fee?: StdFee, memo?: string }; -type msgCreateDenomParams = { - value: MsgCreateDenom, -}; - -type msgChangeAdminParams = { - value: MsgChangeAdmin, -}; - type msgSetDenomMetadataParams = { value: MsgSetDenomMetadata, }; -type msgForceTransferParams = { - value: MsgForceTransfer, +type msgCreateDenomParams = { + value: MsgCreateDenom, +}; + +type msgBurnParams = { + value: MsgBurn, }; type msgMintParams = { value: MsgMint, }; -type msgBurnParams = { - value: MsgBurn, +type msgChangeAdminParams = { + value: MsgChangeAdmin, +}; + +type msgForceTransferParams = { + value: MsgForceTransfer, }; @@ -112,136 +112,136 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgCreateDenom({ value, fee, memo }: sendMsgCreateDenomParams): Promise { + async sendMsgSetDenomMetadata({ value, fee, memo }: sendMsgSetDenomMetadataParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateDenom: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSetDenomMetadata: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateDenom({ value: MsgCreateDenom.fromPartial(value) }) + let msg = this.msgSetDenomMetadata({ value: MsgSetDenomMetadata.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateDenom: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSetDenomMetadata: Could not broadcast Tx: '+ e.message) } }, - async sendMsgChangeAdmin({ value, fee, memo }: sendMsgChangeAdminParams): Promise { + async sendMsgCreateDenom({ value, fee, memo }: sendMsgCreateDenomParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgChangeAdmin: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateDenom: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgChangeAdmin({ value: MsgChangeAdmin.fromPartial(value) }) + let msg = this.msgCreateDenom({ value: MsgCreateDenom.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgChangeAdmin: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateDenom: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSetDenomMetadata({ value, fee, memo }: sendMsgSetDenomMetadataParams): Promise { + async sendMsgBurn({ value, fee, memo }: sendMsgBurnParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSetDenomMetadata: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgBurn: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSetDenomMetadata({ value: MsgSetDenomMetadata.fromPartial(value) }) + let msg = this.msgBurn({ value: MsgBurn.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSetDenomMetadata: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgBurn: Could not broadcast Tx: '+ e.message) } }, - async sendMsgForceTransfer({ value, fee, memo }: sendMsgForceTransferParams): Promise { + async sendMsgMint({ value, fee, memo }: sendMsgMintParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgForceTransfer: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgForceTransfer({ value: MsgForceTransfer.fromPartial(value) }) + let msg = this.msgMint({ value: MsgMint.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgForceTransfer: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgMint: Could not broadcast Tx: '+ e.message) } }, - async sendMsgMint({ value, fee, memo }: sendMsgMintParams): Promise { + async sendMsgChangeAdmin({ value, fee, memo }: sendMsgChangeAdminParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgMint: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgChangeAdmin: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgMint({ value: MsgMint.fromPartial(value) }) + let msg = this.msgChangeAdmin({ value: MsgChangeAdmin.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgMint: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgChangeAdmin: Could not broadcast Tx: '+ e.message) } }, - async sendMsgBurn({ value, fee, memo }: sendMsgBurnParams): Promise { + async sendMsgForceTransfer({ value, fee, memo }: sendMsgForceTransferParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgBurn: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgForceTransfer: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgBurn({ value: MsgBurn.fromPartial(value) }) + let msg = this.msgForceTransfer({ value: MsgForceTransfer.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgBurn: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgForceTransfer: Could not broadcast Tx: '+ e.message) } }, - msgCreateDenom({ value }: msgCreateDenomParams): EncodeObject { + msgSetDenomMetadata({ value }: msgSetDenomMetadataParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", value: MsgCreateDenom.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateDenom: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSetDenomMetadata: Could not create message: ' + e.message) } }, - msgChangeAdmin({ value }: msgChangeAdminParams): EncodeObject { + msgCreateDenom({ value }: msgCreateDenomParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", value: MsgChangeAdmin.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgCreateDenom", value: MsgCreateDenom.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgChangeAdmin: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateDenom: Could not create message: ' + e.message) } }, - msgSetDenomMetadata({ value }: msgSetDenomMetadataParams): EncodeObject { + msgBurn({ value }: msgBurnParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", value: MsgSetDenomMetadata.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", value: MsgBurn.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSetDenomMetadata: Could not create message: ' + e.message) + throw new Error('TxClient:MsgBurn: Could not create message: ' + e.message) } }, - msgForceTransfer({ value }: msgForceTransferParams): EncodeObject { + msgMint({ value }: msgMintParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgForceTransfer", value: MsgForceTransfer.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", value: MsgMint.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgForceTransfer: Could not create message: ' + e.message) + throw new Error('TxClient:MsgMint: Could not create message: ' + e.message) } }, - msgMint({ value }: msgMintParams): EncodeObject { + msgChangeAdmin({ value }: msgChangeAdminParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgMint", value: MsgMint.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", value: MsgChangeAdmin.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgMint: Could not create message: ' + e.message) + throw new Error('TxClient:MsgChangeAdmin: Could not create message: ' + e.message) } }, - msgBurn({ value }: msgBurnParams): EncodeObject { + msgForceTransfer({ value }: msgForceTransferParams): EncodeObject { try { - return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgBurn", value: MsgBurn.fromPartial( value ) } + return { typeUrl: "/osmosis.tokenfactory.v1beta1.MsgForceTransfer", value: MsgForceTransfer.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgBurn: Could not create message: ' + e.message) + throw new Error('TxClient:MsgForceTransfer: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/registry.ts b/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/registry.ts index 3e79211563..d274e6129c 100755 --- a/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/registry.ts +++ b/wormchain/ts-sdk/src/modules/osmosis.tokenfactory.v1beta1/registry.ts @@ -1,19 +1,19 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgSetDenomMetadata } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgCreateDenom } from "./types/osmosis/tokenfactory/v1beta1/tx"; +import { MsgBurn } from "./types/osmosis/tokenfactory/v1beta1/tx"; +import { MsgMint } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgChangeAdmin } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgSetDenomMetadata } from "./types/osmosis/tokenfactory/v1beta1/tx"; import { MsgForceTransfer } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgMint } from "./types/osmosis/tokenfactory/v1beta1/tx"; -import { MsgBurn } from "./types/osmosis/tokenfactory/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", MsgSetDenomMetadata], ["/osmosis.tokenfactory.v1beta1.MsgCreateDenom", MsgCreateDenom], + ["/osmosis.tokenfactory.v1beta1.MsgBurn", MsgBurn], + ["/osmosis.tokenfactory.v1beta1.MsgMint", MsgMint], ["/osmosis.tokenfactory.v1beta1.MsgChangeAdmin", MsgChangeAdmin], - ["/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata", MsgSetDenomMetadata], ["/osmosis.tokenfactory.v1beta1.MsgForceTransfer", MsgForceTransfer], - ["/osmosis.tokenfactory.v1beta1.MsgMint", MsgMint], - ["/osmosis.tokenfactory.v1beta1.MsgBurn", MsgBurn], ]; diff --git a/wormchain/ts-sdk/src/modules/wormchain.wormhole/module.ts b/wormchain/ts-sdk/src/modules/wormchain.wormhole/module.ts index 48836d5ea9..69b4a0b3b0 100755 --- a/wormchain/ts-sdk/src/modules/wormchain.wormhole/module.ts +++ b/wormchain/ts-sdk/src/modules/wormchain.wormhole/module.ts @@ -8,16 +8,16 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgDeleteAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; -import { MsgMigrateContract } from "./types/wormchain/wormhole/tx"; import { MsgExecuteGovernanceVAA } from "./types/wormchain/wormhole/tx"; -import { MsgStoreCode } from "./types/wormchain/wormhole/tx"; +import { MsgCreateAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; import { MsgRegisterAccountAsGuardian } from "./types/wormchain/wormhole/tx"; +import { MsgStoreCode } from "./types/wormchain/wormhole/tx"; import { MsgExecuteGatewayGovernanceVaa } from "./types/wormchain/wormhole/tx"; import { MsgInstantiateContract } from "./types/wormchain/wormhole/tx"; -import { MsgAddWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; -import { MsgCreateAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; import { MsgDeleteWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; +import { MsgAddWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; +import { MsgDeleteAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; +import { MsgMigrateContract } from "./types/wormchain/wormhole/tx"; import { Config as typeConfig} from "./types" import { ConsensusGuardianSetIndex as typeConsensusGuardianSetIndex} from "./types" @@ -34,22 +34,22 @@ import { IbcComposabilityMwContract as typeIbcComposabilityMwContract} from "./t import { ReplayProtection as typeReplayProtection} from "./types" import { SequenceCounter as typeSequenceCounter} from "./types" -export { MsgDeleteAllowlistEntryRequest, MsgMigrateContract, MsgExecuteGovernanceVAA, MsgStoreCode, MsgRegisterAccountAsGuardian, MsgExecuteGatewayGovernanceVaa, MsgInstantiateContract, MsgAddWasmInstantiateAllowlist, MsgCreateAllowlistEntryRequest, MsgDeleteWasmInstantiateAllowlist }; +export { MsgExecuteGovernanceVAA, MsgCreateAllowlistEntryRequest, MsgRegisterAccountAsGuardian, MsgStoreCode, MsgExecuteGatewayGovernanceVaa, MsgInstantiateContract, MsgDeleteWasmInstantiateAllowlist, MsgAddWasmInstantiateAllowlist, MsgDeleteAllowlistEntryRequest, MsgMigrateContract }; -type sendMsgDeleteAllowlistEntryRequestParams = { - value: MsgDeleteAllowlistEntryRequest, +type sendMsgExecuteGovernanceVAAParams = { + value: MsgExecuteGovernanceVAA, fee?: StdFee, memo?: string }; -type sendMsgMigrateContractParams = { - value: MsgMigrateContract, +type sendMsgCreateAllowlistEntryRequestParams = { + value: MsgCreateAllowlistEntryRequest, fee?: StdFee, memo?: string }; -type sendMsgExecuteGovernanceVAAParams = { - value: MsgExecuteGovernanceVAA, +type sendMsgRegisterAccountAsGuardianParams = { + value: MsgRegisterAccountAsGuardian, fee?: StdFee, memo?: string }; @@ -60,12 +60,6 @@ type sendMsgStoreCodeParams = { memo?: string }; -type sendMsgRegisterAccountAsGuardianParams = { - value: MsgRegisterAccountAsGuardian, - fee?: StdFee, - memo?: string -}; - type sendMsgExecuteGatewayGovernanceVaaParams = { value: MsgExecuteGatewayGovernanceVaa, fee?: StdFee, @@ -78,45 +72,47 @@ type sendMsgInstantiateContractParams = { memo?: string }; -type sendMsgAddWasmInstantiateAllowlistParams = { - value: MsgAddWasmInstantiateAllowlist, +type sendMsgDeleteWasmInstantiateAllowlistParams = { + value: MsgDeleteWasmInstantiateAllowlist, fee?: StdFee, memo?: string }; -type sendMsgCreateAllowlistEntryRequestParams = { - value: MsgCreateAllowlistEntryRequest, +type sendMsgAddWasmInstantiateAllowlistParams = { + value: MsgAddWasmInstantiateAllowlist, fee?: StdFee, memo?: string }; -type sendMsgDeleteWasmInstantiateAllowlistParams = { - value: MsgDeleteWasmInstantiateAllowlist, +type sendMsgDeleteAllowlistEntryRequestParams = { + value: MsgDeleteAllowlistEntryRequest, fee?: StdFee, memo?: string }; - -type msgDeleteAllowlistEntryRequestParams = { - value: MsgDeleteAllowlistEntryRequest, -}; - -type msgMigrateContractParams = { +type sendMsgMigrateContractParams = { value: MsgMigrateContract, + fee?: StdFee, + memo?: string }; + type msgExecuteGovernanceVAAParams = { value: MsgExecuteGovernanceVAA, }; -type msgStoreCodeParams = { - value: MsgStoreCode, +type msgCreateAllowlistEntryRequestParams = { + value: MsgCreateAllowlistEntryRequest, }; type msgRegisterAccountAsGuardianParams = { value: MsgRegisterAccountAsGuardian, }; +type msgStoreCodeParams = { + value: MsgStoreCode, +}; + type msgExecuteGatewayGovernanceVaaParams = { value: MsgExecuteGatewayGovernanceVaa, }; @@ -125,16 +121,20 @@ type msgInstantiateContractParams = { value: MsgInstantiateContract, }; +type msgDeleteWasmInstantiateAllowlistParams = { + value: MsgDeleteWasmInstantiateAllowlist, +}; + type msgAddWasmInstantiateAllowlistParams = { value: MsgAddWasmInstantiateAllowlist, }; -type msgCreateAllowlistEntryRequestParams = { - value: MsgCreateAllowlistEntryRequest, +type msgDeleteAllowlistEntryRequestParams = { + value: MsgDeleteAllowlistEntryRequest, }; -type msgDeleteWasmInstantiateAllowlistParams = { - value: MsgDeleteWasmInstantiateAllowlist, +type msgMigrateContractParams = { + value: MsgMigrateContract, }; @@ -167,45 +167,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgDeleteAllowlistEntryRequest({ value, fee, memo }: sendMsgDeleteAllowlistEntryRequestParams): Promise { + async sendMsgExecuteGovernanceVAA({ value, fee, memo }: sendMsgExecuteGovernanceVAAParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDeleteAllowlistEntryRequest: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgExecuteGovernanceVAA: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDeleteAllowlistEntryRequest({ value: MsgDeleteAllowlistEntryRequest.fromPartial(value) }) + let msg = this.msgExecuteGovernanceVAA({ value: MsgExecuteGovernanceVAA.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDeleteAllowlistEntryRequest: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgExecuteGovernanceVAA: Could not broadcast Tx: '+ e.message) } }, - async sendMsgMigrateContract({ value, fee, memo }: sendMsgMigrateContractParams): Promise { + async sendMsgCreateAllowlistEntryRequest({ value, fee, memo }: sendMsgCreateAllowlistEntryRequestParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgMigrateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateAllowlistEntryRequest: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgMigrateContract({ value: MsgMigrateContract.fromPartial(value) }) + let msg = this.msgCreateAllowlistEntryRequest({ value: MsgCreateAllowlistEntryRequest.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgMigrateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateAllowlistEntryRequest: Could not broadcast Tx: '+ e.message) } }, - async sendMsgExecuteGovernanceVAA({ value, fee, memo }: sendMsgExecuteGovernanceVAAParams): Promise { + async sendMsgRegisterAccountAsGuardian({ value, fee, memo }: sendMsgRegisterAccountAsGuardianParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgExecuteGovernanceVAA: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgRegisterAccountAsGuardian: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgExecuteGovernanceVAA({ value: MsgExecuteGovernanceVAA.fromPartial(value) }) + let msg = this.msgRegisterAccountAsGuardian({ value: MsgRegisterAccountAsGuardian.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgExecuteGovernanceVAA: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgRegisterAccountAsGuardian: Could not broadcast Tx: '+ e.message) } }, @@ -223,45 +223,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgRegisterAccountAsGuardian({ value, fee, memo }: sendMsgRegisterAccountAsGuardianParams): Promise { + async sendMsgExecuteGatewayGovernanceVaa({ value, fee, memo }: sendMsgExecuteGatewayGovernanceVaaParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgRegisterAccountAsGuardian: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgExecuteGatewayGovernanceVaa: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgRegisterAccountAsGuardian({ value: MsgRegisterAccountAsGuardian.fromPartial(value) }) + let msg = this.msgExecuteGatewayGovernanceVaa({ value: MsgExecuteGatewayGovernanceVaa.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgRegisterAccountAsGuardian: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgExecuteGatewayGovernanceVaa: Could not broadcast Tx: '+ e.message) } }, - async sendMsgExecuteGatewayGovernanceVaa({ value, fee, memo }: sendMsgExecuteGatewayGovernanceVaaParams): Promise { + async sendMsgInstantiateContract({ value, fee, memo }: sendMsgInstantiateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgExecuteGatewayGovernanceVaa: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgInstantiateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgExecuteGatewayGovernanceVaa({ value: MsgExecuteGatewayGovernanceVaa.fromPartial(value) }) + let msg = this.msgInstantiateContract({ value: MsgInstantiateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgExecuteGatewayGovernanceVaa: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgInstantiateContract: Could not broadcast Tx: '+ e.message) } }, - async sendMsgInstantiateContract({ value, fee, memo }: sendMsgInstantiateContractParams): Promise { + async sendMsgDeleteWasmInstantiateAllowlist({ value, fee, memo }: sendMsgDeleteWasmInstantiateAllowlistParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgInstantiateContract: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeleteWasmInstantiateAllowlist: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgInstantiateContract({ value: MsgInstantiateContract.fromPartial(value) }) + let msg = this.msgDeleteWasmInstantiateAllowlist({ value: MsgDeleteWasmInstantiateAllowlist.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgInstantiateContract: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeleteWasmInstantiateAllowlist: Could not broadcast Tx: '+ e.message) } }, @@ -279,56 +279,56 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgCreateAllowlistEntryRequest({ value, fee, memo }: sendMsgCreateAllowlistEntryRequestParams): Promise { + async sendMsgDeleteAllowlistEntryRequest({ value, fee, memo }: sendMsgDeleteAllowlistEntryRequestParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateAllowlistEntryRequest: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeleteAllowlistEntryRequest: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateAllowlistEntryRequest({ value: MsgCreateAllowlistEntryRequest.fromPartial(value) }) + let msg = this.msgDeleteAllowlistEntryRequest({ value: MsgDeleteAllowlistEntryRequest.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateAllowlistEntryRequest: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeleteAllowlistEntryRequest: Could not broadcast Tx: '+ e.message) } }, - async sendMsgDeleteWasmInstantiateAllowlist({ value, fee, memo }: sendMsgDeleteWasmInstantiateAllowlistParams): Promise { + async sendMsgMigrateContract({ value, fee, memo }: sendMsgMigrateContractParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDeleteWasmInstantiateAllowlist: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgMigrateContract: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDeleteWasmInstantiateAllowlist({ value: MsgDeleteWasmInstantiateAllowlist.fromPartial(value) }) + let msg = this.msgMigrateContract({ value: MsgMigrateContract.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDeleteWasmInstantiateAllowlist: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgMigrateContract: Could not broadcast Tx: '+ e.message) } }, - msgDeleteAllowlistEntryRequest({ value }: msgDeleteAllowlistEntryRequestParams): EncodeObject { + msgExecuteGovernanceVAA({ value }: msgExecuteGovernanceVAAParams): EncodeObject { try { - return { typeUrl: "/wormchain.wormhole.MsgDeleteAllowlistEntryRequest", value: MsgDeleteAllowlistEntryRequest.fromPartial( value ) } + return { typeUrl: "/wormchain.wormhole.MsgExecuteGovernanceVAA", value: MsgExecuteGovernanceVAA.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDeleteAllowlistEntryRequest: Could not create message: ' + e.message) + throw new Error('TxClient:MsgExecuteGovernanceVAA: Could not create message: ' + e.message) } }, - msgMigrateContract({ value }: msgMigrateContractParams): EncodeObject { + msgCreateAllowlistEntryRequest({ value }: msgCreateAllowlistEntryRequestParams): EncodeObject { try { - return { typeUrl: "/wormchain.wormhole.MsgMigrateContract", value: MsgMigrateContract.fromPartial( value ) } + return { typeUrl: "/wormchain.wormhole.MsgCreateAllowlistEntryRequest", value: MsgCreateAllowlistEntryRequest.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgMigrateContract: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateAllowlistEntryRequest: Could not create message: ' + e.message) } }, - msgExecuteGovernanceVAA({ value }: msgExecuteGovernanceVAAParams): EncodeObject { + msgRegisterAccountAsGuardian({ value }: msgRegisterAccountAsGuardianParams): EncodeObject { try { - return { typeUrl: "/wormchain.wormhole.MsgExecuteGovernanceVAA", value: MsgExecuteGovernanceVAA.fromPartial( value ) } + return { typeUrl: "/wormchain.wormhole.MsgRegisterAccountAsGuardian", value: MsgRegisterAccountAsGuardian.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgExecuteGovernanceVAA: Could not create message: ' + e.message) + throw new Error('TxClient:MsgRegisterAccountAsGuardian: Could not create message: ' + e.message) } }, @@ -340,14 +340,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgRegisterAccountAsGuardian({ value }: msgRegisterAccountAsGuardianParams): EncodeObject { - try { - return { typeUrl: "/wormchain.wormhole.MsgRegisterAccountAsGuardian", value: MsgRegisterAccountAsGuardian.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgRegisterAccountAsGuardian: Could not create message: ' + e.message) - } - }, - msgExecuteGatewayGovernanceVaa({ value }: msgExecuteGatewayGovernanceVaaParams): EncodeObject { try { return { typeUrl: "/wormchain.wormhole.MsgExecuteGatewayGovernanceVaa", value: MsgExecuteGatewayGovernanceVaa.fromPartial( value ) } @@ -364,6 +356,14 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, + msgDeleteWasmInstantiateAllowlist({ value }: msgDeleteWasmInstantiateAllowlistParams): EncodeObject { + try { + return { typeUrl: "/wormchain.wormhole.MsgDeleteWasmInstantiateAllowlist", value: MsgDeleteWasmInstantiateAllowlist.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgDeleteWasmInstantiateAllowlist: Could not create message: ' + e.message) + } + }, + msgAddWasmInstantiateAllowlist({ value }: msgAddWasmInstantiateAllowlistParams): EncodeObject { try { return { typeUrl: "/wormchain.wormhole.MsgAddWasmInstantiateAllowlist", value: MsgAddWasmInstantiateAllowlist.fromPartial( value ) } @@ -372,19 +372,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgCreateAllowlistEntryRequest({ value }: msgCreateAllowlistEntryRequestParams): EncodeObject { + msgDeleteAllowlistEntryRequest({ value }: msgDeleteAllowlistEntryRequestParams): EncodeObject { try { - return { typeUrl: "/wormchain.wormhole.MsgCreateAllowlistEntryRequest", value: MsgCreateAllowlistEntryRequest.fromPartial( value ) } + return { typeUrl: "/wormchain.wormhole.MsgDeleteAllowlistEntryRequest", value: MsgDeleteAllowlistEntryRequest.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateAllowlistEntryRequest: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDeleteAllowlistEntryRequest: Could not create message: ' + e.message) } }, - msgDeleteWasmInstantiateAllowlist({ value }: msgDeleteWasmInstantiateAllowlistParams): EncodeObject { + msgMigrateContract({ value }: msgMigrateContractParams): EncodeObject { try { - return { typeUrl: "/wormchain.wormhole.MsgDeleteWasmInstantiateAllowlist", value: MsgDeleteWasmInstantiateAllowlist.fromPartial( value ) } + return { typeUrl: "/wormchain.wormhole.MsgMigrateContract", value: MsgMigrateContract.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDeleteWasmInstantiateAllowlist: Could not create message: ' + e.message) + throw new Error('TxClient:MsgMigrateContract: Could not create message: ' + e.message) } }, diff --git a/wormchain/ts-sdk/src/modules/wormchain.wormhole/registry.ts b/wormchain/ts-sdk/src/modules/wormchain.wormhole/registry.ts index b944caec4e..c9fff24704 100755 --- a/wormchain/ts-sdk/src/modules/wormchain.wormhole/registry.ts +++ b/wormchain/ts-sdk/src/modules/wormchain.wormhole/registry.ts @@ -1,27 +1,27 @@ //@ts-nocheck import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgDeleteAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; -import { MsgMigrateContract } from "./types/wormchain/wormhole/tx"; import { MsgExecuteGovernanceVAA } from "./types/wormchain/wormhole/tx"; -import { MsgStoreCode } from "./types/wormchain/wormhole/tx"; +import { MsgCreateAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; import { MsgRegisterAccountAsGuardian } from "./types/wormchain/wormhole/tx"; +import { MsgStoreCode } from "./types/wormchain/wormhole/tx"; import { MsgExecuteGatewayGovernanceVaa } from "./types/wormchain/wormhole/tx"; import { MsgInstantiateContract } from "./types/wormchain/wormhole/tx"; -import { MsgAddWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; -import { MsgCreateAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; import { MsgDeleteWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; +import { MsgAddWasmInstantiateAllowlist } from "./types/wormchain/wormhole/tx"; +import { MsgDeleteAllowlistEntryRequest } from "./types/wormchain/wormhole/tx"; +import { MsgMigrateContract } from "./types/wormchain/wormhole/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/wormchain.wormhole.MsgDeleteAllowlistEntryRequest", MsgDeleteAllowlistEntryRequest], - ["/wormchain.wormhole.MsgMigrateContract", MsgMigrateContract], ["/wormchain.wormhole.MsgExecuteGovernanceVAA", MsgExecuteGovernanceVAA], - ["/wormchain.wormhole.MsgStoreCode", MsgStoreCode], + ["/wormchain.wormhole.MsgCreateAllowlistEntryRequest", MsgCreateAllowlistEntryRequest], ["/wormchain.wormhole.MsgRegisterAccountAsGuardian", MsgRegisterAccountAsGuardian], + ["/wormchain.wormhole.MsgStoreCode", MsgStoreCode], ["/wormchain.wormhole.MsgExecuteGatewayGovernanceVaa", MsgExecuteGatewayGovernanceVaa], ["/wormchain.wormhole.MsgInstantiateContract", MsgInstantiateContract], - ["/wormchain.wormhole.MsgAddWasmInstantiateAllowlist", MsgAddWasmInstantiateAllowlist], - ["/wormchain.wormhole.MsgCreateAllowlistEntryRequest", MsgCreateAllowlistEntryRequest], ["/wormchain.wormhole.MsgDeleteWasmInstantiateAllowlist", MsgDeleteWasmInstantiateAllowlist], + ["/wormchain.wormhole.MsgAddWasmInstantiateAllowlist", MsgAddWasmInstantiateAllowlist], + ["/wormchain.wormhole.MsgDeleteAllowlistEntryRequest", MsgDeleteAllowlistEntryRequest], + ["/wormchain.wormhole.MsgMigrateContract", MsgMigrateContract], ];