decentralcardgame-cardchain-client-ts 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.ts +673 -638
  2. package/DecentralCardGame.cardchain.cardchain/registry.ts +72 -70
  3. package/DecentralCardGame.cardchain.cardchain/rest.ts +11 -1
  4. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +33 -6
  5. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.ts +11 -17
  6. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +1 -252
  7. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +203 -11
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.ts +8 -77
  9. package/DecentralCardGame.cardchain.cardchain/types.ts +22 -20
  10. package/cosmos.authz.v1beta1/module.ts +24 -24
  11. package/cosmos.authz.v1beta1/registry.ts +2 -2
  12. package/cosmos.bank.v1beta1/module.ts +24 -24
  13. package/cosmos.bank.v1beta1/registry.ts +2 -2
  14. package/cosmos.base.tendermint.v1beta1/rest.ts +3 -3
  15. package/cosmos.base.tendermint.v1beta1/types/tendermint/crypto/keys.ts +1 -1
  16. package/cosmos.base.tendermint.v1beta1/types/tendermint/types/types.ts +1 -1
  17. package/cosmos.distribution.v1beta1/module.ts +46 -46
  18. package/cosmos.distribution.v1beta1/registry.ts +4 -4
  19. package/cosmos.gov.v1/module.ts +29 -29
  20. package/cosmos.gov.v1/registry.ts +2 -2
  21. package/cosmos.gov.v1beta1/module.ts +47 -47
  22. package/cosmos.gov.v1beta1/registry.ts +4 -4
  23. package/cosmos.group.v1/module.ts +163 -163
  24. package/cosmos.group.v1/registry.ts +18 -18
  25. package/cosmos.group.v1/rest.ts +39 -0
  26. package/cosmos.group.v1/types/cosmos/group/v1/query.ts +150 -0
  27. package/cosmos.staking.v1beta1/module.ts +64 -64
  28. package/cosmos.staking.v1beta1/registry.ts +6 -6
  29. package/cosmos.staking.v1beta1/rest.ts +2 -2
  30. package/cosmos.staking.v1beta1/types/tendermint/crypto/keys.ts +1 -1
  31. package/cosmos.staking.v1beta1/types/tendermint/types/types.ts +1 -1
  32. package/cosmos.tx.v1beta1/rest.ts +3 -3
  33. package/cosmos.tx.v1beta1/types/tendermint/abci/types.ts +1 -1
  34. package/cosmos.tx.v1beta1/types/tendermint/crypto/keys.ts +1 -1
  35. package/cosmos.tx.v1beta1/types/tendermint/types/types.ts +1 -1
  36. package/cosmos.vesting.v1beta1/module.ts +29 -29
  37. package/cosmos.vesting.v1beta1/registry.ts +2 -2
  38. package/cosmos.vesting.v1beta1/rest.ts +4 -1
  39. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/tx.ts +2 -0
  40. package/cosmos.vesting.v1beta1/types/cosmos/vesting/v1beta1/vesting.ts +6 -1
  41. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +143 -0
  42. package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.ts +240 -0
  43. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.ts +361 -0
  44. package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.ts +234 -0
  45. package/ibc.applications.transfer.v1/rest.ts +7 -1
  46. package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.ts +28 -6
  47. package/ibc.core.client.v1/rest.ts +16 -16
  48. package/ibc.core.client.v1/types/ibc/core/client/v1/query.ts +1 -1
  49. package/ibc.core.connection.v1/rest.ts +37 -0
  50. package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.ts +110 -1
  51. package/package.json +1 -1
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
7
7
  import { IgniteClient } from "../client"
8
8
  import { MissingWalletError } from "../helpers"
9
9
  import { Api } from "./rest";
10
- import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
11
- import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
12
10
  import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
13
11
  import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
12
+ import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
13
+ import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
14
14
 
15
15
  import { Params as typeParams} from "./types"
16
16
  import { ValidatorHistoricalRewards as typeValidatorHistoricalRewards} from "./types"
