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

@barzkit/sdk

v0.2.1

Published

Self-custody AI agent wallets with passkeys, gasless transactions & programmable permissions (ERC-4337)

Readme


Deploy an autonomous, audited smart account for your AI agent in 5 minutes. Powered by Trust Wallet's Barz (ERC-4337), with passkeys, gasless transactions, and programmable permissions via Diamond Proxy (EIP-2535).

Why BarzKit?

AI agents need wallets. Existing solutions are either custodial (Coinbase Agentic Wallets) or too low-level (Safe, raw ERC-4337). BarzKit fills the gap:

| | Coinbase | Safe | BarzKit | |---|---------|------|-------------| | Self-custody | ❌ Custodial | ✅ | ✅ | | Agent-specific DX | ✅ | ❌ | ✅ | | Passkeys | ❌ | ❌ | ✅ | | Gasless | Base only | ❌ | ✅ Any chain | | Time to deploy | 2 min | Hours | 5 min | | Audits | Coinbase | Multiple | Certik + Halborn |

Quickstart

npm install @barzkit/sdk
import { createBarzAgent } from '@barzkit/sdk'
import { parseEther } from 'viem'

const agent = await createBarzAgent({
  chain: 'sepolia',
  owner: '0xYOUR_PRIVATE_KEY',
  pimlico: { apiKey: 'pim_YOUR_KEY' },
  permissions: {
    maxDailySpend: '100 USDC',
    allowedContracts: ['0xUniswapRouter...'],
  },
})

console.log('Address:', agent.address)

// Gasless transaction
const tx = await agent.sendTransaction({
  to: '0xRecipient...',
  value: parseEther('0.01'),
})

// Emergency: freeze the agent
await agent.freeze()

Features

Self-Custody — Keys never leave your infrastructure. Built on Trust Wallet's Barz, audited by Certik and Halborn.

Gasless Transactions — Agents don't need ETH for gas. Paymaster covers fees. Enabled by default.

Programmable Permissions — Spending limits, contract whitelists, time windows. Powered by Diamond Proxy facets.

Passkey Owner Control — Human owner controls via FaceID/TouchID. Agent operates with a separate program key. Agent cannot change its own permissions.

Kill Switch — Freeze the agent wallet instantly via Guardian Facet.

DeFi Actions — Swap tokens (Uniswap V3) and lend (Aave V3) with atomic approve+execute batches.

x402 Payments — Machine-to-machine HTTP payments. Auto-pay 402 responses, retry with proof. fetchWithPayment().

Multi-Chain — Sepolia, Base Sepolia, Base mainnet. Add a new chain in 5 lines.

24/7 Security Monitoring — Trust Wallet monitors every Barz account deployed via SDK. Free.

Plugins

Use BarzKit with your AI framework of choice:

| Plugin | Install | Description | |--------|---------|-------------| | @barzkit/elizaos | npm i @barzkit/elizaos | ElizaOS plugin — 8 actions, wallet provider, service | | @barzkit/langchain | npm i @barzkit/langchain | LangChain tools — 8 StructuredTools with zod schemas | | @barzkit/mcp | npx @barzkit/mcp | MCP server — 9 tools for Claude Desktop, Cursor, Windsurf |

API

// Create
const agent = await createBarzAgent(config)

// Transactions
await agent.sendTransaction({ to, value, data })
await agent.batchTransactions([tx1, tx2, tx3])
await agent.getBalance()          // ETH
await agent.getBalance(usdcAddr)  // ERC-20
await agent.waitForTransaction(hash)

// Permissions
agent.getPermissions()
agent.updatePermissions({ maxDailySpend: '200 USDC' })

// Safety
await agent.freeze()
await agent.unfreeze()
await agent.isActive()

Configuration

interface AgentConfig {
  chain: 'sepolia' | 'base-sepolia' | 'base'
  owner: `0x${string}`
  pimlico: { apiKey: string }

  // Optional
  permissions?: {
    maxAmountPerTx?: string       // '100 USDC'
    maxDailySpend?: string        // '500 USDC'
    allowedTokens?: Address[]
    allowedContracts?: Address[]
    timeWindow?: { start: string; end: string }
  }
  gasless?: boolean  // default: true
  index?: bigint     // multiple wallets per owner
}

Architecture

Your AI Agent
      │
  @barzkit/sdk
      │
  permissionless.js (Pimlico)
      │
      ├── Bundler → UserOperation batching
      └── Paymaster → gasless transactions
            │
  Barz Smart Account (on-chain)
      ├── Diamond Proxy (EIP-2535) — modular facets
      ├── Passkeys (Secp256r1) — owner biometric control
      ├── Restrictions — spending limits, whitelists
      ├── Guardian — kill switch
      └── Trust Wallet 24/7 monitoring

Prerequisites

Examples

See examples for complete working examples.

Security

  • Smart contracts audited by Certik and Halborn
  • Dual key model: Owner (passkey) + Agent (program key)
  • Agent cannot escalate its own permissions
  • Trust Wallet ISO-certified security monitoring
  • Open source: trustwallet/barz (Apache-2.0)

Roadmap

  • [x] Core SDK: createWallet, sendTransaction, permissions, freeze
  • [x] Batch transactions: atomic multi-call in one UserOperation
  • [x] Multi-chain: Base Sepolia, Base mainnet
  • [x] DeFi actions: swap, lend (Uniswap, Aave)
  • [x] x402 payment handler
  • [x] ElizaOS plugin
  • [x] LangChain tool
  • [x] MCP Server (Claude Desktop, Cursor, Windsurf)
  • [ ] On-chain permission enforcement via Diamond Facets

Contributing

Contributions welcome. See CONTRIBUTING.md.

License

MIT


Documentation · Examples · Plugins · Trust Wallet Barz · Pimlico Docs