decentralcardgame-cardchain-client-ts 0.0.26-rc1 → 0.0.27

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 (105) hide show
  1. package/DecentralCardGame.cardchain.cardchain/module.js +504 -352
  2. package/DecentralCardGame.cardchain.cardchain/module.ts +1505 -1267
  3. package/DecentralCardGame.cardchain.cardchain/registry.js +64 -62
  4. package/DecentralCardGame.cardchain.cardchain/registry.ts +64 -62
  5. package/DecentralCardGame.cardchain.cardchain/rest.js +31 -17
  6. package/DecentralCardGame.cardchain.cardchain/rest.ts +139 -94
  7. package/DecentralCardGame.cardchain.cardchain/types/amino/amino.ts +1 -0
  8. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +86 -0
  9. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +90 -0
  10. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +229 -114
  11. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +276 -120
  12. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.js +186 -0
  13. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/set.ts +210 -0
  14. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +91 -0
  15. package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.ts +113 -0
  16. package/DecentralCardGame.cardchain.cardchain/types.js +3 -1
  17. package/DecentralCardGame.cardchain.cardchain/types.ts +4 -0
  18. package/DecentralCardGame.cardchain.featureflag/module.js +4 -1
  19. package/DecentralCardGame.cardchain.featureflag/module.ts +71 -69
  20. package/DecentralCardGame.cardchain.featureflag/rest.ts +6 -6
  21. package/client.js +3 -9
  22. package/client.ts +154 -167
  23. package/cosmos.auth.v1beta1/module.js +4 -1
  24. package/cosmos.auth.v1beta1/module.ts +71 -69
  25. package/cosmos.auth.v1beta1/rest.ts +21 -21
  26. package/cosmos.authz.v1beta1/module.js +17 -17
  27. package/cosmos.authz.v1beta1/module.ts +25 -25
  28. package/cosmos.authz.v1beta1/registry.js +4 -4
  29. package/cosmos.authz.v1beta1/registry.ts +4 -4
  30. package/cosmos.authz.v1beta1/rest.ts +75 -75
  31. package/cosmos.bank.v1beta1/rest.ts +9 -9
  32. package/cosmos.distribution.v1beta1/module.js +27 -27
  33. package/cosmos.distribution.v1beta1/module.ts +42 -42
  34. package/cosmos.distribution.v1beta1/registry.js +4 -4
  35. package/cosmos.distribution.v1beta1/registry.ts +4 -4
  36. package/cosmos.distribution.v1beta1/rest.ts +20 -20
  37. package/cosmos.gov.v1/module.js +24 -24
  38. package/cosmos.gov.v1/module.ts +36 -36
  39. package/cosmos.gov.v1/registry.js +4 -4
  40. package/cosmos.gov.v1/registry.ts +4 -4
  41. package/cosmos.gov.v1/rest.ts +90 -90
  42. package/cosmos.gov.v1beta1/module.js +27 -27
  43. package/cosmos.gov.v1beta1/module.ts +42 -42
  44. package/cosmos.gov.v1beta1/registry.js +4 -4
  45. package/cosmos.gov.v1beta1/registry.ts +4 -4
  46. package/cosmos.gov.v1beta1/rest.ts +152 -152
  47. package/cosmos.group.v1/module.js +108 -108
  48. package/cosmos.group.v1/module.ts +164 -164
  49. package/cosmos.group.v1/registry.js +18 -18
  50. package/cosmos.group.v1/registry.ts +18 -18
  51. package/cosmos.group.v1/rest.js +5 -5
  52. package/cosmos.group.v1/rest.ts +214 -214
  53. package/cosmos.mint.v1beta1/rest.ts +13 -13
  54. package/cosmos.nft.v1beta1/rest.ts +132 -132
  55. package/cosmos.slashing.v1beta1/rest.ts +19 -19
  56. package/cosmos.staking.v1beta1/module.js +39 -39
  57. package/cosmos.staking.v1beta1/module.ts +59 -59
  58. package/cosmos.staking.v1beta1/registry.js +6 -6
  59. package/cosmos.staking.v1beta1/registry.ts +6 -6
  60. package/cosmos.staking.v1beta1/rest.ts +95 -95
  61. package/cosmos.upgrade.v1beta1/module.js +16 -16
  62. package/cosmos.upgrade.v1beta1/module.ts +24 -24
  63. package/cosmos.upgrade.v1beta1/registry.js +2 -2
  64. package/cosmos.upgrade.v1beta1/registry.ts +2 -2
  65. package/ibc.applications.interchain_accounts.controller.v1/rest.ts +10 -10
  66. package/ibc.applications.interchain_accounts.host.v1/rest.ts +13 -13
  67. package/ibc.applications.transfer.v1/rest.ts +3 -3
  68. package/ibc.core.channel.v1/rest.ts +44 -44
  69. package/package.json +1 -1
  70. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.js +0 -651
  71. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/card.ts +0 -735
  72. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.js +0 -102
  73. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/copyright_proposal.ts +0 -134
  74. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.js +0 -350
  75. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/council.ts +0 -409
  76. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.js +0 -254
  77. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/genesis.ts +0 -281
  78. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.js +0 -88
  79. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/image.ts +0 -115
  80. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.js +0 -308
  81. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match.ts +0 -355
  82. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.js +0 -67
  83. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/match_reporter_proposal.ts +0 -92
  84. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.js +0 -73
  85. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/num.ts +0 -102
  86. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.js +0 -314
  87. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/params.ts +0 -367
  88. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.js +0 -1984
  89. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/query.ts +0 -2382
  90. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.js +0 -85
  91. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/running_average.ts +0 -111
  92. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.js +0 -148
  93. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/sell_offer.ts +0 -183
  94. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.js +0 -93
  95. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/server.ts +0 -124
  96. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.js +0 -365
  97. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set.ts +0 -416
  98. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.js +0 -93
  99. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/set_proposal.ts +0 -124
  100. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.js +0 -4494
  101. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/tx.ts +0 -5526
  102. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.js +0 -522
  103. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/user.ts +0 -583
  104. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.js +0 -346
  105. package/DecentralCardGame.cardchain.cardchain/types/DecentralCardGame/cardchain/cardchain/voting.ts +0 -417