@@ -32,19 +32,7 @@ import { ValidatorCurrentRewardsRecord as typeValidatorCurrentRewardsRecord} fro
32
32
  import { DelegatorStartingInfoRecord as typeDelegatorStartingInfoRecord} from "./types"
33
33
  import { ValidatorSlashEventRecord as typeValidatorSlashEventRecord} from "./types"
34
34
 
35
- export { MsgSetWithdrawAddress, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgWithdrawDelegatorReward };
36
-
37
- type sendMsgSetWithdrawAddressParams = {
38
- value: MsgSetWithdrawAddress,
39
- fee?: StdFee,
40
- memo?: string
41
- };
42
-
43
- type sendMsgWithdrawValidatorCommissionParams = {
44
- value: MsgWithdrawValidatorCommission,
45
- fee?: StdFee,
46
- memo?: string
47
- };
35
+ export { MsgFundCommunityPool, MsgWithdrawDelegatorReward, MsgSetWithdrawAddress, MsgWithdrawValidatorCommission };
48
36
 
49
37
  type sendMsgFundCommunityPoolParams = {
50
38
  value: MsgFundCommunityPool,
@@ -58,15 +46,19 @@ type sendMsgWithdrawDelegatorRewardParams = {
58
46
  memo?: string
59
47
  };
60
48
 
61
-
62
- type msgSetWithdrawAddressParams = {
49
+ type sendMsgSetWithdrawAddressParams = {
63
50
  value: MsgSetWithdrawAddress,
51
+ fee?: StdFee,
52
+ memo?: string
64
53
  };
65
54
 
66
- type msgWithdrawValidatorCommissionParams = {
55
+ type sendMsgWithdrawValidatorCommissionParams = {
67
56
  value: MsgWithdrawValidatorCommission,
57
+ fee?: StdFee,
58
+ memo?: string
68
59
  };
69
60
 
61
+
70
62
  type msgFundCommunityPoolParams = {
71
63
  value: MsgFundCommunityPool,
72
64
  };
@@ -75,6 +67,14 @@ type msgWithdrawDelegatorRewardParams = {
75
67
  value: MsgWithdrawDelegatorReward,
76
68
  };
77
69
 
70
+ type msgSetWithdrawAddressParams = {
71
+ value: MsgSetWithdrawAddress,
72
+ };
73
+
74
+ type msgWithdrawValidatorCommissionParams = {
75
+ value: MsgWithdrawValidatorCommission,
76
+ };
77
+
78
78
 
79
79
  export const registry = new Registry(msgTypes);
80
80
 
@@ -105,92 +105,92 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
105
105
 
106
106
  return {
107
107
 
108
- async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise<DeliverTxResponse> {
108
+ async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise<DeliverTxResponse> {
109
109
  if (!signer) {
110
- throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.')
110
+ throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.')
111
111
  }
112
112
  try {
113
113
  const { address } = (await signer.getAccounts())[0];
114
114
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
115
- let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) })
115
+ let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) })
116
116
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
117
117
  } catch (e: any) {
118
- throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message)
118
+ throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message)
119
119
  }
120
120
  },
121
121
 
122
- async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise<DeliverTxResponse> {
122
+ async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise<DeliverTxResponse> {
123
123
  if (!signer) {
124
- throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.')
124
+ throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.')
125
125
  }
126
126
  try {
127
127
  const { address } = (await signer.getAccounts())[0];
128
128
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
129
- let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) })
129
+ let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) })
130
130
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
131
131
  } catch (e: any) {
132
- throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message)
132
+ throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message)
133
133
  }
134
134
  },
135
135
 
136
- async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise<DeliverTxResponse> {
136
+ async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise<DeliverTxResponse> {
137
137
  if (!signer) {
138
- throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.')
138
+ throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.')
139
139
  }
140
140
  try {
141
141
  const { address } = (await signer.getAccounts())[0];
142
142
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
143
- let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) })
143
+ let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) })
144
144
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
145
145
  } catch (e: any) {
146
- throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message)
146
+ throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message)
147
147
  }
