coreum-js 2.16.3 → 2.17.0
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/client/index.js +15 -16
- package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
- package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/main/coreum/asset/ft/v1/token.js +276 -200
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
- package/dist/main/coreum/asset/index.d.ts +2 -3
- package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
- package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/main/coreum/customparams/v1/query.js +35 -29
- package/dist/main/coreum/dex/index.d.ts +1 -0
- package/dist/main/coreum/dex/index.js +12 -0
- package/dist/main/coreum/dex/v1/event.d.ts +73 -0
- package/dist/main/coreum/dex/v1/event.js +470 -0
- package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/main/coreum/dex/v1/genesis.js +318 -0
- package/dist/main/coreum/dex/v1/order.d.ts +172 -0
- package/dist/main/coreum/dex/v1/order.js +1137 -0
- package/dist/main/coreum/dex/v1/params.d.ts +34 -0
- package/dist/main/coreum/dex/v1/params.js +139 -0
- package/dist/main/coreum/dex/v1/query.d.ts +133 -0
- package/dist/main/coreum/dex/v1/query.js +873 -0
- package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/main/coreum/dex/v1/tx.js +521 -0
- package/dist/main/coreum/extensions/dex.d.ts +12 -0
- package/dist/main/coreum/extensions/dex.js +32 -0
- package/dist/main/coreum/extensions/ft.js +2 -1
- package/dist/main/coreum/extensions/nft.js +2 -1
- package/dist/main/coreum/extensions/nftbeta.js +2 -1
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/main/coreum/feemodel/v1/query.js +196 -43
- package/dist/main/coreum/index.d.ts +46 -0
- package/dist/main/coreum/index.js +58 -1
- package/dist/main/coreum/nft/index.d.ts +1 -2
- package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/bank.js +2 -1
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +11 -10
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +16 -9
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.d.ts +2636 -6
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.d.ts +14 -2
- package/dist/main/google/protobuf/any.js +6 -7
- package/dist/main/google/protobuf/duration.d.ts +14 -2
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.d.ts +14 -2
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/index.js +7 -17
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.d.ts +6360 -92
- package/dist/main/tendermint/abci/types.js +195 -235
- package/dist/main/tendermint/crypto/keys.d.ts +14 -2
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.d.ts +152 -10
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.d.ts +196 -12
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.d.ts +1744 -26
- package/dist/main/tendermint/types/types.js +62 -73
- package/dist/main/tendermint/types/validator.d.ts +230 -6
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.d.ts +28 -4
- package/dist/main/tendermint/version/types.js +6 -8
- package/dist/main/types/core.d.ts +2 -1
- package/dist/main/types/core.js +2 -0
- package/dist/main/utils/convertStringToAny.d.ts +0 -1
- package/dist/main/utils/nft.js +2 -1
- package/dist/main/wasm/v1/authz.d.ts +20 -75
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/extensions/wasm.js +2 -1
- package/dist/main/wasm/v1/genesis.d.ts +14 -34
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -26
- package/dist/main/wasm/v1/ibc.js +91 -76
- package/dist/main/wasm/v1/index.d.ts +1 -2
- package/dist/main/wasm/v1/pagination.d.ts +40 -4
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -106
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -187
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -210
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -67
- package/dist/main/wasm/v1/types.js +224 -195
- package/dist/module/client/index.js +2 -1
- package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
- package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
- package/dist/module/coreum/asset/index.d.ts +2 -3
- package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
- package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/module/coreum/customparams/v1/query.js +32 -23
- package/dist/module/coreum/dex/index.d.ts +1 -0
- package/dist/module/coreum/dex/index.js +9 -0
- package/dist/module/coreum/dex/v1/event.d.ts +73 -0
- package/dist/module/coreum/dex/v1/event.js +467 -0
- package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/module/coreum/dex/v1/genesis.js +315 -0
- package/dist/module/coreum/dex/v1/order.d.ts +172 -0
- package/dist/module/coreum/dex/v1/order.js +1128 -0
- package/dist/module/coreum/dex/v1/params.d.ts +34 -0
- package/dist/module/coreum/dex/v1/params.js +136 -0
- package/dist/module/coreum/dex/v1/query.d.ts +133 -0
- package/dist/module/coreum/dex/v1/query.js +871 -0
- package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/module/coreum/dex/v1/tx.js +519 -0
- package/dist/module/coreum/extensions/dex.d.ts +12 -0
- package/dist/module/coreum/extensions/dex.js +28 -0
- package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/module/coreum/feemodel/v1/query.js +191 -35
- package/dist/module/coreum/index.d.ts +46 -0
- package/dist/module/coreum/index.js +57 -0
- package/dist/module/coreum/nft/index.d.ts +1 -2
- package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
- package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/module/cosmos/extensions/gov.d.ts +13 -13
- package/dist/module/cosmos/index.d.ts +8 -8
- package/dist/module/google/api/http.d.ts +2636 -6
- package/dist/module/google/protobuf/any.d.ts +14 -2
- package/dist/module/google/protobuf/duration.d.ts +14 -2
- package/dist/module/google/protobuf/timestamp.d.ts +14 -2
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/tendermint/abci/types.d.ts +6360 -92
- package/dist/module/tendermint/crypto/keys.d.ts +14 -2
- package/dist/module/tendermint/crypto/proof.d.ts +152 -10
- package/dist/module/tendermint/types/params.d.ts +196 -12
- package/dist/module/tendermint/types/types.d.ts +1744 -26
- package/dist/module/tendermint/types/validator.d.ts +230 -6
- package/dist/module/tendermint/version/types.d.ts +28 -4
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/utils/convertStringToAny.d.ts +0 -1
- package/dist/module/wasm/v1/authz.d.ts +20 -75
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -34
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -26
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/pagination.d.ts +40 -4
- package/dist/module/wasm/v1/proposal.d.ts +23 -106
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -187
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -210
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -67
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
2
|
+
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
|
3
|
+
export declare const protobufPackage = "coreum.dex.v1";
|
|
4
|
+
/** Params keeps gov manageable parameters. */
|
|
5
|
+
export interface Params {
|
|
6
|
+
/** default_unified_ref_amount is the default approximate amount you need to buy 1USD, used to for tokens without custom value */
|
|
7
|
+
defaultUnifiedRefAmount: string;
|
|
8
|
+
/** price_tick_exponent is the exponent used for the price tick calculation */
|
|
9
|
+
priceTickExponent: number;
|
|
10
|
+
/** max_orders_per_denom is the maximum number of orders per denom the user can have */
|
|
11
|
+
maxOrdersPerDenom: number;
|
|
12
|
+
/** order_reserve is the reserve required to save the order in the order book */
|
|
13
|
+
orderReserve: Coin | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const Params: MessageFns<Params>;
|
|
16
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
17
|
+
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 {} ? {
|
|
18
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
19
|
+
} : Partial<T>;
|
|
20
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
21
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
22
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
23
|
+
} & {
|
|
24
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
25
|
+
};
|
|
26
|
+
export interface MessageFns<T> {
|
|
27
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
28
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
29
|
+
fromJSON(object: any): T;
|
|
30
|
+
toJSON(message: T): unknown;
|
|
31
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
32
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: coreum-protos/dex/params.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
8
|
+
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
|
9
|
+
export const protobufPackage = "coreum.dex.v1";
|
|
10
|
+
function createBaseParams() {
|
|
11
|
+
return {
|
|
12
|
+
defaultUnifiedRefAmount: "",
|
|
13
|
+
priceTickExponent: 0,
|
|
14
|
+
maxOrdersPerDenom: 0,
|
|
15
|
+
orderReserve: undefined,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export const Params = {
|
|
19
|
+
encode(message, writer = new BinaryWriter()) {
|
|
20
|
+
if (message.defaultUnifiedRefAmount !== "") {
|
|
21
|
+
writer.uint32(10).string(message.defaultUnifiedRefAmount);
|
|
22
|
+
}
|
|
23
|
+
if (message.priceTickExponent !== 0) {
|
|
24
|
+
writer.uint32(16).int32(message.priceTickExponent);
|
|
25
|
+
}
|
|
26
|
+
if (message.maxOrdersPerDenom !== 0) {
|
|
27
|
+
writer.uint32(24).uint64(message.maxOrdersPerDenom);
|
|
28
|
+
}
|
|
29
|
+
if (message.orderReserve !== undefined) {
|
|
30
|
+
Coin.encode(message.orderReserve, writer.uint32(34).fork()).ldelim();
|
|
31
|
+
}
|
|
32
|
+
return writer;
|
|
33
|
+
},
|
|
34
|
+
decode(input, length) {
|
|
35
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBaseParams();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1: {
|
|
42
|
+
if (tag !== 10) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
message.defaultUnifiedRefAmount = reader.string();
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
if (tag !== 16) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.priceTickExponent = reader.int32();
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
case 3: {
|
|
56
|
+
if (tag !== 24) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.maxOrdersPerDenom = longToNumber(reader.uint64());
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
case 4: {
|
|
63
|
+
if (tag !== 34) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
message.orderReserve = Coin.decode(reader, reader.uint32());
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
reader.skip(tag & 7);
|
|
74
|
+
}
|
|
75
|
+
return message;
|
|
76
|
+
},
|
|
77
|
+
fromJSON(object) {
|
|
78
|
+
return {
|
|
79
|
+
defaultUnifiedRefAmount: isSet(object.defaultUnifiedRefAmount)
|
|
80
|
+
? globalThis.String(object.defaultUnifiedRefAmount)
|
|
81
|
+
: "",
|
|
82
|
+
priceTickExponent: isSet(object.priceTickExponent)
|
|
83
|
+
? globalThis.Number(object.priceTickExponent)
|
|
84
|
+
: 0,
|
|
85
|
+
maxOrdersPerDenom: isSet(object.maxOrdersPerDenom)
|
|
86
|
+
? globalThis.Number(object.maxOrdersPerDenom)
|
|
87
|
+
: 0,
|
|
88
|
+
orderReserve: isSet(object.orderReserve)
|
|
89
|
+
? Coin.fromJSON(object.orderReserve)
|
|
90
|
+
: undefined,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
toJSON(message) {
|
|
94
|
+
const obj = {};
|
|
95
|
+
if (message.defaultUnifiedRefAmount !== "") {
|
|
96
|
+
obj.defaultUnifiedRefAmount = message.defaultUnifiedRefAmount;
|
|
97
|
+
}
|
|
98
|
+
if (message.priceTickExponent !== 0) {
|
|
99
|
+
obj.priceTickExponent = Math.round(message.priceTickExponent);
|
|
100
|
+
}
|
|
101
|
+
if (message.maxOrdersPerDenom !== 0) {
|
|
102
|
+
obj.maxOrdersPerDenom = Math.round(message.maxOrdersPerDenom);
|
|
103
|
+
}
|
|
104
|
+
if (message.orderReserve !== undefined) {
|
|
105
|
+
obj.orderReserve = Coin.toJSON(message.orderReserve);
|
|
106
|
+
}
|
|
107
|
+
return obj;
|
|
108
|
+
},
|
|
109
|
+
create(base) {
|
|
110
|
+
return Params.fromPartial(base ?? {});
|
|
111
|
+
},
|
|
112
|
+
fromPartial(object) {
|
|
113
|
+
const message = createBaseParams();
|
|
114
|
+
message.defaultUnifiedRefAmount = object.defaultUnifiedRefAmount ?? "";
|
|
115
|
+
message.priceTickExponent = object.priceTickExponent ?? 0;
|
|
116
|
+
message.maxOrdersPerDenom = object.maxOrdersPerDenom ?? 0;
|
|
117
|
+
message.orderReserve =
|
|
118
|
+
object.orderReserve !== undefined && object.orderReserve !== null
|
|
119
|
+
? Coin.fromPartial(object.orderReserve)
|
|
120
|
+
: undefined;
|
|
121
|
+
return message;
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
function longToNumber(int64) {
|
|
125
|
+
const num = globalThis.Number(int64.toString());
|
|
126
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
127
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
128
|
+
}
|
|
129
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
130
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
131
|
+
}
|
|
132
|
+
return num;
|
|
133
|
+
}
|
|
134
|
+
function isSet(value) {
|
|
135
|
+
return value !== null && value !== undefined;
|
|
136
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
2
|
+
import { PageRequest, PageResponse } from "cosmjs-types/cosmos/base/query/v1beta1/pagination";
|
|
3
|
+
import { Order, OrderBookData, Side } from "./order";
|
|
4
|
+
import { Params } from "./params";
|
|
5
|
+
export declare const protobufPackage = "coreum.dex.v1";
|
|
6
|
+
/** QueryParamsRequest defines the request type for querying x/dex parameters. */
|
|
7
|
+
export interface QueryParamsRequest {
|
|
8
|
+
}
|
|
9
|
+
/** QueryParamsResponse defines the response type for querying x/dex parameters. */
|
|
10
|
+
export interface QueryParamsResponse {
|
|
11
|
+
params: Params | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** QueryOrderRequest defines the request type for the `Order` query. */
|
|
14
|
+
export interface QueryOrderRequest {
|
|
15
|
+
/** creator is order creator's account. */
|
|
16
|
+
creator: string;
|
|
17
|
+
/** id is order ID. */
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
/** QueryOrderRequestResponse defines the response type for the `Order` query. */
|
|
21
|
+
export interface QueryOrderResponse {
|
|
22
|
+
order: Order | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** QueryOrdersRequest defines the request type for the `Orders` query. */
|
|
25
|
+
export interface QueryOrdersRequest {
|
|
26
|
+
/** creator is order creator's account. */
|
|
27
|
+
creator: string;
|
|
28
|
+
/** pagination defines an optional pagination for the request. */
|
|
29
|
+
pagination: PageRequest | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** QueryOrdersRequestResponse defines the response type for the `Order` query. */
|
|
32
|
+
export interface QueryOrdersResponse {
|
|
33
|
+
orders: Order[];
|
|
34
|
+
pagination: PageResponse | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** QueryOrderBooksRequest defines the request type for the `OrderBooks` query. */
|
|
37
|
+
export interface QueryOrderBooksRequest {
|
|
38
|
+
/** pagination defines an optional pagination for the request. */
|
|
39
|
+
pagination: PageRequest | undefined;
|
|
40
|
+
}
|
|
41
|
+
/** QueryOrderBooksResponse defines the response type for the `OrderBooks` query. */
|
|
42
|
+
export interface QueryOrderBooksResponse {
|
|
43
|
+
orderBooks: OrderBookData[];
|
|
44
|
+
pagination: PageResponse | undefined;
|
|
45
|
+
}
|
|
46
|
+
/** QueryOrderBookOrdersRequest defines the request type for the `OrderBookOrders` query. */
|
|
47
|
+
export interface QueryOrderBookOrdersRequest {
|
|
48
|
+
/** base_denom is base order denom. */
|
|
49
|
+
baseDenom: string;
|
|
50
|
+
/** quote_denom is quote order denom */
|
|
51
|
+
quoteDenom: string;
|
|
52
|
+
/** side is order side. */
|
|
53
|
+
side: Side;
|
|
54
|
+
/** pagination defines an optional pagination for the request. */
|
|
55
|
+
pagination: PageRequest | undefined;
|
|
56
|
+
}
|
|
57
|
+
/** QueryOrderBookOrdersResponse defines the response type for the `OrderBookOrders` query. */
|
|
58
|
+
export interface QueryOrderBookOrdersResponse {
|
|
59
|
+
orders: Order[];
|
|
60
|
+
pagination: PageResponse | undefined;
|
|
61
|
+
}
|
|
62
|
+
/** QueryAccountDenomOrdersCountRequest defines the request type for the `AccountDenomOrdersCount` query. */
|
|
63
|
+
export interface QueryAccountDenomOrdersCountRequest {
|
|
64
|
+
account: string;
|
|
65
|
+
denom: string;
|
|
66
|
+
}
|
|
67
|
+
/** QueryAccountDenomOrdersCountResponse defines the response type for the `AccountDenomOrdersCount` query. */
|
|
68
|
+
export interface QueryAccountDenomOrdersCountResponse {
|
|
69
|
+
count: number;
|
|
70
|
+
}
|
|
71
|
+
export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
|
|
72
|
+
export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
|
|
73
|
+
export declare const QueryOrderRequest: MessageFns<QueryOrderRequest>;
|
|
74
|
+
export declare const QueryOrderResponse: MessageFns<QueryOrderResponse>;
|
|
75
|
+
export declare const QueryOrdersRequest: MessageFns<QueryOrdersRequest>;
|
|
76
|
+
export declare const QueryOrdersResponse: MessageFns<QueryOrdersResponse>;
|
|
77
|
+
export declare const QueryOrderBooksRequest: MessageFns<QueryOrderBooksRequest>;
|
|
78
|
+
export declare const QueryOrderBooksResponse: MessageFns<QueryOrderBooksResponse>;
|
|
79
|
+
export declare const QueryOrderBookOrdersRequest: MessageFns<QueryOrderBookOrdersRequest>;
|
|
80
|
+
export declare const QueryOrderBookOrdersResponse: MessageFns<QueryOrderBookOrdersResponse>;
|
|
81
|
+
export declare const QueryAccountDenomOrdersCountRequest: MessageFns<QueryAccountDenomOrdersCountRequest>;
|
|
82
|
+
export declare const QueryAccountDenomOrdersCountResponse: MessageFns<QueryAccountDenomOrdersCountResponse>;
|
|
83
|
+
/** Query defines the gRPC query service. */
|
|
84
|
+
export interface Query {
|
|
85
|
+
/** Params queries the parameters of x/dex module. */
|
|
86
|
+
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
87
|
+
/** Order queries order by creator and ID. */
|
|
88
|
+
Order(request: QueryOrderRequest): Promise<QueryOrderResponse>;
|
|
89
|
+
/** Orders queries creator orders. */
|
|
90
|
+
Orders(request: QueryOrdersRequest): Promise<QueryOrdersResponse>;
|
|
91
|
+
/** OrderBooks queries order books. */
|
|
92
|
+
OrderBooks(request: QueryOrderBooksRequest): Promise<QueryOrderBooksResponse>;
|
|
93
|
+
/** OrderBookOrders queries order book orders. */
|
|
94
|
+
OrderBookOrders(request: QueryOrderBookOrdersRequest): Promise<QueryOrderBookOrdersResponse>;
|
|
95
|
+
/** AccountDenomOrdersCount queries account denom orders count. */
|
|
96
|
+
AccountDenomOrdersCount(request: QueryAccountDenomOrdersCountRequest): Promise<QueryAccountDenomOrdersCountResponse>;
|
|
97
|
+
}
|
|
98
|
+
export declare const QueryServiceName = "coreum.dex.v1.Query";
|
|
99
|
+
export declare class QueryClientImpl implements Query {
|
|
100
|
+
private readonly rpc;
|
|
101
|
+
private readonly service;
|
|
102
|
+
constructor(rpc: Rpc, opts?: {
|
|
103
|
+
service?: string;
|
|
104
|
+
});
|
|
105
|
+
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
106
|
+
Order(request: QueryOrderRequest): Promise<QueryOrderResponse>;
|
|
107
|
+
Orders(request: QueryOrdersRequest): Promise<QueryOrdersResponse>;
|
|
108
|
+
OrderBooks(request: QueryOrderBooksRequest): Promise<QueryOrderBooksResponse>;
|
|
109
|
+
OrderBookOrders(request: QueryOrderBookOrdersRequest): Promise<QueryOrderBookOrdersResponse>;
|
|
110
|
+
AccountDenomOrdersCount(request: QueryAccountDenomOrdersCountRequest): Promise<QueryAccountDenomOrdersCountResponse>;
|
|
111
|
+
}
|
|
112
|
+
interface Rpc {
|
|
113
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
114
|
+
}
|
|
115
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
116
|
+
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 {} ? {
|
|
117
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
118
|
+
} : Partial<T>;
|
|
119
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
120
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
121
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
122
|
+
} & {
|
|
123
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
124
|
+
};
|
|
125
|
+
export interface MessageFns<T> {
|
|
126
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
127
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
128
|
+
fromJSON(object: any): T;
|
|
129
|
+
toJSON(message: T): unknown;
|
|
130
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
131
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
132
|
+
}
|
|
133
|
+
export {};
|