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

@fluidwallet/sdk

v1.0.0

Published

Fluid Smart Order Router SDK — scaffold a swap interface for the agent economy powered by FluidSOR on Base. MCP compatible. The next trillion agents need DeFi infrastructure.

Readme

fluid-sor

Smart Order Routing for autonomous agents on Base Mainnet — multi-venue, split-route, MEV-protected.

Base npm License: MIT Agent Economy

Contract: 0xF24daF8Fe15383fb438d48811E8c4b43749DafAE — Base Mainnet (Chain ID: 8453)
Paper: Ganji's DeFi SOR Protocol: Multi-Venue Smart Order Routing for Human and Agent-Native Crypto Swaps on Base
Authors: Abhijeeth Ganji (Maryville University), Priyanka Velpula (Ex-Wipro)


What's inside

| File | What it does | |------|-------------| | agent.js | Demo SOR agent — public quote → authenticated quote → live swap with BaseScan receipt | | .env.example | Environment variables template — copy to .env after CLI setup | | contracts/ | FluidSOR smart contract on Base Mainnet | | packages/ | @fluidwalletbase/wallet-endpoints — SDK for quotes and swaps | | bin/ | CLI scaffold for swap apps |


Quick start

npx @fluidwallet/sdk create my-swap-app

The CLI will interactively ask for:

  1. Fluid API key (fw_sor_...) — get it at fluidnative.com → Developer Console → API Keys
  2. Seed phrase (hidden input — never echoed, never written to disk) — your signing key is derived in-process (BIP-44 m/44'/60'/0'/0/0) and only the private key is saved to .env.local
# [1/5] Fluid API key setup
# ? Paste API key (fw_sor_...): fw_sor_

# [2/5] Derive signing key from seed phrase
# ? Seed phrase (hidden):  — input invisible
# ✓ Seed phrase received (12 words — input hidden)

# [3/5] Scaffolding my-swap-app…
# [4/5] Installing dependencies…
# [5/5] Deriving signing key and writing .env.local…
# ✓ API key written   fw_sor_48d688***
# ✓ Signing key derived   0x1ab42c... (seed phrase not stored)

my-swap-app
  npm run dev
  # → http://localhost:5173

After setup — run the demo agent

The CLI generates your FLUID_AGENT_KEY and exports it to ~/.zshrc. Once setup is complete:

# Copy environment template
cp .env.example .env
# (your FLUID_AGENT_KEY is already in the shell from the CLI)

# Run the SOR demo agent
node agent.js

The agent runs 4 steps automatically:

Step 1: Public SOR Quote    — no key needed, shows all ranked routes
Step 2: Authenticated Quote — uses your fk_... key (read scope)
Step 3: Balance Check       — verifies USDC balance before swapping
Step 4: Execute Swap        — live swap via Ganji SOR, prints BaseScan receipt

No funds? Steps 1 and 2 run without any balance. Fund your wallet with USDC on Base mainnet to run Step 4.


Keys

| Key | How you get it | Used for | |-----|---------------|----------| | FLUID_AGENT_KEY (fk_...) | Auto-generated by CLI → exported to ~/.zshrc | Authenticated quotes + swap execution | | None needed | Built-in, rate-limited | Public quotes via /api/sor/public-quote |

Scopes selected during CLI setup

| Scope | What it allows | |-------|---------------| | read | Price quotes, route discovery, gas estimates | | swap | Execute token swaps via the SOR contract on Base |


Endpoints

| Endpoint | Auth | Description | |----------|------|-------------| | GET /api/sor/public-quote | None | Ranked route quotes — 30 req/min, no key | | POST /v1/agents/quote-swap | read scope | Authenticated quote with higher rate limits | | POST /v1/agents/swap | swap scope | Execute swap via SOR on Base Mainnet | | POST /v1/agents/estimate-gas | read scope | Gas estimate for a swap |

Supported pairs: USDC/USDT · USDC/WETH · USDT/USDC · WETH/USDC


The SOR routing flow

agent calls  →  GET /api/sor/public-quote?tokenIn=USDC&tokenOut=USDT&amountIn=1000
                     ↓
Ganji SOR   →  GanjiRoute-BellmanFord scans 18+ venues
               |V|≈200, |E|≈1500, convergence <50ms
                     ↓
SOR returns →  ranked routes: Fluid AMM, Uniswap V3, Aerodrome, split routes
               { bestVenue: "Fluid AMM + Uniswap V3 (60/40)", bestAmountOut: "999.90" }
                     ↓
agent swaps →  POST /v1/agents/swap
               X-Agent-Key: fk_...   ← generated by CLI in step 4
               { fromToken: "USDC", toToken: "USDT", amount: "1000" }
                     ↓
SOR executes → on-chain via 0xF24daF8Fe15383fb438d48811E8c4b43749DafAE
               MEV-protected · Pauli Proof attached · VER score ≥ 0.998
               ↓
receipt     →  { txHash: "0x...", explorerUrl: "https://basescan.org/tx/0x..." }

Key metrics (from paper)

| Metric | Value | |--------|-------| | Route discovery (warm cache) | 47.5 ms | | End-to-end latency | ~280 ms | | Price improvement | +2.4 bps vs single venue | | REI score (stablecoin) | 0.9994 | | REI score (volatile) | 0.9982 | | VCS score | ~0.85 (18+ venues, 4 chains) | | BF convergence | <50 ms (|V|≈200, |E|≈1500) | | Agent throughput | 10²–10³ intents/min | | MEV protection | 88% detection, 95% prevention |


Research dataset

265,000-row simulation dataset validating all paper metrics across 10 CSV files.

📊 kaggle.com/code/abhijeethganji9/ganji-s-defi-sor-protocol


Related

| Repo / Package | Description | |----------------|-------------| | fluid-agent-demo | Full agent demo with FADP payment flow | | @fluidwalletbase/wallet-endpoints | SDK — quotes, swaps, balance | | @fluidwallet/fadp-cli | Setup CLI — keys, shell export, scaffold | | fluidnative.com | MVP — live SOR on Base Mainnet |


License

MIT — Fluid Wallet