@burningflames/inj-exchange-sdk 0.0.0-stage → 0.1.1

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.
Files changed (70) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +228 -2
  4. package/dist/ApiManager-BcwRSg4p.cjs +14 -0
  5. package/dist/ApiManager-VsZ_7GMj.js +9 -0
  6. package/dist/MsgIncreasePositionMargin-7_g04vle.d.ts +2285 -0
  7. package/dist/MsgIncreasePositionMargin-UQn6vCje.d.cts +2284 -0
  8. package/dist/bank-c5iv-fbg.cjs +480 -0
  9. package/dist/bank-xWl_W05K.js +451 -0
  10. package/dist/chain-CgjV0b1c.js +5868 -0
  11. package/dist/chain-LTb0TjXc.cjs +5903 -0
  12. package/dist/clients/chain.cjs +8 -0
  13. package/dist/clients/chain.d.cts +2 -0
  14. package/dist/clients/chain.d.ts +2 -0
  15. package/dist/clients/chain.js +1 -0
  16. package/dist/clients/indexer.cjs +14 -0
  17. package/dist/clients/indexer.d.cts +2 -0
  18. package/dist/clients/indexer.d.ts +2 -0
  19. package/dist/clients/indexer.js +1 -0
  20. package/dist/coin-8_Vn0T8-.cjs +73 -0
  21. package/dist/coin-CowdNxVV.js +68 -0
  22. package/dist/decimal-CIFXn110.js +27 -0
  23. package/dist/decimal-DJMaLHQO.cjs +38 -0
  24. package/dist/eip712-88KVCEnw.d.cts +21 -0
  25. package/dist/eip712-88KVCEnw.d.ts +21 -0
  26. package/dist/errors-CKG7zTvs.cjs +36 -0
  27. package/dist/errors-MWG_E5zA.js +25 -0
  28. package/dist/exchange-BPRx-kFI.js +4637 -0
  29. package/dist/exchange-CTLbPuA7.cjs +4966 -0
  30. package/dist/index-B3bDzB4S.d.cts +2169 -0
  31. package/dist/index-BHLUinQA.d.ts +220 -0
  32. package/dist/index-BPpDV6JA.d.cts +182 -0
  33. package/dist/index-BT_zyZW9.d.cts +220 -0
  34. package/dist/index-DcQT-y4U.d.ts +2169 -0
  35. package/dist/index-DfoLUPEo.d.ts +183 -0
  36. package/dist/index.cjs +73 -0
  37. package/dist/index.d.cts +11 -0
  38. package/dist/index.d.ts +11 -0
  39. package/dist/index.js +13 -0
  40. package/dist/indexer-D7XfYsAZ.js +21699 -0
  41. package/dist/indexer-DI7-gHOA.cjs +21770 -0
  42. package/dist/msgs-Bi5b52-R.js +11359 -0
  43. package/dist/msgs-DNyc0UtV.cjs +11442 -0
  44. package/dist/msgs.cjs +16 -0
  45. package/dist/msgs.d.cts +2 -0
  46. package/dist/msgs.d.ts +2 -0
  47. package/dist/msgs.js +1 -0
  48. package/dist/query-DGTA8Lz_.js +13375 -0
  49. package/dist/query-L1m6tP9I.cjs +13530 -0
  50. package/dist/stream-BgKRWG60.d.cts +46 -0
  51. package/dist/stream-BgKRWG60.d.ts +46 -0
  52. package/dist/stream-D8ZvUQFy.cjs +29 -0
  53. package/dist/stream-RhVNTED5.js +18 -0
  54. package/dist/tendermint-CF_W9U6D.d.ts +49 -0
  55. package/dist/tendermint-zj8c-dVM.d.cts +49 -0
  56. package/dist/tx-BRaw1C6e.d.ts +66 -0
  57. package/dist/tx-BgpasOOk.cjs +464 -0
  58. package/dist/tx-CCt0zqng.d.cts +66 -0
  59. package/dist/tx-COcDYlg3.js +411 -0
  60. package/dist/tx-DIg8nbnn.cjs +1091 -0
  61. package/dist/tx-GN0SFql2.js +1026 -0
  62. package/dist/types.cjs +38 -0
  63. package/dist/types.d.cts +13 -0
  64. package/dist/types.d.ts +13 -0
  65. package/dist/types.js +26 -0
  66. package/dist/utils.cjs +131 -0
  67. package/dist/utils.d.cts +2 -0
  68. package/dist/utils.d.ts +2 -0
  69. package/dist/utils.js +115 -0
  70. package/package.json +125 -4