@@ -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 { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
11
10
  import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
12
- import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
11
+ import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
13
12
  import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
13
+ import { MsgSetWithdrawAddress } 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,13 +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 { MsgWithdrawValidatorCommission, MsgWithdrawDelegatorReward, MsgSetWithdrawAddress, MsgFundCommunityPool };
36
-
37
- type sendMsgWithdrawValidatorCommissionParams = {
38
- value: MsgWithdrawValidatorCommission,
39
- fee?: StdFee,
40
- memo?: string
41
- };
35
+ export { MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgSetWithdrawAddress };
42
36
 
43
37
  type sendMsgWithdrawDelegatorRewardParams = {
44
38
  value: MsgWithdrawDelegatorReward,
@@ -46,8 +40,8 @@ type sendMsgWithdrawDelegatorRewardParams = {
46
40
  memo?: string
47
41
  };
48
42
 
49
- type sendMsgSetWithdrawAddressParams = {
50
- value: MsgSetWithdrawAddress,
43
+ type sendMsgWithdrawValidatorCommissionParams = {
44
+ value: MsgWithdrawValidatorCommission,
51
45
  fee?: StdFee,
52
46
  memo?: string
53
47
  };
@@ -58,23 +52,29 @@ type sendMsgFundCommunityPoolParams = {
58
52
  memo?: string
59
53
  };
60
54
 
61
-
62
- type msgWithdrawValidatorCommissionParams = {
63
- value: MsgWithdrawValidatorCommission,
55
+ type sendMsgSetWithdrawAddressParams = {
56
+ value: MsgSetWithdrawAddress,
57
+ fee?: StdFee,
58
+ memo?: string
64
59
  };
65
60
 
61
+
66
62
  type msgWithdrawDelegatorRewardParams = {
67
63
  value: MsgWithdrawDelegatorReward,
68
64
  };
69
65
 
70
- type msgSetWithdrawAddressParams = {
71
- value: MsgSetWithdrawAddress,
66
+ type msgWithdrawValidatorCommissionParams = {
67
+ value: MsgWithdrawValidatorCommission,
72
68
  };
73
69
 
74
70
  type msgFundCommunityPoolParams = {
75
71
  value: MsgFundCommunityPool,
76
72
  };
77
73
 
74
+ type msgSetWithdrawAddressParams = {
75
+ value: MsgSetWithdrawAddress,
76
+ };
77
+
78
78
 
79
79
  export const registry = new Registry(msgTypes);
80
80
 
@@ -105,20 +105,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
105
105
 
106
106
  return {
107
107
 
108
- async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise<DeliverTxResponse> {
109
- if (!signer) {
110
- throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.')
111
- }
112
- try {
113
- const { address } = (await signer.getAccounts())[0];
114
- const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
115
- let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) })
116
- return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
117
- } catch (e: any) {
118
- throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message)
119
- }
120
- },
121
-
122
108
  async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise<DeliverTxResponse> {
123
109
  if (!signer) {
124
110
  throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.')
@@ -133,17 +119,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
133
119
  }
134
120
  },
135
121
 
136
- async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise<DeliverTxResponse> {
122
+ async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise<DeliverTxResponse> {
137
123
  if (!signer) {
138
- throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.')
124
+ throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.')
139
125
  }
140
126
  try {
141
127
  const { address } = (await signer.getAccounts())[0];
142
128
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
143
- let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) })
129
+ let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) })
144
130
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
145
131
  } catch (e: any) {
146
- throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message)
132
+ throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message)
147
133
  }
