UNPKG

@venly/connect

Version:

Venly Connect SDK

63 lines (62 loc) 2.24 kB
import { EventTypes } from '../types/EventTypes'; export default class Utils { private static rawEnvironmentHolder; static environment: string; static connectEnvironment: string; static keycloakEnvironment: string; static set rawEnvironment(env: string); static get rawEnvironment(): string; static environments(): { [key: string]: { api: string; connect: string; login: string; storage: string; }; }; static get urls(): { api: string; connect: string; login: string; storage: string; }; static removeNulls(obj: any): any; static removeNullsAndEmpty(obj: any): any; static messages(): { hasValidOrigin: (message: MessageEvent) => boolean; hasType: (message: MessageEvent) => boolean; isOfType: (message: MessageEvent, eventType: EventTypes) => boolean; hasCorrectCorrelationID(message: MessageEvent, correlationID: string | undefined): boolean; }; static formatNumber(value: number, minDecimals?: number, maxDecimals?: number): string; static rawValue(): { toTokenValue: (rawValue: number, decimals: number) => number; toGwei: (rawValue: number) => number; }; static gwei(): { toRawValue: (rawValue: number) => number; }; static openExternalUrl(url: string, targetBlank?: boolean): Window | null; static zeroIfUndefined(numberToVerify?: number): number; static defaultRedirectUriIfNotPresent(options?: { redirectUri?: string; correlationID?: string; }): { redirectUri?: string; correlationID?: string; }; static http(): { postInForm: (to: string, request: any, bearerTokenProvider: () => string, options?: { redirectUri?: string | undefined; correlationID?: string | undefined; } | undefined) => void; buildUrl: (to: string, options?: { redirectUri?: string | undefined; correlationID?: string | undefined; } | undefined) => string; addRequestParams: (url: string, params: { [key: string]: string; }) => string; }; static uuidv4(): string; }