useConnectionManager

function useConnectionManager(): {
activeAccountStore: Store<undefined | Account>;
activeWalletChainStore: Store<
undefined | Readonly<ChainOptions & { rpc: string }>
>;
activeWalletConnectionStatusStore: Store<ConnectionStatus>;
activeWalletStore: Store<undefined | Wallet>;
addConnectedWallet: (wallet: Wallet) => void;
connect: (
wallet: Wallet,
) => Promise<Wallet>;
connectedWallets: ReadonlyStore<Array<Wallet>>;
defineChains: (
chains: Array<Readonly<ChainOptions & { rpc: string }>>,
) => void;
disconnectWallet: (wallet: Wallet) => void;
handleConnection: (
wallet: Wallet,
) => Promise<Wallet>;
isAutoConnecting: Store<boolean>;
removeConnectedWallet: (wallet: Wallet) => void;
setActiveWallet: (activeWallet: Wallet) => Promise<void>;
switchActiveWalletChain: (
chain: Readonly<ChainOptions & { rpc: string }>,
) => Promise<void>;
};

Returns

let returnType: {
activeAccountStore: Store<undefined | Account>;
activeWalletChainStore: Store<
undefined | Readonly<ChainOptions & { rpc: string }>
>;
activeWalletConnectionStatusStore: Store<ConnectionStatus>;
activeWalletStore: Store<undefined | Wallet>;
addConnectedWallet: (wallet: Wallet) => void;
connect: (
wallet: Wallet,
) => Promise<Wallet>;
connectedWallets: ReadonlyStore<Array<Wallet>>;
defineChains: (
chains: Array<Readonly<ChainOptions & { rpc: string }>>,
) => void;
disconnectWallet: (wallet: Wallet) => void;
handleConnection: (
wallet: Wallet,
) => Promise<Wallet>;
isAutoConnecting: Store<boolean>;
removeConnectedWallet: (wallet: Wallet) => void;
setActiveWallet: (activeWallet: Wallet) => Promise<void>;
switchActiveWalletChain: (
chain: Readonly<ChainOptions & { rpc: string }>,
) => Promise<void>;
};