ault-sdk-ts 0.0.2-alpha.21 → 0.0.2-alpha.23
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/README.md +10 -0
- package/dist/core/clob-msgs.d.ts +2 -3
- package/dist/eip712/msg.generated.d.ts +10 -4
- package/dist/eip712/registry.d.ts +2 -0
- package/dist/high-level/types.d.ts +10 -6
- package/dist/index.cjs +618 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +607 -307
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/accountx/v1/query.d.ts +32 -0
- package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +0 -7
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +25 -3
- package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
- package/dist/proto/gen/ault/license/v1/license.d.ts +0 -14
- package/dist/proto/gen/ault/license/v1/query.d.ts +44 -18
- package/dist/proto/gen/ault/market/v1/market.d.ts +1 -0
- package/dist/proto/gen/ault/market/v1/tx.d.ts +9 -0
- package/dist/proto/gen/ault/miner/v1/genesis.d.ts +52 -84
- package/dist/proto/gen/ault/miner/v1/miner.d.ts +10 -45
- package/dist/proto/gen/ault/miner/v1/query.d.ts +0 -13
- package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -2
- package/dist/proto/gen/ault/spot/v1/order.d.ts +12 -4
- package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +3 -3
- package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +2 -2
- package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +24 -15
- package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +1 -1
- package/dist/rest/dex-types.generated.d.ts +59 -1
- package/dist/rest/dex.d.ts +1 -0
- package/dist/rest/dex.generated.d.ts +151 -4
- package/dist/rest/license.d.ts +1 -2
- package/dist/rest/types.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import {
|
|
2
|
+
import { SpotOrderRecord } from "./order";
|
|
3
3
|
export declare const protobufPackage = "ault.spot.v1";
|
|
4
4
|
export interface GenesisState {
|
|
5
|
-
orders:
|
|
5
|
+
orders: SpotOrderRecord[];
|
|
6
6
|
}
|
|
7
7
|
export declare const GenesisState: MessageFns<GenesisState>;
|
|
8
8
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
@@ -2,20 +2,26 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import { FeeInfo } from "../../clob/v1/fee";
|
|
3
3
|
export declare const protobufPackage = "ault.spot.v1";
|
|
4
4
|
export interface SpotOrder {
|
|
5
|
-
id: Uint8Array;
|
|
6
5
|
orderer: Uint8Array;
|
|
7
6
|
marketId: Uint8Array;
|
|
8
7
|
buy: boolean;
|
|
9
8
|
price: string;
|
|
10
|
-
quantity: string;
|
|
11
|
-
openQuantity: string;
|
|
12
|
-
remainingDeposit: string;
|
|
13
9
|
deadline: Date | undefined;
|
|
14
10
|
tick: bigint;
|
|
15
11
|
postOnly: boolean;
|
|
16
12
|
/** fee_info contains fee distribution metadata. */
|
|
17
13
|
feeInfo: FeeInfo | undefined;
|
|
18
14
|
}
|
|
15
|
+
export interface SpotOrderState {
|
|
16
|
+
quantity: string;
|
|
17
|
+
openQuantity: string;
|
|
18
|
+
remainingDeposit: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SpotOrderRecord {
|
|
21
|
+
id: Uint8Array;
|
|
22
|
+
order: SpotOrder | undefined;
|
|
23
|
+
state: SpotOrderState | undefined;
|
|
24
|
+
}
|
|
19
25
|
/**
|
|
20
26
|
* ConditionalSpotOrder is a pending order that activates when trigger
|
|
21
27
|
* conditions are met.
|
|
@@ -44,6 +50,8 @@ export interface ConditionalSpotOrder {
|
|
|
44
50
|
feeInfo: FeeInfo | undefined;
|
|
45
51
|
}
|
|
46
52
|
export declare const SpotOrder: MessageFns<SpotOrder>;
|
|
53
|
+
export declare const SpotOrderState: MessageFns<SpotOrderState>;
|
|
54
|
+
export declare const SpotOrderRecord: MessageFns<SpotOrderRecord>;
|
|
47
55
|
export declare const ConditionalSpotOrder: MessageFns<ConditionalSpotOrder>;
|
|
48
56
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
49
57
|
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 {} ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import {
|
|
2
|
+
import { Params, ResetState, TokenPair, TransferLimit } from "./tokenregistry";
|
|
3
3
|
export declare const protobufPackage = "ault.tokenregistry.v1";
|
|
4
4
|
/** GenesisState defines the tokenregistry module genesis state. */
|
|
5
5
|
export interface GenesisState {
|
|
@@ -7,8 +7,8 @@ export interface GenesisState {
|
|
|
7
7
|
params: Params | undefined;
|
|
8
8
|
/** token_pairs is the initial token pair set. */
|
|
9
9
|
tokenPairs: TokenPair[];
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/** transfer_limits is the initial transfer limit set. */
|
|
11
|
+
transferLimits: TransferLimit[];
|
|
12
12
|
/** reset_state tracks the last hourly/daily reset timestamps. */
|
|
13
13
|
resetState: ResetState | undefined;
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
|
|
3
|
-
import {
|
|
3
|
+
import { Params, TokenPair, TransferLimit } from "./tokenregistry";
|
|
4
4
|
export declare const protobufPackage = "ault.tokenregistry.v1";
|
|
5
5
|
/** QueryTokenPairRequest defines the request for Query/TokenPair. */
|
|
6
6
|
export interface QueryTokenPairRequest {
|
|
@@ -46,7 +46,7 @@ export interface QueryTransferLimitRequest {
|
|
|
46
46
|
/** QueryTransferLimitResponse defines the response for Query/TransferLimit. */
|
|
47
47
|
export interface QueryTransferLimitResponse {
|
|
48
48
|
/** transfer_limit is the transfer limit config and current capacity. */
|
|
49
|
-
transferLimit:
|
|
49
|
+
transferLimit: TransferLimit | undefined;
|
|
50
50
|
}
|
|
51
51
|
export declare const QueryTokenPairRequest: MessageFns<QueryTokenPairRequest>;
|
|
52
52
|
export declare const QueryTokenPairResponse: MessageFns<QueryTokenPairResponse>;
|
|
@@ -23,13 +23,6 @@ export interface Limiter {
|
|
|
23
23
|
*/
|
|
24
24
|
baselineSupplyBps: number;
|
|
25
25
|
}
|
|
26
|
-
/** TransferLimitConfig wraps the hourly and daily limiters for a token pair. */
|
|
27
|
-
export interface TransferLimitConfig {
|
|
28
|
-
/** hourly defines the hourly transfer-out rate limit. */
|
|
29
|
-
hourly: Limiter | undefined;
|
|
30
|
-
/** daily defines the daily transfer-out rate limit. */
|
|
31
|
-
daily: Limiter | undefined;
|
|
32
|
-
}
|
|
33
26
|
/** TokenPair defines an ERC20 <> Cosmos denom pair. */
|
|
34
27
|
export interface TokenPair {
|
|
35
28
|
/** erc20_address is the ERC20 contract address (0x...). */
|
|
@@ -45,18 +38,33 @@ export interface TokenPair {
|
|
|
45
38
|
enabled: boolean;
|
|
46
39
|
}
|
|
47
40
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
41
|
+
* TransferLimitConfig stores the transfer limit config. only exists for denoms
|
|
42
|
+
* that have a transfer limit.
|
|
50
43
|
*/
|
|
51
|
-
export interface
|
|
52
|
-
/**
|
|
53
|
-
|
|
44
|
+
export interface TransferLimitConfig {
|
|
45
|
+
/** hourly defines the hourly transfer-out rate limit. */
|
|
46
|
+
hourly: Limiter | undefined;
|
|
47
|
+
/** daily defines the daily transfer-out rate limit. */
|
|
48
|
+
daily: Limiter | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* TransferLimitState stores the current remaining capacity. only exists for
|
|
52
|
+
* denoms that have a transfer limit.
|
|
53
|
+
*/
|
|
54
|
+
export interface TransferLimitState {
|
|
54
55
|
/** hourly_remaining is the remaining outflow capacity for the current hour. */
|
|
55
56
|
hourlyRemaining: string;
|
|
56
57
|
/** daily_remaining is the remaining outflow capacity for the current day. */
|
|
57
58
|
dailyRemaining: string;
|
|
58
|
-
|
|
59
|
+
}
|
|
60
|
+
/** TransferLimit wraps the full transfer limit view for a denom. */
|
|
61
|
+
export interface TransferLimit {
|
|
62
|
+
/** denom is the cosmos denom. */
|
|
63
|
+
denom: string;
|
|
64
|
+
/** config is the transfer limit config for the denom. */
|
|
59
65
|
config: TransferLimitConfig | undefined;
|
|
66
|
+
/** state is the current remaining transfer capacity for the denom. */
|
|
67
|
+
state: TransferLimitState | undefined;
|
|
60
68
|
}
|
|
61
69
|
/** ResetState tracks the last time boundaries for transfer limit resets. */
|
|
62
70
|
export interface ResetState {
|
|
@@ -91,9 +99,10 @@ export interface PendingTransfer {
|
|
|
91
99
|
amount: string;
|
|
92
100
|
}
|
|
93
101
|
export declare const Limiter: MessageFns<Limiter>;
|
|
94
|
-
export declare const TransferLimitConfig: MessageFns<TransferLimitConfig>;
|
|
95
102
|
export declare const TokenPair: MessageFns<TokenPair>;
|
|
96
|
-
export declare const
|
|
103
|
+
export declare const TransferLimitConfig: MessageFns<TransferLimitConfig>;
|
|
104
|
+
export declare const TransferLimitState: MessageFns<TransferLimitState>;
|
|
105
|
+
export declare const TransferLimit: MessageFns<TransferLimit>;
|
|
97
106
|
export declare const ResetState: MessageFns<ResetState>;
|
|
98
107
|
export declare const Params: MessageFns<Params>;
|
|
99
108
|
export declare const PendingTransfer: MessageFns<PendingTransfer>;
|
|
@@ -63,7 +63,7 @@ export interface MsgSetTransferLimit {
|
|
|
63
63
|
sender: string;
|
|
64
64
|
/** erc20_address is the ERC20 contract address (0x...). */
|
|
65
65
|
erc20Address: string;
|
|
66
|
-
/** transfer_limit defines the
|
|
66
|
+
/** transfer_limit defines the transfer rate limit config. */
|
|
67
67
|
transferLimit: TransferLimitConfig | undefined;
|
|
68
68
|
}
|
|
69
69
|
/** MsgSetTransferLimitResponse is the response for MsgSetTransferLimit. */
|
|
@@ -23,7 +23,7 @@ contract.
|
|
|
23
23
|
|
|
24
24
|
All timestamps are in milliseconds unless noted otherwise.
|
|
25
25
|
|
|
26
|
-
* OpenAPI spec version: 2.
|
|
26
|
+
* OpenAPI spec version: 2.3.0
|
|
27
27
|
*/
|
|
28
28
|
import * as zod from "zod";
|
|
29
29
|
/**
|
|
@@ -404,6 +404,64 @@ export declare const GetTradingFeesResponse: zod.ZodRecord<zod.ZodString, zod.Zo
|
|
|
404
404
|
tierBased: zod.ZodBoolean;
|
|
405
405
|
info: zod.ZodObject<{}, zod.z.core.$loose>;
|
|
406
406
|
}, zod.z.core.$strip>>;
|
|
407
|
+
/**
|
|
408
|
+
* Protocol-wide stats overview for a rolling window: quote volume,
|
|
409
|
+
estimated fees, trade/trader counts, active markets, an active-traders
|
|
410
|
+
DAU, average taker slippage, and a per-market breakdown.
|
|
411
|
+
|
|
412
|
+
Volume shares the `price_history` source and DB-side cutoff the 24h
|
|
413
|
+
ticker uses. `estimatedFee` is `quoteVolume × takerFeeRate` (an
|
|
414
|
+
estimate, not booked revenue). `dailyActiveUsers` currently aliases
|
|
415
|
+
`traderCount`. `quoteVolume`/`estimatedFee`/`quoteAsset` and
|
|
416
|
+
`averageSlippageBps` are null when contributors span more than one
|
|
417
|
+
quote asset. `depositUsdcVolume24h` and `builderCodesFee24h` are
|
|
418
|
+
reserved and always null. `tradeCount`/`traderCount` are book-wide;
|
|
419
|
+
the rest cover symbol-mapped markets, so the two need not reconcile
|
|
420
|
+
during symbol-map lag.
|
|
421
|
+
|
|
422
|
+
* @summary Protocol stats overview
|
|
423
|
+
*/
|
|
424
|
+
export declare const GetStatsQueryParams: zod.ZodObject<{
|
|
425
|
+
window: zod.ZodOptional<zod.ZodEnum<{
|
|
426
|
+
"24h": "24h";
|
|
427
|
+
}>>;
|
|
428
|
+
}, zod.z.core.$strip>;
|
|
429
|
+
export declare const getStatsResponseTotalsQuoteVolumeRegExp: RegExp;
|
|
430
|
+
export declare const getStatsResponseTotalsEstimatedFeeRegExp: RegExp;
|
|
431
|
+
export declare const getStatsResponseTotalsAverageSlippageBpsRegExp: RegExp;
|
|
432
|
+
export declare const getStatsResponseTotalsDepositUsdcVolume24hRegExp: RegExp;
|
|
433
|
+
export declare const getStatsResponseTotalsBuilderCodesFee24hRegExp: RegExp;
|
|
434
|
+
export declare const getStatsResponseMarketsItemQuoteVolumeRegExp: RegExp;
|
|
435
|
+
export declare const getStatsResponseMarketsItemBaseVolumeRegExp: RegExp;
|
|
436
|
+
export declare const getStatsResponseMarketsItemEstimatedFeeRegExp: RegExp;
|
|
437
|
+
export declare const getStatsResponseMarketsItemTakerFeeRateRegExp: RegExp;
|
|
438
|
+
export declare const GetStatsResponse: zod.ZodObject<{
|
|
439
|
+
window: zod.ZodEnum<{
|
|
440
|
+
"24h": "24h";
|
|
441
|
+
}>;
|
|
442
|
+
totals: zod.ZodObject<{
|
|
443
|
+
quoteVolume: zod.ZodNullable<zod.ZodString>;
|
|
444
|
+
quoteAsset: zod.ZodNullable<zod.ZodString>;
|
|
445
|
+
estimatedFee: zod.ZodNullable<zod.ZodString>;
|
|
446
|
+
tradeCount: zod.ZodNumber;
|
|
447
|
+
traderCount: zod.ZodNumber;
|
|
448
|
+
activeMarkets: zod.ZodNumber;
|
|
449
|
+
dailyActiveUsers: zod.ZodNullable<zod.ZodNumber>;
|
|
450
|
+
averageSlippageBps: zod.ZodNullable<zod.ZodString>;
|
|
451
|
+
depositUsdcVolume24h: zod.ZodNullable<zod.ZodString>;
|
|
452
|
+
builderCodesFee24h: zod.ZodNullable<zod.ZodString>;
|
|
453
|
+
}, zod.z.core.$strip>;
|
|
454
|
+
markets: zod.ZodArray<zod.ZodObject<{
|
|
455
|
+
symbol: zod.ZodString;
|
|
456
|
+
base: zod.ZodString;
|
|
457
|
+
quote: zod.ZodString;
|
|
458
|
+
quoteVolume: zod.ZodString;
|
|
459
|
+
baseVolume: zod.ZodString;
|
|
460
|
+
estimatedFee: zod.ZodString;
|
|
461
|
+
tradeCount: zod.ZodNumber;
|
|
462
|
+
takerFeeRate: zod.ZodString;
|
|
463
|
+
}, zod.z.core.$strip>>;
|
|
464
|
+
}, zod.z.core.$strip>;
|
|
407
465
|
/**
|
|
408
466
|
* Returns the orders that belong to `address`, optionally filtered
|
|
409
467
|
by status, symbol, market id, and creation time. The endpoint
|
package/dist/rest/dex.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function createDexApi(context: RestContext): {
|
|
|
22
22
|
getOrder: (id: string, options?: RequestInit) => Promise<import("./dex.generated").getOrderResponse>;
|
|
23
23
|
listMyTrades: (params: import("./dex.generated").ListMyTradesParams, options?: RequestInit) => Promise<import("./dex.generated").listMyTradesResponse>;
|
|
24
24
|
getBalance: (params: import("./dex.generated").GetBalanceParams, options?: RequestInit) => Promise<import("./dex.generated").getBalanceResponse>;
|
|
25
|
+
getStats: (params?: import("./dex.generated").GetStatsParams, options?: RequestInit) => Promise<import("./dex.generated").getStatsResponse>;
|
|
25
26
|
getUDFConfig: (options?: RequestInit) => Promise<import("./dex.generated").getUDFConfigResponse>;
|
|
26
27
|
getUDFTime: (options?: RequestInit) => Promise<import("./dex.generated").getUDFTimeResponse>;
|
|
27
28
|
getUDFSymbol: (params: import("./dex.generated").GetUDFSymbolParams, options?: RequestInit) => Promise<import("./dex.generated").getUDFSymbolResponse>;
|
|
@@ -327,6 +327,101 @@ export interface TradingFeeResponse {
|
|
|
327
327
|
tierBased: boolean;
|
|
328
328
|
info: TradingFeeResponseInfo;
|
|
329
329
|
}
|
|
330
|
+
export type StatsResponseWindow = (typeof StatsResponseWindow)[keyof typeof StatsResponseWindow];
|
|
331
|
+
export declare const StatsResponseWindow: {
|
|
332
|
+
readonly "24h": "24h";
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Protocol-wide aggregates for the window.
|
|
336
|
+
*/
|
|
337
|
+
export interface StatsTotals {
|
|
338
|
+
/**
|
|
339
|
+
* Total quote volume over the window as a canonical decimal string.
|
|
340
|
+
Null when contributing markets span more than one quote (then
|
|
341
|
+
`estimatedFee` and `quoteAsset` are null too).
|
|
342
|
+
|
|
343
|
+
* @nullable
|
|
344
|
+
* @pattern ^-?\d+(\.\d+)?$
|
|
345
|
+
*/
|
|
346
|
+
quoteVolume: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* Shared quote ticker of the markets that had volume. Null when they
|
|
349
|
+
span more than one quote, or on an idle window (then `quoteVolume`
|
|
350
|
+
is "0"; a null `quoteVolume` means multi-quote).
|
|
351
|
+
|
|
352
|
+
* @nullable
|
|
353
|
+
*/
|
|
354
|
+
quoteAsset: string | null;
|
|
355
|
+
/**
|
|
356
|
+
* Estimated total fees (`Σ quoteVolume × takerFeeRate`) as a decimal
|
|
357
|
+
string; an estimate, not booked revenue. Null on multi-quote.
|
|
358
|
+
|
|
359
|
+
* @nullable
|
|
360
|
+
* @pattern ^-?\d+(\.\d+)?$
|
|
361
|
+
*/
|
|
362
|
+
estimatedFee: string | null;
|
|
363
|
+
/** Number of fills (maker legs) in the window. */
|
|
364
|
+
tradeCount: number;
|
|
365
|
+
/** Distinct trading addresses in the window. */
|
|
366
|
+
traderCount: number;
|
|
367
|
+
/** Number of markets with at least one fill in the window. */
|
|
368
|
+
activeMarkets: number;
|
|
369
|
+
/**
|
|
370
|
+
* Distinct trading addresses in the window. Currently an alias of
|
|
371
|
+
`traderCount`; separate so a precise DAU source can diverge later.
|
|
372
|
+
|
|
373
|
+
* @nullable
|
|
374
|
+
*/
|
|
375
|
+
dailyActiveUsers: number | null;
|
|
376
|
+
/**
|
|
377
|
+
* Volume-weighted taker slippage (fill vs book-mid) in bps as a
|
|
378
|
+
decimal string. Null with no benchmarkable taker fill or when
|
|
379
|
+
fills span more than one quote.
|
|
380
|
+
|
|
381
|
+
* @nullable
|
|
382
|
+
* @pattern ^-?\d+(\.\d+)?$
|
|
383
|
+
*/
|
|
384
|
+
averageSlippageBps: string | null;
|
|
385
|
+
/**
|
|
386
|
+
* Reserved. Currently always null.
|
|
387
|
+
* @nullable
|
|
388
|
+
* @pattern ^-?\d+(\.\d+)?$
|
|
389
|
+
*/
|
|
390
|
+
depositUsdcVolume24h: string | null;
|
|
391
|
+
/**
|
|
392
|
+
* Reserved. Currently always null.
|
|
393
|
+
* @nullable
|
|
394
|
+
* @pattern ^-?\d+(\.\d+)?$
|
|
395
|
+
*/
|
|
396
|
+
builderCodesFee24h: string | null;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Per-market aggregates for the window.
|
|
400
|
+
*/
|
|
401
|
+
export interface MarketStats {
|
|
402
|
+
symbol: string;
|
|
403
|
+
base: string;
|
|
404
|
+
quote: string;
|
|
405
|
+
/** @pattern ^-?\d+(\.\d+)?$ */
|
|
406
|
+
quoteVolume: string;
|
|
407
|
+
/** @pattern ^-?\d+(\.\d+)?$ */
|
|
408
|
+
baseVolume: string;
|
|
409
|
+
/** @pattern ^-?\d+(\.\d+)?$ */
|
|
410
|
+
estimatedFee: string;
|
|
411
|
+
tradeCount: number;
|
|
412
|
+
/** @pattern ^-?\d+(\.\d+)?$ */
|
|
413
|
+
takerFeeRate: string;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Protocol stats overview for a rolling window. Monetary fields are
|
|
417
|
+
canonical decimal strings; counts are integers.
|
|
418
|
+
|
|
419
|
+
*/
|
|
420
|
+
export interface StatsResponse {
|
|
421
|
+
window: StatsResponseWindow;
|
|
422
|
+
totals: StatsTotals;
|
|
423
|
+
markets: MarketStats[];
|
|
424
|
+
}
|
|
330
425
|
export type TickerResponseInfo = {
|
|
331
426
|
[key: string]: unknown;
|
|
332
427
|
};
|
|
@@ -515,8 +610,8 @@ export type OrderResponseTradesItem = {
|
|
|
515
610
|
* Fee for the order. `cost` is `cost * taker_fee_rate` — applied to
|
|
516
611
|
the realized cost above, so it is more accurate than the previous
|
|
517
612
|
`filled * price * taker_fee_rate` approximation. The rate is the
|
|
518
|
-
market's taker rate;
|
|
519
|
-
|
|
613
|
+
market's taker rate; this stays an estimate because the indexer
|
|
614
|
+
records no realized per-trade fee amount to sum.
|
|
520
615
|
|
|
521
616
|
*/
|
|
522
617
|
export type OrderResponseFee = {
|
|
@@ -590,8 +685,8 @@ export interface OrderResponse {
|
|
|
590
685
|
/** Fee for the order. `cost` is `cost * taker_fee_rate` — applied to
|
|
591
686
|
the realized cost above, so it is more accurate than the previous
|
|
592
687
|
`filled * price * taker_fee_rate` approximation. The rate is the
|
|
593
|
-
market's taker rate;
|
|
594
|
-
|
|
688
|
+
market's taker rate; this stays an estimate because the indexer
|
|
689
|
+
records no realized per-trade fee amount to sum.
|
|
595
690
|
*/
|
|
596
691
|
fee?: OrderResponseFee;
|
|
597
692
|
reduceOnly?: boolean;
|
|
@@ -849,6 +944,16 @@ export type ListTradesParams = {
|
|
|
849
944
|
export type GetTradingFees200 = {
|
|
850
945
|
[key: string]: TradingFeeResponse;
|
|
851
946
|
};
|
|
947
|
+
export type GetStatsParams = {
|
|
948
|
+
/**
|
|
949
|
+
* Rolling window. Only `24h` is supported; defaults to `24h`.
|
|
950
|
+
*/
|
|
951
|
+
window?: GetStatsWindow;
|
|
952
|
+
};
|
|
953
|
+
export type GetStatsWindow = (typeof GetStatsWindow)[keyof typeof GetStatsWindow];
|
|
954
|
+
export declare const GetStatsWindow: {
|
|
955
|
+
readonly "24h": "24h";
|
|
956
|
+
};
|
|
852
957
|
export type ListOrdersParams = {
|
|
853
958
|
/**
|
|
854
959
|
* Account address. Accepts either bech32 (`ault1...`) or 0x-hex
|
|
@@ -1313,6 +1418,48 @@ export type getTradingFeesResponseError = (getTradingFeesResponse429 | getTradin
|
|
|
1313
1418
|
export type getTradingFeesResponse = getTradingFeesResponseSuccess | getTradingFeesResponseError;
|
|
1314
1419
|
export declare const getGetTradingFeesUrl: () => string;
|
|
1315
1420
|
export declare const getTradingFees: (options?: RequestInit) => Promise<getTradingFeesResponse>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Protocol-wide stats overview for a rolling window: quote volume,
|
|
1423
|
+
estimated fees, trade/trader counts, active markets, an active-traders
|
|
1424
|
+
DAU, average taker slippage, and a per-market breakdown.
|
|
1425
|
+
|
|
1426
|
+
Volume shares the `price_history` source and DB-side cutoff the 24h
|
|
1427
|
+
ticker uses. `estimatedFee` is `quoteVolume × takerFeeRate` (an
|
|
1428
|
+
estimate, not booked revenue). `dailyActiveUsers` currently aliases
|
|
1429
|
+
`traderCount`. `quoteVolume`/`estimatedFee`/`quoteAsset` and
|
|
1430
|
+
`averageSlippageBps` are null when contributors span more than one
|
|
1431
|
+
quote asset. `depositUsdcVolume24h` and `builderCodesFee24h` are
|
|
1432
|
+
reserved and always null. `tradeCount`/`traderCount` are book-wide;
|
|
1433
|
+
the rest cover symbol-mapped markets, so the two need not reconcile
|
|
1434
|
+
during symbol-map lag.
|
|
1435
|
+
|
|
1436
|
+
* @summary Protocol stats overview
|
|
1437
|
+
*/
|
|
1438
|
+
export type getStatsResponse200 = {
|
|
1439
|
+
data: StatsResponse;
|
|
1440
|
+
status: 200;
|
|
1441
|
+
};
|
|
1442
|
+
export type getStatsResponse400 = {
|
|
1443
|
+
data: BadRequestResponse;
|
|
1444
|
+
status: 400;
|
|
1445
|
+
};
|
|
1446
|
+
export type getStatsResponse429 = {
|
|
1447
|
+
data: RateLimitedResponse;
|
|
1448
|
+
status: 429;
|
|
1449
|
+
};
|
|
1450
|
+
export type getStatsResponse500 = {
|
|
1451
|
+
data: InternalErrorResponse;
|
|
1452
|
+
status: 500;
|
|
1453
|
+
};
|
|
1454
|
+
export type getStatsResponseSuccess = getStatsResponse200 & {
|
|
1455
|
+
headers: Headers;
|
|
1456
|
+
};
|
|
1457
|
+
export type getStatsResponseError = (getStatsResponse400 | getStatsResponse429 | getStatsResponse500) & {
|
|
1458
|
+
headers: Headers;
|
|
1459
|
+
};
|
|
1460
|
+
export type getStatsResponse = getStatsResponseSuccess | getStatsResponseError;
|
|
1461
|
+
export declare const getGetStatsUrl: (params?: GetStatsParams) => string;
|
|
1462
|
+
export declare const getStats: (params?: GetStatsParams, options?: RequestInit) => Promise<getStatsResponse>;
|
|
1316
1463
|
/**
|
|
1317
1464
|
* Returns the orders that belong to `address`, optionally filtered
|
|
1318
1465
|
by status, symbol, market id, and creation time. The endpoint
|
package/dist/rest/license.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RestContext } from "./context";
|
|
2
|
-
import {
|
|
2
|
+
import { QueryApprovedMembersResponse, QueryBalanceResponse, QueryIsActiveResponse, QueryIsApprovedMemberResponse, QueryIsKYCApproverResponse, QueryKYCApproversResponse, QueryLicenseResponse, QueryLicensesByOwnerResponse, QueryLicensesResponse, QueryMintersResponse, QueryOwnedByResponse, QueryOwnerResponse, QueryParamsResponse, QueryTokenByOwnerIndexResponse, QueryTotalSupplyResponse, QueryTransferUnlockTimeResponse } from "../proto/gen/ault/license/v1/query";
|
|
3
3
|
import { LicenseStatus } from "../proto/gen/ault/license/v1/license";
|
|
4
4
|
import type { PaginationParams } from "./types";
|
|
5
5
|
export { LicenseStatus } from "../proto/gen/ault/license/v1/license";
|
|
@@ -37,6 +37,5 @@ export interface LicenseApi {
|
|
|
37
37
|
}) => Promise<QueryApprovedMembersResponse>;
|
|
38
38
|
isApprovedMember: (address: string) => Promise<QueryIsApprovedMemberResponse>;
|
|
39
39
|
isKycApprover: (address: string) => Promise<QueryIsKYCApproverResponse>;
|
|
40
|
-
getActiveLicenseCountAt: (owner: string, snapshotTime: string) => Promise<QueryActiveLicenseCountAtResponse>;
|
|
41
40
|
}
|
|
42
41
|
export declare function createLicenseApi(context: RestContext): LicenseApi;
|
package/dist/rest/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { License as ProtoLicense, LicenseStatus as ProtoLicenseStatus, Params as ProtoLicenseParams } from "../proto/gen/ault/license/v1/license";
|
|
3
3
|
import { EpochInfo as ProtoEpochInfo, MiningDelegation as ProtoMiningDelegation, OperatorInfo as ProtoOperatorInfo, Params as ProtoMinerParams } from "../proto/gen/ault/miner/v1/miner";
|
|
4
|
-
import {
|
|
4
|
+
import { QueryApprovedMembersResponse as ProtoApprovedMembersResponse, QueryBalanceResponse as ProtoBalanceResponse, QueryIsActiveResponse as ProtoIsActiveResponse, QueryIsApprovedMemberResponse as ProtoIsApprovedMemberResponse, QueryIsKYCApproverResponse as ProtoIsKycApproverResponse, QueryKYCApproversResponse as ProtoKycApproversResponse, QueryLicenseResponse as ProtoLicenseResponse, QueryLicensesByOwnerResponse as ProtoLicensesByOwnerResponse, QueryLicensesResponse as ProtoLicensesResponse, QueryMintersResponse as ProtoMintersResponse, QueryOwnedByResponse as ProtoOwnedByResponse, QueryOwnerResponse as ProtoOwnerResponse, QueryParamsResponse as ProtoLicenseParamsResponse, QueryTokenByOwnerIndexResponse as ProtoTokenOfOwnerByIndexResponse, QueryTotalSupplyResponse as ProtoTotalSupplyResponse, QueryTransferUnlockTimeResponse as ProtoTransferUnlockTimeResponse } from "../proto/gen/ault/license/v1/query";
|
|
5
5
|
import { QueryBeaconResponse as ProtoBeaconResponse, QueryDelegatedLicensesResponse as ProtoDelegatedLicensesResponse, QueryEmissionInfoResponse as ProtoEmissionInfoResponse, QueryEmissionScheduleResponse as ProtoEmissionScheduleResponse, QueryEpochInfoResponse as ProtoEpochInfoResponse, QueryEpochResponse as ProtoCurrentEpochResponse, QueryEpochsResponse as ProtoEpochsResponse, QueryLicenseDelegationResponse as ProtoLicenseDelegationResponse, QueryLicenseMinerInfoResponse as ProtoLicenseMinerInfoResponse, QueryOperatorInfoResponse as ProtoOperatorInfoResponse, QueryOperatorsResponse as ProtoOperatorsResponse, QueryOwnerKeyResponse as ProtoOwnerKeyResponse, QueryParamsResponse as ProtoMinerParamsResponse, YearEmission as ProtoYearEmission } from "../proto/gen/ault/miner/v1/query";
|
|
6
6
|
import { Commission as ProtoCommission, CommissionRates as ProtoCommissionRates, Delegation as ProtoDelegation, DelegationResponse as ProtoDelegationResponse, Description as ProtoValidatorDescription, Params as ProtoStakingParams, Pool as ProtoStakingPool, UnbondingDelegation as ProtoUnbondingDelegation, UnbondingDelegationEntry as ProtoUnbondingDelegationEntry, Validator as ProtoValidator, BondStatus as ProtoBondStatus } from "../proto/gen/cosmos/staking/v1beta1/staking";
|
|
7
7
|
import { QueryDelegatorDelegationsResponse as ProtoDelegationsResponse, QueryDelegationResponse as ProtoDelegationResponseEnvelope, QueryDelegatorUnbondingDelegationsResponse as ProtoUnbondingDelegationsResponse, QueryParamsResponse as ProtoStakingParamsResponse, QueryPoolResponse as ProtoStakingPoolResponse, QueryValidatorResponse as ProtoValidatorResponse, QueryValidatorsResponse as ProtoValidatorsResponse } from "../proto/gen/cosmos/staking/v1beta1/query";
|
|
@@ -52,7 +52,6 @@ export type KycApproversResponse = ProtoKycApproversResponse;
|
|
|
52
52
|
export type ApprovedMembersResponse = ProtoApprovedMembersResponse;
|
|
53
53
|
export type IsApprovedMemberResponse = ProtoIsApprovedMemberResponse;
|
|
54
54
|
export type IsKycApproverResponse = ProtoIsKycApproverResponse;
|
|
55
|
-
export type ActiveLicenseCountAtResponse = ProtoActiveLicenseCountAtResponse;
|
|
56
55
|
export type MiningDelegation = ProtoMiningDelegation;
|
|
57
56
|
export type Operator = ProtoOperatorInfo;
|
|
58
57
|
export type LicenseMinerInfo = ProtoLicenseMinerInfoResponse;
|