@nadohq/engine-client 0.1.0-alpha.3 → 0.1.0-alpha.4
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/EngineBaseClient.cjs +8 -7
- package/dist/EngineBaseClient.cjs.map +1 -1
- package/dist/EngineBaseClient.d.cts +1 -2
- package/dist/EngineBaseClient.d.ts +1 -2
- package/dist/EngineBaseClient.js +7 -5
- package/dist/EngineBaseClient.js.map +1 -1
- package/dist/EngineClient.d.cts +1 -2
- package/dist/EngineClient.d.ts +1 -2
- package/dist/EngineExecuteBuilder.cjs +23 -51
- package/dist/EngineExecuteBuilder.cjs.map +1 -1
- package/dist/EngineExecuteBuilder.d.cts +6 -17
- package/dist/EngineExecuteBuilder.d.ts +6 -17
- package/dist/EngineExecuteBuilder.js +13 -41
- package/dist/EngineExecuteBuilder.js.map +1 -1
- package/dist/EngineExecuteClient.cjs +6 -10
- package/dist/EngineExecuteClient.cjs.map +1 -1
- package/dist/EngineExecuteClient.d.cts +3 -4
- package/dist/EngineExecuteClient.d.ts +3 -4
- package/dist/EngineExecuteClient.js +6 -10
- package/dist/EngineExecuteClient.js.map +1 -1
- package/dist/EngineQueryClient.cjs +28 -53
- package/dist/EngineQueryClient.cjs.map +1 -1
- package/dist/EngineQueryClient.d.cts +2 -13
- package/dist/EngineQueryClient.d.ts +2 -13
- package/dist/EngineQueryClient.js +6 -31
- package/dist/EngineQueryClient.js.map +1 -1
- package/dist/EngineWebClient.cjs +0 -2
- package/dist/EngineWebClient.cjs.map +1 -1
- package/dist/EngineWebClient.d.cts +1 -2
- package/dist/EngineWebClient.d.ts +1 -2
- package/dist/EngineWebClient.js +0 -2
- package/dist/EngineWebClient.js.map +1 -1
- package/dist/endpoints.cjs +6 -6
- package/dist/endpoints.cjs.map +1 -1
- package/dist/endpoints.d.cts +1 -1
- package/dist/endpoints.d.ts +1 -1
- package/dist/endpoints.js +6 -6
- package/dist/endpoints.js.map +1 -1
- package/dist/index.d.cts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/types/EngineServerFailureError.cjs +1 -1
- package/dist/types/EngineServerFailureError.cjs.map +1 -1
- package/dist/types/EngineServerFailureError.d.cts +2 -2
- package/dist/types/EngineServerFailureError.d.ts +2 -2
- package/dist/types/EngineServerFailureError.js +1 -1
- package/dist/types/EngineServerFailureError.js.map +1 -1
- package/dist/types/clientExecuteTypes.cjs.map +1 -1
- package/dist/types/clientExecuteTypes.d.cts +4 -12
- package/dist/types/clientExecuteTypes.d.ts +4 -12
- package/dist/types/clientQueryTypes.cjs.map +1 -1
- package/dist/types/clientQueryTypes.d.cts +12 -23
- package/dist/types/clientQueryTypes.d.ts +12 -23
- package/dist/types/index.d.cts +5 -6
- package/dist/types/index.d.ts +5 -6
- package/dist/types/serverExecuteTypes.cjs.map +1 -1
- package/dist/types/serverExecuteTypes.d.cts +6 -14
- package/dist/types/serverExecuteTypes.d.ts +6 -14
- package/dist/types/serverQueryModelTypes.cjs.map +1 -1
- package/dist/types/serverQueryModelTypes.d.cts +1 -1
- package/dist/types/serverQueryModelTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +3 -13
- package/dist/types/serverQueryTypes.d.ts +3 -13
- package/dist/types/serverSubscriptionEventTypes.d.cts +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.ts +1 -1
- package/dist/utils/index.d.cts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/productEngineTypeMappers.cjs +5 -5
- package/dist/utils/productEngineTypeMappers.cjs.map +1 -1
- package/dist/utils/productEngineTypeMappers.d.cts +1 -1
- package/dist/utils/productEngineTypeMappers.d.ts +1 -1
- package/dist/utils/productEngineTypeMappers.js +1 -1
- package/dist/utils/productEngineTypeMappers.js.map +1 -1
- package/dist/utils/queryDataMappers.cjs +79 -90
- package/dist/utils/queryDataMappers.cjs.map +1 -1
- package/dist/utils/queryDataMappers.d.cts +1 -2
- package/dist/utils/queryDataMappers.d.ts +1 -2
- package/dist/utils/queryDataMappers.js +7 -19
- package/dist/utils/queryDataMappers.js.map +1 -1
- package/package.json +3 -4
- package/src/EngineBaseClient.ts +5 -3
- package/src/EngineExecuteBuilder.ts +14 -54
- package/src/EngineExecuteClient.ts +7 -15
- package/src/EngineQueryClient.ts +6 -35
- package/src/EngineWebClient.ts +0 -2
- package/src/endpoints.ts +4 -5
- package/src/types/EngineServerFailureError.ts +2 -2
- package/src/types/clientExecuteTypes.ts +5 -17
- package/src/types/clientQueryTypes.ts +18 -32
- package/src/types/serverExecuteTypes.ts +7 -18
- package/src/types/serverQueryModelTypes.ts +1 -1
- package/src/types/serverQueryTypes.ts +2 -16
- package/src/utils/productEngineTypeMappers.ts +1 -1
- package/src/utils/queryDataMappers.ts +7 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/clientExecuteTypes.ts"],"sourcesContent":["import {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n
|
|
1
|
+
{"version":3,"sources":["../../src/types/clientExecuteTypes.ts"],"sourcesContent":["import {\n EIP712BurnNlpParams,\n EIP712CancelOrdersParams,\n EIP712CancelProductOrdersParams,\n EIP712LinkSignerParams,\n EIP712LiquidateSubaccountParams,\n EIP712MintNlpParams,\n EIP712OrderParams,\n EIP712TransferQuoteParams,\n EIP712WithdrawCollateralParams,\n} from '@nadohq/shared';\nimport { EngineServerExecuteSuccessResult } from './serverExecuteTypes';\n\n/**\n * Either verifying address or signature must be provided;\n * If signature is not provided, the verifying address with the engine signer will be used to sign.\n */\nexport type SignatureParams =\n | {\n // Endpoint address for all executes except order placement\n verifyingAddr: string;\n chainId: number;\n }\n | {\n signature: string;\n };\n\ntype WithoutNonce<T extends { nonce: unknown }> = Omit<T, 'nonce'>;\n\ntype WithSpotLeverage<T> = T & {\n spotLeverage?: boolean;\n};\n\nexport type WithSignature<T> = T & {\n signature: string;\n};\n\n// Params associated with all engine executes\nexport type WithBaseEngineExecuteParams<T> = SignatureParams &\n Omit<T, 'nonce'> & {\n nonce?: string;\n };\n\nexport type EngineOrderParams = WithoutNonce<EIP712OrderParams>;\n\nexport type EnginePlaceOrderParams = WithBaseEngineExecuteParams<{\n id?: number;\n productId: number;\n order: EngineOrderParams;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spotLeverage?: boolean;\n // For isolated orders, this specifies whether margin can be borrowed (i.e. whether the cross account can have a negative USDC balance)\n borrowMargin?: boolean;\n}>;\n\nexport type EngineLiquidateSubaccountParams =\n WithBaseEngineExecuteParams<EIP712LiquidateSubaccountParams>;\n\nexport type EngineWithdrawCollateralParams = WithBaseEngineExecuteParams<\n WithSpotLeverage<EIP712WithdrawCollateralParams>\n>;\n\nexport type EngineCancelOrdersParams =\n WithBaseEngineExecuteParams<EIP712CancelOrdersParams>;\n\nexport type EngineCancelAndPlaceParams = {\n cancelOrders: EngineCancelOrdersParams;\n placeOrder: EnginePlaceOrderParams;\n};\n\nexport type EngineCancelProductOrdersParams =\n WithBaseEngineExecuteParams<EIP712CancelProductOrdersParams>;\n\nexport type EngineLinkSignerParams =\n WithBaseEngineExecuteParams<EIP712LinkSignerParams>;\n\nexport type EngineTransferQuoteParams =\n WithBaseEngineExecuteParams<EIP712TransferQuoteParams>;\n\nexport type EngineMintNlpParams = WithBaseEngineExecuteParams<\n WithSpotLeverage<EIP712MintNlpParams>\n>;\n\nexport type EngineBurnNlpParams =\n WithBaseEngineExecuteParams<EIP712BurnNlpParams>;\n\nexport type EnginePlaceOrdersParams = EnginePlaceOrderParams[];\n\nexport interface EngineExecuteRequestParamsByType {\n burn_nlp: EngineBurnNlpParams;\n cancel_and_place: EngineCancelAndPlaceParams;\n cancel_orders: EngineCancelOrdersParams;\n cancel_product_orders: EngineCancelProductOrdersParams;\n link_signer: EngineLinkSignerParams;\n liquidate_subaccount: EngineLiquidateSubaccountParams;\n mint_nlp: EngineMintNlpParams;\n place_order: EnginePlaceOrderParams;\n place_orders: EnginePlaceOrdersParams;\n transfer_quote: EngineTransferQuoteParams;\n withdraw_collateral: EngineWithdrawCollateralParams;\n}\n\nexport type EnginePlaceOrderResult =\n EngineServerExecuteSuccessResult<'place_order'> & {\n orderParams: EIP712OrderParams;\n };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams,
|
|
1
|
+
import { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerExecuteSuccessResult } from './serverExecuteTypes.cjs';
|
|
3
3
|
import './serverQueryTypes.cjs';
|
|
4
4
|
import './serverQueryModelTypes.cjs';
|
|
@@ -31,12 +31,6 @@ type EnginePlaceOrderParams = WithBaseEngineExecuteParams<{
|
|
|
31
31
|
productId: number;
|
|
32
32
|
order: EngineOrderParams;
|
|
33
33
|
spotLeverage?: boolean;
|
|
34
|
-
}>;
|
|
35
|
-
type EngineIsolatedOrderParams = WithoutNonce<EIP712IsolatedOrderParams>;
|
|
36
|
-
type EnginePlaceIsolatedOrderParams = WithBaseEngineExecuteParams<{
|
|
37
|
-
id?: number;
|
|
38
|
-
productId: number;
|
|
39
|
-
order: EngineIsolatedOrderParams;
|
|
40
34
|
borrowMargin?: boolean;
|
|
41
35
|
}>;
|
|
42
36
|
type EngineLiquidateSubaccountParams = WithBaseEngineExecuteParams<EIP712LiquidateSubaccountParams>;
|
|
@@ -51,6 +45,7 @@ type EngineLinkSignerParams = WithBaseEngineExecuteParams<EIP712LinkSignerParams
|
|
|
51
45
|
type EngineTransferQuoteParams = WithBaseEngineExecuteParams<EIP712TransferQuoteParams>;
|
|
52
46
|
type EngineMintNlpParams = WithBaseEngineExecuteParams<WithSpotLeverage<EIP712MintNlpParams>>;
|
|
53
47
|
type EngineBurnNlpParams = WithBaseEngineExecuteParams<EIP712BurnNlpParams>;
|
|
48
|
+
type EnginePlaceOrdersParams = EnginePlaceOrderParams[];
|
|
54
49
|
interface EngineExecuteRequestParamsByType {
|
|
55
50
|
burn_nlp: EngineBurnNlpParams;
|
|
56
51
|
cancel_and_place: EngineCancelAndPlaceParams;
|
|
@@ -59,16 +54,13 @@ interface EngineExecuteRequestParamsByType {
|
|
|
59
54
|
link_signer: EngineLinkSignerParams;
|
|
60
55
|
liquidate_subaccount: EngineLiquidateSubaccountParams;
|
|
61
56
|
mint_nlp: EngineMintNlpParams;
|
|
62
|
-
place_isolated_order: EnginePlaceIsolatedOrderParams;
|
|
63
57
|
place_order: EnginePlaceOrderParams;
|
|
58
|
+
place_orders: EnginePlaceOrdersParams;
|
|
64
59
|
transfer_quote: EngineTransferQuoteParams;
|
|
65
60
|
withdraw_collateral: EngineWithdrawCollateralParams;
|
|
66
61
|
}
|
|
67
62
|
type EnginePlaceOrderResult = EngineServerExecuteSuccessResult<'place_order'> & {
|
|
68
63
|
orderParams: EIP712OrderParams;
|
|
69
64
|
};
|
|
70
|
-
type EnginePlaceIsolatedOrderResult = EngineServerExecuteSuccessResult<'place_isolated_order'> & {
|
|
71
|
-
orderParams: EIP712IsolatedOrderParams;
|
|
72
|
-
};
|
|
73
65
|
|
|
74
|
-
export type { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType,
|
|
66
|
+
export type { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMintNlpParams, EngineOrderParams, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EngineTransferQuoteParams, EngineWithdrawCollateralParams, SignatureParams, WithBaseEngineExecuteParams, WithSignature };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams,
|
|
1
|
+
import { EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712OrderParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerExecuteSuccessResult } from './serverExecuteTypes.js';
|
|
3
3
|
import './serverQueryTypes.js';
|
|
4
4
|
import './serverQueryModelTypes.js';
|
|
@@ -31,12 +31,6 @@ type EnginePlaceOrderParams = WithBaseEngineExecuteParams<{
|
|
|
31
31
|
productId: number;
|
|
32
32
|
order: EngineOrderParams;
|
|
33
33
|
spotLeverage?: boolean;
|
|
34
|
-
}>;
|
|
35
|
-
type EngineIsolatedOrderParams = WithoutNonce<EIP712IsolatedOrderParams>;
|
|
36
|
-
type EnginePlaceIsolatedOrderParams = WithBaseEngineExecuteParams<{
|
|
37
|
-
id?: number;
|
|
38
|
-
productId: number;
|
|
39
|
-
order: EngineIsolatedOrderParams;
|
|
40
34
|
borrowMargin?: boolean;
|
|
41
35
|
}>;
|
|
42
36
|
type EngineLiquidateSubaccountParams = WithBaseEngineExecuteParams<EIP712LiquidateSubaccountParams>;
|
|
@@ -51,6 +45,7 @@ type EngineLinkSignerParams = WithBaseEngineExecuteParams<EIP712LinkSignerParams
|
|
|
51
45
|
type EngineTransferQuoteParams = WithBaseEngineExecuteParams<EIP712TransferQuoteParams>;
|
|
52
46
|
type EngineMintNlpParams = WithBaseEngineExecuteParams<WithSpotLeverage<EIP712MintNlpParams>>;
|
|
53
47
|
type EngineBurnNlpParams = WithBaseEngineExecuteParams<EIP712BurnNlpParams>;
|
|
48
|
+
type EnginePlaceOrdersParams = EnginePlaceOrderParams[];
|
|
54
49
|
interface EngineExecuteRequestParamsByType {
|
|
55
50
|
burn_nlp: EngineBurnNlpParams;
|
|
56
51
|
cancel_and_place: EngineCancelAndPlaceParams;
|
|
@@ -59,16 +54,13 @@ interface EngineExecuteRequestParamsByType {
|
|
|
59
54
|
link_signer: EngineLinkSignerParams;
|
|
60
55
|
liquidate_subaccount: EngineLiquidateSubaccountParams;
|
|
61
56
|
mint_nlp: EngineMintNlpParams;
|
|
62
|
-
place_isolated_order: EnginePlaceIsolatedOrderParams;
|
|
63
57
|
place_order: EnginePlaceOrderParams;
|
|
58
|
+
place_orders: EnginePlaceOrdersParams;
|
|
64
59
|
transfer_quote: EngineTransferQuoteParams;
|
|
65
60
|
withdraw_collateral: EngineWithdrawCollateralParams;
|
|
66
61
|
}
|
|
67
62
|
type EnginePlaceOrderResult = EngineServerExecuteSuccessResult<'place_order'> & {
|
|
68
63
|
orderParams: EIP712OrderParams;
|
|
69
64
|
};
|
|
70
|
-
type EnginePlaceIsolatedOrderResult = EngineServerExecuteSuccessResult<'place_isolated_order'> & {
|
|
71
|
-
orderParams: EIP712IsolatedOrderParams;
|
|
72
|
-
};
|
|
73
65
|
|
|
74
|
-
export type { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType,
|
|
66
|
+
export type { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMintNlpParams, EngineOrderParams, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EngineTransferQuoteParams, EngineWithdrawCollateralParams, SignatureParams, WithBaseEngineExecuteParams, WithSignature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/clientQueryTypes.ts"],"sourcesContent":["import {\n BalanceHealthContributions,\n BalanceSide,\n
|
|
1
|
+
{"version":3,"sources":["../../src/types/clientQueryTypes.ts"],"sourcesContent":["import {\n BalanceHealthContributions,\n BalanceSide,\n BalanceWithProduct,\n BigDecimal,\n EIP712OrderParams,\n HealthGroup,\n HealthStatusByType,\n MarketWithProduct,\n OrderAppendix,\n PerpBalanceWithProduct,\n ProductEngineType,\n SignedEIP712OrderParams,\n SpotBalanceWithProduct,\n Subaccount,\n} from '@nadohq/shared';\nimport {\n EngineServerNoncesParams,\n EngineServerTimeResponse,\n} from './serverQueryTypes';\n\nexport type GetEngineSubaccountSummaryResponse = {\n exists: boolean;\n balances: BalanceWithProduct[];\n health: HealthStatusByType;\n};\n\nexport type GetEngineSubaccountSummaryParams = Subaccount;\n\nexport type GetEngineIsolatedPositionsParams = Subaccount;\n\nexport interface SubaccountIsolatedPosition {\n subaccount: Subaccount;\n healths: BalanceHealthContributions;\n quoteBalance: SpotBalanceWithProduct;\n baseBalance: PerpBalanceWithProduct;\n}\n\nexport type GetEngineIsolatedPositionsResponse = SubaccountIsolatedPosition[];\n\nexport type SubaccountTx = {\n type: 'apply_delta';\n tx: SubaccountProductDeltaTx;\n};\n\nexport interface SubaccountProductDeltaTx {\n productId: number;\n amountDelta: BigDecimal;\n vQuoteDelta: BigDecimal;\n}\n\nexport interface GetEngineContractsResponse {\n chainId: number;\n endpointAddr: string;\n}\n\nexport type GetEngineEstimatedSubaccountSummaryParams = Subaccount & {\n txs: SubaccountTx[];\n};\n\nexport type GetEngineNoncesParams = EngineServerNoncesParams;\n\nexport interface GetEngineNoncesResponse {\n orderNonce: string;\n txNonce: string;\n}\n\nexport interface GetEngineSymbolsParams {\n productType?: ProductEngineType;\n productIds?: number[];\n}\n\nexport interface EngineSymbolsResponse {\n // mapping of product symbol to symbols info\n symbols: Record<string, EngineSymbol>;\n}\n\nexport interface EngineSymbol {\n type: ProductEngineType;\n productId: number;\n symbol: string;\n priceIncrement: BigDecimal;\n sizeIncrement: BigDecimal;\n minSize: BigDecimal;\n minDepth: BigDecimal;\n maxSpreadRate: BigDecimal;\n makerFeeRate: BigDecimal;\n takerFeeRate: BigDecimal;\n longWeightInitial: BigDecimal;\n longWeightMaintenance: BigDecimal;\n}\n\nexport type GetEngineAllMarketsResponse = MarketWithProduct[];\n\nexport interface GetEngineHealthGroupsResponse {\n healthGroups: HealthGroup[];\n}\n\nexport interface GetEngineOrderParams {\n productId: number;\n digest: string;\n}\n\nexport interface EngineOrder extends Subaccount {\n productId: number;\n price: BigDecimal;\n // Amount initially requested\n totalAmount: BigDecimal;\n // Amount still unfilled\n unfilledAmount: BigDecimal;\n expiration: number;\n nonce: string;\n digest: string;\n placementTime: number;\n appendix: OrderAppendix;\n}\n\nexport type GetEngineOrderResponse = EngineOrder;\n\nexport interface ValidateSignedEngineOrderParams {\n productId: number;\n signedOrder: SignedEIP712OrderParams;\n}\n\nexport interface ValidateEngineOrderParams {\n productId: number;\n chainId: number;\n order: EIP712OrderParams;\n}\n\nexport interface ValidateEngineOrderResponse {\n productId: number;\n valid: boolean;\n}\n\nexport interface GetEngineSubaccountOrdersParams extends Subaccount {\n productId: number;\n}\n\nexport interface EngineSubaccountOrders {\n productId: number;\n orders: EngineOrder[];\n}\n\nexport type GetEngineSubaccountOrdersResponse = EngineSubaccountOrders;\n\nexport interface GetEngineSubaccountProductOrdersParams extends Subaccount {\n productIds: number[];\n}\n\nexport interface GetEngineSubaccountProductOrdersResponse {\n productOrders: EngineSubaccountOrders[];\n}\n\nexport type GetEngineSubaccountFeeRatesParams = Subaccount;\n\nexport interface SubaccountOrderFeeRates {\n maker: BigDecimal;\n taker: BigDecimal;\n}\n\nexport interface GetEngineSubaccountFeeRatesResponse {\n // By Product ID\n orders: Record<number, SubaccountOrderFeeRates>;\n withdrawal: Record<number, BigDecimal>;\n liquidationSequencerFee: BigDecimal;\n healthCheckSequencerFee: BigDecimal;\n takerSequencerFee: BigDecimal;\n}\n\nexport interface EnginePriceTickLiquidity {\n price: BigDecimal;\n liquidity: BigDecimal;\n}\n\nexport interface GetEngineMarketLiquidityParams {\n productId: number;\n // The minimum depth in base price ticks (i.e. per side\n depth: number;\n}\n\nexport interface GetEngineMarketLiquidityResponse {\n bids: EnginePriceTickLiquidity[];\n asks: EnginePriceTickLiquidity[];\n}\n\nexport interface GetEngineMarketPriceParams {\n productId: number;\n}\n\nexport interface EngineMarketPrice {\n productId: number;\n bid: BigDecimal;\n ask: BigDecimal;\n}\n\nexport type GetEngineMarketPriceResponse = EngineMarketPrice;\n\nexport interface GetEngineMarketPricesParams {\n productIds: number[];\n}\n\nexport interface GetEngineMarketPricesResponse {\n marketPrices: EngineMarketPrice[];\n}\n\nexport interface GetEngineMaxOrderSizeParams extends Subaccount {\n price: BigDecimal;\n productId: number;\n // Note: When `reduceOnly` is true, `side` must be opposite of the current position, otherwise it returns 0.\n side: BalanceSide;\n // If not given, engine defaults to true (leverage/borrow enabled) for spot\n // Do not pass this for perp products\n spotLeverage?: boolean;\n // If not given, engine defaults to false. If true, the max order size will be capped to the subaccount's current position size;\n // If no position exists, it will return 0.\n reduceOnly?: boolean;\n}\n\nexport type GetEngineMaxOrderSizeResponse = BigDecimal;\n\nexport interface GetEngineMaxWithdrawableParams extends Subaccount {\n productId: number;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spotLeverage?: boolean;\n}\n\nexport type GetEngineMaxWithdrawableResponse = BigDecimal;\n\nexport type GetEngineTimeResponse = EngineServerTimeResponse;\n\nexport type GetEngineLinkedSignerParams = Subaccount;\n\nexport interface GetEngineLinkedSignerResponse {\n signer: string;\n}\n\nexport type GetEngineInsuranceResponse = BigDecimal;\n\n/**\n * Given an IP, backend will either:\n * - Allow queries only through archive / engine (query_only)\n * - Block all requests (blocked)\n * - Allow all requests (null)\n */\nexport type GetEngineIpBlockStatusResponse = 'query_only' | 'blocked' | null;\n\nexport interface GetEngineMaxMintNlpAmountParams extends Subaccount {\n // If not given, engine defaults to true (leverage/borrow enabled)\n spotLeverage?: boolean;\n}\n\nexport type GetEngineMaxMintNlpAmountResponse = BigDecimal;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
1
|
+
import { Subaccount, BalanceWithProduct, HealthStatusByType, BalanceHealthContributions, SpotBalanceWithProduct, PerpBalanceWithProduct, BigDecimal, ProductEngineType, MarketWithProduct, HealthGroup, OrderAppendix, EIP712OrderParams, SignedEIP712OrderParams, BalanceSide } from '@nadohq/shared';
|
|
3
2
|
import { EngineServerNoncesParams, EngineServerTimeResponse } from './serverQueryTypes.cjs';
|
|
4
3
|
import './serverQueryModelTypes.cjs';
|
|
5
4
|
|
|
6
|
-
type GetEngineSubaccountSummaryResponse =
|
|
7
|
-
|
|
5
|
+
type GetEngineSubaccountSummaryResponse = {
|
|
6
|
+
exists: boolean;
|
|
7
|
+
balances: BalanceWithProduct[];
|
|
8
|
+
health: HealthStatusByType;
|
|
9
|
+
};
|
|
10
|
+
type GetEngineSubaccountSummaryParams = Subaccount;
|
|
8
11
|
type GetEngineIsolatedPositionsParams = Subaccount;
|
|
9
12
|
interface SubaccountIsolatedPosition {
|
|
10
13
|
subaccount: Subaccount;
|
|
@@ -25,12 +28,8 @@ interface SubaccountProductDeltaTx {
|
|
|
25
28
|
interface GetEngineContractsResponse {
|
|
26
29
|
chainId: number;
|
|
27
30
|
endpointAddr: string;
|
|
28
|
-
/**
|
|
29
|
-
* Address for the orderbook contract, with the product ID being the index
|
|
30
|
-
*/
|
|
31
|
-
orderbookAddrs: string[];
|
|
32
31
|
}
|
|
33
|
-
type GetEngineEstimatedSubaccountSummaryParams =
|
|
32
|
+
type GetEngineEstimatedSubaccountSummaryParams = Subaccount & {
|
|
34
33
|
txs: SubaccountTx[];
|
|
35
34
|
};
|
|
36
35
|
type GetEngineNoncesParams = EngineServerNoncesParams;
|
|
@@ -59,7 +58,7 @@ interface EngineSymbol {
|
|
|
59
58
|
longWeightInitial: BigDecimal;
|
|
60
59
|
longWeightMaintenance: BigDecimal;
|
|
61
60
|
}
|
|
62
|
-
type GetEngineAllMarketsResponse =
|
|
61
|
+
type GetEngineAllMarketsResponse = MarketWithProduct[];
|
|
63
62
|
interface GetEngineHealthGroupsResponse {
|
|
64
63
|
healthGroups: HealthGroup[];
|
|
65
64
|
}
|
|
@@ -72,13 +71,11 @@ interface EngineOrder extends Subaccount {
|
|
|
72
71
|
price: BigDecimal;
|
|
73
72
|
totalAmount: BigDecimal;
|
|
74
73
|
unfilledAmount: BigDecimal;
|
|
75
|
-
expiration:
|
|
76
|
-
margin: BigDecimal | null;
|
|
74
|
+
expiration: number;
|
|
77
75
|
nonce: string;
|
|
78
76
|
digest: string;
|
|
79
|
-
orderParams: EIP712OrderParams;
|
|
80
77
|
placementTime: number;
|
|
81
|
-
|
|
78
|
+
appendix: OrderAppendix;
|
|
82
79
|
}
|
|
83
80
|
type GetEngineOrderResponse = EngineOrder;
|
|
84
81
|
interface ValidateSignedEngineOrderParams {
|
|
@@ -87,7 +84,6 @@ interface ValidateSignedEngineOrderParams {
|
|
|
87
84
|
}
|
|
88
85
|
interface ValidateEngineOrderParams {
|
|
89
86
|
productId: number;
|
|
90
|
-
orderbookAddr: string;
|
|
91
87
|
chainId: number;
|
|
92
88
|
order: EIP712OrderParams;
|
|
93
89
|
}
|
|
@@ -167,13 +163,6 @@ interface GetEngineLinkedSignerResponse {
|
|
|
167
163
|
signer: string;
|
|
168
164
|
}
|
|
169
165
|
type GetEngineInsuranceResponse = BigDecimal;
|
|
170
|
-
interface EngineMinDepositRate {
|
|
171
|
-
productId: number;
|
|
172
|
-
minDepositRate: BigDecimal;
|
|
173
|
-
}
|
|
174
|
-
interface GetEngineMinDepositRatesResponse {
|
|
175
|
-
minDepositRates: Record<number, EngineMinDepositRate>;
|
|
176
|
-
}
|
|
177
166
|
/**
|
|
178
167
|
* Given an IP, backend will either:
|
|
179
168
|
* - Allow queries only through archive / engine (query_only)
|
|
@@ -186,4 +175,4 @@ interface GetEngineMaxMintNlpAmountParams extends Subaccount {
|
|
|
186
175
|
}
|
|
187
176
|
type GetEngineMaxMintNlpAmountResponse = BigDecimal;
|
|
188
177
|
|
|
189
|
-
export type { EngineMarketPrice,
|
|
178
|
+
export type { EngineMarketPrice, EngineOrder, EnginePriceTickLiquidity, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, GetEngineAllMarketsResponse, GetEngineContractsResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse, GetEngineNoncesParams, GetEngineNoncesResponse, GetEngineOrderParams, GetEngineOrderResponse, GetEngineSubaccountFeeRatesParams, GetEngineSubaccountFeeRatesResponse, GetEngineSubaccountOrdersParams, GetEngineSubaccountOrdersResponse, GetEngineSubaccountProductOrdersParams, GetEngineSubaccountProductOrdersResponse, GetEngineSubaccountSummaryParams, GetEngineSubaccountSummaryResponse, GetEngineSymbolsParams, GetEngineTimeResponse, SubaccountIsolatedPosition, SubaccountOrderFeeRates, SubaccountProductDeltaTx, SubaccountTx, ValidateEngineOrderParams, ValidateEngineOrderResponse, ValidateSignedEngineOrderParams };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
1
|
+
import { Subaccount, BalanceWithProduct, HealthStatusByType, BalanceHealthContributions, SpotBalanceWithProduct, PerpBalanceWithProduct, BigDecimal, ProductEngineType, MarketWithProduct, HealthGroup, OrderAppendix, EIP712OrderParams, SignedEIP712OrderParams, BalanceSide } from '@nadohq/shared';
|
|
3
2
|
import { EngineServerNoncesParams, EngineServerTimeResponse } from './serverQueryTypes.js';
|
|
4
3
|
import './serverQueryModelTypes.js';
|
|
5
4
|
|
|
6
|
-
type GetEngineSubaccountSummaryResponse =
|
|
7
|
-
|
|
5
|
+
type GetEngineSubaccountSummaryResponse = {
|
|
6
|
+
exists: boolean;
|
|
7
|
+
balances: BalanceWithProduct[];
|
|
8
|
+
health: HealthStatusByType;
|
|
9
|
+
};
|
|
10
|
+
type GetEngineSubaccountSummaryParams = Subaccount;
|
|
8
11
|
type GetEngineIsolatedPositionsParams = Subaccount;
|
|
9
12
|
interface SubaccountIsolatedPosition {
|
|
10
13
|
subaccount: Subaccount;
|
|
@@ -25,12 +28,8 @@ interface SubaccountProductDeltaTx {
|
|
|
25
28
|
interface GetEngineContractsResponse {
|
|
26
29
|
chainId: number;
|
|
27
30
|
endpointAddr: string;
|
|
28
|
-
/**
|
|
29
|
-
* Address for the orderbook contract, with the product ID being the index
|
|
30
|
-
*/
|
|
31
|
-
orderbookAddrs: string[];
|
|
32
31
|
}
|
|
33
|
-
type GetEngineEstimatedSubaccountSummaryParams =
|
|
32
|
+
type GetEngineEstimatedSubaccountSummaryParams = Subaccount & {
|
|
34
33
|
txs: SubaccountTx[];
|
|
35
34
|
};
|
|
36
35
|
type GetEngineNoncesParams = EngineServerNoncesParams;
|
|
@@ -59,7 +58,7 @@ interface EngineSymbol {
|
|
|
59
58
|
longWeightInitial: BigDecimal;
|
|
60
59
|
longWeightMaintenance: BigDecimal;
|
|
61
60
|
}
|
|
62
|
-
type GetEngineAllMarketsResponse =
|
|
61
|
+
type GetEngineAllMarketsResponse = MarketWithProduct[];
|
|
63
62
|
interface GetEngineHealthGroupsResponse {
|
|
64
63
|
healthGroups: HealthGroup[];
|
|
65
64
|
}
|
|
@@ -72,13 +71,11 @@ interface EngineOrder extends Subaccount {
|
|
|
72
71
|
price: BigDecimal;
|
|
73
72
|
totalAmount: BigDecimal;
|
|
74
73
|
unfilledAmount: BigDecimal;
|
|
75
|
-
expiration:
|
|
76
|
-
margin: BigDecimal | null;
|
|
74
|
+
expiration: number;
|
|
77
75
|
nonce: string;
|
|
78
76
|
digest: string;
|
|
79
|
-
orderParams: EIP712OrderParams;
|
|
80
77
|
placementTime: number;
|
|
81
|
-
|
|
78
|
+
appendix: OrderAppendix;
|
|
82
79
|
}
|
|
83
80
|
type GetEngineOrderResponse = EngineOrder;
|
|
84
81
|
interface ValidateSignedEngineOrderParams {
|
|
@@ -87,7 +84,6 @@ interface ValidateSignedEngineOrderParams {
|
|
|
87
84
|
}
|
|
88
85
|
interface ValidateEngineOrderParams {
|
|
89
86
|
productId: number;
|
|
90
|
-
orderbookAddr: string;
|
|
91
87
|
chainId: number;
|
|
92
88
|
order: EIP712OrderParams;
|
|
93
89
|
}
|
|
@@ -167,13 +163,6 @@ interface GetEngineLinkedSignerResponse {
|
|
|
167
163
|
signer: string;
|
|
168
164
|
}
|
|
169
165
|
type GetEngineInsuranceResponse = BigDecimal;
|
|
170
|
-
interface EngineMinDepositRate {
|
|
171
|
-
productId: number;
|
|
172
|
-
minDepositRate: BigDecimal;
|
|
173
|
-
}
|
|
174
|
-
interface GetEngineMinDepositRatesResponse {
|
|
175
|
-
minDepositRates: Record<number, EngineMinDepositRate>;
|
|
176
|
-
}
|
|
177
166
|
/**
|
|
178
167
|
* Given an IP, backend will either:
|
|
179
168
|
* - Allow queries only through archive / engine (query_only)
|
|
@@ -186,4 +175,4 @@ interface GetEngineMaxMintNlpAmountParams extends Subaccount {
|
|
|
186
175
|
}
|
|
187
176
|
type GetEngineMaxMintNlpAmountResponse = BigDecimal;
|
|
188
177
|
|
|
189
|
-
export type { EngineMarketPrice,
|
|
178
|
+
export type { EngineMarketPrice, EngineOrder, EnginePriceTickLiquidity, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, GetEngineAllMarketsResponse, GetEngineContractsResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse, GetEngineNoncesParams, GetEngineNoncesResponse, GetEngineOrderParams, GetEngineOrderResponse, GetEngineSubaccountFeeRatesParams, GetEngineSubaccountFeeRatesResponse, GetEngineSubaccountOrdersParams, GetEngineSubaccountOrdersResponse, GetEngineSubaccountProductOrdersParams, GetEngineSubaccountProductOrdersResponse, GetEngineSubaccountSummaryParams, GetEngineSubaccountSummaryResponse, GetEngineSymbolsParams, GetEngineTimeResponse, SubaccountIsolatedPosition, SubaccountOrderFeeRates, SubaccountProductDeltaTx, SubaccountTx, ValidateEngineOrderParams, ValidateEngineOrderResponse, ValidateSignedEngineOrderParams };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { EngineMarketPrice,
|
|
2
|
-
export { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType,
|
|
3
|
-
export { EngineInsuranceResponse, EngineServerAllProductsResponse, EngineServerContractsResponse, EngineServerEdgeAllProductsResponse, EngineServerFeeRatesResponse, EngineServerGetOrderQueryParams, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse,
|
|
1
|
+
export { EngineMarketPrice, EngineOrder, EnginePriceTickLiquidity, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, GetEngineAllMarketsResponse, GetEngineContractsResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse, GetEngineNoncesParams, GetEngineNoncesResponse, GetEngineOrderParams, GetEngineOrderResponse, GetEngineSubaccountFeeRatesParams, GetEngineSubaccountFeeRatesResponse, GetEngineSubaccountOrdersParams, GetEngineSubaccountOrdersResponse, GetEngineSubaccountProductOrdersParams, GetEngineSubaccountProductOrdersResponse, GetEngineSubaccountSummaryParams, GetEngineSubaccountSummaryResponse, GetEngineSymbolsParams, GetEngineTimeResponse, SubaccountIsolatedPosition, SubaccountOrderFeeRates, SubaccountProductDeltaTx, SubaccountTx, ValidateEngineOrderParams, ValidateEngineOrderResponse, ValidateSignedEngineOrderParams } from './clientQueryTypes.cjs';
|
|
2
|
+
export { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMintNlpParams, EngineOrderParams, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EngineTransferQuoteParams, EngineWithdrawCollateralParams, SignatureParams, WithBaseEngineExecuteParams, WithSignature } from './clientExecuteTypes.cjs';
|
|
3
|
+
export { EngineInsuranceResponse, EngineServerAllProductsResponse, EngineServerContractsResponse, EngineServerEdgeAllProductsResponse, EngineServerFeeRatesResponse, EngineServerGetOrderQueryParams, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse, EngineServerNoncesParams, EngineServerNoncesResponse, EngineServerOrder, EngineServerOrderResponse, EngineServerOrdersQueryParams, EngineServerPriceTickLiquidity, EngineServerProductOrdersResponse, EngineServerQueryFailureResponse, EngineServerQueryRequest, EngineServerQueryRequestByType, EngineServerQueryRequestType, EngineServerQueryResponse, EngineServerQueryResponseByType, EngineServerQuerySuccessResponse, EngineServerStatusResponse, EngineServerSubaccountFeeRatesParams, EngineServerSubaccountInfoQueryParams, EngineServerSubaccountInfoResponse, EngineServerSubaccountOrders, EngineServerSubaccountOrdersQueryParams, EngineServerSubaccountOrdersResponse, EngineServerSymbol, EngineServerSymbolsQueryParams, EngineServerSymbolsResponse, EngineServerTimeResponse, EngineServerValidateOrderQueryParams, EngineServerValidateOrderResponse } from './serverQueryTypes.cjs';
|
|
4
4
|
export { EngineServerBookInfo, EngineServerHealthBreakdown, EngineServerPerpBalance, EngineServerPerpBalanceData, EngineServerPerpProduct, EngineServerPerpState, EngineServerProductType, EngineServerRisk, EngineServerSpotBalance, EngineServerSpotBalanceData, EngineServerSpotConfig, EngineServerSpotProduct, EngineServerSpotState } from './serverQueryModelTypes.cjs';
|
|
5
|
-
export { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult,
|
|
5
|
+
export { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServiceCancelAndPlaceParams } from './serverExecuteTypes.cjs';
|
|
6
6
|
export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams } from './serverSubscriptionTypes.cjs';
|
|
7
7
|
export { EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionFillEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent } from './serverSubscriptionEventTypes.cjs';
|
|
8
8
|
export { EngineServerFailureError } from './EngineServerFailureError.cjs';
|
|
9
|
-
import '@nadohq/
|
|
10
|
-
import '@nadohq/utils';
|
|
9
|
+
import '@nadohq/shared';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { EngineMarketPrice,
|
|
2
|
-
export { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType,
|
|
3
|
-
export { EngineInsuranceResponse, EngineServerAllProductsResponse, EngineServerContractsResponse, EngineServerEdgeAllProductsResponse, EngineServerFeeRatesResponse, EngineServerGetOrderQueryParams, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse,
|
|
1
|
+
export { EngineMarketPrice, EngineOrder, EnginePriceTickLiquidity, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, GetEngineAllMarketsResponse, GetEngineContractsResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse, GetEngineNoncesParams, GetEngineNoncesResponse, GetEngineOrderParams, GetEngineOrderResponse, GetEngineSubaccountFeeRatesParams, GetEngineSubaccountFeeRatesResponse, GetEngineSubaccountOrdersParams, GetEngineSubaccountOrdersResponse, GetEngineSubaccountProductOrdersParams, GetEngineSubaccountProductOrdersResponse, GetEngineSubaccountSummaryParams, GetEngineSubaccountSummaryResponse, GetEngineSymbolsParams, GetEngineTimeResponse, SubaccountIsolatedPosition, SubaccountOrderFeeRates, SubaccountProductDeltaTx, SubaccountTx, ValidateEngineOrderParams, ValidateEngineOrderResponse, ValidateSignedEngineOrderParams } from './clientQueryTypes.js';
|
|
2
|
+
export { EngineBurnNlpParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineExecuteRequestParamsByType, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMintNlpParams, EngineOrderParams, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EngineTransferQuoteParams, EngineWithdrawCollateralParams, SignatureParams, WithBaseEngineExecuteParams, WithSignature } from './clientExecuteTypes.js';
|
|
3
|
+
export { EngineInsuranceResponse, EngineServerAllProductsResponse, EngineServerContractsResponse, EngineServerEdgeAllProductsResponse, EngineServerFeeRatesResponse, EngineServerGetOrderQueryParams, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse, EngineServerNoncesParams, EngineServerNoncesResponse, EngineServerOrder, EngineServerOrderResponse, EngineServerOrdersQueryParams, EngineServerPriceTickLiquidity, EngineServerProductOrdersResponse, EngineServerQueryFailureResponse, EngineServerQueryRequest, EngineServerQueryRequestByType, EngineServerQueryRequestType, EngineServerQueryResponse, EngineServerQueryResponseByType, EngineServerQuerySuccessResponse, EngineServerStatusResponse, EngineServerSubaccountFeeRatesParams, EngineServerSubaccountInfoQueryParams, EngineServerSubaccountInfoResponse, EngineServerSubaccountOrders, EngineServerSubaccountOrdersQueryParams, EngineServerSubaccountOrdersResponse, EngineServerSymbol, EngineServerSymbolsQueryParams, EngineServerSymbolsResponse, EngineServerTimeResponse, EngineServerValidateOrderQueryParams, EngineServerValidateOrderResponse } from './serverQueryTypes.js';
|
|
4
4
|
export { EngineServerBookInfo, EngineServerHealthBreakdown, EngineServerPerpBalance, EngineServerPerpBalanceData, EngineServerPerpProduct, EngineServerPerpState, EngineServerProductType, EngineServerRisk, EngineServerSpotBalance, EngineServerSpotBalanceData, EngineServerSpotConfig, EngineServerSpotProduct, EngineServerSpotState } from './serverQueryModelTypes.js';
|
|
5
|
-
export { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult,
|
|
5
|
+
export { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServiceCancelAndPlaceParams } from './serverExecuteTypes.js';
|
|
6
6
|
export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams } from './serverSubscriptionTypes.js';
|
|
7
7
|
export { EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionFillEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent } from './serverSubscriptionEventTypes.js';
|
|
8
8
|
export { EngineServerFailureError } from './EngineServerFailureError.js';
|
|
9
|
-
import '@nadohq/
|
|
10
|
-
import '@nadohq/utils';
|
|
9
|
+
import '@nadohq/shared';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverExecuteTypes.ts"],"sourcesContent":["import {\n EIP712BurnNlpValues,\n
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverExecuteTypes.ts"],"sourcesContent":["import {\n EIP712BurnNlpValues,\n EIP712LinkSignerValues,\n EIP712LiquidateSubaccountValues,\n EIP712MintNlpValues,\n EIP712OrderCancellationValues,\n EIP712OrderParams,\n EIP712OrderValues,\n EIP712ProductOrdersCancellationValues,\n EIP712TransferQuoteValues,\n EIP712WithdrawCollateralValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { EngineServerOrderResponse } from './serverQueryTypes';\n\nexport interface EngineServerPlaceOrderResponse {\n digest: string;\n error: string | null;\n}\n\nexport type EngineServerPlaceOrdersResponse = EngineServerPlaceOrderResponse[];\n\nexport interface EngineServerCancelOrdersResponse {\n cancelled_orders: EngineServerOrderResponse[];\n}\n\nexport interface EngineServerExecuteResponseDataByType {\n burn_nlp: null;\n cancel_and_place: EngineServerPlaceOrderResponse;\n cancel_orders: EngineServerCancelOrdersResponse;\n cancel_product_orders: EngineServerCancelOrdersResponse;\n link_signer: null;\n liquidate_subaccount: null;\n mint_nlp: null;\n place_order: EngineServerPlaceOrderResponse;\n place_orders: EngineServerPlaceOrdersResponse;\n transfer_quote: null;\n withdraw_collateral: null;\n}\n\nexport interface EngineServerExecuteSuccessResult<\n T extends EngineServerExecuteRequestType = EngineServerExecuteRequestType,\n> {\n status: 'success';\n data: EngineServerExecuteResponseDataByType[T];\n signature: string;\n request_type: EngineServerExecuteResultRequestType;\n // NOTE: `id` is excluded from the response to avoid parsing issues.\n // type of `id` on the backend is `u64` which can overflow until we introduce proper parsing on the SDK.\n}\n\nexport interface EngineServerExecuteFailureResult {\n status: 'failure';\n signature: string;\n error: string;\n error_code: number;\n request_type: EngineServerExecuteResultRequestType;\n}\n\nexport type EngineServerExecuteResult<\n T extends EngineServerExecuteRequestType = EngineServerExecuteRequestType,\n> = EngineServerExecuteSuccessResult<T> | EngineServerExecuteFailureResult;\n\ntype EngineServerExecuteResultRequestType = {\n [K in keyof EngineServerExecuteRequestByType]: `execute_${K}`;\n}[keyof EngineServerExecuteRequestByType];\n\nexport interface EngineServerPlaceOrderParams {\n id: number | null;\n product_id: number;\n order: EIP712OrderValues;\n // Bytes\n signature: string;\n // Engine defaults this to true\n spot_leverage: boolean | null;\n // For isolated orders, this specifies whether margin can be borrowed (i.e. whether the cross account can have a negative USDC balance)\n borrow_margin: boolean | null;\n}\n\nexport type EngineServerCancelOrdersParams = SignedTx<\n Omit<EIP712OrderCancellationValues, 'productIds'> & {\n // number[] is technically assignable to \"Bytes\", so we need to override the ByteFieldsToHex result here\n productIds: number[];\n }\n>;\n\nexport type EngineServiceCancelAndPlaceParams = Omit<\n EngineServerCancelOrdersParams,\n 'tx' | 'signature'\n> & {\n cancel_tx: EngineServerCancelOrdersParams['tx'];\n cancel_signature: EngineServerCancelOrdersParams['signature'];\n place_order: EngineServerPlaceOrderParams;\n};\n\ntype WithSpotLeverage<T> = T & {\n spot_leverage: boolean | null;\n};\n\nexport interface EngineServerExecuteRequestByType {\n burn_nlp: SignedTx<EIP712BurnNlpValues>;\n cancel_and_place: EngineServiceCancelAndPlaceParams;\n cancel_orders: EngineServerCancelOrdersParams;\n cancel_product_orders: SignedTx<\n Omit<EIP712ProductOrdersCancellationValues, 'productIds'> & {\n // number[] is technically assignable to \"Bytes\", so we need to override the ByteFieldsToHex result here\n productIds: number[];\n }\n >;\n link_signer: SignedTx<EIP712LinkSignerValues>;\n liquidate_subaccount: SignedTx<EIP712LiquidateSubaccountValues>;\n mint_nlp: WithSpotLeverage<SignedTx<EIP712MintNlpValues>>;\n place_order: EngineServerPlaceOrderParams;\n place_orders: EngineServerPlaceOrderParams[];\n transfer_quote: SignedTx<EIP712TransferQuoteValues>;\n withdraw_collateral: WithSpotLeverage<\n SignedTx<EIP712WithdrawCollateralValues>\n >;\n}\n\nexport type EngineServerExecuteRequestType =\n keyof EngineServerExecuteRequestByType;\n\nexport interface EngineServerExecutePlaceOrderPayload {\n payload: EngineServerExecuteRequestByType['place_order'];\n orderParams: EIP712OrderParams;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { SignedTx, EIP712BurnNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712MintNlpValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, EIP712OrderParams
|
|
1
|
+
import { SignedTx, EIP712BurnNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712MintNlpValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, EIP712OrderParams } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerOrderResponse } from './serverQueryTypes.cjs';
|
|
3
3
|
import './serverQueryModelTypes.cjs';
|
|
4
4
|
|
|
5
5
|
interface EngineServerPlaceOrderResponse {
|
|
6
6
|
digest: string;
|
|
7
|
+
error: string | null;
|
|
7
8
|
}
|
|
9
|
+
type EngineServerPlaceOrdersResponse = EngineServerPlaceOrderResponse[];
|
|
8
10
|
interface EngineServerCancelOrdersResponse {
|
|
9
11
|
cancelled_orders: EngineServerOrderResponse[];
|
|
10
12
|
}
|
|
@@ -16,8 +18,8 @@ interface EngineServerExecuteResponseDataByType {
|
|
|
16
18
|
link_signer: null;
|
|
17
19
|
liquidate_subaccount: null;
|
|
18
20
|
mint_nlp: null;
|
|
19
|
-
place_isolated_order: EngineServerPlaceOrderResponse;
|
|
20
21
|
place_order: EngineServerPlaceOrderResponse;
|
|
22
|
+
place_orders: EngineServerPlaceOrdersResponse;
|
|
21
23
|
transfer_quote: null;
|
|
22
24
|
withdraw_collateral: null;
|
|
23
25
|
}
|
|
@@ -44,12 +46,6 @@ interface EngineServerPlaceOrderParams {
|
|
|
44
46
|
order: EIP712OrderValues;
|
|
45
47
|
signature: string;
|
|
46
48
|
spot_leverage: boolean | null;
|
|
47
|
-
}
|
|
48
|
-
interface EngineServerPlaceIsolatedOrderParams {
|
|
49
|
-
id: number | null;
|
|
50
|
-
product_id: number;
|
|
51
|
-
isolated_order: EIP712OrderValues;
|
|
52
|
-
signature: string;
|
|
53
49
|
borrow_margin: boolean | null;
|
|
54
50
|
}
|
|
55
51
|
type EngineServerCancelOrdersParams = SignedTx<Omit<EIP712OrderCancellationValues, 'productIds'> & {
|
|
@@ -73,8 +69,8 @@ interface EngineServerExecuteRequestByType {
|
|
|
73
69
|
link_signer: SignedTx<EIP712LinkSignerValues>;
|
|
74
70
|
liquidate_subaccount: SignedTx<EIP712LiquidateSubaccountValues>;
|
|
75
71
|
mint_nlp: WithSpotLeverage<SignedTx<EIP712MintNlpValues>>;
|
|
76
|
-
place_isolated_order: EngineServerPlaceIsolatedOrderParams;
|
|
77
72
|
place_order: EngineServerPlaceOrderParams;
|
|
73
|
+
place_orders: EngineServerPlaceOrderParams[];
|
|
78
74
|
transfer_quote: SignedTx<EIP712TransferQuoteValues>;
|
|
79
75
|
withdraw_collateral: WithSpotLeverage<SignedTx<EIP712WithdrawCollateralValues>>;
|
|
80
76
|
}
|
|
@@ -83,9 +79,5 @@ interface EngineServerExecutePlaceOrderPayload {
|
|
|
83
79
|
payload: EngineServerExecuteRequestByType['place_order'];
|
|
84
80
|
orderParams: EIP712OrderParams;
|
|
85
81
|
}
|
|
86
|
-
interface EngineServerExecutePlaceIsolatedOrderPayload {
|
|
87
|
-
payload: EngineServerExecuteRequestByType['place_isolated_order'];
|
|
88
|
-
orderParams: EIP712IsolatedOrderParams;
|
|
89
|
-
}
|
|
90
82
|
|
|
91
|
-
export type { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult,
|
|
83
|
+
export type { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServiceCancelAndPlaceParams };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { SignedTx, EIP712BurnNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712MintNlpValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, EIP712OrderParams
|
|
1
|
+
import { SignedTx, EIP712BurnNlpValues, EIP712OrderCancellationValues, EIP712OrderValues, EIP712ProductOrdersCancellationValues, EIP712LinkSignerValues, EIP712LiquidateSubaccountValues, EIP712MintNlpValues, EIP712TransferQuoteValues, EIP712WithdrawCollateralValues, EIP712OrderParams } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerOrderResponse } from './serverQueryTypes.js';
|
|
3
3
|
import './serverQueryModelTypes.js';
|
|
4
4
|
|
|
5
5
|
interface EngineServerPlaceOrderResponse {
|
|
6
6
|
digest: string;
|
|
7
|
+
error: string | null;
|
|
7
8
|
}
|
|
9
|
+
type EngineServerPlaceOrdersResponse = EngineServerPlaceOrderResponse[];
|
|
8
10
|
interface EngineServerCancelOrdersResponse {
|
|
9
11
|
cancelled_orders: EngineServerOrderResponse[];
|
|
10
12
|
}
|
|
@@ -16,8 +18,8 @@ interface EngineServerExecuteResponseDataByType {
|
|
|
16
18
|
link_signer: null;
|
|
17
19
|
liquidate_subaccount: null;
|
|
18
20
|
mint_nlp: null;
|
|
19
|
-
place_isolated_order: EngineServerPlaceOrderResponse;
|
|
20
21
|
place_order: EngineServerPlaceOrderResponse;
|
|
22
|
+
place_orders: EngineServerPlaceOrdersResponse;
|
|
21
23
|
transfer_quote: null;
|
|
22
24
|
withdraw_collateral: null;
|
|
23
25
|
}
|
|
@@ -44,12 +46,6 @@ interface EngineServerPlaceOrderParams {
|
|
|
44
46
|
order: EIP712OrderValues;
|
|
45
47
|
signature: string;
|
|
46
48
|
spot_leverage: boolean | null;
|
|
47
|
-
}
|
|
48
|
-
interface EngineServerPlaceIsolatedOrderParams {
|
|
49
|
-
id: number | null;
|
|
50
|
-
product_id: number;
|
|
51
|
-
isolated_order: EIP712OrderValues;
|
|
52
|
-
signature: string;
|
|
53
49
|
borrow_margin: boolean | null;
|
|
54
50
|
}
|
|
55
51
|
type EngineServerCancelOrdersParams = SignedTx<Omit<EIP712OrderCancellationValues, 'productIds'> & {
|
|
@@ -73,8 +69,8 @@ interface EngineServerExecuteRequestByType {
|
|
|
73
69
|
link_signer: SignedTx<EIP712LinkSignerValues>;
|
|
74
70
|
liquidate_subaccount: SignedTx<EIP712LiquidateSubaccountValues>;
|
|
75
71
|
mint_nlp: WithSpotLeverage<SignedTx<EIP712MintNlpValues>>;
|
|
76
|
-
place_isolated_order: EngineServerPlaceIsolatedOrderParams;
|
|
77
72
|
place_order: EngineServerPlaceOrderParams;
|
|
73
|
+
place_orders: EngineServerPlaceOrderParams[];
|
|
78
74
|
transfer_quote: SignedTx<EIP712TransferQuoteValues>;
|
|
79
75
|
withdraw_collateral: WithSpotLeverage<SignedTx<EIP712WithdrawCollateralValues>>;
|
|
80
76
|
}
|
|
@@ -83,9 +79,5 @@ interface EngineServerExecutePlaceOrderPayload {
|
|
|
83
79
|
payload: EngineServerExecuteRequestByType['place_order'];
|
|
84
80
|
orderParams: EIP712OrderParams;
|
|
85
81
|
}
|
|
86
|
-
interface EngineServerExecutePlaceIsolatedOrderPayload {
|
|
87
|
-
payload: EngineServerExecuteRequestByType['place_isolated_order'];
|
|
88
|
-
orderParams: EIP712IsolatedOrderParams;
|
|
89
|
-
}
|
|
90
82
|
|
|
91
|
-
export type { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult,
|
|
83
|
+
export type { EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServiceCancelAndPlaceParams };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverQueryModelTypes.ts"],"sourcesContent":["export interface EngineServerHealthBreakdown {\n health: string;\n assets: string;\n liabilities: string;\n}\n\nexport interface EngineServerSpotBalanceData {\n amount: string;\n
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverQueryModelTypes.ts"],"sourcesContent":["export interface EngineServerHealthBreakdown {\n health: string;\n assets: string;\n liabilities: string;\n}\n\nexport interface EngineServerSpotBalanceData {\n amount: string;\n}\n\nexport interface EngineServerPerpBalanceData {\n amount: string;\n v_quote_balance: string;\n last_cumulative_funding_x18: string;\n}\n\nexport interface EngineServerRisk {\n long_weight_initial_x18: string;\n short_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n short_weight_maintenance_x18: string;\n large_position_penalty_x18: string;\n}\n\nexport interface EngineServerBookInfo {\n size_increment: string;\n price_increment_x18: string;\n min_size: string;\n collected_fees: string;\n}\n\nexport interface EngineServerSpotConfig {\n token: string;\n interest_inflection_util_x18: string;\n interest_floor_x18: string;\n interest_small_cap_x18: string;\n interest_large_cap_x18: string;\n min_deposit_rate_x18: string;\n}\n\nexport interface EngineServerSpotState {\n cumulative_deposits_multiplier_x18: string;\n cumulative_borrows_multiplier_x18: string;\n total_deposits_normalized: string;\n total_borrows_normalized: string;\n}\n\nexport interface EngineServerPerpState {\n cumulative_funding_long_x18: string;\n cumulative_funding_short_x18: string;\n available_settle: string;\n open_interest: string;\n}\n\nexport interface EngineServerSpotProduct {\n product_id: number;\n oracle_price_x18: string;\n risk: EngineServerRisk;\n config: EngineServerSpotConfig;\n state: EngineServerSpotState;\n book_info: EngineServerBookInfo;\n}\n\nexport interface EngineServerSpotBalance {\n product_id: number;\n balance: EngineServerSpotBalanceData;\n}\n\nexport interface EngineServerPerpProduct {\n product_id: number;\n oracle_price_x18: string;\n index_price_x18: string;\n risk: EngineServerRisk;\n state: EngineServerPerpState;\n book_info: EngineServerBookInfo;\n}\n\nexport interface EngineServerPerpBalance {\n product_id: number;\n balance: EngineServerPerpBalanceData;\n}\n\nexport type EngineServerProductType = 'perp' | 'spot';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -5,7 +5,6 @@ interface EngineServerHealthBreakdown {
|
|
|
5
5
|
}
|
|
6
6
|
interface EngineServerSpotBalanceData {
|
|
7
7
|
amount: string;
|
|
8
|
-
last_cumulative_multiplier_x18: string;
|
|
9
8
|
}
|
|
10
9
|
interface EngineServerPerpBalanceData {
|
|
11
10
|
amount: string;
|
|
@@ -31,6 +30,7 @@ interface EngineServerSpotConfig {
|
|
|
31
30
|
interest_floor_x18: string;
|
|
32
31
|
interest_small_cap_x18: string;
|
|
33
32
|
interest_large_cap_x18: string;
|
|
33
|
+
min_deposit_rate_x18: string;
|
|
34
34
|
}
|
|
35
35
|
interface EngineServerSpotState {
|
|
36
36
|
cumulative_deposits_multiplier_x18: string;
|
|
@@ -5,7 +5,6 @@ interface EngineServerHealthBreakdown {
|
|
|
5
5
|
}
|
|
6
6
|
interface EngineServerSpotBalanceData {
|
|
7
7
|
amount: string;
|
|
8
|
-
last_cumulative_multiplier_x18: string;
|
|
9
8
|
}
|
|
10
9
|
interface EngineServerPerpBalanceData {
|
|
11
10
|
amount: string;
|
|
@@ -31,6 +30,7 @@ interface EngineServerSpotConfig {
|
|
|
31
30
|
interest_floor_x18: string;
|
|
32
31
|
interest_small_cap_x18: string;
|
|
33
32
|
interest_large_cap_x18: string;
|
|
33
|
+
min_deposit_rate_x18: string;
|
|
34
34
|
}
|
|
35
35
|
interface EngineServerSpotState {
|
|
36
36
|
cumulative_deposits_multiplier_x18: string;
|