Overview
Introduction
@sfpro/sdk is a compact TypeScript developer toolkit for building on the Superfluid Protocol.
It bundles the on-chain ABIs, typed actions, and ready-made React hooks generated with wagmi CLI — all split into independent ESM exports so you only ship what you use.
Characteristics
| Detail | |
|---|---|
| Lightweight | Zero runtime dependencies in the core; only peer-install what your code path needs. |
| Type-safe | Fully-typed ABIs and actions for autocompletion and compile-time checks. |
| Tree-shakeable | Each export (./abi, ./action, ./hook, ./util) is side-effect-free and independent. |
| wagmi / viem powered | Uses the same primitives you already know — no custom wrapper abstractions. |
| React hooks (optional) | Consume plain ABIs, viem actions, or rich wagmi hooks depending on your stack. |
| ESM-only | Modern build tooling out of the box; no CJS shims. |
Package layout
@sfpro/sdk/
├── abi # Pure typesafe JSON ABIs
├── action # viem & @wagmi/core actions
├── hook # wagmi React hooks
└── util # Common utilitiesRemember: All SDK exports use singular names (action not actions, hook not hooks, util not utils). This keeps imports clean and consistent!
Import examples
| You need... | Install... | Import from... |
|---|---|---|
| Only ABIs | @sfpro/sdk | import { cfaForwarderAbi } from "@sfpro/sdk/abi" |
| Actions | @sfpro/sdk + viem or @wagmi/core | import { readCfaForwarderGetFlowInfo } from "@sfpro/sdk/action" |
| React hooks | @sfpro/sdk + wagmi | import { useCfaForwarderGetFlowInfo } from "@sfpro/sdk/hook" |
LLM Support
This documentation provides LLM-friendly text endpoints:
/llms.txt- All documentation pages in plain text/{page-slug}.mdx- Individual pages in plain text (e.g.,/getting-started.mdx)