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

basepay-agentkit

v0.1.0

Published

BasePay action provider for Coinbase AgentKit — gasless USDC transfers, batch pay, escrow, and subscriptions on Base Mainnet

Downloads

145

Readme

@basepay/agentkit

BasePay action provider for Coinbase AgentKit — gasless USDC transfers, batch payments, escrow, and on-chain subscriptions on Base Mainnet.

npm License: Apache-2.0


What it does

@basepay/agentkit gives any AgentKit-powered AI agent five USDC payment primitives on Base Mainnet:

| Action | Description | |--------|-------------| | basepay_send_usdc | Direct USDC transfer (agent pays ETH gas) | | basepay_send_usdc_gasless | EIP-3009 gasless transfer — relay pays gas, agent needs no ETH | | basepay_batch_pay_usdc | Pay up to 200 recipients in a single tx | | basepay_create_escrow | Time-lock USDC; payee claims after unlock period | | basepay_subscribe | On-chain recurring USDC payment at any interval |

All four contracts are verified on Basescan:

| Contract | Address | |----------|---------| | BatchPayV2 | 0xe40d…c68 | | EscrowV2 | 0x1eb2…499 | | SubscriptionManagerV2 | 0x1019…421 |


Installation

npm install @basepay/agentkit @coinbase/agentkit viem zod
# or
pnpm add @basepay/agentkit @coinbase/agentkit viem zod

Quick start

import { AgentKit } from "@coinbase/agentkit";
import { ViemWalletProvider } from "@coinbase/agentkit";
import { basePayActionProvider } from "@basepay/agentkit";
import { createWalletClient, http } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

// 1. Create a wallet client on Base Mainnet
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const client = createWalletClient({ account, chain: base, transport: http() });
const walletProvider = new ViemWalletProvider(client);

// 2. Create AgentKit with the BasePay action provider
const agentKit = await AgentKit.from({
  walletProvider,
  actionProviders: [
    basePayActionProvider(),          // use hosted BasePay relay
    // basePayActionProvider({ relayUrl: "https://your-relay.example.com" }),
  ],
});

// 3. Get actions and wire into your LLM framework
const tools = getLangChainTools(agentKit);

With LangChain

import { getLangChainTools } from "@coinbase/agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const tools = getLangChainTools(agentKit);
const llm = new ChatOpenAI({ model: "gpt-4o" });
const agent = createReactAgent({ llm, tools });

const result = await agent.invoke({
  messages: [
    { role: "user", content: "Send 5 USDC gaslessly to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" }
  ]
});

Actions in detail

basepay_send_usdc

Send USDC to any address. Agent wallet pays ETH gas.

{
  "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "amount": "10.5"
}

basepay_send_usdc_gasless

EIP-3009 gasless transfer via the BasePay relay. The agent signs a TransferWithAuthorization typed message — no ETH required.

{
  "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "amount": "5"
}

Requirement: wallet provider must support signTypedData (e.g. ViemWalletProvider, CdpEvmWalletProvider).

basepay_batch_pay_usdc

Pay multiple recipients atomically. Auto-approves USDC allowance if needed.

{
  "recipients": [
    { "address": "0xAlice…", "amount": "10" },
    { "address": "0xBob…",   "amount": "15.5" },
    { "address": "0xCarol…", "amount": "5" }
  ],
  "memo": "Q2 contributor payroll"
}

basepay_create_escrow

Lock USDC until a time-lock expires, then the payee can claim it.

{
  "payee": "0xContractor…",
  "amount": "500",
  "unlockAfterSeconds": 604800,
  "memo": "Website delivery milestone"
}

basepay_subscribe

Create a recurring on-chain charge. Anyone can call charge() once per interval.

{
  "payee": "0xServiceProvider…",
  "amount": "9.99",
  "intervalSeconds": 2592000,
  "memo": "Monthly API subscription"
}

Configuration

basePayActionProvider({
  relayUrl: "https://your-own-relay.example.com",  // default: BasePay hosted relay
})

Self-host the relay: the relay is open-source at github.com/osr21/basepay. It requires only a funded EOA (DEPLOYER_PRIVATE_KEY with ETH on Base).


Supported networks

  • Base Mainnet (chainId 8453) only

Links


License

Apache-2.0 — same as Coinbase AgentKit.