Help us improve
Share bugs, ideas, or general feedback.
From bankr-x402-sdk-dev
Configures Bankr x402 SDK client with payment and receiving wallets, private keys, environment variables, and two-wallet setup for micropayments and token handling.
npx claudepluginhub bankrbot/claude-plugins --plugin bankr-x402-sdk-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/bankr-x402-sdk-dev:sdk-wallet-operationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Initialize and configure the BankrClient with proper wallet setup.
Provides reusable TypeScript bankr-client.ts, viem-based executor.ts, and config files for Bankr x402 SDK projects with USDC micropayments on Base.
Provides reusable TypeScript client code, JobStatus types, transaction interfaces for swaps, approvals, ERC20/NFT transfers, and common files like package.json/tsconfig for Bankr API integrations.
Resolves Bankr API errors including 401 authentication, invalid API keys, job failures, and rate limits with setup instructions, troubleshooting checklists, and resolution tables.
Share bugs, ideas, or general feedback.
Initialize and configure the BankrClient with proper wallet setup.
| Wallet | Purpose | Required |
|---|---|---|
Payment (privateKey) | Signs x402 micropayments ($0.01/request) | Yes |
Context (walletAddress) | Receives swapped tokens, NFTs | No (defaults to payment wallet) |
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 balances?",
});
For enhanced security, use different wallets for payments and receiving:
const client = new BankrClient({
// Hot wallet with minimal USDC for payments
privateKey: process.env.PAYMENT_WALLET_PK as `0x${string}`,
// Cold/trading wallet receives tokens
walletAddress: process.env.RECEIVING_WALLET,
});
| Option | Type | Required | Description |
|---|---|---|---|
privateKey | 0x${string} | Yes | Payment wallet private key |
walletAddress | string | No | Override receiving wallet |
baseUrl | string | No | API endpoint (default: production) |
timeout | number | No | Request timeout ms (default: 600000) |
| Method | Description |
|---|---|
promptAndWait() | Submit prompt and wait for result |
prompt() | Submit prompt, return immediately |
pollJob() | Poll until job completes |
getJobStatus() | Check job status once |
cancelJob() | Cancel pending/processing job |
getWalletAddress() | Get context wallet address |
// Override wallet for a single request
const result = await client.promptAndWait({
prompt: "Swap 0.1 ETH to USDC",
walletAddress: "0xDifferentWallet...",
});
# Required
BANKR_PRIVATE_KEY=0x...your_payment_wallet_key...
# Optional
BANKR_WALLET_ADDRESS=0x...your_receiving_wallet...