@agoric/cosmic-proto 0.5.0-u19.2 → 0.5.0-u20.0
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/dist/address-hooks.d.ts +4 -3
- package/dist/address-hooks.js +1 -217
- package/dist/address-hooks.js.map +1 -1
- package/dist/codegen/agoric/bundle.js +1 -51
- package/dist/codegen/agoric/lien/genesis.js +1 -143
- package/dist/codegen/agoric/lien/lien.js +1 -87
- package/dist/codegen/agoric/swingset/genesis.js +1 -181
- package/dist/codegen/agoric/swingset/msgs.js +1 -700
- package/dist/codegen/agoric/swingset/query.js +1 -356
- package/dist/codegen/agoric/swingset/swingset.js +1 -816
- package/dist/codegen/agoric/vbank/genesis.js +1 -82
- package/dist/codegen/agoric/vbank/msgs.js +1 -2
- package/dist/codegen/agoric/vbank/query.js +1 -222
- package/dist/codegen/agoric/vbank/vbank.js +1 -237
- package/dist/codegen/agoric/vibc/msgs.js +1 -127
- package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
- package/dist/codegen/agoric/vstorage/genesis.js +1 -138
- package/dist/codegen/agoric/vstorage/query.js +1 -441
- package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
- package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
- package/dist/codegen/amino/amino.js +1 -2
- package/dist/codegen/amino/bundle.js +1 -6
- package/dist/codegen/binary.js +1 -367
- package/dist/codegen/circle/bundle.d.ts +0 -506
- package/dist/codegen/circle/bundle.js +1 -40
- package/dist/codegen/circle/cctp/v1/attester.js +1 -63
- package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
- package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/events.js +1 -1612
- package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
- package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
- package/dist/codegen/circle/cctp/v1/message.js +1 -160
- package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
- package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
- package/dist/codegen/circle/cctp/v1/query.js +1 -2421
- package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
- package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
- package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
- package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
- package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
- package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
- package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
- package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
- package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
- package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
- package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
- package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
- package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
- package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
- package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
- package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
- package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
- package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
- package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
- package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
- package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
- package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
- package/dist/codegen/cosmos/bundle.js +1 -249
- package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
- package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
- package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
- package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
- package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
- package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
- package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
- package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
- package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
- package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
- package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
- package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
- package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
- package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
- package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
- package/dist/codegen/cosmos/group/v1/events.js +1 -696
- package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
- package/dist/codegen/cosmos/group/v1/query.js +1 -2096
- package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
- package/dist/codegen/cosmos/group/v1/types.js +1 -1387
- package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
- package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
- package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
- package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
- package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
- package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
- package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
- package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
- package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
- package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
- package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
- package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
- package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
- package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
- package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
- package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
- package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
- package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
- package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
- package/dist/codegen/cosmos_proto/bundle.js +1 -6
- package/dist/codegen/cosmos_proto/cosmos.js +1 -208
- package/dist/codegen/gogoproto/bundle.js +1 -6
- package/dist/codegen/gogoproto/gogo.js +1 -2
- package/dist/codegen/google/api/annotations.js +1 -2
- package/dist/codegen/google/api/http.js +1 -319
- package/dist/codegen/google/bundle.js +1 -17
- package/dist/codegen/google/protobuf/any.js +1 -77
- package/dist/codegen/google/protobuf/descriptor.js +1 -3421
- package/dist/codegen/google/protobuf/duration.js +1 -79
- package/dist/codegen/google/protobuf/empty.js +1 -50
- package/dist/codegen/google/protobuf/timestamp.js +1 -79
- package/dist/codegen/helpers.js +1 -196
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
- package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
- package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
- package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
- package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
- package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
- package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
- package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
- package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
- package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
- package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
- package/dist/codegen/ibc/bundle.js +1 -142
- package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
- package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
- package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
- package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
- package/dist/codegen/ibc/core/client/v1/client.js +1 -583
- package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
- package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
- package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
- package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
- package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
- package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
- package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
- package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
- package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
- package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
- package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
- package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
- package/dist/codegen/icq/bundle.js +1 -17
- package/dist/codegen/icq/v1/genesis.js +1 -78
- package/dist/codegen/icq/v1/icq.js +1 -83
- package/dist/codegen/icq/v1/packet.js +1 -270
- package/dist/codegen/icq/v1/query.js +1 -114
- package/dist/codegen/icq/v1/tx.js +1 -124
- package/dist/codegen/ics23/bundle.js +1 -6
- package/dist/codegen/index.js +1 -23
- package/dist/codegen/json-safe.js +1 -8
- package/dist/codegen/proofs.js +1 -1436
- package/dist/codegen/stride/bundle.js +1 -71
- package/dist/codegen/stride/epochs/genesis.js +1 -227
- package/dist/codegen/stride/epochs/query.js +1 -398
- package/dist/codegen/stride/records/callbacks.js +1 -136
- package/dist/codegen/stride/records/genesis.js +1 -186
- package/dist/codegen/stride/records/params.js +1 -50
- package/dist/codegen/stride/records/query.js +1 -1552
- package/dist/codegen/stride/records/records.js +1 -939
- package/dist/codegen/stride/stakedym/genesis.js +1 -312
- package/dist/codegen/stride/stakedym/query.js +1 -887
- package/dist/codegen/stride/stakedym/stakedym.js +1 -909
- package/dist/codegen/stride/stakedym/tx.js +1 -1661
- package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
- package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
- package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
- package/dist/codegen/stride/stakeibc/genesis.js +1 -135
- package/dist/codegen/stride/stakeibc/gov.js +1 -212
- package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
- package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
- package/dist/codegen/stride/stakeibc/packet.js +1 -113
- package/dist/codegen/stride/stakeibc/params.js +1 -317
- package/dist/codegen/stride/stakeibc/query.js +1 -1372
- package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
- package/dist/codegen/stride/stakeibc/tx.js +1 -3392
- package/dist/codegen/stride/stakeibc/validator.js +1 -170
- package/dist/codegen/stride/staketia/genesis.js +1 -312
- package/dist/codegen/stride/staketia/query.js +1 -887
- package/dist/codegen/stride/staketia/staketia.js +1 -819
- package/dist/codegen/stride/staketia/tx.js +1 -1671
- package/dist/codegen/tendermint/abci/types.d.ts +264 -692
- package/dist/codegen/tendermint/abci/types.js +1 -4434
- package/dist/codegen/tendermint/abci/types.js.map +1 -1
- package/dist/codegen/tendermint/bundle.d.ts +0 -272
- package/dist/codegen/tendermint/bundle.js +1 -42
- package/dist/codegen/tendermint/crypto/keys.js +1 -85
- package/dist/codegen/tendermint/crypto/proof.js +1 -409
- package/dist/codegen/tendermint/libs/bits/types.js +1 -94
- package/dist/codegen/tendermint/p2p/types.js +1 -506
- package/dist/codegen/tendermint/types/block.js +1 -119
- package/dist/codegen/tendermint/types/evidence.js +1 -415
- package/dist/codegen/tendermint/types/params.js +1 -529
- package/dist/codegen/tendermint/types/types.js +1 -1534
- package/dist/codegen/tendermint/types/validator.js +1 -299
- package/dist/codegen/tendermint/version/types.js +1 -155
- package/dist/codegen/utf8.js +1 -138
- package/dist/codegen/varint.js +1 -409
- package/dist/helpers.js +1 -22
- package/dist/index.js +1 -6
- package/package.json +12 -10
|
@@ -1,845 +1 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { Height } from '../../client/v1/client.js';
|
|
3
|
-
import { BinaryReader, BinaryWriter } from '../../../../binary.js';
|
|
4
|
-
import { isSet, bytesFromBase64, base64FromBytes, } from '../../../../helpers.js';
|
|
5
|
-
import {} from '../../../../json-safe.js';
|
|
6
|
-
/**
|
|
7
|
-
* State defines if a channel is in one of the following states:
|
|
8
|
-
* CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED.
|
|
9
|
-
*/
|
|
10
|
-
export var State;
|
|
11
|
-
(function (State) {
|
|
12
|
-
/** STATE_UNINITIALIZED_UNSPECIFIED - Default State */
|
|
13
|
-
State[State["STATE_UNINITIALIZED_UNSPECIFIED"] = 0] = "STATE_UNINITIALIZED_UNSPECIFIED";
|
|
14
|
-
/** STATE_INIT - A channel has just started the opening handshake. */
|
|
15
|
-
State[State["STATE_INIT"] = 1] = "STATE_INIT";
|
|
16
|
-
/** STATE_TRYOPEN - A channel has acknowledged the handshake step on the counterparty chain. */
|
|
17
|
-
State[State["STATE_TRYOPEN"] = 2] = "STATE_TRYOPEN";
|
|
18
|
-
/**
|
|
19
|
-
* STATE_OPEN - A channel has completed the handshake. Open channels are
|
|
20
|
-
* ready to send and receive packets.
|
|
21
|
-
*/
|
|
22
|
-
State[State["STATE_OPEN"] = 3] = "STATE_OPEN";
|
|
23
|
-
/**
|
|
24
|
-
* STATE_CLOSED - A channel has been closed and can no longer be used to send or receive
|
|
25
|
-
* packets.
|
|
26
|
-
*/
|
|
27
|
-
State[State["STATE_CLOSED"] = 4] = "STATE_CLOSED";
|
|
28
|
-
State[State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
29
|
-
})(State || (State = {}));
|
|
30
|
-
export const StateSDKType = State;
|
|
31
|
-
export function stateFromJSON(object) {
|
|
32
|
-
switch (object) {
|
|
33
|
-
case 0:
|
|
34
|
-
case 'STATE_UNINITIALIZED_UNSPECIFIED':
|
|
35
|
-
return State.STATE_UNINITIALIZED_UNSPECIFIED;
|
|
36
|
-
case 1:
|
|
37
|
-
case 'STATE_INIT':
|
|
38
|
-
return State.STATE_INIT;
|
|
39
|
-
case 2:
|
|
40
|
-
case 'STATE_TRYOPEN':
|
|
41
|
-
return State.STATE_TRYOPEN;
|
|
42
|
-
case 3:
|
|
43
|
-
case 'STATE_OPEN':
|
|
44
|
-
return State.STATE_OPEN;
|
|
45
|
-
case 4:
|
|
46
|
-
case 'STATE_CLOSED':
|
|
47
|
-
return State.STATE_CLOSED;
|
|
48
|
-
case -1:
|
|
49
|
-
case 'UNRECOGNIZED':
|
|
50
|
-
default:
|
|
51
|
-
return State.UNRECOGNIZED;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
export function stateToJSON(object) {
|
|
55
|
-
switch (object) {
|
|
56
|
-
case State.STATE_UNINITIALIZED_UNSPECIFIED:
|
|
57
|
-
return 'STATE_UNINITIALIZED_UNSPECIFIED';
|
|
58
|
-
case State.STATE_INIT:
|
|
59
|
-
return 'STATE_INIT';
|
|
60
|
-
case State.STATE_TRYOPEN:
|
|
61
|
-
return 'STATE_TRYOPEN';
|
|
62
|
-
case State.STATE_OPEN:
|
|
63
|
-
return 'STATE_OPEN';
|
|
64
|
-
case State.STATE_CLOSED:
|
|
65
|
-
return 'STATE_CLOSED';
|
|
66
|
-
case State.UNRECOGNIZED:
|
|
67
|
-
default:
|
|
68
|
-
return 'UNRECOGNIZED';
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/** Order defines if a channel is ORDERED or UNORDERED */
|
|
72
|
-
export var Order;
|
|
73
|
-
(function (Order) {
|
|
74
|
-
/** ORDER_NONE_UNSPECIFIED - zero-value for channel ordering */
|
|
75
|
-
Order[Order["ORDER_NONE_UNSPECIFIED"] = 0] = "ORDER_NONE_UNSPECIFIED";
|
|
76
|
-
/**
|
|
77
|
-
* ORDER_UNORDERED - packets can be delivered in any order, which may differ from the order in
|
|
78
|
-
* which they were sent.
|
|
79
|
-
*/
|
|
80
|
-
Order[Order["ORDER_UNORDERED"] = 1] = "ORDER_UNORDERED";
|
|
81
|
-
/** ORDER_ORDERED - packets are delivered exactly in the order which they were sent */
|
|
82
|
-
Order[Order["ORDER_ORDERED"] = 2] = "ORDER_ORDERED";
|
|
83
|
-
Order[Order["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
84
|
-
})(Order || (Order = {}));
|
|
85
|
-
export const OrderSDKType = Order;
|
|
86
|
-
export function orderFromJSON(object) {
|
|
87
|
-
switch (object) {
|
|
88
|
-
case 0:
|
|
89
|
-
case 'ORDER_NONE_UNSPECIFIED':
|
|
90
|
-
return Order.ORDER_NONE_UNSPECIFIED;
|
|
91
|
-
case 1:
|
|
92
|
-
case 'ORDER_UNORDERED':
|
|
93
|
-
return Order.ORDER_UNORDERED;
|
|
94
|
-
case 2:
|
|
95
|
-
case 'ORDER_ORDERED':
|
|
96
|
-
return Order.ORDER_ORDERED;
|
|
97
|
-
case -1:
|
|
98
|
-
case 'UNRECOGNIZED':
|
|
99
|
-
default:
|
|
100
|
-
return Order.UNRECOGNIZED;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
export function orderToJSON(object) {
|
|
104
|
-
switch (object) {
|
|
105
|
-
case Order.ORDER_NONE_UNSPECIFIED:
|
|
106
|
-
return 'ORDER_NONE_UNSPECIFIED';
|
|
107
|
-
case Order.ORDER_UNORDERED:
|
|
108
|
-
return 'ORDER_UNORDERED';
|
|
109
|
-
case Order.ORDER_ORDERED:
|
|
110
|
-
return 'ORDER_ORDERED';
|
|
111
|
-
case Order.UNRECOGNIZED:
|
|
112
|
-
default:
|
|
113
|
-
return 'UNRECOGNIZED';
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function createBaseChannel() {
|
|
117
|
-
return {
|
|
118
|
-
state: 0,
|
|
119
|
-
ordering: 0,
|
|
120
|
-
counterparty: Counterparty.fromPartial({}),
|
|
121
|
-
connectionHops: [],
|
|
122
|
-
version: '',
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
export const Channel = {
|
|
126
|
-
typeUrl: '/ibc.core.channel.v1.Channel',
|
|
127
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
128
|
-
if (message.state !== 0) {
|
|
129
|
-
writer.uint32(8).int32(message.state);
|
|
130
|
-
}
|
|
131
|
-
if (message.ordering !== 0) {
|
|
132
|
-
writer.uint32(16).int32(message.ordering);
|
|
133
|
-
}
|
|
134
|
-
if (message.counterparty !== undefined) {
|
|
135
|
-
Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim();
|
|
136
|
-
}
|
|
137
|
-
for (const v of message.connectionHops) {
|
|
138
|
-
writer.uint32(34).string(v);
|
|
139
|
-
}
|
|
140
|
-
if (message.version !== '') {
|
|
141
|
-
writer.uint32(42).string(message.version);
|
|
142
|
-
}
|
|
143
|
-
return writer;
|
|
144
|
-
},
|
|
145
|
-
decode(input, length) {
|
|
146
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
147
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
148
|
-
const message = createBaseChannel();
|
|
149
|
-
while (reader.pos < end) {
|
|
150
|
-
const tag = reader.uint32();
|
|
151
|
-
switch (tag >>> 3) {
|
|
152
|
-
case 1:
|
|
153
|
-
message.state = reader.int32();
|
|
154
|
-
break;
|
|
155
|
-
case 2:
|
|
156
|
-
message.ordering = reader.int32();
|
|
157
|
-
break;
|
|
158
|
-
case 3:
|
|
159
|
-
message.counterparty = Counterparty.decode(reader, reader.uint32());
|
|
160
|
-
break;
|
|
161
|
-
case 4:
|
|
162
|
-
message.connectionHops.push(reader.string());
|
|
163
|
-
break;
|
|
164
|
-
case 5:
|
|
165
|
-
message.version = reader.string();
|
|
166
|
-
break;
|
|
167
|
-
default:
|
|
168
|
-
reader.skipType(tag & 7);
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
return message;
|
|
173
|
-
},
|
|
174
|
-
fromJSON(object) {
|
|
175
|
-
return {
|
|
176
|
-
state: isSet(object.state) ? stateFromJSON(object.state) : -1,
|
|
177
|
-
ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1,
|
|
178
|
-
counterparty: isSet(object.counterparty)
|
|
179
|
-
? Counterparty.fromJSON(object.counterparty)
|
|
180
|
-
: undefined,
|
|
181
|
-
connectionHops: Array.isArray(object?.connectionHops)
|
|
182
|
-
? object.connectionHops.map((e) => String(e))
|
|
183
|
-
: [],
|
|
184
|
-
version: isSet(object.version) ? String(object.version) : '',
|
|
185
|
-
};
|
|
186
|
-
},
|
|
187
|
-
toJSON(message) {
|
|
188
|
-
const obj = {};
|
|
189
|
-
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
|
190
|
-
message.ordering !== undefined &&
|
|
191
|
-
(obj.ordering = orderToJSON(message.ordering));
|
|
192
|
-
message.counterparty !== undefined &&
|
|
193
|
-
(obj.counterparty = message.counterparty
|
|
194
|
-
? Counterparty.toJSON(message.counterparty)
|
|
195
|
-
: undefined);
|
|
196
|
-
if (message.connectionHops) {
|
|
197
|
-
obj.connectionHops = message.connectionHops.map(e => e);
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
obj.connectionHops = [];
|
|
201
|
-
}
|
|
202
|
-
message.version !== undefined && (obj.version = message.version);
|
|
203
|
-
return obj;
|
|
204
|
-
},
|
|
205
|
-
fromPartial(object) {
|
|
206
|
-
const message = createBaseChannel();
|
|
207
|
-
message.state = object.state ?? 0;
|
|
208
|
-
message.ordering = object.ordering ?? 0;
|
|
209
|
-
message.counterparty =
|
|
210
|
-
object.counterparty !== undefined && object.counterparty !== null
|
|
211
|
-
? Counterparty.fromPartial(object.counterparty)
|
|
212
|
-
: undefined;
|
|
213
|
-
message.connectionHops = object.connectionHops?.map(e => e) || [];
|
|
214
|
-
message.version = object.version ?? '';
|
|
215
|
-
return message;
|
|
216
|
-
},
|
|
217
|
-
fromProtoMsg(message) {
|
|
218
|
-
return Channel.decode(message.value);
|
|
219
|
-
},
|
|
220
|
-
toProto(message) {
|
|
221
|
-
return Channel.encode(message).finish();
|
|
222
|
-
},
|
|
223
|
-
toProtoMsg(message) {
|
|
224
|
-
return {
|
|
225
|
-
typeUrl: '/ibc.core.channel.v1.Channel',
|
|
226
|
-
value: Channel.encode(message).finish(),
|
|
227
|
-
};
|
|
228
|
-
},
|
|
229
|
-
};
|
|
230
|
-
function createBaseIdentifiedChannel() {
|
|
231
|
-
return {
|
|
232
|
-
state: 0,
|
|
233
|
-
ordering: 0,
|
|
234
|
-
counterparty: Counterparty.fromPartial({}),
|
|
235
|
-
connectionHops: [],
|
|
236
|
-
version: '',
|
|
237
|
-
portId: '',
|
|
238
|
-
channelId: '',
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
export const IdentifiedChannel = {
|
|
242
|
-
typeUrl: '/ibc.core.channel.v1.IdentifiedChannel',
|
|
243
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
244
|
-
if (message.state !== 0) {
|
|
245
|
-
writer.uint32(8).int32(message.state);
|
|
246
|
-
}
|
|
247
|
-
if (message.ordering !== 0) {
|
|
248
|
-
writer.uint32(16).int32(message.ordering);
|
|
249
|
-
}
|
|
250
|
-
if (message.counterparty !== undefined) {
|
|
251
|
-
Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim();
|
|
252
|
-
}
|
|
253
|
-
for (const v of message.connectionHops) {
|
|
254
|
-
writer.uint32(34).string(v);
|
|
255
|
-
}
|
|
256
|
-
if (message.version !== '') {
|
|
257
|
-
writer.uint32(42).string(message.version);
|
|
258
|
-
}
|
|
259
|
-
if (message.portId !== '') {
|
|
260
|
-
writer.uint32(50).string(message.portId);
|
|
261
|
-
}
|
|
262
|
-
if (message.channelId !== '') {
|
|
263
|
-
writer.uint32(58).string(message.channelId);
|
|
264
|
-
}
|
|
265
|
-
return writer;
|
|
266
|
-
},
|
|
267
|
-
decode(input, length) {
|
|
268
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
269
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
270
|
-
const message = createBaseIdentifiedChannel();
|
|
271
|
-
while (reader.pos < end) {
|
|
272
|
-
const tag = reader.uint32();
|
|
273
|
-
switch (tag >>> 3) {
|
|
274
|
-
case 1:
|
|
275
|
-
message.state = reader.int32();
|
|
276
|
-
break;
|
|
277
|
-
case 2:
|
|
278
|
-
message.ordering = reader.int32();
|
|
279
|
-
break;
|
|
280
|
-
case 3:
|
|
281
|
-
message.counterparty = Counterparty.decode(reader, reader.uint32());
|
|
282
|
-
break;
|
|
283
|
-
case 4:
|
|
284
|
-
message.connectionHops.push(reader.string());
|
|
285
|
-
break;
|
|
286
|
-
case 5:
|
|
287
|
-
message.version = reader.string();
|
|
288
|
-
break;
|
|
289
|
-
case 6:
|
|
290
|
-
message.portId = reader.string();
|
|
291
|
-
break;
|
|
292
|
-
case 7:
|
|
293
|
-
message.channelId = reader.string();
|
|
294
|
-
break;
|
|
295
|
-
default:
|
|
296
|
-
reader.skipType(tag & 7);
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return message;
|
|
301
|
-
},
|
|
302
|
-
fromJSON(object) {
|
|
303
|
-
return {
|
|
304
|
-
state: isSet(object.state) ? stateFromJSON(object.state) : -1,
|
|
305
|
-
ordering: isSet(object.ordering) ? orderFromJSON(object.ordering) : -1,
|
|
306
|
-
counterparty: isSet(object.counterparty)
|
|
307
|
-
? Counterparty.fromJSON(object.counterparty)
|
|
308
|
-
: undefined,
|
|
309
|
-
connectionHops: Array.isArray(object?.connectionHops)
|
|
310
|
-
? object.connectionHops.map((e) => String(e))
|
|
311
|
-
: [],
|
|
312
|
-
version: isSet(object.version) ? String(object.version) : '',
|
|
313
|
-
portId: isSet(object.portId) ? String(object.portId) : '',
|
|
314
|
-
channelId: isSet(object.channelId) ? String(object.channelId) : '',
|
|
315
|
-
};
|
|
316
|
-
},
|
|
317
|
-
toJSON(message) {
|
|
318
|
-
const obj = {};
|
|
319
|
-
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
|
320
|
-
message.ordering !== undefined &&
|
|
321
|
-
(obj.ordering = orderToJSON(message.ordering));
|
|
322
|
-
message.counterparty !== undefined &&
|
|
323
|
-
(obj.counterparty = message.counterparty
|
|
324
|
-
? Counterparty.toJSON(message.counterparty)
|
|
325
|
-
: undefined);
|
|
326
|
-
if (message.connectionHops) {
|
|
327
|
-
obj.connectionHops = message.connectionHops.map(e => e);
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
obj.connectionHops = [];
|
|
331
|
-
}
|
|
332
|
-
message.version !== undefined && (obj.version = message.version);
|
|
333
|
-
message.portId !== undefined && (obj.portId = message.portId);
|
|
334
|
-
message.channelId !== undefined && (obj.channelId = message.channelId);
|
|
335
|
-
return obj;
|
|
336
|
-
},
|
|
337
|
-
fromPartial(object) {
|
|
338
|
-
const message = createBaseIdentifiedChannel();
|
|
339
|
-
message.state = object.state ?? 0;
|
|
340
|
-
message.ordering = object.ordering ?? 0;
|
|
341
|
-
message.counterparty =
|
|
342
|
-
object.counterparty !== undefined && object.counterparty !== null
|
|
343
|
-
? Counterparty.fromPartial(object.counterparty)
|
|
344
|
-
: undefined;
|
|
345
|
-
message.connectionHops = object.connectionHops?.map(e => e) || [];
|
|
346
|
-
message.version = object.version ?? '';
|
|
347
|
-
message.portId = object.portId ?? '';
|
|
348
|
-
message.channelId = object.channelId ?? '';
|
|
349
|
-
return message;
|
|
350
|
-
},
|
|
351
|
-
fromProtoMsg(message) {
|
|
352
|
-
return IdentifiedChannel.decode(message.value);
|
|
353
|
-
},
|
|
354
|
-
toProto(message) {
|
|
355
|
-
return IdentifiedChannel.encode(message).finish();
|
|
356
|
-
},
|
|
357
|
-
toProtoMsg(message) {
|
|
358
|
-
return {
|
|
359
|
-
typeUrl: '/ibc.core.channel.v1.IdentifiedChannel',
|
|
360
|
-
value: IdentifiedChannel.encode(message).finish(),
|
|
361
|
-
};
|
|
362
|
-
},
|
|
363
|
-
};
|
|
364
|
-
function createBaseCounterparty() {
|
|
365
|
-
return {
|
|
366
|
-
portId: '',
|
|
367
|
-
channelId: '',
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
export const Counterparty = {
|
|
371
|
-
typeUrl: '/ibc.core.channel.v1.Counterparty',
|
|
372
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
373
|
-
if (message.portId !== '') {
|
|
374
|
-
writer.uint32(10).string(message.portId);
|
|
375
|
-
}
|
|
376
|
-
if (message.channelId !== '') {
|
|
377
|
-
writer.uint32(18).string(message.channelId);
|
|
378
|
-
}
|
|
379
|
-
return writer;
|
|
380
|
-
},
|
|
381
|
-
decode(input, length) {
|
|
382
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
383
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
384
|
-
const message = createBaseCounterparty();
|
|
385
|
-
while (reader.pos < end) {
|
|
386
|
-
const tag = reader.uint32();
|
|
387
|
-
switch (tag >>> 3) {
|
|
388
|
-
case 1:
|
|
389
|
-
message.portId = reader.string();
|
|
390
|
-
break;
|
|
391
|
-
case 2:
|
|
392
|
-
message.channelId = reader.string();
|
|
393
|
-
break;
|
|
394
|
-
default:
|
|
395
|
-
reader.skipType(tag & 7);
|
|
396
|
-
break;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return message;
|
|
400
|
-
},
|
|
401
|
-
fromJSON(object) {
|
|
402
|
-
return {
|
|
403
|
-
portId: isSet(object.portId) ? String(object.portId) : '',
|
|
404
|
-
channelId: isSet(object.channelId) ? String(object.channelId) : '',
|
|
405
|
-
};
|
|
406
|
-
},
|
|
407
|
-
toJSON(message) {
|
|
408
|
-
const obj = {};
|
|
409
|
-
message.portId !== undefined && (obj.portId = message.portId);
|
|
410
|
-
message.channelId !== undefined && (obj.channelId = message.channelId);
|
|
411
|
-
return obj;
|
|
412
|
-
},
|
|
413
|
-
fromPartial(object) {
|
|
414
|
-
const message = createBaseCounterparty();
|
|
415
|
-
message.portId = object.portId ?? '';
|
|
416
|
-
message.channelId = object.channelId ?? '';
|
|
417
|
-
return message;
|
|
418
|
-
},
|
|
419
|
-
fromProtoMsg(message) {
|
|
420
|
-
return Counterparty.decode(message.value);
|
|
421
|
-
},
|
|
422
|
-
toProto(message) {
|
|
423
|
-
return Counterparty.encode(message).finish();
|
|
424
|
-
},
|
|
425
|
-
toProtoMsg(message) {
|
|
426
|
-
return {
|
|
427
|
-
typeUrl: '/ibc.core.channel.v1.Counterparty',
|
|
428
|
-
value: Counterparty.encode(message).finish(),
|
|
429
|
-
};
|
|
430
|
-
},
|
|
431
|
-
};
|
|
432
|
-
function createBasePacket() {
|
|
433
|
-
return {
|
|
434
|
-
sequence: BigInt(0),
|
|
435
|
-
sourcePort: '',
|
|
436
|
-
sourceChannel: '',
|
|
437
|
-
destinationPort: '',
|
|
438
|
-
destinationChannel: '',
|
|
439
|
-
data: new Uint8Array(),
|
|
440
|
-
timeoutHeight: Height.fromPartial({}),
|
|
441
|
-
timeoutTimestamp: BigInt(0),
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
export const Packet = {
|
|
445
|
-
typeUrl: '/ibc.core.channel.v1.Packet',
|
|
446
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
447
|
-
if (message.sequence !== BigInt(0)) {
|
|
448
|
-
writer.uint32(8).uint64(message.sequence);
|
|
449
|
-
}
|
|
450
|
-
if (message.sourcePort !== '') {
|
|
451
|
-
writer.uint32(18).string(message.sourcePort);
|
|
452
|
-
}
|
|
453
|
-
if (message.sourceChannel !== '') {
|
|
454
|
-
writer.uint32(26).string(message.sourceChannel);
|
|
455
|
-
}
|
|
456
|
-
if (message.destinationPort !== '') {
|
|
457
|
-
writer.uint32(34).string(message.destinationPort);
|
|
458
|
-
}
|
|
459
|
-
if (message.destinationChannel !== '') {
|
|
460
|
-
writer.uint32(42).string(message.destinationChannel);
|
|
461
|
-
}
|
|
462
|
-
if (message.data.length !== 0) {
|
|
463
|
-
writer.uint32(50).bytes(message.data);
|
|
464
|
-
}
|
|
465
|
-
if (message.timeoutHeight !== undefined) {
|
|
466
|
-
Height.encode(message.timeoutHeight, writer.uint32(58).fork()).ldelim();
|
|
467
|
-
}
|
|
468
|
-
if (message.timeoutTimestamp !== BigInt(0)) {
|
|
469
|
-
writer.uint32(64).uint64(message.timeoutTimestamp);
|
|
470
|
-
}
|
|
471
|
-
return writer;
|
|
472
|
-
},
|
|
473
|
-
decode(input, length) {
|
|
474
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
475
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
476
|
-
const message = createBasePacket();
|
|
477
|
-
while (reader.pos < end) {
|
|
478
|
-
const tag = reader.uint32();
|
|
479
|
-
switch (tag >>> 3) {
|
|
480
|
-
case 1:
|
|
481
|
-
message.sequence = reader.uint64();
|
|
482
|
-
break;
|
|
483
|
-
case 2:
|
|
484
|
-
message.sourcePort = reader.string();
|
|
485
|
-
break;
|
|
486
|
-
case 3:
|
|
487
|
-
message.sourceChannel = reader.string();
|
|
488
|
-
break;
|
|
489
|
-
case 4:
|
|
490
|
-
message.destinationPort = reader.string();
|
|
491
|
-
break;
|
|
492
|
-
case 5:
|
|
493
|
-
message.destinationChannel = reader.string();
|
|
494
|
-
break;
|
|
495
|
-
case 6:
|
|
496
|
-
message.data = reader.bytes();
|
|
497
|
-
break;
|
|
498
|
-
case 7:
|
|
499
|
-
message.timeoutHeight = Height.decode(reader, reader.uint32());
|
|
500
|
-
break;
|
|
501
|
-
case 8:
|
|
502
|
-
message.timeoutTimestamp = reader.uint64();
|
|
503
|
-
break;
|
|
504
|
-
default:
|
|
505
|
-
reader.skipType(tag & 7);
|
|
506
|
-
break;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
return message;
|
|
510
|
-
},
|
|
511
|
-
fromJSON(object) {
|
|
512
|
-
return {
|
|
513
|
-
sequence: isSet(object.sequence)
|
|
514
|
-
? BigInt(object.sequence.toString())
|
|
515
|
-
: BigInt(0),
|
|
516
|
-
sourcePort: isSet(object.sourcePort) ? String(object.sourcePort) : '',
|
|
517
|
-
sourceChannel: isSet(object.sourceChannel)
|
|
518
|
-
? String(object.sourceChannel)
|
|
519
|
-
: '',
|
|
520
|
-
destinationPort: isSet(object.destinationPort)
|
|
521
|
-
? String(object.destinationPort)
|
|
522
|
-
: '',
|
|
523
|
-
destinationChannel: isSet(object.destinationChannel)
|
|
524
|
-
? String(object.destinationChannel)
|
|
525
|
-
: '',
|
|
526
|
-
data: isSet(object.data)
|
|
527
|
-
? bytesFromBase64(object.data)
|
|
528
|
-
: new Uint8Array(),
|
|
529
|
-
timeoutHeight: isSet(object.timeoutHeight)
|
|
530
|
-
? Height.fromJSON(object.timeoutHeight)
|
|
531
|
-
: undefined,
|
|
532
|
-
timeoutTimestamp: isSet(object.timeoutTimestamp)
|
|
533
|
-
? BigInt(object.timeoutTimestamp.toString())
|
|
534
|
-
: BigInt(0),
|
|
535
|
-
};
|
|
536
|
-
},
|
|
537
|
-
toJSON(message) {
|
|
538
|
-
const obj = {};
|
|
539
|
-
message.sequence !== undefined &&
|
|
540
|
-
(obj.sequence = (message.sequence || BigInt(0)).toString());
|
|
541
|
-
message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort);
|
|
542
|
-
message.sourceChannel !== undefined &&
|
|
543
|
-
(obj.sourceChannel = message.sourceChannel);
|
|
544
|
-
message.destinationPort !== undefined &&
|
|
545
|
-
(obj.destinationPort = message.destinationPort);
|
|
546
|
-
message.destinationChannel !== undefined &&
|
|
547
|
-
(obj.destinationChannel = message.destinationChannel);
|
|
548
|
-
message.data !== undefined &&
|
|
549
|
-
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
550
|
-
message.timeoutHeight !== undefined &&
|
|
551
|
-
(obj.timeoutHeight = message.timeoutHeight
|
|
552
|
-
? Height.toJSON(message.timeoutHeight)
|
|
553
|
-
: undefined);
|
|
554
|
-
message.timeoutTimestamp !== undefined &&
|
|
555
|
-
(obj.timeoutTimestamp = (message.timeoutTimestamp || BigInt(0)).toString());
|
|
556
|
-
return obj;
|
|
557
|
-
},
|
|
558
|
-
fromPartial(object) {
|
|
559
|
-
const message = createBasePacket();
|
|
560
|
-
message.sequence =
|
|
561
|
-
object.sequence !== undefined && object.sequence !== null
|
|
562
|
-
? BigInt(object.sequence.toString())
|
|
563
|
-
: BigInt(0);
|
|
564
|
-
message.sourcePort = object.sourcePort ?? '';
|
|
565
|
-
message.sourceChannel = object.sourceChannel ?? '';
|
|
566
|
-
message.destinationPort = object.destinationPort ?? '';
|
|
567
|
-
message.destinationChannel = object.destinationChannel ?? '';
|
|
568
|
-
message.data = object.data ?? new Uint8Array();
|
|
569
|
-
message.timeoutHeight =
|
|
570
|
-
object.timeoutHeight !== undefined && object.timeoutHeight !== null
|
|
571
|
-
? Height.fromPartial(object.timeoutHeight)
|
|
572
|
-
: undefined;
|
|
573
|
-
message.timeoutTimestamp =
|
|
574
|
-
object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null
|
|
575
|
-
? BigInt(object.timeoutTimestamp.toString())
|
|
576
|
-
: BigInt(0);
|
|
577
|
-
return message;
|
|
578
|
-
},
|
|
579
|
-
fromProtoMsg(message) {
|
|
580
|
-
return Packet.decode(message.value);
|
|
581
|
-
},
|
|
582
|
-
toProto(message) {
|
|
583
|
-
return Packet.encode(message).finish();
|
|
584
|
-
},
|
|
585
|
-
toProtoMsg(message) {
|
|
586
|
-
return {
|
|
587
|
-
typeUrl: '/ibc.core.channel.v1.Packet',
|
|
588
|
-
value: Packet.encode(message).finish(),
|
|
589
|
-
};
|
|
590
|
-
},
|
|
591
|
-
};
|
|
592
|
-
function createBasePacketState() {
|
|
593
|
-
return {
|
|
594
|
-
portId: '',
|
|
595
|
-
channelId: '',
|
|
596
|
-
sequence: BigInt(0),
|
|
597
|
-
data: new Uint8Array(),
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
|
-
export const PacketState = {
|
|
601
|
-
typeUrl: '/ibc.core.channel.v1.PacketState',
|
|
602
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
603
|
-
if (message.portId !== '') {
|
|
604
|
-
writer.uint32(10).string(message.portId);
|
|
605
|
-
}
|
|
606
|
-
if (message.channelId !== '') {
|
|
607
|
-
writer.uint32(18).string(message.channelId);
|
|
608
|
-
}
|
|
609
|
-
if (message.sequence !== BigInt(0)) {
|
|
610
|
-
writer.uint32(24).uint64(message.sequence);
|
|
611
|
-
}
|
|
612
|
-
if (message.data.length !== 0) {
|
|
613
|
-
writer.uint32(34).bytes(message.data);
|
|
614
|
-
}
|
|
615
|
-
return writer;
|
|
616
|
-
},
|
|
617
|
-
decode(input, length) {
|
|
618
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
619
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
620
|
-
const message = createBasePacketState();
|
|
621
|
-
while (reader.pos < end) {
|
|
622
|
-
const tag = reader.uint32();
|
|
623
|
-
switch (tag >>> 3) {
|
|
624
|
-
case 1:
|
|
625
|
-
message.portId = reader.string();
|
|
626
|
-
break;
|
|
627
|
-
case 2:
|
|
628
|
-
message.channelId = reader.string();
|
|
629
|
-
break;
|
|
630
|
-
case 3:
|
|
631
|
-
message.sequence = reader.uint64();
|
|
632
|
-
break;
|
|
633
|
-
case 4:
|
|
634
|
-
message.data = reader.bytes();
|
|
635
|
-
break;
|
|
636
|
-
default:
|
|
637
|
-
reader.skipType(tag & 7);
|
|
638
|
-
break;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
return message;
|
|
642
|
-
},
|
|
643
|
-
fromJSON(object) {
|
|
644
|
-
return {
|
|
645
|
-
portId: isSet(object.portId) ? String(object.portId) : '',
|
|
646
|
-
channelId: isSet(object.channelId) ? String(object.channelId) : '',
|
|
647
|
-
sequence: isSet(object.sequence)
|
|
648
|
-
? BigInt(object.sequence.toString())
|
|
649
|
-
: BigInt(0),
|
|
650
|
-
data: isSet(object.data)
|
|
651
|
-
? bytesFromBase64(object.data)
|
|
652
|
-
: new Uint8Array(),
|
|
653
|
-
};
|
|
654
|
-
},
|
|
655
|
-
toJSON(message) {
|
|
656
|
-
const obj = {};
|
|
657
|
-
message.portId !== undefined && (obj.portId = message.portId);
|
|
658
|
-
message.channelId !== undefined && (obj.channelId = message.channelId);
|
|
659
|
-
message.sequence !== undefined &&
|
|
660
|
-
(obj.sequence = (message.sequence || BigInt(0)).toString());
|
|
661
|
-
message.data !== undefined &&
|
|
662
|
-
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
663
|
-
return obj;
|
|
664
|
-
},
|
|
665
|
-
fromPartial(object) {
|
|
666
|
-
const message = createBasePacketState();
|
|
667
|
-
message.portId = object.portId ?? '';
|
|
668
|
-
message.channelId = object.channelId ?? '';
|
|
669
|
-
message.sequence =
|
|
670
|
-
object.sequence !== undefined && object.sequence !== null
|
|
671
|
-
? BigInt(object.sequence.toString())
|
|
672
|
-
: BigInt(0);
|
|
673
|
-
message.data = object.data ?? new Uint8Array();
|
|
674
|
-
return message;
|
|
675
|
-
},
|
|
676
|
-
fromProtoMsg(message) {
|
|
677
|
-
return PacketState.decode(message.value);
|
|
678
|
-
},
|
|
679
|
-
toProto(message) {
|
|
680
|
-
return PacketState.encode(message).finish();
|
|
681
|
-
},
|
|
682
|
-
toProtoMsg(message) {
|
|
683
|
-
return {
|
|
684
|
-
typeUrl: '/ibc.core.channel.v1.PacketState',
|
|
685
|
-
value: PacketState.encode(message).finish(),
|
|
686
|
-
};
|
|
687
|
-
},
|
|
688
|
-
};
|
|
689
|
-
function createBasePacketId() {
|
|
690
|
-
return {
|
|
691
|
-
portId: '',
|
|
692
|
-
channelId: '',
|
|
693
|
-
sequence: BigInt(0),
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
export const PacketId = {
|
|
697
|
-
typeUrl: '/ibc.core.channel.v1.PacketId',
|
|
698
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
699
|
-
if (message.portId !== '') {
|
|
700
|
-
writer.uint32(10).string(message.portId);
|
|
701
|
-
}
|
|
702
|
-
if (message.channelId !== '') {
|
|
703
|
-
writer.uint32(18).string(message.channelId);
|
|
704
|
-
}
|
|
705
|
-
if (message.sequence !== BigInt(0)) {
|
|
706
|
-
writer.uint32(24).uint64(message.sequence);
|
|
707
|
-
}
|
|
708
|
-
return writer;
|
|
709
|
-
},
|
|
710
|
-
decode(input, length) {
|
|
711
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
712
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
713
|
-
const message = createBasePacketId();
|
|
714
|
-
while (reader.pos < end) {
|
|
715
|
-
const tag = reader.uint32();
|
|
716
|
-
switch (tag >>> 3) {
|
|
717
|
-
case 1:
|
|
718
|
-
message.portId = reader.string();
|
|
719
|
-
break;
|
|
720
|
-
case 2:
|
|
721
|
-
message.channelId = reader.string();
|
|
722
|
-
break;
|
|
723
|
-
case 3:
|
|
724
|
-
message.sequence = reader.uint64();
|
|
725
|
-
break;
|
|
726
|
-
default:
|
|
727
|
-
reader.skipType(tag & 7);
|
|
728
|
-
break;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
return message;
|
|
732
|
-
},
|
|
733
|
-
fromJSON(object) {
|
|
734
|
-
return {
|
|
735
|
-
portId: isSet(object.portId) ? String(object.portId) : '',
|
|
736
|
-
channelId: isSet(object.channelId) ? String(object.channelId) : '',
|
|
737
|
-
sequence: isSet(object.sequence)
|
|
738
|
-
? BigInt(object.sequence.toString())
|
|
739
|
-
: BigInt(0),
|
|
740
|
-
};
|
|
741
|
-
},
|
|
742
|
-
toJSON(message) {
|
|
743
|
-
const obj = {};
|
|
744
|
-
message.portId !== undefined && (obj.portId = message.portId);
|
|
745
|
-
message.channelId !== undefined && (obj.channelId = message.channelId);
|
|
746
|
-
message.sequence !== undefined &&
|
|
747
|
-
(obj.sequence = (message.sequence || BigInt(0)).toString());
|
|
748
|
-
return obj;
|
|
749
|
-
},
|
|
750
|
-
fromPartial(object) {
|
|
751
|
-
const message = createBasePacketId();
|
|
752
|
-
message.portId = object.portId ?? '';
|
|
753
|
-
message.channelId = object.channelId ?? '';
|
|
754
|
-
message.sequence =
|
|
755
|
-
object.sequence !== undefined && object.sequence !== null
|
|
756
|
-
? BigInt(object.sequence.toString())
|
|
757
|
-
: BigInt(0);
|
|
758
|
-
return message;
|
|
759
|
-
},
|
|
760
|
-
fromProtoMsg(message) {
|
|
761
|
-
return PacketId.decode(message.value);
|
|
762
|
-
},
|
|
763
|
-
toProto(message) {
|
|
764
|
-
return PacketId.encode(message).finish();
|
|
765
|
-
},
|
|
766
|
-
toProtoMsg(message) {
|
|
767
|
-
return {
|
|
768
|
-
typeUrl: '/ibc.core.channel.v1.PacketId',
|
|
769
|
-
value: PacketId.encode(message).finish(),
|
|
770
|
-
};
|
|
771
|
-
},
|
|
772
|
-
};
|
|
773
|
-
function createBaseAcknowledgement() {
|
|
774
|
-
return {
|
|
775
|
-
result: undefined,
|
|
776
|
-
error: undefined,
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
export const Acknowledgement = {
|
|
780
|
-
typeUrl: '/ibc.core.channel.v1.Acknowledgement',
|
|
781
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
782
|
-
if (message.result !== undefined) {
|
|
783
|
-
writer.uint32(170).bytes(message.result);
|
|
784
|
-
}
|
|
785
|
-
if (message.error !== undefined) {
|
|
786
|
-
writer.uint32(178).string(message.error);
|
|
787
|
-
}
|
|
788
|
-
return writer;
|
|
789
|
-
},
|
|
790
|
-
decode(input, length) {
|
|
791
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
792
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
793
|
-
const message = createBaseAcknowledgement();
|
|
794
|
-
while (reader.pos < end) {
|
|
795
|
-
const tag = reader.uint32();
|
|
796
|
-
switch (tag >>> 3) {
|
|
797
|
-
case 21:
|
|
798
|
-
message.result = reader.bytes();
|
|
799
|
-
break;
|
|
800
|
-
case 22:
|
|
801
|
-
message.error = reader.string();
|
|
802
|
-
break;
|
|
803
|
-
default:
|
|
804
|
-
reader.skipType(tag & 7);
|
|
805
|
-
break;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
return message;
|
|
809
|
-
},
|
|
810
|
-
fromJSON(object) {
|
|
811
|
-
return {
|
|
812
|
-
result: isSet(object.result) ? bytesFromBase64(object.result) : undefined,
|
|
813
|
-
error: isSet(object.error) ? String(object.error) : undefined,
|
|
814
|
-
};
|
|
815
|
-
},
|
|
816
|
-
toJSON(message) {
|
|
817
|
-
const obj = {};
|
|
818
|
-
message.result !== undefined &&
|
|
819
|
-
(obj.result =
|
|
820
|
-
message.result !== undefined
|
|
821
|
-
? base64FromBytes(message.result)
|
|
822
|
-
: undefined);
|
|
823
|
-
message.error !== undefined && (obj.error = message.error);
|
|
824
|
-
return obj;
|
|
825
|
-
},
|
|
826
|
-
fromPartial(object) {
|
|
827
|
-
const message = createBaseAcknowledgement();
|
|
828
|
-
message.result = object.result ?? undefined;
|
|
829
|
-
message.error = object.error ?? undefined;
|
|
830
|
-
return message;
|
|
831
|
-
},
|
|
832
|
-
fromProtoMsg(message) {
|
|
833
|
-
return Acknowledgement.decode(message.value);
|
|
834
|
-
},
|
|
835
|
-
toProto(message) {
|
|
836
|
-
return Acknowledgement.encode(message).finish();
|
|
837
|
-
},
|
|
838
|
-
toProtoMsg(message) {
|
|
839
|
-
return {
|
|
840
|
-
typeUrl: '/ibc.core.channel.v1.Acknowledgement',
|
|
841
|
-
value: Acknowledgement.encode(message).finish(),
|
|
842
|
-
};
|
|
843
|
-
},
|
|
844
|
-
};
|
|
845
|
-
//# sourceMappingURL=channel.js.map
|
|
1
|
+
import{Height as e}from"../../client/v1/client.js";import{BinaryReader as t,BinaryWriter as n}from"../../../../binary.js";import{isSet as r,bytesFromBase64 as o,base64FromBytes as i}from"../../../../helpers.js";import{}from"../../../../json-safe.js";export var State;!function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(State||(State={}));export const StateSDKType=State;export function stateFromJSON(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return State.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return State.STATE_INIT;case 2:case"STATE_TRYOPEN":return State.STATE_TRYOPEN;case 3:case"STATE_OPEN":return State.STATE_OPEN;case 4:case"STATE_CLOSED":return State.STATE_CLOSED;default:return State.UNRECOGNIZED}}export function stateToJSON(e){switch(e){case State.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case State.STATE_INIT:return"STATE_INIT";case State.STATE_TRYOPEN:return"STATE_TRYOPEN";case State.STATE_OPEN:return"STATE_OPEN";case State.STATE_CLOSED:return"STATE_CLOSED";case State.UNRECOGNIZED:default:return"UNRECOGNIZED"}}export var Order;!function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(Order||(Order={}));export const OrderSDKType=Order;export function orderFromJSON(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return Order.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return Order.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return Order.ORDER_ORDERED;default:return Order.UNRECOGNIZED}}export function orderToJSON(e){switch(e){case Order.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case Order.ORDER_UNORDERED:return"ORDER_UNORDERED";case Order.ORDER_ORDERED:return"ORDER_ORDERED";case Order.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function a(){return{state:0,ordering:0,counterparty:Counterparty.fromPartial({}),connectionHops:[],version:""}}export const Channel={typeUrl:"/ibc.core.channel.v1.Channel",encode(e,t=n.create()){0!==e.state&&t.uint32(8).int32(e.state),0!==e.ordering&&t.uint32(16).int32(e.ordering),void 0!==e.counterparty&&Counterparty.encode(e.counterparty,t.uint32(26).fork()).ldelim();for(const n of e.connectionHops)t.uint32(34).string(n);return""!==e.version&&t.uint32(42).string(e.version),t},decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i=a();for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 1:i.state=r.int32();break;case 2:i.ordering=r.int32();break;case 3:i.counterparty=Counterparty.decode(r,r.uint32());break;case 4:i.connectionHops.push(r.string());break;case 5:i.version=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({state:r(e.state)?stateFromJSON(e.state):-1,ordering:r(e.ordering)?orderFromJSON(e.ordering):-1,counterparty:r(e.counterparty)?Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(e?.connectionHops)?e.connectionHops.map((e=>String(e))):[],version:r(e.version)?String(e.version):""}),toJSON(e){const t={};return void 0!==e.state&&(t.state=stateToJSON(e.state)),void 0!==e.ordering&&(t.ordering=orderToJSON(e.ordering)),void 0!==e.counterparty&&(t.counterparty=e.counterparty?Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?t.connectionHops=e.connectionHops.map((e=>e)):t.connectionHops=[],void 0!==e.version&&(t.version=e.version),t},fromPartial(e){const t=a();return t.state=e.state??0,t.ordering=e.ordering??0,t.counterparty=void 0!==e.counterparty&&null!==e.counterparty?Counterparty.fromPartial(e.counterparty):void 0,t.connectionHops=e.connectionHops?.map((e=>e))||[],t.version=e.version??"",t},fromProtoMsg:e=>Channel.decode(e.value),toProto:e=>Channel.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.Channel",value:Channel.encode(e).finish()})};function c(){return{state:0,ordering:0,counterparty:Counterparty.fromPartial({}),connectionHops:[],version:"",portId:"",channelId:""}}export const IdentifiedChannel={typeUrl:"/ibc.core.channel.v1.IdentifiedChannel",encode(e,t=n.create()){0!==e.state&&t.uint32(8).int32(e.state),0!==e.ordering&&t.uint32(16).int32(e.ordering),void 0!==e.counterparty&&Counterparty.encode(e.counterparty,t.uint32(26).fork()).ldelim();for(const n of e.connectionHops)t.uint32(34).string(n);return""!==e.version&&t.uint32(42).string(e.version),""!==e.portId&&t.uint32(50).string(e.portId),""!==e.channelId&&t.uint32(58).string(e.channelId),t},decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i=c();for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 1:i.state=r.int32();break;case 2:i.ordering=r.int32();break;case 3:i.counterparty=Counterparty.decode(r,r.uint32());break;case 4:i.connectionHops.push(r.string());break;case 5:i.version=r.string();break;case 6:i.portId=r.string();break;case 7:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({state:r(e.state)?stateFromJSON(e.state):-1,ordering:r(e.ordering)?orderFromJSON(e.ordering):-1,counterparty:r(e.counterparty)?Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(e?.connectionHops)?e.connectionHops.map((e=>String(e))):[],version:r(e.version)?String(e.version):"",portId:r(e.portId)?String(e.portId):"",channelId:r(e.channelId)?String(e.channelId):""}),toJSON(e){const t={};return void 0!==e.state&&(t.state=stateToJSON(e.state)),void 0!==e.ordering&&(t.ordering=orderToJSON(e.ordering)),void 0!==e.counterparty&&(t.counterparty=e.counterparty?Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?t.connectionHops=e.connectionHops.map((e=>e)):t.connectionHops=[],void 0!==e.version&&(t.version=e.version),void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){const t=c();return t.state=e.state??0,t.ordering=e.ordering??0,t.counterparty=void 0!==e.counterparty&&null!==e.counterparty?Counterparty.fromPartial(e.counterparty):void 0,t.connectionHops=e.connectionHops?.map((e=>e))||[],t.version=e.version??"",t.portId=e.portId??"",t.channelId=e.channelId??"",t},fromProtoMsg:e=>IdentifiedChannel.decode(e.value),toProto:e=>IdentifiedChannel.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.IdentifiedChannel",value:IdentifiedChannel.encode(e).finish()})};export const Counterparty={typeUrl:"/ibc.core.channel.v1.Counterparty",encode:(e,t=n.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i={portId:"",channelId:""};for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:r(e.portId)?String(e.portId):"",channelId:r(e.channelId)?String(e.channelId):""}),toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){const t={portId:"",channelId:""};return t.portId=e.portId??"",t.channelId=e.channelId??"",t},fromProtoMsg:e=>Counterparty.decode(e.value),toProto:e=>Counterparty.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.Counterparty",value:Counterparty.encode(e).finish()})};function s(){return{sequence:BigInt(0),sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:e.fromPartial({}),timeoutTimestamp:BigInt(0)}}export const Packet={typeUrl:"/ibc.core.channel.v1.Packet",encode:(t,r=n.create())=>(t.sequence!==BigInt(0)&&r.uint32(8).uint64(t.sequence),""!==t.sourcePort&&r.uint32(18).string(t.sourcePort),""!==t.sourceChannel&&r.uint32(26).string(t.sourceChannel),""!==t.destinationPort&&r.uint32(34).string(t.destinationPort),""!==t.destinationChannel&&r.uint32(42).string(t.destinationChannel),0!==t.data.length&&r.uint32(50).bytes(t.data),void 0!==t.timeoutHeight&&e.encode(t.timeoutHeight,r.uint32(58).fork()).ldelim(),t.timeoutTimestamp!==BigInt(0)&&r.uint32(64).uint64(t.timeoutTimestamp),r),decode(n,r){const o=n instanceof t?n:new t(n);let i=void 0===r?o.len:o.pos+r;const a=s();for(;o.pos<i;){const t=o.uint32();switch(t>>>3){case 1:a.sequence=o.uint64();break;case 2:a.sourcePort=o.string();break;case 3:a.sourceChannel=o.string();break;case 4:a.destinationPort=o.string();break;case 5:a.destinationChannel=o.string();break;case 6:a.data=o.bytes();break;case 7:a.timeoutHeight=e.decode(o,o.uint32());break;case 8:a.timeoutTimestamp=o.uint64();break;default:o.skipType(7&t)}}return a},fromJSON:t=>({sequence:r(t.sequence)?BigInt(t.sequence.toString()):BigInt(0),sourcePort:r(t.sourcePort)?String(t.sourcePort):"",sourceChannel:r(t.sourceChannel)?String(t.sourceChannel):"",destinationPort:r(t.destinationPort)?String(t.destinationPort):"",destinationChannel:r(t.destinationChannel)?String(t.destinationChannel):"",data:r(t.data)?o(t.data):new Uint8Array,timeoutHeight:r(t.timeoutHeight)?e.fromJSON(t.timeoutHeight):void 0,timeoutTimestamp:r(t.timeoutTimestamp)?BigInt(t.timeoutTimestamp.toString()):BigInt(0)}),toJSON(t){const n={};return void 0!==t.sequence&&(n.sequence=(t.sequence||BigInt(0)).toString()),void 0!==t.sourcePort&&(n.sourcePort=t.sourcePort),void 0!==t.sourceChannel&&(n.sourceChannel=t.sourceChannel),void 0!==t.destinationPort&&(n.destinationPort=t.destinationPort),void 0!==t.destinationChannel&&(n.destinationChannel=t.destinationChannel),void 0!==t.data&&(n.data=i(void 0!==t.data?t.data:new Uint8Array)),void 0!==t.timeoutHeight&&(n.timeoutHeight=t.timeoutHeight?e.toJSON(t.timeoutHeight):void 0),void 0!==t.timeoutTimestamp&&(n.timeoutTimestamp=(t.timeoutTimestamp||BigInt(0)).toString()),n},fromPartial(t){const n=s();return n.sequence=void 0!==t.sequence&&null!==t.sequence?BigInt(t.sequence.toString()):BigInt(0),n.sourcePort=t.sourcePort??"",n.sourceChannel=t.sourceChannel??"",n.destinationPort=t.destinationPort??"",n.destinationChannel=t.destinationChannel??"",n.data=t.data??new Uint8Array,n.timeoutHeight=void 0!==t.timeoutHeight&&null!==t.timeoutHeight?e.fromPartial(t.timeoutHeight):void 0,n.timeoutTimestamp=void 0!==t.timeoutTimestamp&&null!==t.timeoutTimestamp?BigInt(t.timeoutTimestamp.toString()):BigInt(0),n},fromProtoMsg:e=>Packet.decode(e.value),toProto:e=>Packet.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.Packet",value:Packet.encode(e).finish()})};function d(){return{portId:"",channelId:"",sequence:BigInt(0),data:new Uint8Array}}export const PacketState={typeUrl:"/ibc.core.channel.v1.PacketState",encode:(e,t=n.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t),decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i=d();for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;case 4:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:r(e.portId)?String(e.portId):"",channelId:r(e.channelId)?String(e.channelId):"",sequence:r(e.sequence)?BigInt(e.sequence.toString()):BigInt(0),data:r(e.data)?o(e.data):new Uint8Array}),toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.data&&(t.data=i(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){const t=d();return t.portId=e.portId??"",t.channelId=e.channelId??"",t.sequence=void 0!==e.sequence&&null!==e.sequence?BigInt(e.sequence.toString()):BigInt(0),t.data=e.data??new Uint8Array,t},fromProtoMsg:e=>PacketState.decode(e.value),toProto:e=>PacketState.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.PacketState",value:PacketState.encode(e).finish()})};function u(){return{portId:"",channelId:"",sequence:BigInt(0)}}export const PacketId={typeUrl:"/ibc.core.channel.v1.PacketId",encode:(e,t=n.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t),decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i=u();for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:r(e.portId)?String(e.portId):"",channelId:r(e.channelId)?String(e.channelId):"",sequence:r(e.sequence)?BigInt(e.sequence.toString()):BigInt(0)}),toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){const t=u();return t.portId=e.portId??"",t.channelId=e.channelId??"",t.sequence=void 0!==e.sequence&&null!==e.sequence?BigInt(e.sequence.toString()):BigInt(0),t},fromProtoMsg:e=>PacketId.decode(e.value),toProto:e=>PacketId.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.PacketId",value:PacketId.encode(e).finish()})};export const Acknowledgement={typeUrl:"/ibc.core.channel.v1.Acknowledgement",encode:(e,t=n.create())=>(void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t),decode(e,n){const r=e instanceof t?e:new t(e);let o=void 0===n?r.len:r.pos+n;const i={result:void 0,error:void 0};for(;r.pos<o;){const e=r.uint32();switch(e>>>3){case 21:i.result=r.bytes();break;case 22:i.error=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({result:r(e.result)?o(e.result):void 0,error:r(e.error)?String(e.error):void 0}),toJSON(e){const t={};return void 0!==e.result&&(t.result=void 0!==e.result?i(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){const t={result:void 0,error:void 0};return t.result=e.result??void 0,t.error=e.error??void 0,t},fromProtoMsg:e=>Acknowledgement.decode(e.value),toProto:e=>Acknowledgement.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/ibc.core.channel.v1.Acknowledgement",value:Acknowledgement.encode(e).finish()})};
|