148
148
  },
149
149
 
150
- async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise<DeliverTxResponse> {
150
+ async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise<DeliverTxResponse> {
151
151
  if (!signer) {
152
- throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.')
152
+ throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.')
153
153
  }
154
154
  try {
155
155
  const { address } = (await signer.getAccounts())[0];
156
156
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
157
- let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) })
157
+ let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) })
158
158
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
159
159
  } catch (e: any) {
160
- throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message)
160
+ throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message)
161
161
  }
162
162
  },
163
163
 
164
164
 
165
- msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject {
165
+ msgFundCommunityPool({ value }: msgFundCommunityPoolParams): EncodeObject {
166
166
  try {
167
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) }
167
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( value ) }
168
168
  } catch (e: any) {
169
- throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message)
169
+ throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message)
170
170
  }
171
171
  },
172
172
 
173
- msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject {
173
+ msgWithdrawDelegatorReward({ value }: msgWithdrawDelegatorRewardParams): EncodeObject {
174
174
  try {
175
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) }
175
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( value ) }
176
176
  } catch (e: any) {
177
- throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message)
177
+ throw new Error('TxClient:MsgWithdrawDelegatorReward: Could not create message: ' + e.message)
178
178
  }
179
179
  },
180
180
 
181
- msgFundCommunityPool({ value }: msgFundCommunityPoolParams): EncodeObject {
181
+ msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject {
182
182
  try {
183
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( value ) }
183
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) }
184
184
  } catch (e: any) {
185
- throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message)
185
+ throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message)
186
186
  }
187
187
  },
188
188
 
189
- msgWithdrawDelegatorReward({ value }: msgWithdrawDelegatorRewardParams): EncodeObject {
189
+ msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject {
190
190
  try {
191
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( value ) }
191
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) }
192
192
  } catch (e: any) {
193
- throw new Error('TxClient:MsgWithdrawDelegatorReward: Could not create message: ' + e.message)
193
+ throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message)
194
194
  }
195
195
  },
196
196
 
@@ -1,14 +1,14 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
3
- import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
4
2
  import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
5
3
  import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
4
+ import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
5
+ import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
6
6
 
7
7
  const msgTypes: Array<[string, GeneratedType]> = [
8
- ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
9
- ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
10
8
  ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool],
11
9
  ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward],
10
+ ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
11
+ ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
12
12
 
13
13
  ];
14
14
 
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
7
7
  import { IgniteClient } from "../client"
8
8
  import { MissingWalletError } from "../helpers"
9
9
  import { Api } from "./rest";
10
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
11
10
  import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
12
11
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
13
12
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
13
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
14
14
 
15
15
  import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
16
16
  import { Deposit as typeDeposit} from "./types"
@@ -21,13 +21,7 @@ import { DepositParams as typeDepositParams} from "./types"
21
21
  import { VotingParams as typeVotingParams} from "./types"
22
22
  import { TallyParams as typeTallyParams} from "./types"
23
23
 
24
- export { MsgVoteWeighted, MsgSubmitProposal, MsgDeposit, MsgVote };
25
-
26
- type sendMsgVoteWeightedParams = {
27
- value: MsgVoteWeighted,
28
- fee?: StdFee,
29
- memo?: string
30
- };
24
+ export { MsgSubmitProposal, MsgDeposit, MsgVote, MsgVoteWeighted };
31
25
 
