juno-network 0.1.11 → 0.2.2

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 (101) hide show
  1. package/main/codegen/JunoSwap.client.js +1 -1
  2. package/main/codegen/cosmos/bank/v1beta1/query.lcd.js +44 -26
  3. package/main/codegen/cosmos/base/query/v1beta1/pagination.js +190 -0
  4. package/main/codegen/cosmos/base/v1beta1/coin.js +268 -0
  5. package/main/codegen/cosmos/bundle.js +4 -4
  6. package/main/codegen/cosmos/client.js +20 -9
  7. package/main/codegen/cosmos/distribution/v1beta1/query.lcd.js +37 -27
  8. package/main/codegen/cosmos/gov/v1/query.lcd.js +12 -10
  9. package/main/codegen/cosmos/gov/v1beta1/query.lcd.js +12 -10
  10. package/main/codegen/cosmos/group/v1/query.lcd.js +17 -15
  11. package/main/codegen/cosmos/staking/v1beta1/query.lcd.js +39 -29
  12. package/main/codegen/cosmwasm/bundle.js +4 -4
  13. package/main/codegen/cosmwasm/client.js +28 -12
  14. package/main/codegen/cosmwasm/wasm/v1/query.lcd.js +35 -21
  15. package/main/codegen/ibc/applications/transfer/v1/query.lcd.js +25 -13
  16. package/main/codegen/ibc/bundle.js +25 -15
  17. package/main/codegen/ibc/client.js +32 -12
  18. package/main/codegen/ibc/core/channel/v1/query.lcd.js +40 -32
  19. package/main/codegen/ibc/core/client/v1/client.js +585 -0
  20. package/main/codegen/ibc/core/client/v1/genesis.js +367 -0
  21. package/main/codegen/ibc/core/client/v1/query.js +1047 -0
  22. package/main/codegen/ibc/core/client/v1/query.lcd.js +381 -0
  23. package/main/codegen/ibc/core/client/v1/query.rpc.query.js +125 -0
  24. package/main/codegen/ibc/core/client/v1/tx.amino.js +149 -0
  25. package/main/codegen/ibc/core/client/v1/tx.js +538 -0
  26. package/main/codegen/ibc/core/client/v1/tx.registry.js +160 -0
  27. package/main/codegen/ibc/core/client/v1/tx.rpc.msg.js +81 -0
  28. package/main/codegen/ibc/lcd.js +21 -6
  29. package/main/codegen/ibc/rpc.query.js +19 -6
  30. package/main/codegen/ibc/rpc.tx.js +19 -6
  31. package/main/codegen/juno/bundle.js +6 -6
  32. package/main/codegen/juno/mint/query.lcd.js +30 -18
  33. package/module/codegen/JunoSwap.client.js +1 -1
  34. package/module/codegen/JunoSwap.react-query.js +1 -1
  35. package/module/codegen/contracts.js +1 -1
  36. package/module/codegen/cosmos/bank/v1beta1/query.lcd.js +13 -8
  37. package/module/codegen/cosmos/base/query/v1beta1/pagination.js +189 -0
  38. package/module/codegen/cosmos/base/v1beta1/coin.js +268 -0
  39. package/module/codegen/cosmos/bundle.js +4 -4
  40. package/module/codegen/cosmos/client.js +12 -2
  41. package/module/codegen/cosmos/distribution/v1beta1/query.lcd.js +11 -10
  42. package/module/codegen/cosmos/gov/v1/query.lcd.js +11 -10
  43. package/module/codegen/cosmos/gov/v1beta1/query.lcd.js +11 -10
  44. package/module/codegen/cosmos/group/v1/query.lcd.js +16 -15
  45. package/module/codegen/cosmos/staking/v1beta1/query.lcd.js +20 -19
  46. package/module/codegen/cosmwasm/bundle.js +4 -4
  47. package/module/codegen/cosmwasm/client.js +16 -2
  48. package/module/codegen/cosmwasm/wasm/v1/query.lcd.js +16 -11
  49. package/module/codegen/ibc/applications/transfer/v1/query.lcd.js +6 -3
  50. package/module/codegen/ibc/bundle.js +20 -15
  51. package/module/codegen/ibc/client.js +18 -2
  52. package/module/codegen/ibc/core/channel/v1/query.lcd.js +19 -16
  53. package/module/codegen/ibc/core/client/v1/client.js +549 -0
  54. package/module/codegen/ibc/core/client/v1/genesis.js +287 -0
  55. package/module/codegen/ibc/core/client/v1/query.js +1029 -0
  56. package/module/codegen/ibc/core/client/v1/query.lcd.js +128 -0
  57. package/module/codegen/ibc/core/client/v1/query.rpc.query.js +69 -0
  58. package/module/codegen/ibc/core/client/v1/tx.amino.js +150 -0
  59. package/module/codegen/ibc/core/client/v1/tx.js +544 -0
  60. package/module/codegen/ibc/core/client/v1/tx.registry.js +159 -0
  61. package/module/codegen/ibc/core/client/v1/tx.rpc.msg.js +41 -0
  62. package/module/codegen/ibc/lcd.js +5 -0
  63. package/module/codegen/ibc/rpc.query.js +3 -0
  64. package/module/codegen/ibc/rpc.tx.js +3 -0
  65. package/module/codegen/index.js +1 -1
  66. package/module/codegen/juno/bundle.js +6 -6
  67. package/module/codegen/juno/mint/query.lcd.js +3 -3
  68. package/package.json +15 -14
  69. package/types/codegen/JunoSwap.client.d.ts +1 -1
  70. package/types/codegen/JunoSwap.react-query.d.ts +11 -11
  71. package/types/codegen/JunoSwap.types.d.ts +1 -1
  72. package/types/codegen/contracts.d.ts +5 -5
  73. package/types/codegen/cosmos/bank/v1beta1/query.lcd.d.ts +3 -3
  74. package/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts +79 -0
  75. package/types/codegen/cosmos/base/v1beta1/coin.d.ts +58 -0
  76. package/types/codegen/cosmos/bundle.d.ts +758 -153
  77. package/types/codegen/cosmos/client.d.ts +6 -2
  78. package/types/codegen/cosmos/distribution/v1beta1/query.lcd.d.ts +2 -2
  79. package/types/codegen/cosmos/staking/v1beta1/query.lcd.d.ts +2 -2
  80. package/types/codegen/cosmwasm/bundle.d.ts +87 -18
  81. package/types/codegen/cosmwasm/client.d.ts +8 -2
  82. package/types/codegen/cosmwasm/wasm/v1/query.lcd.d.ts +2 -2
  83. package/types/codegen/ibc/applications/transfer/v1/query.lcd.d.ts +2 -2
  84. package/types/codegen/ibc/bundle.d.ts +878 -64
  85. package/types/codegen/ibc/client.d.ts +8 -2
  86. package/types/codegen/ibc/core/channel/v1/query.lcd.d.ts +1 -1
  87. package/types/codegen/ibc/core/client/v1/client.d.ts +143 -0
  88. package/types/codegen/ibc/core/client/v1/genesis.d.ts +56 -0
  89. package/types/codegen/ibc/core/client/v1/query.d.ts +263 -0
  90. package/types/codegen/ibc/core/client/v1/query.lcd.d.ts +15 -0
  91. package/types/codegen/ibc/core/client/v1/query.rpc.query.d.ts +25 -0
  92. package/types/codegen/ibc/core/client/v1/tx.amino.d.ts +77 -0
  93. package/types/codegen/ibc/core/client/v1/tx.d.ts +131 -0
  94. package/types/codegen/ibc/core/client/v1/tx.registry.d.ts +96 -0
  95. package/types/codegen/ibc/core/client/v1/tx.rpc.msg.d.ts +17 -0
  96. package/types/codegen/ibc/lcd.d.ts +3 -0
  97. package/types/codegen/ibc/rpc.query.d.ts +3 -0
  98. package/types/codegen/ibc/rpc.tx.d.ts +3 -0
  99. package/types/codegen/index.d.ts +1 -1
  100. package/types/codegen/juno/bundle.d.ts +6 -6
  101. package/types/codegen/juno/mint/query.lcd.d.ts +3 -3
