mysterium-vpn-js
Version:
Javascript SDK for Mysterium node
33 lines (32 loc) • 1.06 kB
TypeScript
/**
* Copyright (c) 2020 BlockDev AG
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Connection } from '../connection/status';
import { Identity } from '../identity/identity';
import { NatStatusResponse } from '../nat/status';
import { ServiceInfo } from '../provider/service-info';
import { Session, SessionStats } from '../session/session';
import { PaymentChannel } from '../transactor/channel';
export declare const TEQUILAPI_SSE_URL = "http://127.0.0.1:4050/events/state";
export interface AppState {
natStatus: NatStatusResponse;
serviceInfo: ServiceInfo[];
sessions: Session[];
sessionsStats: SessionStats;
consumer: {
connection: Connection;
};
identities: Identity[];
channels: PaymentChannel[];
}
export declare enum SSEEventType {
AppStateChange = "state-change"
}
export interface SSEResponse {
type: SSEEventType;
payload: AppState;
}
export declare const parseSSEResponse: (data: any) => SSEResponse;