@nadohq/indexer-client 0.1.0-alpha.4 → 0.1.0-alpha.6
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/IndexerBaseClient.cjs +2 -5
- package/dist/IndexerBaseClient.cjs.map +1 -1
- package/dist/IndexerBaseClient.js +3 -5
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/dataMappers.cjs +94 -96
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.js +5 -8
- package/dist/dataMappers.js.map +1 -1
- package/dist/types/clientTypes.cjs.map +1 -1
- package/dist/types/clientTypes.d.cts +5 -4
- package/dist/types/clientTypes.d.ts +5 -4
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +1 -2
- package/dist/types/serverModelTypes.d.ts +1 -2
- package/package.json +4 -4
- package/src/IndexerBaseClient.ts +3 -5
- package/src/dataMappers.ts +7 -10
- package/src/types/clientTypes.ts +6 -5
- package/src/types/serverModelTypes.ts +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Subaccount, BigDecimal, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market, OrderAppendix, EIP712OrderValues } from '@nadohq/shared';
|
|
2
|
-
import { Hex } from 'viem';
|
|
2
|
+
import { Hex, Address } from 'viem';
|
|
3
3
|
import { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
4
4
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
5
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
@@ -231,7 +231,6 @@ interface GetIndexerOrdersParams {
|
|
|
231
231
|
interface IndexerOrder {
|
|
232
232
|
digest: string;
|
|
233
233
|
subaccount: string;
|
|
234
|
-
isolated: boolean;
|
|
235
234
|
productId: number;
|
|
236
235
|
submissionIndex: string;
|
|
237
236
|
amount: BigDecimal;
|
|
@@ -460,9 +459,11 @@ interface GetIndexerBacklogResponse {
|
|
|
460
459
|
backlogEtaInSeconds: BigDecimal | null;
|
|
461
460
|
txsPerSecond: BigDecimal | null;
|
|
462
461
|
}
|
|
463
|
-
|
|
462
|
+
interface GetIndexerSubaccountDDAParams {
|
|
463
|
+
subaccount: Subaccount;
|
|
464
|
+
}
|
|
464
465
|
interface GetIndexerSubaccountDDAResponse {
|
|
465
|
-
address:
|
|
466
|
+
address: Address;
|
|
466
467
|
}
|
|
467
468
|
|
|
468
469
|
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Subaccount, BigDecimal, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market, OrderAppendix, EIP712OrderValues } from '@nadohq/shared';
|
|
2
|
-
import { Hex } from 'viem';
|
|
2
|
+
import { Hex, Address } from 'viem';
|
|
3
3
|
import { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
4
4
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
5
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
@@ -231,7 +231,6 @@ interface GetIndexerOrdersParams {
|
|
|
231
231
|
interface IndexerOrder {
|
|
232
232
|
digest: string;
|
|
233
233
|
subaccount: string;
|
|
234
|
-
isolated: boolean;
|
|
235
234
|
productId: number;
|
|
236
235
|
submissionIndex: string;
|
|
237
236
|
amount: BigDecimal;
|
|
@@ -460,9 +459,11 @@ interface GetIndexerBacklogResponse {
|
|
|
460
459
|
backlogEtaInSeconds: BigDecimal | null;
|
|
461
460
|
txsPerSecond: BigDecimal | null;
|
|
462
461
|
}
|
|
463
|
-
|
|
462
|
+
interface GetIndexerSubaccountDDAParams {
|
|
463
|
+
subaccount: Subaccount;
|
|
464
|
+
}
|
|
464
465
|
interface GetIndexerSubaccountDDAResponse {
|
|
465
|
-
address:
|
|
466
|
+
address: Address;
|
|
466
467
|
}
|
|
467
468
|
|
|
468
469
|
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { EIP712OrderValues } from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerServerSnapshotsInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport type IndexerServerProduct =\n | {\n spot: EngineServerSpotProduct;\n }\n | {\n perp: EngineServerPerpProduct;\n };\n\nexport type IndexerServerBalance =\n | {\n spot: EngineServerSpotBalance;\n }\n | {\n perp: EngineServerPerpBalance;\n };\n\n/**\n * Candlesticks\n */\n\nexport interface IndexerServerCandlestick {\n product_id: number;\n granularity: string;\n submission_idx: string;\n timestamp: string;\n open_x18: string;\n high_x18: string;\n low_x18: string;\n close_x18: string;\n volume: string;\n}\n\n/**\n * Product snapshots\n */\n\nexport interface IndexerServerProductSnapshot {\n product_id: number;\n submission_idx: string;\n product: IndexerServerProduct;\n}\n\n/**\n * Base Events\n */\n\nexport interface IndexerServerEvent {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolated_product_id: number | null;\n product_id: number;\n submission_idx: string;\n event_type: IndexerEventType;\n pre_balance: IndexerServerBalance;\n post_balance: IndexerServerBalance;\n product: IndexerServerProduct;\n net_interest_unrealized: string;\n net_interest_cumulative: string;\n net_funding_unrealized: string;\n net_funding_cumulative: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n}\n\nexport interface IndexerServerTx {\n submission_idx: string;\n timestamp: string;\n tx: NadoTx;\n}\n\n/**\n * Orders\n */\n\nexport interface IndexerServerOrder {\n digest: string;\n subaccount: string;\n product_id: number;\n submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n}\n\n/**\n * Match events\n */\n\nexport interface IndexerServerMatchEvent {\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n sequencer_fee: string;\n cumulative_fee: string;\n cumulative_base_filled: string;\n cumulative_quote_filled: string;\n submission_idx: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\n}\n\nexport interface IndexerServerMatchEventBalances {\n base: IndexerServerBalance;\n // Quote is defined if 0 is included in `product_ids` and the match event is a spot event\n quote?: IndexerServerBalance;\n}\n\n/**\n * Oracle price\n */\n\nexport interface IndexerServerOraclePrice {\n product_id: number;\n oracle_price_x18: string;\n update_time: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface IndexerServerMarketSnapshotInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport interface IndexerServerMarketSnapshot {\n timestamp: string;\n cumulative_users: string;\n daily_active_users: string;\n tvl: string;\n // Keyed by product ID -> decimal value in string (i.e. no decimal adjustment) necessary\n // Backend serializes hashmaps with string keys\n cumulative_volumes: Record<string, string>;\n cumulative_taker_fees: Record<string, string>;\n cumulative_sequencer_fees: Record<string, string>;\n cumulative_maker_fees: Record<string, string>;\n cumulative_trades: Record<string, string>;\n cumulative_liquidation_amounts: Record<string, string>;\n open_interests: Record<string, string>;\n total_deposits: Record<string, string>;\n total_borrows: Record<string, string>;\n funding_rates: Record<string, string>;\n deposit_rates: Record<string, string>;\n borrow_rates: Record<string, string>;\n cumulative_trade_sizes: Record<string, string>;\n cumulative_inflows: Record<string, string>;\n cumulative_outflows: Record<string, string>;\n oracle_prices: Record<string, string>;\n}\n\n/**\n * Interest / funding\n */\n\nexport interface IndexerServerProductPayment {\n product_id: number;\n idx: string;\n timestamp: string;\n amount: string;\n balance_amount: string;\n rate_x18: string;\n oracle_price_x18: string;\n isolated: boolean;\n isolated_product_id: number | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface IndexerServerMakerData {\n timestamp: string;\n maker_fee: string;\n uptime: string;\n sum_q_min: string;\n q_score: string;\n maker_share: string;\n expected_maker_reward: string;\n}\n\nexport interface IndexerServerMaker {\n address: string;\n data: IndexerServerMakerData[];\n}\n\n/**\n * Leaderboard\n */\n\nexport interface IndexerServerLeaderboardPosition {\n subaccount: string;\n contest_id: number;\n pnl: string;\n pnl_rank: string;\n roi: string;\n roi_rank: string;\n account_value: string;\n volume?: string;\n update_time: string;\n}\n\nexport interface IndexerServerLeaderboardContest {\n contest_id: number;\n start_time: string;\n end_time: string;\n timeframe: string;\n count: string;\n threshold: string;\n volume_threshold: string;\n product_ids: number[];\n last_updated: string;\n active: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistration {\n subaccount: string;\n contest_id: number;\n update_time: string;\n}\n\n/**\n * NLP\n */\n\nexport interface IndexerServerNlpSnapshot {\n cumulative_burn_usdc: string;\n cumulative_mint_usdc: string;\n cumulative_pnl: string;\n cumulative_trades: string;\n cumulative_volume: string;\n depositors: string;\n oracle_price_x18: string;\n submission_idx: string;\n timestamp: string;\n tvl: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EIP712OrderValues } from '@nadohq/shared';
|
|
2
1
|
import { EngineServerSpotBalance, EngineServerPerpBalance, EngineServerSpotProduct, EngineServerPerpProduct } from '@nadohq/engine-client';
|
|
2
|
+
import { EIP712OrderValues } from '@nadohq/shared';
|
|
3
3
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
4
4
|
import { NadoTx } from './NadoTx.cjs';
|
|
5
5
|
|
|
@@ -70,7 +70,6 @@ interface IndexerServerTx {
|
|
|
70
70
|
*/
|
|
71
71
|
interface IndexerServerOrder {
|
|
72
72
|
digest: string;
|
|
73
|
-
isolated: boolean;
|
|
74
73
|
subaccount: string;
|
|
75
74
|
product_id: number;
|
|
76
75
|
submission_idx: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EIP712OrderValues } from '@nadohq/shared';
|
|
2
1
|
import { EngineServerSpotBalance, EngineServerPerpBalance, EngineServerSpotProduct, EngineServerPerpProduct } from '@nadohq/engine-client';
|
|
2
|
+
import { EIP712OrderValues } from '@nadohq/shared';
|
|
3
3
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
4
4
|
import { NadoTx } from './NadoTx.js';
|
|
5
5
|
|
|
@@ -70,7 +70,6 @@ interface IndexerServerTx {
|
|
|
70
70
|
*/
|
|
71
71
|
interface IndexerServerOrder {
|
|
72
72
|
digest: string;
|
|
73
|
-
isolated: boolean;
|
|
74
73
|
subaccount: string;
|
|
75
74
|
product_id: number;
|
|
76
75
|
submission_idx: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/indexer-client",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "> TODO: description",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nadohq/engine-client": "^0.1.0-alpha.
|
|
41
|
-
"@nadohq/shared": "^0.1.0-alpha.
|
|
40
|
+
"@nadohq/engine-client": "^0.1.0-alpha.6",
|
|
41
|
+
"@nadohq/shared": "^0.1.0-alpha.6",
|
|
42
42
|
"axios": "*",
|
|
43
43
|
"ts-mixer": "*"
|
|
44
44
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"viem": "*"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "660de2d7026b3ebacd2f17115196f94438bcc8bb"
|
|
52
52
|
}
|
package/src/IndexerBaseClient.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
getDefaultRecvTime,
|
|
5
5
|
getNadoEIP712Values,
|
|
6
6
|
getSignedTransactionRequest,
|
|
7
|
+
getValidatedAddress,
|
|
7
8
|
getValidatedHex,
|
|
8
9
|
mapValues,
|
|
9
10
|
nowInSeconds,
|
|
@@ -797,14 +798,11 @@ export class IndexerBaseClient {
|
|
|
797
798
|
params: GetIndexerSubaccountDDAParams,
|
|
798
799
|
): Promise<GetIndexerSubaccountDDAResponse> {
|
|
799
800
|
const baseResponse = await this.query('direct_deposit_address', {
|
|
800
|
-
subaccount: subaccountToHex(
|
|
801
|
-
subaccountOwner: params.subaccountOwner,
|
|
802
|
-
subaccountName: params.subaccountName,
|
|
803
|
-
}),
|
|
801
|
+
subaccount: subaccountToHex(params.subaccount),
|
|
804
802
|
});
|
|
805
803
|
|
|
806
804
|
return {
|
|
807
|
-
address: baseResponse.v1_address,
|
|
805
|
+
address: getValidatedAddress(baseResponse.v1_address),
|
|
808
806
|
};
|
|
809
807
|
}
|
|
810
808
|
|
package/src/dataMappers.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getRecvTimeFromOrderNonce,
|
|
3
|
-
Market,
|
|
4
|
-
PerpMarket,
|
|
5
|
-
ProductEngineType,
|
|
6
|
-
SpotMarket,
|
|
7
|
-
subaccountFromHex,
|
|
8
|
-
unpackOrderAppendix,
|
|
9
|
-
} from '@nadohq/shared';
|
|
10
1
|
import {
|
|
11
2
|
mapEngineServerPerpProduct,
|
|
12
3
|
mapEngineServerSpotProduct,
|
|
13
4
|
} from '@nadohq/engine-client';
|
|
14
5
|
import {
|
|
6
|
+
getRecvTimeFromOrderNonce,
|
|
15
7
|
mapValues,
|
|
8
|
+
Market,
|
|
9
|
+
PerpMarket,
|
|
10
|
+
ProductEngineType,
|
|
16
11
|
removeDecimals,
|
|
12
|
+
SpotMarket,
|
|
13
|
+
subaccountFromHex,
|
|
17
14
|
toBigDecimal,
|
|
18
15
|
toIntegerString,
|
|
16
|
+
unpackOrderAppendix,
|
|
19
17
|
} from '@nadohq/shared';
|
|
20
18
|
import {
|
|
21
19
|
Candlestick,
|
|
@@ -96,7 +94,6 @@ export function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {
|
|
|
96
94
|
return {
|
|
97
95
|
amount: toBigDecimal(order.amount),
|
|
98
96
|
digest: order.digest,
|
|
99
|
-
isolated: order.isolated,
|
|
100
97
|
expiration: Number(order.expiration),
|
|
101
98
|
appendix,
|
|
102
99
|
nonce: toBigDecimal(order.nonce),
|
package/src/types/clientTypes.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BigDecimal,
|
|
2
3
|
EIP712OrderValues,
|
|
3
4
|
Market,
|
|
4
5
|
OrderAppendix,
|
|
@@ -9,8 +10,7 @@ import {
|
|
|
9
10
|
SpotMarket,
|
|
10
11
|
Subaccount,
|
|
11
12
|
} from '@nadohq/shared';
|
|
12
|
-
import {
|
|
13
|
-
import { Hex } from 'viem';
|
|
13
|
+
import { Address, Hex } from 'viem';
|
|
14
14
|
import { CandlestickPeriod } from './CandlestickPeriod';
|
|
15
15
|
import { IndexerEventType } from './IndexerEventType';
|
|
16
16
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType';
|
|
@@ -349,7 +349,6 @@ export interface GetIndexerOrdersParams {
|
|
|
349
349
|
export interface IndexerOrder {
|
|
350
350
|
digest: string;
|
|
351
351
|
subaccount: string;
|
|
352
|
-
isolated: boolean;
|
|
353
352
|
productId: number;
|
|
354
353
|
submissionIndex: string;
|
|
355
354
|
amount: BigDecimal;
|
|
@@ -676,8 +675,10 @@ export interface GetIndexerBacklogResponse {
|
|
|
676
675
|
txsPerSecond: BigDecimal | null;
|
|
677
676
|
}
|
|
678
677
|
|
|
679
|
-
export
|
|
678
|
+
export interface GetIndexerSubaccountDDAParams {
|
|
679
|
+
subaccount: Subaccount;
|
|
680
|
+
}
|
|
680
681
|
|
|
681
682
|
export interface GetIndexerSubaccountDDAResponse {
|
|
682
|
-
address:
|
|
683
|
+
address: Address;
|
|
683
684
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { EIP712OrderValues } from '@nadohq/shared';
|
|
2
1
|
import {
|
|
3
2
|
EngineServerPerpBalance,
|
|
4
3
|
EngineServerPerpProduct,
|
|
5
4
|
EngineServerSpotBalance,
|
|
6
5
|
EngineServerSpotProduct,
|
|
7
6
|
} from '@nadohq/engine-client';
|
|
7
|
+
import { EIP712OrderValues } from '@nadohq/shared';
|
|
8
8
|
import { IndexerEventType } from './IndexerEventType';
|
|
9
9
|
import { NadoTx } from './NadoTx';
|
|
10
10
|
|
|
@@ -92,7 +92,6 @@ export interface IndexerServerTx {
|
|
|
92
92
|
|
|
93
93
|
export interface IndexerServerOrder {
|
|
94
94
|
digest: string;
|
|
95
|
-
isolated: boolean;
|
|
96
95
|
subaccount: string;
|
|
97
96
|
product_id: number;
|
|
98
97
|
submission_idx: string;
|