@@ -0,0 +1,268 @@
1
+ import * as _m0 from "protobufjs/minimal";
2
+ import { isSet } from "@osmonauts/helpers";
3
+ /**
4
+ * Coin defines a token with a denomination and an amount.
5
+ *
6
+ * NOTE: The amount field is an Int which implements the custom method
7
+ * signatures required by gogoproto.
8
+ */
9
+
10
+ function createBaseCoin() {
11
+ return {
12
+ denom: "",
13
+ amount: ""
14
+ };
15
+ }
16
+
17
+ export const Coin = {
18
+ encode(message, writer = _m0.Writer.create()) {
19
+ if (message.denom !== "") {
20
+ writer.uint32(10).string(message.denom);
21
+ }
22
+
23
+ if (message.amount !== "") {
24
+ writer.uint32(18).string(message.amount);
25
+ }
26
+
27
+ return writer;
28
+ },
29
+
30
+ decode(input, length) {
31
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
32
+ let end = length === undefined ? reader.len : reader.pos + length;
33
+ const message = createBaseCoin();
34
+
35
+ while (reader.pos < end) {
36
+ const tag = reader.uint32();
37
+
38
+ switch (tag >>> 3) {
39
+ case 1:
40
+ message.denom = reader.string();
41
+ break;
42
+
43
+ case 2:
44
+ message.amount = reader.string();
45
+ break;
46
+
47
+ default:
48
+ reader.skipType(tag & 7);
49
+ break;
50
+ }
51
+ }
52
+
53
+ return message;
54
+ },
55
+
56
+ fromJSON(object) {
57
+ return {
58
+ denom: isSet(object.denom) ? String(object.denom) : "",
59
+ amount: isSet(object.amount) ? String(object.amount) : ""
60
+ };
61
+ },
62
+
63
+ toJSON(message) {
64
+ const obj = {};
65
+ message.denom !== undefined && (obj.denom = message.denom);
66
+ message.amount !== undefined && (obj.amount = message.amount);
67
+ return obj;
68
+ },
69
+
70
+ fromPartial(object) {
71
+ var _object$denom, _object$amount;
72
+
73
+ const message = createBaseCoin();
74
+ message.denom = (_object$denom = object.denom) !== null && _object$denom !== void 0 ? _object$denom : "";
75
+ message.amount = (_object$amount = object.amount) !== null && _object$amount !== void 0 ? _object$amount : "";
76
+ return message;
77
+ }
78
+
79
+ };
80
+
81
+ function createBaseDecCoin() {
82
+ return {
83
+ denom: "",
84
+ amount: ""
85
+ };
86
+ }
87
+
88
+ export const DecCoin = {
89
+ encode(message, writer = _m0.Writer.create()) {
90
+ if (message.denom !== "") {
91
+ writer.uint32(10).string(message.denom);
92
+ }
93
+
94
+ if (message.amount !== "") {
95
+ writer.uint32(18).string(message.amount);
96
+ }
97
+
98
+ return writer;
99
+ },
100
+
101
+ decode(input, length) {
102
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
103
+ let end = length === undefined ? reader.len : reader.pos + length;
104
+ const message = createBaseDecCoin();
105
+
106
+ while (reader.pos < end) {
107
+ const tag = reader.uint32();
108
+
109
+ switch (tag >>> 3) {
110
+ case 1:
111
+ message.denom = reader.string();
112
+ break;
113
+
114
+ case 2:
115
+ message.amount = reader.string();
116
+ break;
117
+
118
+ default:
119
+ reader.skipType(tag & 7);
120
+ break;
121
+ }
122
+ }
123
+
124
+ return message;
125
+ },
126
+
127
+ fromJSON(object) {
128
+ return {
129
+ denom: isSet(object.denom) ? String(object.denom) : "",
130
+ amount: isSet(object.amount) ? String(object.amount) : ""
131
+ };
132
+ },
133
+
134
+ toJSON(message) {
135
+ const obj = {};
136
+ message.denom !== undefined && (obj.denom = message.denom);
137
+ message.amount !== undefined && (obj.amount = message.amount);
138
+ return obj;
139
+ },
140
+
141
+ fromPartial(object) {
142
+ var _object$denom2, _object$amount2;
143
+
144
+ const message = createBaseDecCoin();
145
+ message.denom = (_object$denom2 = object.denom) !== null && _object$denom2 !== void 0 ? _object$denom2 : "";
146
+ message.amount = (_object$amount2 = object.amount) !== null && _object$amount2 !== void 0 ? _object$amount2 : "";
147
+ return message;
148
+ }
149
+
150
+ };
151
+
152
+ function createBaseIntProto() {
153
+ return {
154
+ int: ""
155
+ };
156
+ }
157
+
158
+ export const IntProto = {
159
+ encode(message, writer = _m0.Writer.create()) {
160
+ if (message.int !== "") {
161
+ writer.uint32(10).string(message.int);
162
+ }
163
+
164
+ return writer;
165
+ },
166
+
167
+ decode(input, length) {
168
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
169
+ let end = length === undefined ? reader.len : reader.pos + length;
170
+ const message = createBaseIntProto();
171
+
172
+ while (reader.pos < end) {
173
+ const tag = reader.uint32();
174
+
175
+ switch (tag >>> 3) {
176
+ case 1:
177
+ message.int = reader.string();
178
+ break;
179
+
180
+ default:
181
+ reader.skipType(tag & 7);
182
+ break;
183
+ }
184
+ }
185
+
186
+ return message;
187
+ },
188
+
189
+ fromJSON(object) {
190
+ return {
191
+ int: isSet(object.int) ? String(object.int) : ""
192
+ };
193
+ },
194
+
195
+ toJSON(message) {
196
+ const obj = {};
197
+ message.int !== undefined && (obj.int = message.int);
198
+ return obj;
199
+ },
200
+
201
+ fromPartial(object) {
202
+ var _object$int;
203
+
204
+ const message = createBaseIntProto();
205
+ message.int = (_object$int = object.int) !== null && _object$int !== void 0 ? _object$int : "";
206
+ return message;
207
+ }
208
+
209
+ };
210
+
211
+ function createBaseDecProto() {
212
+ return {
213
+ dec: ""
214
+ };
215
+ }
216
+
217
+ export const DecProto = {
218
+ encode(message, writer = _m0.Writer.create()) {
219
+ if (message.dec !== "") {
220
+ writer.uint32(10).string(message.dec);
221
+ }
222
+
223
+ return writer;
224
+ },
225
+
226
+ decode(input, length) {
227
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
228
+ let end = length === undefined ? reader.len : reader.pos + length;
229
+ const message = createBaseDecProto();
230
+
231
+ while (reader.pos < end) {
232
+ const tag = reader.uint32();
233
+
234
+ switch (tag >>> 3) {
235
+ case 1:
236
+ message.dec = reader.string();
237
+ break;
238
+
239
+ default:
240
+ reader.skipType(tag & 7);
241
+ break;
242
+ }
243
+ }
244
+
245
+ return message;
246
+ },
247
+
248
+ fromJSON(object) {
249
+ return {
250
+ dec: isSet(object.dec) ? String(object.dec) : ""
251
+ };
252
+ },
253
+
254
+ toJSON(message) {
255
+ const obj = {};
256
+ message.dec !== undefined && (obj.dec = message.dec);
257
+ return obj;
258
+ },
259
+
260
+ fromPartial(object) {
261
+ var _object$dec;
262
+
263
+ const message = createBaseDecProto();
264
+ message.dec = (_object$dec = object.dec) !== null && _object$dec !== void 0 ? _object$dec : "";
265
+ return message;
266
+ }
267
+
268
+ };
@@ -127,9 +127,9 @@ import * as _176 from "./gov/v1/tx.rpc.msg";
127
127
  import * as _177 from "./gov/v1beta1/tx.rpc.msg";
