coreum-js 2.18.5 → 2.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/coreum/amino/types.js +22 -4
- package/dist/main/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.d.ts +80 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.js +215 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.js +10 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.d.ts +86 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js +230 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.d.ts +53 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.js +252 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.js +10 -0
- package/dist/main/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.d.ts +1 -0
- package/dist/main/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.js +10 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/annotations.d.ts +1 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/annotations.js +10 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/http.d.ts +379 -0
- package/dist/main/coreum/dex/v1/google/googleapis/google/api/http.js +355 -0
- package/dist/main/coreum/dex/v1/google/protobuf/descriptor.d.ts +1336 -0
- package/dist/main/coreum/dex/v1/google/protobuf/descriptor.js +5373 -0
- package/dist/main/coreum/dex/v1/google/protobuf/timestamp.d.ts +128 -0
- package/dist/main/coreum/dex/v1/google/protobuf/timestamp.js +92 -0
- package/dist/main/coreum/dex/v1/query.d.ts +23 -0
- package/dist/main/coreum/dex/v1/query.js +194 -3
- package/dist/module/coreum/amino/types.js +22 -4
- package/dist/module/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.d.ts +80 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-proto/proto/cosmos_proto/cosmos.js +210 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/amino/amino.js +7 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.d.ts +86 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/query/v1beta1/pagination.js +227 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.d.ts +53 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/base/v1beta1/coin.js +249 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/cosmos-sdk/proto/cosmos/query/v1/query.js +7 -0
- package/dist/module/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.d.ts +1 -0
- package/dist/module/coreum/dex/v1/cosmos/gogoproto/gogoproto/gogo.js +7 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/annotations.d.ts +1 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/annotations.js +7 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/http.d.ts +379 -0
- package/dist/module/coreum/dex/v1/google/googleapis/google/api/http.js +352 -0
- package/dist/module/coreum/dex/v1/google/protobuf/descriptor.d.ts +1336 -0
- package/dist/module/coreum/dex/v1/google/protobuf/descriptor.js +5329 -0
- package/dist/module/coreum/dex/v1/google/protobuf/timestamp.d.ts +128 -0
- package/dist/module/coreum/dex/v1/google/protobuf/timestamp.js +89 -0
- package/dist/module/coreum/dex/v1/query.d.ts +23 -0
- package/dist/module/coreum/dex/v1/query.js +193 -2
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* A Timestamp represents a point in time independent of any time zone or local
|
|
5
|
+
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
6
|
+
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
7
|
+
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
8
|
+
* Gregorian calendar backwards to year one.
|
|
9
|
+
*
|
|
10
|
+
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
11
|
+
* second table is needed for interpretation, using a [24-hour linear
|
|
12
|
+
* smear](https://developers.google.com/time/smear).
|
|
13
|
+
*
|
|
14
|
+
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
15
|
+
* restricting to that range, we ensure that we can convert to and from [RFC
|
|
16
|
+
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
17
|
+
*
|
|
18
|
+
* # Examples
|
|
19
|
+
*
|
|
20
|
+
* Example 1: Compute Timestamp from POSIX `time()`.
|
|
21
|
+
*
|
|
22
|
+
* Timestamp timestamp;
|
|
23
|
+
* timestamp.set_seconds(time(NULL));
|
|
24
|
+
* timestamp.set_nanos(0);
|
|
25
|
+
*
|
|
26
|
+
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
27
|
+
*
|
|
28
|
+
* struct timeval tv;
|
|
29
|
+
* gettimeofday(&tv, NULL);
|
|
30
|
+
*
|
|
31
|
+
* Timestamp timestamp;
|
|
32
|
+
* timestamp.set_seconds(tv.tv_sec);
|
|
33
|
+
* timestamp.set_nanos(tv.tv_usec * 1000);
|
|
34
|
+
*
|
|
35
|
+
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
36
|
+
*
|
|
37
|
+
* FILETIME ft;
|
|
38
|
+
* GetSystemTimeAsFileTime(&ft);
|
|
39
|
+
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
40
|
+
*
|
|
41
|
+
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
42
|
+
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
43
|
+
* Timestamp timestamp;
|
|
44
|
+
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
45
|
+
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
46
|
+
*
|
|
47
|
+
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
48
|
+
*
|
|
49
|
+
* long millis = System.currentTimeMillis();
|
|
50
|
+
*
|
|
51
|
+
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
52
|
+
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
53
|
+
*
|
|
54
|
+
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
55
|
+
*
|
|
56
|
+
* Instant now = Instant.now();
|
|
57
|
+
*
|
|
58
|
+
* Timestamp timestamp =
|
|
59
|
+
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
60
|
+
* .setNanos(now.getNano()).build();
|
|
61
|
+
*
|
|
62
|
+
* Example 6: Compute Timestamp from current time in Python.
|
|
63
|
+
*
|
|
64
|
+
* timestamp = Timestamp()
|
|
65
|
+
* timestamp.GetCurrentTime()
|
|
66
|
+
*
|
|
67
|
+
* # JSON Mapping
|
|
68
|
+
*
|
|
69
|
+
* In JSON format, the Timestamp type is encoded as a string in the
|
|
70
|
+
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
71
|
+
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
72
|
+
* where {year} is always expressed using four digits while {month}, {day},
|
|
73
|
+
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
74
|
+
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
75
|
+
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
76
|
+
* is required. A proto3 JSON serializer should always use UTC (as indicated by
|
|
77
|
+
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
|
78
|
+
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
79
|
+
*
|
|
80
|
+
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
81
|
+
* 01:30 UTC on January 15, 2017.
|
|
82
|
+
*
|
|
83
|
+
* In JavaScript, one can convert a Date object to this format using the
|
|
84
|
+
* standard
|
|
85
|
+
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
86
|
+
* method. In Python, a standard `datetime.datetime` object can be converted
|
|
87
|
+
* to this format using
|
|
88
|
+
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
89
|
+
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
90
|
+
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
91
|
+
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
92
|
+
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
93
|
+
*/
|
|
94
|
+
export interface Timestamp {
|
|
95
|
+
/**
|
|
96
|
+
* Represents seconds of UTC time since Unix epoch
|
|
97
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
98
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
99
|
+
*/
|
|
100
|
+
seconds: number;
|
|
101
|
+
/**
|
|
102
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
103
|
+
* second values with fractions must still have non-negative nanos values
|
|
104
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
105
|
+
* inclusive.
|
|
106
|
+
*/
|
|
107
|
+
nanos: number;
|
|
108
|
+
}
|
|
109
|
+
export declare const Timestamp: MessageFns<Timestamp>;
|
|
110
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
111
|
+
export 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 {} ? {
|
|
112
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
113
|
+
} : Partial<T>;
|
|
114
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
115
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
116
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
117
|
+
} & {
|
|
118
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
119
|
+
};
|
|
120
|
+
export interface MessageFns<T> {
|
|
121
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
122
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
123
|
+
fromJSON(object: any): T;
|
|
124
|
+
toJSON(message: T): unknown;
|
|
125
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
126
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
127
|
+
}
|
|
128
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v6.32.0
|
|
5
|
+
// source: google/protobuf/timestamp.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "google.protobuf";
|
|
9
|
+
function createBaseTimestamp() {
|
|
10
|
+
return { seconds: 0, nanos: 0 };
|
|
11
|
+
}
|
|
12
|
+
export const Timestamp = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.seconds !== 0) {
|
|
15
|
+
writer.uint32(8).int64(message.seconds);
|
|
16
|
+
}
|
|
17
|
+
if (message.nanos !== 0) {
|
|
18
|
+
writer.uint32(16).int32(message.nanos);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseTimestamp();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1: {
|
|
30
|
+
if (tag !== 8) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
message.seconds = longToNumber(reader.int64());
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
case 2: {
|
|
37
|
+
if (tag !== 16) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.nanos = reader.int32();
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
reader.skip(tag & 7);
|
|
48
|
+
}
|
|
49
|
+
return message;
|
|
50
|
+
},
|
|
51
|
+
fromJSON(object) {
|
|
52
|
+
return {
|
|
53
|
+
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
54
|
+
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
toJSON(message) {
|
|
58
|
+
const obj = {};
|
|
59
|
+
if (message.seconds !== 0) {
|
|
60
|
+
obj.seconds = Math.round(message.seconds);
|
|
61
|
+
}
|
|
62
|
+
if (message.nanos !== 0) {
|
|
63
|
+
obj.nanos = Math.round(message.nanos);
|
|
64
|
+
}
|
|
65
|
+
return obj;
|
|
66
|
+
},
|
|
67
|
+
create(base) {
|
|
68
|
+
return Timestamp.fromPartial(base ?? {});
|
|
69
|
+
},
|
|
70
|
+
fromPartial(object) {
|
|
71
|
+
const message = createBaseTimestamp();
|
|
72
|
+
message.seconds = object.seconds ?? 0;
|
|
73
|
+
message.nanos = object.nanos ?? 0;
|
|
74
|
+
return message;
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
function longToNumber(int64) {
|
|
78
|
+
const num = globalThis.Number(int64.toString());
|
|
79
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
80
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
81
|
+
}
|
|
82
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
83
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
84
|
+
}
|
|
85
|
+
return num;
|
|
86
|
+
}
|
|
87
|
+
function isSet(value) {
|
|
88
|
+
return value !== null && value !== undefined;
|
|
89
|
+
}
|
|
@@ -43,6 +43,24 @@ export interface QueryOrderBooksResponse {
|
|
|
43
43
|
orderBooks: OrderBookData[];
|
|
44
44
|
pagination: PageResponse | undefined;
|
|
45
45
|
}
|
|
46
|
+
/** QueryOrderBookParamsRequest defines the request type for the `OrderBookParams` query. */
|
|
47
|
+
export interface QueryOrderBookParamsRequest {
|
|
48
|
+
/** base_denom is base order book denom. */
|
|
49
|
+
baseDenom: string;
|
|
50
|
+
/** quote_denom is quote order book denom */
|
|
51
|
+
quoteDenom: string;
|
|
52
|
+
}
|
|
53
|
+
/** QueryOrderBookParamsResponse defines the response type for the `OrderBookParams` query. */
|
|
54
|
+
export interface QueryOrderBookParamsResponse {
|
|
55
|
+
/** price_tick is the minimum price movement an asset price can make, either upward or downward. */
|
|
56
|
+
priceTick: string;
|
|
57
|
+
/** quantity_step is the the smallest allowable step for the base asset inside a market. */
|
|
58
|
+
quantityStep: string;
|
|
59
|
+
/** base_denom_unified_ref_amount is needed to define price tick & quantity step of base denom */
|
|
60
|
+
baseDenomUnifiedRefAmount: string;
|
|
61
|
+
/** quote_denom_unified_ref_amount is needed to define price tick & quantity step of quote denom */
|
|
62
|
+
quoteDenomUnifiedRefAmount: string;
|
|
63
|
+
}
|
|
46
64
|
/** QueryOrderBookOrdersRequest defines the request type for the `OrderBookOrders` query. */
|
|
47
65
|
export interface QueryOrderBookOrdersRequest {
|
|
48
66
|
/** base_denom is base order denom. */
|
|
@@ -76,6 +94,8 @@ export declare const QueryOrdersRequest: MessageFns<QueryOrdersRequest>;
|
|
|
76
94
|
export declare const QueryOrdersResponse: MessageFns<QueryOrdersResponse>;
|
|
77
95
|
export declare const QueryOrderBooksRequest: MessageFns<QueryOrderBooksRequest>;
|
|
78
96
|
export declare const QueryOrderBooksResponse: MessageFns<QueryOrderBooksResponse>;
|
|
97
|
+
export declare const QueryOrderBookParamsRequest: MessageFns<QueryOrderBookParamsRequest>;
|
|
98
|
+
export declare const QueryOrderBookParamsResponse: MessageFns<QueryOrderBookParamsResponse>;
|
|
79
99
|
export declare const QueryOrderBookOrdersRequest: MessageFns<QueryOrderBookOrdersRequest>;
|
|
80
100
|
export declare const QueryOrderBookOrdersResponse: MessageFns<QueryOrderBookOrdersResponse>;
|
|
81
101
|
export declare const QueryAccountDenomOrdersCountRequest: MessageFns<QueryAccountDenomOrdersCountRequest>;
|
|
@@ -90,6 +110,8 @@ export interface Query {
|
|
|
90
110
|
Orders(request: QueryOrdersRequest): Promise<QueryOrdersResponse>;
|
|
91
111
|
/** OrderBooks queries order books. */
|
|
92
112
|
OrderBooks(request: QueryOrderBooksRequest): Promise<QueryOrderBooksResponse>;
|
|
113
|
+
/** OrderBookParams queries order book params. */
|
|
114
|
+
OrderBookParams(request: QueryOrderBookParamsRequest): Promise<QueryOrderBookParamsResponse>;
|
|
93
115
|
/** OrderBookOrders queries order book orders. */
|
|
94
116
|
OrderBookOrders(request: QueryOrderBookOrdersRequest): Promise<QueryOrderBookOrdersResponse>;
|
|
95
117
|
/** AccountDenomOrdersCount queries account denom orders count. */
|
|
@@ -106,6 +128,7 @@ export declare class QueryClientImpl implements Query {
|
|
|
106
128
|
Order(request: QueryOrderRequest): Promise<QueryOrderResponse>;
|
|
107
129
|
Orders(request: QueryOrdersRequest): Promise<QueryOrdersResponse>;
|
|
108
130
|
OrderBooks(request: QueryOrderBooksRequest): Promise<QueryOrderBooksResponse>;
|
|
131
|
+
OrderBookParams(request: QueryOrderBookParamsRequest): Promise<QueryOrderBookParamsResponse>;
|
|
109
132
|
OrderBookOrders(request: QueryOrderBookOrdersRequest): Promise<QueryOrderBookOrdersResponse>;
|
|
110
133
|
AccountDenomOrdersCount(request: QueryAccountDenomOrdersCountRequest): Promise<QueryAccountDenomOrdersCountResponse>;
|
|
111
134
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
-
// protoc
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v6.32.0
|
|
5
5
|
// source: coreum-protos/dex/query.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
@@ -508,6 +508,191 @@ export const QueryOrderBooksResponse = {
|
|
|
508
508
|
return message;
|
|
509
509
|
},
|
|
510
510
|
};
|
|
511
|
+
function createBaseQueryOrderBookParamsRequest() {
|
|
512
|
+
return { baseDenom: "", quoteDenom: "" };
|
|
513
|
+
}
|
|
514
|
+
export const QueryOrderBookParamsRequest = {
|
|
515
|
+
encode(message, writer = new BinaryWriter()) {
|
|
516
|
+
if (message.baseDenom !== "") {
|
|
517
|
+
writer.uint32(10).string(message.baseDenom);
|
|
518
|
+
}
|
|
519
|
+
if (message.quoteDenom !== "") {
|
|
520
|
+
writer.uint32(18).string(message.quoteDenom);
|
|
521
|
+
}
|
|
522
|
+
return writer;
|
|
523
|
+
},
|
|
524
|
+
decode(input, length) {
|
|
525
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
526
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
527
|
+
const message = createBaseQueryOrderBookParamsRequest();
|
|
528
|
+
while (reader.pos < end) {
|
|
529
|
+
const tag = reader.uint32();
|
|
530
|
+
switch (tag >>> 3) {
|
|
531
|
+
case 1: {
|
|
532
|
+
if (tag !== 10) {
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
message.baseDenom = reader.string();
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
case 2: {
|
|
539
|
+
if (tag !== 18) {
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
message.quoteDenom = reader.string();
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
reader.skip(tag & 7);
|
|
550
|
+
}
|
|
551
|
+
return message;
|
|
552
|
+
},
|
|
553
|
+
fromJSON(object) {
|
|
554
|
+
return {
|
|
555
|
+
baseDenom: isSet(object.baseDenom)
|
|
556
|
+
? globalThis.String(object.baseDenom)
|
|
557
|
+
: "",
|
|
558
|
+
quoteDenom: isSet(object.quoteDenom)
|
|
559
|
+
? globalThis.String(object.quoteDenom)
|
|
560
|
+
: "",
|
|
561
|
+
};
|
|
562
|
+
},
|
|
563
|
+
toJSON(message) {
|
|
564
|
+
const obj = {};
|
|
565
|
+
if (message.baseDenom !== "") {
|
|
566
|
+
obj.baseDenom = message.baseDenom;
|
|
567
|
+
}
|
|
568
|
+
if (message.quoteDenom !== "") {
|
|
569
|
+
obj.quoteDenom = message.quoteDenom;
|
|
570
|
+
}
|
|
571
|
+
return obj;
|
|
572
|
+
},
|
|
573
|
+
create(base) {
|
|
574
|
+
return QueryOrderBookParamsRequest.fromPartial(base ?? {});
|
|
575
|
+
},
|
|
576
|
+
fromPartial(object) {
|
|
577
|
+
const message = createBaseQueryOrderBookParamsRequest();
|
|
578
|
+
message.baseDenom = object.baseDenom ?? "";
|
|
579
|
+
message.quoteDenom = object.quoteDenom ?? "";
|
|
580
|
+
return message;
|
|
581
|
+
},
|
|
582
|
+
};
|
|
583
|
+
function createBaseQueryOrderBookParamsResponse() {
|
|
584
|
+
return {
|
|
585
|
+
priceTick: "",
|
|
586
|
+
quantityStep: "",
|
|
587
|
+
baseDenomUnifiedRefAmount: "",
|
|
588
|
+
quoteDenomUnifiedRefAmount: "",
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
export const QueryOrderBookParamsResponse = {
|
|
592
|
+
encode(message, writer = new BinaryWriter()) {
|
|
593
|
+
if (message.priceTick !== "") {
|
|
594
|
+
writer.uint32(10).string(message.priceTick);
|
|
595
|
+
}
|
|
596
|
+
if (message.quantityStep !== "") {
|
|
597
|
+
writer.uint32(18).string(message.quantityStep);
|
|
598
|
+
}
|
|
599
|
+
if (message.baseDenomUnifiedRefAmount !== "") {
|
|
600
|
+
writer.uint32(26).string(message.baseDenomUnifiedRefAmount);
|
|
601
|
+
}
|
|
602
|
+
if (message.quoteDenomUnifiedRefAmount !== "") {
|
|
603
|
+
writer.uint32(34).string(message.quoteDenomUnifiedRefAmount);
|
|
604
|
+
}
|
|
605
|
+
return writer;
|
|
606
|
+
},
|
|
607
|
+
decode(input, length) {
|
|
608
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
609
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
610
|
+
const message = createBaseQueryOrderBookParamsResponse();
|
|
611
|
+
while (reader.pos < end) {
|
|
612
|
+
const tag = reader.uint32();
|
|
613
|
+
switch (tag >>> 3) {
|
|
614
|
+
case 1: {
|
|
615
|
+
if (tag !== 10) {
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
message.priceTick = reader.string();
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
case 2: {
|
|
622
|
+
if (tag !== 18) {
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
message.quantityStep = reader.string();
|
|
626
|
+
continue;
|
|
627
|
+
}
|
|
628
|
+
case 3: {
|
|
629
|
+
if (tag !== 26) {
|
|
630
|
+
break;
|
|
631
|
+
}
|
|
632
|
+
message.baseDenomUnifiedRefAmount = reader.string();
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
case 4: {
|
|
636
|
+
if (tag !== 34) {
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
message.quoteDenomUnifiedRefAmount = reader.string();
|
|
640
|
+
continue;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
reader.skip(tag & 7);
|
|
647
|
+
}
|
|
648
|
+
return message;
|
|
649
|
+
},
|
|
650
|
+
fromJSON(object) {
|
|
651
|
+
return {
|
|
652
|
+
priceTick: isSet(object.priceTick)
|
|
653
|
+
? globalThis.String(object.priceTick)
|
|
654
|
+
: "",
|
|
655
|
+
quantityStep: isSet(object.quantityStep)
|
|
656
|
+
? globalThis.String(object.quantityStep)
|
|
657
|
+
: "",
|
|
658
|
+
baseDenomUnifiedRefAmount: isSet(object.baseDenomUnifiedRefAmount)
|
|
659
|
+
? globalThis.String(object.baseDenomUnifiedRefAmount)
|
|
660
|
+
: "",
|
|
661
|
+
quoteDenomUnifiedRefAmount: isSet(object.quoteDenomUnifiedRefAmount)
|
|
662
|
+
? globalThis.String(object.quoteDenomUnifiedRefAmount)
|
|
663
|
+
: "",
|
|
664
|
+
};
|
|
665
|
+
},
|
|
666
|
+
toJSON(message) {
|
|
667
|
+
const obj = {};
|
|
668
|
+
if (message.priceTick !== "") {
|
|
669
|
+
obj.priceTick = message.priceTick;
|
|
670
|
+
}
|
|
671
|
+
if (message.quantityStep !== "") {
|
|
672
|
+
obj.quantityStep = message.quantityStep;
|
|
673
|
+
}
|
|
674
|
+
if (message.baseDenomUnifiedRefAmount !== "") {
|
|
675
|
+
obj.baseDenomUnifiedRefAmount = message.baseDenomUnifiedRefAmount;
|
|
676
|
+
}
|
|
677
|
+
if (message.quoteDenomUnifiedRefAmount !== "") {
|
|
678
|
+
obj.quoteDenomUnifiedRefAmount = message.quoteDenomUnifiedRefAmount;
|
|
679
|
+
}
|
|
680
|
+
return obj;
|
|
681
|
+
},
|
|
682
|
+
create(base) {
|
|
683
|
+
return QueryOrderBookParamsResponse.fromPartial(base ?? {});
|
|
684
|
+
},
|
|
685
|
+
fromPartial(object) {
|
|
686
|
+
const message = createBaseQueryOrderBookParamsResponse();
|
|
687
|
+
message.priceTick = object.priceTick ?? "";
|
|
688
|
+
message.quantityStep = object.quantityStep ?? "";
|
|
689
|
+
message.baseDenomUnifiedRefAmount =
|
|
690
|
+
object.baseDenomUnifiedRefAmount ?? "";
|
|
691
|
+
message.quoteDenomUnifiedRefAmount =
|
|
692
|
+
object.quoteDenomUnifiedRefAmount ?? "";
|
|
693
|
+
return message;
|
|
694
|
+
},
|
|
695
|
+
};
|
|
511
696
|
function createBaseQueryOrderBookOrdersRequest() {
|
|
512
697
|
return { baseDenom: "", quoteDenom: "", side: 0, pagination: undefined };
|
|
513
698
|
}
|
|
@@ -822,6 +1007,7 @@ export class QueryClientImpl {
|
|
|
822
1007
|
this.Order = this.Order.bind(this);
|
|
823
1008
|
this.Orders = this.Orders.bind(this);
|
|
824
1009
|
this.OrderBooks = this.OrderBooks.bind(this);
|
|
1010
|
+
this.OrderBookParams = this.OrderBookParams.bind(this);
|
|
825
1011
|
this.OrderBookOrders = this.OrderBookOrders.bind(this);
|
|
826
1012
|
this.AccountDenomOrdersCount = this.AccountDenomOrdersCount.bind(this);
|
|
827
1013
|
}
|
|
@@ -845,6 +1031,11 @@ export class QueryClientImpl {
|
|
|
845
1031
|
const promise = this.rpc.request(this.service, "OrderBooks", data);
|
|
846
1032
|
return promise.then((data) => QueryOrderBooksResponse.decode(new BinaryReader(data)));
|
|
847
1033
|
}
|
|
1034
|
+
OrderBookParams(request) {
|
|
1035
|
+
const data = QueryOrderBookParamsRequest.encode(request).finish();
|
|
1036
|
+
const promise = this.rpc.request(this.service, "OrderBookParams", data);
|
|
1037
|
+
return promise.then((data) => QueryOrderBookParamsResponse.decode(new BinaryReader(data)));
|
|
1038
|
+
}
|
|
848
1039
|
OrderBookOrders(request) {
|
|
849
1040
|
const data = QueryOrderBookOrdersRequest.encode(request).finish();
|
|
850
1041
|
const promise = this.rpc.request(this.service, "OrderBookOrders", data);
|