UNPKG

@leapwallet/embedded-wallet-sdk-react

Version:

A react library for integrating metamask snaps on a cosmos dApp

52 lines (51 loc) 1.65 kB
import React from "react"; import { ChainRecord, ConnectedWallet } from "../../contexts/account"; import { ActionListConfig } from "../../contexts/action-list"; import { Page } from "./pages"; export type AggregatedChainRecord = Record<string, { address: string; restUrl?: string; coinType?: string; chainType: string; }>; export type Config = { title?: (page: Page) => React.ReactNode; subTitle?: (page: Page) => React.ReactNode; closeOnBackdropClick?: boolean; closeOnEscape?: boolean; actionListConfig?: ActionListConfig; showActionButtons?: boolean; showWalletList?: boolean; }; export type AccountViewProps = { theme: "light" | "dark"; onClose: () => void; chainRecords: ChainRecord; config?: Config; restrictChains?: boolean; height?: string; width?: string; classnames?: string; enableWalletConnect?: boolean; connectedWalletList?: ConnectedWallet[]; }; export type StickyAggregatedViewProps = { theme: "light" | "dark"; onClose: () => void; chainRecords: AggregatedChainRecord; config?: Config; restrictChains?: boolean; height?: string; width?: string; classnames?: string; connectedWalletList?: ConnectedWallet[]; }; export declare const AccountViewComponent: React.FC<AccountViewProps>; export type AccountModalProps = AccountViewProps & { isOpen: boolean; onClose: () => void; config?: Config; }; export declare const AccountView: React.FC<AccountViewProps>; export declare const AccountModal: React.FC<AccountModalProps>; export declare const StickyAggregatedView: React.FC<StickyAggregatedViewProps>;