128
128
  import * as _178 from "./group/v1/tx.rpc.msg";
129
129
  import * as _179 from "./staking/v1beta1/tx.rpc.msg";
130
- import * as _197 from "./lcd";
131
- import * as _198 from "./rpc.query";
132
- import * as _199 from "./rpc.tx";
130
+ import * as _202 from "./lcd";
131
+ import * as _203 from "./rpc.query";
132
+ import * as _204 from "./rpc.tx";
133
133
  export let cosmos;
134
134
 
135
135
  (function (_cosmos) {
@@ -349,5 +349,5 @@ export let cosmos;
349
349
  const v1beta1 = _vesting.v1beta1 = _objectSpread(_objectSpread({}, _92), _93);
350
350
  })(vesting || (vesting = _cosmos.vesting || (_cosmos.vesting = {})));
351
351
 
352
- const ClientFactory = _cosmos.ClientFactory = _objectSpread(_objectSpread(_objectSpread({}, _197), _198), _199);
352
+ const ClientFactory = _cosmos.ClientFactory = _objectSpread(_objectSpread(_objectSpread({}, _202), _203), _204);
353
353
  })(cosmos || (cosmos = {}));
@@ -18,12 +18,22 @@ import * as cosmosGovV1TxAmino from "./gov/v1/tx.amino";
18
18
  import * as cosmosGovV1beta1TxAmino from "./gov/v1beta1/tx.amino";