32
26
  type sendMsgSubmitProposalParams = {
33
27
  value: MsgSubmitProposal,
@@ -47,11 +41,13 @@ type sendMsgVoteParams = {
47
41
  memo?: string
48
42
  };
49
43
 
50
-
51
- type msgVoteWeightedParams = {
44
+ type sendMsgVoteWeightedParams = {
52
45
  value: MsgVoteWeighted,
46
+ fee?: StdFee,
47
+ memo?: string
53
48
  };
54
49
 
50
+
55
51
  type msgSubmitProposalParams = {
56
52
  value: MsgSubmitProposal,
57
53
  };
@@ -64,6 +60,10 @@ type msgVoteParams = {
64
60
  value: MsgVote,
65
61
  };
66
62
 
63
+ type msgVoteWeightedParams = {
64
+ value: MsgVoteWeighted,
65
+ };
66
+
67
67
 
68
68
  export const registry = new Registry(msgTypes);
69
69
 
@@ -94,20 +94,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
94
94
 
95
95
  return {
96
96
 
97
- async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
98
- if (!signer) {
99
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
100
- }
101
- try {
102
- const { address } = (await signer.getAccounts())[0];
103
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
104
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
105
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
106
- } catch (e: any) {
107
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
108
- }
109
- },
110
-
111
97
  async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
112
98
  if (!signer) {
113
99
  throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
@@ -150,15 +136,21 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
150
136
  }
151
137
  },
152
138
 
153
-
154
- msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
155
- try {
156
- return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
139
+ async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
140
+ if (!signer) {
141
+ throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
142
+ }
143
+ try {
144
+ const { address } = (await signer.getAccounts())[0];
145
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
146
+ let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
147
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
157
148
  } catch (e: any) {
158
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
149
+ throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
159
150
  }
160
151
  },
161
152
 
153
+
162
154
  msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
163
155
  try {
164
156
  return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
@@ -183,6 +175,14 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
183
175
  }
184
176
  },
185
177
 
178
+ msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
179
+ try {
180
+ return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
181
+ } catch (e: any) {
182
+ throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
183
+ }
184
+ },
185
+
186
186
  }
187
187
  };
188
188
 
@@ -1,14 +1,14 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
3
2
  import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
4
3
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
5
4
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
5
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
6
6
 
