UNPKG

@unielon/wallet-tg-sdk

Version:

unielon wallet sdk for telegram

42 lines (41 loc) 1.57 kB
import { default as Eventemitter3 } from 'eventemitter3'; import { DogecoinRequestMethod, BridgeRequestOptions } from '../types/unielon.ts'; import { InitOptions } from '../types'; import { RequestBody } from '../types/connect.ts'; export declare class ProxyLocalStorage { prefix: string; constructor(); get(key: string): any; set(key: string, value: any): any; } export declare const walletPromiseTimeoutClear: (id: string, fn: () => Promise<any>, timeout?: number) => Promise<any>; export declare const isReConnect: (lastTime: number, timeout?: number) => boolean; export declare class UnielonBridge extends Eventemitter3 { version: string; metaData: InitOptions["metaData"]; connect_direct_link: string | undefined; storage: ProxyLocalStorage; getMessage: RequestBody<any>; sendMessage: RequestBody<any>; listenerMessage: RequestBody<any>; connect_url: string | undefined; request_timeout: number; timeoutClear: any; connected: boolean; address: string | null; accounts: string[] | undefined; _isConnected: boolean; private _isUnlocked; get _lastTime(): number; set _lastTime(value: number); get _accounts(): string[]; set _accounts(accounts: string[]); get _address(): string | null; get _connected(): boolean; constructor(options: InitOptions); _initialized(): void; isConnected(): boolean; disconnect(): void; private listenerConnect; request(method: DogecoinRequestMethod, params?: any, options?: BridgeRequestOptions): Promise<any>; }