UNPKG

@dainprotocol/drift-sdk

Version:

SDK for Drift Protocol

31 lines 880 B
/// <reference types="bn.js" /> import { Keypair } from '@solana/web3.js'; import { BN } from '..'; type Quote = { bidPrice: BN; askPrice: BN; bidBaseAssetAmount: BN; askBaseAssetAmount: BN; marketIndex: number; isOracleOffset?: boolean; }; export declare class IndicativeQuotesSender { private endpoint; private keypair; private heartbeatTimeout; private sendQuotesInterval; private readonly heartbeatIntervalMs; private reconnectDelay; private ws; private connected; private quotes; constructor(endpoint: string, keypair: Keypair); generateChallengeResponse(nonce: string): string; handleAuthMessage(message: any): void; connect(): Promise<void>; private startHeartbeatTimer; setQuote(quote: Quote): void; private reconnect; } export {}; //# sourceMappingURL=indicativeQuotesSender.d.ts.map