Gloam SDK
Private payments, as a package
One import gives your app or agent private balances, private payments and proofs on Robinhood Chain and Tempo. Real proofs, checked on-chain, with no proving stack to build.
Install the SDK
Or start from a working app
Quickstart
Three calls to a private payment
Add money privately, pay from that balance, then hand the payment to the relay. You sign everything yourself. The SDK never holds a key.
- Add money privatelybuildShieldBoundIntent
- Pay privatelybuildPrivateSendIntent
- Send through the relayrelayIntent
import {
buildShieldBoundIntent,
buildPrivateSendIntent,
relayIntent,
artifactProver,
syncTree,
SEALED_VAULT,
} from "@gloamtrade/sdk";
// 1. Add money privately. Sign deposit.exec from your own wallet.
// Keep deposit.note.secret: it is the only key to this balance.
const deposit = await buildShieldBoundIntent({
amountWei: parseEther("0.01"),
prover: artifactProver({ wasm: "shield.wasm", zkey: "shield_final.zkey" }),
});
// 2. Pay privately from that balance. The rest comes back as change.
const tree = await syncTree(publicClient, { pool: SEALED_VAULT });
const send = await buildPrivateSendIntent({
secretHex: deposit.note.secret,
amountInWei: parseEther("0.01"),
amountPayWei: parseEther("0.004"),
path: await tree.pathForCommitment(deposit.note.commitment),
prove: artifactProver({ wasm: "transfer.wasm", zkey: "transfer_final.zkey" }),
});
// 3. Send it through the relay. Your wallet never shows up.
const hash = await relayIntent(send);Everything a private app needs, in one import
The same core that runs the Gloam app. Pure TypeScript that works in the browser and on a server, with the prover passed in so you choose where proofs are made.
Private balances
Move ETH or stablecoins into a balance only the holder can see or spend.
Private payments
Pay inside the vault to a Gloam address. No public transfer, no visible amount.
Cash out
Move money back to any public wallet, whenever the holder wants it public.
Relay
Sends and cash outs go out through the relay, so the sender's wallet never shows up. It can submit or refuse, never redirect.
Prove
Share one fact with one party, a payment with its issuer or a balance with an auditor, and nothing else.
Two chains, one core
The same circuits and the same calls on Robinhood Chain and Tempo. Pick a pool, keep the code.
For agents
Agents pay without showing their treasury
Agents pay for tools and data over HTTP 402. With Gloam the agent settles each payment privately from its own balance, then shows the payment as proof. Only the payer and the payee learn the amount, and no operator ever holds the agent's key or money.
- Add money to the agent's private balancegloam_execute_shield
- Fetch a URL and pay its 402 privately, in one callgloam_fetch_paid
- Price a tool or a dataset with a 402gloam_payment_requirements
- Check a payment and sweep it before servinggloam_verify_payment
- The agent's balances, as handles, never secretsgloam_list_notes
- What it spent today and what is leftgloam_get_spending_report
Research agent
Pays per call, privately
- GET
mcp://tool/summarize
Agent asks
- 402
Payment required
Tool answers
- 0.25 USD
Paid privately
From the agent's own balance
- 200
Summary delivered
Payment checked first
{
"mcpServers": {
"gloam": {
"command": "npx",
"args": ["-y", "tsx", "/path/to/gloam/mcp/src/index.ts"]
}
}
}create-gloam-app
One command to a working app
Scaffolds a Next.js app already wired to the SDK, with private balances and payments working on testnet from the first run.
Honest about where it is
Testnet today
Live on Robinhood Chain testnet and Tempo Moderato, with play money.
Development keys
Proofs use keys from a development ceremony. A production ceremony and an external audit come before mainnet.
Nothing faked
If a path cannot be private yet, the SDK returns a plan instead of a pretend result.