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