juno-network 0.2.0 → 0.2.1
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.
- package/main/codegen/JunoSwap.client.js +1 -1
- package/main/codegen/cosmos/bank/v1beta1/query.lcd.js +44 -26
- package/main/codegen/cosmos/client.js +20 -9
- package/main/codegen/cosmos/distribution/v1beta1/query.lcd.js +37 -27
- package/main/codegen/cosmos/gov/v1/query.lcd.js +12 -10
- package/main/codegen/cosmos/gov/v1beta1/query.lcd.js +12 -10
- package/main/codegen/cosmos/group/v1/query.lcd.js +17 -15
- package/main/codegen/cosmos/staking/v1beta1/query.lcd.js +39 -29
- package/main/codegen/cosmwasm/client.js +28 -12
- package/main/codegen/cosmwasm/wasm/v1/query.lcd.js +35 -21
- package/main/codegen/ibc/applications/transfer/v1/query.lcd.js +25 -13
- package/main/codegen/ibc/client.js +28 -12
- package/main/codegen/ibc/core/channel/v1/query.lcd.js +40 -32
- package/main/codegen/juno/mint/query.lcd.js +30 -18
- package/module/codegen/JunoSwap.client.js +1 -1
- package/module/codegen/JunoSwap.react-query.js +1 -1
- package/module/codegen/contracts.js +1 -1
- package/module/codegen/cosmos/bank/v1beta1/query.lcd.js +13 -8
- package/module/codegen/cosmos/client.js +12 -2
- package/module/codegen/cosmos/distribution/v1beta1/query.lcd.js +11 -10
- package/module/codegen/cosmos/gov/v1/query.lcd.js +11 -10
- package/module/codegen/cosmos/gov/v1beta1/query.lcd.js +11 -10
- package/module/codegen/cosmos/group/v1/query.lcd.js +16 -15
- package/module/codegen/cosmos/staking/v1beta1/query.lcd.js +20 -19
- package/module/codegen/cosmwasm/client.js +16 -2
- package/module/codegen/cosmwasm/wasm/v1/query.lcd.js +16 -11
- package/module/codegen/ibc/applications/transfer/v1/query.lcd.js +6 -3
- package/module/codegen/ibc/client.js +16 -2
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +19 -16
- package/module/codegen/index.js +1 -1
- package/module/codegen/juno/mint/query.lcd.js +3 -3
- package/package.json +14 -14
@@ -45,20 +45,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
45
45
|
(0, _createClass2["default"])(LCDQueryClient, [{
|
46
46
|
key: "params",
|
47
47
|
value: function () {
|
48
|
-
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(
|
49
|
-
var
|
48
|
+
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
49
|
+
var _params,
|
50
|
+
endpoint,
|
51
|
+
_args = arguments;
|
52
|
+
|
50
53
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
51
54
|
while (1) {
|
52
55
|
switch (_context.prev = _context.next) {
|
53
56
|
case 0:
|
57
|
+
_params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
54
58
|
endpoint = "cosmos/mint/v1beta1/params";
|
55
|
-
_context.next =
|
59
|
+
_context.next = 4;
|
56
60
|
return this.request(endpoint);
|
57
61
|
|
58
|
-
case
|
62
|
+
case 4:
|
59
63
|
return _context.abrupt("return", _context.sent);
|
60
64
|
|
61
|
-
case
|
65
|
+
case 5:
|
62
66
|
case "end":
|
63
67
|
return _context.stop();
|
64
68
|
}
|
@@ -66,7 +70,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
66
70
|
}, _callee, this);
|
67
71
|
}));
|
68
72
|
|
69
|
-
function params(
|
73
|
+
function params() {
|
70
74
|
return _params2.apply(this, arguments);
|
71
75
|
}
|
72
76
|
|
@@ -77,20 +81,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
77
81
|
}, {
|
78
82
|
key: "inflation",
|
79
83
|
value: function () {
|
80
|
-
var _inflation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(
|
81
|
-
var
|
84
|
+
var _inflation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
85
|
+
var _params,
|
86
|
+
endpoint,
|
87
|
+
_args2 = arguments;
|
88
|
+
|
82
89
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
83
90
|
while (1) {
|
84
91
|
switch (_context2.prev = _context2.next) {
|
85
92
|
case 0:
|
93
|
+
_params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
86
94
|
endpoint = "cosmos/mint/v1beta1/inflation";
|
87
|
-
_context2.next =
|
95
|
+
_context2.next = 4;
|
88
96
|
return this.request(endpoint);
|
89
97
|
|
90
|
-
case
|
98
|
+
case 4:
|
91
99
|
return _context2.abrupt("return", _context2.sent);
|
92
100
|
|
93
|
-
case
|
101
|
+
case 5:
|
94
102
|
case "end":
|
95
103
|
return _context2.stop();
|
96
104
|
}
|
@@ -98,7 +106,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
98
106
|
}, _callee2, this);
|
99
107
|
}));
|
100
108
|
|
101
|
-
function inflation(
|
109
|
+
function inflation() {
|
102
110
|
return _inflation.apply(this, arguments);
|
103
111
|
}
|
104
112
|
|
@@ -109,20 +117,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
109
117
|
}, {
|
110
118
|
key: "annualProvisions",
|
111
119
|
value: function () {
|
112
|
-
var _annualProvisions = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(
|
113
|
-
var
|
120
|
+
var _annualProvisions = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
121
|
+
var _params,
|
122
|
+
endpoint,
|
123
|
+
_args3 = arguments;
|
124
|
+
|
114
125
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
115
126
|
while (1) {
|
116
127
|
switch (_context3.prev = _context3.next) {
|
117
128
|
case 0:
|
129
|
+
_params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
118
130
|
endpoint = "cosmos/mint/v1beta1/annual_provisions";
|
119
|
-
_context3.next =
|
131
|
+
_context3.next = 4;
|
120
132
|
return this.request(endpoint);
|
121
133
|
|
122
|
-
case
|
134
|
+
case 4:
|
123
135
|
return _context3.abrupt("return", _context3.sent);
|
124
136
|
|
125
|
-
case
|
137
|
+
case 5:
|
126
138
|
case "end":
|
127
139
|
return _context3.stop();
|
128
140
|
}
|
@@ -130,7 +142,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
130
142
|
}, _callee3, this);
|
131
143
|
}));
|
132
144
|
|
133
|
-
function annualProvisions(
|
145
|
+
function annualProvisions() {
|
134
146
|
return _annualProvisions.apply(this, arguments);
|
135
147
|
}
|
136
148
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
2
2
|
|
3
3
|
/**
|
4
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
4
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
5
5
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
6
6
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
7
7
|
*/
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
6
|
|
7
7
|
/**
|
8
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
8
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
9
9
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
10
10
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
11
11
|
*/
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
6
6
|
|
7
7
|
/**
|
8
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
8
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
9
9
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
10
10
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
11
11
|
*/
|
@@ -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
|
@@ -31,7 +32,7 @@ export class LCDQueryClient extends LCDClient {
|
|
31
32
|
};
|
32
33
|
|
33
34
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
34
|
-
options
|
35
|
+
setPaginationParams(options, params.pagination);
|
35
36
|
}
|
36
37
|
|
37
38
|
const endpoint = `cosmos/bank/v1beta1/balances/${params.address}`;
|
@@ -47,7 +48,7 @@ export class LCDQueryClient extends LCDClient {
|
|
47
48
|
};
|
48
49
|
|
49
50
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
50
|
-
options
|
51
|
+
setPaginationParams(options, params.pagination);
|
51
52
|
}
|
52
53
|
|
53
54
|
const endpoint = `cosmos/bank/v1beta1/spendable_balances/${params.address}`;
|
@@ -56,13 +57,15 @@ export class LCDQueryClient extends LCDClient {
|
|
56
57
|
/* TotalSupply queries the total supply of all coins. */
|
57
58
|
|
58
59
|
|
59
|
-
async totalSupply(params
|
60
|
+
async totalSupply(params = {
|
61
|
+
pagination: undefined
|
62
|
+
}) {
|
60
63
|
const options = {
|
61
64
|
params: {}
|
62
65
|
};
|
63
66
|
|
64
67
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
65
|
-
options
|
68
|
+
setPaginationParams(options, params.pagination);
|
66
69
|
}
|
67
70
|
|
68
71
|
const endpoint = `cosmos/bank/v1beta1/supply`;
|
@@ -86,7 +89,7 @@ export class LCDQueryClient extends LCDClient {
|
|
86
89
|
/* Params queries the parameters of x/bank module. */
|
87
90
|
|
88
91
|
|
89
|
-
async params(
|
92
|
+
async params(_params = {}) {
|
90
93
|
const endpoint = `cosmos/bank/v1beta1/params`;
|
91
94
|
return await this.request(endpoint);
|
92
95
|
}
|
@@ -101,13 +104,15 @@ export class LCDQueryClient extends LCDClient {
|
|
101
104
|
denominations. */
|
102
105
|
|
103
106
|
|
104
|
-
async denomsMetadata(params
|
107
|
+
async denomsMetadata(params = {
|
108
|
+
pagination: undefined
|
109
|
+
}) {
|
105
110
|
const options = {
|
106
111
|
params: {}
|
107
112
|
};
|
108
113
|
|
109
114
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
110
|
-
options
|
115
|
+
setPaginationParams(options, params.pagination);
|
111
116
|
}
|
112
117
|
|
113
118
|
const endpoint = `cosmos/bank/v1beta1/denoms_metadata`;
|
@@ -123,7 +128,7 @@ export class LCDQueryClient extends LCDClient {
|
|
123
128
|
};
|
124
129
|
|
125
130
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
126
|
-
options
|
131
|
+
setPaginationParams(options, params.pagination);
|
127
132
|
}
|
128
133
|
|
129
134
|
const endpoint = `cosmos/bank/v1beta1/denom_owners/${params.denom}`;
|
@@ -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
|
26
|
-
|
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(
|
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.
|
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.
|
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
|
69
|
+
setPaginationParams(options, params.pagination);
|
69
70
|
}
|
70
71
|
|
71
|
-
const endpoint = `cosmos/distribution/v1beta1/validators/${params.
|
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.
|
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.
|
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.
|
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.
|
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(
|
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.
|
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
|
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.
|
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
|
81
|
+
setPaginationParams(options, params.pagination);
|
81
82
|
}
|
82
83
|
|
83
|
-
const endpoint = `cosmos/gov/v1/proposals/${params.
|
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.
|
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.
|
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
|
130
|
+
setPaginationParams(options, params.pagination);
|
130
131
|
}
|
131
132
|
|
132
|
-
const endpoint = `cosmos/gov/v1/proposals/${params.
|
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.
|
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.
|
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
|
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.
|
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
|
81
|
+
setPaginationParams(options, params.pagination);
|
81
82
|
}
|
82
83
|
|
83
|
-
const endpoint = `cosmos/gov/v1beta1/proposals/${params.
|
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.
|
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.
|
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
|
130
|
+
setPaginationParams(options, params.pagination);
|
130
131
|
}
|
131
132
|
|
132
|
-
const endpoint = `cosmos/gov/v1beta1/proposals/${params.
|
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.
|
148
|
+
const endpoint = `cosmos/gov/v1beta1/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.group_id = params.groupId;
|
20
21
|
}
|
21
22
|
|
22
|
-
const endpoint = `cosmos/group/v1/group_info/${params.
|
23
|
+
const endpoint = `cosmos/group/v1/group_info/${params.groupId}`;
|
23
24
|
return await this.request(endpoint, options);
|
24
25
|
}
|
25
26
|
/* GroupPolicyInfo queries group policy info based on account address of group policy. */
|
@@ -42,10 +43,10 @@ export class LCDQueryClient extends LCDClient {
|
|
42
43
|
}
|
43
44
|
|
44
45
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
45
|
-
options
|
46
|
+
setPaginationParams(options, params.pagination);
|
46
47
|
}
|
47
48
|
|
48
|
-
const endpoint = `cosmos/group/v1/group_members/${params.
|
49
|
+
const endpoint = `cosmos/group/v1/group_members/${params.groupId}`;
|
49
50
|
return await this.request(endpoint, options);
|
50
51
|
}
|
51
52
|
/* GroupsByAdmin queries groups by admin address. */
|
@@ -57,7 +58,7 @@ export class LCDQueryClient extends LCDClient {
|
|
57
58
|
};
|
58
59
|
|
59
60
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
60
|
-
options
|
61
|
+
setPaginationParams(options, params.pagination);
|
61
62
|
}
|
62
63
|
|
63
64
|
const endpoint = `cosmos/group/v1/groups_by_admin/${params.admin}`;
|
@@ -76,10 +77,10 @@ export class LCDQueryClient extends LCDClient {
|
|
76
77
|
}
|
77
78
|
|
78
79
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
79
|
-
options
|
80
|
+
setPaginationParams(options, params.pagination);
|
80
81
|
}
|
81
82
|
|
82
|
-
const endpoint = `cosmos/group/v1/group_policies_by_group/${params.
|
83
|
+
const endpoint = `cosmos/group/v1/group_policies_by_group/${params.groupId}`;
|
83
84
|
return await this.request(endpoint, options);
|
84
85
|
}
|
85
86
|
/* GroupsByAdmin queries group policies by admin address. */
|
@@ -91,7 +92,7 @@ export class LCDQueryClient extends LCDClient {
|
|
91
92
|
};
|
92
93
|
|
93
94
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
94
|
-
options
|
95
|
+
setPaginationParams(options, params.pagination);
|
95
96
|
}
|
96
97
|
|
97
98
|
const endpoint = `cosmos/group/v1/group_policies_by_admin/${params.admin}`;
|
@@ -109,7 +110,7 @@ export class LCDQueryClient extends LCDClient {
|
|
109
110
|
options.params.proposal_id = params.proposalId;
|
110
111
|
}
|
111
112
|
|
112
|
-
const endpoint = `cosmos/group/v1/proposal/${params.
|
113
|
+
const endpoint = `cosmos/group/v1/proposal/${params.proposalId}`;
|
113
114
|
return await this.request(endpoint, options);
|
114
115
|
}
|
115
116
|
/* ProposalsByGroupPolicy queries proposals based on account address of group policy. */
|
@@ -121,7 +122,7 @@ export class LCDQueryClient extends LCDClient {
|
|
121
122
|
};
|
122
123
|
|
123
124
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
124
|
-
options
|
125
|
+
setPaginationParams(options, params.pagination);
|
125
126
|
}
|
126
127
|
|
127
128
|
const endpoint = `cosmos/group/v1/proposals_by_group_policy/${params.address}`;
|
@@ -139,7 +140,7 @@ export class LCDQueryClient extends LCDClient {
|
|
139
140
|
options.params.proposal_id = params.proposalId;
|
140
141
|
}
|
141
142
|
|
142
|
-
const endpoint = `cosmos/group/v1/vote_by_proposal_voter/${params.
|
143
|
+
const endpoint = `cosmos/group/v1/vote_by_proposal_voter/${params.proposalId}/${params.voter}`;
|
143
144
|
return await this.request(endpoint, options);
|
144
145
|
}
|
145
146
|
/* VotesByProposal queries a vote by proposal. */
|
@@ -155,10 +156,10 @@ export class LCDQueryClient extends LCDClient {
|
|
155
156
|
}
|
156
157
|
|
157
158
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
158
|
-
options
|
159
|
+
setPaginationParams(options, params.pagination);
|
159
160
|
}
|
160
161
|
|
161
|
-
const endpoint = `cosmos/group/v1/votes_by_proposal/${params.
|
162
|
+
const endpoint = `cosmos/group/v1/votes_by_proposal/${params.proposalId}`;
|
162
163
|
return await this.request(endpoint, options);
|
163
164
|
}
|
164
165
|
/* VotesByVoter queries a vote by voter. */
|
@@ -170,7 +171,7 @@ export class LCDQueryClient extends LCDClient {
|
|
170
171
|
};
|
171
172
|
|
172
173
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
173
|
-
options
|
174
|
+
setPaginationParams(options, params.pagination);
|
174
175
|
}
|
175
176
|
|
176
177
|
const endpoint = `cosmos/group/v1/votes_by_voter/${params.voter}`;
|
@@ -185,7 +186,7 @@ export class LCDQueryClient extends LCDClient {
|
|
185
186
|
};
|
186
187
|
|
187
188
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
188
|
-
options
|
189
|
+
setPaginationParams(options, params.pagination);
|
189
190
|
}
|
190
191
|
|
191
192
|
const endpoint = `cosmos/group/v1/groups_by_member/${params.address}`;
|
@@ -203,7 +204,7 @@ export class LCDQueryClient extends LCDClient {
|
|
203
204
|
options.params.proposal_id = params.proposalId;
|
204
205
|
}
|
205
206
|
|
206
|
-
const endpoint = `cosmos/group/v1/proposals/${params.
|
207
|
+
const endpoint = `cosmos/group/v1/proposals/${params.proposalId}/tally`;
|
207
208
|
return await this.request(endpoint, options);
|
208
209
|
}
|
209
210
|
|