148
134
  },
149
135
 
@@ -161,15 +147,21 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
161
147
  }
162
148
  },
163
149
 
164
-
165
- msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject {
166
- try {
167
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) }
150
+ async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise<DeliverTxResponse> {
151
+ if (!signer) {
152
+ throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.')
153
+ }
154
+ try {
155
+ const { address } = (await signer.getAccounts())[0];
156
+ const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
157
+ let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) })
158
+ return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
168
159
  } catch (e: any) {
169
- throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message)
160
+ throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message)
170
161
  }
171
162
  },
172
163
 
164
+
173
165
  msgWithdrawDelegatorReward({ value }: msgWithdrawDelegatorRewardParams): EncodeObject {
174
166
  try {
175
167
  return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( value ) }
@@ -178,11 +170,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
178
170
  }
179
171
  },
180
172
 
181
- msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject {
173
+ msgWithdrawValidatorCommission({ value }: msgWithdrawValidatorCommissionParams): EncodeObject {
182
174
  try {
183
- return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) }
175
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", value: MsgWithdrawValidatorCommission.fromPartial( value ) }
184
176
  } catch (e: any) {
185
- throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message)
177
+ throw new Error('TxClient:MsgWithdrawValidatorCommission: Could not create message: ' + e.message)
186
178
  }
187
179
  },
188
180
 
@@ -194,6 +186,14 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
194
186
  }
195
187
  },
196
188
 
189
+ msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject {
190
+ try {
191
+ return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) }
192
+ } catch (e: any) {
193
+ throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message)
194
+ }
195
+ },
196
+
197
197
  }
198
198
  };
199
199
 
@@ -1,11 +1,11 @@
1
- import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
2
1
  import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
3
- import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
2
+ import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
4
3
  import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
4
+ import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
5
5
  const msgTypes = [
6
- ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
7
6
  ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward],
8
- ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
7
+ ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
9
8
  ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool],
9
+ ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
10
10
  ];
11
11
  export { msgTypes };
@@ -1,14 +1,14 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
3
2
  import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx";
4
- import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
3
+ import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx";
5
4
  import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx";
5
+ import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx";
6
6
 
7
7
  const msgTypes: Array<[string, GeneratedType]> = [
8
- ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
9
8
  ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward],
10
- ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
9
+ ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
11
10
  ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool],
11
+ ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
12
12
 
13
13
  ];
14
14
 
@@ -9,6 +9,24 @@
9
9
  * ---------------------------------------------------------------
10
10
  */
11
11
 
