UNPKG

@particle-network/wallet

Version:

A wallet component that can be easily injected into the developer's website to provide rich custom styles.

51 lines (50 loc) 1.68 kB
import { type ProjectConfig, type WalletConfig, type WalletCore, type WalletOption } from './types'; export declare class WalletEntryPlugin { #private; static WALLET_BTN_POSITION: string; private _walletOptions; private projectConfig; private _walletCore; /** * wallet is center */ private centerWallet; walletCreated: boolean; get walletCore(): WalletCore | undefined; get walletOptions(): WalletOption; constructor(); init(projectConfig: ProjectConfig, options?: WalletOption): void; private setInitialButtonPosition; overrideWalletOption(options: Partial<WalletOption>): void; setWalletCore(walletCore: WalletCore): void; walletEntryCreate(): void; walletEntryDestroy(): void; destroy(): void; private getWalletUrl; getWalletIFrame(options?: WalletConfig): HTMLIFrameElement; private getWalletIFrameImpl; private getWalletIFrameMask; private createIFrame; /** * open modal wallet * @param params * @param params.windowSize large | small * @param params.pathName The path to the web wallet page, which is '/' by default. * @param params.query Go to the query parameter of the wallet page * @returns */ openWallet(params?: { windowSize?: 'large' | 'small'; } & WalletConfig): void; private setWalletIcon; private updateIframeContentPosition; private setButtonStorageData; private getButtonStorageData; private getInitialPositionData; private getDirectionFromPosition; private updateWalletBtnPosition; closeWallet(): void; private resize; private sleep; private walletEntryRander; }