@alephium/powfi-sdk). It wraps the Powfi smart contracts on Alephium (CPMM pools, CLMM pools, and xALPH staking), computes quotes locally, and builds and signs transactions through any @alephium/web3 signer.
Who this chapter is for
- Wallet and frontend developers who want to quote and execute swaps, show pool data, or let users provide liquidity.
- Backend and bot developers running market-making, arbitrage, or treasury automation against Powfi pools.
- Aggregators and integrators routing flow through Powfi, optionally charging an integrator fee.
Want to run something first? The Quickstart reads a live CPMM pool on testnet and quotes a swap in about 20 lines, with no signer needed.
Pick your integration path
If you’re not sure: start with the module facade (
powfi.cpmm, powfi.clmm, powfi.staking). Drop down to the raw contract bindings only when you need a method the SDK doesn’t wrap.
Protocol building blocks
CPMM
Constant-product (x·y=k) pools with a 0.3% swap fee and fungible LP tokens.
CLMM
Concentrated-liquidity (Uniswap V3-style) pools with fee tiers, tick ranges, and farming rewards.
Staking
Stake ALPH for liquid xALPH, and unstake as it unlocks over time.
Token list
Cached token metadata (symbol, decimals, logo) from the Alephium token list.
Where to go next
Quickstart
Install, load, quote, swap.
TypeScript SDK
Initialization, module facades, transaction results, pitfalls.
Guides
End-to-end recipes for common tasks.
Versioning. Every code sample in this section targets
@alephium/powfi-sdk@1.0.2 (@alephium/web3@3.0.3). When the SDK changes, pages are re-verified and this banner is updated. If a sample fails on a newer version, check the changelog on GitHub first.