HUKT turnout markHUKT

Wire the resolver in

SDK and CLI

Two ways onto the rails: hukt-cli scaffolds, inspects, and attests transfer hooks from the terminal, and @hukt-labs/resolver turns a mint into the exact account list a transfer needs — one call, no hand-built metas.

hukt-cli

npm i -g hukt-cli
  • hukt hook add <preset> --bps 500Add a verified preset to the hook spec.
  • hukt buildGenerate the deployable program config from the spec.
  • hukt inspect <mint>Inspect the transfer hook attached to a mint.
  • hukt attest <mint>Run the safety attestation scan on a mint's hook.
  • hukt resolve <mint>Print the extra accounts a transfer needs.

@hukt-labs/resolver

The resolver reads the mint's transfer-hook extension, derives the ExtraAccountMetaList PDA, decodes the TLV entries, and resolves seed-derived accounts against live chain state — then layers the registry's attestation verdict on top.

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

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

// One call: hook program, validation PDA, 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,
});

CI gate

Gate your release pipeline on the attestation scan: a plain workflow step installs the CLI from npm and runs hukt attest against your mint — the step fails when the verdict drops below your threshold.

workflow.yml
- name: Attest the transfer hook
  run: |
    npm install -g hukt-cli
    hukt attest ${{ vars.MINT_ADDRESS }} --fail-on caution