mysterium-vpn-js
Version:
Javascript SDK for Mysterium node
56 lines (55 loc) • 1.48 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 { Tokens } from '../common/tokens';
export interface IdentityRef {
id: string;
}
export declare function parseIdentityRef(data: any): IdentityRef;
export interface IdentityList {
identities: IdentityRef[];
}
export declare function parseIdentityList(responseData: any): IdentityList;
export declare enum IdentityRegistrationStatus {
Unknown = "Unknown",
Unregistered = "Unregistered",
InProgress = "InProgress",
Registered = "Registered",
RegistrationError = "RegistrationError"
}
export interface Identity {
id: string;
registrationStatus: IdentityRegistrationStatus;
channelAddress: string;
/**
* @deprecated use balanceTokens
*/
balance: number;
balanceTokens: Tokens;
/**
* @deprecated use earningTokens
*/
earnings: number;
earningsTokens: Tokens;
/**
* @deprecated use earningsTotalTokens
*/
earningsTotal: number;
earningsTotalTokens: Tokens;
stake: number;
hermesId: string;
earningsPerHermes: {
[key: string]: {
earningsTokens: Tokens;
earningsTotalTokens: Tokens;
};
};
}
export interface IdentityBalanceResponse {
balance: number;
balanceTokens: Tokens;
}
export declare function parseIdentity(data: any): Identity;