UNPKG

saepenatus

Version:

Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, mul

34 lines (29 loc) 1.02 kB
import type { ConnectOptions, DisconnectOptions, WalletState, ConnectedChain } from '@web3-onboard/core' import type { Ref, ComputedRef } from 'vue-demi' // Syntax sugar for Readonly Refs type ReadonlyRef<T> = Readonly<Ref<T>> type SetChainOptions = { chainId: string chainNamespace?: string wallet: string } interface OnboardComposable { alreadyConnectedWallets: ReadonlyRef<string[]> connectWallet: (options?: ConnectOptions) => Promise<void> connectedChain: ComputedRef<ConnectedChain | null> connectedWallet: ComputedRef<WalletState | null> connectingWallet: ReadonlyRef<boolean> disconnectWallet: (wallet: DisconnectOptions) => Promise<void> disconnectConnectedWallet: () => Promise<void> getChain: (walletLabel: string) => ConnectedChain | null lastConnectionTimestamp: ReadonlyRef<number> setChain: (options: SetChainOptions) => Promise<void> settingChain: ReadonlyRef<boolean> wallets: ReadonlyRef<WalletState[]> } export { ReadonlyRef, SetChainOptions, OnboardComposable }