UNPKG

@bonfida/sns-widget

Version:

SNS Widget for 3rd-party apps for quick domain search and register

51 lines (43 loc) 1.64 kB
import { Connection } from '@solana/web3.js'; import { CSSProperties } from 'react'; import { JSX as JSX_2 } from 'react/jsx-runtime'; import { PublicKey } from '@solana/web3.js'; import { ReactNode } from 'react'; import { SignerWalletAdapterProps } from '@solana/wallet-adapter-base'; import { Wallet } from '@solana/wallet-adapter-react'; import { WalletName } from '@solana/wallet-adapter-base'; declare interface CommonProps { passthroughWallet?: WalletPassThroughProps; containerClassNames?: string; containerStyles?: CSSProperties; rootWrapperClassNames?: string; rootWrapperStyles?: CSSProperties; isDark?: boolean; referrerKey?: PublicKey; partnerLogo?: ReactNode; } declare interface ConnectionOnly { endpoint?: never; connection: Connection; } declare interface EndpointOnly { endpoint: string; connection?: never; } declare const EntryPoint: ({ rootWrapperClassNames, rootWrapperStyles, isDark, ...props }: WidgetProps) => JSX_2.Element; export default EntryPoint; export declare interface WalletPassThroughProps { publicKey: PublicKey | null | undefined; wallets: Wallet[]; wallet: Wallet | null; connect: () => Promise<void>; select: (walletName: WalletName) => void; connecting: boolean; connected: boolean; disconnect: () => Promise<void>; signAllTransactions: SignerWalletAdapterProps["signAllTransactions"] | undefined; visible: boolean; setVisible: (visible: boolean) => void; } export declare type WidgetProps = (EndpointOnly | ConnectionOnly) & CommonProps; export { }