UNPKG

@drift-labs/sdk

Version:
41 lines (40 loc) 1.12 kB
import { Commitment, Connection, MemcmpFilter } from '@solana/web3.js'; import { DriftClient } from '../driftClient'; import { GrpcConfigs } from '../accounts/types'; export type UserAccountFilterCriteria = { hasOpenOrders: boolean; }; export type SyncConfig = { type: 'default'; } | { type: 'paginated'; chunkSize?: number; concurrencyLimit?: number; }; export type UserMapConfig = { driftClient: DriftClient; connection?: Connection; subscriptionConfig: { type: 'polling'; frequency: number; commitment?: Commitment; } | { type: 'grpc'; grpcConfigs: GrpcConfigs; resubTimeoutMs?: number; logResubMessages?: boolean; } | { type: 'websocket'; resubTimeoutMs?: number; logResubMessages?: boolean; commitment?: Commitment; }; skipInitialLoad?: boolean; includeIdle?: boolean; fastDecode?: boolean; disableSyncOnTotalAccountsChange?: boolean; syncConfig?: SyncConfig; throwOnFailedSync?: boolean; filterByPoolId?: number; additionalFilters?: MemcmpFilter[]; };