@btc-vision/walletconnect
Version:
The OP_NET Wallet Connect library helps your dApp connect to any compatible wallet.
22 lines (21 loc) • 752 B
TypeScript
import { Network } from '@btc-vision/bitcoin';
import { Address, Unisat, UnisatSigner } from '@btc-vision/transaction';
import { AbstractRpcProvider } from 'opnet';
export declare enum SupportedWallets {
OP_WALLET = "op_wallet",
UNISAT = "unisat"
}
export type Signers = UnisatSigner;
export type Wallets = Unisat;
export declare class WalletConnection {
signer: Signers | null;
walletType: SupportedWallets | null;
walletWindowInstance: Wallets | null;
connect(walletType: SupportedWallets): Promise<void>;
disconnect(): void;
getAddress(): Promise<Address>;
getAddressTyped(): Promise<string>;
getNetwork(): Promise<Network>;
getProvider(): Promise<AbstractRpcProvider>;
}
export default WalletConnection;