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
@@ -8,11 +8,11 @@ import { IgniteClient } from "../client"
8
8
  import { MissingWalletError } from "../helpers"
9
9
  import { Api } from "./rest";
10
10
  import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
11
- import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
12
- import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
13
- import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
14
11
  import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
15
12
  import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
13
+ import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
14
+ import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
15
+ import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
16
16
 
17
17
  import { StakeAuthorization as typeStakeAuthorization} from "./types"
18
18
  import { StakeAuthorization_Validators as typeStakeAuthorization_Validators} from "./types"
@@ -38,7 +38,7 @@ import { RedelegationEntryResponse as typeRedelegationEntryResponse} from "./typ
38
38
  import { RedelegationResponse as typeRedelegationResponse} from "./types"
39
39
  import { Pool as typePool} from "./types"
40
40
 
41
- export { MsgCreateValidator, MsgEditValidator, MsgDelegate, MsgBeginRedelegate, MsgUndelegate, MsgCancelUnbondingDelegation };
41
+ export { MsgCreateValidator, MsgUndelegate, MsgCancelUnbondingDelegation, MsgDelegate, MsgEditValidator, MsgBeginRedelegate };
42
42
 
43
43
  type sendMsgCreateValidatorParams = {
44
44
  value: MsgCreateValidator,
@@ -46,32 +46,32 @@ type sendMsgCreateValidatorParams = {
46
46
  memo?: string
47
47
  };
48
48
 
49
- type sendMsgEditValidatorParams = {
50
- value: MsgEditValidator,
49
+ type sendMsgUndelegateParams = {
50
+ value: MsgUndelegate,
51
51
  fee?: StdFee,
52
52
  memo?: string
53
53
  };
54
54
 
55
- type sendMsgDelegateParams = {
56
- value: MsgDelegate,
55
+ type sendMsgCancelUnbondingDelegationParams = {
56
+ value: MsgCancelUnbondingDelegation,
57
57
  fee?: StdFee,
58
58
  memo?: string
59
59
  };
60
60
 
61
- type sendMsgBeginRedelegateParams = {
62
- value: MsgBeginRedelegate,
61
+ type sendMsgDelegateParams = {
62
+ value: MsgDelegate,
63
63
  fee?: StdFee,
64
64
  memo?: string
65
65
  };
66
66
 
67
- type sendMsgUndelegateParams = {
68
- value: MsgUndelegate,
67
+ type sendMsgEditValidatorParams = {
68
+ value: MsgEditValidator,
69
69
  fee?: StdFee,
70
70
  memo?: string
71
71
  };
72
72
 
73
- type sendMsgCancelUnbondingDelegationParams = {
74
- value: MsgCancelUnbondingDelegation,
73
+ type sendMsgBeginRedelegateParams = {
74
+ value: MsgBeginRedelegate,
75
75
  fee?: StdFee,
76
76
  memo?: string
77
77
  };
@@ -81,24 +81,24 @@ type msgCreateValidatorParams = {
81
81
  value: MsgCreateValidator,
82
82
  };
83
83
 
84
- type msgEditValidatorParams = {
85
- value: MsgEditValidator,
84
+ type msgUndelegateParams = {
85
+ value: MsgUndelegate,
86
86
  };
87
87
 
88
- type msgDelegateParams = {
89
- value: MsgDelegate,
88
+ type msgCancelUnbondingDelegationParams = {
89
+ value: MsgCancelUnbondingDelegation,
90
90
  };
91
91
 
92
- type msgBeginRedelegateParams = {
93
- value: MsgBeginRedelegate,
92
+ type msgDelegateParams = {
93
+ value: MsgDelegate,
94
94
  };
95
95
 
96
- type msgUndelegateParams = {
97
- value: MsgUndelegate,
96
+ type msgEditValidatorParams = {
97
+ value: MsgEditValidator,
98
98
  };
99
99
 
100
- type msgCancelUnbondingDelegationParams = {
101
- value: MsgCancelUnbondingDelegation,
100
+ type msgBeginRedelegateParams = {
101
+ value: MsgBeginRedelegate,
102
102
  };
103
103
 
104
104
 
@@ -145,73 +145,73 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
145
145
  }
146
146
  },
147
147
 
148
- async sendMsgEditValidator({ value, fee, memo }: sendMsgEditValidatorParams): Promise<DeliverTxResponse> {
148
+ async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise<DeliverTxResponse> {
149
149
  if (!signer) {
150
- throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.')
150
+ throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.')
151
151
  }
152
152
  try {
153
153
  const { address } = (await signer.getAccounts())[0];
154
154
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
155
- let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) })
155
+ let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) })
156
156
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
157
157
  } catch (e: any) {
158
- throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: '+ e.message)
158
+ throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message)
159
159
  }
160
160
  },
161
161
 
162
- async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise<DeliverTxResponse> {
162
+ async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise<DeliverTxResponse> {
163
163
  if (!signer) {
164
- throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.')
164
+ throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.')
165
165
  }
166
166
  try {
167
167
  const { address } = (await signer.getAccounts())[0];
168
168
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
169
- let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) })
169
+ let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) })
170
170
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
171
171
  } catch (e: any) {
172
- throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message)
172
+ throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message)
173
173
  }
