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

@mnm-ag/lp-agent-sdk

v1.0.0

Published

TypeScript SDK for LP Agent Toolkit - AI-native liquidity provision on Solana with MPC custody and Arcium privacy

Readme

solana-lp-agent-sdk

TypeScript SDK for LP Agent Toolkit - AI-native liquidity provision on Solana with MPC custody and Arcium privacy.

npm version

Features

  • 🏦 MPC Custody - Privy server wallets with threshold signing (no private keys)
  • 🔒 Arcium Privacy - Encrypt strategies to prevent frontrunning
  • 💧 Meteora DLMM - Concentrated liquidity in specific price bins
  • 🔄 Jupiter Swaps - Best-route token swaps
  • 🤖 AI-Native - Built for autonomous agents

Installation

npm install @mnm-ag/lp-agent-sdk
# or
yarn add @mnm-ag/lp-agent-sdk
# or
pnpm add @mnm-ag/lp-agent-sdk

Quick Start

import { LPAgent } from '@mnm-ag/lp-agent-sdk';

// Initialize the client
const agent = new LPAgent();

// Create an MPC wallet (no private keys!)
const wallet = await agent.createWallet();
console.log('Wallet address:', wallet.address);
console.log('Wallet ID:', wallet.walletId); // Save this!

// Fund your wallet by sending SOL to wallet.address

// Find SOL-USDC pools
const pools = await agent.scanPools('SOL', 'USDC');
console.log('Best pool:', pools[0].name, 'APY:', pools[0].apy);

// Add liquidity with concentrated strategy
const result = await agent.addLiquidity({
  poolAddress: pools[0].address,
  amount: 10, // SOL
  strategy: 'concentrated', // ±5 bins
});
console.log('Position:', result.positionAddress);
console.log('TX:', result.signature);

API Reference

Creating a Client

import { LPAgent, createLPAgent } from '@mnm-ag/lp-agent-sdk';

// Using class
const agent = new LPAgent();

// Using factory function
const agent = createLPAgent();

// With custom config
const agent = new LPAgent({
  baseUrl: 'https://lp-agent-api-production.up.railway.app',
  timeout: 30000,
  walletId: 'existing-wallet-id', // Auto-load wallet
});

Wallet Management

// Create new wallet
const wallet = await agent.createWallet();

// Load existing wallet
const wallet = await agent.loadWallet('your-wallet-id');

// Get current wallet info
const walletId = agent.getWalletId();
const address = agent.getWalletAddress();

// Transfer tokens
const result = await agent.transfer(
  'recipient-address',
  1.5, // amount
  'SOL' // token (default: SOL)
);

Pool Discovery

// Scan for pools
const pools = await agent.scanPools('SOL', 'USDC');

// Pool object structure
interface Pool {
  address: string;
  name: string;
  tokenA: string;
  tokenB: string;
  liquidity: string;  // "$5.14M"
  apy: string;        // "819.02%"
  binStep: number;
  currentPrice?: number;
}

Liquidity Provision

// Add liquidity - concentrated (±5 bins)
const result = await agent.addLiquidity({
  poolAddress: 'pool-address',
  amount: 10,
  strategy: 'concentrated',
});

// Add liquidity - wide (±20 bins)
const result = await agent.addLiquidity({
  poolAddress: 'pool-address',
  amount: 10,
  strategy: 'wide',
});

// Add liquidity - custom bin range
const result = await agent.addLiquidity({
  poolAddress: 'pool-address',
  amount: 10,
  strategy: 'custom',
  minBinId: -15,
  maxBinId: 10,
});

// Add liquidity with Arcium encryption
const result = await agent.addLiquidity({
  poolAddress: 'pool-address',
  amount: 10,
  strategy: 'concentrated',
  encrypt: true, // Enable privacy
});

// Withdraw position
const result = await agent.withdrawLiquidity(
  'position-address',
  'pool-address'
);

// Get all positions
const positions = await agent.getPositions();

Token Swaps

// Get quote
const quote = await agent.getSwapQuote('USDC', 'SOL', 100);
console.log('Output:', quote.outputAmount, 'SOL');
console.log('Price impact:', quote.priceImpact);

// Execute swap
const result = await agent.swap({
  inputToken: 'USDC',
  outputToken: 'SOL',
  amount: 100,
  slippageBps: 50, // 0.5% slippage
});

// Get supported tokens
const tokens = await agent.getSupportedTokens();

Encryption (Arcium)

// Encrypt strategy data
const encrypted = await agent.encrypt({
  strategy: 'concentrated',
  amount: 1000,
  binRange: { min: -5, max: 5 },
});

// Test encryption
const status = await agent.testEncryption();
console.log('Working:', status.working);

Health & Status

// Check API health
const health = await agent.health();
console.log(health.status); // "healthy"
console.log(health.components); // { api, privy, arcium, solana_rpc }

// Get skill file (for agents)
const skillMd = await agent.getSkillFile();

Error Handling

import { 
  LPAgent, 
  LPAgentError, 
  WalletNotLoadedError, 
  ApiError 
} from 'solana-lp-agent-sdk';

try {
  const result = await agent.addLiquidity({ ... });
} catch (error) {
  if (error instanceof WalletNotLoadedError) {
    console.error('Load a wallet first!');
  } else if (error instanceof ApiError) {
    console.error('API error:', error.message, error.statusCode);
  } else if (error instanceof LPAgentError) {
    console.error('SDK error:', error.message, error.code);
  }
}

TypeScript Types

All types are exported:

import type {
  LPAgentConfig,
  Wallet,
  Pool,
  Position,
  SwapQuote,
  LPResult,
  WithdrawResult,
  SwapResult,
  EncryptResult,
  LPStrategy,
  LPExecuteOptions,
  SwapOptions,
} from 'solana-lp-agent-sdk';

Security

MPC Custody (Privy)

  • Wallets use threshold signing - no single party holds the full private key
  • Agents never see raw private keys
  • Authorization handled by Privy's secure infrastructure

Arcium Privacy

  • Strategy parameters encrypted with x25519-aes256gcm
  • MEV bots can't see your intent before execution
  • Protects against frontrunning and sandwich attacks

Links

  • API: https://lp-agent-api-production.up.railway.app
  • Frontend: https://mnm-web-seven.vercel.app
  • GitHub: https://github.com/JoeStrangeQ/solana-lp-mpc-toolkit
  • Skill File: https://lp-agent-api-production.up.railway.app/skill.md

License

MIT


Built by MnM 🦐 for AI agents.