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

vacuum-sdk

v1.0.2

Published

TypeScript SDK for Vacuum protocol — execution, vaults, strategies, DAO automation, and agents on Arbitrum

Downloads

234

Readme

vacuum-sdk

TypeScript SDK for the Vacuum protocol on Arbitrum: execution (swap), vaults (ERC-4626), strategy NFTs, DAO automation, and agent registry.

Features

  • Execution — Swap (exact-input single), quote, simulate, approve, gas estimation
  • Vaults — Deposit, withdraw, redeem, preview, vault info, user position
  • Strategies — Register, subscribe, cancel, marketplace list/buy, royalty claim
  • DAO — RiskGuard status, PolicyEngine rules, treasury exposure, buyback schedules
  • Agents — Register, stake, subscribe, claim revenue, metadata

Works in Node.js and browser. Built with ethers v6. Strict TypeScript, tree-shakable exports, custom error classes.

Installation

npm install vacuum-sdk ethers
# or
yarn add vacuum-sdk ethers

Peer dependency: ethers ^6.0.0.

Quick start

import { ArbiClient } from "vacuum-sdk";
import { JsonRpcProvider, Wallet } from "ethers";

const provider = new JsonRpcProvider("https://sepolia-rollup.arbitrum.io/rpc");
const wallet = new Wallet(process.env.PRIVATE_KEY!, provider);

const client = new ArbiClient({
  rpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
  chainId: 421614,
  signer: wallet,
});

// Read-only (no signer needed for these)
const vaultInfo = await client.vaults.getVaultInfo();
const quote = await client.execution.getQuote({
  exactInputSingle: {
    tokenIn: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", // WETH
    tokenOut: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4D", // USDC
    fee: 500,
    recipient: wallet.address,
    amountIn: BigInt(1e15), // 0.001 ETH
    amountOutMinimum: 0n,
  },
  beneficiary: wallet.address,
});

// With signer: swap
const { txHash } = await client.execution.swapExactInputSingleWithSlippage({
  exactInputSingle: { ... },
  deadline: BigInt(Math.floor(Date.now() / 1000) + 1200),
  beneficiary: wallet.address,
  slippageBps: 50,
});

Configuration

| Option | Type | Description | |-----------|--------|--------------------------------------| | rpcUrl | string | RPC endpoint (required) | | chainId | number | Chain ID (e.g. 421614, 42161) | | signer | Signer | Optional; required for write calls | | addresses | object | Optional overrides for contract addresses |

Default addresses are for Arbitrum Sepolia. Override addresses for other networks or custom deployments.

Modules

  • client.executionswapExactInputSingle, getQuote, simulateSwap, approveToken, estimateSwapGas
  • client.vaultsdeposit, withdraw, redeem, previewDeposit, previewWithdraw, getVaultInfo, getUserPosition
  • client.strategiesregisterStrategy, subscribe, cancelSubscription, getSubscriptionStatus, listMarketplace, buyStrategy, claimRoyalty
  • client.daogetPolicyStatus, canExecute, createRule, triggerRule, getRule, getTreasuryExposure, getBuybackSchedules
  • client.agentsregisterAgent, stakeAgent, subscribeToAgent, claimAgentRevenue, getAgentMetadata, getAgentPerformance

See API.md for full method signatures, parameters, and return types.

Error handling

The SDK throws typed errors:

  • VacuumError — base
  • ContractError — revert or contract failure (includes txHash when available)
  • SignerError — operation requires a signer
  • ValidationError — invalid parameter or field
  • SimulationError — staticCall / simulation failed
  • PolicyError — RiskGuard or policy blocked execution
try {
  await client.execution.swapExactInputSingle(params);
} catch (e) {
  if (e instanceof SignerError) {
    console.error("Connect a wallet");
  } else if (e instanceof ContractError) {
    console.error("Tx failed:", e.txHash);
  }
}

Security notes

  • Never commit private keys. Use env vars or a secure signer provider.
  • For swaps, always use a deadline and minimum amount out (or slippage helper).
  • Check RiskGuard / policy status before submitting DAO or automated actions.
  • Simulate (e.g. simulateSwap) before sending transactions when possible.

License

MIT