19
19
  import * as cosmosGroupV1TxAmino from "./group/v1/tx.amino";
20
20
  import * as cosmosStakingV1beta1TxAmino from "./staking/v1beta1/tx.amino";
21
+ export const getSigningCosmosClientOptions = () => {
22
+ const registry = new Registry([...cosmosBankV1beta1TxRegistry.registry, ...cosmosDistributionV1beta1TxRegistry.registry, ...cosmosGovV1TxRegistry.registry, ...cosmosGovV1beta1TxRegistry.registry, ...cosmosGroupV1TxRegistry.registry, ...cosmosStakingV1beta1TxRegistry.registry]);
23
+ const aminoTypes = new AminoTypes(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, cosmosBankV1beta1TxAmino.AminoConverter), cosmosDistributionV1beta1TxAmino.AminoConverter), cosmosGovV1TxAmino.AminoConverter), cosmosGovV1beta1TxAmino.AminoConverter), cosmosGroupV1TxAmino.AminoConverter), cosmosStakingV1beta1TxAmino.AminoConverter));
24
+ return {
25
+ registry,
26
+ aminoTypes
27
+ };
28
+ };
21
29
  export const getSigningCosmosClient = async ({
22
30
  rpcEndpoint,
23
31
  signer
24
32
  }) => {
25
- const registry = new Registry([...cosmosBankV1beta1TxRegistry.registry, ...cosmosDistributionV1beta1TxRegistry.registry, ...cosmosGovV1TxRegistry.registry, ...cosmosGovV1beta1TxRegistry.registry, ...cosmosGroupV1TxRegistry.registry, ...cosmosStakingV1beta1TxRegistry.registry]);
26
- const aminoTypes = new AminoTypes(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, cosmosBankV1beta1TxAmino.AminoConverter), cosmosDistributionV1beta1TxAmino.AminoConverter), cosmosGovV1TxAmino.AminoConverter), cosmosGovV1beta1TxAmino.AminoConverter), cosmosGroupV1TxAmino.AminoConverter), cosmosStakingV1beta1TxAmino.AminoConverter));
33
+ const {
34
+ registry,
35
+ aminoTypes
36
+ } = getSigningCosmosClientOptions();
27
37
  const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {
28
38
  registry,
29
39
  aminoTypes
@@ -1,4 +1,5 @@
1
1
  import { LCDClient } from "@osmonauts/lcd";
2
+ import { setPaginationParams } from "@osmonauts/helpers";
2
3
  export class LCDQueryClient extends LCDClient {
3
4
  constructor({
4
5
  restEndpoint
@@ -10,7 +11,7 @@ export class LCDQueryClient extends LCDClient {
10
11
  /* Params queries params of the distribution module. */
11
12
 
12
13
 
13
- async params(params) {
14
+ async params(_params = {}) {
14
15
  const endpoint = `cosmos/distribution/v1beta1/params`;
15
16
  return await this.request(endpoint);
16
17
  }
@@ -26,7 +27,7 @@ export class LCDQueryClient extends LCDClient {
26
27
  options.params.validator_address = params.validatorAddress;
27
28
  }
28
29
 
29
- const endpoint = `cosmos/distribution/v1beta1/validators/${params.validator_address}/outstanding_rewards`;
30
+ const endpoint = `cosmos/distribution/v1beta1/validators/${params.validatorAddress}/outstanding_rewards`;
30
31
  return await this.request(endpoint, options);
31
32
  }
32
33
  /* ValidatorCommission queries accumulated commission for a validator. */
@@ -41,7 +42,7 @@ export class LCDQueryClient extends LCDClient {
41
42
  options.params.validator_address = params.validatorAddress;
42
43
  }
43
44
 
44
- const endpoint = `cosmos/distribution/v1beta1/validators/${params.validator_address}/commission`;
45
+ const endpoint = `cosmos/distribution/v1beta1/validators/${params.validatorAddress}/commission`;
45
46
  return await this.request(endpoint, options);
46
47
  }
47
48
  /* ValidatorSlashes queries slash events of a validator. */
@@ -65,10 +66,10 @@ export class LCDQueryClient extends LCDClient {
65
66
  }
66
67
 
67
68
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
68
- options.params.pagination = params.pagination;
69
+ setPaginationParams(options, params.pagination);
69
70
  }
70
71
 
71
- const endpoint = `cosmos/distribution/v1beta1/validators/${params.validator_address}/slashes`;
72
+ const endpoint = `cosmos/distribution/v1beta1/validators/${params.validatorAddress}/slashes`;
72
73
  return await this.request(endpoint, options);
73
74
  }
74
75
  /* DelegationRewards queries the total rewards accrued by a delegation. */
@@ -87,7 +88,7 @@ export class LCDQueryClient extends LCDClient {
87
88
  options.params.validator_address = params.validatorAddress;
88
89
  }
89
90
 
90
- const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegator_address}rewards/${params.validator_address}`;
91
+ const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}rewards/${params.validatorAddress}`;
91
92
  return await this.request(endpoint, options);
92
93
  }
