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.
- package/main/codegen/JunoSwap.client.js +1 -1
- package/main/codegen/cosmos/bank/v1beta1/query.lcd.js +44 -26
- package/main/codegen/cosmos/base/query/v1beta1/pagination.js +190 -0
- package/main/codegen/cosmos/base/v1beta1/coin.js +268 -0
- package/main/codegen/cosmos/bundle.js +4 -4
- 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/bundle.js +4 -4
- 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/bundle.js +25 -15
- package/main/codegen/ibc/client.js +32 -12
- package/main/codegen/ibc/core/channel/v1/query.lcd.js +40 -32
- package/main/codegen/ibc/core/client/v1/client.js +585 -0
- package/main/codegen/ibc/core/client/v1/genesis.js +367 -0
- package/main/codegen/ibc/core/client/v1/query.js +1047 -0
- package/main/codegen/ibc/core/client/v1/query.lcd.js +381 -0
- package/main/codegen/ibc/core/client/v1/query.rpc.query.js +125 -0
- package/main/codegen/ibc/core/client/v1/tx.amino.js +149 -0
- package/main/codegen/ibc/core/client/v1/tx.js +538 -0
- package/main/codegen/ibc/core/client/v1/tx.registry.js +160 -0
- package/main/codegen/ibc/core/client/v1/tx.rpc.msg.js +81 -0
- package/main/codegen/ibc/lcd.js +21 -6
- package/main/codegen/ibc/rpc.query.js +19 -6
- package/main/codegen/ibc/rpc.tx.js +19 -6
- package/main/codegen/juno/bundle.js +6 -6
- 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/base/query/v1beta1/pagination.js +189 -0
- package/module/codegen/cosmos/base/v1beta1/coin.js +268 -0
- package/module/codegen/cosmos/bundle.js +4 -4
- 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/bundle.js +4 -4
- 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/bundle.js +20 -15
- package/module/codegen/ibc/client.js +18 -2
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +19 -16
- package/module/codegen/ibc/core/client/v1/client.js +549 -0
- package/module/codegen/ibc/core/client/v1/genesis.js +287 -0
- package/module/codegen/ibc/core/client/v1/query.js +1029 -0
- package/module/codegen/ibc/core/client/v1/query.lcd.js +128 -0
- package/module/codegen/ibc/core/client/v1/query.rpc.query.js +69 -0
- package/module/codegen/ibc/core/client/v1/tx.amino.js +150 -0
- package/module/codegen/ibc/core/client/v1/tx.js +544 -0
- package/module/codegen/ibc/core/client/v1/tx.registry.js +159 -0
- package/module/codegen/ibc/core/client/v1/tx.rpc.msg.js +41 -0
- package/module/codegen/ibc/lcd.js +5 -0
- package/module/codegen/ibc/rpc.query.js +3 -0
- package/module/codegen/ibc/rpc.tx.js +3 -0
- package/module/codegen/index.js +1 -1
- package/module/codegen/juno/bundle.js +6 -6
- package/module/codegen/juno/mint/query.lcd.js +3 -3
- package/package.json +15 -14
- package/types/codegen/JunoSwap.client.d.ts +1 -1
- package/types/codegen/JunoSwap.react-query.d.ts +11 -11
- package/types/codegen/JunoSwap.types.d.ts +1 -1
- package/types/codegen/contracts.d.ts +5 -5
- package/types/codegen/cosmos/bank/v1beta1/query.lcd.d.ts +3 -3
- package/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts +79 -0
- package/types/codegen/cosmos/base/v1beta1/coin.d.ts +58 -0
- package/types/codegen/cosmos/bundle.d.ts +758 -153
- package/types/codegen/cosmos/client.d.ts +6 -2
- package/types/codegen/cosmos/distribution/v1beta1/query.lcd.d.ts +2 -2
- package/types/codegen/cosmos/staking/v1beta1/query.lcd.d.ts +2 -2
- package/types/codegen/cosmwasm/bundle.d.ts +87 -18
- package/types/codegen/cosmwasm/client.d.ts +8 -2
- package/types/codegen/cosmwasm/wasm/v1/query.lcd.d.ts +2 -2
- package/types/codegen/ibc/applications/transfer/v1/query.lcd.d.ts +2 -2
- package/types/codegen/ibc/bundle.d.ts +878 -64
- package/types/codegen/ibc/client.d.ts +8 -2
- package/types/codegen/ibc/core/channel/v1/query.lcd.d.ts +1 -1
- package/types/codegen/ibc/core/client/v1/client.d.ts +143 -0
- package/types/codegen/ibc/core/client/v1/genesis.d.ts +56 -0
- package/types/codegen/ibc/core/client/v1/query.d.ts +263 -0
- package/types/codegen/ibc/core/client/v1/query.lcd.d.ts +15 -0
- package/types/codegen/ibc/core/client/v1/query.rpc.query.d.ts +25 -0
- package/types/codegen/ibc/core/client/v1/tx.amino.d.ts +77 -0
- package/types/codegen/ibc/core/client/v1/tx.d.ts +131 -0
- package/types/codegen/ibc/core/client/v1/tx.registry.d.ts +96 -0
- package/types/codegen/ibc/core/client/v1/tx.rpc.msg.d.ts +17 -0
- package/types/codegen/ibc/lcd.d.ts +3 -0
- package/types/codegen/ibc/rpc.query.d.ts +3 -0
- package/types/codegen/ibc/rpc.tx.d.ts +3 -0
- package/types/codegen/index.d.ts +1 -1
- package/types/codegen/juno/bundle.d.ts +6 -6
- package/types/codegen/juno/mint/query.lcd.d.ts +3 -3
@@ -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
|
|
@@ -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
|
@@ -20,7 +21,7 @@ export class LCDQueryClient extends LCDClient {
|
|
20
21
|
}
|
21
22
|
|
22
23
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
23
|
-
options
|
24
|
+
setPaginationParams(options, params.pagination);
|
24
25
|
}
|
25
26
|
|
26
27
|
const endpoint = `cosmos/staking/v1beta1/validators`;
|
@@ -38,7 +39,7 @@ export class LCDQueryClient extends LCDClient {
|
|
38
39
|
options.params.validator_addr = params.validatorAddr;
|
39
40
|
}
|
40
41
|
|
41
|
-
const endpoint = `cosmos/staking/v1beta1/validators/${params.
|
42
|
+
const endpoint = `cosmos/staking/v1beta1/validators/${params.validatorAddr}`;
|
42
43
|
return await this.request(endpoint, options);
|
43
44
|
}
|
44
45
|
/* ValidatorDelegations queries delegate info for given validator. */
|
@@ -54,10 +55,10 @@ export class LCDQueryClient extends LCDClient {
|
|
54
55
|
}
|
55
56
|
|
56
57
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
57
|
-
options
|
58
|
+
setPaginationParams(options, params.pagination);
|
58
59
|
}
|
59
60
|
|
60
|
-
const endpoint = `cosmos/staking/v1beta1/validators/${params.
|
61
|
+
const endpoint = `cosmos/staking/v1beta1/validators/${params.validatorAddr}/delegations`;
|
61
62
|
return await this.request(endpoint, options);
|
62
63
|
}
|
63
64
|
/* ValidatorUnbondingDelegations queries unbonding delegations of a validator. */
|
@@ -73,10 +74,10 @@ export class LCDQueryClient extends LCDClient {
|
|
73
74
|
}
|
74
75
|
|
75
76
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
76
|
-
options
|
77
|
+
setPaginationParams(options, params.pagination);
|
77
78
|
}
|
78
79
|
|
79
|
-
const endpoint = `cosmos/staking/v1beta1/validators/${params.
|
80
|
+
const endpoint = `cosmos/staking/v1beta1/validators/${params.validatorAddr}/unbonding_delegations`;
|
80
81
|
return await this.request(endpoint, options);
|
81
82
|
}
|
82
83
|
/* Delegation queries delegate info for given validator delegator pair. */
|
@@ -95,7 +96,7 @@ export class LCDQueryClient extends LCDClient {
|
|
95
96
|
options.params.validator_addr = params.validatorAddr;
|
96
97
|
}
|
97
98
|
|
98
|
-
const endpoint = `cosmos/staking/v1beta1/validators/${params.
|
99
|
+
const endpoint = `cosmos/staking/v1beta1/validators/${params.validatorAddr}delegations/${params.delegatorAddr}`;
|
99
100
|
return await this.request(endpoint, options);
|
100
101
|
}
|
101
102
|
/* UnbondingDelegation queries unbonding info for given validator delegator
|
@@ -115,7 +116,7 @@ export class LCDQueryClient extends LCDClient {
|
|
115
116
|
options.params.validator_addr = params.validatorAddr;
|
116
117
|
}
|
117
118
|
|
118
|
-
const endpoint = `cosmos/staking/v1beta1/validators/${params.
|
119
|
+
const endpoint = `cosmos/staking/v1beta1/validators/${params.validatorAddr}/delegations/${params.delegatorAddr}/unbonding_delegation`;
|
119
120
|
return await this.request(endpoint, options);
|
120
121
|
}
|
121
122
|
/* DelegatorDelegations queries all delegations of a given delegator address. */
|
@@ -131,10 +132,10 @@ export class LCDQueryClient extends LCDClient {
|
|
131
132
|
}
|
132
133
|
|
133
134
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
134
|
-
options
|
135
|
+
setPaginationParams(options, params.pagination);
|
135
136
|
}
|
136
137
|
|
137
|
-
const endpoint = `cosmos/staking/v1beta1/delegations/${params.
|
138
|
+
const endpoint = `cosmos/staking/v1beta1/delegations/${params.delegatorAddr}`;
|
138
139
|
return await this.request(endpoint, options);
|
139
140
|
}
|
140
141
|
/* DelegatorUnbondingDelegations queries all unbonding delegations of a given
|
@@ -151,10 +152,10 @@ export class LCDQueryClient extends LCDClient {
|
|
151
152
|
}
|
152
153
|
|
153
154
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
154
|
-
options
|
155
|
+
setPaginationParams(options, params.pagination);
|
155
156
|
}
|
156
157
|
|
157
|
-
const endpoint = `cosmos/staking/v1beta1/delegators/${params.
|
158
|
+
const endpoint = `cosmos/staking/v1beta1/delegators/${params.delegatorAddr}/unbonding_delegations`;
|
158
159
|
return await this.request(endpoint, options);
|
159
160
|
}
|
160
161
|
/* Redelegations queries redelegations of given address. */
|
@@ -178,10 +179,10 @@ export class LCDQueryClient extends LCDClient {
|
|
178
179
|
}
|
179
180
|
|
180
181
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
181
|
-
options
|
182
|
+
setPaginationParams(options, params.pagination);
|
182
183
|
}
|
183
184
|
|
184
|
-
const endpoint = `cosmos/staking/v1beta1/delegators/${params.
|
185
|
+
const endpoint = `cosmos/staking/v1beta1/delegators/${params.delegatorAddr}/redelegations`;
|
185
186
|
return await this.request(endpoint, options);
|
186
187
|
}
|
187
188
|
/* DelegatorValidators queries all validators info for given delegator
|
@@ -198,10 +199,10 @@ export class LCDQueryClient extends LCDClient {
|
|
198
199
|
}
|
199
200
|
|
200
201
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
201
|
-
options
|
202
|
+
setPaginationParams(options, params.pagination);
|
202
203
|
}
|
203
204
|
|
204
|
-
const endpoint = `cosmos/staking/v1beta1/delegators/${params.
|
205
|
+
const endpoint = `cosmos/staking/v1beta1/delegators/${params.delegatorAddr}/validators`;
|
205
206
|
return await this.request(endpoint, options);
|
206
207
|
}
|
207
208
|
/* DelegatorValidator queries validator info for given delegator validator
|
@@ -221,7 +222,7 @@ export class LCDQueryClient extends LCDClient {
|
|
221
222
|
options.params.validator_addr = params.validatorAddr;
|
222
223
|
}
|
223
224
|
|
224
|
-
const endpoint = `cosmos/staking/v1beta1/delegators/${params.
|
225
|
+
const endpoint = `cosmos/staking/v1beta1/delegators/${params.delegatorAddr}validators/${params.validatorAddr}`;
|
225
226
|
return await this.request(endpoint, options);
|
226
227
|
}
|
227
228
|
/* HistoricalInfo queries the historical info for given height. */
|
@@ -234,14 +235,14 @@ export class LCDQueryClient extends LCDClient {
|
|
234
235
|
/* Pool queries the pool info. */
|
235
236
|
|
236
237
|
|
237
|
-
async pool(
|
238
|
+
async pool(_params = {}) {
|
238
239
|
const endpoint = `cosmos/staking/v1beta1/pool`;
|
239
240
|
return await this.request(endpoint);
|
240
241
|
}
|
241
242
|
/* Parameters queries the staking parameters. */
|
242
243
|
|
243
244
|
|
244
|
-
async params(
|
245
|
+
async params(_params = {}) {
|
245
246
|
const endpoint = `cosmos/staking/v1beta1/params`;
|
246
247
|
return await this.request(endpoint);
|
247
248
|
}
|
@@ -15,9 +15,9 @@ import * as _181 from "./wasm/v1/tx.registry";
|
|
15
15
|
import * as _182 from "./wasm/v1/query.lcd";
|
16
16
|
import * as _183 from "./wasm/v1/query.rpc.query";
|
17
17
|
import * as _184 from "./wasm/v1/tx.rpc.msg";
|
18
|
-
import * as
|
19
|
-
import * as
|
20
|
-
import * as
|
18
|
+
import * as _205 from "./lcd";
|
19
|
+
import * as _206 from "./rpc.query";
|
20
|
+
import * as _207 from "./rpc.tx";
|
21
21
|
export let cosmwasm;
|
22
22
|
|
23
23
|
(function (_cosmwasm) {
|
@@ -27,5 +27,5 @@ export let cosmwasm;
|
|
27
27
|
const v1 = _wasm.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _94), _95), _96), _97), _98), _99), _180), _181), _182), _183), _184);
|
28
28
|
})(wasm || (wasm = _cosmwasm.wasm || (_cosmwasm.wasm = {})));
|
29
29
|
|
30
|
-
const ClientFactory = _cosmwasm.ClientFactory = _objectSpread(_objectSpread(_objectSpread({},
|
30
|
+
const ClientFactory = _cosmwasm.ClientFactory = _objectSpread(_objectSpread(_objectSpread({}, _205), _206), _207);
|
31
31
|
})(cosmwasm || (cosmwasm = {}));
|
@@ -8,13 +8,27 @@ import { Registry } from "@cosmjs/proto-signing";
|
|
8
8
|
import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate";
|
9
9
|
import * as cosmwasmWasmV1TxRegistry from "./wasm/v1/tx.registry";
|
10
10
|
import * as cosmwasmWasmV1TxAmino from "./wasm/v1/tx.amino";
|
11
|
+
export const getSigningCosmwasmClientOptions = ({
|
12
|
+
defaultTypes = defaultRegistryTypes
|
13
|
+
} = {}) => {
|
14
|
+
const registry = new Registry([...defaultTypes, ...cosmwasmWasmV1TxRegistry.registry]);
|
15
|
+
const aminoTypes = new AminoTypes(_objectSpread({}, cosmwasmWasmV1TxAmino.AminoConverter));
|
16
|
+
return {
|
17
|
+
registry,
|
18
|
+
aminoTypes
|
19
|
+
};
|
20
|
+
};
|
11
21
|
export const getSigningCosmwasmClient = async ({
|
12
22
|
rpcEndpoint,
|
13
23
|
signer,
|
14
24
|
defaultTypes = defaultRegistryTypes
|
15
25
|
}) => {
|
16
|
-
const
|
17
|
-
|
26
|
+
const {
|
27
|
+
registry,
|
28
|
+
aminoTypes
|
29
|
+
} = getSigningCosmwasmClientOptions({
|
30
|
+
defaultTypes
|
31
|
+
});
|
18
32
|
const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {
|
19
33
|
registry,
|
20
34
|
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
|
@@ -23,7 +24,7 @@ export class LCDQueryClient extends LCDClient {
|
|
23
24
|
};
|
24
25
|
|
25
26
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
26
|
-
options
|
27
|
+
setPaginationParams(options, params.pagination);
|
27
28
|
}
|
28
29
|
|
29
30
|
const endpoint = `cosmwasm/wasm/v1/contract/${params.address}/history`;
|
@@ -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 = `cosmwasm/wasm/v1/code/${params.
|
49
|
+
const endpoint = `cosmwasm/wasm/v1/code/${params.codeId}/contracts`;
|
49
50
|
return await this.request(endpoint, options);
|
50
51
|
}
|
51
52
|
/* AllContractState gets all raw store data for a single contract */
|
@@ -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 = `cosmwasm/wasm/v1/contract/${params.address}/state`;
|
@@ -75,7 +76,7 @@ export class LCDQueryClient extends LCDClient {
|
|
75
76
|
options.params.query_data = params.queryData;
|
76
77
|
}
|
77
78
|
|
78
|
-
const endpoint = `wasm/v1/contract/${params.address}raw/${params.
|
79
|
+
const endpoint = `wasm/v1/contract/${params.address}raw/${params.queryData}`;
|
79
80
|
return await this.request(endpoint, options);
|
80
81
|
}
|
81
82
|
/* SmartContractState get smart query result from the contract */
|
@@ -90,7 +91,7 @@ export class LCDQueryClient extends LCDClient {
|
|
90
91
|
options.params.query_data = params.queryData;
|
91
92
|
}
|
92
93
|
|
93
|
-
const endpoint = `wasm/v1/contract/${params.address}smart/${params.
|
94
|
+
const endpoint = `wasm/v1/contract/${params.address}smart/${params.queryData}`;
|
94
95
|
return await this.request(endpoint, options);
|
95
96
|
}
|
96
97
|
/* Code gets the binary code and metadata for a singe wasm code */
|
@@ -105,19 +106,21 @@ export class LCDQueryClient extends LCDClient {
|
|
105
106
|
options.params.code_id = params.codeId;
|
106
107
|
}
|
107
108
|
|
108
|
-
const endpoint = `cosmwasm/wasm/v1/code/${params.
|
109
|
+
const endpoint = `cosmwasm/wasm/v1/code/${params.codeId}`;
|
109
110
|
return await this.request(endpoint, options);
|
110
111
|
}
|
111
112
|
/* Codes gets the metadata for all stored wasm codes */
|
112
113
|
|
113
114
|
|
114
|
-
async codes(params
|
115
|
+
async codes(params = {
|
116
|
+
pagination: undefined
|
117
|
+
}) {
|
115
118
|
const options = {
|
116
119
|
params: {}
|
117
120
|
};
|
118
121
|
|
119
122
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
120
|
-
options
|
123
|
+
setPaginationParams(options, params.pagination);
|
121
124
|
}
|
122
125
|
|
123
126
|
const endpoint = `cosmwasm/wasm/v1/code`;
|
@@ -126,13 +129,15 @@ export class LCDQueryClient extends LCDClient {
|
|
126
129
|
/* PinnedCodes gets the pinned code ids */
|
127
130
|
|
128
131
|
|
129
|
-
async pinnedCodes(params
|
132
|
+
async pinnedCodes(params = {
|
133
|
+
pagination: undefined
|
134
|
+
}) {
|
130
135
|
const options = {
|
131
136
|
params: {}
|
132
137
|
};
|
133
138
|
|
134
139
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
135
|
-
options
|
140
|
+
setPaginationParams(options, params.pagination);
|
136
141
|
}
|
137
142
|
|
138
143
|
const endpoint = `cosmwasm/wasm/v1/codes/pinned`;
|
@@ -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
|
@@ -17,13 +18,15 @@ export class LCDQueryClient extends LCDClient {
|
|
17
18
|
/* DenomTraces queries all denomination traces. */
|
18
19
|
|
19
20
|
|
20
|
-
async denomTraces(params
|
21
|
+
async denomTraces(params = {
|
22
|
+
pagination: undefined
|
23
|
+
}) {
|
21
24
|
const options = {
|
22
25
|
params: {}
|
23
26
|
};
|
24
27
|
|
25
28
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
26
|
-
options
|
29
|
+
setPaginationParams(options, params.pagination);
|
27
30
|
}
|
28
31
|
|
29
32
|
const endpoint = `ibc/apps/transfer/v1/denom_traces`;
|
@@ -32,7 +35,7 @@ export class LCDQueryClient extends LCDClient {
|
|
32
35
|
/* Params queries all parameters of the ibc-transfer module. */
|
33
36
|
|
34
37
|
|
35
|
-
async params(
|
38
|
+
async params(_params = {}) {
|
36
39
|
const endpoint = `ibc/apps/transfer/v1/params`;
|
37
40
|
return await this.request(endpoint);
|
38
41
|
}
|
@@ -30,17 +30,22 @@ import * as _133 from "./lightclients/solomachine/v2/solomachine";
|
|
30
30
|
import * as _134 from "./lightclients/tendermint/v1/tendermint";
|
31
31
|
import * as _185 from "./applications/transfer/v1/tx.amino";
|
32
32
|
import * as _186 from "./core/channel/v1/tx.amino";
|
33
|
-
import * as _187 from "./
|
34
|
-
import * as _188 from "./
|
35
|
-
import * as _189 from "./
|
36
|
-
import * as _190 from "./core/
|
37
|
-
import * as _191 from "./applications/transfer/v1/query.
|
38
|
-
import * as _192 from "./core/channel/v1/query.
|
39
|
-
import * as _193 from "./
|
40
|
-
import * as _194 from "./
|
41
|
-
import * as
|
42
|
-
import * as
|
43
|
-
import * as
|
33
|
+
import * as _187 from "./core/client/v1/tx.amino";
|
34
|
+
import * as _188 from "./applications/transfer/v1/tx.registry";
|
35
|
+
import * as _189 from "./core/channel/v1/tx.registry";
|
36
|
+
import * as _190 from "./core/client/v1/tx.registry";
|
37
|
+
import * as _191 from "./applications/transfer/v1/query.lcd";
|
38
|
+
import * as _192 from "./core/channel/v1/query.lcd";
|
39
|
+
import * as _193 from "./core/client/v1/query.lcd";
|
40
|
+
import * as _194 from "./applications/transfer/v1/query.rpc.query";
|
41
|
+
import * as _195 from "./core/channel/v1/query.rpc.query";
|
42
|
+
import * as _196 from "./core/client/v1/query.rpc.query";
|
43
|
+
import * as _197 from "./applications/transfer/v1/tx.rpc.msg";
|
44
|
+
import * as _198 from "./core/channel/v1/tx.rpc.msg";
|
45
|
+
import * as _199 from "./core/client/v1/tx.rpc.msg";
|
46
|
+
import * as _208 from "./lcd";
|
47
|
+
import * as _209 from "./rpc.query";
|
48
|
+
import * as _210 from "./rpc.tx";
|
44
49
|
export let ibc;
|
45
50
|
|
46
51
|
(function (_ibc) {
|
@@ -50,7 +55,7 @@ export let ibc;
|
|
50
55
|
let transfer;
|
51
56
|
|
52
57
|
(function (_transfer) {
|
53
|
-
const v1 = _transfer.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _111), _112), _113), _114), _185),
|
58
|
+
const v1 = _transfer.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _111), _112), _113), _114), _185), _188), _191), _194), _197);
|
54
59
|
|
55
60
|
const v2 = _transfer.v2 = _objectSpread({}, _115);
|
56
61
|
})(transfer || (transfer = _applications.transfer || (_applications.transfer = {})));
|
@@ -62,13 +67,13 @@ export let ibc;
|
|
62
67
|
let channel;
|
63
68
|
|
64
69
|
(function (_channel) {
|
65
|
-
const v1 = _channel.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _116), _117), _118), _119), _186),
|
70
|
+
const v1 = _channel.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _116), _117), _118), _119), _186), _189), _192), _195), _198);
|
66
71
|
})(channel || (channel = _core.channel || (_core.channel = {})));
|
67
72
|
|
68
73
|
let client;
|
69
74
|
|
70
75
|
(function (_client) {
|
71
|
-
const v1 = _client.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _120), _121), _122), _123);
|
76
|
+
const v1 = _client.v1 = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _120), _121), _122), _123), _187), _190), _193), _196), _199);
|
72
77
|
})(client || (client = _core.client || (_core.client = {})));
|
73
78
|
|
74
79
|
let commitment;
|
@@ -120,5 +125,5 @@ export let ibc;
|
|
120
125
|
})(tendermint || (tendermint = _lightclients.tendermint || (_lightclients.tendermint = {})));
|
121
126
|
})(lightclients || (lightclients = _ibc.lightclients || (_ibc.lightclients = {})));
|
122
127
|
|
123
|
-
const ClientFactory = _ibc.ClientFactory = _objectSpread(_objectSpread(_objectSpread({},
|
128
|
+
const ClientFactory = _ibc.ClientFactory = _objectSpread(_objectSpread(_objectSpread({}, _208), _209), _210);
|
124
129
|
})(ibc || (ibc = {}));
|
@@ -8,15 +8,31 @@ import { Registry } from "@cosmjs/proto-signing";
|
|
8
8
|
import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate";
|
9
9
|
import * as ibcApplicationsTransferV1TxRegistry from "./applications/transfer/v1/tx.registry";
|
10
10
|
import * as ibcCoreChannelV1TxRegistry from "./core/channel/v1/tx.registry";
|
11
|
+
import * as ibcCoreClientV1TxRegistry from "./core/client/v1/tx.registry";
|
11
12
|
import * as ibcApplicationsTransferV1TxAmino from "./applications/transfer/v1/tx.amino";
|
12
13
|
import * as ibcCoreChannelV1TxAmino from "./core/channel/v1/tx.amino";
|
14
|
+
import * as ibcCoreClientV1TxAmino from "./core/client/v1/tx.amino";
|
15
|
+
export const getSigningIbcClientOptions = ({
|
16
|
+
defaultTypes = defaultRegistryTypes
|
17
|
+
} = {}) => {
|
18
|
+
const registry = new Registry([...defaultTypes, ...ibcApplicationsTransferV1TxRegistry.registry, ...ibcCoreChannelV1TxRegistry.registry, ...ibcCoreClientV1TxRegistry.registry]);
|
19
|
+
const aminoTypes = new AminoTypes(_objectSpread(_objectSpread(_objectSpread({}, ibcApplicationsTransferV1TxAmino.AminoConverter), ibcCoreChannelV1TxAmino.AminoConverter), ibcCoreClientV1TxAmino.AminoConverter));
|
20
|
+
return {
|
21
|
+
registry,
|
22
|
+
aminoTypes
|
23
|
+
};
|
24
|
+
};
|
13
25
|
export const getSigningIbcClient = async ({
|
14
26
|
rpcEndpoint,
|
15
27
|
signer,
|
16
28
|
defaultTypes = defaultRegistryTypes
|
17
29
|
}) => {
|
18
|
-
const
|
19
|
-
|
30
|
+
const {
|
31
|
+
registry,
|
32
|
+
aminoTypes
|
33
|
+
} = getSigningIbcClientOptions({
|
34
|
+
defaultTypes
|
35
|
+
});
|
20
36
|
const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {
|
21
37
|
registry,
|
22
38
|
aminoTypes
|