@everestan/protocolbanks-sdk
Agent execution, payments and invoicing for Protocol Banks.
npm install @everestan/protocolbanks-sdk
Agent API
One API key, one policy the server enforces (operations, per-call cap, daily
cap, coin allowlist). order executes through the account's Hyperliquid agent
wallet (trading-only rights); pay, swap and invoice return something the
agent signs itself — the platform holds no keys.
import { ProtocolBanks } from "@everestan/protocolbanks-sdk"
const pb = new ProtocolBanks({ apiKey: process.env.PB_KEY! })
const state = await pb.agent.state()
const order = await pb.agent.order({ coin: "BTC", side: "long", sizeUsd: 20 })
if (!order.ok) console.log(order.status, order.error)
await pb.agent.pay({ to: "0x…", amountUsd: 25, token: "USDC", chain: "base" })
await pb.agent.swap({ from: { symbol: "USDC", blockchain: "base" }, to: { symbol: "ETH", blockchain: "base" }, amount: "25", amountUsd: 25 })
const invoice = await pb.agent.invoice({ to: "0x…", amount: 25, description: "agent work" })
await pb.agent.invoiceStatus(invoice.invoice!.invoiceId, "sig-from-paymentLink")
Payments
pb.paymentLinks, pb.invoices, pb.checkout, pb.webhooks and
pb.embed() cover the payment surfaces. See the docs above for the contracts.
License
GPL-3.0-only.