174
174
  },
175
175
 
176
- async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise<DeliverTxResponse> {
176
+ async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise<DeliverTxResponse> {
177
177
  if (!signer) {
178
- throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.')
178
+ throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.')
179
179
  }
180
180
  try {
181
181
  const { address } = (await signer.getAccounts())[0];
182
182
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
183
- let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) })
183
+ let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) })
184
184
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
185
185
  } catch (e: any) {
186
- throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message)
186
+ throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message)
187
187
  }
188
188
  },
189
189
 
190
- async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise<DeliverTxResponse> {
190
+ async sendMsgEditValidator({ value, fee, memo }: sendMsgEditValidatorParams): Promise<DeliverTxResponse> {
191
191
  if (!signer) {
192
- throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.')
192
+ throw new Error('TxClient:sendMsgEditValidator: Unable to sign Tx. Signer is not present.')
193
193
  }
194
194
  try {
195
195
  const { address } = (await signer.getAccounts())[0];
196
196
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
197
- let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) })
197
+ let msg = this.msgEditValidator({ value: MsgEditValidator.fromPartial(value) })
198
198
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
199
199
  } catch (e: any) {
200
- throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message)
200
+ throw new Error('TxClient:sendMsgEditValidator: Could not broadcast Tx: '+ e.message)
201
201
  }
202
202
  },
203
203
 
204
- async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise<DeliverTxResponse> {
204
+ async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise<DeliverTxResponse> {
205
205
  if (!signer) {
206
- throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.')
206
+ throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.')
207
207
  }
208
208
  try {
209
209
  const { address } = (await signer.getAccounts())[0];
210
210
  const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
211
- let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) })
211
+ let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) })
212
212
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
213
213
  } catch (e: any) {
214
- throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message)
214
+ throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message)
215
215
  }
216
216
  },
217
217
 
@@ -224,43 +224,43 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
224
224
  }
225
225
  },
226
226
 
227
- msgEditValidator({ value }: msgEditValidatorParams): EncodeObject {
227
+ msgUndelegate({ value }: msgUndelegateParams): EncodeObject {
228
228
  try {
229
- return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( value ) }
229
+ return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) }
230
230
  } catch (e: any) {
231
- throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message)
231
+ throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message)
232
232
  }
233
233
  },
234
234
 
235
- msgDelegate({ value }: msgDelegateParams): EncodeObject {
235
+ msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject {
236
236
  try {
237
- return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) }
237
+ return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) }
238
238
  } catch (e: any) {
239
- throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message)
239
+ throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message)
240
240
  }
241
241
  },
242
242
 
243
- msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject {
243
+ msgDelegate({ value }: msgDelegateParams): EncodeObject {
244
244
  try {
245
- return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) }
245
+ return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) }
246
246
  } catch (e: any) {
247
- throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message)
247
+ throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message)
248
248
  }
249
249
  },
250
250
 
