juno-network 0.2.5 → 0.2.8
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/README.md +1 -1
- package/main/codegen/cosmos/auth/v1beta1/query.lcd.js +10 -26
- package/main/codegen/cosmos/distribution/v1beta1/query.lcd.js +33 -89
- package/main/codegen/cosmos/evidence/v1beta1/query.lcd.js +5 -13
- package/main/codegen/cosmos/gov/v1/query.lcd.js +31 -79
- package/main/codegen/cosmos/gov/v1beta1/query.lcd.js +31 -79
- package/main/codegen/cosmos/group/v1/query.lcd.js +29 -73
- package/main/codegen/cosmos/nft/v1beta1/query.lcd.js +25 -65
- package/main/codegen/cosmos/slashing/v1beta1/query.lcd.js +5 -13
- package/main/codegen/cosmos/staking/v1beta1/query.lcd.js +38 -106
- package/main/codegen/cosmos/upgrade/v1beta1/query.lcd.js +5 -13
- package/main/codegen/cosmwasm/wasm/v1/query.lcd.js +18 -46
- package/main/codegen/ibc/core/channel/v1/query.lcd.js +51 -191
- package/main/codegen/ibc/core/client/v1/query.lcd.js +16 -48
- package/main/codegen/ibc/core/connection/v1/query.lcd.js +20 -60
- package/module/codegen/cosmos/auth/v1beta1/query.lcd.js +2 -18
- package/module/codegen/cosmos/distribution/v1beta1/query.lcd.js +6 -62
- package/module/codegen/cosmos/evidence/v1beta1/query.lcd.js +1 -9
- package/module/codegen/cosmos/gov/v1/query.lcd.js +5 -53
- package/module/codegen/cosmos/gov/v1beta1/query.lcd.js +5 -53
- package/module/codegen/cosmos/group/v1/query.lcd.js +4 -48
- package/module/codegen/cosmos/nft/v1beta1/query.lcd.js +5 -45
- package/module/codegen/cosmos/slashing/v1beta1/query.lcd.js +1 -9
- package/module/codegen/cosmos/staking/v1beta1/query.lcd.js +4 -72
- package/module/codegen/cosmos/upgrade/v1beta1/query.lcd.js +1 -9
- package/module/codegen/cosmwasm/wasm/v1/query.lcd.js +3 -31
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +9 -149
- package/module/codegen/ibc/core/client/v1/query.lcd.js +2 -34
- package/module/codegen/ibc/core/connection/v1/query.lcd.js +4 -44
- package/module/codegen/index.js +1 -1
- package/package.json +5 -5
@@ -59,31 +59,15 @@ export class LCDQueryClient extends LCDClient {
|
|
59
59
|
|
60
60
|
|
61
61
|
async addressBytesToString(params) {
|
62
|
-
const options = {
|
63
|
-
params: {}
|
64
|
-
};
|
65
|
-
|
66
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.addressBytes) !== "undefined") {
|
67
|
-
options.params.address_bytes = params.addressBytes;
|
68
|
-
}
|
69
|
-
|
70
62
|
const endpoint = `cosmos/auth/v1beta1/bech32/${params.addressBytes}`;
|
71
|
-
return await this.request(endpoint
|
63
|
+
return await this.request(endpoint);
|
72
64
|
}
|
73
65
|
/* AddressStringToBytes converts Address string to bytes */
|
74
66
|
|
75
67
|
|
76
68
|
async addressStringToBytes(params) {
|
77
|
-
const options = {
|
78
|
-
params: {}
|
79
|
-
};
|
80
|
-
|
81
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.addressString) !== "undefined") {
|
82
|
-
options.params.address_string = params.addressString;
|
83
|
-
}
|
84
|
-
|
85
69
|
const endpoint = `cosmos/auth/v1beta1/bech32/${params.addressString}`;
|
86
|
-
return await this.request(endpoint
|
70
|
+
return await this.request(endpoint);
|
87
71
|
}
|
88
72
|
|
89
73
|
}
|
@@ -19,31 +19,15 @@ export class LCDQueryClient extends LCDClient {
|
|
19
19
|
|
20
20
|
|
21
21
|
async validatorOutstandingRewards(params) {
|
22
|
-
const options = {
|
23
|
-
params: {}
|
24
|
-
};
|
25
|
-
|
26
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.validatorAddress) !== "undefined") {
|
27
|
-
options.params.validator_address = params.validatorAddress;
|
28
|
-
}
|
29
|
-
|
30
22
|
const endpoint = `cosmos/distribution/v1beta1/validators/${params.validatorAddress}/outstanding_rewards`;
|
31
|
-
return await this.request(endpoint
|
23
|
+
return await this.request(endpoint);
|
32
24
|
}
|
33
25
|
/* ValidatorCommission queries accumulated commission for a validator. */
|
34
26
|
|
35
27
|
|
36
28
|
async validatorCommission(params) {
|
37
|
-
const options = {
|
38
|
-
params: {}
|
39
|
-
};
|
40
|
-
|
41
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.validatorAddress) !== "undefined") {
|
42
|
-
options.params.validator_address = params.validatorAddress;
|
43
|
-
}
|
44
|
-
|
45
29
|
const endpoint = `cosmos/distribution/v1beta1/validators/${params.validatorAddress}/commission`;
|
46
|
-
return await this.request(endpoint
|
30
|
+
return await this.request(endpoint);
|
47
31
|
}
|
48
32
|
/* ValidatorSlashes queries slash events of a validator. */
|
49
33
|
|
@@ -53,10 +37,6 @@ export class LCDQueryClient extends LCDClient {
|
|
53
37
|
params: {}
|
54
38
|
};
|
55
39
|
|
56
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.validatorAddress) !== "undefined") {
|
57
|
-
options.params.validator_address = params.validatorAddress;
|
58
|
-
}
|
59
|
-
|
60
40
|
if (typeof (params === null || params === void 0 ? void 0 : params.startingHeight) !== "undefined") {
|
61
41
|
options.params.starting_height = params.startingHeight;
|
62
42
|
}
|
@@ -76,66 +56,30 @@ export class LCDQueryClient extends LCDClient {
|
|
76
56
|
|
77
57
|
|
78
58
|
async delegationRewards(params) {
|
79
|
-
const options = {
|
80
|
-
params: {}
|
81
|
-
};
|
82
|
-
|
83
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.delegatorAddress) !== "undefined") {
|
84
|
-
options.params.delegator_address = params.delegatorAddress;
|
85
|
-
}
|
86
|
-
|
87
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.validatorAddress) !== "undefined") {
|
88
|
-
options.params.validator_address = params.validatorAddress;
|
89
|
-
}
|
90
|
-
|
91
59
|
const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}rewards/${params.validatorAddress}`;
|
92
|
-
return await this.request(endpoint
|
60
|
+
return await this.request(endpoint);
|
93
61
|
}
|
94
62
|
/* DelegationTotalRewards queries the total rewards accrued by a each
|
95
63
|
validator. */
|
96
64
|
|
97
65
|
|
98
66
|
async delegationTotalRewards(params) {
|
99
|
-
const options = {
|
100
|
-
params: {}
|
101
|
-
};
|
102
|
-
|
103
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.delegatorAddress) !== "undefined") {
|
104
|
-
options.params.delegator_address = params.delegatorAddress;
|
105
|
-
}
|
106
|
-
|
107
67
|
const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/rewards`;
|
108
|
-
return await this.request(endpoint
|
68
|
+
return await this.request(endpoint);
|
109
69
|
}
|
110
70
|
/* DelegatorValidators queries the validators of a delegator. */
|
111
71
|
|
112
72
|
|
113
73
|
async delegatorValidators(params) {
|
114
|
-
const options = {
|
115
|
-
params: {}
|
116
|
-
};
|
117
|
-
|
118
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.delegatorAddress) !== "undefined") {
|
119
|
-
options.params.delegator_address = params.delegatorAddress;
|
120
|
-
}
|
121
|
-
|
122
74
|
const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/validators`;
|
123
|
-
return await this.request(endpoint
|
75
|
+
return await this.request(endpoint);
|
124
76
|
}
|
125
77
|
/* DelegatorWithdrawAddress queries withdraw address of a delegator. */
|
126
78
|
|
127
79
|
|
128
80
|
async delegatorWithdrawAddress(params) {
|
129
|
-
const options = {
|
130
|
-
params: {}
|
131
|
-
};
|
132
|
-
|
133
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.delegatorAddress) !== "undefined") {
|
134
|
-
options.params.delegator_address = params.delegatorAddress;
|
135
|
-
}
|
136
|
-
|
137
81
|
const endpoint = `cosmos/distribution/v1beta1/delegators/${params.delegatorAddress}/withdraw_address`;
|
138
|
-
return await this.request(endpoint
|
82
|
+
return await this.request(endpoint);
|
139
83
|
}
|
140
84
|
/* CommunityPool queries the community pool coins. */
|
141
85
|
|
@@ -12,16 +12,8 @@ export class LCDQueryClient extends LCDClient {
|
|
12
12
|
|
13
13
|
|
14
14
|
async evidence(params) {
|
15
|
-
const options = {
|
16
|
-
params: {}
|
17
|
-
};
|
18
|
-
|
19
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.evidenceHash) !== "undefined") {
|
20
|
-
options.params.evidence_hash = params.evidenceHash;
|
21
|
-
}
|
22
|
-
|
23
15
|
const endpoint = `cosmos/evidence/v1beta1/evidence/${params.evidenceHash}`;
|
24
|
-
return await this.request(endpoint
|
16
|
+
return await this.request(endpoint);
|
25
17
|
}
|
26
18
|
/* AllEvidence queries all evidence. */
|
27
19
|
|
@@ -12,16 +12,8 @@ export class LCDQueryClient extends LCDClient {
|
|
12
12
|
|
13
13
|
|
14
14
|
async proposal(params) {
|
15
|
-
const options = {
|
16
|
-
params: {}
|
17
|
-
};
|
18
|
-
|
19
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
20
|
-
options.params.proposal_id = params.proposalId;
|
21
|
-
}
|
22
|
-
|
23
15
|
const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}`;
|
24
|
-
return await this.request(endpoint
|
16
|
+
return await this.request(endpoint);
|
25
17
|
}
|
26
18
|
/* Proposals queries all proposals based on given status. */
|
27
19
|
|
@@ -54,16 +46,8 @@ export class LCDQueryClient extends LCDClient {
|
|
54
46
|
|
55
47
|
|
56
48
|
async vote(params) {
|
57
|
-
const options = {
|
58
|
-
params: {}
|
59
|
-
};
|
60
|
-
|
61
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
62
|
-
options.params.proposal_id = params.proposalId;
|
63
|
-
}
|
64
|
-
|
65
49
|
const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}votes/${params.voter}`;
|
66
|
-
return await this.request(endpoint
|
50
|
+
return await this.request(endpoint);
|
67
51
|
}
|
68
52
|
/* Votes queries votes of a given proposal. */
|
69
53
|
|
@@ -73,10 +57,6 @@ export class LCDQueryClient extends LCDClient {
|
|
73
57
|
params: {}
|
74
58
|
};
|
75
59
|
|
76
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
77
|
-
options.params.proposal_id = params.proposalId;
|
78
|
-
}
|
79
|
-
|
80
60
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
81
61
|
setPaginationParams(options, params.pagination);
|
82
62
|
}
|
@@ -88,31 +68,15 @@ export class LCDQueryClient extends LCDClient {
|
|
88
68
|
|
89
69
|
|
90
70
|
async params(params) {
|
91
|
-
const options = {
|
92
|
-
params: {}
|
93
|
-
};
|
94
|
-
|
95
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.paramsType) !== "undefined") {
|
96
|
-
options.params.params_type = params.paramsType;
|
97
|
-
}
|
98
|
-
|
99
71
|
const endpoint = `cosmos/gov/v1/params/${params.paramsType}`;
|
100
|
-
return await this.request(endpoint
|
72
|
+
return await this.request(endpoint);
|
101
73
|
}
|
102
74
|
/* Deposit queries single deposit information based proposalID, depositAddr. */
|
103
75
|
|
104
76
|
|
105
77
|
async deposit(params) {
|
106
|
-
const options = {
|
107
|
-
params: {}
|
108
|
-
};
|
109
|
-
|
110
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
111
|
-
options.params.proposal_id = params.proposalId;
|
112
|
-
}
|
113
|
-
|
114
78
|
const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}deposits/${params.depositor}`;
|
115
|
-
return await this.request(endpoint
|
79
|
+
return await this.request(endpoint);
|
116
80
|
}
|
117
81
|
/* Deposits queries all deposits of a single proposal. */
|
118
82
|
|
@@ -122,10 +86,6 @@ export class LCDQueryClient extends LCDClient {
|
|
122
86
|
params: {}
|
123
87
|
};
|
124
88
|
|
125
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
126
|
-
options.params.proposal_id = params.proposalId;
|
127
|
-
}
|
128
|
-
|
129
89
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
130
90
|
setPaginationParams(options, params.pagination);
|
131
91
|
}
|
@@ -137,16 +97,8 @@ export class LCDQueryClient extends LCDClient {
|
|
137
97
|
|
138
98
|
|
139
99
|
async tallyResult(params) {
|
140
|
-
const options = {
|
141
|
-
params: {}
|
142
|
-
};
|
143
|
-
|
144
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
145
|
-
options.params.proposal_id = params.proposalId;
|
146
|
-
}
|
147
|
-
|
148
100
|
const endpoint = `cosmos/gov/v1/proposals/${params.proposalId}/tally`;
|
149
|
-
return await this.request(endpoint
|
101
|
+
return await this.request(endpoint);
|
150
102
|
}
|
151
103
|
|
152
104
|
}
|
@@ -12,16 +12,8 @@ export class LCDQueryClient extends LCDClient {
|
|
12
12
|
|
13
13
|
|
14
14
|
async proposal(params) {
|
15
|
-
const options = {
|
16
|
-
params: {}
|
17
|
-
};
|
18
|
-
|
19
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
20
|
-
options.params.proposal_id = params.proposalId;
|
21
|
-
}
|
22
|
-
|
23
15
|
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}`;
|
24
|
-
return await this.request(endpoint
|
16
|
+
return await this.request(endpoint);
|
25
17
|
}
|
26
18
|
/* Proposals queries all proposals based on given status. */
|
27
19
|
|
@@ -54,16 +46,8 @@ export class LCDQueryClient extends LCDClient {
|
|
54
46
|
|
55
47
|
|
56
48
|
async vote(params) {
|
57
|
-
const options = {
|
58
|
-
params: {}
|
59
|
-
};
|
60
|
-
|
61
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
62
|
-
options.params.proposal_id = params.proposalId;
|
63
|
-
}
|
64
|
-
|
65
49
|
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}votes/${params.voter}`;
|
66
|
-
return await this.request(endpoint
|
50
|
+
return await this.request(endpoint);
|
67
51
|
}
|
68
52
|
/* Votes queries votes of a given proposal. */
|
69
53
|
|
@@ -73,10 +57,6 @@ export class LCDQueryClient extends LCDClient {
|
|
73
57
|
params: {}
|
74
58
|
};
|
75
59
|
|
76
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
77
|
-
options.params.proposal_id = params.proposalId;
|
78
|
-
}
|
79
|
-
|
80
60
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
81
61
|
setPaginationParams(options, params.pagination);
|
82
62
|
}
|
@@ -88,31 +68,15 @@ export class LCDQueryClient extends LCDClient {
|
|
88
68
|
|
89
69
|
|
90
70
|
async params(params) {
|
91
|
-
const options = {
|
92
|
-
params: {}
|
93
|
-
};
|
94
|
-
|
95
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.paramsType) !== "undefined") {
|
96
|
-
options.params.params_type = params.paramsType;
|
97
|
-
}
|
98
|
-
|
99
71
|
const endpoint = `cosmos/gov/v1beta1/params/${params.paramsType}`;
|
100
|
-
return await this.request(endpoint
|
72
|
+
return await this.request(endpoint);
|
101
73
|
}
|
102
74
|
/* Deposit queries single deposit information based proposalID, depositAddr. */
|
103
75
|
|
104
76
|
|
105
77
|
async deposit(params) {
|
106
|
-
const options = {
|
107
|
-
params: {}
|
108
|
-
};
|
109
|
-
|
110
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
111
|
-
options.params.proposal_id = params.proposalId;
|
112
|
-
}
|
113
|
-
|
114
78
|
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}deposits/${params.depositor}`;
|
115
|
-
return await this.request(endpoint
|
79
|
+
return await this.request(endpoint);
|
116
80
|
}
|
117
81
|
/* Deposits queries all deposits of a single proposal. */
|
118
82
|
|
@@ -122,10 +86,6 @@ export class LCDQueryClient extends LCDClient {
|
|
122
86
|
params: {}
|
123
87
|
};
|
124
88
|
|
125
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
126
|
-
options.params.proposal_id = params.proposalId;
|
127
|
-
}
|
128
|
-
|
129
89
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
130
90
|
setPaginationParams(options, params.pagination);
|
131
91
|
}
|
@@ -137,16 +97,8 @@ export class LCDQueryClient extends LCDClient {
|
|
137
97
|
|
138
98
|
|
139
99
|
async tallyResult(params) {
|
140
|
-
const options = {
|
141
|
-
params: {}
|
142
|
-
};
|
143
|
-
|
144
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
145
|
-
options.params.proposal_id = params.proposalId;
|
146
|
-
}
|
147
|
-
|
148
100
|
const endpoint = `cosmos/gov/v1beta1/proposals/${params.proposalId}/tally`;
|
149
|
-
return await this.request(endpoint
|
101
|
+
return await this.request(endpoint);
|
150
102
|
}
|
151
103
|
|
152
104
|
}
|
@@ -12,16 +12,8 @@ export class LCDQueryClient extends LCDClient {
|
|
12
12
|
|
13
13
|
|
14
14
|
async groupInfo(params) {
|
15
|
-
const options = {
|
16
|
-
params: {}
|
17
|
-
};
|
18
|
-
|
19
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.groupId) !== "undefined") {
|
20
|
-
options.params.group_id = params.groupId;
|
21
|
-
}
|
22
|
-
|
23
15
|
const endpoint = `cosmos/group/v1/group_info/${params.groupId}`;
|
24
|
-
return await this.request(endpoint
|
16
|
+
return await this.request(endpoint);
|
25
17
|
}
|
26
18
|
/* GroupPolicyInfo queries group policy info based on account address of group policy. */
|
27
19
|
|
@@ -38,10 +30,6 @@ export class LCDQueryClient extends LCDClient {
|
|
38
30
|
params: {}
|
39
31
|
};
|
40
32
|
|
41
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.groupId) !== "undefined") {
|
42
|
-
options.params.group_id = params.groupId;
|
43
|
-
}
|
44
|
-
|
45
33
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
46
34
|
setPaginationParams(options, params.pagination);
|
47
35
|
}
|
@@ -72,10 +60,6 @@ export class LCDQueryClient extends LCDClient {
|
|
72
60
|
params: {}
|
73
61
|
};
|
74
62
|
|
75
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.groupId) !== "undefined") {
|
76
|
-
options.params.group_id = params.groupId;
|
77
|
-
}
|
78
|
-
|
79
63
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
80
64
|
setPaginationParams(options, params.pagination);
|
81
65
|
}
|
@@ -102,16 +86,8 @@ export class LCDQueryClient extends LCDClient {
|
|
102
86
|
|
103
87
|
|
104
88
|
async proposal(params) {
|
105
|
-
const options = {
|
106
|
-
params: {}
|
107
|
-
};
|
108
|
-
|
109
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
110
|
-
options.params.proposal_id = params.proposalId;
|
111
|
-
}
|
112
|
-
|
113
89
|
const endpoint = `cosmos/group/v1/proposal/${params.proposalId}`;
|
114
|
-
return await this.request(endpoint
|
90
|
+
return await this.request(endpoint);
|
115
91
|
}
|
116
92
|
/* ProposalsByGroupPolicy queries proposals based on account address of group policy. */
|
117
93
|
|
@@ -132,16 +108,8 @@ export class LCDQueryClient extends LCDClient {
|
|
132
108
|
|
133
109
|
|
134
110
|
async voteByProposalVoter(params) {
|
135
|
-
const options = {
|
136
|
-
params: {}
|
137
|
-
};
|
138
|
-
|
139
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
140
|
-
options.params.proposal_id = params.proposalId;
|
141
|
-
}
|
142
|
-
|
143
111
|
const endpoint = `cosmos/group/v1/vote_by_proposal_voter/${params.proposalId}/${params.voter}`;
|
144
|
-
return await this.request(endpoint
|
112
|
+
return await this.request(endpoint);
|
145
113
|
}
|
146
114
|
/* VotesByProposal queries a vote by proposal. */
|
147
115
|
|
@@ -151,10 +119,6 @@ export class LCDQueryClient extends LCDClient {
|
|
151
119
|
params: {}
|
152
120
|
};
|
153
121
|
|
154
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
155
|
-
options.params.proposal_id = params.proposalId;
|
156
|
-
}
|
157
|
-
|
158
122
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
159
123
|
setPaginationParams(options, params.pagination);
|
160
124
|
}
|
@@ -196,16 +160,8 @@ export class LCDQueryClient extends LCDClient {
|
|
196
160
|
|
197
161
|
|
198
162
|
async tallyResult(params) {
|
199
|
-
const options = {
|
200
|
-
params: {}
|
201
|
-
};
|
202
|
-
|
203
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.proposalId) !== "undefined") {
|
204
|
-
options.params.proposal_id = params.proposalId;
|
205
|
-
}
|
206
|
-
|
207
163
|
const endpoint = `cosmos/group/v1/proposals/${params.proposalId}/tally`;
|
208
|
-
return await this.request(endpoint
|
164
|
+
return await this.request(endpoint);
|
209
165
|
}
|
210
166
|
|
211
167
|
}
|
@@ -12,46 +12,22 @@ export class LCDQueryClient extends LCDClient {
|
|
12
12
|
|
13
13
|
|
14
14
|
async balance(params) {
|
15
|
-
const options = {
|
16
|
-
params: {}
|
17
|
-
};
|
18
|
-
|
19
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.classId) !== "undefined") {
|
20
|
-
options.params.class_id = params.classId;
|
21
|
-
}
|
22
|
-
|
23
15
|
const endpoint = `cosmos/nft/v1beta1/balance/${params.owner}/${params.classId}`;
|
24
|
-
return await this.request(endpoint
|
16
|
+
return await this.request(endpoint);
|
25
17
|
}
|
26
18
|
/* Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */
|
27
19
|
|
28
20
|
|
29
21
|
async owner(params) {
|
30
|
-
const options = {
|
31
|
-
params: {}
|
32
|
-
};
|
33
|
-
|
34
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.classId) !== "undefined") {
|
35
|
-
options.params.class_id = params.classId;
|
36
|
-
}
|
37
|
-
|
38
22
|
const endpoint = `cosmos/nft/v1beta1/owner/${params.classId}/${params.id}`;
|
39
|
-
return await this.request(endpoint
|
23
|
+
return await this.request(endpoint);
|
40
24
|
}
|
41
25
|
/* Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */
|
42
26
|
|
43
27
|
|
44
28
|
async supply(params) {
|
45
|
-
const options = {
|
46
|
-
params: {}
|
47
|
-
};
|
48
|
-
|
49
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.classId) !== "undefined") {
|
50
|
-
options.params.class_id = params.classId;
|
51
|
-
}
|
52
|
-
|
53
29
|
const endpoint = `cosmos/nft/v1beta1/supply/${params.classId}`;
|
54
|
-
return await this.request(endpoint
|
30
|
+
return await this.request(endpoint);
|
55
31
|
}
|
56
32
|
/* NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in
|
57
33
|
ERC721Enumerable */
|
@@ -81,31 +57,15 @@ export class LCDQueryClient extends LCDClient {
|
|
81
57
|
|
82
58
|
|
83
59
|
async nFT(params) {
|
84
|
-
const options = {
|
85
|
-
params: {}
|
86
|
-
};
|
87
|
-
|
88
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.classId) !== "undefined") {
|
89
|
-
options.params.class_id = params.classId;
|
90
|
-
}
|
91
|
-
|
92
60
|
const endpoint = `cosmos/nft/v1beta1/nfts/${params.classId}/${params.id}`;
|
93
|
-
return await this.request(endpoint
|
61
|
+
return await this.request(endpoint);
|
94
62
|
}
|
95
63
|
/* Class queries an NFT class based on its id */
|
96
64
|
|
97
65
|
|
98
66
|
async class(params) {
|
99
|
-
const options = {
|
100
|
-
params: {}
|
101
|
-
};
|
102
|
-
|
103
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.classId) !== "undefined") {
|
104
|
-
options.params.class_id = params.classId;
|
105
|
-
}
|
106
|
-
|
107
67
|
const endpoint = `cosmos/nft/v1beta1/classes/${params.classId}`;
|
108
|
-
return await this.request(endpoint
|
68
|
+
return await this.request(endpoint);
|
109
69
|
}
|
110
70
|
/* Classes queries all NFT classes */
|
111
71
|
|
@@ -19,16 +19,8 @@ export class LCDQueryClient extends LCDClient {
|
|
19
19
|
|
20
20
|
|
21
21
|
async signingInfo(params) {
|
22
|
-
const options = {
|
23
|
-
params: {}
|
24
|
-
};
|
25
|
-
|
26
|
-
if (typeof (params === null || params === void 0 ? void 0 : params.consAddress) !== "undefined") {
|
27
|
-
options.params.cons_address = params.consAddress;
|
28
|
-
}
|
29
|
-
|
30
22
|
const endpoint = `cosmos/slashing/v1beta1/signing_infos/${params.consAddress}`;
|
31
|
-
return await this.request(endpoint
|
23
|
+
return await this.request(endpoint);
|
32
24
|
}
|
33
25
|
/* SigningInfos queries signing info of all validators */
|
34
26
|
|