@@ -0,0 +1,2284 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ /**
3
+ * Consensus captures the consensus rules for processing a block in the blockchain,
4
+ * including all blockchain data structures and the rules of the application's
5
+ * state transition machine.
6
+ */
7
+ interface Consensus {
8
+ block: number;
9
+ app: number;
10
+ }
11
+ declare const Consensus: MessageFns$19<Consensus>;
12
+ type Builtin$19 = Date | Function | Uint8Array | string | number | boolean | undefined;
13
+ type DeepPartial$19<T> = T extends Builtin$19 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$19<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$19<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$19<T[K]>; } : Partial<T>;
14
+ type KeysOfUnion$19<T> = T extends T ? keyof T : never;
15
+ type Exact$19<P, I> = P extends Builtin$19 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$19<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$19<P>>]: never; };
16
+ interface MessageFns$19<T> {
17
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
18
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
19
+ fromJSON(object: any): T;
20
+ toJSON(message: T): unknown;
21
+ create<I extends Exact$19<DeepPartial$19<T>, I>>(base?: I): T;
22
+ fromPartial<I extends Exact$19<DeepPartial$19<T>, I>>(object: I): T;
23
+ }
24
+ /** PublicKey is a ED25519 or a secp256k1 public key. */
25
+ interface PublicKey {
26
+ ed25519?: Buffer | undefined;
27
+ secp256k1?: Buffer | undefined;
28
+ bls12381?: Buffer | undefined;
29
+ }
30
+ declare const PublicKey: MessageFns$18<PublicKey>;
31
+ type Builtin$18 = Date | Function | Uint8Array | string | number | boolean | undefined;
32
+ type DeepPartial$18<T> = T extends Builtin$18 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$18<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$18<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$18<T[K]>; } : Partial<T>;
33
+ type KeysOfUnion$18<T> = T extends T ? keyof T : never;
34
+ type Exact$18<P, I> = P extends Builtin$18 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$18<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$18<P>>]: never; };
35
+ interface MessageFns$18<T> {
36
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
37
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
38
+ fromJSON(object: any): T;
39
+ toJSON(message: T): unknown;
40
+ create<I extends Exact$18<DeepPartial$18<T>, I>>(base?: I): T;
41
+ fromPartial<I extends Exact$18<DeepPartial$18<T>, I>>(object: I): T;
42
+ }
43
+ /** BlockIdFlag indicates which BlockID the signature is for */
44
+ declare enum BlockIDFlag {
45
+ /** BLOCK_ID_FLAG_UNKNOWN - Indicates an error condition */
46
+ BLOCK_ID_FLAG_UNKNOWN = 0,
47
+ /** BLOCK_ID_FLAG_ABSENT - The vote was not received */
48
+ BLOCK_ID_FLAG_ABSENT = 1,
49
+ /** BLOCK_ID_FLAG_COMMIT - Voted for the block that received the majority */
50
+ BLOCK_ID_FLAG_COMMIT = 2,
51
+ /** BLOCK_ID_FLAG_NIL - Voted for nil */
52
+ BLOCK_ID_FLAG_NIL = 3,
53
+ UNRECOGNIZED = -1
54
+ }
55
+ /** ValidatorSet defines a set of validators. */
56
+ interface ValidatorSet {
57
+ validators: Validator[];
58
+ proposer: Validator | undefined;
59
+ totalVotingPower: number;
60
+ }
61
+ /** Validator represents a node participating in the consensus protocol. */
62
+ interface Validator {
63
+ address: Buffer;
64
+ /** @deprecated */
65
+ pubKey: PublicKey | undefined;
66
+ votingPower: number;
67
+ proposerPriority: number;
68
+ pubKeyBytes: Buffer;
69
+ pubKeyType: string;
70
+ }
71
+ declare const ValidatorSet: MessageFns$17<ValidatorSet>;
72
+ declare const Validator: MessageFns$17<Validator>;
73
+ type Builtin$17 = Date | Function | Uint8Array | string | number | boolean | undefined;
74
+ type DeepPartial$17<T> = T extends Builtin$17 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$17<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$17<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$17<T[K]>; } : Partial<T>;
75
+ type KeysOfUnion$17<T> = T extends T ? keyof T : never;
76
+ type Exact$17<P, I> = P extends Builtin$17 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$17<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$17<P>>]: never; };
77
+ interface MessageFns$17<T> {
78
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
79
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
80
+ fromJSON(object: any): T;
81
+ toJSON(message: T): unknown;
82
+ create<I extends Exact$17<DeepPartial$17<T>, I>>(base?: I): T;
83
+ fromPartial<I extends Exact$17<DeepPartial$17<T>, I>>(object: I): T;
84
+ }
85
+ /** SignedMsgType is a type of signed message in the consensus. */
86
+ declare enum SignedMsgType {
87
+ /** SIGNED_MSG_TYPE_UNKNOWN - Unknown */
88
+ SIGNED_MSG_TYPE_UNKNOWN = 0,
89
+ /** SIGNED_MSG_TYPE_PREVOTE - Prevote */
90
+ SIGNED_MSG_TYPE_PREVOTE = 1,
91
+ /** SIGNED_MSG_TYPE_PRECOMMIT - Precommit */
92
+ SIGNED_MSG_TYPE_PRECOMMIT = 2,
93
+ /** SIGNED_MSG_TYPE_PROPOSAL - Proposal */
94
+ SIGNED_MSG_TYPE_PROPOSAL = 32,
95
+ UNRECOGNIZED = -1
96
+ }
97
+ /** Header of the parts set for a block. */
98
+ interface PartSetHeader {
99
+ total: number;
100
+ hash: Buffer;
101
+ }
102
+ /** BlockID defines the unique ID of a block as its hash and its `PartSetHeader`. */
103
+ interface BlockID {
104
+ hash: Buffer;
105
+ partSetHeader: PartSetHeader | undefined;
106
+ }
107
+ /** Header defines the structure of a block header. */
108
+ interface Header {
109
+ /** basic block info */
110
+ version: Consensus | undefined;
111
+ chainId: string;
112
+ height: number;
113
+ time: Date | undefined;
114
+ /** prev block info */
115
+ lastBlockId: BlockID | undefined;
116
+ /** hashes of block data */
117
+ lastCommitHash: Buffer;
118
+ /** transactions */
119
+ dataHash: Buffer;
120
+ /** hashes from the app output from the prev block */
121
+ validatorsHash: Buffer;
122
+ /** validators for the next block */
123
+ nextValidatorsHash: Buffer;
124
+ /** consensus params for current block */
125
+ consensusHash: Buffer;
126
+ /** state after txs from the previous block */
127
+ appHash: Buffer;
128
+ /** root hash of all results from the txs from the previous block */
129
+ lastResultsHash: Buffer;
130
+ /** consensus info */
131
+ evidenceHash: Buffer;
132
+ /** original proposer of the block */
133
+ proposerAddress: Buffer;
134
+ }
135
+ /** Data contains the set of transactions included in the block */
136
+ interface Data {
137
+ /**
138
+ * Txs that will be applied by state @ block.Height+1.
139
+ * NOTE: not all txs here are valid. We're just agreeing on the order first.
140
+ * This means that block.AppHash does not include these txs.
141
+ */
142
+ txs: Buffer[];
143
+ }
144
+ /**
145
+ * Vote represents a prevote or precommit vote from validators for
146
+ * consensus.
147
+ */
148
+ interface Vote {
149
+ type: SignedMsgType;
150
+ height: number;
151
+ round: number;
152
+ /** zero if vote is nil. */
153
+ blockId: BlockID | undefined;
154
+ timestamp: Date | undefined;
155
+ validatorAddress: Buffer;
156
+ validatorIndex: number;
157
+ /**
158
+ * Vote signature by the validator if they participated in consensus for the
159
+ * associated block.
160
+ */
161
+ signature: Buffer;
162
+ /**
163
+ * Vote extension provided by the application. Only valid for precommit
164
+ * messages.
165
+ */
166
+ extension: Buffer;
167
+ /**
168
+ * Vote extension signature by the validator if they participated in
169
+ * consensus for the associated block.
170
+ * Only valid for precommit messages.
171
+ */
172
+ extensionSignature: Buffer;
173
+ }
174
+ /** Commit contains the evidence that a block was committed by a set of validators. */
175
+ interface Commit {
176
+ height: number;
177
+ round: number;
178
+ blockId: BlockID | undefined;
179
+ signatures: CommitSig[];
180
+ }
181
+ /** CommitSig is a part of the Vote included in a Commit. */
182
+ interface CommitSig {
183
+ blockIdFlag: BlockIDFlag;
184
+ validatorAddress: Buffer;
185
+ timestamp: Date | undefined;
186
+ signature: Buffer;
187
+ }
188
+ /** SignedHeader contains a Header(H) and Commit(H+1) with signatures of validators who signed it. */
189
+ interface SignedHeader {
190
+ header: Header | undefined;
191
+ commit: Commit | undefined;
192
+ }
193
+ /** LightBlock is a combination of SignedHeader and ValidatorSet. It is used by light clients. */
194
+ interface LightBlock {
195
+ signedHeader: SignedHeader | undefined;
196
+ validatorSet: ValidatorSet | undefined;
197
+ }
198
+ declare const PartSetHeader: MessageFns$16<PartSetHeader>;
199
+ declare const BlockID: MessageFns$16<BlockID>;
200
+ declare const Header: MessageFns$16<Header>;
201
+ declare const Data: MessageFns$16<Data>;
202
+ declare const Vote: MessageFns$16<Vote>;
203
+ declare const Commit: MessageFns$16<Commit>;
204
+ declare const CommitSig: MessageFns$16<CommitSig>;
205
+ declare const SignedHeader: MessageFns$16<SignedHeader>;
206
+ declare const LightBlock: MessageFns$16<LightBlock>;
207
+ type Builtin$16 = Date | Function | Uint8Array | string | number | boolean | undefined;
208
+ type DeepPartial$16<T> = T extends Builtin$16 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$16<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$16<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$16<T[K]>; } : Partial<T>;
209
+ type KeysOfUnion$16<T> = T extends T ? keyof T : never;
210
+ type Exact$16<P, I> = P extends Builtin$16 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$16<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$16<P>>]: never; };
211
+ interface MessageFns$16<T> {
212
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
213
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
214
+ fromJSON(object: any): T;
215
+ toJSON(message: T): unknown;
216
+ create<I extends Exact$16<DeepPartial$16<T>, I>>(base?: I): T;
217
+ fromPartial<I extends Exact$16<DeepPartial$16<T>, I>>(object: I): T;
218
+ }
219
+ /** Evidence is a generic type for wrapping evidence of misbehavior by a validator. */
220
+ interface Evidence {
221
+ duplicateVoteEvidence?: DuplicateVoteEvidence | undefined;
222
+ lightClientAttackEvidence?: LightClientAttackEvidence | undefined;
223
+ }
224
+ /** DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. */
225
+ interface DuplicateVoteEvidence {
226
+ voteA: Vote | undefined;
227
+ voteB: Vote | undefined;
228
+ totalVotingPower: number;
229
+ validatorPower: number;
230
+ timestamp: Date | undefined;
231
+ }
232
+ /** LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. */
233
+ interface LightClientAttackEvidence {
234
+ conflictingBlock: LightBlock | undefined;
235
+ commonHeight: number;
236
+ byzantineValidators: Validator[];
237
+ totalVotingPower: number;
238
+ timestamp: Date | undefined;
239
+ }
240
+ /** EvidenceList is a list of evidence. */
241
+ interface EvidenceList {
242
+ evidence: Evidence[];
243
+ }
244
+ declare const Evidence: MessageFns$15<Evidence>;
245
+ declare const DuplicateVoteEvidence: MessageFns$15<DuplicateVoteEvidence>;
246
+ declare const LightClientAttackEvidence: MessageFns$15<LightClientAttackEvidence>;
247
+ declare const EvidenceList: MessageFns$15<EvidenceList>;
248
+ type Builtin$15 = Date | Function | Uint8Array | string | number | boolean | undefined;
249
+ type DeepPartial$15<T> = T extends Builtin$15 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$15<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$15<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$15<T[K]>; } : Partial<T>;
250
+ type KeysOfUnion$15<T> = T extends T ? keyof T : never;
251
+ type Exact$15<P, I> = P extends Builtin$15 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$15<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$15<P>>]: never; };
252
+ interface MessageFns$15<T> {
253
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
254
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
255
+ fromJSON(object: any): T;
256
+ toJSON(message: T): unknown;
257
+ create<I extends Exact$15<DeepPartial$15<T>, I>>(base?: I): T;
258
+ fromPartial<I extends Exact$15<DeepPartial$15<T>, I>>(object: I): T;
259
+ }
260
+ /** Block defines the structure of a block in the CometBFT blockchain. */
261
+ interface Block {
262
+ header: Header | undefined;
263
+ data: Data | undefined;
264
+ evidence: EvidenceList | undefined;
265
+ lastCommit: Commit | undefined;
266
+ }
267
+ declare const Block: MessageFns$14<Block>;
268
+ type Builtin$14 = Date | Function | Uint8Array | string | number | boolean | undefined;
269
+ type DeepPartial$14<T> = T extends Builtin$14 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$14<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$14<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$14<T[K]>; } : Partial<T>;
270
+ type KeysOfUnion$14<T> = T extends T ? keyof T : never;
271
+ type Exact$14<P, I> = P extends Builtin$14 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$14<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$14<P>>]: never; };
272
+ interface MessageFns$14<T> {
273
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
274
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
275
+ fromJSON(object: any): T;
276
+ toJSON(message: T): unknown;
277
+ create<I extends Exact$14<DeepPartial$14<T>, I>>(base?: I): T;
278
+ fromPartial<I extends Exact$14<DeepPartial$14<T>, I>>(object: I): T;
279
+ }
280
+ /**
281
+ * Event allows application developers to attach additional information to
282
+ * ResponseFinalizeBlock and ResponseCheckTx.
283
+ * Up to 0.37, this could also be used in ResponseBeginBlock, ResponseEndBlock,
284
+ * and ResponseDeliverTx.
285
+ * Later, transactions may be queried using these events.
286
+ */
287
+ interface Event {
288
+ type: string;
289
+ attributes: EventAttribute[];
290
+ }
291
+ /** EventAttribute is a single key-value pair, associated with an event. */
292
+ interface EventAttribute {
293
+ key: string;
294
+ value: string;
295
+ /** nondeterministic */
296
+ index: boolean;
297
+ }
298
+ declare const Event: MessageFns$13<Event>;
299
+ declare const EventAttribute: MessageFns$13<EventAttribute>;
300
+ type Builtin$13 = Date | Function | Uint8Array | string | number | boolean | undefined;
301
+ type DeepPartial$13<T> = T extends Builtin$13 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$13<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$13<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$13<T[K]>; } : Partial<T>;
302
+ type KeysOfUnion$13<T> = T extends T ? keyof T : never;
303
+ type Exact$13<P, I> = P extends Builtin$13 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$13<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$13<P>>]: never; };
304
+ interface MessageFns$13<T> {
305
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
306
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
307
+ fromJSON(object: any): T;
308
+ toJSON(message: T): unknown;
309
+ create<I extends Exact$13<DeepPartial$13<T>, I>>(base?: I): T;
310
+ fromPartial<I extends Exact$13<DeepPartial$13<T>, I>>(object: I): T;
311
+ }
312
+ /**
313
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
314
+ * URL that describes the type of the serialized message.
315
+ *
316
+ * In its binary encoding, an `Any` is an ordinary message; but in other wire
317
+ * forms like JSON, it has a special encoding. The format of the type URL is
318
+ * described on the `type_url` field.
319
+ *
320
+ * Protobuf APIs provide utilities to interact with `Any` values:
321
+ *
322
+ * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
323
+ * around it.
324
+ * - An 'unpack' operation reads the content of an `Any` message, either into an
325
+ * existing message or a new one. Unpack operations must check the type of the
326
+ * value they unpack against the declared `type_url`.
327
+ * - An 'is' operation decides whether an `Any` contains a message of the given
328
+ * type, i.e. whether it can 'unpack' that type.
329
+ *
330
+ * The JSON format representation of an `Any` follows one of these cases:
331
+ *
332
+ * - For types without special-cased JSON encodings, the JSON format
333
+ * representation of the `Any` is the same as that of the message, with an
334
+ * additional `@type` field which contains the type URL.
335
+ * - For types with special-cased JSON encodings (typically called 'well-known'
336
+ * types, listed in https://protobuf.dev/programming-guides/json/#any), the
337
+ * JSON format representation has a key `@type` which contains the type URL
338
+ * and a key `value` which contains the JSON-serialized value.
339
+ *
340
+ * The text format representation of an `Any` is like a message with one field
341
+ * whose name is the type URL in brackets. For example, an `Any` containing a
342
+ * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
343
+ */
344
+ interface Any {
345
+ /**
346
+ * Identifies the type of the serialized Protobuf message with a URI reference
347
+ * consisting of a prefix ending in a slash and the fully-qualified type name.
348
+ *
349
+ * Example: type.googleapis.com/google.protobuf.StringValue
350
+ *
351
+ * This string must contain at least one `/` character, and the content after
352
+ * the last `/` must be the fully-qualified name of the type in canonical
353
+ * form, without a leading dot. Do not write a scheme on these URI references
354
+ * so that clients do not attempt to contact them.
355
+ *
356
+ * The prefix is arbitrary and Protobuf implementations are expected to
357
+ * simply strip off everything up to and including the last `/` to identify
358
+ * the type. `type.googleapis.com/` is a common default prefix that some
359
+ * legacy implementations require. This prefix does not indicate the origin of
360
+ * the type, and URIs containing it are not expected to respond to any
361
+ * requests.
362
+ *
363
+ * All type URL strings must be legal URI references with the additional
364
+ * restriction (for the text format) that the content of the reference
365
+ * must consist only of alphanumeric characters, percent-encoded escapes, and
366
+ * characters in the following set (not including the outer backticks):
367
+ * `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
368
+ * should not unescape them to prevent confusion with existing parsers. For
369
+ * example, `type.googleapis.com%2FFoo` should be rejected.
370
+ *
371
+ * In the original design of `Any`, the possibility of launching a type
372
+ * resolution service at these type URLs was considered but Protobuf never
373
+ * implemented one and considers contacting these URLs to be problematic and
374
+ * a potential security issue. Do not attempt to contact type URLs.
375
+ */
376
+ typeUrl: string;
377
+ /** Holds a Protobuf serialization of the type described by type_url. */
378
+ value: Buffer;
379
+ }
380
+ declare const Any: MessageFns$12<Any>;
381
+ type Builtin$12 = Date | Function | Uint8Array | string | number | boolean | undefined;
382
+ type DeepPartial$12<T> = T extends Builtin$12 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$12<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$12<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$12<T[K]>; } : Partial<T>;
383
+ type KeysOfUnion$12<T> = T extends T ? keyof T : never;
384
+ type Exact$12<P, I> = P extends Builtin$12 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$12<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$12<P>>]: never; };
385
+ interface MessageFns$12<T> {
386
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
387
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
388
+ fromJSON(object: any): T;
389
+ toJSON(message: T): unknown;
390
+ create<I extends Exact$12<DeepPartial$12<T>, I>>(base?: I): T;
391
+ fromPartial<I extends Exact$12<DeepPartial$12<T>, I>>(object: I): T;
392
+ }
393
+ /**
394
+ * TxResponse defines a structure containing relevant tx data and metadata. The
395
+ * tags are stringified and the log is JSON decoded.
396
+ */
397
+ interface TxResponse {
398
+ /** The block height */
399
+ height: number;
400
+ /** The transaction hash. */
401
+ txhash: string;
402
+ /** Namespace for the Code */
403
+ codespace: string;
404
+ /** Response code. */
405
+ code: number;
406
+ /** Result bytes, if any. */
407
+ data: string;
408
+ /**
409
+ * The output of the application's logger (raw string). May be
410
+ * non-deterministic.
411
+ */
412
+ rawLog: string;
413
+ /** The output of the application's logger (typed). May be non-deterministic. */
414
+ logs: ABCIMessageLog[];
415
+ /** Additional information. May be non-deterministic. */
416
+ info: string;
417
+ /** Amount of gas requested for transaction. */
418
+ gasWanted: number;
419
+ /** Amount of gas consumed by transaction. */
420
+ gasUsed: number;
421
+ /** The request transaction bytes. */
422
+ tx: Any | undefined;
423
+ /**
424
+ * Time of the previous block. For heights > 1, it's the weighted median of
425
+ * the timestamps of the valid votes in the block.LastCommit. For height == 1,
426
+ * it's genesis time.
427
+ */
428
+ timestamp: string;
429
+ /**
430
+ * Events defines all the events emitted by processing a transaction. Note,
431
+ * these events include those emitted by processing all the messages and those
432
+ * emitted from the ante. Whereas Logs contains the events, with
433
+ * additional metadata, emitted only by processing the messages.
434
+ *
435
+ * Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
436
+ */
437
+ events: Event[];
438
+ }
439
+ /** ABCIMessageLog defines a structure containing an indexed tx ABCI message log. */
440
+ interface ABCIMessageLog {
441
+ msgIndex: number;
442
+ log: string;
443
+ /**
444
+ * Events contains a slice of Event objects that were emitted during some
445
+ * execution.
446
+ */
447
+ events: StringEvent[];
448
+ }
449
+ /**
450
+ * StringEvent defines en Event object wrapper where all the attributes
451
+ * contain key/value pairs that are strings instead of raw bytes.
452
+ */
453
+ interface StringEvent {
454
+ type: string;
455
+ attributes: Attribute[];
456
+ }
457
+ /**
458
+ * Attribute defines an attribute wrapper where the key and value are
459
+ * strings instead of raw bytes.
460
+ */
461
+ interface Attribute {
462
+ key: string;
463
+ value: string;
464
+ }
465
+ /** GasInfo defines tx execution gas context. */
466
+ interface GasInfo {
467
+ /** GasWanted is the maximum units of work we allow this tx to perform. */
468
+ gasWanted: number;
469
+ /** GasUsed is the amount of gas actually consumed. */
470
+ gasUsed: number;
471
+ }
472
+ /** Result is the union of ResponseFormat and ResponseCheckTx. */
473
+ interface Result {
474
+ /**
475
+ * Data is any data returned from message or handler execution. It MUST be
476
+ * length prefixed in order to separate data from multiple message executions.
477
+ * Deprecated. This field is still populated, but prefer msg_response instead
478
+ * because it also contains the Msg response typeURL.
479
+ *
480
+ * @deprecated
481
+ */
482
+ data: Buffer;
483
+ /** Log contains the log information from message or handler execution. */
484
+ log: string;
485
+ /**
486
+ * Events contains a slice of Event objects that were emitted during message
487
+ * or handler execution.
488
+ */
489
+ events: Event[];
490
+ /**
491
+ * msg_responses contains the Msg handler responses type packed in Anys.
492
+ *
493
+ * Since: cosmos-sdk 0.46
494
+ */
495
+ msgResponses: Any[];
496
+ }
497
+ declare const TxResponse: MessageFns$11<TxResponse>;
498
+ declare const ABCIMessageLog: MessageFns$11<ABCIMessageLog>;
499
+ declare const StringEvent: MessageFns$11<StringEvent>;
500
+ declare const Attribute: MessageFns$11<Attribute>;
501
+ declare const GasInfo: MessageFns$11<GasInfo>;
502
+ declare const Result: MessageFns$11<Result>;
503
+ type Builtin$11 = Date | Function | Uint8Array | string | number | boolean | undefined;
504
+ type DeepPartial$11<T> = T extends Builtin$11 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$11<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$11<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$11<T[K]>; } : Partial<T>;
505
+ type KeysOfUnion$11<T> = T extends T ? keyof T : never;
506
+ type Exact$11<P, I> = P extends Builtin$11 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$11<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$11<P>>]: never; };
507
+ interface MessageFns$11<T> {
508
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
509
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
510
+ fromJSON(object: any): T;
511
+ toJSON(message: T): unknown;
512
+ create<I extends Exact$11<DeepPartial$11<T>, I>>(base?: I): T;
513
+ fromPartial<I extends Exact$11<DeepPartial$11<T>, I>>(object: I): T;
514
+ }
515
+ /**
516
+ * PageRequest is to be embedded in gRPC request messages for efficient
517
+ * pagination. Ex:
518
+ *
519
+ * message SomeRequest {
520
+ * Foo some_parameter = 1;
521
+ * PageRequest pagination = 2;
522
+ * }
523
+ */
524
+ interface PageRequest {
525
+ /**
526
+ * key is a value returned in PageResponse.next_key to begin
527
+ * querying the next page most efficiently. Only one of offset or key
528
+ * should be set.
529
+ */
530
+ key: Buffer;
531
+ /**
532
+ * offset is a numeric offset that can be used when key is unavailable.
533
+ * It is less efficient than using key. Only one of offset or key should
534
+ * be set.
535
+ */
536
+ offset: number;
537
+ /**
538
+ * limit is the total number of results to be returned in the result page.
539
+ * If left empty it will default to a value to be set by each app.
540
+ */
541
+ limit: number;
542
+ /**
543
+ * count_total is set to true to indicate that the result set should include
544
+ * a count of the total number of items available for pagination in UIs.
545
+ * count_total is only respected when offset is used. It is ignored when key
546
+ * is set.
547
+ */
548
+ countTotal: boolean;
549
+ /**
550
+ * reverse is set to true if results are to be returned in the descending order.
551
+ *
552
+ * Since: cosmos-sdk 0.43
553
+ */
554
+ reverse: boolean;
555
+ }
556
+ /**
557
+ * PageResponse is to be embedded in gRPC response messages where the
558
+ * corresponding request message has used PageRequest.
559
+ *
560
+ * message SomeResponse {
561
+ * repeated Bar results = 1;
562
+ * PageResponse page = 2;
563
+ * }
564
+ */
565
+ interface PageResponse {
566
+ /**
567
+ * next_key is the key to be passed to PageRequest.key to
568
+ * query the next page most efficiently. It will be empty if
569
+ * there are no more results.
570
+ */
571
+ nextKey: Buffer;
572
+ /**
573
+ * total is total number of results available if PageRequest.count_total
574
+ * was set, its value is undefined otherwise
575
+ */
576
+ total: number;
577
+ }
578
+ declare const PageRequest: MessageFns$10<PageRequest>;
579
+ declare const PageResponse: MessageFns$10<PageResponse>;
580
+ type Builtin$10 = Date | Function | Uint8Array | string | number | boolean | undefined;
581
+ type DeepPartial$10<T> = T extends Builtin$10 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$10<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$10<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$10<T[K]>; } : Partial<T>;
582
+ type KeysOfUnion$10<T> = T extends T ? keyof T : never;
583
+ type Exact$10<P, I> = P extends Builtin$10 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$10<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$10<P>>]: never; };
584
+ interface MessageFns$10<T> {
585
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
586
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
587
+ fromJSON(object: any): T;
588
+ toJSON(message: T): unknown;
589
+ create<I extends Exact$10<DeepPartial$10<T>, I>>(base?: I): T;
590
+ fromPartial<I extends Exact$10<DeepPartial$10<T>, I>>(object: I): T;
591
+ }
592
+ /**
593
+ * Coin defines a token with a denomination and an amount.
594
+ *
595
+ * NOTE: The amount field is an Int which implements the custom method
596
+ * signatures required by gogoproto.
597
+ */
598
+ interface Coin {
599
+ denom: string;
600
+ amount: string;
601
+ }
602
+ declare const Coin: MessageFns$9<Coin>;
603
+ type Builtin$9 = Date | Function | Uint8Array | string | number | boolean | undefined;
604
+ type DeepPartial$9<T> = T extends Builtin$9 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$9<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$9<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$9<T[K]>; } : Partial<T>;
605
+ type KeysOfUnion$9<T> = T extends T ? keyof T : never;
606
+ type Exact$9<P, I> = P extends Builtin$9 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$9<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$9<P>>]: never; };
607
+ interface MessageFns$9<T> {
608
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
609
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
610
+ fromJSON(object: any): T;
611
+ toJSON(message: T): unknown;
612
+ create<I extends Exact$9<DeepPartial$9<T>, I>>(base?: I): T;
613
+ fromPartial<I extends Exact$9<DeepPartial$9<T>, I>>(object: I): T;
614
+ }
615
+ /**
616
+ * CompactBitArray is an implementation of a space efficient bit array.
617
+ * This is used to ensure that the encoded data takes up a minimal amount of
618
+ * space after proto encoding.
619
+ * This is not thread safe, and is not intended for concurrent usage.
620
+ */
621
+ interface CompactBitArray {
622
+ extraBitsStored: number;
623
+ elems: Buffer;
624
+ }
625
+ declare const CompactBitArray: MessageFns$8<CompactBitArray>;
626
+ type Builtin$8 = Date | Function | Uint8Array | string | number | boolean | undefined;
627
+ type DeepPartial$8<T> = T extends Builtin$8 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$8<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$8<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$8<T[K]>; } : Partial<T>;
628
+ type KeysOfUnion$8<T> = T extends T ? keyof T : never;
629
+ type Exact$8<P, I> = P extends Builtin$8 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$8<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$8<P>>]: never; };
630
+ interface MessageFns$8<T> {
631
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
632
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
633
+ fromJSON(object: any): T;
634
+ toJSON(message: T): unknown;
635
+ create<I extends Exact$8<DeepPartial$8<T>, I>>(base?: I): T;
636
+ fromPartial<I extends Exact$8<DeepPartial$8<T>, I>>(object: I): T;
637
+ }
638
+ /**
639
+ * SignMode represents a signing mode with its own security guarantees.
640
+ *
641
+ * This enum should be considered a registry of all known sign modes
642
+ * in the Cosmos ecosystem. Apps are not expected to support all known
643
+ * sign modes. Apps that would like to support custom sign modes are
644
+ * encouraged to open a small PR against this file to add a new case
645
+ * to this SignMode enum describing their sign mode so that different
646
+ * apps have a consistent version of this enum.
647
+ */
648
+ declare enum SignMode {
649
+ /**
650
+ * SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
651
+ * rejected.
652
+ */
653
+ SIGN_MODE_UNSPECIFIED = 0,
654
+ /**
655
+ * SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
656
+ * verified with raw bytes from Tx.
657
+ */
658
+ SIGN_MODE_DIRECT = 1,
659
+ /**
660
+ * SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
661
+ * human-readable textual representation on top of the binary representation
662
+ * from SIGN_MODE_DIRECT.
663
+ *
664
+ * Since: cosmos-sdk 0.50
665
+ */
666
+ SIGN_MODE_TEXTUAL = 2,
667
+ /**
668
+ * SIGN_MODE_DIRECT_AUX - SIGN_MODE_DIRECT_AUX specifies a signing mode which uses
669
+ * SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not
670
+ * require signers signing over other signers' `signer_info`.
671
+ *
672
+ * Since: cosmos-sdk 0.46
673
+ */
674
+ SIGN_MODE_DIRECT_AUX = 3,
675
+ /**
676
+ * SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
677
+ * Amino JSON and will be removed in the future.
678
+ */
679
+ SIGN_MODE_LEGACY_AMINO_JSON = 127,
680
+ /**
681
+ * SIGN_MODE_EIP712_V2 - Injective EIP712 support for any cosmos messages which uses proto-json encoded string for messages
682
+ * Signature verification is implemented in injective core
683
+ */
684
+ SIGN_MODE_EIP712_V2 = 128,
685
+ /**
686
+ * SIGN_MODE_EIP_191 - SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos
687
+ * SDK. Ref: https://eips.ethereum.org/EIPS/eip-191
688
+ *
689
+ * Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,
690
+ * but is not implemented on the SDK by default. To enable EIP-191, you need
691
+ * to pass a custom `TxConfig` that has an implementation of
692
+ * `SignModeHandler` for EIP-191. The SDK may decide to fully support
693
+ * EIP-191 in the future.
694
+ *
695
+ * Since: cosmos-sdk 0.45.2
696
+ */
697
+ SIGN_MODE_EIP_191 = 191,
698
+ UNRECOGNIZED = -1
699
+ }
700
+ /** Tx is the standard type used for broadcasting transactions. */
701
+ interface Tx {
702
+ /** body is the processable content of the transaction */
703
+ body: TxBody | undefined;
704
+ /**
705
+ * auth_info is the authorization related content of the transaction,
706
+ * specifically signers, signer modes and fee
707
+ */
708
+ authInfo: AuthInfo | undefined;
709
+ /**
710
+ * signatures is a list of signatures that matches the length and order of
711
+ * AuthInfo's signer_infos to allow connecting signature meta information like
712
+ * public key and signing mode by position.
713
+ */
714
+ signatures: Buffer[];
715
+ }
716
+ /** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */
717
+ interface SignDoc {
718
+ /**
719
+ * body_bytes is protobuf serialization of a TxBody that matches the
720
+ * representation in TxRaw.
721
+ */
722
+ bodyBytes: Buffer;
723
+ /**
724
+ * auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
725
+ * representation in TxRaw.
726
+ */
727
+ authInfoBytes: Buffer;
728
+ /**
729
+ * chain_id is the unique identifier of the chain this transaction targets.
730
+ * It prevents signed transactions from being used on another chain by an
731
+ * attacker
732
+ */
733
+ chainId: string;
734
+ /** account_number is the account number of the account in state */
735
+ accountNumber: number;
736
+ }
737
+ /** TxBody is the body of a transaction that all signers sign over. */
738
+ interface TxBody {
739
+ /**
740
+ * messages is a list of messages to be executed. The required signers of
741
+ * those messages define the number and order of elements in AuthInfo's
742
+ * signer_infos and Tx's signatures. Each required signer address is added to
743
+ * the list only the first time it occurs.
744
+ * By convention, the first required signer (usually from the first message)
745
+ * is referred to as the primary signer and pays the fee for the whole
746
+ * transaction.
747
+ */
748
+ messages: Any[];
749
+ /**
750
+ * memo is any arbitrary note/comment to be added to the transaction.
751
+ * WARNING: in clients, any publicly exposed text should not be called memo,
752
+ * but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
753
+ */
754
+ memo: string;
755
+ /**
756
+ * timeout is the block height after which this transaction will not
757
+ * be processed by the chain
758
+ */
759
+ timeoutHeight: number;
760
+ /**
761
+ * extension_options are arbitrary options that can be added by chains
762
+ * when the default options are not sufficient. If any of these are present
763
+ * and can't be handled, the transaction will be rejected
764
+ */
765
+ extensionOptions: Any[];
766
+ /**
767
+ * extension_options are arbitrary options that can be added by chains
768
+ * when the default options are not sufficient. If any of these are present
769
+ * and can't be handled, they will be ignored
770
+ */
771
+ nonCriticalExtensionOptions: Any[];
772
+ }
773
+ /**
774
+ * AuthInfo describes the fee and signer modes that are used to sign a
775
+ * transaction.
776
+ */
777
+ interface AuthInfo {
778
+ /**
779
+ * signer_infos defines the signing modes for the required signers. The number
780
+ * and order of elements must match the required signers from TxBody's
781
+ * messages. The first element is the primary signer and the one which pays
782
+ * the fee.
783
+ */
784
+ signerInfos: SignerInfo[];
785
+ /**
786
+ * Fee is the fee and gas limit for the transaction. The first signer is the
787
+ * primary signer and the one which pays the fee. The fee can be calculated
788
+ * based on the cost of evaluating the body and doing signature verification
789
+ * of the signers. This can be estimated via simulation.
790
+ */
791
+ fee: Fee | undefined;
792
+ /**
793
+ * Tip is the optional tip used for transactions fees paid in another denom.
794
+ *
795
+ * This field is ignored if the chain didn't enable tips, i.e. didn't add the
796
+ * `TipDecorator` in its posthandler.
797
+ *
798
+ * Since: cosmos-sdk 0.46
799
+ *
800
+ * @deprecated
801
+ */
802
+ tip: Tip | undefined;
803
+ }
804
+ /**
805
+ * SignerInfo describes the public key and signing mode of a single top-level
806
+ * signer.
807
+ */
808
+ interface SignerInfo {
809
+ /**
810
+ * public_key is the public key of the signer. It is optional for accounts
811
+ * that already exist in state. If unset, the verifier can use the required \
812
+ * signer address for this position and lookup the public key.
813
+ */
814
+ publicKey: Any | undefined;
815
+ /**
816
+ * mode_info describes the signing mode of the signer and is a nested
817
+ * structure to support nested multisig pubkey's
818
+ */
819
+ modeInfo: ModeInfo | undefined;
820
+ /**
821
+ * sequence is the sequence of the account, which describes the
822
+ * number of committed transactions signed by a given address. It is used to
823
+ * prevent replay attacks.
824
+ */
825
+ sequence: number;
826
+ }
827
+ /** ModeInfo describes the signing mode of a single or nested multisig signer. */
828
+ interface ModeInfo {
829
+ /** single represents a single signer */
830
+ single?: ModeInfo_Single | undefined;
831
+ /** multi represents a nested multisig signer */
832
+ multi?: ModeInfo_Multi | undefined;
833
+ }
834
+ /**
835
+ * Single is the mode info for a single signer. It is structured as a message
836
+ * to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
837
+ * future
838
+ */
839
+ interface ModeInfo_Single {
840
+ /** mode is the signing mode of the single signer */
841
+ mode: SignMode;
842
+ }
843
+ /** Multi is the mode info for a multisig public key */
844
+ interface ModeInfo_Multi {
845
+ /** bitarray specifies which keys within the multisig are signing */
846
+ bitarray: CompactBitArray | undefined;
847
+ /**
848
+ * mode_infos is the corresponding modes of the signers of the multisig
849
+ * which could include nested multisig public keys
850
+ */
851
+ modeInfos: ModeInfo[];
852
+ }
853
+ /**
854
+ * Fee includes the amount of coins paid in fees and the maximum
855
+ * gas to be used by the transaction. The ratio yields an effective "gasprice",
856
+ * which must be above some miminum to be accepted into the mempool.
857
+ */
858
+ interface Fee {
859
+ /** amount is the amount of coins to be paid as a fee */
860
+ amount: Coin[];
861
+ /**
862
+ * gas_limit is the maximum gas that can be used in transaction processing
863
+ * before an out of gas error occurs
864
+ */
865
+ gasLimit: number;
866
+ /**
867
+ * if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
868
+ * the payer must be a tx signer (and thus have signed this field in AuthInfo).
869
+ * setting this field does *not* change the ordering of required signers for the transaction.
870
+ */
871
+ payer: string;
872
+ /**
873
+ * if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
874
+ * to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
875
+ * not support fee grants, this will fail
876
+ */
877
+ granter: string;
878
+ }
879
+ /**
880
+ * Tip is the tip used for meta-transactions.
881
+ *
882
+ * Since: cosmos-sdk 0.46
883
+ *
884
+ * @deprecated
885
+ */
886
+ interface Tip {
887
+ /** amount is the amount of the tip */
888
+ amount: Coin[];
889
+ /** tipper is the address of the account paying for the tip */
890
+ tipper: string;
891
+ }
892
+ declare const Tx: MessageFns$7<Tx>;
893
+ declare const SignDoc: MessageFns$7<SignDoc>;
894
+ declare const TxBody: MessageFns$7<TxBody>;
895
+ declare const AuthInfo: MessageFns$7<AuthInfo>;
896
+ declare const SignerInfo: MessageFns$7<SignerInfo>;
897
+ declare const ModeInfo: MessageFns$7<ModeInfo>;
898
+ declare const ModeInfo_Single: MessageFns$7<ModeInfo_Single>;
899
+ declare const ModeInfo_Multi: MessageFns$7<ModeInfo_Multi>;
900
+ declare const Fee: MessageFns$7<Fee>;
901
+ declare const Tip: MessageFns$7<Tip>;
902
+ type Builtin$7 = Date | Function | Uint8Array | string | number | boolean | undefined;
903
+ type DeepPartial$7<T> = T extends Builtin$7 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$7<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$7<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$7<T[K]>; } : Partial<T>;
904
+ type KeysOfUnion$7<T> = T extends T ? keyof T : never;
905
+ type Exact$7<P, I> = P extends Builtin$7 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$7<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$7<P>>]: never; };
906
+ interface MessageFns$7<T> {
907
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
908
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
909
+ fromJSON(object: any): T;
910
+ toJSON(message: T): unknown;
911
+ create<I extends Exact$7<DeepPartial$7<T>, I>>(base?: I): T;
912
+ fromPartial<I extends Exact$7<DeepPartial$7<T>, I>>(object: I): T;
913
+ }
914
+ /**
915
+ * BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC
916
+ * method.
917
+ */
918
+ declare enum BroadcastMode {
919
+ /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */
920
+ BROADCAST_MODE_UNSPECIFIED = 0,
921
+ /**
922
+ * BROADCAST_MODE_BLOCK - DEPRECATED: use BROADCAST_MODE_SYNC instead,
923
+ * BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.
924
+ *
925
+ * @deprecated
926
+ */
927
+ BROADCAST_MODE_BLOCK = 1,
928
+ /**
929
+ * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits
930
+ * for a CheckTx execution response only.
931
+ */
932
+ BROADCAST_MODE_SYNC = 2,
933
+ /**
934
+ * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client
935
+ * returns immediately.
936
+ */
937
+ BROADCAST_MODE_ASYNC = 3,
938
+ UNRECOGNIZED = -1
939
+ }
940
+ /**
941
+ * BroadcastTxResponse is the response type for the
942
+ * Service.BroadcastTx method.
943
+ */
944
+ interface BroadcastTxResponse {
945
+ /** tx_response is the queried TxResponses. */
946
+ txResponse: TxResponse | undefined;
947
+ }
948
+ /**
949
+ * SimulateResponse is the response type for the
950
+ * Service.SimulateRPC method.
951
+ */
952
+ interface SimulateResponse {
953
+ /** gas_info is the information about gas used in the simulation. */
954
+ gasInfo: GasInfo | undefined;
955
+ /** result is the result of the simulation. */
956
+ result: Result | undefined;
957
+ }
958
+ /** GetTxResponse is the response type for the Service.GetTx method. */
959
+ interface GetTxResponse {
960
+ /** tx is the queried transaction. */
961
+ tx: Tx | undefined;
962
+ /** tx_response is the queried TxResponses. */
963
+ txResponse: TxResponse | undefined;
964
+ }
965
+ /**
966
+ * TxDecodeResponse is the response type for the
967
+ * Service.TxDecode method.
968
+ *
969
+ * Since: cosmos-sdk 0.47
970
+ */
971
+ interface TxDecodeResponse {
972
+ /** tx is the decoded transaction. */
973
+ tx: Tx | undefined;
974
+ }
975
+ /**
976
+ * TxEncodeRequest is the request type for the Service.TxEncode
977
+ * RPC method.
978
+ *
979
+ * Since: cosmos-sdk 0.47
980
+ */
981
+ interface TxEncodeRequest {
982
+ /** tx is the transaction to encode. */
983
+ tx: Tx | undefined;
984
+ }
985
+ /**
986
+ * TxEncodeResponse is the response type for the
987
+ * Service.TxEncode method.
988
+ *
989
+ * Since: cosmos-sdk 0.47
990
+ */
991
+ interface TxEncodeResponse {
992
+ /** tx_bytes is the encoded transaction bytes. */
993
+ txBytes: Buffer;
994
+ }
995
+ declare const BroadcastTxResponse: MessageFns$6<BroadcastTxResponse>;
996
+ declare const SimulateResponse: MessageFns$6<SimulateResponse>;
997
+ declare const GetTxResponse: MessageFns$6<GetTxResponse>;
998
+ declare const TxDecodeResponse: MessageFns$6<TxDecodeResponse>;
999
+ declare const TxEncodeRequest: MessageFns$6<TxEncodeRequest>;
1000
+ declare const TxEncodeResponse: MessageFns$6<TxEncodeResponse>;
1001
+ type Builtin$6 = Date | Function | Uint8Array | string | number | boolean | undefined;
1002
+ type DeepPartial$6<T> = T extends Builtin$6 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$6<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$6<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$6<T[K]>; } : Partial<T>;
1003
+ type KeysOfUnion$6<T> = T extends T ? keyof T : never;
1004
+ type Exact$6<P, I> = P extends Builtin$6 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$6<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$6<P>>]: never; };
1005
+ interface MessageFns$6<T> {
1006
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1007
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1008
+ fromJSON(object: any): T;
1009
+ toJSON(message: T): unknown;
1010
+ create<I extends Exact$6<DeepPartial$6<T>, I>>(base?: I): T;
1011
+ fromPartial<I extends Exact$6<DeepPartial$6<T>, I>>(object: I): T;
1012
+ }
1013
+ declare enum MarketStatus {
1014
+ Unspecified = 0,
1015
+ Active = 1,
1016
+ Paused = 2,
1017
+ Demolished = 3,
1018
+ Expired = 4,
1019
+ ForcePaused = 5,
1020
+ UNRECOGNIZED = -1
1021
+ }
1022
+ declare enum OrderType {
1023
+ UNSPECIFIED = 0,
1024
+ BUY = 1,
1025
+ SELL = 2,
1026
+ STOP_BUY = 3,
1027
+ STOP_SELL = 4,
1028
+ TAKE_BUY = 5,
1029
+ TAKE_SELL = 6,
1030
+ BUY_PO = 7,
1031
+ SELL_PO = 8,
1032
+ BUY_ATOMIC = 9,
1033
+ SELL_ATOMIC = 10,
1034
+ UNRECOGNIZED = -1
1035
+ }
1036
+ declare enum OrderMask {
1037
+ UNUSED = 0,
1038
+ ANY = 1,
1039
+ REGULAR = 2,
1040
+ CONDITIONAL = 4,
1041
+ /** DIRECTION_BUY_OR_HIGHER - for conditional orders means HIGHER */
1042
+ DIRECTION_BUY_OR_HIGHER = 8,
1043
+ /** DIRECTION_SELL_OR_LOWER - for conditional orders means LOWER */
1044
+ DIRECTION_SELL_OR_LOWER = 16,
1045
+ TYPE_MARKET = 32,
1046
+ TYPE_LIMIT = 64,
1047
+ UNRECOGNIZED = -1
1048
+ }
1049
+ declare enum AtomicMarketOrderAccessLevel {
1050
+ Nobody = 0,
1051
+ /** BeginBlockerSmartContractsOnly - currently unsupported */
1052
+ BeginBlockerSmartContractsOnly = 1,
1053
+ SmartContractsOnly = 2,
1054
+ Everyone = 3,
1055
+ UNRECOGNIZED = -1
1056
+ }
1057
+ interface OrderInfo {
1058
+ /** bytes32 subaccount ID that created the order */
1059
+ subaccountId: string;
1060
+ /** address fee_recipient address that will receive fees for the order */
1061
+ feeRecipient: string;
1062
+ /** price of the order (in human readable format) */
1063
+ price: string;
1064
+ /** quantity of the order (in human readable format) */
1065
+ quantity: string;
1066
+ /** the client order ID (optional) */
1067
+ cid: string;
1068
+ }
1069
+ interface SpotOrder {
1070
+ /** market_id represents the unique ID of the market */
1071
+ marketId: string;
1072
+ /** order_info contains the information of the order */
1073
+ orderInfo: OrderInfo | undefined;
1074
+ /** order types */
1075
+ orderType: OrderType;
1076
+ /**
1077
+ * trigger_price is the trigger price used by stop/take orders (in human
1078
+ * readable format) (optional)
1079
+ */
1080
+ triggerPrice: string;
1081
+ /** expiration block is the block number at which the order will expire */
1082
+ expirationBlock: number;
1083
+ }
1084
+ interface DerivativeOrder {
1085
+ /** market_id represents the unique ID of the market */
1086
+ marketId: string;
1087
+ /** order_info contains the information of the order */
1088
+ orderInfo: OrderInfo | undefined;
1089
+ /** order types */
1090
+ orderType: OrderType;
1091
+ /** margin is the margin used by the limit order (in human readable format) */
1092
+ margin: string;
1093
+ /**
1094
+ * trigger_price is the trigger price used by stop/take orders (in human
1095
+ * readable format) (optional)
1096
+ */
1097
+ triggerPrice: string;
1098
+ /** expiration block is the block number at which the order will expire */
1099
+ expirationBlock: number;
1100
+ }
1101
+ declare const OrderInfo: MessageFns$5<OrderInfo>;
1102
+ declare const SpotOrder: MessageFns$5<SpotOrder>;
1103
+ declare const DerivativeOrder: MessageFns$5<DerivativeOrder>;
1104
+ type Builtin$5 = Date | Function | Uint8Array | string | number | boolean | undefined;
1105
+ type DeepPartial$5<T> = T extends Builtin$5 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$5<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$5<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$5<T[K]>; } : Partial<T>;
1106
+ type KeysOfUnion$5<T> = T extends T ? keyof T : never;
1107
+ type Exact$5<P, I extends P> = P extends Builtin$5 ? P : P & { [K in keyof P]: Exact$5<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion$5<P>>]: never; };
1108
+ interface MessageFns$5<T> {
1109
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1110
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1111
+ fromJSON(object: any): T;
1112
+ toJSON(message: T): unknown;
1113
+ create<I extends Exact$5<DeepPartial$5<T>, I>>(base?: I): T;
1114
+ fromPartial<I extends Exact$5<DeepPartial$5<T>, I>>(object: I): T;
1115
+ }
1116
+ declare enum ExecutionType {
1117
+ UnspecifiedExecutionType = 0,
1118
+ Market = 1,
1119
+ LimitFill = 2,
1120
+ LimitMatchRestingOrder = 3,
1121
+ LimitMatchNewOrder = 4,
1122
+ MarketLiquidation = 5,
1123
+ ExpiryMarketSettlement = 6,
1124
+ OffsettingPosition = 7,
1125
+ Synthetic = 8,
1126
+ UNRECOGNIZED = -1
1127
+ }
1128
+ /**
1129
+ * EnforcedRestrictionsContract defines a contract with its pause event
1130
+ * signature
1131
+ */
1132
+ interface EnforcedRestrictionsContract {
1133
+ /** EVM address of the contract */
1134
+ contractAddress: string;
1135
+ /**
1136
+ * Pause event signature for the contract (e.g. "Pause()", or
1137
+ * "Pause(address)"). If left empty, it will default to "Pause()".
1138
+ */
1139
+ pauseEventSignature: string;
1140
+ }
1141
+ interface Params {
1142
+ /**
1143
+ * spot_market_instant_listing_fee defines the expedited fee in INJ required
1144
+ * to create a spot market by bypassing governance
1145
+ */
1146
+ spotMarketInstantListingFee: Coin | undefined;
1147
+ /**
1148
+ * derivative_market_instant_listing_fee defines the expedited fee in INJ
1149
+ * required to create a derivative market by bypassing governance
1150
+ */
1151
+ derivativeMarketInstantListingFee: Coin | undefined;
1152
+ /**
1153
+ * default_spot_maker_fee defines the default exchange trade fee for makers on
1154
+ * a spot market
1155
+ */
1156
+ defaultSpotMakerFeeRate: string;
1157
+ /**
1158
+ * default_spot_taker_fee_rate defines the default exchange trade fee rate for
1159
+ * takers on a new spot market
1160
+ */
1161
+ defaultSpotTakerFeeRate: string;
1162
+ /**
1163
+ * default_derivative_maker_fee defines the default exchange trade fee for
1164
+ * makers on a new derivative market
1165
+ */
1166
+ defaultDerivativeMakerFeeRate: string;
1167
+ /**
1168
+ * default_derivative_taker_fee defines the default exchange trade fee for
1169
+ * takers on a new derivative market
1170
+ */
1171
+ defaultDerivativeTakerFeeRate: string;
1172
+ /**
1173
+ * default_initial_margin_ratio defines the default initial margin ratio on a
1174
+ * new derivative market
1175
+ */
1176
+ defaultInitialMarginRatio: string;
1177
+ /**
1178
+ * default_maintenance_margin_ratio defines the default maintenance margin
1179
+ * ratio on a new derivative market
1180
+ */
1181
+ defaultMaintenanceMarginRatio: string;
1182
+ /**
1183
+ * default_funding_interval defines the default funding interval on a
1184
+ * derivative market
1185
+ */
1186
+ defaultFundingInterval: number;
1187
+ /**
1188
+ * funding_multiple defines the timestamp multiple that the funding timestamp
1189
+ * should be a multiple of
1190
+ */
1191
+ fundingMultiple: number;
1192
+ /**
1193
+ * relayer_fee_share_rate defines the trade fee share percentage that goes to
1194
+ * relayers
1195
+ */
1196
+ relayerFeeShareRate: string;
1197
+ /**
1198
+ * default_hourly_funding_rate_cap defines the default maximum absolute value
1199
+ * of the hourly funding rate
1200
+ */
1201
+ defaultHourlyFundingRateCap: string;
1202
+ /** hourly_interest_rate defines the hourly interest rate */
1203
+ defaultHourlyInterestRate: string;
1204
+ /**
1205
+ * max_derivative_order_side_count defines the maximum number of derivative
1206
+ * active orders a subaccount can have for a given orderbook side
1207
+ */
1208
+ maxDerivativeOrderSideCount: number;
1209
+ /**
1210
+ * inj_reward_staked_requirement_threshold defines the threshold on INJ
1211
+ * rewards after which one also needs staked INJ to receive more
1212
+ */
1213
+ injRewardStakedRequirementThreshold: string;
1214
+ /**
1215
+ * the trading_rewards_vesting_duration defines the vesting times for trading
1216
+ * rewards
1217
+ */
1218
+ tradingRewardsVestingDuration: number;
1219
+ /**
1220
+ * liquidator_reward_share_rate defines the ratio of the split of the surplus
1221
+ * collateral that goes to the liquidator
1222
+ */
1223
+ liquidatorRewardShareRate: string;
1224
+ /**
1225
+ * binary_options_market_instant_listing_fee defines the expedited fee in INJ
1226
+ * required to create a derivative market by bypassing governance
1227
+ */
1228
+ binaryOptionsMarketInstantListingFee: Coin | undefined;
1229
+ /**
1230
+ * atomic_market_order_access_level defines the required access permissions
1231
+ * for executing atomic market orders
1232
+ */
1233
+ atomicMarketOrderAccessLevel: AtomicMarketOrderAccessLevel;
1234
+ /**
1235
+ * spot_atomic_market_order_fee_multiplier defines the default multiplier for
1236
+ * executing atomic market orders in spot markets
1237
+ */
1238
+ spotAtomicMarketOrderFeeMultiplier: string;
1239
+ /**
1240
+ * derivative_atomic_market_order_fee_multiplier defines the default
1241
+ * multiplier for executing atomic market orders in derivative markets
1242
+ */
1243
+ derivativeAtomicMarketOrderFeeMultiplier: string;
1244
+ /**
1245
+ * binary_options_atomic_market_order_fee_multiplier defines the default
1246
+ * multiplier for executing atomic market orders in binary markets
1247
+ */
1248
+ binaryOptionsAtomicMarketOrderFeeMultiplier: string;
1249
+ /** minimal_protocol_fee_rate defines the minimal protocol fee rate */
1250
+ minimalProtocolFeeRate: string;
1251
+ /**
1252
+ * is_instant_derivative_market_launch_enabled defines whether instant
1253
+ * derivative market launch is enabled
1254
+ */
1255
+ isInstantDerivativeMarketLaunchEnabled: boolean;
1256
+ postOnlyModeHeightThreshold: number;
1257
+ /**
1258
+ * Maximum time in seconds since the last mark price update to allow a
1259
+ * decrease in margin
1260
+ */
1261
+ marginDecreasePriceTimestampThresholdSeconds: number;
1262
+ /** List of addresses that are allowed to perform exchange admin operations */
1263
+ exchangeAdmins: string[];
1264
+ /**
1265
+ * inj_auction_max_cap defines the maximum cap for INJ sent to auction.
1266
+ * Deprecated: the cap is now driven by the auction module's InjBasketMaxCap;
1267
+ * this field is ignored.
1268
+ *
1269
+ * @deprecated
1270
+ */
1271
+ injAuctionMaxCap: string;
1272
+ /**
1273
+ * fixed_gas_enabled indicates if msg server will consume fixed gas amount for
1274
+ * certain msg types
1275
+ */
1276
+ fixedGasEnabled: boolean;
1277
+ /**
1278
+ * emit_legacy_version_events indicates if events of legacy version types
1279
+ * should be emitted in parallel to the new version events
1280
+ */
1281
+ emitLegacyVersionEvents: boolean;
1282
+ /**
1283
+ * default_reduce_margin_ratio defines the default reduce margin ratio on a
1284
+ * new derivative market
1285
+ */
1286
+ defaultReduceMarginRatio: string;
1287
+ /**
1288
+ * post_only_mode_blocks_amount defines the amount of blocks the post only
1289
+ * mode will be enabled after a chain upgrade
1290
+ */
1291
+ postOnlyModeBlocksAmount: number;
1292
+ /**
1293
+ * min_post_only_mode_downtime_duration defines the minimum downtime duration
1294
+ * that must pass before the post only mode is automatically enabled. The
1295
+ * accepted values are the Downtime enum values from the downtime_duration
1296
+ * module
1297
+ */
1298
+ minPostOnlyModeDowntimeDuration: string;
1299
+ /**
1300
+ * post_only_mode_blocks_amount defines the amount of blocks the post only
1301
+ * mode will be enabled after the downtime-detector module detects a chain
1302
+ * downtime
1303
+ */
1304
+ postOnlyModeBlocksAmountAfterDowntime: number;
1305
+ /**
1306
+ * DEPRECATED, left for upgrade purposes
1307
+ * Contracts that exchange will be listening to pause markets denominated in
1308
+ * respective erc20: denoms, with their pause event signatures
1309
+ */
1310
+ deprecatedEnforcedRestrictionsContracts: EnforcedRestrictionsContract[];
1311
+ /**
1312
+ * white_knight_liquidators defines addresses that can liquidate positions
1313
+ * with a dedicated white-knight reward share in positive payout liquidations
1314
+ */
1315
+ whiteKnightLiquidators: string[];
1316
+ /**
1317
+ * white_knight_liquidator_reward_share_rate defines the ratio of the split of
1318
+ * the surplus collateral that goes to a white knight liquidator
1319
+ */
1320
+ whiteKnightLiquidatorRewardShareRate: string;
1321
+ /** cross_margin_params groups all cross-margin related parameters. */
1322
+ crossMarginParams: CrossMarginParams | undefined;
1323
+ }
1324
+ interface CrossMarginParams {
1325
+ /**
1326
+ * positive_upnl_haircut_rate defines the haircut applied to
1327
+ * positive unrealized PnL for cross-margin admission checks.
1328
+ */
1329
+ positiveUpnlHaircutRate: string;
1330
+ /**
1331
+ * fees_buffer defines a fixed notional buffer (quote-denom
1332
+ * units) subtracted from cross-margin equity calculations.
1333
+ */
1334
+ feesBuffer: string;
1335
+ /**
1336
+ * enabled_quote_denoms defines the quote denoms that are
1337
+ * eligible for cross-margin pools.
1338
+ */
1339
+ enabledQuoteDenoms: string[];
1340
+ /**
1341
+ * perpetual_enabled defines whether perpetual derivative markets
1342
+ * are eligible for cross margin.
1343
+ */
1344
+ perpetualEnabled: boolean;
1345
+ /**
1346
+ * expiry_enabled defines whether expiry futures derivative
1347
+ * markets are eligible for cross margin.
1348
+ */
1349
+ expiryEnabled: boolean;
1350
+ /**
1351
+ * max_active_derivative_markets_per_pool defines the maximum
1352
+ * number of active derivative markets (positions or orders) a cross-margin
1353
+ * subaccount may have within a single quote-denom pool.
1354
+ */
1355
+ maxActiveDerivativeMarketsPerPool: number;
1356
+ /**
1357
+ * emergency_paused defines whether cross margin is in emergency
1358
+ * pause mode. When true:
1359
+ * - All cross-margin orders (including reduce-only) are blocked
1360
+ * - Profile switching involving cross mode is blocked
1361
+ * - Liquidations are still allowed
1362
+ * - Withdrawals are allowed up to isolated-margin maintenance level
1363
+ */
1364
+ emergencyPaused: boolean;
1365
+ }
1366
+ /** A subaccount's deposit for a given base currency */
1367
+ interface Deposit {
1368
+ /** the available balance (in chain format) */
1369
+ availableBalance: string;
1370
+ /** the total balance (in chain format) */
1371
+ totalBalance: string;
1372
+ }
1373
+ interface Position {
1374
+ /** True if the position is long. False if the position is short. */
1375
+ isLong: boolean;
1376
+ /** The quantity of the position (in human readable format) */
1377
+ quantity: string;
1378
+ /** The entry price of the position (in human readable format) */
1379
+ entryPrice: string;
1380
+ /** The margin of the position (in human readable format) */
1381
+ margin: string;
1382
+ /** The cumulative funding */
1383
+ cumulativeFundingEntry: string;
1384
+ }
1385
+ interface DerivativePosition {
1386
+ /** the subaccount ID */
1387
+ subaccountId: string;
1388
+ /** the market ID */
1389
+ marketId: string;
1390
+ /** the position details */
1391
+ position: Position | undefined;
1392
+ }
1393
+ declare const EnforcedRestrictionsContract: MessageFns$4<EnforcedRestrictionsContract>;
1394
+ declare const Params: MessageFns$4<Params>;
1395
+ declare const CrossMarginParams: MessageFns$4<CrossMarginParams>;
1396
+ declare const Deposit: MessageFns$4<Deposit>;
1397
+ declare const Position: MessageFns$4<Position>;
1398
+ declare const DerivativePosition: MessageFns$4<DerivativePosition>;
1399
+ type Builtin$4 = Date | Function | Uint8Array | string | number | boolean | undefined;
1400
+ type DeepPartial$4<T> = T extends Builtin$4 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$4<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$4<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$4<T[K]>; } : Partial<T>;
1401
+ type KeysOfUnion$4<T> = T extends T ? keyof T : never;
1402
+ type Exact$4<P, I extends P> = P extends Builtin$4 ? P : P & { [K in keyof P]: Exact$4<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion$4<P>>]: never; };
1403
+ interface MessageFns$4<T> {
1404
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1405
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1406
+ fromJSON(object: any): T;
1407
+ toJSON(message: T): unknown;
1408
+ create<I extends Exact$4<DeepPartial$4<T>, I>>(base?: I): T;
1409
+ fromPartial<I extends Exact$4<DeepPartial$4<T>, I>>(object: I): T;
1410
+ }
1411
+ declare enum OrderSide {
1412
+ /** Side_Unspecified - will return both */
1413
+ Side_Unspecified = 0,
1414
+ Buy = 1,
1415
+ Sell = 2,
1416
+ UNRECOGNIZED = -1
1417
+ }
1418
+ /**
1419
+ * QueryExchangeParamsRequest is the response type for the Query/ExchangeParams
1420
+ * RPC method.
1421
+ */
1422
+ interface QueryExchangeParamsResponse {
1423
+ params: Params | undefined;
1424
+ }
1425
+ /**
1426
+ * QuerySubaccountDepositsResponse is the response type for the
1427
+ * Query/SubaccountDeposits RPC method.
1428
+ */
1429
+ interface QuerySubaccountDepositsResponse {
1430
+ deposits: {
1431
+ [key: string]: Deposit;
1432
+ };
1433
+ }
1434
+ interface TrimmedSpotLimitOrder {
1435
+ /** price of the order (in human readable format) */
1436
+ price: string;
1437
+ /** quantity of the order (in human readable format) */
1438
+ quantity: string;
1439
+ /** the amount of the quantity remaining fillable (in human readable format) */
1440
+ fillable: string;
1441
+ /** true if the order is a buy */
1442
+ isBuy: boolean;
1443
+ /** the order hash (optional) */
1444
+ orderHash: string;
1445
+ /** the client order ID (optional) */
1446
+ cid: string;
1447
+ }
1448
+ /**
1449
+ * QueryTraderSpotOrdersResponse is the response type for the
1450
+ * Query/TraderSpotOrders RPC method.
1451
+ */
1452
+ interface QueryTraderSpotOrdersResponse {
1453
+ orders: TrimmedSpotLimitOrder[];
1454
+ }
1455
+ interface TrimmedDerivativeLimitOrder {
1456
+ /** price of the order (in human readable format) */
1457
+ price: string;
1458
+ /** quantity of the order (in human readable format) */
1459
+ quantity: string;
1460
+ /** margin of the order (in human readable format) */
1461
+ margin: string;
1462
+ /** the amount of the quantity remaining fillable (in human readable format) */
1463
+ fillable: string;
1464
+ /** true if the order is a buy */
1465
+ isBuy: boolean;
1466
+ /** the order hash (optional) */
1467
+ orderHash: string;
1468
+ /** the client order ID (optional) */
1469
+ cid: string;
1470
+ }
1471
+ /**
1472
+ * QueryTraderDerivativeOrdersResponse is the response type for the
1473
+ * Query/TraderDerivativeOrders RPC method.
1474
+ */
1475
+ interface QueryTraderDerivativeOrdersResponse {
1476
+ orders: TrimmedDerivativeLimitOrder[];
1477
+ }
1478
+ /**
1479
+ * QuerySubaccountPositionsResponse is the response type for the
1480
+ * Query/SubaccountPositions RPC method.
1481
+ */
1482
+ interface QuerySubaccountPositionsResponse {
1483
+ state: DerivativePosition[];
1484
+ }
1485
+ /**
1486
+ * QuerySubaccountTradeNonceResponse is the response type for the
1487
+ * Query/SubaccountTradeNonce RPC method.
1488
+ */
1489
+ interface QuerySubaccountTradeNonceResponse {
1490
+ nonce: number;
1491
+ }
1492
+ declare const QueryExchangeParamsResponse: MessageFns$3<QueryExchangeParamsResponse>;
1493
+ declare const QuerySubaccountDepositsResponse: MessageFns$3<QuerySubaccountDepositsResponse>;
1494
+ declare const TrimmedSpotLimitOrder: MessageFns$3<TrimmedSpotLimitOrder>;
1495
+ declare const QueryTraderSpotOrdersResponse: MessageFns$3<QueryTraderSpotOrdersResponse>;
1496
+ declare const TrimmedDerivativeLimitOrder: MessageFns$3<TrimmedDerivativeLimitOrder>;
1497
+ declare const QueryTraderDerivativeOrdersResponse: MessageFns$3<QueryTraderDerivativeOrdersResponse>;
1498
+ declare const QuerySubaccountPositionsResponse: MessageFns$3<QuerySubaccountPositionsResponse>;
1499
+ declare const QuerySubaccountTradeNonceResponse: MessageFns$3<QuerySubaccountTradeNonceResponse>;
1500
+ type Builtin$3 = Date | Function | Uint8Array | string | number | boolean | undefined;
1501
+ type DeepPartial$3<T> = T extends Builtin$3 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$3<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$3<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$3<T[K]>; } : Partial<T>;
1502
+ type KeysOfUnion$3<T> = T extends T ? keyof T : never;
1503
+ type Exact$3<P, I extends P> = P extends Builtin$3 ? P : P & { [K in keyof P]: Exact$3<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion$3<P>>]: never; };
1504
+ interface MessageFns$3<T> {
1505
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1506
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1507
+ fromJSON(object: any): T;
1508
+ toJSON(message: T): unknown;
1509
+ create<I extends Exact$3<DeepPartial$3<T>, I>>(base?: I): T;
1510
+ fromPartial<I extends Exact$3<DeepPartial$3<T>, I>>(object: I): T;
1511
+ }
1512
+ declare const ChainId: {
1513
+ readonly Mainnet: "injective-1";
1514
+ readonly Testnet: "injective-888";
1515
+ readonly Devnet: "injective-777";
1516
+ };
1517
+ type ChainId = (typeof ChainId)[keyof typeof ChainId];
1518
+ declare const EvmChainId: {
1519
+ readonly Mainnet: 1;
1520
+ readonly Ropsten: 3;
1521
+ readonly Rinkeby: 4;
1522
+ readonly Goerli: 5;
1523
+ readonly Kovan: 42;
1524
+ readonly Injective: 888;
1525
+ readonly Sepolia: 11155111;
1526
+ readonly Ganache: 1337;
1527
+ readonly HardHat: 31337;
1528
+ readonly MainnetEvm: 1776;
1529
+ readonly DevnetEvm: 1337;
1530
+ readonly TestnetEvm: 1439;
1531
+ };
1532
+ type EvmChainId = (typeof EvmChainId)[keyof typeof EvmChainId];
1533
+ /**
1534
+ * DenomUnit represents a struct that describes a given
1535
+ * denomination unit of the basic token.
1536
+ */
1537
+ interface DenomUnit {
1538
+ /** denom represents the string name of the given denom unit (e.g uatom). */
1539
+ denom: string;
1540
+ /**
1541
+ * exponent represents power of 10 exponent that one must
1542
+ * raise the base_denom to in order to equal the given DenomUnit's denom
1543
+ * 1 denom = 10^exponent base_denom
1544
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
1545
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
1546
+ */
1547
+ exponent: number;
1548
+ /** aliases is a list of string aliases for the given denom */
1549
+ aliases: string[];
1550
+ }
1551
+ /**
1552
+ * Metadata represents a struct that describes
1553
+ * a basic token.
1554
+ */
1555
+ interface Metadata {
1556
+ description: string;
1557
+ /** denom_units represents the list of DenomUnit's for a given coin */
1558
+ denomUnits: DenomUnit[];
1559
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
1560
+ base: string;
1561
+ /**
1562
+ * display indicates the suggested denom that should be
1563
+ * displayed in clients.
1564
+ */
1565
+ display: string;
1566
+ /**
1567
+ * name defines the name of the token (eg: Cosmos Atom)
1568
+ *
1569
+ * Since: cosmos-sdk 0.43
1570
+ */
1571
+ name: string;
1572
+ /**
1573
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
1574
+ * be the same as the display.
1575
+ *
1576
+ * Since: cosmos-sdk 0.43
1577
+ */
1578
+ symbol: string;
1579
+ /**
1580
+ * URI to a document (on or off-chain) that contains additional information. Optional.
1581
+ *
1582
+ * Since: cosmos-sdk 0.46
1583
+ */
1584
+ uri: string;
1585
+ /**
1586
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
1587
+ * the document didn't change. Optional.
1588
+ *
1589
+ * Since: cosmos-sdk 0.46
1590
+ */
1591
+ uriHash: string;
1592
+ /**
1593
+ * Decimals represent the number of decimals use to represent token amount on chain
1594
+ *
1595
+ * Since: cosmos-sdk 0.50
1596
+ */
1597
+ decimals: number;
1598
+ }
1599
+ declare const DenomUnit: MessageFns$2<DenomUnit>;
1600
+ declare const Metadata: MessageFns$2<Metadata>;
1601
+ type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined;
1602
+ type DeepPartial$2<T> = T extends Builtin$2 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$2<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$2<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$2<T[K]>; } : Partial<T>;
1603
+ type KeysOfUnion$2<T> = T extends T ? keyof T : never;
1604
+ type Exact$2<P, I> = P extends Builtin$2 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$2<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$2<P>>]: never; };
1605
+ interface MessageFns$2<T> {
1606
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1607
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1608
+ fromJSON(object: any): T;
1609
+ toJSON(message: T): unknown;
1610
+ create<I extends Exact$2<DeepPartial$2<T>, I>>(base?: I): T;
1611
+ fromPartial<I extends Exact$2<DeepPartial$2<T>, I>>(object: I): T;
1612
+ }
1613
+ /** MsgSend represents a message to send coins from one account to another. */
1614
+ interface MsgSend$1 {
1615
+ fromAddress: string;
1616
+ toAddress: string;
1617
+ amount: Coin[];
1618
+ }
1619
+ declare const MsgSend$1: MessageFns$1<MsgSend$1>;
1620
+ type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
1621
+ type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$1<T[K]>; } : Partial<T>;
1622
+ type KeysOfUnion$1<T> = T extends T ? keyof T : never;
1623
+ type Exact$1<P, I> = P extends Builtin$1 ? P : P & { [K in keyof P as Extract<K, keyof I>]: Exact$1<P[K], I[K & keyof I]>; } & { [K in Exclude<keyof I, KeysOfUnion$1<P>>]: never; };
1624
+ interface MessageFns$1<T> {
1625
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1626
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1627
+ fromJSON(object: any): T;
1628
+ toJSON(message: T): unknown;
1629
+ create<I extends Exact$1<DeepPartial$1<T>, I>>(base?: I): T;
1630
+ fromPartial<I extends Exact$1<DeepPartial$1<T>, I>>(object: I): T;
1631
+ }
1632
+ interface MsgSendParams {
1633
+ srcInjectiveAddress: string;
1634
+ dstInjectiveAddress: string;
1635
+ /** Base units of each denom, not scaled. */
1636
+ amount: Coin | Coin[];
1637
+ }
1638
+ /**
1639
+ * Base for the messages a transaction can carry. A subclass names the type URL
1640
+ * it is registered under on chain and knows how to encode itself, so nothing
1641
+ * else in the SDK has to work out which codec a message belongs to.
1642
+ */
1643
+ declare abstract class MsgBase<Params, ProtoMsg> {
1644
+ readonly params: Params;
1645
+ constructor(params: Params);
1646
+ abstract toProto(): ProtoMsg;
1647
+ abstract toDirectSign(): {
1648
+ type: string;
1649
+ message: ProtoMsg;
1650
+ };
1651
+ abstract toBinary(): Buffer;
1652
+ abstract toAmino(): {
1653
+ type: string;
1654
+ value: Record<string, unknown>;
1655
+ };
1656
+ toWeb3Gw(): {
1657
+ "@type": string;
1658
+ } & Record<string, unknown>;
1659
+ toEip712V2(): {
1660
+ "@type": string;
1661
+ } & Record<string, unknown>;
1662
+ }
1663
+ declare class MsgSend extends MsgBase<MsgSendParams, MsgSend$1> {
1664
+ toProto(): MsgSend$1;
1665
+ toDirectSign(): {
1666
+ type: "/cosmos.bank.v1beta1.MsgSend";
1667
+ message: MsgSend$1;
1668
+ };
1669
+ toBinary(): Buffer;
1670
+ toAmino(): {
1671
+ type: "cosmos-sdk/MsgSend";
1672
+ value: {
1673
+ from_address: string;
1674
+ to_address: string;
1675
+ amount: MsgSend$1["amount"];
1676
+ };
1677
+ };
1678
+ }
1679
+ /**
1680
+ * MsgDeposit defines a SDK message for transferring coins from the sender's
1681
+ * bank balance into the subaccount's exchange deposits
1682
+ */
1683
+ interface MsgDeposit$1 {
1684
+ /** the sender's Injective address */
1685
+ sender: string;
1686
+ /**
1687
+ * (Optional) the subaccount ID to deposit funds into. If empty, the coin
1688
+ * will be deposited to the sender's default subaccount address.
1689
+ */
1690
+ subaccountId: string;
1691
+ /** the amount of the deposit (in chain format) */
1692
+ amount: Coin | undefined;
1693
+ }
1694
+ /**
1695
+ * MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's
1696
+ * deposits to the user's bank balance
1697
+ */
1698
+ interface MsgWithdraw$1 {
1699
+ /** the sender's Injective address */
1700
+ sender: string;
1701
+ /** the subaccount ID to withdraw funds from */
1702
+ subaccountId: string;
1703
+ /** the amount of the withdrawal (in chain format) */
1704
+ amount: Coin | undefined;
1705
+ }
1706
+ /**
1707
+ * MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit
1708
+ * order.
1709
+ */
1710
+ interface MsgCreateSpotLimitOrder$1 {
1711
+ /** the sender's Injective address */
1712
+ sender: string;
1713
+ /** the order details */
1714
+ order: SpotOrder | undefined;
1715
+ }
1716
+ /**
1717
+ * MsgCreateSpotMarketOrder defines a SDK message for creating a new spot market
1718
+ * order.
1719
+ */
1720
+ interface MsgCreateSpotMarketOrder$1 {
1721
+ /** the sender's Injective address */
1722
+ sender: string;
1723
+ /** the order details */
1724
+ order: SpotOrder | undefined;
1725
+ }
1726
+ /** A Cosmos-SDK MsgCreateDerivativeLimitOrder */
1727
+ interface MsgCreateDerivativeLimitOrder$1 {
1728
+ /** the sender's Injective address */
1729
+ sender: string;
1730
+ /** the order details */
1731
+ order: DerivativeOrder | undefined;
1732
+ }
1733
+ /** MsgCancelSpotOrder defines the Msg/CancelSpotOrder response type. */
1734
+ interface MsgCancelSpotOrder$1 {
1735
+ /** the sender's Injective address */
1736
+ sender: string;
1737
+ /** the market ID */
1738
+ marketId: string;
1739
+ /** the subaccount ID */
1740
+ subaccountId: string;
1741
+ /** the order hash (optional) */
1742
+ orderHash: string;
1743
+ /** the client order ID (optional) */
1744
+ cid: string;
1745
+ }
1746
+ /** MsgBatchCancelSpotOrders defines the Msg/BatchCancelSpotOrders response type. */
1747
+ interface MsgBatchCancelSpotOrders$1 {
1748
+ sender: string;
1749
+ data: OrderData[];
1750
+ }
1751
+ /** A Cosmos-SDK MsgCreateDerivativeMarketOrder */
1752
+ interface MsgCreateDerivativeMarketOrder$1 {
1753
+ /** the sender's Injective address */
1754
+ sender: string;
1755
+ /** the order details */
1756
+ order: DerivativeOrder | undefined;
1757
+ }
1758
+ /** MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. */
1759
+ interface MsgCancelDerivativeOrder$1 {
1760
+ /** the sender's Injective address */
1761
+ sender: string;
1762
+ /** the market ID */
1763
+ marketId: string;
1764
+ /** the subaccount ID */
1765
+ subaccountId: string;
1766
+ /** the order hash (optional) */
1767
+ orderHash: string;
1768
+ /** the order mask (bitwise combination of OrderMask enum values) (optional) */
1769
+ orderMask: number;
1770
+ /** the client order ID (optional) */
1771
+ cid: string;
1772
+ }
1773
+ interface OrderData {
1774
+ /** the market ID */
1775
+ marketId: string;
1776
+ /** the subaccount ID */
1777
+ subaccountId: string;
1778
+ /**
1779
+ * the order hash (optional - either the order_hash or the cid should be
1780
+ * provided)
1781
+ */
1782
+ orderHash: string;
1783
+ /** the order mask (bitwise combination of OrderMask enum values) */
1784
+ orderMask: number;
1785
+ /**
1786
+ * the client order ID (optional - either the order_hash or the cid should be
1787
+ * provided)
1788
+ */
1789
+ cid: string;
1790
+ }
1791
+ /**
1792
+ * MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders
1793
+ * response type.
1794
+ */
1795
+ interface MsgBatchCancelDerivativeOrders$1 {
1796
+ sender: string;
1797
+ data: OrderData[];
1798
+ }
1799
+ /** A Cosmos-SDK MsgSubaccountTransfer */
1800
+ interface MsgSubaccountTransfer$1 {
1801
+ /** the sender's Injective address */
1802
+ sender: string;
1803
+ /** the source subaccount ID */
1804
+ sourceSubaccountId: string;
1805
+ /** the destination subaccount ID */
1806
+ destinationSubaccountId: string;
1807
+ /** the amount to transfer (in chain format) */
1808
+ amount: Coin | undefined;
1809
+ }
1810
+ /** A Cosmos-SDK MsgExternalTransfer */
1811
+ interface MsgExternalTransfer$1 {
1812
+ /** the sender's Injective address */
1813
+ sender: string;
1814
+ /** the source subaccount ID */
1815
+ sourceSubaccountId: string;
1816
+ /** the destination subaccount ID */
1817
+ destinationSubaccountId: string;
1818
+ /** the amount to transfer (in chain format) */
1819
+ amount: Coin | undefined;
1820
+ }
1821
+ /** A Cosmos-SDK MsgIncreasePositionMargin */
1822
+ interface MsgIncreasePositionMargin$1 {
1823
+ /** the sender's Injective address */
1824
+ sender: string;
1825
+ /** the subaccount ID sending the funds */
1826
+ sourceSubaccountId: string;
1827
+ /** the subaccount ID the position belongs to */
1828
+ destinationSubaccountId: string;
1829
+ /** the market ID */
1830
+ marketId: string;
1831
+ /**
1832
+ * amount defines the amount of margin to add to the position (in human
1833
+ * readable format)
1834
+ */
1835
+ amount: string;
1836
+ }
1837
+ declare const MsgDeposit$1: MessageFns<MsgDeposit$1>;
1838
+ declare const MsgWithdraw$1: MessageFns<MsgWithdraw$1>;
1839
+ declare const MsgCreateSpotLimitOrder$1: MessageFns<MsgCreateSpotLimitOrder$1>;
1840
+ declare const MsgCreateSpotMarketOrder$1: MessageFns<MsgCreateSpotMarketOrder$1>;
1841
+ declare const MsgCreateDerivativeLimitOrder$1: MessageFns<MsgCreateDerivativeLimitOrder$1>;
1842
+ declare const MsgCancelSpotOrder$1: MessageFns<MsgCancelSpotOrder$1>;
1843
+ declare const MsgBatchCancelSpotOrders$1: MessageFns<MsgBatchCancelSpotOrders$1>;
1844
+ declare const MsgCreateDerivativeMarketOrder$1: MessageFns<MsgCreateDerivativeMarketOrder$1>;
1845
+ declare const MsgCancelDerivativeOrder$1: MessageFns<MsgCancelDerivativeOrder$1>;
1846
+ declare const OrderData: MessageFns<OrderData>;
1847
+ declare const MsgBatchCancelDerivativeOrders$1: MessageFns<MsgBatchCancelDerivativeOrders$1>;
1848
+ declare const MsgSubaccountTransfer$1: MessageFns<MsgSubaccountTransfer$1>;
1849
+ declare const MsgExternalTransfer$1: MessageFns<MsgExternalTransfer$1>;
1850
+ declare const MsgIncreasePositionMargin$1: MessageFns<MsgIncreasePositionMargin$1>;
1851
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1852
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
1853
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1854
+ type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
1855
+ interface MessageFns<T> {
1856
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
1857
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
1858
+ fromJSON(object: any): T;
1859
+ toJSON(message: T): unknown;
1860
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
1861
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
1862
+ }
1863
+ /** One order to cancel, shared by the spot and derivative batch cancels. */
1864
+ interface OrderDataParams {
1865
+ marketId: string;
1866
+ subaccountId: string;
1867
+ orderHash?: string;
1868
+ orderMask?: OrderMask;
1869
+ cid?: string;
1870
+ }
1871
+ interface MsgBatchCancelSpotOrdersParams {
1872
+ injectiveAddress: string;
1873
+ orders: OrderDataParams[];
1874
+ }
1875
+ declare class MsgBatchCancelSpotOrders extends MsgBase<MsgBatchCancelSpotOrdersParams, MsgBatchCancelSpotOrders$1> {
1876
+ toProto(): MsgBatchCancelSpotOrders$1;
1877
+ toDirectSign(): {
1878
+ type: "/injective.exchange.v2.MsgBatchCancelSpotOrders";
1879
+ message: MsgBatchCancelSpotOrders$1;
1880
+ };
1881
+ toBinary(): Buffer;
1882
+ toAmino(): {
1883
+ type: "exchange/MsgBatchCancelSpotOrders";
1884
+ value: {
1885
+ sender: string;
1886
+ data: {
1887
+ market_id: string;
1888
+ subaccount_id: string;
1889
+ order_hash: string;
1890
+ order_mask: number;
1891
+ cid: string;
1892
+ }[];
1893
+ };
1894
+ };
1895
+ }
1896
+ interface MsgCancelSpotOrderParams {
1897
+ injectiveAddress: string;
1898
+ marketId: string;
1899
+ subaccountId: string;
1900
+ orderHash?: string;
1901
+ cid?: string;
1902
+ }
1903
+ declare class MsgCancelSpotOrder extends MsgBase<MsgCancelSpotOrderParams, MsgCancelSpotOrder$1> {
1904
+ toProto(): MsgCancelSpotOrder$1;
1905
+ toDirectSign(): {
1906
+ type: "/injective.exchange.v2.MsgCancelSpotOrder";
1907
+ message: MsgCancelSpotOrder$1;
1908
+ };
1909
+ toBinary(): Buffer;
1910
+ toAmino(): {
1911
+ type: "exchange/MsgCancelSpotOrder";
1912
+ value: {
1913
+ sender: string;
1914
+ market_id: string;
1915
+ subaccount_id: string;
1916
+ order_hash: string;
1917
+ cid: string;
1918
+ };
1919
+ };
1920
+ }
1921
+ interface SpotOrderParams {
1922
+ injectiveAddress: string;
1923
+ marketId: string;
1924
+ subaccountId: string;
1925
+ feeRecipient: string;
1926
+ /** Human value, scaled to chain format when the message is built. */
1927
+ price: string;
1928
+ /** Human value, scaled to chain format when the message is built. */
1929
+ quantity: string;
1930
+ orderType: OrderType;
1931
+ triggerPrice?: string;
1932
+ /** Block after which a resting order expires; zero means no expiry. */
1933
+ expirationBlock?: number;
1934
+ cid?: string;
1935
+ }
1936
+ /** The amino form keeps the human values the caller passed in. */
1937
+ interface SpotOrderAmino {
1938
+ market_id: string;
1939
+ order_info: {
1940
+ subaccount_id: string;
1941
+ fee_recipient: string;
1942
+ price: string;
1943
+ quantity: string;
1944
+ cid: string;
1945
+ };
1946
+ order_type: OrderType;
1947
+ trigger_price: string;
1948
+ expiration_block: string;
1949
+ }
1950
+ /** The EIP-712 form signs decimals as Cosmos SDK decimal strings. */
1951
+ interface SpotOrderEip712V2 {
1952
+ market_id: string;
1953
+ order_info: {
1954
+ subaccount_id: string;
1955
+ fee_recipient: string;
1956
+ price: string;
1957
+ quantity: string;
1958
+ cid: string;
1959
+ };
1960
+ order_type: string;
1961
+ trigger_price: string;
1962
+ expiration_block: string;
1963
+ }
1964
+ declare class MsgCreateSpotLimitOrder extends MsgBase<SpotOrderParams, MsgCreateSpotLimitOrder$1> {
1965
+ toProto(): MsgCreateSpotLimitOrder$1;
1966
+ toDirectSign(): {
1967
+ type: "/injective.exchange.v2.MsgCreateSpotLimitOrder";
1968
+ message: MsgCreateSpotLimitOrder$1;
1969
+ };
1970
+ toBinary(): Buffer;
1971
+ toAmino(): {
1972
+ type: "exchange/MsgCreateSpotLimitOrder";
1973
+ value: {
1974
+ sender: string;
1975
+ order: SpotOrderAmino;
1976
+ };
1977
+ };
1978
+ toEip712V2(): {
1979
+ "@type": string;
1980
+ sender: string;
1981
+ order: SpotOrderEip712V2;
1982
+ };
1983
+ }
1984
+ declare class MsgCreateSpotMarketOrder extends MsgBase<SpotOrderParams, MsgCreateSpotMarketOrder$1> {
1985
+ toProto(): MsgCreateSpotMarketOrder$1;
1986
+ toDirectSign(): {
1987
+ type: "/injective.exchange.v2.MsgCreateSpotMarketOrder";
1988
+ message: MsgCreateSpotMarketOrder$1;
1989
+ };
1990
+ toBinary(): Buffer;
1991
+ toAmino(): {
1992
+ type: "exchange/MsgCreateSpotMarketOrder";
1993
+ value: {
1994
+ sender: string;
1995
+ order: SpotOrderAmino;
1996
+ };
1997
+ };
1998
+ toEip712V2(): {
1999
+ "@type": string;
2000
+ sender: string;
2001
+ order: SpotOrderEip712V2;
2002
+ };
2003
+ }
2004
+ interface MsgDepositParams {
2005
+ injectiveAddress: string;
2006
+ subaccountId: string;
2007
+ /** Base units of the denom, not scaled. */
2008
+ amount: Coin;
2009
+ }
2010
+ declare class MsgDeposit extends MsgBase<MsgDepositParams, MsgDeposit$1> {
2011
+ toProto(): MsgDeposit$1;
2012
+ toDirectSign(): {
2013
+ type: "/injective.exchange.v2.MsgDeposit";
2014
+ message: MsgDeposit$1;
2015
+ };
2016
+ toBinary(): Buffer;
2017
+ toAmino(): {
2018
+ type: "exchange/MsgDeposit";
2019
+ value: {
2020
+ sender: string;
2021
+ subaccount_id: string;
2022
+ amount: Coin;
2023
+ };
2024
+ };
2025
+ }
2026
+ interface MsgSubaccountTransferParams {
2027
+ injectiveAddress: string;
2028
+ srcSubaccountId: string;
2029
+ dstSubaccountId: string;
2030
+ /** Base units of each denom, not scaled. */
2031
+ amount: Coin;
2032
+ }
2033
+ declare class MsgSubaccountTransfer extends MsgBase<MsgSubaccountTransferParams, MsgSubaccountTransfer$1> {
2034
+ toProto(): MsgSubaccountTransfer$1;
2035
+ toDirectSign(): {
2036
+ type: "/injective.exchange.v2.MsgSubaccountTransfer";
2037
+ message: MsgSubaccountTransfer$1;
2038
+ };
2039
+ toBinary(): Buffer;
2040
+ toAmino(): {
2041
+ type: "exchange/MsgSubaccountTransfer";
2042
+ value: {
2043
+ sender: string;
2044
+ source_subaccount_id: string;
2045
+ destination_subaccount_id: string;
2046
+ amount: {
2047
+ denom: string;
2048
+ amount: string;
2049
+ };
2050
+ };
2051
+ };
2052
+ }
2053
+ interface MsgExternalTransferParams {
2054
+ injectiveAddress: string;
2055
+ srcSubaccountId: string;
2056
+ /**
2057
+ * The destination subaccount ID: 0x plus 64 hex characters, the recipient's
2058
+ * 20-byte address in the first 20 bytes and a nonce after it. The chain sends
2059
+ * to an account derived from that address, so it belongs to another account,
2060
+ * not to `injectiveAddress`. A bare 20-byte address fails validation.
2061
+ */
2062
+ dstSubaccountId: string;
2063
+ /** Base units of each denom, not scaled. */
2064
+ amount: Coin;
2065
+ }
2066
+ declare class MsgExternalTransfer extends MsgBase<MsgExternalTransferParams, MsgExternalTransfer$1> {
2067
+ toProto(): MsgExternalTransfer$1;
2068
+ toDirectSign(): {
2069
+ type: "/injective.exchange.v2.MsgExternalTransfer";
2070
+ message: MsgExternalTransfer$1;
2071
+ };
2072
+ toBinary(): Buffer;
2073
+ toAmino(): {
2074
+ type: "exchange/MsgExternalTransfer";
2075
+ value: {
2076
+ sender: string;
2077
+ source_subaccount_id: string;
2078
+ destination_subaccount_id: string;
2079
+ amount: {
2080
+ denom: string;
2081
+ amount: string;
2082
+ };
2083
+ };
2084
+ };
2085
+ }
2086
+ interface MsgWithdrawParams {
2087
+ injectiveAddress: string;
2088
+ subaccountId: string;
2089
+ /** Base units of each denom, not scaled. */
2090
+ amount: Coin;
2091
+ }
2092
+ declare class MsgWithdraw extends MsgBase<MsgWithdrawParams, MsgWithdraw$1> {
2093
+ toProto(): MsgWithdraw$1;
2094
+ toDirectSign(): {
2095
+ type: "/injective.exchange.v2.MsgWithdraw";
2096
+ message: MsgWithdraw$1;
2097
+ };
2098
+ toBinary(): Buffer;
2099
+ toAmino(): {
2100
+ type: "exchange/MsgWithdraw";
2101
+ value: {
2102
+ sender: string;
2103
+ subaccount_id: string;
2104
+ amount: {
2105
+ denom: string;
2106
+ amount: string;
2107
+ };
2108
+ };
2109
+ };
2110
+ }
2111
+ interface DerivativeOrderParams {
2112
+ injectiveAddress: string;
2113
+ marketId: string;
2114
+ subaccountId: string;
2115
+ feeRecipient: string;
2116
+ /** Human value, scaled to chain format when the message is built. */
2117
+ price: string;
2118
+ /** Human value, scaled to chain format when the message is built. */
2119
+ quantity: string;
2120
+ /** Human value, scaled to chain format when the message is built. */
2121
+ margin: string;
2122
+ orderType: OrderType;
2123
+ triggerPrice?: string;
2124
+ /** Block after which a resting order expires; zero means no expiry. */
2125
+ expirationBlock?: number;
2126
+ cid?: string;
2127
+ }
2128
+ /** The amino form keeps the human values the caller passed in. */
2129
+ interface DerivativeOrderAmino {
2130
+ market_id: string;
2131
+ order_info: {
2132
+ subaccount_id: string;
2133
+ fee_recipient: string;
2134
+ price: string;
2135
+ quantity: string;
2136
+ cid: string;
2137
+ };
2138
+ order_type: OrderType;
2139
+ margin: string;
2140
+ trigger_price: string;
2141
+ expiration_block: string;
2142
+ }
2143
+ /** The EIP-712 form signs decimals as Cosmos SDK decimal strings. */
2144
+ interface DerivativeOrderEip712V2 {
2145
+ market_id: string;
2146
+ order_info: {
2147
+ subaccount_id: string;
2148
+ fee_recipient: string;
2149
+ price: string;
2150
+ quantity: string;
2151
+ cid: string;
2152
+ };
2153
+ order_type: string;
2154
+ margin: string;
2155
+ trigger_price: string;
2156
+ expiration_block: string;
2157
+ }
2158
+ declare class MsgCreateDerivativeLimitOrder extends MsgBase<DerivativeOrderParams, MsgCreateDerivativeLimitOrder$1> {
2159
+ toProto(): MsgCreateDerivativeLimitOrder$1;
2160
+ toDirectSign(): {
2161
+ type: "/injective.exchange.v2.MsgCreateDerivativeLimitOrder";
2162
+ message: MsgCreateDerivativeLimitOrder$1;
2163
+ };
2164
+ toBinary(): Buffer;
2165
+ toAmino(): {
2166
+ type: "exchange/MsgCreateDerivativeLimitOrder";
2167
+ value: {
2168
+ sender: string;
2169
+ order: DerivativeOrderAmino;
2170
+ };
2171
+ };
2172
+ toEip712V2(): {
2173
+ "@type": string;
2174
+ sender: string;
2175
+ order: DerivativeOrderEip712V2;
2176
+ };
2177
+ }
2178
+ declare class MsgCreateDerivativeMarketOrder extends MsgBase<DerivativeOrderParams, MsgCreateDerivativeMarketOrder$1> {
2179
+ toProto(): MsgCreateDerivativeMarketOrder$1;
2180
+ toDirectSign(): {
2181
+ type: "/injective.exchange.v2.MsgCreateDerivativeMarketOrder";
2182
+ message: MsgCreateDerivativeMarketOrder$1;
2183
+ };
2184
+ toBinary(): Buffer;
2185
+ toAmino(): {
2186
+ type: "exchange/MsgCreateDerivativeMarketOrder";
2187
+ value: {
2188
+ sender: string;
2189
+ order: DerivativeOrderAmino;
2190
+ };
2191
+ };
2192
+ toEip712V2(): {
2193
+ "@type": string;
2194
+ sender: string;
2195
+ order: DerivativeOrderEip712V2;
2196
+ };
2197
+ }
2198
+ interface MsgCancelDerivativeOrderParams {
2199
+ injectiveAddress: string;
2200
+ marketId: string;
2201
+ subaccountId: string;
2202
+ orderHash?: string;
2203
+ orderMask?: OrderMask;
2204
+ cid?: string;
2205
+ }
2206
+ declare class MsgCancelDerivativeOrder extends MsgBase<MsgCancelDerivativeOrderParams, MsgCancelDerivativeOrder$1> {
2207
+ toProto(): MsgCancelDerivativeOrder$1;
2208
+ toDirectSign(): {
2209
+ type: "/injective.exchange.v2.MsgCancelDerivativeOrder";
2210
+ message: MsgCancelDerivativeOrder$1;
2211
+ };
2212
+ toBinary(): Buffer;
2213
+ toAmino(): {
2214
+ type: "exchange/MsgCancelDerivativeOrder";
2215
+ value: {
2216
+ sender: string;
2217
+ market_id: string;
2218
+ subaccount_id: string;
2219
+ order_hash: string;
2220
+ order_mask: number;
2221
+ cid: string;
2222
+ };
2223
+ };
2224
+ }
2225
+ interface MsgBatchCancelDerivativeOrdersParams {
2226
+ injectiveAddress: string;
2227
+ orders: OrderDataParams[];
2228
+ }
2229
+ declare class MsgBatchCancelDerivativeOrders extends MsgBase<MsgBatchCancelDerivativeOrdersParams, MsgBatchCancelDerivativeOrders$1> {
2230
+ toProto(): MsgBatchCancelDerivativeOrders$1;
2231
+ toDirectSign(): {
2232
+ type: "/injective.exchange.v2.MsgBatchCancelDerivativeOrders";
2233
+ message: MsgBatchCancelDerivativeOrders$1;
2234
+ };
2235
+ toBinary(): Buffer;
2236
+ toAmino(): {
2237
+ type: "exchange/MsgBatchCancelDerivativeOrders";
2238
+ value: {
2239
+ sender: string;
2240
+ data: {
2241
+ market_id: string;
2242
+ subaccount_id: string;
2243
+ order_hash: string;
2244
+ order_mask: number;
2245
+ cid: string;
2246
+ }[];
2247
+ };
2248
+ };
2249
+ }
2250
+ interface MsgIncreasePositionMarginParams {
2251
+ injectiveAddress: string;
2252
+ marketId: string;
2253
+ srcSubaccountId: string;
2254
+ dstSubaccountId: string;
2255
+ /** Human value, scaled to chain format when the message is built. */
2256
+ amount: string;
2257
+ }
2258
+ declare class MsgIncreasePositionMargin extends MsgBase<MsgIncreasePositionMarginParams, MsgIncreasePositionMargin$1> {
2259
+ toProto(): MsgIncreasePositionMargin$1;
2260
+ toDirectSign(): {
2261
+ type: "/injective.exchange.v2.MsgIncreasePositionMargin";
2262
+ message: MsgIncreasePositionMargin$1;
2263
+ };
2264
+ toBinary(): Buffer;
2265
+ toAmino(): {
2266
+ type: "exchange/MsgIncreasePositionMargin";
2267
+ value: {
2268
+ sender: string;
2269
+ source_subaccount_id: string;
2270
+ destination_subaccount_id: string;
2271
+ market_id: string;
2272
+ amount: string;
2273
+ };
2274
+ };
2275
+ toEip712V2(): {
2276
+ "@type": string;
2277
+ sender: string;
2278
+ source_subaccount_id: string;
2279
+ destination_subaccount_id: string;
2280
+ market_id: string;
2281
+ amount: string;
2282
+ };
2283
+ }
2284
+ export { BroadcastTxResponse as A, PageResponse as B, QueryTraderDerivativeOrdersResponse as C, OrderType as D, OrderMask as E, TxEncodeResponse as F, Commit as G, Block as H, SignDoc as I, Data as K, SignMode as L, SimulateResponse as M, TxDecodeResponse as N, MarketStatus as O, TxEncodeRequest as P, Coin as R, QuerySubaccountTradeNonceResponse as S, ExecutionType as T, EvidenceList as U, Any as V, BlockID as W, EvmChainId as _, MsgCreateDerivativeLimitOrder as a, QuerySubaccountDepositsResponse as b, MsgSubaccountTransfer as c, MsgCreateSpotLimitOrder as d, MsgCancelSpotOrder as f, ChainId as g, Metadata as h, MsgCreateDerivativeMarketOrder as i, GetTxResponse as j, BroadcastMode as k, MsgDeposit as l, MsgSend as m, MsgBatchCancelDerivativeOrders as n, MsgWithdraw as o, MsgBatchCancelSpotOrders as p, Consensus as q, MsgCancelDerivativeOrder as r, MsgExternalTransfer as s, MsgIncreasePositionMargin as t, MsgCreateSpotMarketOrder as u, OrderSide as v, QueryTraderSpotOrdersResponse as w, QuerySubaccountPositionsResponse as x, QueryExchangeParamsResponse as y, PageRequest as z };