12
+ /**
13
+ * Params defines the set of params for the distribution module.
14
+ */
15
+ export interface Distributionv1Beta1Params {
16
+ community_tax?: string;
17
+ base_proposer_reward?: string;
18
+ bonus_proposer_reward?: string;
19
+ withdraw_addr_enabled?: boolean;
20
+ }
21
+
22
+ /**
23
+ * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
24
+ for a validator inexpensive to track, allows simple sanity checks.
25
+ */
26
+ export interface Distributionv1Beta1ValidatorOutstandingRewards {
27
+ rewards?: V1Beta1DecCoin[];
28
+ }
29
+
12
30
  export interface ProtobufAny {
13
31
  "@type"?: string;
14
32
  }
@@ -149,16 +167,6 @@ export interface V1Beta1PageResponse {
149
167
  total?: string;
150
168
  }
151
169
 
152
- /**
153
- * Params defines the set of params for the distribution module.
154
- */
155
- export interface V1Beta1Params {
156
- community_tax?: string;
157
- base_proposer_reward?: string;
158
- bonus_proposer_reward?: string;
159
- withdraw_addr_enabled?: boolean;
160
- }
161
-
162
170
  /**
163
171
  * QueryCommunityPoolResponse is the response type for the Query/CommunityPool
164
172
  RPC method.
@@ -212,7 +220,7 @@ export interface V1Beta1QueryDelegatorWithdrawAddressResponse {
212
220
  */
213
221
  export interface V1Beta1QueryParamsResponse {
214
222
  /** params defines the parameters of the module. */
215
- params?: V1Beta1Params;
223
+ params?: Distributionv1Beta1Params;
216
224
  }
217
225
 