93
94
  /* DelegationTotalRewards queries the total rewards accrued by a each
@@ -103,7 +104,7 @@ export class LCDQueryClient extends LCDClient {
103
104
  options.params.delegator_address = params.delegatorAddress;
104
105
  }
105
106
 
106
- const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegator_address}/rewards`;
107
+ const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/rewards`;
107
108
  return await this.request(endpoint, options);
108
109
  }
109
110
  /* DelegatorValidators queries the validators of a delegator. */
@@ -118,7 +119,7 @@ export class LCDQueryClient extends LCDClient {
118
119
  options.params.delegator_address = params.delegatorAddress;
119
120
  }
120
121
 
121
- const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegator_address}/validators`;
122
+ const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/validators`;
122
123
  return await this.request(endpoint, options);
123
124
  }
124
125
  /* DelegatorWithdrawAddress queries withdraw address of a delegator. */
@@ -133,13 +134,13 @@ export class LCDQueryClient extends LCDClient {
133
134
  options.params.delegator_address = params.delegatorAddress;
134
135
  }
135
136
 
136
- const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegator_address}/withdraw_address`;
137
+ const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/withdraw_address`;
137
138
  return await this.request(endpoint, options);
138
139
  }
139
140
  /* CommunityPool queries the community pool coins. */
