@drift-labs/sdk-browser
Version:
SDK for Drift Protocol
23 lines • 1.32 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { GrpcConfigs, ResubOpts } from './types';
import { Program } from '@coral-xyz/anchor';
import { Context, MemcmpFilter, PublicKey } from '@solana/web3.js';
import { WebSocketProgramAccountSubscriber } from './webSocketProgramAccountSubscriber';
import { LaserCommitmentLevel } from '../isomorphic/grpc';
type LaserCommitment = (typeof LaserCommitmentLevel)[keyof typeof LaserCommitmentLevel];
export declare class LaserstreamProgramAccountSubscriber<T> extends WebSocketProgramAccountSubscriber<T> {
private stream;
private commitmentLevel;
listenerId?: number;
private readonly laserConfig;
private constructor();
static create<U>(grpcConfigs: GrpcConfigs, subscriptionName: string, accountDiscriminator: string, program: Program, decodeBufferFn: (accountName: string, ix: Buffer) => U, options?: {
filters: MemcmpFilter[];
}, resubOpts?: ResubOpts): Promise<LaserstreamProgramAccountSubscriber<U>>;
subscribe(onChange: (accountId: PublicKey, data: T, context: Context, buffer: Buffer) => void): Promise<void>;
unsubscribe(onResub?: boolean): Promise<void>;
toLaserCommitment(level: string | number | undefined): LaserCommitment;
}
export {};
//# sourceMappingURL=laserProgramAccountSubscriber.d.ts.map