@particle-network/wallet-plugin
Version:
19 lines (18 loc) • 1.42 kB
TypeScript
import { type Evaluate } from '@particle-network/connector-core';
import { type Plugin } from '@particle-network/plugin-core';
import { type WalletEntryPlugin, type WalletOption } from '@particle-network/wallet';
export type WalletPlugin = Plugin<WalletEntryPlugin, void, WalletPluginProperties>;
export type OpenWalletParamers = Evaluate<Parameters<WalletEntryPlugin['openWallet']>[0]>;
export type GetWalletIFrameParamers = Evaluate<Parameters<WalletEntryPlugin['getWalletIFrame']>[0]>;
export type InitParamers = Evaluate<Omit<WalletOption, 'widgetIntegration' | 'entryPosition' | 'visible' | 'preload'>>;
export type WalletPluginProperties = {
getWalletIFrame: (parameters?: GetWalletIFrameParamers) => ReturnType<WalletEntryPlugin['getWalletIFrame']>;
openWallet: (parameters?: OpenWalletParamers) => void;
destory: () => void;
init: (parameters?: InitParamers) => void;
overrideWalletOption: (parameters: Evaluate<Parameters<WalletEntryPlugin['overrideWalletOption']>[0]>) => void;
};
export type WalletPluginParamers = Evaluate<Pick<WalletOption, 'widgetIntegration' | 'entryPosition' | 'visible' | 'preload' | 'themeType' | 'walletUrl'> & {
customStyle?: Omit<WalletOption['customStyle'], 'supportChains'>;
}>;
export declare const wallet: (parameters?: WalletPluginParamers) => import("@particle-network/plugin-core").CreatePluginFn<WalletEntryPlugin, void, WalletPluginProperties>;