coreum-js 2.18.6 → 2.18.8
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/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/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,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v6.32.0
|
|
6
|
+
// source: google/protobuf/timestamp.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.Timestamp = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "google.protobuf";
|
|
12
|
+
function createBaseTimestamp() {
|
|
13
|
+
return { seconds: 0, nanos: 0 };
|
|
14
|
+
}
|
|
15
|
+
exports.Timestamp = {
|
|
16
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
17
|
+
if (message.seconds !== 0) {
|
|
18
|
+
writer.uint32(8).int64(message.seconds);
|
|
19
|
+
}
|
|
20
|
+
if (message.nanos !== 0) {
|
|
21
|
+
writer.uint32(16).int32(message.nanos);
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
27
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = createBaseTimestamp();
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
const tag = reader.uint32();
|
|
31
|
+
switch (tag >>> 3) {
|
|
32
|
+
case 1: {
|
|
33
|
+
if (tag !== 8) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
message.seconds = longToNumber(reader.int64());
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
case 2: {
|
|
40
|
+
if (tag !== 16) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
message.nanos = reader.int32();
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
reader.skip(tag & 7);
|
|
51
|
+
}
|
|
52
|
+
return message;
|
|
53
|
+
},
|
|
54
|
+
fromJSON(object) {
|
|
55
|
+
return {
|
|
56
|
+
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
57
|
+
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
toJSON(message) {
|
|
61
|
+
const obj = {};
|
|
62
|
+
if (message.seconds !== 0) {
|
|
63
|
+
obj.seconds = Math.round(message.seconds);
|
|
64
|
+
}
|
|
65
|
+
if (message.nanos !== 0) {
|
|
66
|
+
obj.nanos = Math.round(message.nanos);
|
|
67
|
+
}
|
|
68
|
+
return obj;
|
|
69
|
+
},
|
|
70
|
+
create(base) {
|
|
71
|
+
return exports.Timestamp.fromPartial(base ?? {});
|
|
72
|
+
},
|
|
73
|
+
fromPartial(object) {
|
|
74
|
+
const message = createBaseTimestamp();
|
|
75
|
+
message.seconds = object.seconds ?? 0;
|
|
76
|
+
message.nanos = object.nanos ?? 0;
|
|
77
|
+
return message;
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
function longToNumber(int64) {
|
|
81
|
+
const num = globalThis.Number(int64.toString());
|
|
82
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
83
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
84
|
+
}
|
|
85
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
86
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
87
|
+
}
|
|
88
|
+
return num;
|
|
89
|
+
}
|
|
90
|
+
function isSet(value) {
|
|
91
|
+
return value !== null && value !== undefined;
|
|
92
|
+
}
|
|
@@ -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,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
5
|
-
// protoc
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v6.32.0
|
|
6
6
|
// source: coreum-protos/dex/query.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.QueryClientImpl = exports.QueryServiceName = exports.QueryAccountDenomOrdersCountResponse = exports.QueryAccountDenomOrdersCountRequest = exports.QueryOrderBookOrdersResponse = exports.QueryOrderBookOrdersRequest = exports.QueryOrderBooksResponse = exports.QueryOrderBooksRequest = exports.QueryOrdersResponse = exports.QueryOrdersRequest = exports.QueryOrderResponse = exports.QueryOrderRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.QueryClientImpl = exports.QueryServiceName = exports.QueryAccountDenomOrdersCountResponse = exports.QueryAccountDenomOrdersCountRequest = exports.QueryOrderBookOrdersResponse = exports.QueryOrderBookOrdersRequest = exports.QueryOrderBookParamsResponse = exports.QueryOrderBookParamsRequest = exports.QueryOrderBooksResponse = exports.QueryOrderBooksRequest = exports.QueryOrdersResponse = exports.QueryOrdersRequest = exports.QueryOrderResponse = exports.QueryOrderRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const binary_1 = require("cosmjs-types/binary");
|
|
11
11
|
const pagination_1 = require("cosmjs-types/cosmos/base/query/v1beta1/pagination");
|
|
@@ -511,6 +511,191 @@ exports.QueryOrderBooksResponse = {
|
|
|
511
511
|
return message;
|
|
512
512
|
},
|
|
513
513
|
};
|
|
514
|
+
function createBaseQueryOrderBookParamsRequest() {
|
|
515
|
+
return { baseDenom: "", quoteDenom: "" };
|
|
516
|
+
}
|
|
517
|
+
exports.QueryOrderBookParamsRequest = {
|
|
518
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
519
|
+
if (message.baseDenom !== "") {
|
|
520
|
+
writer.uint32(10).string(message.baseDenom);
|
|
521
|
+
}
|
|
522
|
+
if (message.quoteDenom !== "") {
|
|
523
|
+
writer.uint32(18).string(message.quoteDenom);
|
|
524
|
+
}
|
|
525
|
+
return writer;
|
|
526
|
+
},
|
|
527
|
+
decode(input, length) {
|
|
528
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
529
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
530
|
+
const message = createBaseQueryOrderBookParamsRequest();
|
|
531
|
+
while (reader.pos < end) {
|
|
532
|
+
const tag = reader.uint32();
|
|
533
|
+
switch (tag >>> 3) {
|
|
534
|
+
case 1: {
|
|
535
|
+
if (tag !== 10) {
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
message.baseDenom = reader.string();
|
|
539
|
+
continue;
|
|
540
|
+
}
|
|
541
|
+
case 2: {
|
|
542
|
+
if (tag !== 18) {
|
|
543
|
+
break;
|
|
544
|
+
}
|
|
545
|
+
message.quoteDenom = reader.string();
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
reader.skip(tag & 7);
|
|
553
|
+
}
|
|
554
|
+
return message;
|
|
555
|
+
},
|
|
556
|
+
fromJSON(object) {
|
|
557
|
+
return {
|
|
558
|
+
baseDenom: isSet(object.baseDenom)
|
|
559
|
+
? globalThis.String(object.baseDenom)
|
|
560
|
+
: "",
|
|
561
|
+
quoteDenom: isSet(object.quoteDenom)
|
|
562
|
+
? globalThis.String(object.quoteDenom)
|
|
563
|
+
: "",
|
|
564
|
+
};
|
|
565
|
+
},
|
|
566
|
+
toJSON(message) {
|
|
567
|
+
const obj = {};
|
|
568
|
+
if (message.baseDenom !== "") {
|
|
569
|
+
obj.baseDenom = message.baseDenom;
|
|
570
|
+
}
|
|
571
|
+
if (message.quoteDenom !== "") {
|
|
572
|
+
obj.quoteDenom = message.quoteDenom;
|
|
573
|
+
}
|
|
574
|
+
return obj;
|
|
575
|
+
},
|
|
576
|
+
create(base) {
|
|
577
|
+
return exports.QueryOrderBookParamsRequest.fromPartial(base ?? {});
|
|
578
|
+
},
|
|
579
|
+
fromPartial(object) {
|
|
580
|
+
const message = createBaseQueryOrderBookParamsRequest();
|
|
581
|
+
message.baseDenom = object.baseDenom ?? "";
|
|
582
|
+
message.quoteDenom = object.quoteDenom ?? "";
|
|
583
|
+
return message;
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
function createBaseQueryOrderBookParamsResponse() {
|
|
587
|
+
return {
|
|
588
|
+
priceTick: "",
|
|
589
|
+
quantityStep: "",
|
|
590
|
+
baseDenomUnifiedRefAmount: "",
|
|
591
|
+
quoteDenomUnifiedRefAmount: "",
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
exports.QueryOrderBookParamsResponse = {
|
|
595
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
596
|
+
if (message.priceTick !== "") {
|
|
597
|
+
writer.uint32(10).string(message.priceTick);
|
|
598
|
+
}
|
|
599
|
+
if (message.quantityStep !== "") {
|
|
600
|
+
writer.uint32(18).string(message.quantityStep);
|
|
601
|
+
}
|
|
602
|
+
if (message.baseDenomUnifiedRefAmount !== "") {
|
|
603
|
+
writer.uint32(26).string(message.baseDenomUnifiedRefAmount);
|
|
604
|
+
}
|
|
605
|
+
if (message.quoteDenomUnifiedRefAmount !== "") {
|
|
606
|
+
writer.uint32(34).string(message.quoteDenomUnifiedRefAmount);
|
|
607
|
+
}
|
|
608
|
+
return writer;
|
|
609
|
+
},
|
|
610
|
+
decode(input, length) {
|
|
611
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
612
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
613
|
+
const message = createBaseQueryOrderBookParamsResponse();
|
|
614
|
+
while (reader.pos < end) {
|
|
615
|
+
const tag = reader.uint32();
|
|
616
|
+
switch (tag >>> 3) {
|
|
617
|
+
case 1: {
|
|
618
|
+
if (tag !== 10) {
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
message.priceTick = reader.string();
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
case 2: {
|
|
625
|
+
if (tag !== 18) {
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
message.quantityStep = reader.string();
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
case 3: {
|
|
632
|
+
if (tag !== 26) {
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
message.baseDenomUnifiedRefAmount = reader.string();
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
case 4: {
|
|
639
|
+
if (tag !== 34) {
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
message.quoteDenomUnifiedRefAmount = reader.string();
|
|
643
|
+
continue;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
reader.skip(tag & 7);
|
|
650
|
+
}
|
|
651
|
+
return message;
|
|
652
|
+
},
|
|
653
|
+
fromJSON(object) {
|
|
654
|
+
return {
|
|
655
|
+
priceTick: isSet(object.priceTick)
|
|
656
|
+
? globalThis.String(object.priceTick)
|
|
657
|
+
: "",
|
|
658
|
+
quantityStep: isSet(object.quantityStep)
|
|
659
|
+
? globalThis.String(object.quantityStep)
|
|
660
|
+
: "",
|
|
661
|
+
baseDenomUnifiedRefAmount: isSet(object.baseDenomUnifiedRefAmount)
|
|
662
|
+
? globalThis.String(object.baseDenomUnifiedRefAmount)
|
|
663
|
+
: "",
|
|
664
|
+
quoteDenomUnifiedRefAmount: isSet(object.quoteDenomUnifiedRefAmount)
|
|
665
|
+
? globalThis.String(object.quoteDenomUnifiedRefAmount)
|
|
666
|
+
: "",
|
|
667
|
+
};
|
|
668
|
+
},
|
|
669
|
+
toJSON(message) {
|
|
670
|
+
const obj = {};
|
|
671
|
+
if (message.priceTick !== "") {
|
|
672
|
+
obj.priceTick = message.priceTick;
|
|
673
|
+
}
|
|
674
|
+
if (message.quantityStep !== "") {
|
|
675
|
+
obj.quantityStep = message.quantityStep;
|
|
676
|
+
}
|
|
677
|
+
if (message.baseDenomUnifiedRefAmount !== "") {
|
|
678
|
+
obj.baseDenomUnifiedRefAmount = message.baseDenomUnifiedRefAmount;
|
|
679
|
+
}
|
|
680
|
+
if (message.quoteDenomUnifiedRefAmount !== "") {
|
|
681
|
+
obj.quoteDenomUnifiedRefAmount = message.quoteDenomUnifiedRefAmount;
|
|
682
|
+
}
|
|
683
|
+
return obj;
|
|
684
|
+
},
|
|
685
|
+
create(base) {
|
|
686
|
+
return exports.QueryOrderBookParamsResponse.fromPartial(base ?? {});
|
|
687
|
+
},
|
|
688
|
+
fromPartial(object) {
|
|
689
|
+
const message = createBaseQueryOrderBookParamsResponse();
|
|
690
|
+
message.priceTick = object.priceTick ?? "";
|
|
691
|
+
message.quantityStep = object.quantityStep ?? "";
|
|
692
|
+
message.baseDenomUnifiedRefAmount =
|
|
693
|
+
object.baseDenomUnifiedRefAmount ?? "";
|
|
694
|
+
message.quoteDenomUnifiedRefAmount =
|
|
695
|
+
object.quoteDenomUnifiedRefAmount ?? "";
|
|
696
|
+
return message;
|
|
697
|
+
},
|
|
698
|
+
};
|
|
514
699
|
function createBaseQueryOrderBookOrdersRequest() {
|
|
515
700
|
return { baseDenom: "", quoteDenom: "", side: 0, pagination: undefined };
|
|
516
701
|
}
|
|
@@ -823,6 +1008,7 @@ class QueryClientImpl {
|
|
|
823
1008
|
this.Order = this.Order.bind(this);
|
|
824
1009
|
this.Orders = this.Orders.bind(this);
|
|
825
1010
|
this.OrderBooks = this.OrderBooks.bind(this);
|
|
1011
|
+
this.OrderBookParams = this.OrderBookParams.bind(this);
|
|
826
1012
|
this.OrderBookOrders = this.OrderBookOrders.bind(this);
|
|
827
1013
|
this.AccountDenomOrdersCount = this.AccountDenomOrdersCount.bind(this);
|
|
828
1014
|
}
|
|
@@ -846,6 +1032,11 @@ class QueryClientImpl {
|
|
|
846
1032
|
const promise = this.rpc.request(this.service, "OrderBooks", data);
|
|
847
1033
|
return promise.then((data) => exports.QueryOrderBooksResponse.decode(new binary_1.BinaryReader(data)));
|
|
848
1034
|
}
|
|
1035
|
+
OrderBookParams(request) {
|
|
1036
|
+
const data = exports.QueryOrderBookParamsRequest.encode(request).finish();
|
|
1037
|
+
const promise = this.rpc.request(this.service, "OrderBookParams", data);
|
|
1038
|
+
return promise.then((data) => exports.QueryOrderBookParamsResponse.decode(new binary_1.BinaryReader(data)));
|
|
1039
|
+
}
|
|
849
1040
|
OrderBookOrders(request) {
|
|
850
1041
|
const data = exports.QueryOrderBookOrdersRequest.encode(request).finish();
|
|
851
1042
|
const promise = this.rpc.request(this.service, "OrderBookOrders", data);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos_proto";
|
|
3
|
+
export declare enum ScalarType {
|
|
4
|
+
SCALAR_TYPE_UNSPECIFIED = 0,
|
|
5
|
+
SCALAR_TYPE_STRING = 1,
|
|
6
|
+
SCALAR_TYPE_BYTES = 2,
|
|
7
|
+
UNRECOGNIZED = -1
|
|
8
|
+
}
|
|
9
|
+
export declare function scalarTypeFromJSON(object: any): ScalarType;
|
|
10
|
+
export declare function scalarTypeToJSON(object: ScalarType): string;
|
|
11
|
+
/**
|
|
12
|
+
* InterfaceDescriptor describes an interface type to be used with
|
|
13
|
+
* accepts_interface and implements_interface and declared by declare_interface.
|
|
14
|
+
*/
|
|
15
|
+
export interface InterfaceDescriptor {
|
|
16
|
+
/**
|
|
17
|
+
* name is the name of the interface. It should be a short-name (without
|
|
18
|
+
* a period) such that the fully qualified name of the interface will be
|
|
19
|
+
* package.name, ex. for the package a.b and interface named C, the
|
|
20
|
+
* fully-qualified name will be a.b.C.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* description is a human-readable description of the interface and its
|
|
25
|
+
* purpose.
|
|
26
|
+
*/
|
|
27
|
+
description: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* ScalarDescriptor describes an scalar type to be used with
|
|
31
|
+
* the scalar field option and declared by declare_scalar.
|
|
32
|
+
* Scalars extend simple protobuf built-in types with additional
|
|
33
|
+
* syntax and semantics, for instance to represent big integers.
|
|
34
|
+
* Scalars should ideally define an encoding such that there is only one
|
|
35
|
+
* valid syntactical representation for a given semantic meaning,
|
|
36
|
+
* i.e. the encoding should be deterministic.
|
|
37
|
+
*/
|
|
38
|
+
export interface ScalarDescriptor {
|
|
39
|
+
/**
|
|
40
|
+
* name is the name of the scalar. It should be a short-name (without
|
|
41
|
+
* a period) such that the fully qualified name of the scalar will be
|
|
42
|
+
* package.name, ex. for the package a.b and scalar named C, the
|
|
43
|
+
* fully-qualified name will be a.b.C.
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
* description is a human-readable description of the scalar and its
|
|
48
|
+
* encoding format. For instance a big integer or decimal scalar should
|
|
49
|
+
* specify precisely the expected encoding format.
|
|
50
|
+
*/
|
|
51
|
+
description: string;
|
|
52
|
+
/**
|
|
53
|
+
* field_type is the type of field with which this scalar can be used.
|
|
54
|
+
* Scalars can be used with one and only one type of field so that
|
|
55
|
+
* encoding standards and simple and clear. Currently only string and
|
|
56
|
+
* bytes fields are supported for scalars.
|
|
57
|
+
*/
|
|
58
|
+
fieldType: ScalarType[];
|
|
59
|
+
}
|
|
60
|
+
export declare const InterfaceDescriptor: MessageFns<InterfaceDescriptor>;
|
|
61
|
+
export declare const ScalarDescriptor: MessageFns<ScalarDescriptor>;
|
|
62
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
63
|
+
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 {} ? {
|
|
64
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
65
|
+
} : Partial<T>;
|
|
66
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
67
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
68
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
69
|
+
} & {
|
|
70
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
71
|
+
};
|
|
72
|
+
export interface MessageFns<T> {
|
|
73
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
74
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
75
|
+
fromJSON(object: any): T;
|
|
76
|
+
toJSON(message: T): unknown;
|
|
77
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
78
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
79
|
+
}
|
|
80
|
+
export {};
|