UNPKG

@plurality-network/smart-profile-wallet

Version:

A React component for social connect popup.

83 lines 3.87 kB
import React, { Component } from 'react'; import './css/styles.css'; import { User } from './types/payloadTypes'; interface LoginDataType { status: boolean; pluralityToken: string; } interface LogoutDataType { logout: boolean; message: string; } interface PluralitySocialConnectProps { options: { theme: string; clientId?: string; text?: string; headless?: boolean; }; onDataReturned?: (data: LoginDataType) => void; onProfileLogout?: (data: LogoutDataType) => void; customization?: { minWidth?: string; height?: string; color?: string; hoverTextColor?: string; fontSize?: string; fontFamily?: string; backgroundColor?: string; hoverBackgroundColor?: string; marginTop?: string; borderRadius?: string; }; } interface PluralitySocialConnectState { iframeStyle: React.CSSProperties; isOpen: boolean; showMask: boolean; isDisabled: boolean; isMetamaskConnected: boolean; isLitConnected: boolean; userData: User; } export declare class PluralitySocialConnect extends Component<PluralitySocialConnectProps, PluralitySocialConnectState> { private static instance; constructor(props: PluralitySocialConnectProps); getBaseUrl(): string; static openSocialConnectPopup: () => void; openSocialConnectPopup: () => void; openInvisiblePopup: () => void; closeSocialConnectPopup: () => void; static checkLitConnection: () => boolean; static checkConnection: () => boolean; static getAllAccounts: (rpc?: string, chainId?: string) => Promise<unknown>; static getConnectedAccount: (rpc?: string, chainId?: string) => Promise<unknown>; static getBalance: (rpc?: string, chainId?: string) => Promise<unknown> | undefined; static getMessageSignature: (messageToSign: string) => Promise<unknown> | undefined; static verifyMessageSignature: (plainMessage: string, signedMessage: string) => Promise<unknown> | undefined; static sendTransaction: (rawTx: string, rpc?: string, chainId?: string) => Promise<unknown> | undefined; static getBlockNumber: (rpc?: string, chainId?: string) => Promise<unknown> | undefined; static getTransactionCount: (address: string, rpc?: string, chainId?: string) => Promise<unknown> | undefined; static readFromContract: (address: string, abi: string, methodName: string, methodParams: string, rpc?: string, chainId?: string) => Promise<unknown> | undefined; static writeToContract: (address: string, abi: string, methodName: string, methodParams: string, rpc: string | undefined, chainId: string | undefined, options: string) => Promise<unknown> | undefined; static getLoginInfo: () => Promise<unknown> | undefined; static setPublicData: (key: string, value: string) => Promise<unknown> | undefined; static getPublicData: (key: string) => Promise<unknown> | undefined; static setPrivateData: (key: string, value: string) => Promise<unknown> | undefined; static getPrivateData: (key: string) => Promise<unknown> | undefined; static updateConsentOption: () => Promise<unknown> | undefined; static getSmartProfileData: () => Promise<unknown> | undefined; static getAppData: (key: string) => Promise<unknown> | undefined; static setAppData: (key: string, value: string) => Promise<unknown> | undefined; static navigateTo: (step: string) => false | undefined; static connectProfile: () => void; static disconnectProfile: () => void; sleep: (ms: number) => Promise<unknown>; performAsyncTasks(): Promise<void>; componentDidMount(): void; componentWillUnmount(): void; handleIframeMessage: (event: MessageEvent) => void; render(): import("react/jsx-runtime").JSX.Element; } export {}; //# sourceMappingURL=PluralitySocialConnect.d.ts.map