import { MemcmpFilter } from '@solana/web3.js'; import { BulkAccountLoader } from '../accounts/bulkAccountLoader'; import { DriftClient } from '../driftClient'; import { ReferrerInfo } from '../types'; export declare class ReferrerMap { /** * map from authority pubkey to ReferrerInfo. * - if a user has not been entered into the map, the value is undefined * - if a user has no referrer, the value is null * - if a user has a referrer, the value is a ReferrerInfo object */ private referrerMap; private driftClient; private bulkAccountLoader; private parallelSync; private fetchPromise?; private fetchPromiseResolver; /** * Creates a new UserStatsMap instance. * * @param {DriftClient} driftClient - The DriftClient instance. * @param {BulkAccountLoader} [bulkAccountLoader] - If not provided, a new BulkAccountLoader with polling disabled will be created. */ constructor(driftClient: DriftClient, bulkAccountLoader?: BulkAccountLoader, parallelSync?: boolean); /** * Subscribe to all UserStats accounts. */ subscribe(): Promise; has(authorityPublicKey: string): boolean; get(authorityPublicKey: string): ReferrerInfo | undefined | null; addReferrerInfo(authority: string, referrerInfo?: ReferrerInfo | null): Promise; /** * Enforce that a UserStats will exist for the given authorityPublicKey, * reading one from the blockchain if necessary. * @param authorityPublicKey * @returns */ mustGet(authorityPublicKey: string): Promise; values(): IterableIterator; size(): number; sync(): Promise; syncAll(): Promise; syncReferrer(referrerFilter: MemcmpFilter): Promise; unsubscribe(): Promise; }