/** * Composes {@link makeWsErrorReporter} + decode-then-fire + * {@link AccountSubscriptionManager.subscribeProgramAccounts} for token / * reserve / obligation listeners. */ import type { Address, Commitment, Slot } from '@solana/kit'; import { type AccountSubscriptionManager, type ProgramFilter } from './accountSubscriptionManager'; import type { SubscriptionHandle } from './subscriptionHandle'; import type { WsCadenceOptions } from './wsCadenceOptions'; export interface ManagerSubscriptionOptions extends WsCadenceOptions { manager: AccountSubscriptionManager; programId: Address; filters: readonly ProgramFilter[]; commitment?: Commitment; onReconnect?: () => void | Promise; /** * Return `undefined` to skip a notification (e.g. fail-soft on unknown discriminator), or an array when one * notification carries several changes — {@link onChange} then fires once per element, in order. */ decode: (address: Address, buffer: Uint8Array, slot: Slot) => TEvent | TEvent[] | undefined; onChange: (event: TEvent) => void; onError?: (error: unknown) => void; /** Prefix for the default `console.error` fallback (e.g. `'[listenToReserveChanges]'`). */ errorPrefix: string; } export declare function createManagerSubscription(opts: ManagerSubscriptionOptions): SubscriptionHandle; //# sourceMappingURL=createManagerSubscription.d.ts.map