UNPKG

@btc-vision/walletconnect

Version:

The OP_NET Wallet Connect library helps your dApp connect to any compatible wallet.

26 lines (25 loc) 885 B
import { Network } from '@btc-vision/bitcoin'; import { Address } from '@btc-vision/transaction'; import { AbstractRpcProvider } from 'opnet'; import { ReactNode } from 'react'; import { Signers, SupportedWallets, Wallets } from './WalletConnection'; export interface Account { isConnected: boolean; signer: Signers | null; address: Address; addressTyped: string; network: Network; provider: AbstractRpcProvider; } interface WalletContextType { connect: (wallet: SupportedWallets, signal?: AbortSignal) => Promise<void>; disconnect: () => void; walletType: SupportedWallets | null; walletWindowInstance: Wallets | null; account: Account | null; } export declare const WalletProvider: ({ children }: { children: ReactNode; }) => import("react/jsx-runtime").JSX.Element; export declare const useWallet: () => WalletContextType; export {};