injectivejs 0.0.1-beta.30
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/.eslintignore +1 -0
- package/CHANGELOG.md +176 -0
- package/README.md +21 -0
- package/jest.starship.config.js +18 -0
- package/package.json +48 -0
- package/src/amino/amino.ts +1 -0
- package/src/binary.ts +534 -0
- package/src/cosmos/auth/v1beta1/auth.ts +550 -0
- package/src/cosmos/auth/v1beta1/query.rpc.func.ts +72 -0
- package/src/cosmos/auth/v1beta1/query.ts +2034 -0
- package/src/cosmos/authz/v1beta1/authz.ts +477 -0
- package/src/cosmos/authz/v1beta1/tx.rpc.func.ts +21 -0
- package/src/cosmos/authz/v1beta1/tx.ts +647 -0
- package/src/cosmos/bank/v1beta1/bank.ts +974 -0
- package/src/cosmos/bank/v1beta1/query.rpc.func.ts +93 -0
- package/src/cosmos/bank/v1beta1/query.ts +3027 -0
- package/src/cosmos/bank/v1beta1/tx.rpc.func.ts +27 -0
- package/src/cosmos/bank/v1beta1/tx.ts +861 -0
- package/src/cosmos/base/abci/v1beta1/abci.ts +1698 -0
- package/src/cosmos/base/query/v1beta1/pagination.ts +361 -0
- package/src/cosmos/base/v1beta1/coin.ts +439 -0
- package/src/cosmos/crypto/ed25519/keys.ts +209 -0
- package/src/cosmos/crypto/multisig/v1beta1/multisig.ts +225 -0
- package/src/cosmos/crypto/secp256k1/keys.ts +203 -0
- package/src/cosmos/crypto/secp256r1/keys.ts +201 -0
- package/src/cosmos/distribution/v1beta1/distribution.ts +1494 -0
- package/src/cosmos/distribution/v1beta1/tx.rpc.func.ts +45 -0
- package/src/cosmos/distribution/v1beta1/tx.ts +1478 -0
- package/src/cosmos/feegrant/v1beta1/tx.rpc.func.ts +21 -0
- package/src/cosmos/feegrant/v1beta1/tx.ts +596 -0
- package/src/cosmos/gov/v1/gov.ts +1843 -0
- package/src/cosmos/gov/v1/tx.rpc.func.ts +45 -0
- package/src/cosmos/gov/v1/tx.ts +1660 -0
- package/src/cosmos/gov/v1beta1/gov.ts +1428 -0
- package/src/cosmos/gov/v1beta1/query.rpc.func.ts +58 -0
- package/src/cosmos/gov/v1beta1/query.ts +1749 -0
- package/src/cosmos/gov/v1beta1/tx.rpc.func.ts +27 -0
- package/src/cosmos/gov/v1beta1/tx.ts +884 -0
- package/src/cosmos/group/v1/tx.rpc.func.ts +87 -0
- package/src/cosmos/group/v1/tx.ts +3207 -0
- package/src/cosmos/group/v1/types.ts +2081 -0
- package/src/cosmos/ics23/v1/proofs.ts +2060 -0
- package/src/cosmos/msg/v1/msg.ts +1 -0
- package/src/cosmos/query/v1/query.ts +1 -0
- package/src/cosmos/staking/v1beta1/query.rpc.func.ts +100 -0
- package/src/cosmos/staking/v1beta1/query.ts +3073 -0
- package/src/cosmos/staking/v1beta1/staking.ts +3005 -0
- package/src/cosmos/staking/v1beta1/tx.rpc.func.ts +45 -0
- package/src/cosmos/staking/v1beta1/tx.ts +1638 -0
- package/src/cosmos/tx/signing/v1beta1/signing.ts +688 -0
- package/src/cosmos/tx/v1beta1/service.rpc.func.ts +65 -0
- package/src/cosmos/tx/v1beta1/service.ts +2294 -0
- package/src/cosmos/tx/v1beta1/tx.ts +2029 -0
- package/src/cosmos/upgrade/v1beta1/upgrade.ts +591 -0
- package/src/cosmos/vesting/v1beta1/tx.rpc.func.ts +21 -0
- package/src/cosmos/vesting/v1beta1/tx.ts +698 -0
- package/src/cosmos/vesting/v1beta1/vesting.ts +735 -0
- package/src/cosmos_proto/cosmos.ts +341 -0
- package/src/cosmwasm/wasm/v1/proposal_legacy.ts +2432 -0
- package/src/cosmwasm/wasm/v1/query.rpc.func.ts +100 -0
- package/src/cosmwasm/wasm/v1/query.ts +3235 -0
- package/src/cosmwasm/wasm/v1/tx.rpc.func.ts +105 -0
- package/src/cosmwasm/wasm/v1/tx.ts +4191 -0
- package/src/cosmwasm/wasm/v1/types.ts +1120 -0
- package/src/extern.ts +38 -0
- package/src/gogoproto/gogo.ts +1 -0
- package/src/google/api/annotations.ts +1 -0
- package/src/google/api/http.ts +1069 -0
- package/src/google/protobuf/any.ts +331 -0
- package/src/google/protobuf/descriptor.ts +7177 -0
- package/src/google/protobuf/duration.ts +225 -0
- package/src/google/protobuf/timestamp.ts +281 -0
- package/src/helper-func-types.ts +191 -0
- package/src/helpers.ts +259 -0
- package/src/ibc/applications/transfer/v1/transfer.ts +373 -0
- package/src/ibc/applications/transfer/v1/tx.rpc.func.ts +15 -0
- package/src/ibc/applications/transfer/v1/tx.ts +569 -0
- package/src/ibc/core/channel/v1/channel.ts +1510 -0
- package/src/ibc/core/channel/v1/tx.rpc.func.ts +117 -0
- package/src/ibc/core/channel/v1/tx.ts +4866 -0
- package/src/ibc/core/channel/v1/upgrade.ts +388 -0
- package/src/ibc/core/client/v1/client.ts +602 -0
- package/src/ibc/core/client/v1/tx.rpc.func.ts +45 -0
- package/src/ibc/core/client/v1/tx.ts +1560 -0
- package/src/ibc/core/commitment/v1/commitment.ts +314 -0
- package/src/ibc/core/connection/v1/connection.ts +1010 -0
- package/src/ibc/core/connection/v1/tx.rpc.func.ts +33 -0
- package/src/ibc/core/connection/v1/tx.ts +1393 -0
- package/src/injective/auction/v1beta1/auction.ts +692 -0
- package/src/injective/auction/v1beta1/genesis.ts +156 -0
- package/src/injective/auction/v1beta1/query.rpc.func.ts +30 -0
- package/src/injective/auction/v1beta1/query.ts +726 -0
- package/src/injective/auction/v1beta1/tx.rpc.func.ts +15 -0
- package/src/injective/auction/v1beta1/tx.ts +383 -0
- package/src/injective/crypto/v1beta1/ethsecp256k1/keys.ts +205 -0
- package/src/injective/exchange/v1beta1/authz.ts +1213 -0
- package/src/injective/exchange/v1beta1/events.ts +4016 -0
- package/src/injective/exchange/v1beta1/exchange.ts +7789 -0
- package/src/injective/exchange/v1beta1/genesis.ts +2460 -0
- package/src/injective/exchange/v1beta1/proposal.ts +4383 -0
- package/src/injective/exchange/v1beta1/query.rpc.func.ts +422 -0
- package/src/injective/exchange/v1beta1/query.ts +13590 -0
- package/src/injective/exchange/v1beta1/tx.rpc.func.ts +213 -0
- package/src/injective/exchange/v1beta1/tx.ts +9492 -0
- package/src/injective/insurance/v1beta1/events.ts +521 -0
- package/src/injective/insurance/v1beta1/genesis.ts +178 -0
- package/src/injective/insurance/v1beta1/insurance.ts +531 -0
- package/src/injective/insurance/v1beta1/query.rpc.func.ts +44 -0
- package/src/injective/insurance/v1beta1/query.ts +1095 -0
- package/src/injective/insurance/v1beta1/tx.rpc.func.ts +27 -0
- package/src/injective/insurance/v1beta1/tx.ts +892 -0
- package/src/injective/ocr/v1beta1/genesis.ts +945 -0
- package/src/injective/ocr/v1beta1/ocr.ts +3044 -0
- package/src/injective/ocr/v1beta1/query.rpc.func.ts +51 -0
- package/src/injective/ocr/v1beta1/query.ts +1218 -0
- package/src/injective/ocr/v1beta1/tx.rpc.func.ts +57 -0
- package/src/injective/ocr/v1beta1/tx.ts +1900 -0
- package/src/injective/oracle/v1beta1/events.ts +1234 -0
- package/src/injective/oracle/v1beta1/genesis.ts +440 -0
- package/src/injective/oracle/v1beta1/oracle.ts +3206 -0
- package/src/injective/oracle/v1beta1/proposal.ts +1449 -0
- package/src/injective/oracle/v1beta1/query.rpc.func.ts +121 -0
- package/src/injective/oracle/v1beta1/query.ts +3446 -0
- package/src/injective/oracle/v1beta1/tx.rpc.func.ts +51 -0
- package/src/injective/oracle/v1beta1/tx.ts +1605 -0
- package/src/injective/peggy/v1/attestation.ts +333 -0
- package/src/injective/peggy/v1/batch.ts +290 -0
- package/src/injective/peggy/v1/ethereum_signer.ts +38 -0
- package/src/injective/peggy/v1/events.ts +2274 -0
- package/src/injective/peggy/v1/genesis.ts +308 -0
- package/src/injective/peggy/v1/msgs.rpc.func.ts +87 -0
- package/src/injective/peggy/v1/msgs.ts +3087 -0
- package/src/injective/peggy/v1/params.ts +392 -0
- package/src/injective/peggy/v1/pool.ts +198 -0
- package/src/injective/peggy/v1/proposal.ts +231 -0
- package/src/injective/peggy/v1/query.rpc.func.ts +149 -0
- package/src/injective/peggy/v1/query.ts +3578 -0
- package/src/injective/peggy/v1/types.ts +575 -0
- package/src/injective/permissions/v1beta1/events.ts +102 -0
- package/src/injective/permissions/v1beta1/genesis.ts +109 -0
- package/src/injective/permissions/v1beta1/params.ts +97 -0
- package/src/injective/permissions/v1beta1/permissions.ts +709 -0
- package/src/injective/permissions/v1beta1/query.rpc.func.ts +44 -0
- package/src/injective/permissions/v1beta1/query.ts +1084 -0
- package/src/injective/permissions/v1beta1/tx.rpc.func.ts +45 -0
- package/src/injective/permissions/v1beta1/tx.ts +1682 -0
- package/src/injective/stream/v1beta1/query.ts +2870 -0
- package/src/injective/tokenfactory/v1beta1/authorityMetadata.ts +99 -0
- package/src/injective/tokenfactory/v1beta1/events.ts +495 -0
- package/src/injective/tokenfactory/v1beta1/genesis.ts +259 -0
- package/src/injective/tokenfactory/v1beta1/params.ts +100 -0
- package/src/injective/tokenfactory/v1beta1/query.rpc.func.ts +30 -0
- package/src/injective/tokenfactory/v1beta1/query.ts +714 -0
- package/src/injective/tokenfactory/v1beta1/tx.rpc.func.ts +39 -0
- package/src/injective/tokenfactory/v1beta1/tx.ts +1208 -0
- package/src/injective/types/v1beta1/account.ts +110 -0
- package/src/injective/types/v1beta1/tx_ext.ts +139 -0
- package/src/injective/types/v1beta1/tx_response.ts +197 -0
- package/src/injective/wasmx/v1/events.ts +396 -0
- package/src/injective/wasmx/v1/genesis.ts +214 -0
- package/src/injective/wasmx/v1/proposal.ts +769 -0
- package/src/injective/wasmx/v1/query.rpc.func.ts +23 -0
- package/src/injective/wasmx/v1/query.ts +509 -0
- package/src/injective/wasmx/v1/tx.rpc.func.ts +39 -0
- package/src/injective/wasmx/v1/tx.ts +1174 -0
- package/src/injective/wasmx/v1/wasmx.ts +379 -0
- package/src/registry.ts +218 -0
- package/src/tendermint/abci/types.ts +6283 -0
- package/src/tendermint/crypto/keys.ts +103 -0
- package/src/tendermint/crypto/proof.ts +555 -0
- package/src/tendermint/types/block.ts +131 -0
- package/src/tendermint/types/evidence.ts +476 -0
- package/src/tendermint/types/params.ts +814 -0
- package/src/tendermint/types/types.ts +2157 -0
- package/src/tendermint/types/validator.ts +389 -0
- package/src/tendermint/version/types.ts +219 -0
- package/src/types.ts +155 -0
- package/src/utf8.ts +148 -0
- package/src/varint.ts +488 -0
- package/tsconfig.esm.json +9 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { Any, AnyAmino } from "../../../../google/protobuf/any";
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../../binary";
|
|
3
|
+
import { DeepPartial } from "../../../../helpers";
|
|
4
|
+
import { GlobalDecoderRegistry } from "../../../../registry";
|
|
5
|
+
/**
|
|
6
|
+
* IdentifiedClientState defines a client state with an additional client
|
|
7
|
+
* identifier field.
|
|
8
|
+
*/
|
|
9
|
+
export interface IdentifiedClientState {
|
|
10
|
+
/** client identifier */
|
|
11
|
+
clientId: string;
|
|
12
|
+
/** client state */
|
|
13
|
+
clientState?: Any;
|
|
14
|
+
}
|
|
15
|
+
export interface IdentifiedClientStateProtoMsg {
|
|
16
|
+
typeUrl: "/ibc.core.client.v1.IdentifiedClientState";
|
|
17
|
+
value: Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* IdentifiedClientState defines a client state with an additional client
|
|
21
|
+
* identifier field.
|
|
22
|
+
*/
|
|
23
|
+
export interface IdentifiedClientStateAmino {
|
|
24
|
+
/** client identifier */
|
|
25
|
+
client_id: string;
|
|
26
|
+
/** client state */
|
|
27
|
+
client_state?: AnyAmino;
|
|
28
|
+
}
|
|
29
|
+
export interface IdentifiedClientStateAminoMsg {
|
|
30
|
+
type: "cosmos-sdk/IdentifiedClientState";
|
|
31
|
+
value: IdentifiedClientStateAmino;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* ConsensusStateWithHeight defines a consensus state with an additional height
|
|
35
|
+
* field.
|
|
36
|
+
*/
|
|
37
|
+
export interface ConsensusStateWithHeight {
|
|
38
|
+
/** consensus state height */
|
|
39
|
+
height: Height;
|
|
40
|
+
/** consensus state */
|
|
41
|
+
consensusState?: Any;
|
|
42
|
+
}
|
|
43
|
+
export interface ConsensusStateWithHeightProtoMsg {
|
|
44
|
+
typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight";
|
|
45
|
+
value: Uint8Array;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* ConsensusStateWithHeight defines a consensus state with an additional height
|
|
49
|
+
* field.
|
|
50
|
+
*/
|
|
51
|
+
export interface ConsensusStateWithHeightAmino {
|
|
52
|
+
/** consensus state height */
|
|
53
|
+
height: HeightAmino;
|
|
54
|
+
/** consensus state */
|
|
55
|
+
consensus_state?: AnyAmino;
|
|
56
|
+
}
|
|
57
|
+
export interface ConsensusStateWithHeightAminoMsg {
|
|
58
|
+
type: "cosmos-sdk/ConsensusStateWithHeight";
|
|
59
|
+
value: ConsensusStateWithHeightAmino;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* ClientConsensusStates defines all the stored consensus states for a given
|
|
63
|
+
* client.
|
|
64
|
+
*/
|
|
65
|
+
export interface ClientConsensusStates {
|
|
66
|
+
/** client identifier */
|
|
67
|
+
clientId: string;
|
|
68
|
+
/** consensus states and their heights associated with the client */
|
|
69
|
+
consensusStates: ConsensusStateWithHeight[];
|
|
70
|
+
}
|
|
71
|
+
export interface ClientConsensusStatesProtoMsg {
|
|
72
|
+
typeUrl: "/ibc.core.client.v1.ClientConsensusStates";
|
|
73
|
+
value: Uint8Array;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* ClientConsensusStates defines all the stored consensus states for a given
|
|
77
|
+
* client.
|
|
78
|
+
*/
|
|
79
|
+
export interface ClientConsensusStatesAmino {
|
|
80
|
+
/** client identifier */
|
|
81
|
+
client_id: string;
|
|
82
|
+
/** consensus states and their heights associated with the client */
|
|
83
|
+
consensus_states: ConsensusStateWithHeightAmino[];
|
|
84
|
+
}
|
|
85
|
+
export interface ClientConsensusStatesAminoMsg {
|
|
86
|
+
type: "cosmos-sdk/ClientConsensusStates";
|
|
87
|
+
value: ClientConsensusStatesAmino;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Height is a monotonically increasing data type
|
|
91
|
+
* that can be compared against another Height for the purposes of updating and
|
|
92
|
+
* freezing clients
|
|
93
|
+
*
|
|
94
|
+
* Normally the RevisionHeight is incremented at each height while keeping
|
|
95
|
+
* RevisionNumber the same. However some consensus algorithms may choose to
|
|
96
|
+
* reset the height in certain conditions e.g. hard forks, state-machine
|
|
97
|
+
* breaking changes In these cases, the RevisionNumber is incremented so that
|
|
98
|
+
* height continues to be monitonically increasing even as the RevisionHeight
|
|
99
|
+
* gets reset
|
|
100
|
+
*
|
|
101
|
+
* Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag.
|
|
102
|
+
* This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.
|
|
103
|
+
*/
|
|
104
|
+
export interface Height {
|
|
105
|
+
/** the revision that the client is currently on */
|
|
106
|
+
revisionNumber: bigint;
|
|
107
|
+
/** the height within the given revision */
|
|
108
|
+
revisionHeight: bigint;
|
|
109
|
+
}
|
|
110
|
+
export interface HeightProtoMsg {
|
|
111
|
+
typeUrl: "/ibc.core.client.v1.Height";
|
|
112
|
+
value: Uint8Array;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Height is a monotonically increasing data type
|
|
116
|
+
* that can be compared against another Height for the purposes of updating and
|
|
117
|
+
* freezing clients
|
|
118
|
+
*
|
|
119
|
+
* Normally the RevisionHeight is incremented at each height while keeping
|
|
120
|
+
* RevisionNumber the same. However some consensus algorithms may choose to
|
|
121
|
+
* reset the height in certain conditions e.g. hard forks, state-machine
|
|
122
|
+
* breaking changes In these cases, the RevisionNumber is incremented so that
|
|
123
|
+
* height continues to be monitonically increasing even as the RevisionHeight
|
|
124
|
+
* gets reset
|
|
125
|
+
*
|
|
126
|
+
* Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag.
|
|
127
|
+
* This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.
|
|
128
|
+
*/
|
|
129
|
+
export interface HeightAmino {
|
|
130
|
+
/** the revision that the client is currently on */
|
|
131
|
+
revision_number: string;
|
|
132
|
+
/** the height within the given revision */
|
|
133
|
+
revision_height: string;
|
|
134
|
+
}
|
|
135
|
+
export interface HeightAminoMsg {
|
|
136
|
+
type: "cosmos-sdk/Height";
|
|
137
|
+
value: HeightAmino;
|
|
138
|
+
}
|
|
139
|
+
/** Params defines the set of IBC light client parameters. */
|
|
140
|
+
export interface Params {
|
|
141
|
+
/**
|
|
142
|
+
* allowed_clients defines the list of allowed client state types which can be created
|
|
143
|
+
* and interacted with. If a client type is removed from the allowed clients list, usage
|
|
144
|
+
* of this client will be disabled until it is added again to the list.
|
|
145
|
+
*/
|
|
146
|
+
allowedClients: string[];
|
|
147
|
+
}
|
|
148
|
+
export interface ParamsProtoMsg {
|
|
149
|
+
typeUrl: "/ibc.core.client.v1.Params";
|
|
150
|
+
value: Uint8Array;
|
|
151
|
+
}
|
|
152
|
+
/** Params defines the set of IBC light client parameters. */
|
|
153
|
+
export interface ParamsAmino {
|
|
154
|
+
/**
|
|
155
|
+
* allowed_clients defines the list of allowed client state types which can be created
|
|
156
|
+
* and interacted with. If a client type is removed from the allowed clients list, usage
|
|
157
|
+
* of this client will be disabled until it is added again to the list.
|
|
158
|
+
*/
|
|
159
|
+
allowed_clients: string[];
|
|
160
|
+
}
|
|
161
|
+
export interface ParamsAminoMsg {
|
|
162
|
+
type: "cosmos-sdk/Params";
|
|
163
|
+
value: ParamsAmino;
|
|
164
|
+
}
|
|
165
|
+
function createBaseIdentifiedClientState(): IdentifiedClientState {
|
|
166
|
+
return {
|
|
167
|
+
clientId: "",
|
|
168
|
+
clientState: undefined
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
export const IdentifiedClientState = {
|
|
172
|
+
typeUrl: "/ibc.core.client.v1.IdentifiedClientState",
|
|
173
|
+
aminoType: "cosmos-sdk/IdentifiedClientState",
|
|
174
|
+
is(o: any): o is IdentifiedClientState {
|
|
175
|
+
return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.clientId === "string");
|
|
176
|
+
},
|
|
177
|
+
isAmino(o: any): o is IdentifiedClientStateAmino {
|
|
178
|
+
return o && (o.$typeUrl === IdentifiedClientState.typeUrl || typeof o.client_id === "string");
|
|
179
|
+
},
|
|
180
|
+
encode(message: IdentifiedClientState, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
181
|
+
if (message.clientId !== "") {
|
|
182
|
+
writer.uint32(10).string(message.clientId);
|
|
183
|
+
}
|
|
184
|
+
if (message.clientState !== undefined) {
|
|
185
|
+
Any.encode(message.clientState, writer.uint32(18).fork()).ldelim();
|
|
186
|
+
}
|
|
187
|
+
return writer;
|
|
188
|
+
},
|
|
189
|
+
decode(input: BinaryReader | Uint8Array, length?: number): IdentifiedClientState {
|
|
190
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
191
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
192
|
+
const message = createBaseIdentifiedClientState();
|
|
193
|
+
while (reader.pos < end) {
|
|
194
|
+
const tag = reader.uint32();
|
|
195
|
+
switch (tag >>> 3) {
|
|
196
|
+
case 1:
|
|
197
|
+
message.clientId = reader.string();
|
|
198
|
+
break;
|
|
199
|
+
case 2:
|
|
200
|
+
message.clientState = Any.decode(reader, reader.uint32());
|
|
201
|
+
break;
|
|
202
|
+
default:
|
|
203
|
+
reader.skipType(tag & 7);
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return message;
|
|
208
|
+
},
|
|
209
|
+
fromPartial(object: DeepPartial<IdentifiedClientState>): IdentifiedClientState {
|
|
210
|
+
const message = createBaseIdentifiedClientState();
|
|
211
|
+
message.clientId = object.clientId ?? "";
|
|
212
|
+
message.clientState = object.clientState !== undefined && object.clientState !== null ? Any.fromPartial(object.clientState) : undefined;
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
fromAmino(object: IdentifiedClientStateAmino): IdentifiedClientState {
|
|
216
|
+
const message = createBaseIdentifiedClientState();
|
|
217
|
+
if (object.client_id !== undefined && object.client_id !== null) {
|
|
218
|
+
message.clientId = object.client_id;
|
|
219
|
+
}
|
|
220
|
+
if (object.client_state !== undefined && object.client_state !== null) {
|
|
221
|
+
message.clientState = Any.fromAmino(object.client_state);
|
|
222
|
+
}
|
|
223
|
+
return message;
|
|
224
|
+
},
|
|
225
|
+
toAmino(message: IdentifiedClientState): IdentifiedClientStateAmino {
|
|
226
|
+
const obj: any = {};
|
|
227
|
+
obj.client_id = message.clientId === "" ? undefined : message.clientId;
|
|
228
|
+
obj.client_state = message.clientState ? Any.toAmino(message.clientState) : undefined;
|
|
229
|
+
return obj;
|
|
230
|
+
},
|
|
231
|
+
fromAminoMsg(object: IdentifiedClientStateAminoMsg): IdentifiedClientState {
|
|
232
|
+
return IdentifiedClientState.fromAmino(object.value);
|
|
233
|
+
},
|
|
234
|
+
toAminoMsg(message: IdentifiedClientState): IdentifiedClientStateAminoMsg {
|
|
235
|
+
return {
|
|
236
|
+
type: "cosmos-sdk/IdentifiedClientState",
|
|
237
|
+
value: IdentifiedClientState.toAmino(message)
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
fromProtoMsg(message: IdentifiedClientStateProtoMsg): IdentifiedClientState {
|
|
241
|
+
return IdentifiedClientState.decode(message.value);
|
|
242
|
+
},
|
|
243
|
+
toProto(message: IdentifiedClientState): Uint8Array {
|
|
244
|
+
return IdentifiedClientState.encode(message).finish();
|
|
245
|
+
},
|
|
246
|
+
toProtoMsg(message: IdentifiedClientState): IdentifiedClientStateProtoMsg {
|
|
247
|
+
return {
|
|
248
|
+
typeUrl: "/ibc.core.client.v1.IdentifiedClientState",
|
|
249
|
+
value: IdentifiedClientState.encode(message).finish()
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
GlobalDecoderRegistry.register(IdentifiedClientState.typeUrl, IdentifiedClientState);
|
|
254
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(IdentifiedClientState.aminoType, IdentifiedClientState.typeUrl);
|
|
255
|
+
function createBaseConsensusStateWithHeight(): ConsensusStateWithHeight {
|
|
256
|
+
return {
|
|
257
|
+
height: Height.fromPartial({}),
|
|
258
|
+
consensusState: undefined
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
export const ConsensusStateWithHeight = {
|
|
262
|
+
typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight",
|
|
263
|
+
aminoType: "cosmos-sdk/ConsensusStateWithHeight",
|
|
264
|
+
is(o: any): o is ConsensusStateWithHeight {
|
|
265
|
+
return o && (o.$typeUrl === ConsensusStateWithHeight.typeUrl || Height.is(o.height));
|
|
266
|
+
},
|
|
267
|
+
isAmino(o: any): o is ConsensusStateWithHeightAmino {
|
|
268
|
+
return o && (o.$typeUrl === ConsensusStateWithHeight.typeUrl || Height.isAmino(o.height));
|
|
269
|
+
},
|
|
270
|
+
encode(message: ConsensusStateWithHeight, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
271
|
+
if (message.height !== undefined) {
|
|
272
|
+
Height.encode(message.height, writer.uint32(10).fork()).ldelim();
|
|
273
|
+
}
|
|
274
|
+
if (message.consensusState !== undefined) {
|
|
275
|
+
Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim();
|
|
276
|
+
}
|
|
277
|
+
return writer;
|
|
278
|
+
},
|
|
279
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ConsensusStateWithHeight {
|
|
280
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
281
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
282
|
+
const message = createBaseConsensusStateWithHeight();
|
|
283
|
+
while (reader.pos < end) {
|
|
284
|
+
const tag = reader.uint32();
|
|
285
|
+
switch (tag >>> 3) {
|
|
286
|
+
case 1:
|
|
287
|
+
message.height = Height.decode(reader, reader.uint32());
|
|
288
|
+
break;
|
|
289
|
+
case 2:
|
|
290
|
+
message.consensusState = Any.decode(reader, reader.uint32());
|
|
291
|
+
break;
|
|
292
|
+
default:
|
|
293
|
+
reader.skipType(tag & 7);
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return message;
|
|
298
|
+
},
|
|
299
|
+
fromPartial(object: DeepPartial<ConsensusStateWithHeight>): ConsensusStateWithHeight {
|
|
300
|
+
const message = createBaseConsensusStateWithHeight();
|
|
301
|
+
message.height = object.height !== undefined && object.height !== null ? Height.fromPartial(object.height) : undefined;
|
|
302
|
+
message.consensusState = object.consensusState !== undefined && object.consensusState !== null ? Any.fromPartial(object.consensusState) : undefined;
|
|
303
|
+
return message;
|
|
304
|
+
},
|
|
305
|
+
fromAmino(object: ConsensusStateWithHeightAmino): ConsensusStateWithHeight {
|
|
306
|
+
const message = createBaseConsensusStateWithHeight();
|
|
307
|
+
if (object.height !== undefined && object.height !== null) {
|
|
308
|
+
message.height = Height.fromAmino(object.height);
|
|
309
|
+
}
|
|
310
|
+
if (object.consensus_state !== undefined && object.consensus_state !== null) {
|
|
311
|
+
message.consensusState = Any.fromAmino(object.consensus_state);
|
|
312
|
+
}
|
|
313
|
+
return message;
|
|
314
|
+
},
|
|
315
|
+
toAmino(message: ConsensusStateWithHeight): ConsensusStateWithHeightAmino {
|
|
316
|
+
const obj: any = {};
|
|
317
|
+
obj.height = message.height ? Height.toAmino(message.height) : undefined;
|
|
318
|
+
obj.consensus_state = message.consensusState ? Any.toAmino(message.consensusState) : undefined;
|
|
319
|
+
return obj;
|
|
320
|
+
},
|
|
321
|
+
fromAminoMsg(object: ConsensusStateWithHeightAminoMsg): ConsensusStateWithHeight {
|
|
322
|
+
return ConsensusStateWithHeight.fromAmino(object.value);
|
|
323
|
+
},
|
|
324
|
+
toAminoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightAminoMsg {
|
|
325
|
+
return {
|
|
326
|
+
type: "cosmos-sdk/ConsensusStateWithHeight",
|
|
327
|
+
value: ConsensusStateWithHeight.toAmino(message)
|
|
328
|
+
};
|
|
329
|
+
},
|
|
330
|
+
fromProtoMsg(message: ConsensusStateWithHeightProtoMsg): ConsensusStateWithHeight {
|
|
331
|
+
return ConsensusStateWithHeight.decode(message.value);
|
|
332
|
+
},
|
|
333
|
+
toProto(message: ConsensusStateWithHeight): Uint8Array {
|
|
334
|
+
return ConsensusStateWithHeight.encode(message).finish();
|
|
335
|
+
},
|
|
336
|
+
toProtoMsg(message: ConsensusStateWithHeight): ConsensusStateWithHeightProtoMsg {
|
|
337
|
+
return {
|
|
338
|
+
typeUrl: "/ibc.core.client.v1.ConsensusStateWithHeight",
|
|
339
|
+
value: ConsensusStateWithHeight.encode(message).finish()
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
GlobalDecoderRegistry.register(ConsensusStateWithHeight.typeUrl, ConsensusStateWithHeight);
|
|
344
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(ConsensusStateWithHeight.aminoType, ConsensusStateWithHeight.typeUrl);
|
|
345
|
+
function createBaseClientConsensusStates(): ClientConsensusStates {
|
|
346
|
+
return {
|
|
347
|
+
clientId: "",
|
|
348
|
+
consensusStates: []
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
export const ClientConsensusStates = {
|
|
352
|
+
typeUrl: "/ibc.core.client.v1.ClientConsensusStates",
|
|
353
|
+
aminoType: "cosmos-sdk/ClientConsensusStates",
|
|
354
|
+
is(o: any): o is ClientConsensusStates {
|
|
355
|
+
return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.clientId === "string" && Array.isArray(o.consensusStates) && (!o.consensusStates.length || ConsensusStateWithHeight.is(o.consensusStates[0])));
|
|
356
|
+
},
|
|
357
|
+
isAmino(o: any): o is ClientConsensusStatesAmino {
|
|
358
|
+
return o && (o.$typeUrl === ClientConsensusStates.typeUrl || typeof o.client_id === "string" && Array.isArray(o.consensus_states) && (!o.consensus_states.length || ConsensusStateWithHeight.isAmino(o.consensus_states[0])));
|
|
359
|
+
},
|
|
360
|
+
encode(message: ClientConsensusStates, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
361
|
+
if (message.clientId !== "") {
|
|
362
|
+
writer.uint32(10).string(message.clientId);
|
|
363
|
+
}
|
|
364
|
+
for (const v of message.consensusStates) {
|
|
365
|
+
ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
366
|
+
}
|
|
367
|
+
return writer;
|
|
368
|
+
},
|
|
369
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClientConsensusStates {
|
|
370
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
371
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
372
|
+
const message = createBaseClientConsensusStates();
|
|
373
|
+
while (reader.pos < end) {
|
|
374
|
+
const tag = reader.uint32();
|
|
375
|
+
switch (tag >>> 3) {
|
|
376
|
+
case 1:
|
|
377
|
+
message.clientId = reader.string();
|
|
378
|
+
break;
|
|
379
|
+
case 2:
|
|
380
|
+
message.consensusStates.push(ConsensusStateWithHeight.decode(reader, reader.uint32()));
|
|
381
|
+
break;
|
|
382
|
+
default:
|
|
383
|
+
reader.skipType(tag & 7);
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return message;
|
|
388
|
+
},
|
|
389
|
+
fromPartial(object: DeepPartial<ClientConsensusStates>): ClientConsensusStates {
|
|
390
|
+
const message = createBaseClientConsensusStates();
|
|
391
|
+
message.clientId = object.clientId ?? "";
|
|
392
|
+
message.consensusStates = object.consensusStates?.map(e => ConsensusStateWithHeight.fromPartial(e)) || [];
|
|
393
|
+
return message;
|
|
394
|
+
},
|
|
395
|
+
fromAmino(object: ClientConsensusStatesAmino): ClientConsensusStates {
|
|
396
|
+
const message = createBaseClientConsensusStates();
|
|
397
|
+
if (object.client_id !== undefined && object.client_id !== null) {
|
|
398
|
+
message.clientId = object.client_id;
|
|
399
|
+
}
|
|
400
|
+
message.consensusStates = object.consensus_states?.map(e => ConsensusStateWithHeight.fromAmino(e)) || [];
|
|
401
|
+
return message;
|
|
402
|
+
},
|
|
403
|
+
toAmino(message: ClientConsensusStates): ClientConsensusStatesAmino {
|
|
404
|
+
const obj: any = {};
|
|
405
|
+
obj.client_id = message.clientId === "" ? undefined : message.clientId;
|
|
406
|
+
if (message.consensusStates) {
|
|
407
|
+
obj.consensus_states = message.consensusStates.map(e => e ? ConsensusStateWithHeight.toAmino(e) : undefined);
|
|
408
|
+
} else {
|
|
409
|
+
obj.consensus_states = message.consensusStates;
|
|
410
|
+
}
|
|
411
|
+
return obj;
|
|
412
|
+
},
|
|
413
|
+
fromAminoMsg(object: ClientConsensusStatesAminoMsg): ClientConsensusStates {
|
|
414
|
+
return ClientConsensusStates.fromAmino(object.value);
|
|
415
|
+
},
|
|
416
|
+
toAminoMsg(message: ClientConsensusStates): ClientConsensusStatesAminoMsg {
|
|
417
|
+
return {
|
|
418
|
+
type: "cosmos-sdk/ClientConsensusStates",
|
|
419
|
+
value: ClientConsensusStates.toAmino(message)
|
|
420
|
+
};
|
|
421
|
+
},
|
|
422
|
+
fromProtoMsg(message: ClientConsensusStatesProtoMsg): ClientConsensusStates {
|
|
423
|
+
return ClientConsensusStates.decode(message.value);
|
|
424
|
+
},
|
|
425
|
+
toProto(message: ClientConsensusStates): Uint8Array {
|
|
426
|
+
return ClientConsensusStates.encode(message).finish();
|
|
427
|
+
},
|
|
428
|
+
toProtoMsg(message: ClientConsensusStates): ClientConsensusStatesProtoMsg {
|
|
429
|
+
return {
|
|
430
|
+
typeUrl: "/ibc.core.client.v1.ClientConsensusStates",
|
|
431
|
+
value: ClientConsensusStates.encode(message).finish()
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
GlobalDecoderRegistry.register(ClientConsensusStates.typeUrl, ClientConsensusStates);
|
|
436
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(ClientConsensusStates.aminoType, ClientConsensusStates.typeUrl);
|
|
437
|
+
function createBaseHeight(): Height {
|
|
438
|
+
return {
|
|
439
|
+
revisionNumber: BigInt(0),
|
|
440
|
+
revisionHeight: BigInt(0)
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
export const Height = {
|
|
444
|
+
typeUrl: "/ibc.core.client.v1.Height",
|
|
445
|
+
aminoType: "cosmos-sdk/Height",
|
|
446
|
+
is(o: any): o is Height {
|
|
447
|
+
return o && (o.$typeUrl === Height.typeUrl || typeof o.revisionNumber === "bigint" && typeof o.revisionHeight === "bigint");
|
|
448
|
+
},
|
|
449
|
+
isAmino(o: any): o is HeightAmino {
|
|
450
|
+
return o && (o.$typeUrl === Height.typeUrl || typeof o.revision_number === "bigint" && typeof o.revision_height === "bigint");
|
|
451
|
+
},
|
|
452
|
+
encode(message: Height, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
453
|
+
if (message.revisionNumber !== BigInt(0)) {
|
|
454
|
+
writer.uint32(8).uint64(message.revisionNumber);
|
|
455
|
+
}
|
|
456
|
+
if (message.revisionHeight !== BigInt(0)) {
|
|
457
|
+
writer.uint32(16).uint64(message.revisionHeight);
|
|
458
|
+
}
|
|
459
|
+
return writer;
|
|
460
|
+
},
|
|
461
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Height {
|
|
462
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
463
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
464
|
+
const message = createBaseHeight();
|
|
465
|
+
while (reader.pos < end) {
|
|
466
|
+
const tag = reader.uint32();
|
|
467
|
+
switch (tag >>> 3) {
|
|
468
|
+
case 1:
|
|
469
|
+
message.revisionNumber = reader.uint64();
|
|
470
|
+
break;
|
|
471
|
+
case 2:
|
|
472
|
+
message.revisionHeight = reader.uint64();
|
|
473
|
+
break;
|
|
474
|
+
default:
|
|
475
|
+
reader.skipType(tag & 7);
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return message;
|
|
480
|
+
},
|
|
481
|
+
fromPartial(object: DeepPartial<Height>): Height {
|
|
482
|
+
const message = createBaseHeight();
|
|
483
|
+
message.revisionNumber = object.revisionNumber !== undefined && object.revisionNumber !== null ? BigInt(object.revisionNumber.toString()) : BigInt(0);
|
|
484
|
+
message.revisionHeight = object.revisionHeight !== undefined && object.revisionHeight !== null ? BigInt(object.revisionHeight.toString()) : BigInt(0);
|
|
485
|
+
return message;
|
|
486
|
+
},
|
|
487
|
+
fromAmino(object: HeightAmino): Height {
|
|
488
|
+
return {
|
|
489
|
+
revisionNumber: BigInt(object.revision_number || "0"),
|
|
490
|
+
revisionHeight: BigInt(object.revision_height || "0")
|
|
491
|
+
};
|
|
492
|
+
},
|
|
493
|
+
toAmino(message: Height): HeightAmino {
|
|
494
|
+
const obj: any = {};
|
|
495
|
+
obj.revision_number = message.revisionNumber ? message.revisionNumber?.toString() : "0";
|
|
496
|
+
obj.revision_height = message.revisionHeight ? message.revisionHeight?.toString() : "0";
|
|
497
|
+
return obj;
|
|
498
|
+
},
|
|
499
|
+
fromAminoMsg(object: HeightAminoMsg): Height {
|
|
500
|
+
return Height.fromAmino(object.value);
|
|
501
|
+
},
|
|
502
|
+
toAminoMsg(message: Height): HeightAminoMsg {
|
|
503
|
+
return {
|
|
504
|
+
type: "cosmos-sdk/Height",
|
|
505
|
+
value: Height.toAmino(message)
|
|
506
|
+
};
|
|
507
|
+
},
|
|
508
|
+
fromProtoMsg(message: HeightProtoMsg): Height {
|
|
509
|
+
return Height.decode(message.value);
|
|
510
|
+
},
|
|
511
|
+
toProto(message: Height): Uint8Array {
|
|
512
|
+
return Height.encode(message).finish();
|
|
513
|
+
},
|
|
514
|
+
toProtoMsg(message: Height): HeightProtoMsg {
|
|
515
|
+
return {
|
|
516
|
+
typeUrl: "/ibc.core.client.v1.Height",
|
|
517
|
+
value: Height.encode(message).finish()
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
GlobalDecoderRegistry.register(Height.typeUrl, Height);
|
|
522
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Height.aminoType, Height.typeUrl);
|
|
523
|
+
function createBaseParams(): Params {
|
|
524
|
+
return {
|
|
525
|
+
allowedClients: []
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
export const Params = {
|
|
529
|
+
typeUrl: "/ibc.core.client.v1.Params",
|
|
530
|
+
aminoType: "cosmos-sdk/Params",
|
|
531
|
+
is(o: any): o is Params {
|
|
532
|
+
return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowedClients) && (!o.allowedClients.length || typeof o.allowedClients[0] === "string"));
|
|
533
|
+
},
|
|
534
|
+
isAmino(o: any): o is ParamsAmino {
|
|
535
|
+
return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.allowed_clients) && (!o.allowed_clients.length || typeof o.allowed_clients[0] === "string"));
|
|
536
|
+
},
|
|
537
|
+
encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
|
|
538
|
+
for (const v of message.allowedClients) {
|
|
539
|
+
writer.uint32(10).string(v!);
|
|
540
|
+
}
|
|
541
|
+
return writer;
|
|
542
|
+
},
|
|
543
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Params {
|
|
544
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
545
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
546
|
+
const message = createBaseParams();
|
|
547
|
+
while (reader.pos < end) {
|
|
548
|
+
const tag = reader.uint32();
|
|
549
|
+
switch (tag >>> 3) {
|
|
550
|
+
case 1:
|
|
551
|
+
message.allowedClients.push(reader.string());
|
|
552
|
+
break;
|
|
553
|
+
default:
|
|
554
|
+
reader.skipType(tag & 7);
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return message;
|
|
559
|
+
},
|
|
560
|
+
fromPartial(object: DeepPartial<Params>): Params {
|
|
561
|
+
const message = createBaseParams();
|
|
562
|
+
message.allowedClients = object.allowedClients?.map(e => e) || [];
|
|
563
|
+
return message;
|
|
564
|
+
},
|
|
565
|
+
fromAmino(object: ParamsAmino): Params {
|
|
566
|
+
const message = createBaseParams();
|
|
567
|
+
message.allowedClients = object.allowed_clients?.map(e => e) || [];
|
|
568
|
+
return message;
|
|
569
|
+
},
|
|
570
|
+
toAmino(message: Params): ParamsAmino {
|
|
571
|
+
const obj: any = {};
|
|
572
|
+
if (message.allowedClients) {
|
|
573
|
+
obj.allowed_clients = message.allowedClients.map(e => e);
|
|
574
|
+
} else {
|
|
575
|
+
obj.allowed_clients = message.allowedClients;
|
|
576
|
+
}
|
|
577
|
+
return obj;
|
|
578
|
+
},
|
|
579
|
+
fromAminoMsg(object: ParamsAminoMsg): Params {
|
|
580
|
+
return Params.fromAmino(object.value);
|
|
581
|
+
},
|
|
582
|
+
toAminoMsg(message: Params): ParamsAminoMsg {
|
|
583
|
+
return {
|
|
584
|
+
type: "cosmos-sdk/Params",
|
|
585
|
+
value: Params.toAmino(message)
|
|
586
|
+
};
|
|
587
|
+
},
|
|
588
|
+
fromProtoMsg(message: ParamsProtoMsg): Params {
|
|
589
|
+
return Params.decode(message.value);
|
|
590
|
+
},
|
|
591
|
+
toProto(message: Params): Uint8Array {
|
|
592
|
+
return Params.encode(message).finish();
|
|
593
|
+
},
|
|
594
|
+
toProtoMsg(message: Params): ParamsProtoMsg {
|
|
595
|
+
return {
|
|
596
|
+
typeUrl: "/ibc.core.client.v1.Params",
|
|
597
|
+
value: Params.encode(message).finish()
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
GlobalDecoderRegistry.register(Params.typeUrl, Params);
|
|
602
|
+
GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { buildTx, SigningClientResolver } from "../../../../helper-func-types";
|
|
2
|
+
import { toEncoders, toConverters } from "@interchainjs/cosmos/utils";
|
|
3
|
+
import { MsgCreateClient, MsgUpdateClient, MsgUpgradeClient, MsgSubmitMisbehaviour, MsgRecoverClient, MsgIBCSoftwareUpgrade, MsgUpdateParams } from "./tx";
|
|
4
|
+
export const createCreateClient = (clientResolver?: SigningClientResolver) => buildTx<MsgCreateClient>({
|
|
5
|
+
clientResolver,
|
|
6
|
+
typeUrl: MsgCreateClient.typeUrl,
|
|
7
|
+
encoders: toEncoders(MsgCreateClient),
|
|
8
|
+
converters: toConverters(MsgCreateClient)
|
|
9
|
+
});
|
|
10
|
+
export const createUpdateClient = (clientResolver?: SigningClientResolver) => buildTx<MsgUpdateClient>({
|
|
11
|
+
clientResolver,
|
|
12
|
+
typeUrl: MsgUpdateClient.typeUrl,
|
|
13
|
+
encoders: toEncoders(MsgUpdateClient),
|
|
14
|
+
converters: toConverters(MsgUpdateClient)
|
|
15
|
+
});
|
|
16
|
+
export const createUpgradeClient = (clientResolver?: SigningClientResolver) => buildTx<MsgUpgradeClient>({
|
|
17
|
+
clientResolver,
|
|
18
|
+
typeUrl: MsgUpgradeClient.typeUrl,
|
|
19
|
+
encoders: toEncoders(MsgUpgradeClient),
|
|
20
|
+
converters: toConverters(MsgUpgradeClient)
|
|
21
|
+
});
|
|
22
|
+
export const createSubmitMisbehaviour = (clientResolver?: SigningClientResolver) => buildTx<MsgSubmitMisbehaviour>({
|
|
23
|
+
clientResolver,
|
|
24
|
+
typeUrl: MsgSubmitMisbehaviour.typeUrl,
|
|
25
|
+
encoders: toEncoders(MsgSubmitMisbehaviour),
|
|
26
|
+
converters: toConverters(MsgSubmitMisbehaviour)
|
|
27
|
+
});
|
|
28
|
+
export const createRecoverClient = (clientResolver?: SigningClientResolver) => buildTx<MsgRecoverClient>({
|
|
29
|
+
clientResolver,
|
|
30
|
+
typeUrl: MsgRecoverClient.typeUrl,
|
|
31
|
+
encoders: toEncoders(MsgRecoverClient),
|
|
32
|
+
converters: toConverters(MsgRecoverClient)
|
|
33
|
+
});
|
|
34
|
+
export const createIBCSoftwareUpgrade = (clientResolver?: SigningClientResolver) => buildTx<MsgIBCSoftwareUpgrade>({
|
|
35
|
+
clientResolver,
|
|
36
|
+
typeUrl: MsgIBCSoftwareUpgrade.typeUrl,
|
|
37
|
+
encoders: toEncoders(MsgIBCSoftwareUpgrade),
|
|
38
|
+
converters: toConverters(MsgIBCSoftwareUpgrade)
|
|
39
|
+
});
|
|
40
|
+
export const createUpdateClientParams = (clientResolver?: SigningClientResolver) => buildTx<MsgUpdateParams>({
|
|
41
|
+
clientResolver,
|
|
42
|
+
typeUrl: MsgUpdateParams.typeUrl,
|
|
43
|
+
encoders: toEncoders(MsgUpdateParams),
|
|
44
|
+
converters: toConverters(MsgUpdateParams)
|
|
45
|
+
});
|