UNPKG

@hubbleprotocol/farms-sdk

Version:
41 lines (40 loc) 1.63 kB
import { ENV } from "@kamino-finance/klend-sdk"; import { Commitment, Connection, SendOptions, Signer, Transaction, VersionedTransaction } from "@solana/web3.js"; export type Chain = { name: ENV; displayName: string; endpoint: string; chainID: number; wsEndpoint?: string; }; export declare class Web3Client { private readonly _connection; private readonly _sendConnection; private readonly _sendConnectionsExtra; private readonly _endpoint; private readonly _env; private readonly _chain; constructor(endpoint: Chain | string); get endpoint(): string; get chain(): Chain; get env(): ENV; get connection(): Connection; get sendConnection(): Connection; get sendConnectionsExtra(): Connection[]; } export declare function signSendAndConfirmRawTransactionWithRetry({ mainConnection, extraConnections, tx, signers, commitment, sendTransactionOptions, }: { mainConnection: Connection; extraConnections?: Connection[]; tx: VersionedTransaction; signers: Array<Signer>; commitment?: Commitment; sendTransactionOptions?: SendOptions; }): Promise<string>; export declare function sendAndConfirmRawTransactionWithRetry({ mainConnection, extraConnections, tx, commitment, sendTransactionOptions, }: { mainConnection: Connection; extraConnections?: Connection[]; tx: Transaction | VersionedTransaction; commitment?: Commitment; sendTransactionOptions?: SendOptions; }): Promise<string>; export declare function isVersionedTransaction(transaction: Transaction | VersionedTransaction): transaction is VersionedTransaction;