- useMarket(connection: Connection, wallet: ConnectedWallet, honeyProgramId: string, honeyMarketId: string): { honeyClient: HoneyClient; honeyMarket: HoneyMarket; honeyReserves: HoneyReserve[]; honeyUser: HoneyUser; setHoneyClient: Dispatch<SetStateAction<HoneyClient>>; setHoneyMarket: Dispatch<SetStateAction<HoneyMarket>>; setHoneyReserves: Dispatch<SetStateAction<HoneyReserve[]>>; setHoneyUser: Dispatch<SetStateAction<HoneyUser>> }
-
Parameters
-
connection: Connection
-
wallet: ConnectedWallet
-
honeyProgramId: string
-
honeyMarketId: string
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>> }
-
-
-
-
-
setHoneyClient: Dispatch<SetStateAction<HoneyClient>>
-
setHoneyMarket: Dispatch<SetStateAction<HoneyMarket>>
-
setHoneyReserves: Dispatch<SetStateAction<HoneyReserve[]>>
-
setHoneyUser: Dispatch<SetStateAction<HoneyUser>>
Mostly deprecated, but still useful for fetching a single market
Returns
HoneyClient, HoneyMarket, HoneyUser, HoneyReserve[] and their setters