mcpField
B
Bankr x402 SDK - Transaction Builder

Bankr x402 SDK - Transaction Builder

github.com/bankrbotOther88361 installsUpdated 31w ago
Repository

About Bankr x402 SDK - Transaction Builder

A Bankr SDK guide for developers building blockchain transactions from prompts. It covers transfers, ETH wrapping, NFT operations, and cross-chain bridges, and describes metadata available for transaction verification.

Key features

  1. 01ERC20 and ETH transfers
  2. 02Wrap and unwrap ETH
  3. 03NFT transfer, purchase, and minting
  4. 04Cross-chain token bridges
  5. 05Transaction verification metadata

Use cases

  1. 01Build token or ETH transfer requests
  2. 02Prepare NFT transaction prompts
  3. 03Create cross-chain bridge requests
  4. 04Inspect transaction details for verification

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bankrbot/claude-plugins --skill bankr-x402-sdk---transaction-builder

After installing, type/bankr-x402-sdk---transaction-builderin Claude Code to confirm it loaded.

Details

From the project README

SDK Transaction Builder

Build blockchain transactions for transfers, NFTs, bridges, and DeFi operations.

Transaction Types

TypeDescriptionExample Prompt
transfer_erc20Send ERC20 tokens"Send 100 USDC to 0x..."
transfer_ethSend native ETH"Send 0.1 ETH to 0x..."
convert_eth_to_wethWrap ETH"Wrap 0.5 ETH"
convert_weth_to_ethUnwrap WETH"Unwrap 1 WETH"
transfer_nftSend NFT"Transfer my NFT #123 to 0x..."
buy_nftPurchase NFT"Buy the cheapest Pudgy Penguin"
mint_manifold_nftMint from Manifold"Mint from Manifold at 0x..."
mint_seadrop_nftMint from SeaDrop"Mint from SeaDrop at 0x..."
swapCrossChainBridge tokens"Bridge 100 USDC from Ethereum to Base"

Prompt Patterns

# Transfers
"Send 100 USDC to 0x742d35..."
"Transfer 0.5 ETH to vitalik.eth"
"Send 50 USDC to 0x123... on Base"

# ETH/WETH
"Wrap 0.5 ETH to WETH"
"Unwrap 1 WETH to ETH"

# NFTs
"Transfer my Pudgy Penguin #1234 to 0x..."
"Buy the cheapest Pudgy Penguin on OpenSea"
"Mint NFT from Manifold contract 0x..."

# Cross-Chain
"Bridge 100 USDC from Ethereum to Base"
"Move 0.5 ETH from Base to Ethereum"

Usage

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

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

// Transfer tokens
const result = await client.promptAndWait({
  prompt: "Send 100 USDC to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0",
});

if (result.status === "completed" && result.transactions) {
  const tx = result.transactions[0].metadata.transaction;
  await wallet.sendTransaction(tx);
}

Transaction Metadata

All transactions include metadata for verification:

const tx = result.transactions[0];
const meta = tx.metadata.__ORIGINAL_TX_DATA__;

console.log(`Chain: ${meta.chain}`);
console.log(`Amount: ${meta.inputTokenAmount} ${meta.inputTokenTicker}`);
console.log(`To: ${meta.receiver}`);
console.log(`Message: ${meta.humanReadableMessage}`);

Timing Guidelines

OperationTypical Time
ERC20/ETH transfer2-5s
Wrap/Unwrap2-5s
NFT transfer3-5s
NFT purchase5-10s
Cross-chain bridge10-30s

Related Skills

  • sdk-token-swaps: Token swap patterns and approval handling
  • sdk-capabilities: Full list of supported operations
  • sdk-wallet-operations: Client setup and configuration

Comments

Markdown supported