@nadohq/indexer-client 0.7.0 → 0.8.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/IndexerBaseClient.cjs +76 -2
- package/dist/IndexerBaseClient.cjs.map +1 -1
- package/dist/IndexerBaseClient.d.cts +20 -1
- package/dist/IndexerBaseClient.d.ts +20 -1
- package/dist/IndexerBaseClient.js +76 -2
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/types/clientTypes.cjs.map +1 -1
- package/dist/types/clientTypes.d.cts +22 -4
- package/dist/types/clientTypes.d.ts +22 -4
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/serverTypes.cjs.map +1 -1
- package/dist/types/serverTypes.d.cts +22 -3
- package/dist/types/serverTypes.d.ts +22 -3
- package/package.json +4 -4
- package/src/IndexerBaseClient.ts +99 -2
- package/src/types/clientTypes.ts +28 -4
- package/src/types/serverTypes.ts +27 -0
package/dist/types/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
2
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, TickerMarketType } from './clientTypes.cjs';
|
|
2
|
+
export { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType } from './clientTypes.cjs';
|
|
3
3
|
export { CollateralEventType } from './collateralEventType.cjs';
|
|
4
4
|
export { IndexerEventType } from './IndexerEventType.cjs';
|
|
5
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
6
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
7
7
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.cjs';
|
|
8
8
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardTrackPosition, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerTx } from './serverModelTypes.cjs';
|
|
9
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
|
|
9
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'bignumber.js';
|
|
12
12
|
import 'viem';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
2
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, TickerMarketType } from './clientTypes.js';
|
|
2
|
+
export { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType } from './clientTypes.js';
|
|
3
3
|
export { CollateralEventType } from './collateralEventType.js';
|
|
4
4
|
export { IndexerEventType } from './IndexerEventType.js';
|
|
5
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
6
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
7
7
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.js';
|
|
8
8
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardTrackPosition, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerTx } from './serverModelTypes.js';
|
|
9
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
|
|
9
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'bignumber.js';
|
|
12
12
|
import 'viem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerNlpSnapshot,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n} from './serverModelTypes';\n\n/**\n * Params\n */\n\nexport interface IndexerServerListSubaccountsParams {\n // Inclusive, defaults to 0\n start?: number;\n // Defaults to 100\n limit?: number;\n address?: string;\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsParams {\n // Subaccount hex identifiers\n subaccounts: string[];\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport interface IndexerServerReferralCodeParams {\n subaccount: string;\n}\n\nexport interface IndexerServerFundingRateParams {\n product_id: number;\n}\n\nexport interface IndexerServerFundingRatesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerPriceParams {\n product_id: number;\n}\n\nexport interface IndexerServerPerpPricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerOraclePricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerCandlesticksParams {\n product_id: number;\n granularity: number;\n // Seconds\n max_time?: number;\n limit: number;\n}\n\nexport type IndexerEdgeServerCandlesticksParams =\n IndexerServerCandlesticksParams;\n\nexport interface IndexerServerProductsParams {\n product_id: number;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMultiProductsParams {\n product_ids: number[];\n max_time: number[];\n}\n\nexport interface IndexerServerEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n event_types?: IndexerEventType[];\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n max_time?: number;\n limit?:\n | {\n raw: number;\n }\n | {\n txs: number;\n };\n}\n\nexport type IndexerServerTriggerTypeFilter =\n | 'none'\n | 'price_trigger'\n | 'time_trigger';\n\nexport interface IndexerServerOrdersParams {\n subaccounts?: string[];\n product_ids?: number[];\n trigger_types?: IndexerServerTriggerTypeFilter[];\n digests?: string[];\n max_time?: number;\n limit?: number;\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMatchEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface IndexerServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n // Defaults to all\n product_ids?: number[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n}\n\nexport interface IndexerServerInterestFundingParams {\n subaccount: string;\n product_ids: number[];\n // If not given, defaults to latest\n max_idx?: string;\n max_time?: number;\n limit: number;\n}\n\nexport interface IndexerServerMakerStatisticsParams {\n product_id: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerServerLeaderboardParams {\n contest_id: number;\n rank_type?: IndexerLeaderboardRankType;\n start?: number | string;\n limit?: number | string;\n order?: 'ASC' | 'DESC';\n}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistrationsParams {\n subaccount: string;\n contest_ids: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegisterParams {\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;\n}\n\nexport interface IndexerServerFastWithdrawalSignatureParams {\n /**\n * The submission index of the WithdrawCollateral tx to be used for fast withdraw.\n */\n idx: number | string;\n}\n\nexport interface IndexerServerNlpSnapshotsParams {\n interval: IndexerServerSnapshotsInterval;\n}\n\nexport interface IndexerServerDDAQueryParams {\n subaccount: string;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceParams {\n address: string;\n}\n\nexport interface IndexerServerPointsParams {\n address: string;\n}\n\n// Request\nexport interface IndexerServerQueryRequestByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsParams;\n backlog: Record<string, never>;\n candlesticks: IndexerServerCandlesticksParams;\n direct_deposit_address: IndexerServerDDAQueryParams;\n edge_candlesticks: IndexerEdgeServerCandlesticksParams;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsParams;\n events: IndexerServerEventsParams;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureParams;\n funding_rate: IndexerServerFundingRateParams;\n funding_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_register: IndexerServerLeaderboardRegisterParams;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsParams;\n linked_signer_rate_limit: IndexerServerLinkedSignerParams;\n maker_statistics: IndexerServerMakerStatisticsParams;\n market_snapshots: IndexerServerMarketSnapshotsParams;\n matches: IndexerServerMatchEventsParams;\n oracle_price: IndexerServerOraclePricesParams;\n orders: IndexerServerOrdersParams;\n perp_prices: IndexerServerPerpPricesParams;\n price: IndexerServerPriceParams;\n product_snapshots: IndexerServerMultiProductsParams;\n products: IndexerServerProductsParams;\n referral_code: IndexerServerReferralCodeParams;\n subaccounts: IndexerServerListSubaccountsParams;\n quote_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;\n nado_points: IndexerServerPointsParams;\n}\n\nexport type IndexerServerQueryRequestType =\n keyof IndexerServerQueryRequestByType;\n\n/**\n * Responses\n */\n\nexport interface IndexerServerListSubaccountsResponse {\n subaccounts: {\n id: string;\n // Hex of subaccount bytes\n subaccount: string;\n // UNIX timestamp in seconds\n created_at: string;\n isolated: boolean;\n }[];\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsResponse {\n // Map of subaccount hex -> timestamp requested -> latest events corresponding to each product\n snapshots: Record<string, Record<string, IndexerServerEvent[]>>;\n}\n\nexport interface IndexerServerReferralCodeResponse {\n referral_code: string | null;\n}\n\nexport interface IndexerServerFundingRate {\n product_id: number;\n funding_rate_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerFundingRateResponse = IndexerServerFundingRate;\n\n// Map of productId -> IndexerServerFundingRate\nexport type IndexerServerFundingRatesResponse = Record<\n string,\n IndexerServerFundingRate\n>;\n\nexport interface IndexerServerPerpPrices {\n product_id: number;\n index_price_x18: string;\n mark_price_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerPriceResponse = IndexerServerPerpPrices;\n\n// Map of productId -> IndexerServerPerpPrices\nexport type IndexerServerPerpPricesResponse = Record<\n string,\n IndexerServerPerpPrices\n>;\n\nexport interface IndexerServerOraclePricesResponse {\n prices: IndexerServerOraclePrice[];\n}\n\nexport interface IndexerServerCandlesticksResponse {\n candlesticks: IndexerServerCandlestick[];\n}\n\nexport type IndexerEdgeServerCandlesticksResponse =\n IndexerServerCandlesticksResponse;\n\nexport interface IndexerServerProductsResponse {\n products: IndexerServerProductSnapshot[];\n txs: IndexerServerTx[];\n}\n\n// Map of timestamp -> (productID -> IndexerServerProductSnapshot)\nexport type IndexerServerMultiProductsResponse = Record<\n string,\n Record<string, IndexerServerProductSnapshot>\n>;\n\nexport interface IndexerServerEventsResponse {\n events: IndexerServerEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerOrdersResponse {\n orders: IndexerServerOrder[];\n}\n\nexport interface IndexerServerMatchEventsResponse {\n matches: IndexerServerMatchEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerQuotePriceResponse {\n price_x18: string;\n}\n\nexport interface IndexerServerLinkedSignerResponse {\n total_tx_limit: string;\n remaining_tx: string;\n wait_time: string;\n signer: string;\n}\n\nexport interface IndexerServerMarketSnapshotsResponse {\n snapshots: IndexerServerMarketSnapshot[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsResponse {\n snapshots: Record<number, IndexerServerMarketSnapshot[]>;\n}\n\nexport interface IndexerServerInterestFundingResponse {\n interest_payments: IndexerServerProductPayment[];\n funding_payments: IndexerServerProductPayment[];\n next_idx: string;\n}\n\nexport interface IndexerServerMakerStatisticsResponse {\n reward_coefficient: string;\n makers: IndexerServerMaker[];\n}\n\nexport interface IndexerServerLeaderboardResponse {\n positions: IndexerServerLeaderboardPosition[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationsResponse {\n registrations: IndexerServerLeaderboardRegistration[];\n}\n\nexport type IndexerServerLeaderboardRegisterResponse =\n IndexerServerLeaderboardRegistrationsResponse;\n\nexport interface IndexerServerLeaderboardRankResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerServerLeaderboardPosition\n positions: Record<string, IndexerServerLeaderboardPosition>;\n}\n\nexport interface IndexerServerLeaderboardContestsResponse {\n contests: IndexerServerLeaderboardContest[];\n}\n\nexport interface IndexerServerFastWithdrawalSignatureResponse {\n idx: string;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n tx_bytes: string;\n signatures: string[];\n}\n\nexport interface IndexerServerNlpSnapshotsResponse {\n snapshots: IndexerServerNlpSnapshot[];\n}\n\nexport interface IndexerServerDDAResponse {\n v1_address: string;\n}\n\nexport interface IndexerServerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n total_txs: string;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n total_submissions: string;\n // Number of unprocessed transactions (total_txs - total_submissions)\n backlog_size: string;\n // UNIX timestamp (in seconds) of when the data was last updated\n updated_at: string;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlog_eta_in_seconds: string | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txs_per_second: string | null;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceResponse {\n points: string;\n fee_refund: string;\n nft_eligibility: boolean;\n}\n\nexport interface IndexerServerPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerAllTimePoints {\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerPointsResponse {\n points_per_epoch: IndexerServerPointsEpoch[];\n all_time_points: IndexerServerAllTimePoints;\n}\n\n// Response\nexport interface IndexerServerQueryResponseByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;\n backlog: IndexerServerBacklogResponse;\n candlesticks: IndexerServerCandlesticksResponse;\n direct_deposit_address: IndexerServerDDAResponse;\n edge_candlesticks: IndexerEdgeServerCandlesticksResponse;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsResponse;\n events: IndexerServerEventsResponse;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureResponse;\n funding_rate: IndexerServerFundingRateResponse;\n funding_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_register: IndexerServerLeaderboardRegisterResponse;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsResponse;\n linked_signer_rate_limit: IndexerServerLinkedSignerResponse;\n maker_statistics: IndexerServerMakerStatisticsResponse;\n market_snapshots: IndexerServerMarketSnapshotsResponse;\n matches: IndexerServerMatchEventsResponse;\n oracle_price: IndexerServerOraclePricesResponse;\n orders: IndexerServerOrdersResponse;\n perp_prices: IndexerServerPerpPricesResponse;\n price: IndexerServerPriceResponse;\n product_snapshots: IndexerServerMultiProductsResponse;\n products: IndexerServerProductsResponse;\n referral_code: IndexerServerReferralCodeResponse;\n subaccounts: IndexerServerListSubaccountsResponse;\n quote_price: IndexerServerQuotePriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;\n nado_points: IndexerServerPointsResponse;\n}\n\n/**\n * V2 API Types\n */\n\n/**\n * Individual ticker data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2TickerResponse {\n product_id: number;\n ticker_id: string;\n base_currency: string;\n quote_currency: string;\n last_price: number;\n base_volume: number;\n quote_volume: number;\n price_change_percent_24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint (server format)\n * Maps ticker IDs to their respective ticker data\n */\nexport type IndexerServerV2TickersResponse = Record<\n string,\n IndexerServerV2TickerResponse\n>;\n\n/**\n * Market hours data from v2 symbols endpoint (server format)\n */\nexport interface IndexerServerV2MarketHours {\n is_open: boolean;\n reason: string | null;\n next_close: string | null;\n next_open: string | null;\n}\n\n/**\n * Individual symbol data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2Symbol {\n type: string;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n max_open_interest_x18: string | null;\n trading_status: string;\n isolated_only: boolean;\n market_hours: IndexerServerV2MarketHours | null;\n}\n\n/**\n * Response from v2 symbols endpoint (server format)\n * Maps symbols to their respective data\n */\nexport type IndexerServerV2SymbolsResponse = Record<\n string,\n IndexerServerV2Symbol\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n EIP712SocialAuthenticationValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerNlpSnapshot,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerSocialAccount,\n IndexerServerTx,\n} from './serverModelTypes';\n\n/**\n * Params\n */\n\nexport interface IndexerServerListSubaccountsParams {\n // Inclusive, defaults to 0\n start?: number;\n // Defaults to 100\n limit?: number;\n address?: string;\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsParams {\n // Subaccount hex identifiers\n subaccounts: string[];\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport interface IndexerServerReferralCodeParams {\n subaccount: string;\n}\n\nexport interface IndexerServerFundingRateParams {\n product_id: number;\n}\n\nexport interface IndexerServerFundingRatesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerPriceParams {\n product_id: number;\n}\n\nexport interface IndexerServerPerpPricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerOraclePricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerCandlesticksParams {\n product_id: number;\n granularity: number;\n // Seconds\n max_time?: number;\n limit: number;\n}\n\nexport type IndexerEdgeServerCandlesticksParams =\n IndexerServerCandlesticksParams;\n\nexport interface IndexerServerProductsParams {\n product_id: number;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMultiProductsParams {\n product_ids: number[];\n max_time: number[];\n}\n\nexport interface IndexerServerEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n event_types?: IndexerEventType[];\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n max_time?: number;\n limit?:\n | {\n raw: number;\n }\n | {\n txs: number;\n };\n}\n\nexport type IndexerServerTriggerTypeFilter =\n | 'none'\n | 'price_trigger'\n | 'time_trigger';\n\nexport interface IndexerServerOrdersParams {\n subaccounts?: string[];\n product_ids?: number[];\n trigger_types?: IndexerServerTriggerTypeFilter[];\n digests?: string[];\n max_time?: number;\n limit?: number;\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMatchEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface IndexerServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n // Defaults to all\n product_ids?: number[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n}\n\nexport interface IndexerServerInterestFundingParams {\n subaccount: string;\n product_ids: number[];\n // If not given, defaults to latest\n max_idx?: string;\n max_time?: number;\n limit: number;\n}\n\nexport interface IndexerServerMakerStatisticsParams {\n product_id: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerServerLeaderboardParams {\n contest_id: number;\n rank_type?: IndexerLeaderboardRankType;\n start?: number | string;\n limit?: number | string;\n order?: 'ASC' | 'DESC';\n}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistrationsParams {\n subaccount: string;\n contest_ids: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegisterParams {\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;\n}\n\nexport interface IndexerServerSocialConnectParams {\n update_social_account: SignedTx<EIP712SocialAuthenticationValues>;\n}\n\nexport interface IndexerServerListSocialAccountsParams {\n address: string;\n}\n\nexport type IndexerServerRevokeSocialAccountParams =\n IndexerServerSocialConnectParams;\n\nexport interface IndexerServerFastWithdrawalSignatureParams {\n /**\n * The submission index of the WithdrawCollateral tx to be used for fast withdraw.\n */\n idx: number | string;\n}\n\nexport interface IndexerServerNlpSnapshotsParams {\n interval: IndexerServerSnapshotsInterval;\n}\n\nexport interface IndexerServerDDAQueryParams {\n subaccount: string;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceParams {\n address: string;\n}\n\nexport interface IndexerServerPointsParams {\n address: string;\n}\n\n// Request\nexport interface IndexerServerQueryRequestByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsParams;\n backlog: Record<string, never>;\n candlesticks: IndexerServerCandlesticksParams;\n direct_deposit_address: IndexerServerDDAQueryParams;\n edge_candlesticks: IndexerEdgeServerCandlesticksParams;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsParams;\n events: IndexerServerEventsParams;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureParams;\n funding_rate: IndexerServerFundingRateParams;\n funding_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_register: IndexerServerLeaderboardRegisterParams;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsParams;\n linked_signer_rate_limit: IndexerServerLinkedSignerParams;\n maker_statistics: IndexerServerMakerStatisticsParams;\n market_snapshots: IndexerServerMarketSnapshotsParams;\n matches: IndexerServerMatchEventsParams;\n oracle_price: IndexerServerOraclePricesParams;\n orders: IndexerServerOrdersParams;\n perp_prices: IndexerServerPerpPricesParams;\n price: IndexerServerPriceParams;\n product_snapshots: IndexerServerMultiProductsParams;\n products: IndexerServerProductsParams;\n referral_code: IndexerServerReferralCodeParams;\n subaccounts: IndexerServerListSubaccountsParams;\n quote_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;\n nado_points: IndexerServerPointsParams;\n social_connect: IndexerServerSocialConnectParams;\n list_social_accounts: IndexerServerListSocialAccountsParams;\n revoke_social_account: IndexerServerRevokeSocialAccountParams;\n}\n\nexport type IndexerServerQueryRequestType =\n keyof IndexerServerQueryRequestByType;\n\n/**\n * Responses\n */\n\nexport interface IndexerServerListSubaccountsResponse {\n subaccounts: {\n id: string;\n // Hex of subaccount bytes\n subaccount: string;\n // UNIX timestamp in seconds\n created_at: string;\n isolated: boolean;\n }[];\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsResponse {\n // Map of subaccount hex -> timestamp requested -> latest events corresponding to each product\n snapshots: Record<string, Record<string, IndexerServerEvent[]>>;\n}\n\nexport interface IndexerServerReferralCodeResponse {\n referral_code: string | null;\n}\n\nexport interface IndexerServerFundingRate {\n product_id: number;\n funding_rate_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerFundingRateResponse = IndexerServerFundingRate;\n\n// Map of productId -> IndexerServerFundingRate\nexport type IndexerServerFundingRatesResponse = Record<\n string,\n IndexerServerFundingRate\n>;\n\nexport interface IndexerServerPerpPrices {\n product_id: number;\n index_price_x18: string;\n mark_price_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerPriceResponse = IndexerServerPerpPrices;\n\n// Map of productId -> IndexerServerPerpPrices\nexport type IndexerServerPerpPricesResponse = Record<\n string,\n IndexerServerPerpPrices\n>;\n\nexport interface IndexerServerOraclePricesResponse {\n prices: IndexerServerOraclePrice[];\n}\n\nexport interface IndexerServerCandlesticksResponse {\n candlesticks: IndexerServerCandlestick[];\n}\n\nexport type IndexerEdgeServerCandlesticksResponse =\n IndexerServerCandlesticksResponse;\n\nexport interface IndexerServerProductsResponse {\n products: IndexerServerProductSnapshot[];\n txs: IndexerServerTx[];\n}\n\n// Map of timestamp -> (productID -> IndexerServerProductSnapshot)\nexport type IndexerServerMultiProductsResponse = Record<\n string,\n Record<string, IndexerServerProductSnapshot>\n>;\n\nexport interface IndexerServerEventsResponse {\n events: IndexerServerEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerOrdersResponse {\n orders: IndexerServerOrder[];\n}\n\nexport interface IndexerServerMatchEventsResponse {\n matches: IndexerServerMatchEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerQuotePriceResponse {\n price_x18: string;\n}\n\nexport interface IndexerServerLinkedSignerResponse {\n total_tx_limit: string;\n remaining_tx: string;\n wait_time: string;\n signer: string;\n}\n\nexport interface IndexerServerMarketSnapshotsResponse {\n snapshots: IndexerServerMarketSnapshot[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsResponse {\n snapshots: Record<number, IndexerServerMarketSnapshot[]>;\n}\n\nexport interface IndexerServerInterestFundingResponse {\n interest_payments: IndexerServerProductPayment[];\n funding_payments: IndexerServerProductPayment[];\n next_idx: string;\n}\n\nexport interface IndexerServerMakerStatisticsResponse {\n reward_coefficient: string;\n makers: IndexerServerMaker[];\n}\n\nexport interface IndexerServerLeaderboardResponse {\n positions: IndexerServerLeaderboardPosition[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationsResponse {\n registrations: IndexerServerLeaderboardRegistration[];\n}\n\nexport type IndexerServerLeaderboardRegisterResponse =\n IndexerServerLeaderboardRegistrationsResponse;\n\nexport interface IndexerServerLeaderboardRankResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerServerLeaderboardPosition\n positions: Record<string, IndexerServerLeaderboardPosition>;\n}\n\nexport interface IndexerServerLeaderboardContestsResponse {\n contests: IndexerServerLeaderboardContest[];\n}\n\nexport interface IndexerServerFastWithdrawalSignatureResponse {\n idx: string;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n tx_bytes: string;\n signatures: string[];\n}\n\nexport interface IndexerServerNlpSnapshotsResponse {\n snapshots: IndexerServerNlpSnapshot[];\n}\n\nexport interface IndexerServerDDAResponse {\n v1_address: string;\n}\n\nexport interface IndexerServerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n total_txs: string;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n total_submissions: string;\n // Number of unprocessed transactions (total_txs - total_submissions)\n backlog_size: string;\n // UNIX timestamp (in seconds) of when the data was last updated\n updated_at: string;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlog_eta_in_seconds: string | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txs_per_second: string | null;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceResponse {\n points: string;\n fee_refund: string;\n nft_eligibility: boolean;\n}\n\nexport interface IndexerServerPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerAllTimePoints {\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerPointsResponse {\n points_per_epoch: IndexerServerPointsEpoch[];\n all_time_points: IndexerServerAllTimePoints;\n}\n\nexport interface IndexerServerSocialConnectResponse {\n url: string;\n}\n\nexport interface IndexerServerSocialAccountsResponse {\n accounts: IndexerServerSocialAccount[];\n}\n\n// Response\nexport interface IndexerServerQueryResponseByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;\n backlog: IndexerServerBacklogResponse;\n candlesticks: IndexerServerCandlesticksResponse;\n direct_deposit_address: IndexerServerDDAResponse;\n edge_candlesticks: IndexerEdgeServerCandlesticksResponse;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsResponse;\n events: IndexerServerEventsResponse;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureResponse;\n funding_rate: IndexerServerFundingRateResponse;\n funding_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_register: IndexerServerLeaderboardRegisterResponse;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsResponse;\n linked_signer_rate_limit: IndexerServerLinkedSignerResponse;\n maker_statistics: IndexerServerMakerStatisticsResponse;\n market_snapshots: IndexerServerMarketSnapshotsResponse;\n matches: IndexerServerMatchEventsResponse;\n oracle_price: IndexerServerOraclePricesResponse;\n orders: IndexerServerOrdersResponse;\n perp_prices: IndexerServerPerpPricesResponse;\n price: IndexerServerPriceResponse;\n product_snapshots: IndexerServerMultiProductsResponse;\n products: IndexerServerProductsResponse;\n referral_code: IndexerServerReferralCodeResponse;\n subaccounts: IndexerServerListSubaccountsResponse;\n quote_price: IndexerServerQuotePriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;\n nado_points: IndexerServerPointsResponse;\n social_connect: IndexerServerSocialConnectResponse;\n list_social_accounts: IndexerServerSocialAccountsResponse;\n revoke_social_account: IndexerServerSocialAccountsResponse;\n}\n\n/**\n * V2 API Types\n */\n\n/**\n * Individual ticker data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2TickerResponse {\n product_id: number;\n ticker_id: string;\n base_currency: string;\n quote_currency: string;\n last_price: number;\n base_volume: number;\n quote_volume: number;\n price_change_percent_24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint (server format)\n * Maps ticker IDs to their respective ticker data\n */\nexport type IndexerServerV2TickersResponse = Record<\n string,\n IndexerServerV2TickerResponse\n>;\n\n/**\n * Market hours data from v2 symbols endpoint (server format)\n */\nexport interface IndexerServerV2MarketHours {\n is_open: boolean;\n reason: string | null;\n next_close: string | null;\n next_open: string | null;\n}\n\n/**\n * Individual symbol data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2Symbol {\n type: string;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n max_open_interest_x18: string | null;\n trading_status: string;\n isolated_only: boolean;\n market_hours: IndexerServerV2MarketHours | null;\n}\n\n/**\n * Response from v2 symbols endpoint (server format)\n * Maps symbols to their respective data\n */\nexport type IndexerServerV2SymbolsResponse = Record<\n string,\n IndexerServerV2Symbol\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SignedTx, EIP712LeaderboardAuthenticationValues } from '@nadohq/shared';
|
|
1
|
+
import { SignedTx, EIP712LeaderboardAuthenticationValues, EIP712SocialAuthenticationValues } from '@nadohq/shared';
|
|
2
2
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
3
3
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
4
4
|
import { NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
5
|
-
import { IndexerServerMarketSnapshotInterval, IndexerServerSnapshotsInterval, IndexerServerEvent, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerTx, IndexerServerProductPayment, IndexerServerLeaderboardPosition, IndexerServerLeaderboardContest, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMatchEvent, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProductSnapshot, IndexerServerNlpSnapshot } from './serverModelTypes.cjs';
|
|
5
|
+
import { IndexerServerMarketSnapshotInterval, IndexerServerSnapshotsInterval, IndexerServerEvent, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerTx, IndexerServerProductPayment, IndexerServerLeaderboardPosition, IndexerServerLeaderboardContest, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMatchEvent, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProductSnapshot, IndexerServerNlpSnapshot, IndexerServerSocialAccount } from './serverModelTypes.cjs';
|
|
6
6
|
import '@nadohq/engine-client';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -131,6 +131,13 @@ interface IndexerServerLeaderboardRegistrationsParams {
|
|
|
131
131
|
interface IndexerServerLeaderboardRegisterParams {
|
|
132
132
|
update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;
|
|
133
133
|
}
|
|
134
|
+
interface IndexerServerSocialConnectParams {
|
|
135
|
+
update_social_account: SignedTx<EIP712SocialAuthenticationValues>;
|
|
136
|
+
}
|
|
137
|
+
interface IndexerServerListSocialAccountsParams {
|
|
138
|
+
address: string;
|
|
139
|
+
}
|
|
140
|
+
type IndexerServerRevokeSocialAccountParams = IndexerServerSocialConnectParams;
|
|
134
141
|
interface IndexerServerFastWithdrawalSignatureParams {
|
|
135
142
|
/**
|
|
136
143
|
* The submission index of the WithdrawCollateral tx to be used for fast withdraw.
|
|
@@ -182,6 +189,9 @@ interface IndexerServerQueryRequestByType {
|
|
|
182
189
|
nlp_snapshots: IndexerServerNlpSnapshotsParams;
|
|
183
190
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;
|
|
184
191
|
nado_points: IndexerServerPointsParams;
|
|
192
|
+
social_connect: IndexerServerSocialConnectParams;
|
|
193
|
+
list_social_accounts: IndexerServerListSocialAccountsParams;
|
|
194
|
+
revoke_social_account: IndexerServerRevokeSocialAccountParams;
|
|
185
195
|
}
|
|
186
196
|
type IndexerServerQueryRequestType = keyof IndexerServerQueryRequestByType;
|
|
187
197
|
/**
|
|
@@ -320,6 +330,12 @@ interface IndexerServerPointsResponse {
|
|
|
320
330
|
points_per_epoch: IndexerServerPointsEpoch[];
|
|
321
331
|
all_time_points: IndexerServerAllTimePoints;
|
|
322
332
|
}
|
|
333
|
+
interface IndexerServerSocialConnectResponse {
|
|
334
|
+
url: string;
|
|
335
|
+
}
|
|
336
|
+
interface IndexerServerSocialAccountsResponse {
|
|
337
|
+
accounts: IndexerServerSocialAccount[];
|
|
338
|
+
}
|
|
323
339
|
interface IndexerServerQueryResponseByType {
|
|
324
340
|
account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;
|
|
325
341
|
backlog: IndexerServerBacklogResponse;
|
|
@@ -353,6 +369,9 @@ interface IndexerServerQueryResponseByType {
|
|
|
353
369
|
nlp_snapshots: IndexerServerNlpSnapshotsResponse;
|
|
354
370
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;
|
|
355
371
|
nado_points: IndexerServerPointsResponse;
|
|
372
|
+
social_connect: IndexerServerSocialConnectResponse;
|
|
373
|
+
list_social_accounts: IndexerServerSocialAccountsResponse;
|
|
374
|
+
revoke_social_account: IndexerServerSocialAccountsResponse;
|
|
356
375
|
}
|
|
357
376
|
/**
|
|
358
377
|
* V2 API Types
|
|
@@ -409,4 +428,4 @@ interface IndexerServerV2Symbol {
|
|
|
409
428
|
*/
|
|
410
429
|
type IndexerServerV2SymbolsResponse = Record<string, IndexerServerV2Symbol>;
|
|
411
430
|
|
|
412
|
-
export type { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse };
|
|
431
|
+
export type { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SignedTx, EIP712LeaderboardAuthenticationValues } from '@nadohq/shared';
|
|
1
|
+
import { SignedTx, EIP712LeaderboardAuthenticationValues, EIP712SocialAuthenticationValues } from '@nadohq/shared';
|
|
2
2
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
3
3
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
4
4
|
import { NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
5
|
-
import { IndexerServerMarketSnapshotInterval, IndexerServerSnapshotsInterval, IndexerServerEvent, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerTx, IndexerServerProductPayment, IndexerServerLeaderboardPosition, IndexerServerLeaderboardContest, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMatchEvent, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProductSnapshot, IndexerServerNlpSnapshot } from './serverModelTypes.js';
|
|
5
|
+
import { IndexerServerMarketSnapshotInterval, IndexerServerSnapshotsInterval, IndexerServerEvent, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerTx, IndexerServerProductPayment, IndexerServerLeaderboardPosition, IndexerServerLeaderboardContest, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMatchEvent, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProductSnapshot, IndexerServerNlpSnapshot, IndexerServerSocialAccount } from './serverModelTypes.js';
|
|
6
6
|
import '@nadohq/engine-client';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -131,6 +131,13 @@ interface IndexerServerLeaderboardRegistrationsParams {
|
|
|
131
131
|
interface IndexerServerLeaderboardRegisterParams {
|
|
132
132
|
update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;
|
|
133
133
|
}
|
|
134
|
+
interface IndexerServerSocialConnectParams {
|
|
135
|
+
update_social_account: SignedTx<EIP712SocialAuthenticationValues>;
|
|
136
|
+
}
|
|
137
|
+
interface IndexerServerListSocialAccountsParams {
|
|
138
|
+
address: string;
|
|
139
|
+
}
|
|
140
|
+
type IndexerServerRevokeSocialAccountParams = IndexerServerSocialConnectParams;
|
|
134
141
|
interface IndexerServerFastWithdrawalSignatureParams {
|
|
135
142
|
/**
|
|
136
143
|
* The submission index of the WithdrawCollateral tx to be used for fast withdraw.
|
|
@@ -182,6 +189,9 @@ interface IndexerServerQueryRequestByType {
|
|
|
182
189
|
nlp_snapshots: IndexerServerNlpSnapshotsParams;
|
|
183
190
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;
|
|
184
191
|
nado_points: IndexerServerPointsParams;
|
|
192
|
+
social_connect: IndexerServerSocialConnectParams;
|
|
193
|
+
list_social_accounts: IndexerServerListSocialAccountsParams;
|
|
194
|
+
revoke_social_account: IndexerServerRevokeSocialAccountParams;
|
|
185
195
|
}
|
|
186
196
|
type IndexerServerQueryRequestType = keyof IndexerServerQueryRequestByType;
|
|
187
197
|
/**
|
|
@@ -320,6 +330,12 @@ interface IndexerServerPointsResponse {
|
|
|
320
330
|
points_per_epoch: IndexerServerPointsEpoch[];
|
|
321
331
|
all_time_points: IndexerServerAllTimePoints;
|
|
322
332
|
}
|
|
333
|
+
interface IndexerServerSocialConnectResponse {
|
|
334
|
+
url: string;
|
|
335
|
+
}
|
|
336
|
+
interface IndexerServerSocialAccountsResponse {
|
|
337
|
+
accounts: IndexerServerSocialAccount[];
|
|
338
|
+
}
|
|
323
339
|
interface IndexerServerQueryResponseByType {
|
|
324
340
|
account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;
|
|
325
341
|
backlog: IndexerServerBacklogResponse;
|
|
@@ -353,6 +369,9 @@ interface IndexerServerQueryResponseByType {
|
|
|
353
369
|
nlp_snapshots: IndexerServerNlpSnapshotsResponse;
|
|
354
370
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;
|
|
355
371
|
nado_points: IndexerServerPointsResponse;
|
|
372
|
+
social_connect: IndexerServerSocialConnectResponse;
|
|
373
|
+
list_social_accounts: IndexerServerSocialAccountsResponse;
|
|
374
|
+
revoke_social_account: IndexerServerSocialAccountsResponse;
|
|
356
375
|
}
|
|
357
376
|
/**
|
|
358
377
|
* V2 API Types
|
|
@@ -409,4 +428,4 @@ interface IndexerServerV2Symbol {
|
|
|
409
428
|
*/
|
|
410
429
|
type IndexerServerV2SymbolsResponse = Record<string, IndexerServerV2Symbol>;
|
|
411
430
|
|
|
412
|
-
export type { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse };
|
|
431
|
+
export type { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/indexer-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "> TODO: description",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"module": "./dist/index.js",
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nadohq/engine-client": "^0.
|
|
45
|
-
"@nadohq/shared": "^0.
|
|
44
|
+
"@nadohq/engine-client": "^0.8.0",
|
|
45
|
+
"@nadohq/shared": "^0.8.0",
|
|
46
46
|
"axios": "*",
|
|
47
47
|
"ts-mixer": "*"
|
|
48
48
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"bignumber.js": "workspace:*",
|
|
55
55
|
"viem": "workspace:*"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "1c5358e0dc2728f74ad86d85fe27f0218c0d655e"
|
|
58
58
|
}
|
package/src/IndexerBaseClient.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EIP712LeaderboardAuthenticationParams,
|
|
3
3
|
EIP712LeaderboardAuthenticationValues,
|
|
4
|
+
EIP712SocialAuthenticationParams,
|
|
4
5
|
getDefaultRecvTime,
|
|
5
6
|
getNadoEIP712Values,
|
|
6
7
|
getSignedTransactionRequest,
|
|
@@ -42,6 +43,8 @@ import {
|
|
|
42
43
|
mapSnapshotsIntervalToServerParams,
|
|
43
44
|
} from './dataMappers';
|
|
44
45
|
import {
|
|
46
|
+
ConnectSocialAccountParams,
|
|
47
|
+
ConnectSocialAccountResponse,
|
|
45
48
|
GetIndexerBacklogResponse,
|
|
46
49
|
GetIndexerCandlesticksParams,
|
|
47
50
|
GetIndexerCandlesticksResponse,
|
|
@@ -115,10 +118,14 @@ import {
|
|
|
115
118
|
IndexerServerV2TickersResponse,
|
|
116
119
|
IndexerSnapshotBalance,
|
|
117
120
|
IndexerSubaccountSnapshot,
|
|
121
|
+
ListIndexerSocialAccountsParams,
|
|
122
|
+
ListIndexerSocialAccountsResponse,
|
|
118
123
|
ListIndexerSubaccountsParams,
|
|
119
124
|
ListIndexerSubaccountsResponse,
|
|
120
125
|
RegisterLeaderboardParams,
|
|
121
126
|
RegisterLeaderboardResponse,
|
|
127
|
+
RevokeSocialAccountParams,
|
|
128
|
+
RevokeSocialAccountResponse,
|
|
122
129
|
} from './types';
|
|
123
130
|
|
|
124
131
|
export interface IndexerClientOpts {
|
|
@@ -713,8 +720,8 @@ export class IndexerBaseClient {
|
|
|
713
720
|
);
|
|
714
721
|
const signature = await this.sign(
|
|
715
722
|
'leaderboard_authentication',
|
|
716
|
-
params.
|
|
717
|
-
params.
|
|
723
|
+
params.verifyingAddr,
|
|
724
|
+
params.chainId,
|
|
718
725
|
signatureParams,
|
|
719
726
|
);
|
|
720
727
|
|
|
@@ -891,6 +898,96 @@ export class IndexerBaseClient {
|
|
|
891
898
|
};
|
|
892
899
|
}
|
|
893
900
|
|
|
901
|
+
/**
|
|
902
|
+
* Initiates a social account connection flow. Returns a URL the user must visit to complete the OAuth flow.
|
|
903
|
+
* Requires EIP-712 signing.
|
|
904
|
+
*
|
|
905
|
+
* @param params - Connection parameters including provider and signing config.
|
|
906
|
+
*/
|
|
907
|
+
async connectSocialAccount(
|
|
908
|
+
params: ConnectSocialAccountParams,
|
|
909
|
+
): Promise<ConnectSocialAccountResponse> {
|
|
910
|
+
const signatureParams: EIP712SocialAuthenticationParams = {
|
|
911
|
+
expiration: toIntegerString(params.recvTime ?? getDefaultRecvTime()),
|
|
912
|
+
subaccountName: params.subaccountName,
|
|
913
|
+
subaccountOwner: params.subaccountOwner,
|
|
914
|
+
provider: params.provider,
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
const tx = getNadoEIP712Values('social_authentication', signatureParams);
|
|
918
|
+
const signature = await this.sign(
|
|
919
|
+
'social_authentication',
|
|
920
|
+
params.verifyingAddr,
|
|
921
|
+
params.chainId,
|
|
922
|
+
signatureParams,
|
|
923
|
+
);
|
|
924
|
+
|
|
925
|
+
const baseResponse = await this.query('social_connect', {
|
|
926
|
+
update_social_account: { tx, signature },
|
|
927
|
+
});
|
|
928
|
+
|
|
929
|
+
return { url: baseResponse.url };
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Lists linked social accounts for a given address.
|
|
934
|
+
*
|
|
935
|
+
* @param params - Query parameters including the wallet address.
|
|
936
|
+
*/
|
|
937
|
+
async listSocialAccounts(
|
|
938
|
+
params: ListIndexerSocialAccountsParams,
|
|
939
|
+
): Promise<ListIndexerSocialAccountsResponse> {
|
|
940
|
+
const baseResponse = await this.query('list_social_accounts', {
|
|
941
|
+
address: params.address,
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
return {
|
|
945
|
+
accounts: baseResponse.accounts.map((a) => ({
|
|
946
|
+
provider: a.provider,
|
|
947
|
+
username: a.username,
|
|
948
|
+
displayName: a.display_name,
|
|
949
|
+
profileImageUrl: a.profile_image_url,
|
|
950
|
+
})),
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Revokes a linked social account. Requires EIP-712 signing.
|
|
956
|
+
*
|
|
957
|
+
* @param params - Revocation parameters including provider and signing config.
|
|
958
|
+
*/
|
|
959
|
+
async revokeSocialAccount(
|
|
960
|
+
params: RevokeSocialAccountParams,
|
|
961
|
+
): Promise<RevokeSocialAccountResponse> {
|
|
962
|
+
const signatureParams: EIP712SocialAuthenticationParams = {
|
|
963
|
+
expiration: toIntegerString(params.recvTime ?? getDefaultRecvTime()),
|
|
964
|
+
subaccountName: params.subaccountName,
|
|
965
|
+
subaccountOwner: params.subaccountOwner,
|
|
966
|
+
provider: params.provider,
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
const tx = getNadoEIP712Values('social_authentication', signatureParams);
|
|
970
|
+
const signature = await this.sign(
|
|
971
|
+
'social_authentication',
|
|
972
|
+
params.verifyingAddr,
|
|
973
|
+
params.chainId,
|
|
974
|
+
signatureParams,
|
|
975
|
+
);
|
|
976
|
+
|
|
977
|
+
const baseResponse = await this.query('revoke_social_account', {
|
|
978
|
+
update_social_account: { tx, signature },
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
return {
|
|
982
|
+
accounts: baseResponse.accounts.map((a) => ({
|
|
983
|
+
provider: a.provider,
|
|
984
|
+
username: a.username,
|
|
985
|
+
displayName: a.display_name,
|
|
986
|
+
profileImageUrl: a.profile_image_url,
|
|
987
|
+
})),
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
|
|
894
991
|
/**
|
|
895
992
|
* Get tickers from the v2 indexer endpoint
|
|
896
993
|
* @param params
|
package/src/types/clientTypes.ts
CHANGED
|
@@ -612,8 +612,7 @@ export interface GetIndexerLeaderboardParticipantResponse {
|
|
|
612
612
|
participant: Record<string, IndexerLeaderboardParticipant>;
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
-
interface
|
|
616
|
-
// endpoint address
|
|
615
|
+
interface SignatureParams {
|
|
617
616
|
verifyingAddr: string;
|
|
618
617
|
chainId: number;
|
|
619
618
|
}
|
|
@@ -625,9 +624,8 @@ export interface GetIndexerLeaderboardRegistrationsParams {
|
|
|
625
624
|
active?: boolean;
|
|
626
625
|
}
|
|
627
626
|
|
|
628
|
-
export interface RegisterLeaderboardParams extends Subaccount {
|
|
627
|
+
export interface RegisterLeaderboardParams extends Subaccount, SignatureParams {
|
|
629
628
|
contestIds: number[];
|
|
630
|
-
registration: LeaderboardSignatureParams;
|
|
631
629
|
/** In millis, defaults to 90s in the future. */
|
|
632
630
|
recvTime?: BigNumber;
|
|
633
631
|
}
|
|
@@ -681,6 +679,32 @@ export interface GetIndexerLeaderboardContestsResponse {
|
|
|
681
679
|
contests: IndexerLeaderboardContest[];
|
|
682
680
|
}
|
|
683
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Social Accounts
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
export interface ConnectSocialAccountParams
|
|
687
|
+
extends Subaccount, SignatureParams {
|
|
688
|
+
provider: 'twitter';
|
|
689
|
+
/** In millis, defaults to 90s in the future. */
|
|
690
|
+
recvTime?: BigNumber;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface ConnectSocialAccountResponse {
|
|
694
|
+
url: string;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export interface ListIndexerSocialAccountsParams {
|
|
698
|
+
address: Address;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface ListIndexerSocialAccountsResponse {
|
|
702
|
+
accounts: IndexerSocialAccountInfo[];
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export type RevokeSocialAccountParams = ConnectSocialAccountParams;
|
|
706
|
+
export type RevokeSocialAccountResponse = ListIndexerSocialAccountsResponse;
|
|
707
|
+
|
|
684
708
|
export type GetIndexerFastWithdrawalSignatureParams =
|
|
685
709
|
IndexerServerFastWithdrawalSignatureParams;
|
|
686
710
|
|
package/src/types/serverTypes.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EIP712LeaderboardAuthenticationValues,
|
|
3
|
+
EIP712SocialAuthenticationValues,
|
|
3
4
|
SignedTx,
|
|
4
5
|
} from '@nadohq/shared';
|
|
5
6
|
import { IndexerEventType } from './IndexerEventType';
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
IndexerServerProductPayment,
|
|
22
23
|
IndexerServerProductSnapshot,
|
|
23
24
|
IndexerServerSnapshotsInterval,
|
|
25
|
+
IndexerServerSocialAccount,
|
|
24
26
|
IndexerServerTx,
|
|
25
27
|
} from './serverModelTypes';
|
|
26
28
|
|
|
@@ -198,6 +200,17 @@ export interface IndexerServerLeaderboardRegisterParams {
|
|
|
198
200
|
update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;
|
|
199
201
|
}
|
|
200
202
|
|
|
203
|
+
export interface IndexerServerSocialConnectParams {
|
|
204
|
+
update_social_account: SignedTx<EIP712SocialAuthenticationValues>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface IndexerServerListSocialAccountsParams {
|
|
208
|
+
address: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type IndexerServerRevokeSocialAccountParams =
|
|
212
|
+
IndexerServerSocialConnectParams;
|
|
213
|
+
|
|
201
214
|
export interface IndexerServerFastWithdrawalSignatureParams {
|
|
202
215
|
/**
|
|
203
216
|
* The submission index of the WithdrawCollateral tx to be used for fast withdraw.
|
|
@@ -255,6 +268,9 @@ export interface IndexerServerQueryRequestByType {
|
|
|
255
268
|
nlp_snapshots: IndexerServerNlpSnapshotsParams;
|
|
256
269
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;
|
|
257
270
|
nado_points: IndexerServerPointsParams;
|
|
271
|
+
social_connect: IndexerServerSocialConnectParams;
|
|
272
|
+
list_social_accounts: IndexerServerListSocialAccountsParams;
|
|
273
|
+
revoke_social_account: IndexerServerRevokeSocialAccountParams;
|
|
258
274
|
}
|
|
259
275
|
|
|
260
276
|
export type IndexerServerQueryRequestType =
|
|
@@ -458,6 +474,14 @@ export interface IndexerServerPointsResponse {
|
|
|
458
474
|
all_time_points: IndexerServerAllTimePoints;
|
|
459
475
|
}
|
|
460
476
|
|
|
477
|
+
export interface IndexerServerSocialConnectResponse {
|
|
478
|
+
url: string;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface IndexerServerSocialAccountsResponse {
|
|
482
|
+
accounts: IndexerServerSocialAccount[];
|
|
483
|
+
}
|
|
484
|
+
|
|
461
485
|
// Response
|
|
462
486
|
export interface IndexerServerQueryResponseByType {
|
|
463
487
|
account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;
|
|
@@ -492,6 +516,9 @@ export interface IndexerServerQueryResponseByType {
|
|
|
492
516
|
nlp_snapshots: IndexerServerNlpSnapshotsResponse;
|
|
493
517
|
private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;
|
|
494
518
|
nado_points: IndexerServerPointsResponse;
|
|
519
|
+
social_connect: IndexerServerSocialConnectResponse;
|
|
520
|
+
list_social_accounts: IndexerServerSocialAccountsResponse;
|
|
521
|
+
revoke_social_account: IndexerServerSocialAccountsResponse;
|
|
495
522
|
}
|
|
496
523
|
|
|
497
524
|
/**
|