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

@lombard.finance/sdk-agent

v0.2.0

Published

Framework-agnostic AI agent tool definitions for the Lombard protocol

Readme

@lombard.finance/sdk-agent

AI agent tools for the Lombard protocol. Give any LLM the ability to stake Bitcoin, check balances, deploy to DeFi vaults, and interact with Morpho Blue lending markets.

Framework-agnostic core with ready-made adapters for Vercel AI SDK and LangChain.

Installation

npm install @lombard.finance/sdk-agent
# or
yarn add @lombard.finance/sdk-agent

Peer Dependencies

viem is required. Framework adapters are optional, install whichever you use:

# Required
npm install viem

# For Vercel AI SDK
npm install ai

# For LangChain
npm install @langchain/core

Quick Start

Vercel AI SDK

import { lombardTools } from "@lombard.finance/sdk-agent/vercel";
import { LOMBARD_SYSTEM_PROMPT } from "@lombard.finance/sdk-agent";
import { streamText } from "ai";

const result = streamText({
  model: yourModel,
  system: LOMBARD_SYSTEM_PROMPT,
  tools: lombardTools,
  messages,
});

LangChain

import { lombardLangChainTools } from "@lombard.finance/sdk-agent/langchain";
import { LOMBARD_SYSTEM_PROMPT } from "@lombard.finance/sdk-agent";

const agent = createReactAgent({
  llm: yourModel,
  tools: lombardLangChainTools,
  messageModifier: LOMBARD_SYSTEM_PROMPT,
});

Framework-Agnostic

import { allTools, toolsByName } from "@lombard.finance/sdk-agent";

// allTools: array of all tool definitions
// toolsByName: record keyed by tool name

// Each tool has:
// - name, description (for LLM context)
// - schema (Zod) and parameters (JSON Schema)
// - execute(params) -> Promise<result>

Available Tools

Balances and Rates

| Tool | Description | | ---- | ----------- | | get_lbtc_balance | Check LBTC balance for a wallet on any supported chain | | get_btcb_balance | Check BTC.b (cross-chain Bitcoin) balance | | get_balance | Get both LBTC and BTC.b balances in a single call | | get_token_balance | Check any ERC-20 token balance by contract address | | get_exchange_rate | Current LBTC/BTC exchange rate and minimum stake amount | | get_lbtc_apy | Current LBTC base staking APY |

BTC Staking (Native Bitcoin)

| Tool | Description | | ---- | ----------- | | get_deposit_btc_address | Get a BTC deposit address for staking, or instructions to generate one | | check_fee_authorization | Check fee authorization status before address generation | | prepare_btc_to_lbtc_deposit | Generate a new BTC deposit address (triggers wallet signing) | | get_deposit_status | Track deposit confirmations and claimability | | prepare_claim_lbtc_deposit | Claim a notarized deposit to mint LBTC |

Asset conversions (EVM)

| Tool | Description | | ---- | ----------- | | prepare_btcb_to_lbtc_stake | Stake BTC.b to receive LBTC on the same chain | | prepare_lbtc_to_btc | Cross-chain LBTC redemption to native Bitcoin (requires Bitcoin recipient) | | prepare_lbtc_to_btcb | Same-chain LBTC redemption to BTC.b (no Bitcoin recipient needed) | | prepare_redeem_btcb | BTC.b to native Bitcoin redemption (requires Bitcoin recipient) | | get_redemption_status | Track in-flight LBTC unstakes and BTC.b redemptions |

Bitcoin Earn

| Tool | Description | | ---- | ----------- | | get_earn_strategies | List available yield strategies with APY and TVL | | get_lbtc_defi_opportunities | Browse LBTC DeFi opportunities across protocols | | get_earn_positions | Check Bitcoin Earn positions (shares and LBTC value) | | get_earn_withdrawals | All Bitcoin Earn withdrawals (open, fulfilled, cancelled, expired) | | prepare_earn_deposit | Deposit LBTC into Bitcoin Earn for additional yield | | prepare_earn_withdrawal | Request a Bitcoin Earn withdrawal (one active per user per vault) | | prepare_cancel_earn_withdrawal | Cancel an active Bitcoin Earn withdrawal |

Portfolio and rewards

| Tool | Description | | ---- | ----------- | | get_lux_points | Current-season Lux reward points (holding, protocol, referral, badge) | | get_positions_summary | Aggregated portfolio summary (total BTC value, PnL, holdings and DeFi breakdown) |

Morpho Blue (Lending and Borrowing)

| Tool | Description | | ---- | ----------- | | get_morpho_lbtc_markets | List Morpho Blue markets where LBTC is collateral | | prepare_morpho_supply_collateral | Supply LBTC as collateral on Morpho Blue | | prepare_morpho_borrow | Borrow against LBTC collateral | | prepare_morpho_repay | Repay borrowed assets | | get_morpho_position | Check collateral, borrows, LTV, and health status |

System Prompt

The package includes LOMBARD_SYSTEM_PROMPT, a curated prompt that teaches any LLM how to guide users through:

  • Native BTC staking (deposit, confirm, claim LBTC)
  • BTC.b to LBTC staking on EVM chains
  • Yield strategies and Bitcoin Earn deployment
  • Morpho Blue collateral supply and borrowing
  • Error handling and common edge cases

Use it as-is or extend it with your own context:

import { LOMBARD_SYSTEM_PROMPT } from "@lombard.finance/sdk-agent";

const customPrompt = `${LOMBARD_SYSTEM_PROMPT}\n\nAdditional context: ...`;

Supported Chains

| Chain | Chain ID | Environment | | ----- | -------- | ----------- | | Ethereum | 1 | Production | | Base | 8453 | Production | | Sepolia | 11155111 | Testnet | | Base Sepolia | 84532 | Testnet |

Architecture

Tools follow a read vs. write pattern:

  • Read tools execute immediately and return current state (balances, rates, statuses, market data)
  • Write tools return transaction parameters for the user's wallet to sign (no private keys needed)

Every tool definition includes both a Zod schema (for TypeScript and frameworks that accept Zod) and a JSON Schema (for everything else):

import {
  StakeZod,           // Zod schema
  StakeSchema,        // JSON Schema equivalent
} from "@lombard.finance/sdk-agent";

Configuration

| Variable | Default | Description | | -------- | ------- | ----------- | | LOMBARD_PARTNER_ID | lombardtest1 | Mainnet Partner ID for BTC deposit address generation. The default is a non-revenue test partner, set this explicitly for production traffic. | | LOMBARD_TESTNET_PARTNER_ID | test1 | Testnet Partner ID. Mainnet and testnet partner registries are separate. | | LOMBARD_BFF_URL | https://bff.prod.lombard-fi.com | Backend API URL |

Requirements

  • Node.js: 18+
  • TypeScript: 5.0+
  • viem: 2.21+

License

MIT