@drift-labs/sdk
Version:
SDK for Drift Protocol
42 lines (41 loc) • 1.86 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { ConfirmationStrategy, TxSigAndSlot } from './types';
import { ConfirmOptions, Connection, Commitment, BlockhashWithExpiryBlockHeight } from '@solana/web3.js';
import { BaseTxSender } from './baseTxSender';
import { TxHandler } from './txHandler';
import { IWallet } from '../types';
export declare class FastSingleTxSender extends BaseTxSender {
connection: Connection;
wallet: IWallet;
opts: ConfirmOptions;
timeout: number;
blockhashRefreshInterval: number;
additionalConnections: Connection[];
timoutCount: number;
recentBlockhash: BlockhashWithExpiryBlockHeight;
skipConfirmation: boolean;
confirmInBackground: boolean;
blockhashCommitment: Commitment;
blockhashIntervalId: NodeJS.Timer;
constructor({ connection, wallet, opts, timeout, blockhashRefreshInterval, additionalConnections, skipConfirmation, confirmInBackground, blockhashCommitment, confirmationStrategy, trackTxLandRate, txHandler, txLandRateLookbackWindowMinutes, landRateToFeeFunc, throwOnTimeoutError, }: {
connection: Connection;
wallet: IWallet;
opts?: ConfirmOptions;
timeout?: number;
blockhashRefreshInterval?: number;
additionalConnections?: any;
skipConfirmation?: boolean;
confirmInBackground?: boolean;
blockhashCommitment?: Commitment;
confirmationStrategy?: ConfirmationStrategy;
trackTxLandRate?: boolean;
txHandler?: TxHandler;
txLandRateLookbackWindowMinutes?: number;
landRateToFeeFunc?: (landRate: number) => number;
throwOnTimeoutError?: boolean;
});
startBlockhashRefreshLoop(): void;
sendRawTransaction(rawTransaction: Buffer | Uint8Array, opts: ConfirmOptions): Promise<TxSigAndSlot>;
}