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

@hukt-labs/resolver

v0.1.1

Published

One-line integration for Token-2022 transfer-hook tokens: resolve a mint's extra accounts and build transfer instructions with the hook accounts injected.

Readme

@hukt-labs/resolver

One-line integration for Solana Token-2022 transfer-hook tokens. resolver.resolve(mint) returns the hook program and the extra accounts a transfer needs, resolved against live chain state, plus the hook's HUKT registry attestation. resolver.buildTransfer(...) returns a transferChecked instruction with the extra accounts already injected, so wallets, DEXs, and lending protocols can move hooked tokens without hand-building account lists.

Works with any public RPC endpoint; no API key required. Node 18 or newer (TypeScript types included).

Install

npm install @hukt-labs/resolver @solana/web3.js

Usage

import { Connection } from "@solana/web3.js";
import { HuktResolver } from "@hukt-labs/resolver";

const resolver = new HuktResolver(new Connection(RPC_URL));

// One call: hook program, resolved extra accounts, and whether the
// hook is attested in the registry.
const hook = await resolver.resolve(mint);

// Or build the whole transfer with the extra accounts injected.
const ix = await resolver.buildTransfer({
  source, mint, destination, owner, amount, decimals,
});

Real output against the devnet demo mint 6rEQuznf2awpSEnrC8DsPbqq6cAHN3Vkk6xRRoYL9V29:

{
  "mint": "6rEQuznf2awpSEnrC8DsPbqq6cAHN3Vkk6xRRoYL9V29",
  "programId": "4q7Tgd9A1XfTB2i6WLUjmFXNocw6GrshZwcKgarGV9aC",
  "extraAccounts": [
    { "pubkey": "5ztfBpMR4tqFZHqdtxkm34K9kPrqd2VGfMwzzsVKpWKJ", "isSigner": false, "isWritable": false, "derivedFromSeeds": true },
    { "pubkey": "31B4LSMMpaGSEgUtPtdya25UvC7uyKUo3ymJF2KbzRND", "isSigner": false, "isWritable": false, "derivedFromSeeds": true },
    { "pubkey": "FU4WVjHHiZ35gnSmWyy6jdpysAJLBVYYWREdRsiXyqhG", "isSigner": false, "isWritable": false, "derivedFromSeeds": true }
  ],
  "attested": true,
  "attestation": {
    "authority": "472iAFz5YD3mNpmp4TKSVuksm9rYjXHYmqLkfs3rpjzt",
    "timestamp": 1783826953,
    "level": "safe"
  }
}

How it works

  • resolve(mint) reads the mint's TransferHook extension, derives the ExtraAccountMetaList PDA (seeds ["extra-account-metas", mint] under the hook program), and resolves every entry against the on-chain Execute account order (0 source, 1 mint, 2 destination, 3 authority, 4 validation PDA, 5+ extras) -- the same resolution the hook program performs. Context for data-dependent seeds prefers token accounts observed in a real hooked transfer of the mint.
  • Attestation comes from the HUKT indexer (https://api.hukt.fun by default; override with new HuktResolver(connection, { apiUrl })). When the indexer is unreachable, attested and attestation are left undefined -- the package never fabricates a verdict.
  • buildTransfer(...) delegates to spl-token's createTransferCheckedWithTransferHookInstruction, so the returned instruction carries the resolved extras plus the hook program and validation PDA in the exact order Token-2022 expects.

Related

  • hukt-cli -- the same resolution from the command line (npm install -g hukt-cli).
  • @hukt/account-resolver -- lower-level resolution primitives, in the HuktYard/hukt repo.

MIT (c) hukt-labs