UNPKG

glip-wallet-sdk

Version:

Guide for installation and usage of Glip's Web3 Wallet.\ Glip Wallet through its SDK provides a signer using which a user's transaction can be signed.\ It also contains a iframe based UI element which can be embedded into any webpage.\ The UI contains

61 lines (60 loc) 2.16 kB
import GlipSigner from './sub_modules/Signer'; import { providers } from "ethers"; declare type onLoginChangeCBTYpe = (isLoggedIn: boolean) => void; interface GlipWalletInitParams { chainId: number; authNetwork: string; clientIdentifier: string; } declare class GlipWallet { chainId: number; authNetwork: string; clientIdentifier: string; onLoginChange: onLoginChangeCBTYpe; iWin: any; iframeInitialized: boolean; initOngoing: boolean; globalInitPromise: any; connectedSocket: any; socketUUID: string; walletDiv: any; walletIframe: any; provider: any; private glipSigner; constructor(); initializeWebSocket(): void; private initCB; private initRejectCB; init({ chainId, authNetwork, clientIdentifier }: GlipWalletInitParams): any; private initInternal; getAddress(): Promise<any>; getBalance(): Promise<any>; _createIframe(iframeContainerDiv: any): void; createWalletDiv(): void; showWallet(): void; hideWallet(): void; showConnectModal(): void; private loginDoneCB; private loginDoneCBRejected; login(loginType: string, lastLocation: string, opts: any): Promise<unknown> | undefined; private getUserInfoCB; private getUserInfoRejectCB; getUserInfo(): Promise<unknown>; private isConnectedCB; private isConnectedRejectedCB; isConnected(): Promise<unknown>; private getWalletIDCB; private getWalletIdRejectCB; getWalletID(): Promise<unknown>; private logoutCB; private logoutRejectedCB; logout(): Promise<unknown>; _loginWithIdToken({ loginType, userInfo, verifier }: any): void; handleMessage(event: MessageEvent<any>): void; getProvider(): Promise<providers.JsonRpcProvider>; getSigner(provider?: providers.Provider): Promise<GlipSigner>; getSignedTransaction(): Promise<string | false | null>; } declare const getGlipWallet: (chainId: number, authNetwork: string, clientIdentifier: string) => Promise<true | GlipWallet>; declare let glipWalletSDK: GlipWallet; export { glipWalletSDK, getGlipWallet };