bankr-x402-sdk---transaction-builder by bankrbot/claude-plugins
npx skills add https://github.com/bankrbot/claude-plugins --skill 'Bankr x402 SDK - Transaction Builder'为代币转账、NFT、跨链桥接和 DeFi 操作构建区块链交易。
| 类型 | 描述 | 示例提示 |
|---|---|---|
transfer_erc20 | 发送 ERC20 代币 | "Send 100 USDC to 0x..." |
transfer_eth | 发送原生 ETH | "Send 0.1 ETH to 0x..." |
convert_eth_to_weth | 封装 ETH | "Wrap 0.5 ETH" |
convert_weth_to_eth | 解封 WETH | "Unwrap 1 WETH" |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
transfer_nft | 发送 NFT | "Transfer my NFT #123 to 0x..." |
buy_nft | 购买 NFT | "Buy the cheapest Pudgy Penguin" |
mint_manifold_nft | 从 Manifold 铸造 | "Mint from Manifold at 0x..." |
mint_seadrop_nft | 从 SeaDrop 铸造 | "Mint from SeaDrop at 0x..." |
swapCrossChain | 跨链桥接代币 | "Bridge 100 USDC from Ethereum to Base" |
# 转账
"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..."
# 跨链
"Bridge 100 USDC from Ethereum to Base"
"Move 0.5 ETH from Base to Ethereum"
import { BankrClient } from "@bankr/sdk";
const client = new BankrClient({
privateKey: process.env.BANKR_PRIVATE_KEY as `0x${string}`,
});
// 转账代币
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);
}
所有交易都包含用于验证的元数据:
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}`);
| 操作 | 典型耗时 |
|---|---|
| ERC20/ETH 转账 | 2-5s |
| 封装/解封 | 2-5s |
| NFT 转账 | 3-5s |
| NFT 购买 | 5-10s |
| 跨链桥接 | 10-30s |
每周安装量
0
代码仓库
GitHub 星标数
70
首次出现
1970年1月1日
Build blockchain transactions for transfers, NFTs, bridges, and DeFi operations.
| Type | Description | Example Prompt |
|---|---|---|
transfer_erc20 | Send ERC20 tokens | "Send 100 USDC to 0x..." |
transfer_eth | Send native ETH | "Send 0.1 ETH to 0x..." |
convert_eth_to_weth | Wrap ETH | "Wrap 0.5 ETH" |
convert_weth_to_eth | Unwrap WETH | "Unwrap 1 WETH" |
transfer_nft | Send NFT | "Transfer my NFT #123 to 0x..." |
buy_nft | Purchase NFT | "Buy the cheapest Pudgy Penguin" |
mint_manifold_nft | Mint from Manifold | "Mint from Manifold at 0x..." |
mint_seadrop_nft | Mint from SeaDrop | "Mint from SeaDrop at 0x..." |
swapCrossChain | Bridge tokens | "Bridge 100 USDC from Ethereum to Base" |
# 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"
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);
}
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}`);
| Operation | Typical Time |
|---|---|
| ERC20/ETH transfer | 2-5s |
| Wrap/Unwrap | 2-5s |
| NFT transfer | 3-5s |
| NFT purchase | 5-10s |
| Cross-chain bridge | 10-30s |
Weekly Installs
0
Repository
GitHub Stars
70
First Seen
Jan 1, 1970
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装