useRequests - Relay
Parameters
| Parameter | Description | Required |
|---|---|---|
| baseApiUrl | Base api url for the relay api, defaults to https://api.relay.link but can also be configured to https://api.testnets.relay.link | ❌ |
| options | Query parameters that map directly to the requests api | ❌ |
| queryOptions | Tanstack query options. Refer to the Tanstack docs. | ❌ |
Return Data
The hook returns an object with the base Tanstack Query response. The data property maps to the object returned in the aforementioned requests api.
Usage
import { useRequests } from '@relayprotocol/relay-kit-hooks'
const { data: transactions } = useRequests()
Query Function
import { queryRequests } from '@relayprotocol/relay-kit-hooks'
queryRequests()