@sfpro/sdk

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
LightweightZero runtime dependencies in the core; only peer-install what your code path needs.
Type-safeFully-typed ABIs and actions for autocompletion and compile-time checks.
Tree-shakeableEach export (./abi, ./action, ./hook, ./util) is side-effect-free and independent.
wagmi / viem poweredUses 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-onlyModern 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 utilities

Remember: 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/sdkimport { cfaForwarderAbi } from "@sfpro/sdk/abi"
Actions@sfpro/sdk + viem or @wagmi/coreimport { readCfaForwarderGetFlowInfo } from "@sfpro/sdk/action"
React hooks@sfpro/sdk + wagmiimport { 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)