npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hft-labs/react

v0.1.0

Published

React hooks for HFT Turbo - manage Uniswap V3 concentrated liquidity positions

Downloads

10

Readme

@hft-labs/react

React hooks for Uniswap V3 liquidity management via HFT-Turbo API.

Installation

npm install @hft-labs/react @tanstack/react-query
# or
pnpm add @hft-labs/react @tanstack/react-query

Quick Start

1. Set up providers

import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { HftProvider } from '@hft-labs/react'

const queryClient = new QueryClient()

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <HftProvider baseUrl="https://api.your-hft-instance.com">
        <YourApp />
      </HftProvider>
    </QueryClientProvider>
  )
}

2. Fetch pool data

import { usePool } from '@hft-labs/react'

function PoolInfo() {
  const { data: pool, isLoading } = usePool({
    chainId: 'polygon',
    tokenA: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', // WETH
    tokenB: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', // USDC
    fee: 3000,
  })

  if (isLoading) return <div>Loading...</div>

  return (
    <div>
      <p>Price: {pool?.token0Price}</p>
      <p>Tick: {pool?.currentTick}</p>
    </div>
  )
}

Hooks Reference

Query Hooks (read-only, no auth required)

| Hook | Description | |------|-------------| | usePool(params) | Pool info, price, tick, suggestions | | usePoolHistory(params) | Historical price data | | usePositions(params) | All positions for an owner | | usePosition(params) | Single position details |

Mutation Hooks (require session key + signer)

| Hook | Description | |------|-------------| | useMint() | Create new position | | useIncreaseLiquidity() | Add to existing position | | useDecreaseLiquidity() | Remove from position | | useCollectFees() | Collect earned fees | | useBurn() | Burn empty position NFT |

Utility Hooks

| Hook | Description | |------|-------------| | useHftClient() | Access underlying HftClient | | useHftConfig() | Access/update configuration |

Cache Invalidation

Query keys are exported for manual cache control:

import { queryKeys } from '@hft-labs/react'
import { useQueryClient } from '@tanstack/react-query'

function RefreshButton() {
  const queryClient = useQueryClient()

  return (
    <button onClick={() => {
      queryClient.invalidateQueries({ queryKey: queryKeys.pools.all })
    }}>
      Refresh Pools
    </button>
  )
}

TypeScript

All types are re-exported from @hft-labs/client:

import type { PoolInfo, MintParams, ChainId } from '@hft-labs/react'

Requirements

  • React 18 or 19
  • @tanstack/react-query v5

License

MIT