251
- msgUndelegate({ value }: msgUndelegateParams): EncodeObject {
251
+ msgEditValidator({ value }: msgEditValidatorParams): EncodeObject {
252
252
  try {
253
- return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) }
253
+ return { typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator", value: MsgEditValidator.fromPartial( value ) }
254
254
  } catch (e: any) {
255
- throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message)
255
+ throw new Error('TxClient:MsgEditValidator: Could not create message: ' + e.message)
256
256
  }
257
257
  },
258
258
 
259
- msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject {
259
+ msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject {
260
260
  try {
261
- return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) }
261
+ return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) }
262
262
  } catch (e: any) {
263
- throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message)
263
+ throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message)
264
264
  }
265
265
  },
266
266
 
@@ -1,15 +1,15 @@
1
1
  import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
2
- import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
3
- import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
4
- import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
5
2
  import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
6
3
  import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
4
+ import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
5
+ import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
6
+ import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
7
7
  const msgTypes = [
8
8
  ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator],
9
- ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
10
- ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
11
- ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
12
9
  ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
13
10
  ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation],
11
+ ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
12
+ ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
13
+ ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
14
14
  ];
15
15
  export { msgTypes };
@@ -1,18 +1,18 @@
1
1
  import { GeneratedType } from "@cosmjs/proto-signing";
2
2
  import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx";
3
- import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
4
- import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
5
- import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
6
3
  import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx";
7
4
  import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx";
5
+ import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx";
6
+ import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx";
7
+ import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx";
8
8
 
9
9
  const msgTypes: Array<[string, GeneratedType]> = [
10
10
  ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator],
11
- ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
12
- ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
13
- ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
14
11
  ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
15
12
  ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation],
13
+ ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
14
+ ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
15
+ ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
16
16
 
17
17
  ];
18
18
 
@@ -130,6 +130,94 @@ export interface RpcStatus {
130
130
  details?: ProtobufAny[];
131
131
  }
132
132
 
133
+ /**
134
+ * Delegation represents the bond with tokens held by an account. It is
135
+ owned by one delegator, and is associated with the voting power of one
136
+ validator.
137
+ */
138
+ export interface Stakingv1Beta1Delegation {
139
+ /** delegator_address is the bech32-encoded address of the delegator. */
140
+ delegator_address?: string;
141
+
142
+ /** validator_address is the bech32-encoded address of the validator. */
143
+ validator_address?: string;
144
+
145
+ /** shares define the delegation shares received. */
146
+ shares?: string;
147
+ }
148
+
149
+ /**
150
+ * HistoricalInfo contains header and validator information for a given block.
151
+ It is stored as part of staking module's state, which persists the `n` most
152
+ recent HistoricalInfo
153
+ (`n` is set by the staking module's `historical_entries` parameter).
154
+ */
155
+ export interface Stakingv1Beta1HistoricalInfo {
156
+ /** Header defines the structure of a block header. */
157
+ header?: TypesHeader;
158
+ valset?: Stakingv1Beta1Validator[];
159
+ }
160
+
161
+ /**
162
+ * Params defines the parameters for the staking module.
163
+ */
164
+ export interface Stakingv1Beta1Params {
165
+ /** unbonding_time is the time duration of unbonding. */
166
+ unbonding_time?: string;
167
+
168
+ /**
169
+ * max_validators is the maximum number of validators.
170
+ * @format int64
171
+ */
172
+ max_validators?: number;
173
+
174
+ /**
175
+ * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
176
+ * @format int64
177
+ */
178
+ max_entries?: number;
179
+
180
+ /**
181
+ * historical_entries is the number of historical entries to persist.
182
+ * @format int64
183
+ */
184
+ historical_entries?: number;
185
+
186
+ /** bond_denom defines the bondable coin denomination. */
187
+ bond_denom?: string;
188
+
189
+ /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */
190
+ min_commission_rate?: string;
191
+ }
192
+
193
+ /**
194
+ * Pool is used for tracking bonded and not-bonded token supply of the bond
195
+ denomination.
196
+ */
197
+ export interface Stakingv1Beta1Pool {
198
+ not_bonded_tokens?: string;
199
+ bonded_tokens?: string;
200
+ }
201
+
202
+ /**
203
+ * UnbondingDelegation stores all of a single delegator's unbonding bonds
204
+ for a single validator in an time-ordered list.
205
+ */
206
+ export interface Stakingv1Beta1UnbondingDelegation {
207
+ /** delegator_address is the bech32-encoded address of the delegator. */
208
+ delegator_address?: string;
209
+
210
+ /** validator_address is the bech32-encoded address of the validator. */
211
+ validator_address?: string;
212
+
213
+ /**
214
+ * entries are the unbonding delegation entries.
215
+ *
216
+ * unbonding delegation entries
217
+ */
218
+ entries?: V1Beta1UnbondingDelegationEntry[];
219
+ }
220
+
133
221
  /**
134
222
  * Validator defines a validator, together with the total amount of the
135
223
  Validator's bond shares and their exchange rate to coins. Slashing results in
@@ -334,22 +422,6 @@ export interface V1Beta1CommissionRates {
334
422
  max_change_rate?: string;
335
423
  }
336
424
 
337
- /**
338
- * Delegation represents the bond with tokens held by an account. It is
339
- owned by one delegator, and is associated with the voting power of one
340
- validator.
341
- */
342
- export interface V1Beta1Delegation {
343
- /** delegator_address is the bech32-encoded address of the delegator. */
344
- delegator_address?: string;
345
-
346
- /** validator_address is the bech32-encoded address of the validator. */
347
- validator_address?: string;
348
-
349
- /** shares define the delegation shares received. */
350
- shares?: string;
351
- }
352
-
353
425
  /**
354
426
  * DelegationResponse is equivalent to Delegation except that it contains a
355
427
  balance in addition to shares which is more suitable for client responses.
@@ -360,7 +432,7 @@ export interface V1Beta1DelegationResponse {
360
432
  * owned by one delegator, and is associated with the voting power of one
361
433
  * validator.
362
434
  */