218
226
  export interface V1Beta1QueryValidatorCommissionResponse {
@@ -229,7 +237,7 @@ export interface V1Beta1QueryValidatorOutstandingRewardsResponse {
229
237
  * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
230
238
  * for a validator inexpensive to track, allows simple sanity checks.
231
239
  */
232
- rewards?: V1Beta1ValidatorOutstandingRewards;
240
+ rewards?: Distributionv1Beta1ValidatorOutstandingRewards;
233
241
  }
234
242
 
235
243
  /**
@@ -252,14 +260,6 @@ export interface V1Beta1ValidatorAccumulatedCommission {
252
260
  commission?: V1Beta1DecCoin[];
253
261
  }
254
262
 
255
- /**
256
- * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
257
- for a validator inexpensive to track, allows simple sanity checks.
258
- */
259
- export interface V1Beta1ValidatorOutstandingRewards {
260
- rewards?: V1Beta1DecCoin[];
261
- }
262
-
263
263
  /**
264
264
  * ValidatorSlashEvent represents a validator slash event.
265
265
  Height is implicit within the store key.
@@ -3,10 +3,10 @@ import { SigningStargateClient } from "@cosmjs/stargate";
3
3
  import { Registry } from "@cosmjs/proto-signing";
4
4
  import { msgTypes } from './registry';
5
5
  import { Api } from "./rest";
6
+ import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
6
7
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
7
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
8
8
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
9
- import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
9
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
10
10
  import { WeightedVoteOption as typeWeightedVoteOption } from "./types";
11
11
  import { Deposit as typeDeposit } from "./types";
12
12
  import { Proposal as typeProposal } from "./types";
@@ -15,7 +15,7 @@ import { Vote as typeVote } from "./types";
15
15
  import { DepositParams as typeDepositParams } from "./types";
16
16
  import { VotingParams as typeVotingParams } from "./types";
17
17
  import { TallyParams as typeTallyParams } from "./types";
18
- export { MsgVote, MsgVoteWeighted, MsgDeposit, MsgSubmitProposal };
18
+ export { MsgSubmitProposal, MsgVote, MsgDeposit, MsgVoteWeighted };
19
19
  export const registry = new Registry(msgTypes);
20
20
  function getStructure(template) {
21
21
  const structure = { fields: [] };
@@ -31,32 +31,32 @@ const defaultFee = {
31
31
  };
32
32
  export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
33
33
  return {
34
- async sendMsgVote({ value, fee, memo }) {
34
+ async sendMsgSubmitProposal({ value, fee, memo }) {
35
35
  if (!signer) {
36
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
36
+ throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
37
37
  }
38
38
  try {
39
39
  const { address } = (await signer.getAccounts())[0];
40
40
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
41
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
41
+ let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
42
42
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
43
43
  }
44
44
  catch (e) {
45
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
45
+ throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
46
46
  }
47
47
  },
48
- async sendMsgVoteWeighted({ value, fee, memo }) {
48
+ async sendMsgVote({ value, fee, memo }) {
49
49
  if (!signer) {
50
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.');
50
+ throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.');
51
51
  }
52
52
  try {
53
53
  const { address } = (await signer.getAccounts())[0];
54
54
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
55
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) });
55
+ let msg = this.msgVote({ value: MsgVote.fromPartial(value) });
56
56
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
57
57
  }
58
58
  catch (e) {
59
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: ' + e.message);
59
+ throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: ' + e.message);
60
60
  }
61
61
  },
62
62
  async sendMsgDeposit({ value, fee, memo }) {
@@ -73,34 +73,34 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
73
73
  throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: ' + e.message);
74
74
  }
75
75
  },
76
- async sendMsgSubmitProposal({ value, fee, memo }) {
76
+ async sendMsgVoteWeighted({ value, fee, memo }) {
77
77
  if (!signer) {
78
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.');
78
+ throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.');
79
79
  }
80
80
  try {
81
81
  const { address } = (await signer.getAccounts())[0];
82
82
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
83
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) });
83
+ let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) });
84
84
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
85
85
  }
86
86
  catch (e) {
87
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: ' + e.message);
87
+ throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: ' + e.message);
88
88
  }
89
89
  },
90
- msgVote({ value }) {
90
+ msgSubmitProposal({ value }) {
91
91
  try {
92
- return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial(value) };
92
+ return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
93
93
  }
94
94
  catch (e) {
95
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
95
+ throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
96
96
  }
97
97
  },
98
- msgVoteWeighted({ value }) {
98
+ msgVote({ value }) {
99
99
  try {
100
- return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(value) };
100
+ return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial(value) };
101
101
  }
102
102
  catch (e) {
103
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message);
103
+ throw new Error('TxClient:MsgVote: Could not create message: ' + e.message);
104
104
  }
105
105
  },
106
106
  msgDeposit({ value }) {
@@ -111,12 +111,12 @@ export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26
111
111
  throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message);
112
112
  }
113
113
  },
114
- msgSubmitProposal({ value }) {
114
+ msgVoteWeighted({ value }) {
115
115
  try {
116
- return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial(value) };
116
+ return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial(value) };
117
117
  }
118
118
  catch (e) {
119
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message);
119
+ throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message);
120
120
  }
121
121
  },
122
122
  };
@@ -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/v1/tx";
10
11
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
11
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
12
12
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
13
- import { MsgSubmitProposal } 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,16 +21,16 @@ 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 { MsgVote, MsgVoteWeighted, MsgDeposit, MsgSubmitProposal };
24
+ export { MsgSubmitProposal, MsgVote, MsgDeposit, MsgVoteWeighted };
25
25
 
26
- type sendMsgVoteParams = {
27
- value: MsgVote,
26
+ type sendMsgSubmitProposalParams = {
27
+ value: MsgSubmitProposal,
28
28
  fee?: StdFee,
29
29
  memo?: string
30
30
  };
31
31
 
32
- type sendMsgVoteWeightedParams = {
33
- value: MsgVoteWeighted,
32
+ type sendMsgVoteParams = {
33
+ value: MsgVote,
34
34
  fee?: StdFee,
35
35
  memo?: string
36
36
  };
@@ -41,27 +41,27 @@ type sendMsgDepositParams = {
41
41
  memo?: string
42
42
  };
43
43
 
44
- type sendMsgSubmitProposalParams = {
45
- value: MsgSubmitProposal,
44
+ type sendMsgVoteWeightedParams = {
45
+ value: MsgVoteWeighted,
46
46
  fee?: StdFee,
47
47
  memo?: string
48
48
  };
49
49
 
50
50
 
51
- type msgVoteParams = {
52
- value: MsgVote,
51
+ type msgSubmitProposalParams = {
52
+ value: MsgSubmitProposal,
53
53
  };
54
54
 
55
- type msgVoteWeightedParams = {
56
- value: MsgVoteWeighted,
55
+ type msgVoteParams = {
56
+ value: MsgVote,
57
57
  };
58
58
 
59
59
  type msgDepositParams = {
60
60
  value: MsgDeposit,
61
61
  };
62
62
 
63
- type msgSubmitProposalParams = {
64
- value: MsgSubmitProposal,
63
+ type msgVoteWeightedParams = {
64
+ value: MsgVoteWeighted,
65
65
  };
66
66
 
67
67
 
@@ -94,31 +94,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
94
94
 
95
95
  return {
96
96
 
97
- async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
97
+ async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
98
98
  if (!signer) {
99
- throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
99
+ throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
100
100
  }
101
101
  try {
102
102
  const { address } = (await signer.getAccounts())[0];
103
103
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
104
- let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
104
+ let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
105
105
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
106
106
  } catch (e: any) {
107
- throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
107
+ throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
108
108
  }
109
109
  },
110
110
 
111
- async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
111
+ async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise<DeliverTxResponse> {
112
112
  if (!signer) {
113
- throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
113
+ throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.')
114
114
  }
115
115
  try {
116
116
  const { address } = (await signer.getAccounts())[0];
117
117
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
118
- let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
118
+ let msg = this.msgVote({ value: MsgVote.fromPartial(value) })
119
119
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
120
120
  } catch (e: any) {
121
- throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
121
+ throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message)
122
122
  }
123
123
  },
124
124
 
@@ -136,34 +136,34 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
136
136
  }
137
137
  },
138
138
 
139
- async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise<DeliverTxResponse> {
139
+ async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise<DeliverTxResponse> {
140
140
  if (!signer) {
141
- throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.')
141
+ throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.')
142
142
  }
143
143
  try {
144
144
  const { address } = (await signer.getAccounts())[0];
145
145
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
146
- let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) })
146
+ let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) })
147
147
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
148
148
  } catch (e: any) {
149
- throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message)
149
+ throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message)
150
150
  }
151
151
  },
152
152
 
153
153
 
154
- msgVote({ value }: msgVoteParams): EncodeObject {
154
+ msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
155
155
  try {
156
- return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) }
156
+ return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
157
157
  } catch (e: any) {
158
- throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
158
+ throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
159
159
  }
160
160
  },
161
161
 
162
- msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
162
+ msgVote({ value }: msgVoteParams): EncodeObject {
163
163
  try {
164
- return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
164
+ return { typeUrl: "/cosmos.gov.v1.MsgVote", value: MsgVote.fromPartial( value ) }
165
165
  } catch (e: any) {
166
- throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
166
+ throw new Error('TxClient:MsgVote: Could not create message: ' + e.message)
167
167
  }
168
168
  },
169
169
 
@@ -175,11 +175,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
175
175
  }
176
176
  },
177
177
 
178
- msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject {
178
+ msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject {
179
179
  try {
180
- return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) }
180
+ return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) }
181
181
  } catch (e: any) {
182
- throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message)
182
+ throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message)
183
183
  }
184
184
  },
185
185
 
@@ -1,11 +1,11 @@
1
+ import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
1
2
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
2
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
3
3
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
4
- import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
4
+ import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
5
5
  const msgTypes = [
6
+ ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
6
7
  ["/cosmos.gov.v1.MsgVote", MsgVote],
7
- ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
8
8
  ["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
9
- ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
9
+ ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
10
10
  ];
11
11
  export { msgTypes };
@@ -1,14 +1,14 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
+ import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx";
2
3
  import { MsgVote } from "./types/cosmos/gov/v1/tx";
3
- import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx";
4
4
  import { MsgDeposit } from "./types/cosmos/gov/v1/tx";
5
- import { MsgSubmitProposal } 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.MsgSubmitProposal", MsgSubmitProposal],
8
9
  ["/cosmos.gov.v1.MsgVote", MsgVote],
9
- ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
10
10
  ["/cosmos.gov.v1.MsgDeposit", MsgDeposit],
11
- ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal],
11
+ ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted],
12
12
 
13
13
  ];
14
14