1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /// <reference types="node" />
- import { EventEmitter } from 'events';
- export interface ConnectionOptions {
- trace?: boolean | ((id: string, message: string) => void);
- proxy?: string;
- proxyAuthorization?: string;
- authorization?: string;
- trustedCertificates?: string[];
- key?: string;
- passphrase?: string;
- certificate?: string;
- timeout: number;
- connectionTimeout: number;
- }
- export declare type ConnectionUserOptions = Partial<ConnectionOptions>;
- export declare class Connection extends EventEmitter {
- private _url;
- private _ws;
- private _reconnectTimeoutID;
- private _heartbeatIntervalID;
- private _retryConnectionBackoff;
- private _trace;
- private _config;
- private _ledger;
- private _requestManager;
- private _connectionManager;
- constructor(url?: string, options?: ConnectionUserOptions);
- private _onMessage;
- private get _state();
- private get _shouldBeConnected();
- private _clearHeartbeatInterval;
- private _startHeartbeatInterval;
- private _heartbeat;
- private _waitForReady;
- private _subscribeToLedger;
- private _onConnectionFailed;
- isConnected(): boolean;
- connect(): Promise<void>;
- disconnect(): Promise<number | undefined>;
- reconnect(): Promise<void>;
- getFeeBase(): Promise<number>;
- getFeeRef(): Promise<number>;
- getLedgerVersion(): Promise<number>;
- getReserveBase(): Promise<number>;
- hasLedgerVersions(lowLedgerVersion: number, highLedgerVersion: number | undefined): Promise<boolean>;
- hasLedgerVersion(ledgerVersion: number): Promise<boolean>;
- request(request: any, timeout?: number): Promise<any>;
- getUrl(): string;
- }
- //# sourceMappingURL=connection.d.ts.map
|