Skip to content

vortr/sdk

Repository files navigation

Vortr SDK

ci @vortr/wallet @vortr/mcp license

Open-source packages behind Vortr — non-custodial DeFi swaps on Base for AI agents and developers. Vortr never holds your keys. Published to npm with provenance.

Try it (no install, no key)

node examples/quote.mjs WETH USDC 0.05    # live 0x quote + approve/swap calldata (ERC-5792)

A keyless live quote straight from the hosted connector — see examples/ for the script and the @vortr/wallet autonomous-signing example.

Packages

Package npm What it is
@vortr/wallet @vortr/wallet Local signer MCP. Holds an EOA key in VORTR_SIGNER_KEY (env, never chat), fetches keyless calldata from the Vortr connector, and signs + broadcasts Base swaps after a per-swap confirm. Autonomous end-to-end swaps for an agent.
@vortr/mcp @vortr/mcp Stdio connector MCP. Keyless swap tools (search tokens, 0x quotes, ERC-5792 approve+swap calldata). Your agent signs + sends the ERC-5792 payload with its own wallet (or run @vortr/wallet for autonomous signing).
@vortr/core (bundled) Shared library — Base token registry, 0x Swap API v2 adapter, ERC-5792 call builder, market data. Bundled into the packages above; not published on its own.

Quick start — autonomous swaps

// ~/.hermes/config.yaml (or any MCP host)
mcp_servers:
  vortr:
    command: "npx"
    args: ["-y", "@vortr/wallet"]
    env: { VORTR_SIGNER_KEY: "0x…" }   // a HOT wallet with a small balance
    connect_timeout: 60

Then: "swap $5 USDC to ETH" → the agent calls prepare_swap → shows you the summary → on your "yes"execute_swap. See packages/wallet/README.md.

For the keyless path, use @vortr/mcp or the hosted connector at https://www.vortragents.com/mcp.

Tools

@vortr/mcp (keyless connector) + the hosted MCP expose four read/build tools; Vortr never signs:

Tool What it does
search_tokens Resolve a symbol / name / address to a Base token (TokenInfo[]).
get_quote Live 0x quote — buyAmount, minBuyAmount, route, price impact. amount is BASE UNITS.
build_swap ERC-5792 wallet_sendCalls payload (approve + swap). Your agent signs + sends it with its own wallet.
get_portfolio The Base token set for an address.

@vortr/wallet (local signer) adds the autonomous flow on top:

Tool What it does
wallet_address The local signer's EOA address — use as the taker.
prepare_swap Quote + stage a swap → { confirm_token, summary } (summary.buy = expected, summary.buyMin = floor).
execute_swap Sign + broadcast a prepared swap on Base (per-swap confirm).
swap_status Poll a broadcast transaction hash.

Supported Base tokens

17 verified assets — every entry is CoinGecko-canonical with its on-chain symbol()/decimals() confirmed:

ETH · WETH · USDC · USDT · DAI · USDe · EURC · cbBTC · cbETH · wstETH · weETH · AERO · MORPHO · VIRTUAL · BRETT · DEGEN · cbADA

search_tokens resolves any of them by symbol, name, or address; the set grows as Base liquidity warrants.

Security

@vortr/wallet signs locally — the key never leaves your machine. Two files touch it; read them in 30 seconds → SECURITY.md. Releases are published from CI with npm provenance.

Develop

pnpm install
pnpm -r build
pnpm -r test

Supported chain: Base (8453). MIT licensed.

About

Open-source Vortr packages — non-custodial DeFi swaps on Base for AI agents (@vortr/wallet signer + @vortr/mcp connector)

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors