import type { ConnectOptions, DisconnectOptions, WalletState, ConnectedChain } from '@web3-onboard/core' import { Accessor, Ref } from 'solid-js' // 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: string[] connectWallet: (options?: ConnectOptions) => Promise connectedChain: Accessor connectedWallet: Accessor connectingWallet: Accessor disconnectWallet: (wallet: DisconnectOptions) => Promise disconnectConnectedWallet: () => Promise getChain: (walletLabel: string) => ConnectedChain | null lastConnectionTimestamp: object setChain: (options: SetChainOptions) => Promise settingChain: Accessor wallets: Accessor } export { ReadonlyRef, SetChainOptions, OnboardComposable }