140
141
 
141
142
 
142
- async communityPool(params) {
143
+ async communityPool(_params = {}) {
143
144
  const endpoint = `cosmos/distribution/v1beta1/community_pool`;
144
145
  return await this.request(endpoint);
145
146
  }
@@ -1,4 +1,5 @@
1
1
  import { LCDClient } from "@osmonauts/lcd";
2
+ import { setPaginationParams } from "@osmonauts/helpers";
2
3
  export class LCDQueryClient extends LCDClient {
3
4
  constructor({
4
5
  restEndpoint
@@ -19,7 +20,7 @@ export class LCDQueryClient extends LCDClient {
19
20
  options.params.proposal_id = params.proposalId;
20
21
  }
21
22
 
22
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}`;
23
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}`;
23
24
  return await this.request(endpoint, options);
24
25
  }
25
26
  /* Proposals queries all proposals based on given status. */
@@ -43,7 +44,7 @@ export class LCDQueryClient extends LCDClient {
43
44
  }
44
45
 
45
46
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
46
- options.params.pagination = params.pagination;
47
+ setPaginationParams(options, params.pagination);
47
48
  }
48
49
 
49
50
  const endpoint = `cosmos/gov/v1/proposals`;
@@ -61,7 +62,7 @@ export class LCDQueryClient extends LCDClient {
61
62
  options.params.proposal_id = params.proposalId;
62
63
  }
63
64
 
64
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}votes/${params.voter}`;
65
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}votes/${params.voter}`;
65
66
  return await this.request(endpoint, options);