7
7
  const msgTypes: Array<[string, GeneratedType]> = [
8
- ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
9
8
  ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
10
9
  ["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
11
10
  ["/cosmos.gov.v1.MsgVote", MsgVote],
11
+ ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
12
12
 
13
13
  ];
14
14
 
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
7
7
  import { IgniteClient } from "../client"
8
8
  import { MissingWalletError } from "../helpers"
9
9
  import { Api } from "./rest";
10
- import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
11
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
12
10
  import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
11
+ import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
13
12
  import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
13
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
14
14
 
15
15
  import { WeightedVoteOption as typeWeightedVoteOption} from "./types"
16
16
  import { TextProposal as typeTextProposal} from "./types"
@@ -22,22 +22,16 @@ import { DepositParams as typeDepositParams} from "./types"
22
22
  import { VotingParams as typeVotingParams} from "./types"
23
23
  import { TallyParams as typeTallyParams} from "./types"
24
24
 
25
- export { MsgSubmitProposal, MsgVoteWeighted, MsgVote, MsgDeposit };
26
-
27
- type sendMsgSubmitProposalParams = {
28
- value: MsgSubmitProposal,
29
- fee?: StdFee,
30
- memo?: string
31
- };
25
+ export { MsgVote, MsgSubmitProposal, MsgDeposit, MsgVoteWeighted };
32
26
 
33
- type sendMsgVoteWeightedParams = {
34
- value: MsgVoteWeighted,
27
+ type sendMsgVoteParams = {
28
+ value: MsgVote,
35
29
  fee?: StdFee,
36
30
  memo?: string
37
31
  };
38
32
 
39
- type sendMsgVoteParams = {
40
- value: MsgVote,
33
+ type sendMsgSubmitProposalParams = {
34
+ value: MsgSubmitProposal,
41
35
  fee?: StdFee,
42
36
  memo?: string
43
37
  };
@@ -48,23 +42,29 @@ type sendMsgDepositParams = {
48
42
  memo?: string
49
43
  };
50
44
 
51
-
52
- type msgSubmitProposalParams = {
53
- value: MsgSubmitProposal,
54
- };
55
-
56
- type msgVoteWeightedParams = {
45
+ type sendMsgVoteWeightedParams = {
57
46
  value: MsgVoteWeighted,
47
+ fee?: StdFee,
48
+ memo?: string
58
49
  };
59
50
 
51
+
60
52
  type msgVoteParams = {
61
53
  value: MsgVote,
62
54
  };
63
55
 
56
+ type msgSubmitProposalParams = {
57
+ value: MsgSubmitProposal,
58
+ };
59
+
64
60
  type msgDepositParams = {
65
61
  value: MsgDeposit,
66
62
  };
67
63
 
64
+ type msgVoteWeightedParams = {
65
+ value: MsgVoteWeighted,
66
+ };
67
+
68
68
 
69
69
  export const registry = new Registry(msgTypes);
70
70
 
@@ -95,92 +95,92 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
95
95
 
96
96
  return {
97
97
 
98
- async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
98
+ async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
99
99
  if (!signer) {
100
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
100
+ throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
101
101
  }
102
102
  try {
103
103
  const { address } = (await signer.getAccounts())[0];
104
104
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
105
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
105
+ let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
106
106
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
107
107
  } catch (e: any) {
108
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
108
+ throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
109
109
  }
110
110
  },
111
111
 
112
- async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
112
+ async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
113
113
  if (!signer) {
114
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
114
+ throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
115
115
  }
116
116
  try {
117
117
  const { address } = (await signer.getAccounts())[0];
118
118
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
119
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
119
+ let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
120
120
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
121
121
  } catch (e: any) {
122
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
122
+ throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
123
123
  }
124
124
  },
125
125
 
126
- async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
126
+ async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
127
127
  if (!signer) {
128
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
128
+ throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
129
129
  }
130
130
  try {
131
131
  const { address } = (await signer.getAccounts())[0];
132
132
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
133
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
133
+ let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
134
134
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
135
135
  } catch (e: any) {
136
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
136
+ throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
137
137
  }
138
138
  },
139
139
 
140
- async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise<DeliverTxResponse> {
140
+ async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
141
141
  if (!signer) {
142
- throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.')
142
+ throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
143
143
  }
144
144
  try {
145
145
  const { address } = (await signer.getAccounts())[0];
146
146
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
147
- let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) })
147
+ let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
148
148
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
149
149
  } catch (e: any) {
150
- throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message)
150
+ throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
151
151
  }
152
152
  },
153
153
 
154
154
 
155
- msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
155
+ msgVote({ value }: msgVoteParams): EncodeObject {
156
156
  try {
157
- return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
157
+ return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) }
158
158
  } catch (e: any) {
159
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
159
+ throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
160
160
  }
161
161
  },
162
162
 
163
- msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
163
+ msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
164
164
  try {
165
- return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
165
+ return { typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
166
166
  } catch (e: any) {
167
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
167
+ throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
168
168
  }
169
169
  },
170
170
 
171
- msgVote({ value }: msgVoteParams): EncodeObject {
171
+ msgDeposit({ value }: msgDepositParams): EncodeObject {
172
172
  try {
173
- return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) }
173
+ return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) }
174
174
  } catch (e: any) {
175
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
175
+ throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message)
176
176
  }
177
177
  },
178
178
 
179
- msgDeposit({ value }: msgDepositParams): EncodeObject {
179
+ msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
180
180
  try {
181
- return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) }
181
+ return { typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
182
182
  } catch (e: any) {
183
- throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message)
183
+ throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
184
184
  }
185
185
  },
186
186
 
@@ -1,14 +1,14 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
3
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
4
2
  import { MsgVote } from "./types/cosmos/gov/v1beta1/tx";
3
+ import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx";
5
4
  import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx";
5
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx";
6
6
 
7
7
  const msgTypes: Array<[string, GeneratedType]> = [
8
- ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal],
9
- ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
10
8
  ["/cosmos.gov.v1beta1.MsgVote", MsgVote],
9
+ ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal],
11
10
  ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit],
11
+ ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted],
12
12
 
13
13
  ];
14
14