Function useMarket

  • Mostly deprecated, but still useful for fetching a single market

    Returns

    HoneyClient, HoneyMarket, HoneyUser, HoneyReserve[] and their setters

    Parameters

    • connection: Connection

      to the cluster

    • wallet: ConnectedWallet

      wallet adapter or null for read-only

    • honeyProgramId: string

      of the program

    • honeyMarketId: string

      single market id to fetch

    Returns { honeyClient: HoneyClient; honeyMarket: HoneyMarket; honeyReserves: HoneyReserve[]; honeyUser: HoneyUser; setHoneyClient: Dispatch<SetStateAction<HoneyClient>>; setHoneyMarket: Dispatch<SetStateAction<HoneyMarket>>; setHoneyReserves: Dispatch<SetStateAction<HoneyReserve[]>>; setHoneyUser: Dispatch<SetStateAction<HoneyUser>> }

Generated using TypeDoc