66
67
  }
67
68
  /* Votes queries votes of a given proposal. */
@@ -77,10 +78,10 @@ export class LCDQueryClient extends LCDClient {
77
78
  }
78
79
 
79
80
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
80
- options.params.pagination = params.pagination;
81
+ setPaginationParams(options, params.pagination);
81
82
  }
82
83
 
83
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}/votes`;
84
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}/votes`;
84
85
  return await this.request(endpoint, options);
85
86
  }
86
87
  /* Params queries all parameters of the gov module. */
@@ -95,7 +96,7 @@ export class LCDQueryClient extends LCDClient {
95
96
  options.params.params_type = params.paramsType;
96
97
  }
97
98
 
98
- const endpoint = `cosmos/gov/v1/params/${params.params_type}`;
99
+ const endpoint = `cosmos/gov/v1/params/${params.paramsType}`;
99
100
  return await this.request(endpoint, options);
100
101
  }
101
102
  /* Deposit queries single deposit information based proposalID, depositAddr. */
@@ -110,7 +111,7 @@ export class LCDQueryClient extends LCDClient {
110
111
  options.params.proposal_id = params.proposalId;
111
112
  }
112
113
 
113
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}deposits/${params.depositor}`;
114
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}deposits/${params.depositor}`;
114
115
  return await this.request(endpoint, options);
115
116
  }
116
117
  /* Deposits queries all deposits of a single proposal. */
@@ -126,10 +127,10 @@ export class LCDQueryClient extends LCDClient {
126
127
  }
127
128
 
128
129
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
129
- options.params.pagination = params.pagination;
130
+ setPaginationParams(options, params.pagination);
130
131
  }
131
132
 
132
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}/deposits`;
133
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}/deposits`;
133
134
  return await this.request(endpoint, options);
134
135
  }
135
136
  /* TallyResult queries the tally of a proposal vote. */
