Hook
usePriorityFeeEstimate
Reads recent Solana prioritization-fee samples and exposes normalized low, medium, and high ranges.
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/use-priority-fee-estimate.jsonUsage
use-priority-fee-estimate.tsx
import { usePriorityFeeEstimate } from "@/hooks/uxdotsol/use-priority-fee-estimate"; const fees = usePriorityFeeEstimate(writableAccounts, { cluster: "mainnet-beta" });Options
| Name | Type | Default | Description |
|---|---|---|---|
| writableAccounts | readonly string[] | [] | Writable accounts used by RPC to select relevant recent fee samples. |
| options | { cluster?, adapter?, endpoint?, enabled? } | {} | Cluster, provider override, route, and request control. |
Returns
| Name | Type | Default | Description |
|---|---|---|---|
| resource | { status, data, error, updatedAt, refetch } | — | Normalized resource state plus explicit status flags and a manual refresh action. |

