@nadohq/engine-client 0.53.0 → 0.55.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/{EngineBaseClient-Cxc6BZIi.d.cts → EngineBaseClient-CRw2Oq6b.d.cts} +5 -5
- package/dist/{EngineBaseClient-Cxc6BZIi.d.cts.map → EngineBaseClient-CRw2Oq6b.d.cts.map} +1 -1
- package/dist/{EngineBaseClient-CjoiEm02.d.ts → EngineBaseClient-CluoONVm.d.ts} +5 -5
- package/dist/{EngineBaseClient-CjoiEm02.d.ts.map → EngineBaseClient-CluoONVm.d.ts.map} +1 -1
- package/dist/EngineBaseClient.d.cts +1 -1
- package/dist/EngineBaseClient.d.ts +1 -1
- package/dist/EngineClient.d.cts +4 -4
- package/dist/EngineClient.d.ts +4 -4
- package/dist/{EngineEdgeQueryClient-Bq_XjCl7.d.cts → EngineEdgeQueryClient-Bu5QvTD2.d.cts} +4 -4
- package/dist/{EngineEdgeQueryClient-Bq_XjCl7.d.cts.map → EngineEdgeQueryClient-Bu5QvTD2.d.cts.map} +1 -1
- package/dist/{EngineEdgeQueryClient-CGPNiYNf.d.ts → EngineEdgeQueryClient-CzoSgrG_.d.ts} +4 -4
- package/dist/{EngineEdgeQueryClient-CGPNiYNf.d.ts.map → EngineEdgeQueryClient-CzoSgrG_.d.ts.map} +1 -1
- package/dist/EngineEdgeQueryClient.d.cts +1 -1
- package/dist/EngineEdgeQueryClient.d.ts +1 -1
- package/dist/{EngineExecuteBuilder-ySU-JZWq.d.cts → EngineExecuteBuilder--zGhBm89.d.cts} +4 -4
- package/dist/{EngineExecuteBuilder-ySU-JZWq.d.cts.map → EngineExecuteBuilder--zGhBm89.d.cts.map} +1 -1
- package/dist/{EngineExecuteBuilder-CJE3bMf2.d.ts → EngineExecuteBuilder-Df-wtiCL.d.ts} +4 -4
- package/dist/{EngineExecuteBuilder-CJE3bMf2.d.ts.map → EngineExecuteBuilder-Df-wtiCL.d.ts.map} +1 -1
- package/dist/EngineExecuteBuilder.d.cts +1 -1
- package/dist/EngineExecuteBuilder.d.ts +1 -1
- package/dist/{EngineExecuteClient-Dc-nshM9.d.ts → EngineExecuteClient-Bgy4Sdxm.d.ts} +5 -5
- package/dist/{EngineExecuteClient-Dc-nshM9.d.ts.map → EngineExecuteClient-Bgy4Sdxm.d.ts.map} +1 -1
- package/dist/{EngineExecuteClient-DG_pj7dE.d.cts → EngineExecuteClient-Bs7JROLa.d.cts} +5 -5
- package/dist/{EngineExecuteClient-DG_pj7dE.d.cts.map → EngineExecuteClient-Bs7JROLa.d.cts.map} +1 -1
- package/dist/EngineExecuteClient.d.cts +1 -1
- package/dist/EngineExecuteClient.d.ts +1 -1
- package/dist/{EngineQueryClient-CyLOXvEQ.d.ts → EngineQueryClient-BgFEpsv8.d.cts} +7 -15
- package/dist/EngineQueryClient-BgFEpsv8.d.cts.map +1 -0
- package/dist/{EngineQueryClient-Bb_dQxl9.d.cts → EngineQueryClient-DN3nc5u1.d.ts} +7 -15
- package/dist/EngineQueryClient-DN3nc5u1.d.ts.map +1 -0
- package/dist/EngineQueryClient.cjs +14 -5
- package/dist/EngineQueryClient.cjs.map +1 -1
- package/dist/EngineQueryClient.d.cts +1 -1
- package/dist/EngineQueryClient.d.ts +1 -1
- package/dist/EngineQueryClient.js +14 -5
- package/dist/EngineQueryClient.js.map +1 -1
- package/dist/{EngineServerFailureError-DmeIkcaO.d.ts → EngineServerFailureError-CdVixTCJ.d.ts} +3 -3
- package/dist/{EngineServerFailureError-DmeIkcaO.d.ts.map → EngineServerFailureError-CdVixTCJ.d.ts.map} +1 -1
- package/dist/{EngineServerFailureError-D6FhNLZ1.d.cts → EngineServerFailureError-Rxb1C9Ng.d.cts} +3 -3
- package/dist/{EngineServerFailureError-D6FhNLZ1.d.cts.map → EngineServerFailureError-Rxb1C9Ng.d.cts.map} +1 -1
- package/dist/{EngineWebClient-sirYCWks.d.cts → EngineWebClient-DsfsPm8h.d.cts} +3 -3
- package/dist/{EngineWebClient-sirYCWks.d.cts.map → EngineWebClient-DsfsPm8h.d.cts.map} +1 -1
- package/dist/{EngineWebClient-5TyQwF9e.d.ts → EngineWebClient-lr41B5ZT.d.ts} +3 -3
- package/dist/{EngineWebClient-5TyQwF9e.d.ts.map → EngineWebClient-lr41B5ZT.d.ts.map} +1 -1
- package/dist/EngineWebClient.d.cts +1 -1
- package/dist/EngineWebClient.d.ts +1 -1
- package/dist/{clientExecuteTypes-fh0QGFm3.d.ts → clientExecuteTypes-6S0AH47Q.d.ts} +2 -2
- package/dist/{clientExecuteTypes-fh0QGFm3.d.ts.map → clientExecuteTypes-6S0AH47Q.d.ts.map} +1 -1
- package/dist/{clientExecuteTypes-DdTonPFz.d.cts → clientExecuteTypes-By-lvAzV.d.cts} +2 -2
- package/dist/{clientExecuteTypes-DdTonPFz.d.cts.map → clientExecuteTypes-By-lvAzV.d.cts.map} +1 -1
- package/dist/{clientQueryTypes-BRmW-hwV.d.ts → clientQueryTypes-CEPCGqDx.d.cts} +16 -14
- package/dist/{clientQueryTypes-86sEMdWH.d.cts.map → clientQueryTypes-CEPCGqDx.d.cts.map} +1 -1
- package/dist/{clientQueryTypes-86sEMdWH.d.cts → clientQueryTypes-DWpgABZh.d.ts} +16 -14
- package/dist/{clientQueryTypes-BRmW-hwV.d.ts.map → clientQueryTypes-DWpgABZh.d.ts.map} +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/{queryDataMappers-DwyNNcWZ.d.ts → queryDataMappers-BiQsKN08.d.ts} +4 -4
- package/dist/{queryDataMappers-DwyNNcWZ.d.ts.map → queryDataMappers-BiQsKN08.d.ts.map} +1 -1
- package/dist/{queryDataMappers-Dv41azb7.d.cts → queryDataMappers-DoQGipeY.d.cts} +4 -4
- package/dist/{queryDataMappers-Dv41azb7.d.cts.map → queryDataMappers-DoQGipeY.d.cts.map} +1 -1
- package/dist/{serverEdgeQueryTypes-BuVoqyAf.d.ts → serverEdgeQueryTypes-B4NU8dQ5.d.ts} +2 -2
- package/dist/{serverEdgeQueryTypes-BuVoqyAf.d.ts.map → serverEdgeQueryTypes-B4NU8dQ5.d.ts.map} +1 -1
- package/dist/{serverEdgeQueryTypes-BaMFzyz8.d.cts → serverEdgeQueryTypes-CIjW7fOw.d.cts} +2 -2
- package/dist/{serverEdgeQueryTypes-BaMFzyz8.d.cts.map → serverEdgeQueryTypes-CIjW7fOw.d.cts.map} +1 -1
- package/dist/{serverExecuteTypes-DMNnEFf7.d.ts → serverExecuteTypes-B8nz4BGu.d.ts} +2 -2
- package/dist/{serverExecuteTypes-DMNnEFf7.d.ts.map → serverExecuteTypes-B8nz4BGu.d.ts.map} +1 -1
- package/dist/{serverExecuteTypes-B5TGnwV0.d.cts → serverExecuteTypes-DzPLzxDt.d.cts} +2 -2
- package/dist/{serverExecuteTypes-B5TGnwV0.d.cts.map → serverExecuteTypes-DzPLzxDt.d.cts.map} +1 -1
- package/dist/{serverQueryTypes-B310vOgF.d.ts → serverQueryTypes-CUC8fyd-.d.ts} +7 -1
- package/dist/serverQueryTypes-CUC8fyd-.d.ts.map +1 -0
- package/dist/{serverQueryTypes-Z9L5CzzX.d.cts → serverQueryTypes-Gygk40jK.d.cts} +7 -1
- package/dist/serverQueryTypes-Gygk40jK.d.cts.map +1 -0
- package/dist/{serverSubscriptionEventTypes-C3X3GUTW.d.ts → serverSubscriptionEventTypes-CQUE2i55.d.ts} +2 -2
- package/dist/{serverSubscriptionEventTypes-C3X3GUTW.d.ts.map → serverSubscriptionEventTypes-CQUE2i55.d.ts.map} +1 -1
- package/dist/{serverSubscriptionEventTypes-D4PkREoN.d.cts → serverSubscriptionEventTypes-DmwkAEwZ.d.cts} +2 -2
- package/dist/{serverSubscriptionEventTypes-D4PkREoN.d.cts.map → serverSubscriptionEventTypes-DmwkAEwZ.d.cts.map} +1 -1
- package/dist/types/EngineServerFailureError.d.cts +1 -1
- package/dist/types/EngineServerFailureError.d.ts +1 -1
- package/dist/types/clientExecuteTypes.d.cts +1 -1
- package/dist/types/clientExecuteTypes.d.ts +1 -1
- package/dist/types/clientQueryTypes.d.cts +2 -2
- package/dist/types/clientQueryTypes.d.ts +2 -2
- package/dist/types/index.d.cts +8 -8
- package/dist/types/index.d.ts +8 -8
- package/dist/types/serverEdgeQueryTypes.d.cts +1 -1
- package/dist/types/serverEdgeQueryTypes.d.ts +1 -1
- package/dist/types/serverExecuteTypes.d.cts +1 -1
- package/dist/types/serverExecuteTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +1 -1
- package/dist/types/serverQueryTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.cts +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.ts +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/queryDataMappers.d.cts +1 -1
- package/dist/utils/queryDataMappers.d.ts +1 -1
- package/package.json +3 -3
- package/src/EngineQueryClient.ts +17 -33
- package/src/types/clientQueryTypes.ts +13 -12
- package/src/types/serverQueryTypes.ts +6 -0
- package/dist/EngineQueryClient-Bb_dQxl9.d.cts.map +0 -1
- package/dist/EngineQueryClient-CyLOXvEQ.d.ts.map +0 -1
- package/dist/serverQueryTypes-B310vOgF.d.ts.map +0 -1
- package/dist/serverQueryTypes-Z9L5CzzX.d.cts.map +0 -1
|
@@ -275,7 +275,13 @@ var EngineQueryClient = class extends EngineBaseClient {
|
|
|
275
275
|
borrow_margin: params.isolated && params.isoBorrowMargin != null ? String(params.isoBorrowMargin) : null
|
|
276
276
|
})).max_order_size);
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Retrieves the estimated max withdrawal size for a product, or the max transferable quote
|
|
280
|
+
* amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the
|
|
281
|
+
* current dynamic fee reserved. The reserved fee is returned as `fee`.
|
|
282
|
+
* @param params
|
|
283
|
+
*/
|
|
284
|
+
async getMaxWithdrawable(params) {
|
|
279
285
|
const baseResponse = await this.query("max_withdrawable", {
|
|
280
286
|
product_id: params.productId,
|
|
281
287
|
sender: subaccountToHex({
|
|
@@ -283,13 +289,16 @@ var EngineQueryClient = class extends EngineBaseClient {
|
|
|
283
289
|
subaccountName: params.subaccountName
|
|
284
290
|
}),
|
|
285
291
|
spot_leverage: params.spotLeverage != null ? String(params.spotLeverage) : null,
|
|
286
|
-
dynamic_fee:
|
|
292
|
+
dynamic_fee: "true",
|
|
293
|
+
recipient: params.recipientSubaccountName != null ? subaccountToHex({
|
|
294
|
+
subaccountOwner: params.subaccountOwner,
|
|
295
|
+
subaccountName: params.recipientSubaccountName
|
|
296
|
+
}) : null
|
|
287
297
|
});
|
|
288
|
-
|
|
298
|
+
return {
|
|
289
299
|
maxWithdrawable: toBigNumber(baseResponse.max_withdrawable),
|
|
290
|
-
fee:
|
|
300
|
+
fee: toBigNumber(baseResponse.fee_x18 ?? 0)
|
|
291
301
|
};
|
|
292
|
-
return toBigNumber(baseResponse.max_withdrawable);
|
|
293
302
|
}
|
|
294
303
|
/**
|
|
295
304
|
* Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineQueryClient.js","names":[],"sources":["../src/EngineQueryClient.ts"],"sourcesContent":["import {\n addDecimals,\n encodeSignedOrder,\n getOrderVerifyingAddress,\n mapValues,\n MarketWithProduct,\n removeDecimals,\n subaccountToHex,\n toBigNumber,\n toIntegerString,\n} from '@nadohq/shared';\nimport BigNumber from 'bignumber.js';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineServerDynamicFeeQuoteQueryParams,\n EngineServerStatusResponse,\n EngineServerSubaccountInfoQueryParams,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineContractsResponse,\n GetEngineDynamicFeeQuoteParams,\n GetEngineDynamicFeeQuoteResponse,\n GetEngineEstimatedSubaccountSummaryParams,\n GetEngineHealthGroupsResponse,\n GetEngineInsuranceResponse,\n GetEngineIsolatedPositionsParams,\n GetEngineIsolatedPositionsResponse,\n GetEngineLinkedSignerParams,\n GetEngineLinkedSignerResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketLiquidityResponse,\n GetEngineMarketPriceParams,\n GetEngineMarketPriceResponse,\n GetEngineMarketPricesParams,\n GetEngineMarketPricesResponse,\n GetEngineMaxBurnNlpAmountParams,\n GetEngineMaxBurnNlpAmountResponse,\n GetEngineMaxMintNlpAmountParams,\n GetEngineMaxMintNlpAmountResponse,\n GetEngineMaxOrderSizeParams,\n GetEngineMaxOrderSizeResponse,\n GetEngineMaxWithdrawableParams,\n GetEngineMaxWithdrawableResponse,\n GetEngineMaxWithdrawableWithDynamicFeeResponse,\n GetEngineNlpLockedBalancesParams,\n GetEngineNlpLockedBalancesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineOrderParams,\n GetEngineOrderResponse,\n GetEngineSubaccountFeeRatesParams,\n GetEngineSubaccountFeeRatesResponse,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountOrdersResponse,\n GetEngineSubaccountProductOrdersParams,\n GetEngineSubaccountProductOrdersResponse,\n GetEngineSubaccountSummaryParams,\n GetEngineSubaccountSummaryResponse,\n GetEngineSymbolsParams,\n SubaccountOrderFeeRates,\n ValidateEngineOrderParams,\n ValidateEngineOrderResponse,\n ValidateSignedEngineOrderParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineMarketPrice,\n mapEngineServerIsolatedPositions,\n mapEngineServerNlpLockedBalances,\n mapEngineServerNlpPoolInfo,\n mapEngineServerOrder,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n mapEngineServerTickLiquidity,\n mapSubaccountSummary,\n} from './utils/queryDataMappers';\n\nexport class EngineQueryClient extends EngineBaseClient {\n /**\n * Retrieves the set of contracts that the engine is interfacing with\n */\n async getContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.query('contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Retrieves current engine status\n */\n async getStatus(): Promise<EngineServerStatusResponse> {\n return this.query('status', {});\n }\n\n /**\n * Retrieves a subaccount summary reflective of the state within the offchain engine. This adheres to the\n * same return interface as the contract version\n *\n * @param params\n */\n async getSubaccountSummary(\n params: GetEngineSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('subaccount_info', {\n subaccount,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves a list of isolated positions\n *\n * @param params\n */\n async getIsolatedPositions(\n params: GetEngineIsolatedPositionsParams,\n ): Promise<GetEngineIsolatedPositionsResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('isolated_positions', {\n subaccount,\n });\n\n return mapEngineServerIsolatedPositions(baseResponse);\n }\n\n /**\n * Retrieves an estimated subaccount summary with the applied transactions\n *\n * @param params\n */\n async getEstimatedSubaccountSummary(\n params: GetEngineEstimatedSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const queryParams: EngineServerSubaccountInfoQueryParams = {\n subaccount: subaccount,\n txns: params.txs.map(\n (\n tx,\n ): NonNullable<\n EngineServerSubaccountInfoQueryParams['txns']\n >[number] => {\n switch (tx.type) {\n case 'apply_delta':\n return {\n apply_delta: {\n product_id: tx.tx.productId,\n subaccount,\n amount_delta: toIntegerString(tx.tx.amountDelta),\n v_quote_delta: toIntegerString(tx.tx.vQuoteDelta),\n },\n };\n }\n },\n ),\n };\n const baseResponse = await this.query('subaccount_info', {\n subaccount: queryParams.subaccount,\n txns: JSON.stringify(queryParams.txns),\n // Backend expects string variants of booleans\n pre_state:\n params.preState !== undefined ? String(params.preState) : undefined,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves symbols and product info\n *\n * @param params\n */\n async getSymbols(\n params: GetEngineSymbolsParams,\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.query('symbols', {\n product_ids: params.productIds,\n product_type:\n params.productType != null\n ? mapProductEngineType(params.productType)\n : undefined,\n });\n return mapEngineServerSymbols(baseResponse);\n }\n\n /**\n * Retrieves all market states as per the offchain engine. Same return interface as contracts\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.query('all_products', {});\n baseResponse.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n baseResponse.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n }\n\n /**\n * Retrieves all markets by chain id.\n */\n async getEdgeAllMarkets(): Promise<Record<number, MarketWithProduct[]>> {\n const baseResponse = await this.query('edge_all_products', {});\n\n return mapValues(baseResponse.edge_all_products, (allProducts) => {\n const markets: MarketWithProduct[] = [];\n\n allProducts.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n\n allProducts.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n });\n }\n\n /**\n * Retrieves all health groups (linked spot & perp products) from the engine\n */\n async getHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.query('health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => {\n return {\n spotProductId,\n perpProductId,\n };\n },\n ),\n };\n }\n\n /**\n * Retrieves an order from the offchain engine\n *\n * @param params\n */\n async getOrder(\n params: GetEngineOrderParams,\n ): Promise<GetEngineOrderResponse> {\n const baseResponse = await this.query('order', {\n digest: params.digest,\n product_id: params.productId,\n });\n\n return mapEngineServerOrder(baseResponse);\n }\n\n /**\n * Signs and validates with the engine that the order is valid to be submitted (i.e. does not violate health reqs)\n *\n * @param params\n */\n async validateOrderParams(\n params: ValidateEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const signedOrder = {\n order: params.order,\n signature: await this.sign(\n 'place_order',\n getOrderVerifyingAddress(params.productId),\n params.chainId,\n params.order,\n ),\n };\n return this.validateSignedOrderParams({\n signedOrder,\n productId: params.productId,\n });\n }\n\n /**\n * Validates an existing signed order with the engine as a pre-check for health\n *\n * @param params\n */\n async validateSignedOrderParams(\n params: ValidateSignedEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const baseResponse = await this.query('validate_order', {\n product_id: params.productId,\n order: encodeSignedOrder(params.signedOrder),\n });\n\n return {\n productId: baseResponse.product_id,\n valid: baseResponse.valid,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, per product ID\n * @param params\n */\n async getSubaccountOrders(\n params: GetEngineSubaccountOrdersParams,\n ): Promise<GetEngineSubaccountOrdersResponse> {\n const baseResponse = await this.query('subaccount_orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_id: params.productId,\n });\n\n return {\n orders: baseResponse.orders.map(mapEngineServerOrder),\n productId: params.productId,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, for multiple products\n * @param params\n */\n async getSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ): Promise<GetEngineSubaccountProductOrdersResponse> {\n const baseResponse = await this.query('orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_ids: params.productIds,\n });\n\n return {\n productOrders: baseResponse.product_orders.map((orders) => {\n return {\n orders: orders.orders.map(mapEngineServerOrder),\n productId: orders.product_id,\n };\n }),\n };\n }\n\n /**\n * Gets maker & taker fee rates for order fees\n * @param params\n */\n async getSubaccountFeeRates(\n params: GetEngineSubaccountFeeRatesParams,\n ): Promise<GetEngineSubaccountFeeRatesResponse> {\n const baseResponse = await this.query('fee_rates', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n healthCheckSequencerFee: toBigNumber(\n baseResponse.health_check_sequencer_fee,\n ),\n liquidationSequencerFee: toBigNumber(\n baseResponse.liquidation_sequencer_fee,\n ),\n takerSequencerFee: toBigNumber(baseResponse.taker_sequencer_fee),\n orders: baseResponse.taker_fee_rates_x18.reduce(\n (acc, takerRateX18, currIndex) => {\n acc[currIndex] = {\n taker: removeDecimals(takerRateX18),\n maker: removeDecimals(baseResponse.maker_fee_rates_x18[currIndex]),\n };\n return acc;\n },\n {} as Record<number, SubaccountOrderFeeRates>,\n ),\n withdrawal: baseResponse.withdraw_sequencer_fees.reduce(\n (acc, productFee, currIndex) => {\n acc[currIndex] = toBigNumber(productFee);\n return acc;\n },\n {} as Record<number, BigNumber>,\n ),\n feeTier: baseResponse.fee_tier,\n };\n }\n\n /**\n * Gets \"price ticks\" for a given market, useful for constructing liquidity levels at each price\n * @param params\n */\n async getMarketLiquidity(\n params: GetEngineMarketLiquidityParams,\n ): Promise<GetEngineMarketLiquidityResponse> {\n const baseResponse = await this.query('market_liquidity', {\n product_id: params.productId,\n depth: params.depth,\n });\n return {\n asks: baseResponse.asks.map(mapEngineServerTickLiquidity),\n bids: baseResponse.bids.map(mapEngineServerTickLiquidity),\n };\n }\n\n /**\n * Retrieves the latest price for a given market\n * @param params\n */\n async getMarketPrice(\n params: GetEngineMarketPriceParams,\n ): Promise<GetEngineMarketPriceResponse> {\n const baseResponse = await this.query('market_price', {\n product_id: params.productId,\n });\n return mapEngineMarketPrice(baseResponse);\n }\n\n /**\n * Retrieves the latest prices for provided markets\n * @param params\n */\n async getMarketPrices(\n params: GetEngineMarketPricesParams,\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.query('market_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Retrieves the estimated max order size for a product\n * @param params\n */\n async getMaxOrderSize(\n params: GetEngineMaxOrderSizeParams,\n ): Promise<GetEngineMaxOrderSizeResponse> {\n const baseResponse = await this.query('max_order_size', {\n direction: params.side,\n price_x18: toIntegerString(addDecimals(params.price)),\n avg_price_x18:\n params.avgPrice != null\n ? toIntegerString(addDecimals(params.avgPrice))\n : null,\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n // Backend expects string variants of booleans\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n reduce_only: params.reduceOnly != null ? String(params.reduceOnly) : null,\n isolated: params.isolated != null ? String(params.isolated) : null,\n borrow_margin:\n // This field is only relevant for isolated orders\n params.isolated && params.isoBorrowMargin != null\n ? String(params.isoBorrowMargin)\n : null,\n });\n\n return toBigNumber(baseResponse.max_order_size);\n }\n\n /**\n * Retrieves the estimated max withdrawal size for a product\n * @param params\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n ): Promise<GetEngineMaxWithdrawableResponse>;\n /**\n * Retrieves the estimated max withdrawal size for a product, with the current dynamic fee of\n * Withdraw Collateral V2 reserved instead of the flat fee. The reserved fee is returned as\n * `fee`.\n * @param params\n * @returns The max withdrawable with the current dynamic fee reserved, and the reserved fee.\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n options: { withDynamicFee: true },\n ): Promise<GetEngineMaxWithdrawableWithDynamicFeeResponse>;\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n options?: { withDynamicFee?: boolean },\n ): Promise<\n | GetEngineMaxWithdrawableResponse\n | GetEngineMaxWithdrawableWithDynamicFeeResponse\n > {\n const baseResponse = await this.query('max_withdrawable', {\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n dynamic_fee: options?.withDynamicFee ? 'true' : null,\n });\n\n if (options?.withDynamicFee) {\n return {\n maxWithdrawable: toBigNumber(baseResponse.max_withdrawable),\n fee:\n baseResponse.fee_x18 != null\n ? toBigNumber(baseResponse.fee_x18)\n : undefined,\n };\n }\n\n return toBigNumber(baseResponse.max_withdrawable);\n }\n\n /**\n * Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.\n * The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.\n * @param params\n * @returns The current required fee, the fee cap, and the V2 demand pressure.\n */\n async getDynamicFeeQuote(\n params: GetEngineDynamicFeeQuoteParams,\n ): Promise<GetEngineDynamicFeeQuoteResponse> {\n const sender = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n let queryParams: EngineServerDynamicFeeQuoteQueryParams;\n switch (params.kind) {\n case 'withdrawal':\n queryParams = {\n kind: params.kind,\n sender,\n product_id: params.productId,\n };\n break;\n case 'transfer_quote':\n queryParams = {\n kind: params.kind,\n sender,\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n };\n break;\n }\n\n const baseResponse = await this.query('dynamic_fee_quote', queryParams);\n\n return {\n requiredFee: toBigNumber(baseResponse.required_fee_x18),\n feeCap: toBigNumber(baseResponse.fee_cap_x18),\n pressure: toBigNumber(baseResponse.pressure_x18),\n };\n }\n\n /**\n * Retrieves the estimated max quote amount for minting NLP.\n *\n * @param params\n */\n async getMaxMintNlpAmount(\n params: GetEngineMaxMintNlpAmountParams,\n ): Promise<GetEngineMaxMintNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_mintable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n });\n\n return toBigNumber(baseResponse.max_quote_amount);\n }\n\n /**\n * Retrieves the max amount of NLP that can be burned.\n *\n * @param params\n */\n async getMaxBurnNlpAmount(\n params: GetEngineMaxBurnNlpAmountParams,\n ): Promise<GetEngineMaxBurnNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_burnable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return toBigNumber(baseResponse.max_nlp_amount);\n }\n\n /**\n * Gets the currently linked signer for the subaccount\n * @param params\n * @returns\n */\n public async getLinkedSigner(\n params: GetEngineLinkedSignerParams,\n ): Promise<GetEngineLinkedSignerResponse> {\n const baseResponse = await this.query('linked_signer', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n signer: baseResponse.linked_signer,\n };\n }\n\n /**\n * Gets the insurance funds in USDT.\n * @returns\n */\n public async getInsurance(): Promise<GetEngineInsuranceResponse> {\n const baseResponse = await this.query('insurance', {});\n\n return toBigNumber(baseResponse.insurance);\n }\n\n /**\n * Retrieves the NLP locked and unlocked balances for a subaccount.\n *\n * @param params\n */\n async getNlpLockedBalances(\n params: GetEngineNlpLockedBalancesParams,\n ): Promise<GetEngineNlpLockedBalancesResponse> {\n const baseResponse = await this.query('nlp_locked_balances', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return mapEngineServerNlpLockedBalances(baseResponse);\n }\n\n /**\n * Retrieves information about all NLP sub-pools\n */\n async getNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.query('nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n}\n"],"mappings":";;;;;AA6EA,IAAa,oBAAb,cAAuC,iBAAiB;;;;CAItD,MAAM,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ACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,GAE+B,cAAc;CAChD;;;;;;CAOA,MAAa,gBACX,QACwC;EAQxC,OAAO,EACL,SAAQ,MARiB,KAAK,MAAM,iBAAiB,EACrD,YAAY,gBAAgB;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,GAGsB,cACvB;CACF;;;;;CAMA,MAAa,eAAoD;EAG/D,OAAO,aAAY,MAFQ,KAAK,MAAM,aAAa,CAAC,CAAC,GAErB,SAAS;CAC3C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAQ7C,OAAO,iCAAiC,MAPb,KAAK,MAAM,uBAAuB,EAC3D,YAAY,gBAAgB;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,CAEmD;CACtD;;;;CAKA,MAAM,iBAAwD;EAE5D,OAAO,2BAA2B,MADP,KAAK,MAAM,iBAAiB,CAAC,CAAC,CACX;CAChD;AACF"}
|
|
1
|
+
{"version":3,"file":"EngineQueryClient.js","names":[],"sources":["../src/EngineQueryClient.ts"],"sourcesContent":["import {\n addDecimals,\n encodeSignedOrder,\n getOrderVerifyingAddress,\n mapValues,\n MarketWithProduct,\n removeDecimals,\n subaccountToHex,\n toBigNumber,\n toIntegerString,\n} from '@nadohq/shared';\nimport BigNumber from 'bignumber.js';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineServerDynamicFeeQuoteQueryParams,\n EngineServerStatusResponse,\n EngineServerSubaccountInfoQueryParams,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineContractsResponse,\n GetEngineDynamicFeeQuoteParams,\n GetEngineDynamicFeeQuoteResponse,\n GetEngineEstimatedSubaccountSummaryParams,\n GetEngineHealthGroupsResponse,\n GetEngineInsuranceResponse,\n GetEngineIsolatedPositionsParams,\n GetEngineIsolatedPositionsResponse,\n GetEngineLinkedSignerParams,\n GetEngineLinkedSignerResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketLiquidityResponse,\n GetEngineMarketPriceParams,\n GetEngineMarketPriceResponse,\n GetEngineMarketPricesParams,\n GetEngineMarketPricesResponse,\n GetEngineMaxBurnNlpAmountParams,\n GetEngineMaxBurnNlpAmountResponse,\n GetEngineMaxMintNlpAmountParams,\n GetEngineMaxMintNlpAmountResponse,\n GetEngineMaxOrderSizeParams,\n GetEngineMaxOrderSizeResponse,\n GetEngineMaxWithdrawableParams,\n GetEngineMaxWithdrawableResponse,\n GetEngineNlpLockedBalancesParams,\n GetEngineNlpLockedBalancesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineOrderParams,\n GetEngineOrderResponse,\n GetEngineSubaccountFeeRatesParams,\n GetEngineSubaccountFeeRatesResponse,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountOrdersResponse,\n GetEngineSubaccountProductOrdersParams,\n GetEngineSubaccountProductOrdersResponse,\n GetEngineSubaccountSummaryParams,\n GetEngineSubaccountSummaryResponse,\n GetEngineSymbolsParams,\n SubaccountOrderFeeRates,\n ValidateEngineOrderParams,\n ValidateEngineOrderResponse,\n ValidateSignedEngineOrderParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineMarketPrice,\n mapEngineServerIsolatedPositions,\n mapEngineServerNlpLockedBalances,\n mapEngineServerNlpPoolInfo,\n mapEngineServerOrder,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n mapEngineServerTickLiquidity,\n mapSubaccountSummary,\n} from './utils/queryDataMappers';\n\nexport class EngineQueryClient extends EngineBaseClient {\n /**\n * Retrieves the set of contracts that the engine is interfacing with\n */\n async getContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.query('contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Retrieves current engine status\n */\n async getStatus(): Promise<EngineServerStatusResponse> {\n return this.query('status', {});\n }\n\n /**\n * Retrieves a subaccount summary reflective of the state within the offchain engine. This adheres to the\n * same return interface as the contract version\n *\n * @param params\n */\n async getSubaccountSummary(\n params: GetEngineSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('subaccount_info', {\n subaccount,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves a list of isolated positions\n *\n * @param params\n */\n async getIsolatedPositions(\n params: GetEngineIsolatedPositionsParams,\n ): Promise<GetEngineIsolatedPositionsResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('isolated_positions', {\n subaccount,\n });\n\n return mapEngineServerIsolatedPositions(baseResponse);\n }\n\n /**\n * Retrieves an estimated subaccount summary with the applied transactions\n *\n * @param params\n */\n async getEstimatedSubaccountSummary(\n params: GetEngineEstimatedSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const queryParams: EngineServerSubaccountInfoQueryParams = {\n subaccount: subaccount,\n txns: params.txs.map(\n (\n tx,\n ): NonNullable<\n EngineServerSubaccountInfoQueryParams['txns']\n >[number] => {\n switch (tx.type) {\n case 'apply_delta':\n return {\n apply_delta: {\n product_id: tx.tx.productId,\n subaccount,\n amount_delta: toIntegerString(tx.tx.amountDelta),\n v_quote_delta: toIntegerString(tx.tx.vQuoteDelta),\n },\n };\n }\n },\n ),\n };\n const baseResponse = await this.query('subaccount_info', {\n subaccount: queryParams.subaccount,\n txns: JSON.stringify(queryParams.txns),\n // Backend expects string variants of booleans\n pre_state:\n params.preState !== undefined ? String(params.preState) : undefined,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves symbols and product info\n *\n * @param params\n */\n async getSymbols(\n params: GetEngineSymbolsParams,\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.query('symbols', {\n product_ids: params.productIds,\n product_type:\n params.productType != null\n ? mapProductEngineType(params.productType)\n : undefined,\n });\n return mapEngineServerSymbols(baseResponse);\n }\n\n /**\n * Retrieves all market states as per the offchain engine. Same return interface as contracts\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.query('all_products', {});\n baseResponse.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n baseResponse.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n }\n\n /**\n * Retrieves all markets by chain id.\n */\n async getEdgeAllMarkets(): Promise<Record<number, MarketWithProduct[]>> {\n const baseResponse = await this.query('edge_all_products', {});\n\n return mapValues(baseResponse.edge_all_products, (allProducts) => {\n const markets: MarketWithProduct[] = [];\n\n allProducts.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n\n allProducts.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n });\n }\n\n /**\n * Retrieves all health groups (linked spot & perp products) from the engine\n */\n async getHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.query('health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => {\n return {\n spotProductId,\n perpProductId,\n };\n },\n ),\n };\n }\n\n /**\n * Retrieves an order from the offchain engine\n *\n * @param params\n */\n async getOrder(\n params: GetEngineOrderParams,\n ): Promise<GetEngineOrderResponse> {\n const baseResponse = await this.query('order', {\n digest: params.digest,\n product_id: params.productId,\n });\n\n return mapEngineServerOrder(baseResponse);\n }\n\n /**\n * Signs and validates with the engine that the order is valid to be submitted (i.e. does not violate health reqs)\n *\n * @param params\n */\n async validateOrderParams(\n params: ValidateEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const signedOrder = {\n order: params.order,\n signature: await this.sign(\n 'place_order',\n getOrderVerifyingAddress(params.productId),\n params.chainId,\n params.order,\n ),\n };\n return this.validateSignedOrderParams({\n signedOrder,\n productId: params.productId,\n });\n }\n\n /**\n * Validates an existing signed order with the engine as a pre-check for health\n *\n * @param params\n */\n async validateSignedOrderParams(\n params: ValidateSignedEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const baseResponse = await this.query('validate_order', {\n product_id: params.productId,\n order: encodeSignedOrder(params.signedOrder),\n });\n\n return {\n productId: baseResponse.product_id,\n valid: baseResponse.valid,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, per product ID\n * @param params\n */\n async getSubaccountOrders(\n params: GetEngineSubaccountOrdersParams,\n ): Promise<GetEngineSubaccountOrdersResponse> {\n const baseResponse = await this.query('subaccount_orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_id: params.productId,\n });\n\n return {\n orders: baseResponse.orders.map(mapEngineServerOrder),\n productId: params.productId,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, for multiple products\n * @param params\n */\n async getSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ): Promise<GetEngineSubaccountProductOrdersResponse> {\n const baseResponse = await this.query('orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_ids: params.productIds,\n });\n\n return {\n productOrders: baseResponse.product_orders.map((orders) => {\n return {\n orders: orders.orders.map(mapEngineServerOrder),\n productId: orders.product_id,\n };\n }),\n };\n }\n\n /**\n * Gets maker & taker fee rates for order fees\n * @param params\n */\n async getSubaccountFeeRates(\n params: GetEngineSubaccountFeeRatesParams,\n ): Promise<GetEngineSubaccountFeeRatesResponse> {\n const baseResponse = await this.query('fee_rates', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n healthCheckSequencerFee: toBigNumber(\n baseResponse.health_check_sequencer_fee,\n ),\n liquidationSequencerFee: toBigNumber(\n baseResponse.liquidation_sequencer_fee,\n ),\n takerSequencerFee: toBigNumber(baseResponse.taker_sequencer_fee),\n orders: baseResponse.taker_fee_rates_x18.reduce(\n (acc, takerRateX18, currIndex) => {\n acc[currIndex] = {\n taker: removeDecimals(takerRateX18),\n maker: removeDecimals(baseResponse.maker_fee_rates_x18[currIndex]),\n };\n return acc;\n },\n {} as Record<number, SubaccountOrderFeeRates>,\n ),\n withdrawal: baseResponse.withdraw_sequencer_fees.reduce(\n (acc, productFee, currIndex) => {\n acc[currIndex] = toBigNumber(productFee);\n return acc;\n },\n {} as Record<number, BigNumber>,\n ),\n feeTier: baseResponse.fee_tier,\n };\n }\n\n /**\n * Gets \"price ticks\" for a given market, useful for constructing liquidity levels at each price\n * @param params\n */\n async getMarketLiquidity(\n params: GetEngineMarketLiquidityParams,\n ): Promise<GetEngineMarketLiquidityResponse> {\n const baseResponse = await this.query('market_liquidity', {\n product_id: params.productId,\n depth: params.depth,\n });\n return {\n asks: baseResponse.asks.map(mapEngineServerTickLiquidity),\n bids: baseResponse.bids.map(mapEngineServerTickLiquidity),\n };\n }\n\n /**\n * Retrieves the latest price for a given market\n * @param params\n */\n async getMarketPrice(\n params: GetEngineMarketPriceParams,\n ): Promise<GetEngineMarketPriceResponse> {\n const baseResponse = await this.query('market_price', {\n product_id: params.productId,\n });\n return mapEngineMarketPrice(baseResponse);\n }\n\n /**\n * Retrieves the latest prices for provided markets\n * @param params\n */\n async getMarketPrices(\n params: GetEngineMarketPricesParams,\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.query('market_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Retrieves the estimated max order size for a product\n * @param params\n */\n async getMaxOrderSize(\n params: GetEngineMaxOrderSizeParams,\n ): Promise<GetEngineMaxOrderSizeResponse> {\n const baseResponse = await this.query('max_order_size', {\n direction: params.side,\n price_x18: toIntegerString(addDecimals(params.price)),\n avg_price_x18:\n params.avgPrice != null\n ? toIntegerString(addDecimals(params.avgPrice))\n : null,\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n // Backend expects string variants of booleans\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n reduce_only: params.reduceOnly != null ? String(params.reduceOnly) : null,\n isolated: params.isolated != null ? String(params.isolated) : null,\n borrow_margin:\n // This field is only relevant for isolated orders\n params.isolated && params.isoBorrowMargin != null\n ? String(params.isoBorrowMargin)\n : null,\n });\n\n return toBigNumber(baseResponse.max_order_size);\n }\n\n /**\n * Retrieves the estimated max withdrawal size for a product, or the max transferable quote\n * amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the\n * current dynamic fee reserved. The reserved fee is returned as `fee`.\n * @param params\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n ): Promise<GetEngineMaxWithdrawableResponse> {\n const baseResponse = await this.query('max_withdrawable', {\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n dynamic_fee: 'true',\n recipient:\n params.recipientSubaccountName != null\n ? subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n })\n : null,\n });\n\n return {\n maxWithdrawable: toBigNumber(baseResponse.max_withdrawable),\n // Server omits `fee_x18` when the subaccount has no deposits\n fee: toBigNumber(baseResponse.fee_x18 ?? 0),\n };\n }\n\n /**\n * Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.\n * The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.\n * @param params\n * @returns The current required fee, the fee cap, and the V2 demand pressure.\n */\n async getDynamicFeeQuote(\n params: GetEngineDynamicFeeQuoteParams,\n ): Promise<GetEngineDynamicFeeQuoteResponse> {\n const sender = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n let queryParams: EngineServerDynamicFeeQuoteQueryParams;\n switch (params.kind) {\n case 'withdrawal':\n queryParams = {\n kind: params.kind,\n sender,\n product_id: params.productId,\n };\n break;\n case 'transfer_quote':\n queryParams = {\n kind: params.kind,\n sender,\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n };\n break;\n }\n\n const baseResponse = await this.query('dynamic_fee_quote', queryParams);\n\n return {\n requiredFee: toBigNumber(baseResponse.required_fee_x18),\n feeCap: toBigNumber(baseResponse.fee_cap_x18),\n pressure: toBigNumber(baseResponse.pressure_x18),\n };\n }\n\n /**\n * Retrieves the estimated max quote amount for minting NLP.\n *\n * @param params\n */\n async getMaxMintNlpAmount(\n params: GetEngineMaxMintNlpAmountParams,\n ): Promise<GetEngineMaxMintNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_mintable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n });\n\n return toBigNumber(baseResponse.max_quote_amount);\n }\n\n /**\n * Retrieves the max amount of NLP that can be burned.\n *\n * @param params\n */\n async getMaxBurnNlpAmount(\n params: GetEngineMaxBurnNlpAmountParams,\n ): Promise<GetEngineMaxBurnNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_burnable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return toBigNumber(baseResponse.max_nlp_amount);\n }\n\n /**\n * Gets the currently linked signer for the subaccount\n * @param params\n * @returns\n */\n public async getLinkedSigner(\n params: GetEngineLinkedSignerParams,\n ): Promise<GetEngineLinkedSignerResponse> {\n const baseResponse = await this.query('linked_signer', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n signer: baseResponse.linked_signer,\n };\n }\n\n /**\n * Gets the insurance funds in USDT.\n * @returns\n */\n public async getInsurance(): Promise<GetEngineInsuranceResponse> {\n const baseResponse = await this.query('insurance', {});\n\n return toBigNumber(baseResponse.insurance);\n }\n\n /**\n * Retrieves the NLP locked and unlocked balances for a subaccount.\n *\n * @param params\n */\n async getNlpLockedBalances(\n params: GetEngineNlpLockedBalancesParams,\n ): Promise<GetEngineNlpLockedBalancesResponse> {\n const baseResponse = await this.query('nlp_locked_balances', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return mapEngineServerNlpLockedBalances(baseResponse);\n }\n\n /**\n * Retrieves information about all NLP sub-pools\n */\n async getNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.query('nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n}\n"],"mappings":";;;;;AA4EA,IAAa,oBAAb,cAAuC,iBAAiB;;;;CAItD,MAAM,eAAoD;EACxD,MAAM,eAAe,MAAM,KAAK,MAAM,aAAa,CAAC,CAAC;EACrD,OAAO;GACL,SAAS,OAAO,aAAa,QAAQ;GACrC,cAAc,aAAa;EAC7B;CACF;;;;CAKA,MAAM,YAAiD;EACrD,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC;CAChC;;;;;;;CAQA,MAAM,qBACJ,QAC6C;EAC7C,MAAM,aAAa,gBAAgB;GACjC,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EAKD,OAAO,qBAAqB,MAJD,KAAK,MAAM,mBAAmB,EACvD,WACF,CAAC,CAEuC;CAC1C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAC7C,MAAM,aAAa,gBAAgB;GACjC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,YAAY,gBAAgB;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,CAEmD;CACtD;;;;CAKA,MAAM,iBAAwD;EAE5D,OAAO,2BAA2B,MADP,KAAK,MAAM,iBAAiB,CAAC,CAAC,CACX;CAChD;AACF"}
|
package/dist/{EngineServerFailureError-DmeIkcaO.d.ts → EngineServerFailureError-CdVixTCJ.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as EngineServerQueryFailureResponse } from "./serverQueryTypes-
|
|
2
|
-
import { r as EngineServerExecuteFailureResult } from "./serverExecuteTypes-
|
|
1
|
+
import { H as EngineServerQueryFailureResponse } from "./serverQueryTypes-CUC8fyd-.js";
|
|
2
|
+
import { r as EngineServerExecuteFailureResult } from "./serverExecuteTypes-B8nz4BGu.js";
|
|
3
3
|
import { BaseServerFailureError } from "@nadohq/shared";
|
|
4
4
|
|
|
5
5
|
//#region src/types/EngineServerFailureError.d.ts
|
|
@@ -17,4 +17,4 @@ declare class EngineServerFailureError extends BaseServerFailureError {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { EngineServerFailureError as t };
|
|
20
|
-
//# sourceMappingURL=EngineServerFailureError-
|
|
20
|
+
//# sourceMappingURL=EngineServerFailureError-CdVixTCJ.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineServerFailureError-
|
|
1
|
+
{"version":3,"file":"EngineServerFailureError-CdVixTCJ.d.ts","names":[],"sources":["../src/types/src/types/EngineServerFailureError.ts"],"mappings":";;;;;KAIK,uBAAA,GACD,gCAAA,GACA,gCAAgC;;AAJkC;;;;AAIlC;cAQvB,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,uBAAA;EAAA,SACd,WAAA,EACb,gCAAA;cAGQ,YAAA,EAAc,uBAAA;AAAA"}
|
package/dist/{EngineServerFailureError-D6FhNLZ1.d.cts → EngineServerFailureError-Rxb1C9Ng.d.cts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as EngineServerQueryFailureResponse } from "./serverQueryTypes-
|
|
2
|
-
import { r as EngineServerExecuteFailureResult } from "./serverExecuteTypes-
|
|
1
|
+
import { H as EngineServerQueryFailureResponse } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
2
|
+
import { r as EngineServerExecuteFailureResult } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
3
3
|
import { BaseServerFailureError } from "@nadohq/shared";
|
|
4
4
|
|
|
5
5
|
//#region src/types/EngineServerFailureError.d.ts
|
|
@@ -17,4 +17,4 @@ declare class EngineServerFailureError extends BaseServerFailureError {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { EngineServerFailureError as t };
|
|
20
|
-
//# sourceMappingURL=EngineServerFailureError-
|
|
20
|
+
//# sourceMappingURL=EngineServerFailureError-Rxb1C9Ng.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineServerFailureError-
|
|
1
|
+
{"version":3,"file":"EngineServerFailureError-Rxb1C9Ng.d.cts","names":[],"sources":["../src/types/src/types/EngineServerFailureError.ts"],"mappings":";;;;;KAIK,uBAAA,GACD,gCAAA,GACA,gCAAgC;;AAJkC;;;;AAIlC;cAQvB,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,uBAAA;EAAA,SACd,WAAA,EACb,gCAAA;cAGQ,YAAA,EAAc,uBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { at as GetEngineTimeResponse, v as GetEngineCountryCodeResponse, w as GetEngineIpBlockStatusResponse } from "./clientQueryTypes-CEPCGqDx.cjs";
|
|
2
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/EngineWebClient.d.ts
|
|
5
5
|
/**
|
|
@@ -32,4 +32,4 @@ declare class EngineWebClient extends EngineBaseClient {
|
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
export { EngineWebClient as t };
|
|
35
|
-
//# sourceMappingURL=EngineWebClient-
|
|
35
|
+
//# sourceMappingURL=EngineWebClient-DsfsPm8h.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineWebClient-
|
|
1
|
+
{"version":3,"file":"EngineWebClient-DsfsPm8h.d.cts","names":[],"sources":["../src/src/EngineWebClient.ts"],"mappings":";;;;;;;AAcA;cAAa,eAAA,SAAwB,gBAAA;;;;EAI7B,gBAAA,CAAA,GAAoB,OAAA,CAAQ,8BAAA;EA8BV;;;;;;;EAAlB,cAAA,CAAA,GAAkB,OAAA,CAAQ,4BAAA;EA9B1B;;;;;EA6CA,yBAAA,CAAA,GAA6B,OAAA;EAA7B;;;EAqBA,OAAA,CAAA,GAAW,OAAA,CAAQ,qBAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { at as GetEngineTimeResponse, v as GetEngineCountryCodeResponse, w as GetEngineIpBlockStatusResponse } from "./clientQueryTypes-DWpgABZh.js";
|
|
2
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
3
3
|
|
|
4
4
|
//#region src/EngineWebClient.d.ts
|
|
5
5
|
/**
|
|
@@ -32,4 +32,4 @@ declare class EngineWebClient extends EngineBaseClient {
|
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
export { EngineWebClient as t };
|
|
35
|
-
//# sourceMappingURL=EngineWebClient-
|
|
35
|
+
//# sourceMappingURL=EngineWebClient-lr41B5ZT.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineWebClient-
|
|
1
|
+
{"version":3,"file":"EngineWebClient-lr41B5ZT.d.ts","names":[],"sources":["../src/src/EngineWebClient.ts"],"mappings":";;;;;;;AAcA;cAAa,eAAA,SAAwB,gBAAA;;;;EAI7B,gBAAA,CAAA,GAAoB,OAAA,CAAQ,8BAAA;EA8BV;;;;;;;EAAlB,cAAA,CAAA,GAAkB,OAAA,CAAQ,4BAAA;EA9B1B;;;;;EA6CA,yBAAA,CAAA,GAA6B,OAAA;EAA7B;;;EAqBA,OAAA,CAAA,GAAW,OAAA,CAAQ,qBAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineWebClient } from "./EngineWebClient-
|
|
1
|
+
import { t as EngineWebClient } from "./EngineWebClient-DsfsPm8h.cjs";
|
|
2
2
|
export { EngineWebClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineWebClient } from "./EngineWebClient-
|
|
1
|
+
import { t as EngineWebClient } from "./EngineWebClient-lr41B5ZT.js";
|
|
2
2
|
export { EngineWebClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-
|
|
1
|
+
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-B8nz4BGu.js";
|
|
2
2
|
import { BigNumberish, EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams, EIP712OrderParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignatureParams } from "@nadohq/shared";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
4
|
|
|
@@ -111,4 +111,4 @@ type EnginePlaceOrderResult = EngineServerExecuteSuccessResult<'place_order'> &
|
|
|
111
111
|
};
|
|
112
112
|
//#endregion
|
|
113
113
|
export { SignatureParamsOrSignature as _, EngineExecuteRequestParamsByType as a, EngineMintNlpParams as c, EnginePlaceOrderResult as d, EnginePlaceOrdersParams as f, EngineWithdrawCollateralV2Params as g, EngineWithdrawCollateralParams as h, EngineCancelProductOrdersParams as i, EngineOrderParams as l, EngineTransferQuoteV2Params as m, EngineCancelAndPlaceParams as n, EngineLinkSignerParams as o, EngineTransferQuoteParams as p, EngineCancelOrdersParams as r, EngineLiquidateSubaccountParams as s, EngineBurnNlpParams as t, EnginePlaceOrderParams as u, WithBaseEngineExecuteParams as v, WithSignature as y };
|
|
114
|
-
//# sourceMappingURL=clientExecuteTypes-
|
|
114
|
+
//# sourceMappingURL=clientExecuteTypes-6S0AH47Q.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientExecuteTypes-
|
|
1
|
+
{"version":3,"file":"clientExecuteTypes-6S0AH47Q.d.ts","names":[],"sources":["../src/types/src/types/clientExecuteTypes.ts"],"mappings":";;;;;;;AAqBA;;KAAY,0BAAA,GACR,eAAe;EAEb,SAAS;AAAA;AAAA,KAGV,YAAA;EAAyB,KAAA;AAAA,KAAoB,IAAI,CAAC,CAAA;AAAA,KAElD,gBAAA,MAAsB,CAAC;EAC1B,YAAA;AAAA;AAAA,KAGU,aAAA,MAAmB,CAAC;EAC9B,SAAA;AAAA;AAAA,KAIU,2BAAA,MAAiC,0BAAA,GAC3C,IAAA,CAAK,CAAA;EACH,KAAA;AAAA;AAAA,KAGQ,iBAAA,GAAoB,YAAY,CAAC,iBAAA;AAAA,KAEjC,sBAAA,GAAyB,2BAA2B;EAC9D,EAAA;EACA,SAAA;EACA,KAAA,EAAO,iBAAA;EAEP,YAAA;EAEA,YAAA;AAAA;AAAA,KAGU,+BAAA,GACV,2BAA2B,CAAC,+BAAA;AAAA,KAElB,8BAAA,GAAiC,2BAAA,CAC3C,gBAAA,CAAiB,8BAAA;;KAIP,gCAAA,GAAmC,2BAAA,CAC7C,gBAAA,CAAiB,gCAAA;EA/BY;;;AACpB;AAIX;;EAkCE,SAAA,GAAY,YAAA;AAAA;AAAA,KAGF,wBAAA,GACV,2BAAA,CAA4B,wBAAA;EArC5B;;;;;EA2CE,sBAAA,GAAyB,SAAA;AAAA;AAAA,UAGZ,0BAAA;EACf,YAAA,EAAc,wBAAA;EACd,UAAA,EAAY,sBAAA;EA5CF;;;;EAiDV,sBAAA,GAAyB,SAAA;EA/Cf;;;;EAoDV,qBAAA;AAAA;AAAA,KAGU,+BAAA,GACV,2BAA2B,CAAC,+BAAA;AAAA,KAElB,sBAAA,GACV,2BAA2B,CAAC,sBAAA;AAAA,KAElB,yBAAA,GACV,2BAA2B,CAAC,yBAAA;;;;AAvDhB;KA6DF,2BAAA,GACV,2BAAA,CAA4B,yBAAA;EA3Da;;;AACkB;AAE7D;;EA+DI,SAAA,EAAW,YAAA;AAAA;AAAA,KAGH,mBAAA,GAAsB,2BAAA,CAChC,gBAAA,CAAiB,mBAAA;AAAA,KAGP,mBAAA,GACV,2BAA2B,CAAC,mBAAA;AAAA,KAElB,uBAAA;EACV,MAAA,EAAQ,sBAAsB;EA1Ea;;;;EA+E3C,aAAA;AAAA;AAAA,UAGe,gCAAA;EACf,QAAA,EAAU,mBAAA;EACV,gBAAA,EAAkB,0BAAA;EAClB,aAAA,EAAe,wBAAA;EACf,qBAAA,EAAuB,+BAAA;EACvB,WAAA,EAAa,sBAAA;EACb,oBAAA,EAAsB,+BAAA;EACtB,QAAA,EAAU,mBAAA;EACV,WAAA,EAAa,sBAAA;EACb,YAAA,EAAc,uBAAA;EACd,cAAA,EAAgB,yBAAA;EA9EhB;EAgFA,iBAAA,EAAmB,2BAAA;EACnB,mBAAA,EAAqB,8BAAA;EACrB,sBAAA,EAAwB,gCAAA;AAAA;AAAA,KAGd,sBAAA,GACV,gCAAA;EACE,WAAA,EAAa,iBAAiB;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-
|
|
1
|
+
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
2
2
|
import { BigNumberish, EIP712BurnNlpParams, EIP712CancelOrdersParams, EIP712CancelProductOrdersParams, EIP712LinkSignerParams, EIP712LiquidateSubaccountParams, EIP712MintNlpParams, EIP712OrderParams, EIP712TransferQuoteParams, EIP712WithdrawCollateralParams, EIP712WithdrawCollateralV2Params, SignatureParams } from "@nadohq/shared";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
4
|
|
|
@@ -111,4 +111,4 @@ type EnginePlaceOrderResult = EngineServerExecuteSuccessResult<'place_order'> &
|
|
|
111
111
|
};
|
|
112
112
|
//#endregion
|
|
113
113
|
export { SignatureParamsOrSignature as _, EngineExecuteRequestParamsByType as a, EngineMintNlpParams as c, EnginePlaceOrderResult as d, EnginePlaceOrdersParams as f, EngineWithdrawCollateralV2Params as g, EngineWithdrawCollateralParams as h, EngineCancelProductOrdersParams as i, EngineOrderParams as l, EngineTransferQuoteV2Params as m, EngineCancelAndPlaceParams as n, EngineLinkSignerParams as o, EngineTransferQuoteParams as p, EngineCancelOrdersParams as r, EngineLiquidateSubaccountParams as s, EngineBurnNlpParams as t, EnginePlaceOrderParams as u, WithBaseEngineExecuteParams as v, WithSignature as y };
|
|
114
|
-
//# sourceMappingURL=clientExecuteTypes-
|
|
114
|
+
//# sourceMappingURL=clientExecuteTypes-By-lvAzV.d.cts.map
|
package/dist/{clientExecuteTypes-DdTonPFz.d.cts.map → clientExecuteTypes-By-lvAzV.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientExecuteTypes-
|
|
1
|
+
{"version":3,"file":"clientExecuteTypes-By-lvAzV.d.cts","names":[],"sources":["../src/types/src/types/clientExecuteTypes.ts"],"mappings":";;;;;;;AAqBA;;KAAY,0BAAA,GACR,eAAe;EAEb,SAAS;AAAA;AAAA,KAGV,YAAA;EAAyB,KAAA;AAAA,KAAoB,IAAI,CAAC,CAAA;AAAA,KAElD,gBAAA,MAAsB,CAAC;EAC1B,YAAA;AAAA;AAAA,KAGU,aAAA,MAAmB,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wBAAA;EACf,qBAAA,EAAuB,+BAAA;EACvB,WAAA,EAAa,sBAAA;EACb,oBAAA,EAAsB,+BAAA;EACtB,QAAA,EAAU,mBAAA;EACV,WAAA,EAAa,sBAAA;EACb,YAAA,EAAc,uBAAA;EACd,cAAA,EAAgB,yBAAA;EA9EhB;EAgFA,iBAAA,EAAmB,2BAAA;EACnB,mBAAA,EAAqB,8BAAA;EACrB,sBAAA,EAAwB,gCAAA;AAAA;AAAA,KAGd,sBAAA,GACV,gCAAA;EACE,WAAA,EAAa,iBAAiB;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as EngineServerNoncesParams, ot as EngineServerTimeResponse } from "./serverQueryTypes-
|
|
1
|
+
import { I as EngineServerNoncesParams, ot as EngineServerTimeResponse } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
2
2
|
import { BalanceHealthContributions, BalanceSide, BalanceWithProduct, EIP712OrderParams, HealthGroup, HealthStatusByType, MarketWithProduct, OrderAppendix, PerpBalanceWithProduct, ProductEngineType, SignedEIP712OrderParams, SpotBalanceWithProduct, Subaccount } from "@nadohq/shared";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
4
|
|
|
@@ -164,21 +164,23 @@ type GetEngineMaxOrderSizeResponse = BigNumber;
|
|
|
164
164
|
interface GetEngineMaxWithdrawableParams extends Subaccount {
|
|
165
165
|
productId: number;
|
|
166
166
|
spotLeverage?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Name of the recipient subaccount, under the same wallet as the sender. When set, returns the
|
|
169
|
+
* max transferable quote amount to this recipient instead of the max withdrawal: the reserved fee
|
|
170
|
+
* is the transfer fee instead of the withdrawal fee. Requires `productId` 0.
|
|
171
|
+
*/
|
|
172
|
+
recipientSubaccountName?: string;
|
|
167
173
|
}
|
|
168
|
-
type GetEngineMaxWithdrawableResponse = BigNumber;
|
|
169
174
|
/**
|
|
170
|
-
* Response of {@link EngineQueryClient.getMaxWithdrawable}
|
|
171
|
-
*
|
|
172
|
-
*
|
|
175
|
+
* Response of {@link EngineQueryClient.getMaxWithdrawable}: the max amount with the current
|
|
176
|
+
* dynamic fee reserved. The fee is the Withdraw Collateral V2 fee, or the Transfer Quote V2 fee
|
|
177
|
+
* when `recipientSubaccountName` is set.
|
|
173
178
|
*/
|
|
174
|
-
interface
|
|
175
|
-
/** Max
|
|
179
|
+
interface GetEngineMaxWithdrawableResponse {
|
|
180
|
+
/** Max amount, with the current dynamic fee reserved. */
|
|
176
181
|
maxWithdrawable: BigNumber;
|
|
177
|
-
/**
|
|
178
|
-
|
|
179
|
-
* deposits.
|
|
180
|
-
*/
|
|
181
|
-
fee?: BigNumber;
|
|
182
|
+
/** The dynamic fee reserved, in the product's x18 units. 0 when the subaccount has no deposits. */
|
|
183
|
+
fee: BigNumber;
|
|
182
184
|
}
|
|
183
185
|
/**
|
|
184
186
|
* Params for the `dynamic_fee_quote` query. Withdraw Collateral V2 and Transfer Quote V2 are
|
|
@@ -293,5 +295,5 @@ interface EngineCachedTimeParams {
|
|
|
293
295
|
id?: number;
|
|
294
296
|
}
|
|
295
297
|
//#endregion
|
|
296
|
-
export {
|
|
297
|
-
//# sourceMappingURL=clientQueryTypes-
|
|
298
|
+
export { GetEngineSubaccountOrdersResponse as $, GetEngineMarketLiquidityResponse as A, GetEngineMaxOrderSizeResponse as B, GetEngineInsuranceResponse as C, GetEngineLinkedSignerParams as D, GetEngineIsolatedPositionsResponse as E, GetEngineMaxBurnNlpAmountParams as F, GetEngineNlpPoolInfoResponse as G, GetEngineMaxWithdrawableResponse as H, GetEngineMaxBurnNlpAmountResponse as I, GetEngineOrderParams as J, GetEngineNoncesParams as K, GetEngineMaxMintNlpAmountParams as L, GetEngineMarketPriceResponse as M, GetEngineMarketPricesParams as N, GetEngineLinkedSignerResponse as O, GetEngineMarketPricesResponse as P, GetEngineSubaccountOrdersParams as Q, GetEngineMaxMintNlpAmountResponse as R, GetEngineHealthGroupsResponse as S, GetEngineIsolatedPositionsParams as T, GetEngineNlpLockedBalancesParams as U, GetEngineMaxWithdrawableParams as V, GetEngineNlpLockedBalancesResponse as W, GetEngineSubaccountFeeRatesParams as X, GetEngineOrderResponse as Y, GetEngineSubaccountFeeRatesResponse as Z, GetEngineContractsResponse as _, EngineNlpLockedBalance as a, GetEngineTimeResponse as at, GetEngineDynamicFeeQuoteResponse as b, EnginePingResponse as c, SubaccountOrderFeeRates as ct, EngineSymbol as d, SubaccountTx as dt, GetEngineSubaccountProductOrdersParams as et, EngineSymbolsResponse as f, ValidateEngineOrderParams as ft, GetEngineCachedMarketPricesParams as g, GetEngineCachedBboHistoryResponse as h, EngineNlpBalance as i, GetEngineSymbolsParams as it, GetEngineMarketPriceParams as j, GetEngineMarketLiquidityParams as k, EnginePriceTickLiquidity as l, SubaccountProductDeltaTx as lt, GetEngineCachedBboHistoryParams as m, ValidateSignedEngineOrderParams as mt, EngineCachedTimeParams as n, GetEngineSubaccountSummaryParams as nt, EngineOrder as o, NlpPool as ot, GetEngineAllMarketsResponse as p, ValidateEngineOrderResponse as pt, GetEngineNoncesResponse as q, EngineMarketPrice as r, GetEngineSubaccountSummaryResponse as rt, EnginePingParams as s, SubaccountIsolatedPosition as st, EngineBboHistorySample as t, GetEngineSubaccountProductOrdersResponse as tt, EngineSubaccountOrders as u, SubaccountSummaryState as ut, GetEngineCountryCodeResponse as v, GetEngineIpBlockStatusResponse as w, GetEngineEstimatedSubaccountSummaryParams as x, GetEngineDynamicFeeQuoteParams as y, GetEngineMaxOrderSizeParams as z };
|
|
299
|
+
//# sourceMappingURL=clientQueryTypes-CEPCGqDx.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientQueryTypes-
|
|
1
|
+
{"version":3,"file":"clientQueryTypes-CEPCGqDx.d.cts","names":[],"sources":["../src/types/src/types/clientQueryTypes.ts"],"mappings":";;;;;UAqBiB,kCAAA,SAA2C,sBAAsB;EAChF,MAAA;EACA,QAAA,GAAW,sBAAA;AAAA;AAAA,UAG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AS;AAAA;AAAA,UAGH,sBAAA,SAA+B,gBAAgB;EAC9D,UAAU;AAAA;AAAA,UAGK,kCAAA;EACf,cAAA,EAAgB,sBAAA;EAChB,aAAA,EAAe,gBAAA;EACf,eAAA,EAAiB,gBAAA;AAAA;AAAA,UAGF,OAAA;EACf,MAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA,EAAe,SAAA;EACf,cAAA,EAAgB,kCAAA;EAChB,UAAA,EAAY,WAAA;AAAA;AAAA,UAGG,4BAAA;EACf,QAAA,EAAU,OAAO;AAAA;;AApMuC;AAE1D;;;UA0MiB,iCAAA;EACf,UAAU;AAAA;AAAA,UAGK,+BAAA;EACf,UAAA;EAEA,UAAA;EAEA,SAAA;EAEA,KAAA;AAAA;AAAA,UAGe,sBAAA;EACf,SAAA;EAEA,SAAA;EACA,GAAA,EAAK,SAAA;EACL,GAAA,EAAK,SAAS;AAAA;AAAA,UAGC,iCAAA;EAEf,UAAA;EAEA,KAAA;EAEA,OAAA,EAAS,sBAAsB;AAAA;AAAA,UAGhB,gBAAA;EACf,EAAA;EAEA,UAAU;AAAA;AAAA,UAGK,kBAAA;EACf,EAAA;EAEA,UAAA;EAEA,UAAA;AAAA;AAAA,UAGe,sBAAA;EACf,EAAE;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as EngineServerNoncesParams, ot as EngineServerTimeResponse } from "./serverQueryTypes-
|
|
1
|
+
import { I as EngineServerNoncesParams, ot as EngineServerTimeResponse } from "./serverQueryTypes-CUC8fyd-.js";
|
|
2
2
|
import { BalanceHealthContributions, BalanceSide, BalanceWithProduct, EIP712OrderParams, HealthGroup, HealthStatusByType, MarketWithProduct, OrderAppendix, PerpBalanceWithProduct, ProductEngineType, SignedEIP712OrderParams, SpotBalanceWithProduct, Subaccount } from "@nadohq/shared";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
4
|
|
|
@@ -164,21 +164,23 @@ type GetEngineMaxOrderSizeResponse = BigNumber;
|
|
|
164
164
|
interface GetEngineMaxWithdrawableParams extends Subaccount {
|
|
165
165
|
productId: number;
|
|
166
166
|
spotLeverage?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Name of the recipient subaccount, under the same wallet as the sender. When set, returns the
|
|
169
|
+
* max transferable quote amount to this recipient instead of the max withdrawal: the reserved fee
|
|
170
|
+
* is the transfer fee instead of the withdrawal fee. Requires `productId` 0.
|
|
171
|
+
*/
|
|
172
|
+
recipientSubaccountName?: string;
|
|
167
173
|
}
|
|
168
|
-
type GetEngineMaxWithdrawableResponse = BigNumber;
|
|
169
174
|
/**
|
|
170
|
-
* Response of {@link EngineQueryClient.getMaxWithdrawable}
|
|
171
|
-
*
|
|
172
|
-
*
|
|
175
|
+
* Response of {@link EngineQueryClient.getMaxWithdrawable}: the max amount with the current
|
|
176
|
+
* dynamic fee reserved. The fee is the Withdraw Collateral V2 fee, or the Transfer Quote V2 fee
|
|
177
|
+
* when `recipientSubaccountName` is set.
|
|
173
178
|
*/
|
|
174
|
-
interface
|
|
175
|
-
/** Max
|
|
179
|
+
interface GetEngineMaxWithdrawableResponse {
|
|
180
|
+
/** Max amount, with the current dynamic fee reserved. */
|
|
176
181
|
maxWithdrawable: BigNumber;
|
|
177
|
-
/**
|
|
178
|
-
|
|
179
|
-
* deposits.
|
|
180
|
-
*/
|
|
181
|
-
fee?: BigNumber;
|
|
182
|
+
/** The dynamic fee reserved, in the product's x18 units. 0 when the subaccount has no deposits. */
|
|
183
|
+
fee: BigNumber;
|
|
182
184
|
}
|
|
183
185
|
/**
|
|
184
186
|
* Params for the `dynamic_fee_quote` query. Withdraw Collateral V2 and Transfer Quote V2 are
|
|
@@ -293,5 +295,5 @@ interface EngineCachedTimeParams {
|
|
|
293
295
|
id?: number;
|
|
294
296
|
}
|
|
295
297
|
//#endregion
|
|
296
|
-
export {
|
|
297
|
-
//# sourceMappingURL=clientQueryTypes-
|
|
298
|
+
export { GetEngineSubaccountOrdersResponse as $, GetEngineMarketLiquidityResponse as A, GetEngineMaxOrderSizeResponse as B, GetEngineInsuranceResponse as C, GetEngineLinkedSignerParams as D, GetEngineIsolatedPositionsResponse as E, GetEngineMaxBurnNlpAmountParams as F, GetEngineNlpPoolInfoResponse as G, GetEngineMaxWithdrawableResponse as H, GetEngineMaxBurnNlpAmountResponse as I, GetEngineOrderParams as J, GetEngineNoncesParams as K, GetEngineMaxMintNlpAmountParams as L, GetEngineMarketPriceResponse as M, GetEngineMarketPricesParams as N, GetEngineLinkedSignerResponse as O, GetEngineMarketPricesResponse as P, GetEngineSubaccountOrdersParams as Q, GetEngineMaxMintNlpAmountResponse as R, GetEngineHealthGroupsResponse as S, GetEngineIsolatedPositionsParams as T, GetEngineNlpLockedBalancesParams as U, GetEngineMaxWithdrawableParams as V, GetEngineNlpLockedBalancesResponse as W, GetEngineSubaccountFeeRatesParams as X, GetEngineOrderResponse as Y, GetEngineSubaccountFeeRatesResponse as Z, GetEngineContractsResponse as _, EngineNlpLockedBalance as a, GetEngineTimeResponse as at, GetEngineDynamicFeeQuoteResponse as b, EnginePingResponse as c, SubaccountOrderFeeRates as ct, EngineSymbol as d, SubaccountTx as dt, GetEngineSubaccountProductOrdersParams as et, EngineSymbolsResponse as f, ValidateEngineOrderParams as ft, GetEngineCachedMarketPricesParams as g, GetEngineCachedBboHistoryResponse as h, EngineNlpBalance as i, GetEngineSymbolsParams as it, GetEngineMarketPriceParams as j, GetEngineMarketLiquidityParams as k, EnginePriceTickLiquidity as l, SubaccountProductDeltaTx as lt, GetEngineCachedBboHistoryParams as m, ValidateSignedEngineOrderParams as mt, EngineCachedTimeParams as n, GetEngineSubaccountSummaryParams as nt, EngineOrder as o, NlpPool as ot, GetEngineAllMarketsResponse as p, ValidateEngineOrderResponse as pt, GetEngineNoncesResponse as q, EngineMarketPrice as r, GetEngineSubaccountSummaryResponse as rt, EnginePingParams as s, SubaccountIsolatedPosition as st, EngineBboHistorySample as t, GetEngineSubaccountProductOrdersResponse as tt, EngineSubaccountOrders as u, SubaccountSummaryState as ut, GetEngineCountryCodeResponse as v, GetEngineIpBlockStatusResponse as w, GetEngineEstimatedSubaccountSummaryParams as x, GetEngineDynamicFeeQuoteParams as y, GetEngineMaxOrderSizeParams as z };
|
|
299
|
+
//# sourceMappingURL=clientQueryTypes-DWpgABZh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientQueryTypes-
|
|
1
|
+
{"version":3,"file":"clientQueryTypes-DWpgABZh.d.ts","names":[],"sources":["../src/types/src/types/clientQueryTypes.ts"],"mappings":";;;;;UAqBiB,kCAAA,SAA2C,sBAAsB;EAChF,MAAA;EACA,QAAA,GAAW,sBAAA;AAAA;AAAA,UAGI,sBAAA;EACf,QAAA,EAAU,kBAAA;EACV,MAAA,EAAQ,kBAAkB;AAAA;AAAA,KAGhB,gCAAA,GAAmC,UAAU;AAAA,KAE7C,gCAAA,GAAmC,UAAU;AAAA,UAExC,0BAAA;EACf,UAAA,EAAY,UAAA;EACZ,OAAA,EAAS,0BAAA;EACT,YAAA,EAAc,sBAAA;EACd,WAAA,EAAa,sBAAA;AAAA;AAAA,KAGH,kCAAA,GAAqC,0BAA0B;AAAA,KAE/D,YAAA;EACV,IAAA;EACA,EAAA,EAAI,wBAAwB;AAAA;AAAA,UAGb,wBAAA;EACf,SAAA;EACA,WAAA,EAAa,SAAA;EACb,WAAA,EAAa,SAAS;AAAA;AAAA,UAGP,0BAAA;EACf,OAAA;EACA,YAAY;AAAA;AAAA,KAGF,yCAAA,GAA4C,UAAA;EACtD,GAAA,EAAK,YAAY;EACjB,QAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,wBAAwB;AAAA,UAE3C,uBAAA;EACf,UAAA;EACA,OAAO;AAAA;AAAA,UAGQ,sBAAA;EACf,WAAA,GAAc,iBAAiB;EAC/B,UAAA;AAAA;AAAA,UAGe,qBAAA;EAEf,OAAA,EAAS,MAAM,SAAS,YAAA;AAAA;AAAA,UAGT,YAAA;EACf,IAAA,EAAM,iB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ANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as EngineServerOrder, c as EngineServerPerpProduct, d as EngineServerRisk, f as EngineServerSpotBalance, g as EngineServerSpotState, h as EngineServerSpotProduct, i as EngineServerNlpLockedBalance, l as EngineServerPerpState, m as EngineServerSpotConfig, n as EngineServerHealthBreakdown, o as EngineServerPerpBalance, p as EngineServerSpotBalanceData, r as EngineServerNlpBalance, s as EngineServerPerpBalanceData, t as EngineServerBookInfo, u as EngineServerProductType } from "./serverQueryModelTypes-DGOXWOCY.cjs";
|
|
2
|
-
import { $ as EngineServerSubaccountInfoState, A as EngineServerMaxWithdrawableQueryParams, B as EngineServerPriceTickLiquidity, C as EngineServerMarketPricesResponse, D as EngineServerMaxMintNlpResponse, E as EngineServerMaxMintNlpQueryParams, F as EngineServerNlpPoolInfoResponse, G as EngineServerQueryRequestType, H as EngineServerQueryFailureResponse, I as EngineServerNoncesParams, J as EngineServerQuerySuccessResponse, K as EngineServerQueryResponse, L as EngineServerNoncesResponse, M as EngineServerNlpLockedBalancesQueryParams, N as EngineServerNlpLockedBalancesResponse, O as EngineServerMaxOrderSizeQueryParams, P as EngineServerNlpPool, Q as EngineServerSubaccountInfoResponse, R as EngineServerOrderResponse, S as EngineServerMarketPricesQueryParams, T as EngineServerMaxBurnNlpResponse, U as EngineServerQueryRequest, V as EngineServerProductOrdersResponse, W as EngineServerQueryRequestByType, X as EngineServerSubaccountFeeRatesParams, Y as EngineServerStatusResponse, Z as EngineServerSubaccountInfoQueryParams, _ as EngineServerMarketLiquidityQueryParams, a as EngineServerDynamicFeeQuoteQueryParams, at as EngineServerSymbolsResponse, b as EngineServerMarketPriceQueryParams, c as EngineServerFeeRatesResponse, ct as EngineServerValidateOrderResponse, d as EngineServerIpBlockResponse, et as EngineServerSubaccountOrders, f as EngineServerIsolatedPosition, g as EngineServerLinkedSignerResponse, h as EngineServerLinkedSignerParams, i as EngineServerContractsResponse, it as EngineServerSymbolsQueryParams, j as EngineServerMaxWithdrawableResponse, k as EngineServerMaxOrderSizeResponse, l as EngineServerGetOrderQueryParams, m as EngineServerIsolatedPositionsResponse, n as EngineInsuranceResponse, nt as EngineServerSubaccountOrdersResponse, o as EngineServerDynamicFeeQuoteResponse, ot as EngineServerTimeResponse, p as EngineServerIsolatedPositionsQueryParams, q as EngineServerQueryResponseByType, r as EngineServerAllProductsResponse, rt as EngineServerSymbol, s as EngineServerEdgeAllProductsResponse, st as EngineServerValidateOrderQueryParams, t as ENGINE_SERVER_STATUS_VALUES, tt as EngineServerSubaccountOrdersQueryParams, u as EngineServerHealthGroupsResponse, v as EngineServerMarketLiquidityResponse, w as EngineServerMaxBurnNlpQueryParams, x as EngineServerMarketPriceResponse, y as EngineServerMarketPrice, z as EngineServerOrdersQueryParams } from "./serverQueryTypes-
|
|
3
|
-
import { a as EngineServerExecuteRequestByType, c as EngineServerExecuteResult, d as EngineServerPlaceOrderResponse, f as EngineServerPlaceOrdersResponse, i as EngineServerExecutePlaceOrderPayload, l as EngineServerExecuteSuccessResult, m as EngineServiceCancelAndPlaceParams, n as EngineServerCancelOrdersResponse, o as EngineServerExecuteRequestType, p as EngineServerUpdateDependencyResponse, r as EngineServerExecuteFailureResult, s as EngineServerExecuteResponseDataByType, t as EngineServerCancelOrdersParams, u as EngineServerPlaceOrderParams } from "./serverExecuteTypes-
|
|
4
|
-
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, c as EngineMintNlpParams, d as EnginePlaceOrderResult, f as EnginePlaceOrdersParams, g as EngineWithdrawCollateralV2Params, h as EngineWithdrawCollateralParams, i as EngineCancelProductOrdersParams, l as EngineOrderParams, m as EngineTransferQuoteV2Params, n as EngineCancelAndPlaceParams, o as EngineLinkSignerParams, p as EngineTransferQuoteParams, r as EngineCancelOrdersParams, s as EngineLiquidateSubaccountParams, t as EngineBurnNlpParams, u as EnginePlaceOrderParams, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-
|
|
5
|
-
import { $ as
|
|
2
|
+
import { $ as EngineServerSubaccountInfoState, A as EngineServerMaxWithdrawableQueryParams, B as EngineServerPriceTickLiquidity, C as EngineServerMarketPricesResponse, D as EngineServerMaxMintNlpResponse, E as EngineServerMaxMintNlpQueryParams, F as EngineServerNlpPoolInfoResponse, G as EngineServerQueryRequestType, H as EngineServerQueryFailureResponse, I as EngineServerNoncesParams, J as EngineServerQuerySuccessResponse, K as EngineServerQueryResponse, L as EngineServerNoncesResponse, M as EngineServerNlpLockedBalancesQueryParams, N as EngineServerNlpLockedBalancesResponse, O as EngineServerMaxOrderSizeQueryParams, P as EngineServerNlpPool, Q as EngineServerSubaccountInfoResponse, R as EngineServerOrderResponse, S as EngineServerMarketPricesQueryParams, T as EngineServerMaxBurnNlpResponse, U as EngineServerQueryRequest, V as EngineServerProductOrdersResponse, W as EngineServerQueryRequestByType, X as EngineServerSubaccountFeeRatesParams, Y as EngineServerStatusResponse, Z as EngineServerSubaccountInfoQueryParams, _ as EngineServerMarketLiquidityQueryParams, a as EngineServerDynamicFeeQuoteQueryParams, at as EngineServerSymbolsResponse, b as EngineServerMarketPriceQueryParams, c as EngineServerFeeRatesResponse, ct as EngineServerValidateOrderResponse, d as EngineServerIpBlockResponse, et as EngineServerSubaccountOrders, f as EngineServerIsolatedPosition, g as EngineServerLinkedSignerResponse, h as EngineServerLinkedSignerParams, i as EngineServerContractsResponse, it as EngineServerSymbolsQueryParams, j as EngineServerMaxWithdrawableResponse, k as EngineServerMaxOrderSizeResponse, l as EngineServerGetOrderQueryParams, m as EngineServerIsolatedPositionsResponse, n as EngineInsuranceResponse, nt as EngineServerSubaccountOrdersResponse, o as EngineServerDynamicFeeQuoteResponse, ot as EngineServerTimeResponse, p as EngineServerIsolatedPositionsQueryParams, q as EngineServerQueryResponseByType, r as EngineServerAllProductsResponse, rt as EngineServerSymbol, s as EngineServerEdgeAllProductsResponse, st as EngineServerValidateOrderQueryParams, t as ENGINE_SERVER_STATUS_VALUES, tt as EngineServerSubaccountOrdersQueryParams, u as EngineServerHealthGroupsResponse, v as EngineServerMarketLiquidityResponse, w as EngineServerMaxBurnNlpQueryParams, x as EngineServerMarketPriceResponse, y as EngineServerMarketPrice, z as EngineServerOrdersQueryParams } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
3
|
+
import { a as EngineServerExecuteRequestByType, c as EngineServerExecuteResult, d as EngineServerPlaceOrderResponse, f as EngineServerPlaceOrdersResponse, i as EngineServerExecutePlaceOrderPayload, l as EngineServerExecuteSuccessResult, m as EngineServiceCancelAndPlaceParams, n as EngineServerCancelOrdersResponse, o as EngineServerExecuteRequestType, p as EngineServerUpdateDependencyResponse, r as EngineServerExecuteFailureResult, s as EngineServerExecuteResponseDataByType, t as EngineServerCancelOrdersParams, u as EngineServerPlaceOrderParams } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
4
|
+
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, c as EngineMintNlpParams, d as EnginePlaceOrderResult, f as EnginePlaceOrdersParams, g as EngineWithdrawCollateralV2Params, h as EngineWithdrawCollateralParams, i as EngineCancelProductOrdersParams, l as EngineOrderParams, m as EngineTransferQuoteV2Params, n as EngineCancelAndPlaceParams, o as EngineLinkSignerParams, p as EngineTransferQuoteParams, r as EngineCancelOrdersParams, s as EngineLiquidateSubaccountParams, t as EngineBurnNlpParams, u as EnginePlaceOrderParams, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-By-lvAzV.cjs";
|
|
5
|
+
import { $ as GetEngineSubaccountOrdersResponse, A as GetEngineMarketLiquidityResponse, B as GetEngineMaxOrderSizeResponse, C as GetEngineInsuranceResponse, D as GetEngineLinkedSignerParams, E as GetEngineIsolatedPositionsResponse, F as GetEngineMaxBurnNlpAmountParams, G as GetEngineNlpPoolInfoResponse, H as GetEngineMaxWithdrawableResponse, I as GetEngineMaxBurnNlpAmountResponse, J as GetEngineOrderParams, K as GetEngineNoncesParams, L as GetEngineMaxMintNlpAmountParams, M as GetEngineMarketPriceResponse, N as GetEngineMarketPricesParams, O as GetEngineLinkedSignerResponse, P as GetEngineMarketPricesResponse, Q as GetEngineSubaccountOrdersParams, R as GetEngineMaxMintNlpAmountResponse, S as GetEngineHealthGroupsResponse, T as GetEngineIsolatedPositionsParams, U as GetEngineNlpLockedBalancesParams, V as GetEngineMaxWithdrawableParams, W as GetEngineNlpLockedBalancesResponse, X as GetEngineSubaccountFeeRatesParams, Y as GetEngineOrderResponse, Z as GetEngineSubaccountFeeRatesResponse, _ as GetEngineContractsResponse, a as EngineNlpLockedBalance, at as GetEngineTimeResponse, b as GetEngineDynamicFeeQuoteResponse, c as EnginePingResponse, ct as SubaccountOrderFeeRates, d as EngineSymbol, dt as SubaccountTx, et as GetEngineSubaccountProductOrdersParams, f as EngineSymbolsResponse, ft as ValidateEngineOrderParams, g as GetEngineCachedMarketPricesParams, h as GetEngineCachedBboHistoryResponse, i as EngineNlpBalance, it as GetEngineSymbolsParams, j as GetEngineMarketPriceParams, k as GetEngineMarketLiquidityParams, l as EnginePriceTickLiquidity, lt as SubaccountProductDeltaTx, m as GetEngineCachedBboHistoryParams, mt as ValidateSignedEngineOrderParams, n as EngineCachedTimeParams, nt as GetEngineSubaccountSummaryParams, o as EngineOrder, ot as NlpPool, p as GetEngineAllMarketsResponse, pt as ValidateEngineOrderResponse, q as GetEngineNoncesResponse, r as EngineMarketPrice, rt as GetEngineSubaccountSummaryResponse, s as EnginePingParams, st as SubaccountIsolatedPosition, t as EngineBboHistorySample, tt as GetEngineSubaccountProductOrdersResponse, u as EngineSubaccountOrders, ut as SubaccountSummaryState, v as GetEngineCountryCodeResponse, w as GetEngineIpBlockStatusResponse, x as GetEngineEstimatedSubaccountSummaryParams, y as GetEngineDynamicFeeQuoteParams, z as GetEngineMaxOrderSizeParams } from "./clientQueryTypes-CEPCGqDx.cjs";
|
|
6
6
|
import { n as EngineErrorCode, t as ENGINE_ERROR_CODES } from "./engineErrorCodes-T0t1nfq2.cjs";
|
|
7
|
-
import { t as EngineServerFailureError } from "./EngineServerFailureError-
|
|
8
|
-
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, g as EngineServerTimeQueryParams, h as EngineServerPingResponse, i as EngineServerCachedQueryRequest, l as EngineServerCachedQuerySuccessResponse, m as EngineServerPingQueryParams, n as EngineServerCachedBboHistoryResponse, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType, r as EngineServerCachedBboHistorySample, s as EngineServerCachedQueryResponse, t as EngineServerCachedBboHistoryQueryParams, u as EngineServerControlTimeResponse } from "./serverEdgeQueryTypes-
|
|
9
|
-
import { _ as PositionChangeReason, a as EngineServerSubscriptionBookDepthEvent, c as EngineServerSubscriptionFillEvent, d as EngineServerSubscriptionLatestCandlestickEvent, f as EngineServerSubscriptionLiquidationEvent, g as OrderUpdateReason, h as EngineServerSubscriptionTradeEvent, i as EngineServerSubscriptionBestBidOfferEvent, l as EngineServerSubscriptionFundingPaymentEvent, m as EngineServerSubscriptionPositionChangeEvent, n as EngineServerSubscriptionAllBboEvent, o as EngineServerSubscriptionEvent, p as EngineServerSubscriptionOrderUpdateEvent, r as EngineServerSubscriptionBaseEvent, s as EngineServerSubscriptionEventType, t as EngineServerAllBboEntry, u as EngineServerSubscriptionFundingRateEvent } from "./serverSubscriptionEventTypes-
|
|
7
|
+
import { t as EngineServerFailureError } from "./EngineServerFailureError-Rxb1C9Ng.cjs";
|
|
8
|
+
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, g as EngineServerTimeQueryParams, h as EngineServerPingResponse, i as EngineServerCachedQueryRequest, l as EngineServerCachedQuerySuccessResponse, m as EngineServerPingQueryParams, n as EngineServerCachedBboHistoryResponse, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType, r as EngineServerCachedBboHistorySample, s as EngineServerCachedQueryResponse, t as EngineServerCachedBboHistoryQueryParams, u as EngineServerControlTimeResponse } from "./serverEdgeQueryTypes-CIjW7fOw.cjs";
|
|
9
|
+
import { _ as PositionChangeReason, a as EngineServerSubscriptionBookDepthEvent, c as EngineServerSubscriptionFillEvent, d as EngineServerSubscriptionLatestCandlestickEvent, f as EngineServerSubscriptionLiquidationEvent, g as OrderUpdateReason, h as EngineServerSubscriptionTradeEvent, i as EngineServerSubscriptionBestBidOfferEvent, l as EngineServerSubscriptionFundingPaymentEvent, m as EngineServerSubscriptionPositionChangeEvent, n as EngineServerSubscriptionAllBboEvent, o as EngineServerSubscriptionEvent, p as EngineServerSubscriptionOrderUpdateEvent, r as EngineServerSubscriptionBaseEvent, s as EngineServerSubscriptionEventType, t as EngineServerAllBboEntry, u as EngineServerSubscriptionFundingRateEvent } from "./serverSubscriptionEventTypes-DmwkAEwZ.cjs";
|
|
10
10
|
import { _ as EngineServerSubscriptionStream, a as EngineServerFundingPaymentStreamParams, b as EngineServerSubscriptionTimeResponse, c as EngineServerLiquidationStreamParams, d as EngineServerPositionChangeStreamParams, f as EngineServerSubscriptionParams, g as EngineServerSubscriptionRequestType, h as EngineServerSubscriptionRequestByType, i as EngineServerFillStreamParams, l as EngineServerOrderUpdateStreamParams, m as EngineServerSubscriptionRequest, n as EngineServerBestBidOfferStreamParams, o as EngineServerFundingRateStreamParams, p as EngineServerSubscriptionPingResponse, r as EngineServerBookDepthStreamParams, s as EngineServerLatestCandlestickStreamParams, t as EngineServerAllBboStreamParams, u as EngineServerPingParams, v as EngineServerSubscriptionStreamParamsByType, x as EngineServerTradeStreamParams, y as EngineServerSubscriptionStreamParamsType } from "./serverSubscriptionTypes-DmavlDIZ.cjs";
|
|
11
11
|
import { EngineClient } from "./EngineClient.cjs";
|
|
12
12
|
import { ENGINE_CLIENT_ENDPOINTS, ENGINE_WS_CLIENT_ENDPOINTS, ENGINE_WS_SUBSCRIPTION_CLIENT_ENDPOINTS } from "./endpoints.cjs";
|
|
13
|
-
import { a as mapEngineServerNlpLockedBalances, c as mapEngineServerPerpProduct, d as mapEngineServerSymbols, f as mapEngineServerTickLiquidity, i as mapEngineServerIsolatedPositions, l as mapEngineServerSpotProduct, n as mapEngineMarketPrice, o as mapEngineServerNlpPoolInfo, p as mapSubaccountSummary, r as mapEngineServerBalanceHealthContributions, s as mapEngineServerOrder, t as mapEngineBboHistory, u as mapEngineServerSymbol } from "./queryDataMappers-
|
|
14
|
-
export { ENGINE_CLIENT_ENDPOINTS, ENGINE_ERROR_CODES, ENGINE_SERVER_STATUS_VALUES, ENGINE_WS_CLIENT_ENDPOINTS, ENGINE_WS_SUBSCRIPTION_CLIENT_ENDPOINTS, EngineBboHistorySample, EngineBurnNlpParams, EngineCachedTimeParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineClient, EngineErrorCode, EngineExecuteRequestParamsByType, EngineInsuranceResponse, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMarketPrice, EngineMintNlpParams, EngineNlpBalance, EngineNlpLockedBalance, EngineOrder, EngineOrderParams, EnginePingParams, EnginePingResponse, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EnginePriceTickLiquidity, EngineServerAllBboEntry, EngineServerAllBboStreamParams, EngineServerAllProductsResponse, EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerBookInfo, EngineServerCachedBboHistoryQueryParams, EngineServerCachedBboHistoryResponse, EngineServerCachedBboHistorySample, EngineServerCachedQueryRequest, EngineServerCachedQueryRequestByType, EngineServerCachedQueryRequestType, EngineServerCachedQueryResponse, EngineServerCachedQueryResponseByType, EngineServerCachedQuerySuccessResponse, EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerContractsResponse, EngineServerControlTimeResponse, EngineServerDynamicFeeQuoteQueryParams, EngineServerDynamicFeeQuoteResponse, EngineServerEdgeAllProductsResponse, EngineServerEdgeControlRequestByType, EngineServerEdgeControlRequestType, EngineServerEdgeControlResponseByType, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerFailureError, EngineServerFeeRatesResponse, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerFundingRateStreamParams, EngineServerGetOrderQueryParams, EngineServerHealthBreakdown, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLatestCandlestickStreamParams, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerLiquidationStreamParams, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxBurnNlpQueryParams, EngineServerMaxBurnNlpResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse, EngineServerNlpBalance, EngineServerNlpLockedBalance, EngineServerNlpLockedBalancesQueryParams, EngineServerNlpLockedBalancesResponse, EngineServerNlpPool, EngineServerNlpPoolInfoResponse, EngineServerNoncesParams, EngineServerNoncesResponse, EngineServerOrder, EngineServerOrderResponse, EngineServerOrderUpdateStreamParams, EngineServerOrdersQueryParams, EngineServerPerpBalance, EngineServerPerpBalanceData, EngineServerPerpProduct, EngineServerPerpState, EngineServerPingParams, EngineServerPingQueryParams, EngineServerPingResponse, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServerPositionChangeStreamParams, EngineServerPriceTickLiquidity, EngineServerProductOrdersResponse, EngineServerProductType, EngineServerQueryFailureResponse, EngineServerQueryRequest, EngineServerQueryRequestByType, EngineServerQueryRequestType, EngineServerQueryResponse, EngineServerQueryResponseByType, EngineServerQuerySuccessResponse, EngineServerRisk, EngineServerSpotBalance, EngineServerSpotBalanceData, EngineServerSpotConfig, EngineServerSpotProduct, EngineServerSpotState, EngineServerStatusResponse, EngineServerSubaccountFeeRatesParams, EngineServerSubaccountInfoQueryParams, EngineServerSubaccountInfoResponse, EngineServerSubaccountInfoState, EngineServerSubaccountOrders, EngineServerSubaccountOrdersQueryParams, EngineServerSubaccountOrdersResponse, EngineServerSubscriptionAllBboEvent, EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionFundingRateEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionParams, EngineServerSubscriptionPingResponse, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerSubscriptionTimeResponse, EngineServerSubscriptionTradeEvent, EngineServerSymbol, EngineServerSymbolsQueryParams, EngineServerSymbolsResponse, EngineServerTimeQueryParams, EngineServerTimeResponse, EngineServerTradeStreamParams, EngineServerUpdateDependencyResponse, EngineServerValidateOrderQueryParams, EngineServerValidateOrderResponse, EngineServiceCancelAndPlaceParams, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, EngineTransferQuoteParams, EngineTransferQuoteV2Params, EngineWithdrawCollateralParams, EngineWithdrawCollateralV2Params, GetEngineAllMarketsResponse, GetEngineCachedBboHistoryParams, GetEngineCachedBboHistoryResponse, GetEngineCachedMarketPricesParams, GetEngineContractsResponse, GetEngineCountryCodeResponse, GetEngineDynamicFeeQuoteParams, GetEngineDynamicFeeQuoteResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxBurnNlpAmountParams, GetEngineMaxBurnNlpAmountResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse,
|
|
13
|
+
import { a as mapEngineServerNlpLockedBalances, c as mapEngineServerPerpProduct, d as mapEngineServerSymbols, f as mapEngineServerTickLiquidity, i as mapEngineServerIsolatedPositions, l as mapEngineServerSpotProduct, n as mapEngineMarketPrice, o as mapEngineServerNlpPoolInfo, p as mapSubaccountSummary, r as mapEngineServerBalanceHealthContributions, s as mapEngineServerOrder, t as mapEngineBboHistory, u as mapEngineServerSymbol } from "./queryDataMappers-DoQGipeY.cjs";
|
|
14
|
+
export { ENGINE_CLIENT_ENDPOINTS, ENGINE_ERROR_CODES, ENGINE_SERVER_STATUS_VALUES, ENGINE_WS_CLIENT_ENDPOINTS, ENGINE_WS_SUBSCRIPTION_CLIENT_ENDPOINTS, EngineBboHistorySample, EngineBurnNlpParams, EngineCachedTimeParams, EngineCancelAndPlaceParams, EngineCancelOrdersParams, EngineCancelProductOrdersParams, EngineClient, EngineErrorCode, EngineExecuteRequestParamsByType, EngineInsuranceResponse, EngineLinkSignerParams, EngineLiquidateSubaccountParams, EngineMarketPrice, EngineMintNlpParams, EngineNlpBalance, EngineNlpLockedBalance, EngineOrder, EngineOrderParams, EnginePingParams, EnginePingResponse, EnginePlaceOrderParams, EnginePlaceOrderResult, EnginePlaceOrdersParams, EnginePriceTickLiquidity, EngineServerAllBboEntry, EngineServerAllBboStreamParams, EngineServerAllProductsResponse, EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerBookInfo, EngineServerCachedBboHistoryQueryParams, EngineServerCachedBboHistoryResponse, EngineServerCachedBboHistorySample, EngineServerCachedQueryRequest, EngineServerCachedQueryRequestByType, EngineServerCachedQueryRequestType, EngineServerCachedQueryResponse, EngineServerCachedQueryResponseByType, EngineServerCachedQuerySuccessResponse, EngineServerCancelOrdersParams, EngineServerCancelOrdersResponse, EngineServerContractsResponse, EngineServerControlTimeResponse, EngineServerDynamicFeeQuoteQueryParams, EngineServerDynamicFeeQuoteResponse, EngineServerEdgeAllProductsResponse, EngineServerEdgeControlRequestByType, EngineServerEdgeControlRequestType, EngineServerEdgeControlResponseByType, EngineServerExecuteFailureResult, EngineServerExecutePlaceOrderPayload, EngineServerExecuteRequestByType, EngineServerExecuteRequestType, EngineServerExecuteResponseDataByType, EngineServerExecuteResult, EngineServerExecuteSuccessResult, EngineServerFailureError, EngineServerFeeRatesResponse, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerFundingRateStreamParams, EngineServerGetOrderQueryParams, EngineServerHealthBreakdown, EngineServerHealthGroupsResponse, EngineServerIpBlockResponse, EngineServerIsolatedPosition, EngineServerIsolatedPositionsQueryParams, EngineServerIsolatedPositionsResponse, EngineServerLatestCandlestickStreamParams, EngineServerLinkedSignerParams, EngineServerLinkedSignerResponse, EngineServerLiquidationStreamParams, EngineServerMarketLiquidityQueryParams, EngineServerMarketLiquidityResponse, EngineServerMarketPrice, EngineServerMarketPriceQueryParams, EngineServerMarketPriceResponse, EngineServerMarketPricesQueryParams, EngineServerMarketPricesResponse, EngineServerMaxBurnNlpQueryParams, EngineServerMaxBurnNlpResponse, EngineServerMaxMintNlpQueryParams, EngineServerMaxMintNlpResponse, EngineServerMaxOrderSizeQueryParams, EngineServerMaxOrderSizeResponse, EngineServerMaxWithdrawableQueryParams, EngineServerMaxWithdrawableResponse, EngineServerNlpBalance, EngineServerNlpLockedBalance, EngineServerNlpLockedBalancesQueryParams, EngineServerNlpLockedBalancesResponse, EngineServerNlpPool, EngineServerNlpPoolInfoResponse, EngineServerNoncesParams, EngineServerNoncesResponse, EngineServerOrder, EngineServerOrderResponse, EngineServerOrderUpdateStreamParams, EngineServerOrdersQueryParams, EngineServerPerpBalance, EngineServerPerpBalanceData, EngineServerPerpProduct, EngineServerPerpState, EngineServerPingParams, EngineServerPingQueryParams, EngineServerPingResponse, EngineServerPlaceOrderParams, EngineServerPlaceOrderResponse, EngineServerPlaceOrdersResponse, EngineServerPositionChangeStreamParams, EngineServerPriceTickLiquidity, EngineServerProductOrdersResponse, EngineServerProductType, EngineServerQueryFailureResponse, EngineServerQueryRequest, EngineServerQueryRequestByType, EngineServerQueryRequestType, EngineServerQueryResponse, EngineServerQueryResponseByType, EngineServerQuerySuccessResponse, EngineServerRisk, EngineServerSpotBalance, EngineServerSpotBalanceData, EngineServerSpotConfig, EngineServerSpotProduct, EngineServerSpotState, EngineServerStatusResponse, EngineServerSubaccountFeeRatesParams, EngineServerSubaccountInfoQueryParams, EngineServerSubaccountInfoResponse, EngineServerSubaccountInfoState, EngineServerSubaccountOrders, EngineServerSubaccountOrdersQueryParams, EngineServerSubaccountOrdersResponse, EngineServerSubscriptionAllBboEvent, EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionFundingRateEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionParams, EngineServerSubscriptionPingResponse, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerSubscriptionTimeResponse, EngineServerSubscriptionTradeEvent, EngineServerSymbol, EngineServerSymbolsQueryParams, EngineServerSymbolsResponse, EngineServerTimeQueryParams, EngineServerTimeResponse, EngineServerTradeStreamParams, EngineServerUpdateDependencyResponse, EngineServerValidateOrderQueryParams, EngineServerValidateOrderResponse, EngineServiceCancelAndPlaceParams, EngineSubaccountOrders, EngineSymbol, EngineSymbolsResponse, EngineTransferQuoteParams, EngineTransferQuoteV2Params, EngineWithdrawCollateralParams, EngineWithdrawCollateralV2Params, GetEngineAllMarketsResponse, GetEngineCachedBboHistoryParams, GetEngineCachedBboHistoryResponse, GetEngineCachedMarketPricesParams, GetEngineContractsResponse, GetEngineCountryCodeResponse, GetEngineDynamicFeeQuoteParams, GetEngineDynamicFeeQuoteResponse, GetEngineEstimatedSubaccountSummaryParams, GetEngineHealthGroupsResponse, GetEngineInsuranceResponse, GetEngineIpBlockStatusResponse, GetEngineIsolatedPositionsParams, GetEngineIsolatedPositionsResponse, GetEngineLinkedSignerParams, GetEngineLinkedSignerResponse, GetEngineMarketLiquidityParams, GetEngineMarketLiquidityResponse, GetEngineMarketPriceParams, GetEngineMarketPriceResponse, GetEngineMarketPricesParams, GetEngineMarketPricesResponse, GetEngineMaxBurnNlpAmountParams, GetEngineMaxBurnNlpAmountResponse, GetEngineMaxMintNlpAmountParams, GetEngineMaxMintNlpAmountResponse, GetEngineMaxOrderSizeParams, GetEngineMaxOrderSizeResponse, GetEngineMaxWithdrawableParams, GetEngineMaxWithdrawableResponse, GetEngineNlpLockedBalancesParams, GetEngineNlpLockedBalancesResponse, GetEngineNlpPoolInfoResponse, GetEngineNoncesParams, GetEngineNoncesResponse, GetEngineOrderParams, GetEngineOrderResponse, GetEngineSubaccountFeeRatesParams, GetEngineSubaccountFeeRatesResponse, GetEngineSubaccountOrdersParams, GetEngineSubaccountOrdersResponse, GetEngineSubaccountProductOrdersParams, GetEngineSubaccountProductOrdersResponse, GetEngineSubaccountSummaryParams, GetEngineSubaccountSummaryResponse, GetEngineSymbolsParams, GetEngineTimeResponse, NlpPool, OrderUpdateReason, PositionChangeReason, SignatureParamsOrSignature, SubaccountIsolatedPosition, SubaccountOrderFeeRates, SubaccountProductDeltaTx, SubaccountSummaryState, SubaccountTx, ValidateEngineOrderParams, ValidateEngineOrderResponse, ValidateSignedEngineOrderParams, WithBaseEngineExecuteParams, WithSignature, mapEngineBboHistory, mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
|