@@ -144,7 +145,7 @@ export class LCDQueryClient extends LCDClient {
144
145
  options.params.proposal_id = params.proposalId;
145
146
  }
146
147
 
147
- const endpoint = `cosmos/gov/v1/proposals/${params.proposal_id}/tally`;
148
+ const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}/tally`;
148
149
  return await this.request(endpoint, options);
149
150
  }
150
151
 
@@ -1,4 +1,5 @@
1
1
  import { LCDClient } from "@osmonauts/lcd";
2
+ import { setPaginationParams } from "@osmonauts/helpers";
2
3
  export class LCDQueryClient extends LCDClient {
3
4
  constructor({
4
5
  restEndpoint
@@ -19,7 +20,7 @@ export class LCDQueryClient extends LCDClient {
19
20
  options.params.proposal_id = params.proposalId;
20
21
  }
21
22
 
22
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}`;
23
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}`;
23
24
  return await this.request(endpoint, options);
24
25
  }
25
26
  /* Proposals queries all proposals based on given status. */
@@ -43,7 +44,7 @@ export class LCDQueryClient extends LCDClient {
43
44
  }
44
45
 
45
46
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
46
- options.params.pagination = params.pagination;
47
+ setPaginationParams(options, params.pagination);
47
48
  }
48
49
 
49
50
  const endpoint = `cosmos/gov/v1beta1/proposals`;
@@ -61,7 +62,7 @@ export class LCDQueryClient extends LCDClient {
61
62
  options.params.proposal_id = params.proposalId;
62
63
  }
63
64
 
64
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}votes/${params.voter}`;
65
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}votes/${params.voter}`;
65
66
  return await this.request(endpoint, options);
66
67
  }
67
68
  /* Votes queries votes of a given proposal. */
@@ -77,10 +78,10 @@ export class LCDQueryClient extends LCDClient {
77
78
  }
78
79
 
79
80
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
80
- options.params.pagination = params.pagination;
81
+ setPaginationParams(options, params.pagination);
81
82
  }
82
83
 
83
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}/votes`;
84
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/votes`;
84
85
  return await this.request(endpoint, options);
85
86
  }
86
87
  /* Params queries all parameters of the gov module. */
@@ -95,7 +96,7 @@ export class LCDQueryClient extends LCDClient {
95
96
  options.params.params_type = params.paramsType;
96
97
  }
97
98
 
98
- const endpoint = `cosmos/gov/v1beta1/params/${params.params_type}`;
99
+ const endpoint = `cosmos/gov/v1beta1/params/${params.paramsType}`;
99
100
  return await this.request(endpoint, options);
100
101
  }
101
102
  /* Deposit queries single deposit information based proposalID, depositAddr. */
@@ -110,7 +111,7 @@ export class LCDQueryClient extends LCDClient {
110
111
  options.params.proposal_id = params.proposalId;
111
112
  }
112
113
 
113
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}deposits/${params.depositor}`;
114
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}deposits/${params.depositor}`;
114
115
  return await this.request(endpoint, options);
115
116
  }
116
117
  /* Deposits queries all deposits of a single proposal. */
@@ -126,10 +127,10 @@ export class LCDQueryClient extends LCDClient {
126
127
  }
127
128
 
128
129
  if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
129
- options.params.pagination = params.pagination;
130
+ setPaginationParams(options, params.pagination);
130
131
  }
131
132
 
132
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}/deposits`;
133
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/deposits`;
133
134
  return await this.request(endpoint, options);
134
135
  }
135
136
  /* TallyResult queries the tally of a proposal vote. */
@@ -144,7 +145,7 @@ export class LCDQueryClient extends LCDClient {
144
145
  options.params.proposal_id = params.proposalId;
145
146
  }
146
147
 
147
- const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposal_id}/tally`;
148
+ const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/tally`;
148
149
  return await this.request(endpoint, options);
149
150
  }
150
151