363
- delegation?: V1Beta1Delegation;
435
+ delegation?: Stakingv1Beta1Delegation;
364
436
 
365
437
  /**
366
438
  * Coin defines a token with a denomination and an amount.
@@ -391,18 +463,6 @@ export interface V1Beta1Description {
391
463
  details?: string;
392
464
  }
393
465
 
394
- /**
395
- * HistoricalInfo contains header and validator information for a given block.
396
- It is stored as part of staking module's state, which persists the `n` most
397
- recent HistoricalInfo
398
- (`n` is set by the staking module's `historical_entries` parameter).
399
- */
400
- export interface V1Beta1HistoricalInfo {
401
- /** Header defines the structure of a block header. */
402
- header?: TypesHeader;
403
- valset?: Stakingv1Beta1Validator[];
404
- }
405
-
406
466
  /**
407
467
  * MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type.
408
468
  */
@@ -511,47 +571,6 @@ export interface V1Beta1PageResponse {
511
571
  total?: string;
512
572
  }
513
573
 
514
- /**
515
- * Params defines the parameters for the staking module.
516
- */
517
- export interface V1Beta1Params {
518
- /** unbonding_time is the time duration of unbonding. */
519
- unbonding_time?: string;
520
-
521
- /**
522
- * max_validators is the maximum number of validators.
523
- * @format int64
524
- */
525
- max_validators?: number;
526
-
527
- /**
528
- * max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
529
- * @format int64
530
- */
531
- max_entries?: number;
532
-
533
- /**
534
- * historical_entries is the number of historical entries to persist.
535
- * @format int64
536
- */
537
- historical_entries?: number;
538
-
539
- /** bond_denom defines the bondable coin denomination. */
540
- bond_denom?: string;
541
-
542
- /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */
543
- min_commission_rate?: string;
544
- }
545
-
546
- /**
547
- * Pool is used for tracking bonded and not-bonded token supply of the bond
548
- denomination.
549
- */
550
- export interface V1Beta1Pool {
551
- not_bonded_tokens?: string;
552
- bonded_tokens?: string;
553
- }
554
-
555
574
  /**
556
575
  * QueryDelegationResponse is response type for the Query/Delegation RPC method.
557
576
  */
