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
|
@@ -23,19 +24,21 @@ export class LCDQueryClient extends LCDClient {
|
|
23
24
|
options.params.channel_id = params.channelId;
|
24
25
|
}
|
25
26
|
|
26
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
27
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}ports/${params.portId}`;
|
27
28
|
return await this.request(endpoint, options);
|
28
29
|
}
|
29
30
|
/* Channels queries all the IBC channels of a chain. */
|
30
31
|
|
31
32
|
|
32
|
-
async channels(params
|
33
|
+
async channels(params = {
|
34
|
+
pagination: undefined
|
35
|
+
}) {
|
33
36
|
const options = {
|
34
37
|
params: {}
|
35
38
|
};
|
36
39
|
|
37
40
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
38
|
-
options
|
41
|
+
setPaginationParams(options, params.pagination);
|
39
42
|
}
|
40
43
|
|
41
44
|
const endpoint = `ibc/core/channel/v1/channels`;
|
@@ -51,7 +54,7 @@ export class LCDQueryClient extends LCDClient {
|
|
51
54
|
};
|
52
55
|
|
53
56
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
54
|
-
options
|
57
|
+
setPaginationParams(options, params.pagination);
|
55
58
|
}
|
56
59
|
|
57
60
|
const endpoint = `ibc/core/channel/v1/connections/${params.connection}/channels`;
|
@@ -74,7 +77,7 @@ export class LCDQueryClient extends LCDClient {
|
|
74
77
|
options.params.channel_id = params.channelId;
|
75
78
|
}
|
76
79
|
|
77
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
80
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/client_state`;
|
78
81
|
return await this.request(endpoint, options);
|
79
82
|
}
|
80
83
|
/* ChannelConsensusState queries for the consensus state for the channel
|
@@ -102,7 +105,7 @@ export class LCDQueryClient extends LCDClient {
|
|
102
105
|
options.params.revision_height = params.revisionHeight;
|
103
106
|
}
|
104
107
|
|
105
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
108
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/consensus_state/revision/${params.revisionNumber}height/${params.revisionHeight}`;
|
106
109
|
return await this.request(endpoint, options);
|
107
110
|
}
|
108
111
|
/* PacketCommitment queries a stored packet commitment hash. */
|
@@ -121,7 +124,7 @@ export class LCDQueryClient extends LCDClient {
|
|
121
124
|
options.params.channel_id = params.channelId;
|
122
125
|
}
|
123
126
|
|
124
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
127
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}packet_commitments/${params.sequence}`;
|
125
128
|
return await this.request(endpoint, options);
|
126
129
|
}
|
127
130
|
/* PacketCommitments returns all the packet commitments hashes associated
|
@@ -142,10 +145,10 @@ export class LCDQueryClient extends LCDClient {
|
|
142
145
|
}
|
143
146
|
|
144
147
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
145
|
-
options
|
148
|
+
setPaginationParams(options, params.pagination);
|
146
149
|
}
|
147
150
|
|
148
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
151
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/packet_commitments`;
|
149
152
|
return await this.request(endpoint, options);
|
150
153
|
}
|
151
154
|
/* PacketReceipt queries if a given packet sequence has been received on the
|
@@ -165,7 +168,7 @@ export class LCDQueryClient extends LCDClient {
|
|
165
168
|
options.params.channel_id = params.channelId;
|
166
169
|
}
|
167
170
|
|
168
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
171
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}packet_receipts/${params.sequence}`;
|
169
172
|
return await this.request(endpoint, options);
|
170
173
|
}
|
171
174
|
/* PacketAcknowledgement queries a stored packet acknowledgement hash. */
|
@@ -184,7 +187,7 @@ export class LCDQueryClient extends LCDClient {
|
|
184
187
|
options.params.channel_id = params.channelId;
|
185
188
|
}
|
186
189
|
|
187
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
190
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}packet_acks/${params.sequence}`;
|
188
191
|
return await this.request(endpoint, options);
|
189
192
|
}
|
190
193
|
/* PacketAcknowledgements returns all the packet acknowledgements associated
|
@@ -205,14 +208,14 @@ export class LCDQueryClient extends LCDClient {
|
|
205
208
|
}
|
206
209
|
|
207
210
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
208
|
-
options
|
211
|
+
setPaginationParams(options, params.pagination);
|
209
212
|
}
|
210
213
|
|
211
214
|
if (typeof (params === null || params === void 0 ? void 0 : params.packetCommitmentSequences) !== "undefined") {
|
212
215
|
options.params.packet_commitment_sequences = params.packetCommitmentSequences;
|
213
216
|
}
|
214
217
|
|
215
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
218
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/packet_acknowledgements`;
|
216
219
|
return await this.request(endpoint, options);
|
217
220
|
}
|
218
221
|
/* UnreceivedPackets returns all the unreceived IBC packets associated with a
|
@@ -236,7 +239,7 @@ export class LCDQueryClient extends LCDClient {
|
|
236
239
|
options.params.packet_commitment_sequences = params.packetCommitmentSequences;
|
237
240
|
}
|
238
241
|
|
239
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
242
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/packet_commitments/${params.packetCommitmentSequences}/unreceived_packets`;
|
240
243
|
return await this.request(endpoint, options);
|
241
244
|
}
|
242
245
|
/* UnreceivedAcks returns all the unreceived IBC acknowledgements associated
|
@@ -260,7 +263,7 @@ export class LCDQueryClient extends LCDClient {
|
|
260
263
|
options.params.packet_ack_sequences = params.packetAckSequences;
|
261
264
|
}
|
262
265
|
|
263
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
266
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/packet_commitments/${params.packetAckSequences}/unreceived_acks`;
|
264
267
|
return await this.request(endpoint, options);
|
265
268
|
}
|
266
269
|
/* NextSequenceReceive returns the next receive sequence for a given channel. */
|
@@ -279,7 +282,7 @@ export class LCDQueryClient extends LCDClient {
|
|
279
282
|
options.params.channel_id = params.channelId;
|
280
283
|
}
|
281
284
|
|
282
|
-
const endpoint = `ibc/core/channel/v1/channels/${params.
|
285
|
+
const endpoint = `ibc/core/channel/v1/channels/${params.channelId}/ports/${params.portId}/next_sequence`;
|
283
286
|
return await this.request(endpoint, options);
|
284
287
|
}
|
285
288
|
|
@@ -0,0 +1,549 @@
|
|
1
|
+
import { Any } from "../../../../google/protobuf/any";
|
2
|
+
import { Plan } from "../../../../cosmos/upgrade/v1beta1/upgrade";
|
3
|
+
import * as _m0 from "protobufjs/minimal";
|
4
|
+
import { isSet, Long } from "@osmonauts/helpers";
|
5
|
+
/**
|
6
|
+
* IdentifiedClientState defines a client state with an additional client
|
7
|
+
* identifier field.
|
8
|
+
*/
|
9
|
+
|
10
|
+
function createBaseIdentifiedClientState() {
|
11
|
+
return {
|
12
|
+
clientId: "",
|
13
|
+
clientState: undefined
|
14
|
+
};
|
15
|
+
}
|
16
|
+
|
17
|
+
export const IdentifiedClientState = {
|
18
|
+
encode(message, writer = _m0.Writer.create()) {
|
19
|
+
if (message.clientId !== "") {
|
20
|
+
writer.uint32(10).string(message.clientId);
|
21
|
+
}
|
22
|
+
|
23
|
+
if (message.clientState !== undefined) {
|
24
|
+
Any.encode(message.clientState, writer.uint32(18).fork()).ldelim();
|
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 = createBaseIdentifiedClientState();
|
34
|
+
|
35
|
+
while (reader.pos < end) {
|
36
|
+
const tag = reader.uint32();
|
37
|
+
|
38
|
+
switch (tag >>> 3) {
|
39
|
+
case 1:
|
40
|
+
message.clientId = reader.string();
|
41
|
+
break;
|
42
|
+
|
43
|
+
case 2:
|
44
|
+
message.clientState = Any.decode(reader, reader.uint32());
|
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
|
+
clientId: isSet(object.clientId) ? String(object.clientId) : "",
|
59
|
+
clientState: isSet(object.clientState) ? Any.fromJSON(object.clientState) : undefined
|
60
|
+
};
|
61
|
+
},
|
62
|
+
|
63
|
+
toJSON(message) {
|
64
|
+
const obj = {};
|
65
|
+
message.clientId !== undefined && (obj.clientId = message.clientId);
|
66
|
+
message.clientState !== undefined && (obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined);
|
67
|
+
return obj;
|
68
|
+
},
|
69
|
+
|
70
|
+
fromPartial(object) {
|
71
|
+
var _object$clientId;
|
72
|
+
|
73
|
+
const message = createBaseIdentifiedClientState();
|
74
|
+
message.clientId = (_object$clientId = object.clientId) !== null && _object$clientId !== void 0 ? _object$clientId : "";
|
75
|
+
message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined;
|
76
|
+
return message;
|
77
|
+
}
|
78
|
+
|
79
|
+
};
|
80
|
+
|
81
|
+
function createBaseConsensusStateWithHeight() {
|
82
|
+
return {
|
83
|
+
height: undefined,
|
84
|
+
consensusState: undefined
|
85
|
+
};
|
86
|
+
}
|
87
|
+
|
88
|
+
export const ConsensusStateWithHeight = {
|
89
|
+
encode(message, writer = _m0.Writer.create()) {
|
90
|
+
if (message.height !== undefined) {
|
91
|
+
Height.encode(message.height, writer.uint32(10).fork()).ldelim();
|
92
|
+
}
|
93
|
+
|
94
|
+
if (message.consensusState !== undefined) {
|
95
|
+
Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim();
|
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 = createBaseConsensusStateWithHeight();
|
105
|
+
|
106
|
+
while (reader.pos < end) {
|
107
|
+
const tag = reader.uint32();
|
108
|
+
|
109
|
+
switch (tag >>> 3) {
|
110
|
+
case 1:
|
111
|
+
message.height = Height.decode(reader, reader.uint32());
|
112
|
+
break;
|
113
|
+
|
114
|
+
case 2:
|
115
|
+
message.consensusState = Any.decode(reader, reader.uint32());
|
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
|
+
height: isSet(object.height) ? Height.fromJSON(object.height) : undefined,
|
130
|
+
consensusState: isSet(object.consensusState) ? Any.fromJSON(object.consensusState) : undefined
|
131
|
+
};
|
132
|
+
},
|
133
|
+
|
134
|
+
toJSON(message) {
|
135
|
+
const obj = {};
|
136
|
+
message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined);
|
137
|
+
message.consensusState !== undefined && (obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined);
|
138
|
+
return obj;
|
139
|
+
},
|
140
|
+
|
141
|
+
fromPartial(object) {
|
142
|
+
const message = createBaseConsensusStateWithHeight();
|
143
|
+
message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined;
|
144
|
+
message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined;
|
145
|
+
return message;
|
146
|
+
}
|
147
|
+
|
148
|
+
};
|
149
|
+
|
150
|
+
function createBaseClientConsensusStates() {
|
151
|
+
return {
|
152
|
+
clientId: "",
|
153
|
+
consensusStates: []
|
154
|
+
};
|
155
|
+
}
|
156
|
+
|
157
|
+
export const ClientConsensusStates = {
|
158
|
+
encode(message, writer = _m0.Writer.create()) {
|
159
|
+
if (message.clientId !== "") {
|
160
|
+
writer.uint32(10).string(message.clientId);
|
161
|
+
}
|
162
|
+
|
163
|
+
for (const v of message.consensusStates) {
|
164
|
+
ConsensusStateWithHeight.encode(v, writer.uint32(18).fork()).ldelim();
|
165
|
+
}
|
166
|
+
|
167
|
+
return writer;
|
168
|
+
},
|
169
|
+
|
170
|
+
decode(input, length) {
|
171
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
172
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
173
|
+
const message = createBaseClientConsensusStates();
|
174
|
+
|
175
|
+
while (reader.pos < end) {
|
176
|
+
const tag = reader.uint32();
|
177
|
+
|
178
|
+
switch (tag >>> 3) {
|
179
|
+
case 1:
|
180
|
+
message.clientId = reader.string();
|
181
|
+
break;
|
182
|
+
|
183
|
+
case 2:
|
184
|
+
message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32()));
|
185
|
+
break;
|
186
|
+
|
187
|
+
default:
|
188
|
+
reader.skipType(tag & 7);
|
189
|
+
break;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
return message;
|
194
|
+
},
|
195
|
+
|
196
|
+
fromJSON(object) {
|
197
|
+
return {
|
198
|
+
clientId: isSet(object.clientId) ? String(object.clientId) : "",
|
199
|
+
consensusStates: Array.isArray(object === null || object === void 0 ? void 0 : object.consensusStates) ? object.consensusStates.map(e => ConsensusStateWithHeight.fromJSON(e)) : []
|
200
|
+
};
|
201
|
+
},
|
202
|
+
|
203
|
+
toJSON(message) {
|
204
|
+
const obj = {};
|
205
|
+
message.clientId !== undefined && (obj.clientId = message.clientId);
|
206
|
+
|
207
|
+
if (message.consensusStates) {
|
208
|
+
obj.consensusStates = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toJSON(e) : undefined);
|
209
|
+
} else {
|
210
|
+
obj.consensusStates = [];
|
211
|
+
}
|
212
|
+
|
213
|
+
return obj;
|
214
|
+
},
|
215
|
+
|
216
|
+
fromPartial(object) {
|
217
|
+
var _object$clientId2, _object$consensusStat;
|
218
|
+
|
219
|
+
const message = createBaseClientConsensusStates();
|
220
|
+
message.clientId = (_object$clientId2 = object.clientId) !== null && _object$clientId2 !== void 0 ? _object$clientId2 : "";
|
221
|
+
message.consensusStates = ((_object$consensusStat = object.consensusStates) === null || _object$consensusStat === void 0 ? void 0 : _object$consensusStat.map(e => ConsensusStateWithHeight.fromPartial(e))) || [];
|
222
|
+
return message;
|
223
|
+
}
|
224
|
+
|
225
|
+
};
|
226
|
+
|
227
|
+
function createBaseClientUpdateProposal() {
|
228
|
+
return {
|
229
|
+
title: "",
|
230
|
+
description: "",
|
231
|
+
subjectClientId: "",
|
232
|
+
substituteClientId: ""
|
233
|
+
};
|
234
|
+
}
|
235
|
+
|
236
|
+
export const ClientUpdateProposal = {
|
237
|
+
encode(message, writer = _m0.Writer.create()) {
|
238
|
+
if (message.title !== "") {
|
239
|
+
writer.uint32(10).string(message.title);
|
240
|
+
}
|
241
|
+
|
242
|
+
if (message.description !== "") {
|
243
|
+
writer.uint32(18).string(message.description);
|
244
|
+
}
|
245
|
+
|
246
|
+
if (message.subjectClientId !== "") {
|
247
|
+
writer.uint32(26).string(message.subjectClientId);
|
248
|
+
}
|
249
|
+
|
250
|
+
if (message.substituteClientId !== "") {
|
251
|
+
writer.uint32(34).string(message.substituteClientId);
|
252
|
+
}
|
253
|
+
|
254
|
+
return writer;
|
255
|
+
},
|
256
|
+
|
257
|
+
decode(input, length) {
|
258
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
259
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
260
|
+
const message = createBaseClientUpdateProposal();
|
261
|
+
|
262
|
+
while (reader.pos < end) {
|
263
|
+
const tag = reader.uint32();
|
264
|
+
|
265
|
+
switch (tag >>> 3) {
|
266
|
+
case 1:
|
267
|
+
message.title = reader.string();
|
268
|
+
break;
|
269
|
+
|
270
|
+
case 2:
|
271
|
+
message.description = reader.string();
|
272
|
+
break;
|
273
|
+
|
274
|
+
case 3:
|
275
|
+
message.subjectClientId = reader.string();
|
276
|
+
break;
|
277
|
+
|
278
|
+
case 4:
|
279
|
+
message.substituteClientId = reader.string();
|
280
|
+
break;
|
281
|
+
|
282
|
+
default:
|
283
|
+
reader.skipType(tag & 7);
|
284
|
+
break;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
return message;
|
289
|
+
},
|
290
|
+
|
291
|
+
fromJSON(object) {
|
292
|
+
return {
|
293
|
+
title: isSet(object.title) ? String(object.title) : "",
|
294
|
+
description: isSet(object.description) ? String(object.description) : "",
|
295
|
+
subjectClientId: isSet(object.subjectClientId) ? String(object.subjectClientId) : "",
|
296
|
+
substituteClientId: isSet(object.substituteClientId) ? String(object.substituteClientId) : ""
|
297
|
+
};
|
298
|
+
},
|
299
|
+
|
300
|
+
toJSON(message) {
|
301
|
+
const obj = {};
|
302
|
+
message.title !== undefined && (obj.title = message.title);
|
303
|
+
message.description !== undefined && (obj.description = message.description);
|
304
|
+
message.subjectClientId !== undefined && (obj.subjectClientId = message.subjectClientId);
|
305
|
+
message.substituteClientId !== undefined && (obj.substituteClientId = message.substituteClientId);
|
306
|
+
return obj;
|
307
|
+
},
|
308
|
+
|
309
|
+
fromPartial(object) {
|
310
|
+
var _object$title, _object$description, _object$subjectClient, _object$substituteCli;
|
311
|
+
|
312
|
+
const message = createBaseClientUpdateProposal();
|
313
|
+
message.title = (_object$title = object.title) !== null && _object$title !== void 0 ? _object$title : "";
|
314
|
+
message.description = (_object$description = object.description) !== null && _object$description !== void 0 ? _object$description : "";
|
315
|
+
message.subjectClientId = (_object$subjectClient = object.subjectClientId) !== null && _object$subjectClient !== void 0 ? _object$subjectClient : "";
|
316
|
+
message.substituteClientId = (_object$substituteCli = object.substituteClientId) !== null && _object$substituteCli !== void 0 ? _object$substituteCli : "";
|
317
|
+
return message;
|
318
|
+
}
|
319
|
+
|
320
|
+
};
|
321
|
+
|
322
|
+
function createBaseUpgradeProposal() {
|
323
|
+
return {
|
324
|
+
title: "",
|
325
|
+
description: "",
|
326
|
+
plan: undefined,
|
327
|
+
upgradedClientState: undefined
|
328
|
+
};
|
329
|
+
}
|
330
|
+
|
331
|
+
export const UpgradeProposal = {
|
332
|
+
encode(message, writer = _m0.Writer.create()) {
|
333
|
+
if (message.title !== "") {
|
334
|
+
writer.uint32(10).string(message.title);
|
335
|
+
}
|
336
|
+
|
337
|
+
if (message.description !== "") {
|
338
|
+
writer.uint32(18).string(message.description);
|
339
|
+
}
|
340
|
+
|
341
|
+
if (message.plan !== undefined) {
|
342
|
+
Plan.encode(message.plan, writer.uint32(26).fork()).ldelim();
|
343
|
+
}
|
344
|
+
|
345
|
+
if (message.upgradedClientState !== undefined) {
|
346
|
+
Any.encode(message.upgradedClientState, writer.uint32(34).fork()).ldelim();
|
347
|
+
}
|
348
|
+
|
349
|
+
return writer;
|
350
|
+
},
|
351
|
+
|
352
|
+
decode(input, length) {
|
353
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
354
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
355
|
+
const message = createBaseUpgradeProposal();
|
356
|
+
|
357
|
+
while (reader.pos < end) {
|
358
|
+
const tag = reader.uint32();
|
359
|
+
|
360
|
+
switch (tag >>> 3) {
|
361
|
+
case 1:
|
362
|
+
message.title = reader.string();
|
363
|
+
break;
|
364
|
+
|
365
|
+
case 2:
|
366
|
+
message.description = reader.string();
|
367
|
+
break;
|
368
|
+
|
369
|
+
case 3:
|
370
|
+
message.plan = Plan.decode(reader, reader.uint32());
|
371
|
+
break;
|
372
|
+
|
373
|
+
case 4:
|
374
|
+
message.upgradedClientState = Any.decode(reader, reader.uint32());
|
375
|
+
break;
|
376
|
+
|
377
|
+
default:
|
378
|
+
reader.skipType(tag & 7);
|
379
|
+
break;
|
380
|
+
}
|
381
|
+
}
|
382
|
+
|
383
|
+
return message;
|
384
|
+
},
|
385
|
+
|
386
|
+
fromJSON(object) {
|
387
|
+
return {
|
388
|
+
title: isSet(object.title) ? String(object.title) : "",
|
389
|
+
description: isSet(object.description) ? String(object.description) : "",
|
390
|
+
plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,
|
391
|
+
upgradedClientState: isSet(object.upgradedClientState) ? Any.fromJSON(object.upgradedClientState) : undefined
|
392
|
+
};
|
393
|
+
},
|
394
|
+
|
395
|
+
toJSON(message) {
|
396
|
+
const obj = {};
|
397
|
+
message.title !== undefined && (obj.title = message.title);
|
398
|
+
message.description !== undefined && (obj.description = message.description);
|
399
|
+
message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
|
400
|
+
message.upgradedClientState !== undefined && (obj.upgradedClientState = message.upgradedClientState ? Any.toJSON(message.upgradedClientState) : undefined);
|
401
|
+
return obj;
|
402
|
+
},
|
403
|
+
|
404
|
+
fromPartial(object) {
|
405
|
+
var _object$title2, _object$description2;
|
406
|
+
|
407
|
+
const message = createBaseUpgradeProposal();
|
408
|
+
message.title = (_object$title2 = object.title) !== null && _object$title2 !== void 0 ? _object$title2 : "";
|
409
|
+
message.description = (_object$description2 = object.description) !== null && _object$description2 !== void 0 ? _object$description2 : "";
|
410
|
+
message.plan = object.plan !== undefined && object.plan !== null ? Plan.fromPartial(object.plan) : undefined;
|
411
|
+
message.upgradedClientState = object.upgradedClientState !== undefined && object.upgradedClientState !== null ? Any.fromPartial(object.upgradedClientState) : undefined;
|
412
|
+
return message;
|
413
|
+
}
|
414
|
+
|
415
|
+
};
|
416
|
+
|
417
|
+
function createBaseHeight() {
|
418
|
+
return {
|
419
|
+
revisionNumber: Long.UZERO,
|
420
|
+
revisionHeight: Long.UZERO
|
421
|
+
};
|
422
|
+
}
|
423
|
+
|
424
|
+
export const Height = {
|
425
|
+
encode(message, writer = _m0.Writer.create()) {
|
426
|
+
if (!message.revisionNumber.isZero()) {
|
427
|
+
writer.uint32(8).uint64(message.revisionNumber);
|
428
|
+
}
|
429
|
+
|
430
|
+
if (!message.revisionHeight.isZero()) {
|
431
|
+
writer.uint32(16).uint64(message.revisionHeight);
|
432
|
+
}
|
433
|
+
|
434
|
+
return writer;
|
435
|
+
},
|
436
|
+
|
437
|
+
decode(input, length) {
|
438
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
439
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
440
|
+
const message = createBaseHeight();
|
441
|
+
|
442
|
+
while (reader.pos < end) {
|
443
|
+
const tag = reader.uint32();
|
444
|
+
|
445
|
+
switch (tag >>> 3) {
|
446
|
+
case 1:
|
447
|
+
message.revisionNumber = reader.uint64();
|
448
|
+
break;
|
449
|
+
|
450
|
+
case 2:
|
451
|
+
message.revisionHeight = reader.uint64();
|
452
|
+
break;
|
453
|
+
|
454
|
+
default:
|
455
|
+
reader.skipType(tag & 7);
|
456
|
+
break;
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
460
|
+
return message;
|
461
|
+
},
|
462
|
+
|
463
|
+
fromJSON(object) {
|
464
|
+
return {
|
465
|
+
revisionNumber: isSet(object.revisionNumber) ? Long.fromString(object.revisionNumber) : Long.UZERO,
|
466
|
+
revisionHeight: isSet(object.revisionHeight) ? Long.fromString(object.revisionHeight) : Long.UZERO
|
467
|
+
};
|
468
|
+
},
|
469
|
+
|
470
|
+
toJSON(message) {
|
471
|
+
const obj = {};
|
472
|
+
message.revisionNumber !== undefined && (obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString());
|
473
|
+
message.revisionHeight !== undefined && (obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString());
|
474
|
+
return obj;
|
475
|
+
},
|
476
|
+
|
477
|
+
fromPartial(object) {
|
478
|
+
const message = createBaseHeight();
|
479
|
+
message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? Long.fromValue(object.revisionNumber) : Long.UZERO;
|
480
|
+
message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? Long.fromValue(object.revisionHeight) : Long.UZERO;
|
481
|
+
return message;
|
482
|
+
}
|
483
|
+
|
484
|
+
};
|
485
|
+
|
486
|
+
function createBaseParams() {
|
487
|
+
return {
|
488
|
+
allowedClients: []
|
489
|
+
};
|
490
|
+
}
|
491
|
+
|
492
|
+
export const Params = {
|
493
|
+
encode(message, writer = _m0.Writer.create()) {
|
494
|
+
for (const v of message.allowedClients) {
|
495
|
+
writer.uint32(10).string(v);
|
496
|
+
}
|
497
|
+
|
498
|
+
return writer;
|
499
|
+
},
|
500
|
+
|
501
|
+
decode(input, length) {
|
502
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
503
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
504
|
+
const message = createBaseParams();
|
505
|
+
|
506
|
+
while (reader.pos < end) {
|
507
|
+
const tag = reader.uint32();
|
508
|
+
|
509
|
+
switch (tag >>> 3) {
|
510
|
+
case 1:
|
511
|
+
message.allowedClients.push(reader.string());
|
512
|
+
break;
|
513
|
+
|
514
|
+
default:
|
515
|
+
reader.skipType(tag & 7);
|
516
|
+
break;
|
517
|
+
}
|
518
|
+
}
|
519
|
+
|
520
|
+
return message;
|
521
|
+
},
|
522
|
+
|
523
|
+
fromJSON(object) {
|
524
|
+
return {
|
525
|
+
allowedClients: Array.isArray(object === null || object === void 0 ? void 0 : object.allowedClients) ? object.allowedClients.map(e => String(e)) : []
|
526
|
+
};
|
527
|
+
},
|
528
|
+
|
529
|
+
toJSON(message) {
|
530
|
+
const obj = {};
|
531
|
+
|
532
|
+
if (message.allowedClients) {
|
533
|
+
obj.allowedClients = message.allowedClients.map(e => e);
|
534
|
+
} else {
|
535
|
+
obj.allowedClients = [];
|
536
|
+
}
|
537
|
+
|
538
|
+
return obj;
|
539
|
+
},
|
540
|
+
|
541
|
+
fromPartial(object) {
|
542
|
+
var _object$allowedClient;
|
543
|
+
|
544
|
+
const message = createBaseParams();
|
545
|
+
message.allowedClients = ((_object$allowedClient = object.allowedClients) === null || _object$allowedClient === void 0 ? void 0 : _object$allowedClient.map(e => e)) || [];
|
546
|
+
return message;
|
547
|
+
}
|
548
|
+
|
549
|
+
};
|