import type { ConnectOptions, DisconnectOptions, WalletState, ConnectedChain } from '@web3-onboard/core' import type { Ref, ComputedRef } from 'vue-demi' // Syntax sugar for Readonly Refs type ReadonlyRef = Readonly> type SetChainOptions = { chainId: string chainNamespace?: string wallet: string, rpcUrl?: string, label?: string, token?: string } interface OnboardComposable { alreadyConnectedWallets: ReadonlyRef connectWallet: (options?: ConnectOptions) => Promise connectedChain: ComputedRef connectedWallet: ComputedRef connectingWallet: ReadonlyRef disconnectWallet: (wallet: DisconnectOptions) => Promise disconnectConnectedWallet: () => Promise getChain: (walletLabel: string) => ConnectedChain | null lastConnectionTimestamp: ReadonlyRef setChain: (options: SetChainOptions) => Promise settingChain: ReadonlyRef wallets: ReadonlyRef } export { ReadonlyRef, SetChainOptions, OnboardComposable }