New advertisers: 50% off your first month with code FIRSTMONTHSee slots
BankrBot avatar

bankr-x402-sdk-dev

Claude Code plugin that adds Bankr SDK guidance for multi-chain DeFi and x402 micropayment projects.

GitHub stars
88

What it does

  • Adds the scaffold command, a sdk-assistant agent, and eight skills covering wallets, swaps, balances, transactions, jobs, and x402 templates
  • Covers token swaps with 0x routing, balance and portfolio queries, 13 transaction types, and NFT operations across Base, Polygon, and Ethereum
  • Enforces an ERC20 rule: approve the allowanceTarget before executing a 0x swap, and fund the payment wallet with USDC on Base
  • Designed for developers building bots, web services, dashboards, or CLIs on top of @bankr/sdk who want AI-assisted scaffolding

Bankr SDK integration for AI-assisted Web3 development with multi-chain DeFi and x402 micropayments

Add marketplace

/plugin marketplace add BankrBot/claude-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install bankr-x402-sdk-dev@bankr-claude-plugins

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

SDK Balance Queries

Query multi-chain token balances and portfolio data using natural language prompts.

Operations

OperationExample PromptNotes
Single token balance"How much USDC do I have?"Fastest query type
Multi-token balance"Show my ETH, USDC, and DEGEN balances"Single chain
All tokens on chain"What tokens do I have on Base?"Lists all holdings
Multi-chain balances"Show my balances across all chains"Slower, queries all
Portfolio value"What's my total portfolio value in USD?"USD conversion
Token value"How much is my DEGEN worth?"Single token USD
NFT holdings"Show me my NFT collections"Lists collections
NFT floor prices"What's the floor price of my NFTs?"External API calls

Prompt Patterns

# Token Balances
"What are my token balances?"
"How much [TOKEN] do I have?"
"Show my [TOKEN] balance on [CHAIN]"
"What's my balance of token 0x..."

# Multi-Chain
"Show my balances across all chains"
"What are my balances on Base and Ethereum?"
"Compare my USDC holdings across all chains"

# Portfolio Value
"What's my total portfolio value in USD?"
"How much is my [TOKEN] worth in USD?"
"What's the total value of my Base holdings?"

# NFTs
"Show me my NFT collections"
"How many Pudgy Penguins do I own?"
"What's the floor price of my NFTs?"

Usage

import { BankrClient } from "@bankr/sdk";

const client = new BankrClient({
  privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,
});

const result = await client.promptAndWait({
  prompt: "What are my token balances on Base?",
});

console.log(result.response);
// "You have 150.5 USDC, 0.25 ETH, 1000 DEGEN on Base..."

Supported Chains

ChainNotes
BaseDefault chain, fastest responses
EthereumMainnet ERC20 and NFTs
PolygonL2 tokens and NFTs
SolanaSPL tokens and NFTs

Specify chain in prompt: "on Base", "on Ethereum", "on Polygon", "on Solana"

Related Skills

  • sdk-wallet-operations: Client setup and configuration
  • sdk-capabilities: Full list of supported operations

Readme

x402-sdk-dev Plugin

Claude Code integration for @bankr/sdk - AI-assisted Web3 development with multi-chain DeFi.

Features

  • Multi-Chain: Base, Polygon, Ethereum (EVM chains)
  • Token Trading: Swaps, buys, and cross-chain bridges with 0x routing
  • Leveraged Trading: Avantis commodities, forex, and crypto with up to 150x leverage
  • NFT Operations: Buy, discover listings, view holdings
  • Market Data: Prices, analysis, trending tokens, portfolio balances
  • x402 Payments: $0.01 USDC per request (Base network)
  • 13 Transaction Types: Swaps, transfers, approvals, NFT ops, bridges, staking

Note: Solana and Polymarket are not supported via the SDK (wallet mode limitations).

Quick Start

1. Install Plugin

Claude Code:

claude plugin marketplace add BankrBot/claude-plugins
claude plugin install bankr-x402-sdk-dev@bankr-claude-plugins

Other Coding Tools (Cursor, OpenCode, Gemini CLI, Antigravity, etc.):

Only skills are compatible with other platforms. Agents, commands, hooks, and MCP servers require Claude Code.

bunx skills add BankrBot/claude-plugins

2. Install SDK

bun add @bankr/sdk
# or
npm install @bankr/sdk

3. Configure Environment

export BANKR_PRIVATE_KEY=0x...  # Required: pays $0.01 USDC per request (needs USDC on Base)
export BANKR_WALLET_ADDRESS=0x... # Optional: receives swapped tokens
export BANKR_API_URL=https://api.bankr.bot  # Optional

Skills

SkillDescription
sdk-capabilitiesFull guide to all supported operations and prompts
sdk-wallet-operationsClient init, wallet config, address derivation
sdk-token-swapsMulti-chain swaps with 0x routing
sdk-balance-queriesToken balances, portfolio values
sdk-transaction-builderTransfers, approvals, NFTs, DeFi
sdk-job-managementAsync job control and monitoring
x402-project-templatesDirectory structures for bot, web-service, dashboard, cli projects
x402-client-patternsReusable client code, executor, and common project files

Agent

sdk-assistant - Bankr SDK development assistant. Routes to appropriate skills based on user needs.

Commands

CommandDescription
/bankr-x402-sdk-dev:scaffold [type]Scaffold a complete project using the Bankr x402 SDK

Project types: bot, web-service, dashboard, cli

Quick start:

/bankr-x402-sdk-dev:scaffold bot

This creates a complete project with bankr-client.ts, transaction executor, package.json, tsconfig.json, and environment configuration.

Basic Usage

import { BankrClient } from "@bankr/sdk";

const client = new BankrClient({
  privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,
  walletAddress: process.env.BANKR_WALLET_ADDRESS,
});

// Token swap
const swap = await client.promptAndWait({
  prompt: "Swap 0.1 ETH to USDC on Base",
});

// Balance query
const balances = await client.promptAndWait({
  prompt: "What are my token balances?",
});

// Execute returned transaction with your wallet (viem/ethers)
const tx = swap.transactions?.[0].metadata.transaction;

Critical: 0x Swap Approval

For ERC20 swaps, you must approve the allowanceTarget before executing:

const result = await client.promptAndWait({ prompt: "Swap 100 USDC to WETH" });
const swapTx = result.transactions?.find(tx => tx.type === "swap");

if (swapTx?.metadata.allowanceTarget) {
  // 1. Approve allowanceTarget to spend your tokens
  // 2. Then execute swapTx.metadata.transaction
}

See 0x AllowanceHolder docs.

Transaction Types

swap | approval | transfer_erc20 | transfer_eth | convert_eth_to_weth | convert_weth_to_eth | transfer_nft | mint_manifold_nft | mint_seadrop_nft | buy_nft | avantisTrade | swapCrossChain | manage_bankr_staking

Two-Wallet System

  • Payment Wallet (privateKey): Pays $0.01 USDC per request. Must have USDC on Base.
  • Context Wallet (walletAddress): Receives swapped tokens. Can be different from payment wallet.

Troubleshooting

ErrorSolution
"Payment required"Add USDC to payment wallet on Base
"Invalid wallet address"Check 0x-prefixed address format
Transaction failsApprove allowanceTarget for ERC20 swaps
TimeoutIncrease timeout or use manual polling

Links

SDK Package | Bankr | Docs | Discord | x402 Protocol

Details

Marketplace
BankrBot/claude-plugins
Source
x402-sdk-dev
Author
Bankr
Category
Development
Listed since
Apr 7, 2026

More from BankrBot/claude-plugins

All 3

Similar to bankr-x402-sdk-dev

More Web3 & Crypto