@@ -577,7 +596,7 @@ export interface V1Beta1QueryDelegatorDelegationsResponse {
577
596
  Query/UnbondingDelegatorDelegations RPC method.
578
597
  */
579
598
  export interface V1Beta1QueryDelegatorUnbondingDelegationsResponse {
580
- unbonding_responses?: V1Beta1UnbondingDelegation[];
599
+ unbonding_responses?: Stakingv1Beta1UnbondingDelegation[];
581
600
 
582
601
  /** pagination defines the pagination in the response. */
583
602
  pagination?: V1Beta1PageResponse;
@@ -610,7 +629,7 @@ method.
610
629
  */
611
630
  export interface V1Beta1QueryHistoricalInfoResponse {
612
631
  /** hist defines the historical info at the given height. */
613
- hist?: V1Beta1HistoricalInfo;
632
+ hist?: Stakingv1Beta1HistoricalInfo;
614
633
  }
615
634
 
616
635
  /**
@@ -618,7 +637,7 @@ export interface V1Beta1QueryHistoricalInfoResponse {
618
637
  */
619
638
  export interface V1Beta1QueryParamsResponse {
620
639
  /** params holds all the parameters of this module. */
621
- params?: V1Beta1Params;
640
+ params?: Stakingv1Beta1Params;
622
641
  }
623
642
 
624
643
  /**
@@ -626,7 +645,7 @@ export interface V1Beta1QueryParamsResponse {
626
645
  */
627
646
  export interface V1Beta1QueryPoolResponse {
628
647
  /** pool defines the pool info. */
629
- pool?: V1Beta1Pool;
648
+ pool?: Stakingv1Beta1Pool;
630
649
  }
631
650
 
632
651
  /**
@@ -646,7 +665,7 @@ RPC method.
646
665
  */
647
666
  export interface V1Beta1QueryUnbondingDelegationResponse {
648
667
  /** unbond defines the unbonding information of a delegation. */
649
- unbond?: V1Beta1UnbondingDelegation;
668
+ unbond?: Stakingv1Beta1UnbondingDelegation;
650
669
  }
651
670
 
652
671
  export interface V1Beta1QueryValidatorDelegationsResponse {
@@ -666,7 +685,7 @@ export interface V1Beta1QueryValidatorResponse {
666
685
  Query/ValidatorUnbondingDelegations RPC method.
667
686
  */
668
687
  export interface V1Beta1QueryValidatorUnbondingDelegationsResponse {
669
- unbonding_responses?: V1Beta1UnbondingDelegation[];
688
+ unbonding_responses?: Stakingv1Beta1UnbondingDelegation[];
670
689
 
671
690
  /** pagination defines the pagination in the response. */
672
691
  pagination?: V1Beta1PageResponse;
@@ -750,25 +769,6 @@ export interface V1Beta1RedelegationResponse {
750
769
  entries?: V1Beta1RedelegationEntryResponse[];
751
770
  }
752
771
 
753
- /**
754
- * UnbondingDelegation stores all of a single delegator's unbonding bonds
755
- for a single validator in an time-ordered list.
756
- */
757
- export interface V1Beta1UnbondingDelegation {
758
- /** delegator_address is the bech32-encoded address of the delegator. */
759
- delegator_address?: string;
760
-
761
- /** validator_address is the bech32-encoded address of the validator. */
762
- validator_address?: string;
763
-
764
- /**
765
- * entries are the unbonding delegation entries.
766
- *
767
- * unbonding delegation entries
768
- */
769
- entries?: V1Beta1UnbondingDelegationEntry[];
770
- }
771
-
772
772
  /**
773
773
  * UnbondingDelegationEntry defines an unbonding object with relevant metadata.
774
774
  */
@@ -3,13 +3,13 @@ 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 { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx";
7
6
  import { MsgCancelUpgrade } from "./types/cosmos/upgrade/v1beta1/tx";
7
+ import { MsgSoftwareUpgrade } from "./types/cosmos/upgrade/v1beta1/tx";
8
8
  import { Plan as typePlan } from "./types";
9
9
  import { SoftwareUpgradeProposal as typeSoftwareUpgradeProposal } from "./types";
10
10
  import { CancelSoftwareUpgradeProposal as typeCancelSoftwareUpgradeProposal } from "./types";
11
11
  import { ModuleVersion as typeModuleVersion } from "./types";
12
- export { MsgSoftwareUpgrade, MsgCancelUpgrade };
12
+ export { MsgCancelUpgrade, MsgSoftwareUpgrade };
13
13
  export const registry = new Registry(msgTypes);
14
14
  function getStructure(template) {
15
15
  const structure = { fields: [] };
@@ -25,48 +25,48 @@ const defaultFee = {
25
25
  };
26
26
  export const txClient = ({ signer, prefix, addr } = { addr: "http://localhost:26657", prefix: "cosmos" }) => {
27
27
  return {
28
- async sendMsgSoftwareUpgrade({ value, fee, memo }) {
28
+ async sendMsgCancelUpgrade({ value, fee, memo }) {
29
29
  if (!signer) {
30
- throw new Error('TxClient:sendMsgSoftwareUpgrade: Unable to sign Tx. Signer is not present.');
30
+ throw new Error('TxClient:sendMsgCancelUpgrade: Unable to sign Tx. Signer is not present.');
31
31
  }
32
32
  try {
33
33
  const { address } = (await signer.getAccounts())[0];
34
34
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
35
- let msg = this.msgSoftwareUpgrade({ value: MsgSoftwareUpgrade.fromPartial(value) });
35
+ let msg = this.msgCancelUpgrade({ value: MsgCancelUpgrade.fromPartial(value) });
36
36
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
37
37
  }
38
38
  catch (e) {
39
- throw new Error('TxClient:sendMsgSoftwareUpgrade: Could not broadcast Tx: ' + e.message);
39
+ throw new Error('TxClient:sendMsgCancelUpgrade: Could not broadcast Tx: ' + e.message);
40
40
  }
41
41
  },
42
- async sendMsgCancelUpgrade({ value, fee, memo }) {
42
+ async sendMsgSoftwareUpgrade({ value, fee, memo }) {
43
43
  if (!signer) {
44
- throw new Error('TxClient:sendMsgCancelUpgrade: Unable to sign Tx. Signer is not present.');
44
+ throw new Error('TxClient:sendMsgSoftwareUpgrade: Unable to sign Tx. Signer is not present.');
45
45
  }
46
46
  try {
47
47
  const { address } = (await signer.getAccounts())[0];
48
48
  const signingClient = await SigningStargateClient.connectWithSigner(addr, signer, { registry, prefix });
49
- let msg = this.msgCancelUpgrade({ value: MsgCancelUpgrade.fromPartial(value) });
49
+ let msg = this.msgSoftwareUpgrade({ value: MsgSoftwareUpgrade.fromPartial(value) });
50
50
  return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo);
51
51
  }
52
52
  catch (e) {
53
- throw new Error('TxClient:sendMsgCancelUpgrade: Could not broadcast Tx: ' + e.message);
53
+ throw new Error('TxClient:sendMsgSoftwareUpgrade: Could not broadcast Tx: ' + e.message);
54
54
  }
55
55
  },
56
- msgSoftwareUpgrade({ value }) {
56
+ msgCancelUpgrade({ value }) {
57
57
  try {
58
- return { typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", value: MsgSoftwareUpgrade.fromPartial(value) };
58
+ return { typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", value: MsgCancelUpgrade.fromPartial(value) };
59
59
  }
60
60
  catch (e) {
61
- throw new Error('TxClient:MsgSoftwareUpgrade: Could not create message: ' + e.message);
61
+ throw new Error('TxClient:MsgCancelUpgrade: Could not create message: ' + e.message);
62
62
  }
63
63
  },
64
- msgCancelUpgrade({ value }) {
64
+ msgSoftwareUpgrade({ value }) {
65
65
  try {
66
- return { typeUrl: "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", value: MsgCancelUpgrade.fromPartial(value) };
66
+ return { typeUrl: "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", value: MsgSoftwareUpgrade.fromPartial(value) };
67
67
  }
68
68
  catch (e) {
69
- throw new Error('TxClient:MsgCancelUpgrade: Could not create message: ' + e.message);
69
+ throw new Error('TxClient:MsgSoftwareUpgrade: Could not create message: ' + e.message);
70
70
  }
71
71
  },
72
72
  };