Docs
Build with Zolynia.
An operator's smart account can fund an agent signer under public payment caps. A merchant who is paid can read the address behind the payment on Robinhood Chain for free, or buy a signed payer report that also includes a fresh probe of the agent's endpoints.
Add the SDK
pnpm add @zolynia-tech/sdk viem
Operators: configure an agent's policy
From your wallet, the Agents section of the dashboard handles each step. The dashboard creates a Safe with Safe7579 and the Zolynia policy module. It registers the agent's ERC-8004 identity, creates a signer, opens the selected session and exports the agent key file.
Prefer a script? The agent creates a signer and consents to the session; the operator then submits it from their account. A signer belongs to one session.
import { signSessionConsent, operatorCalls, type Policy } from "@zolynia-tech/sdk";
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(generatePrivateKey()); // kept by the agent
const policy: Policy = {
caps: [{ token: USDG, perTx: perPaymentCap, perDay: dailyCap, floatMax: floatCap }],
targets: allowedTargets,
validUntil: expiry,
increaseDelay: 3600,
};
const consent = await signSessionConsent(signer, { chainId, module, account, agentId, policy });
const data = operatorCalls.openSession(agentId, signer.address, policy, consent);
// submit `data` to the module from your account (Safe execTransaction)Agents: pay over x402
Place the dashboard key file in the agent's environment. The SDK refills the float through the module before each payment, within the policy caps.
import { agentFromEnv } from "@zolynia-tech/sdk";
const agent = agentFromEnv(); // loads ZOLYNIA_SIGNER_KEY and the other key file values
const res = await agent.x402Fetch("https://api.example.com/data");Merchants: verify a paying address
A single wallet signature under Credits in the dashboard gives you an API key. A single call retrieves the report and checks its signature on chain.
import { checkPayment } from "@zolynia-tech/sdk";
const v = await checkPayment(payer, process.env.ZOLYNIA_API_KEY);
if (v.ok) {
// v.result.caps, v.result.status, v.result.endpointsLive, v.result.validUntil
}The HTTP endpoint also works from other languages:
curl -H "authorization: Bearer $ZOLYNIA_API_KEY" \ https://api.zolynia.xyz/v1/check/by-signer/0xPAYING_ADDRESS
Signed report fields
| signer, account, agentId | The report subject. Its contents describe payments authorized by this signer. |
| status | 0 none · 1 active · 2 paused · 3 revoked · 4 expired. |
| caps | Token entries cover per transaction and daily ceilings, float and spend today. |
| targetsHash | The JSON includes permitted calls and a hash covering them. |
| validFor | The earliest time the module permits a cap increase for this signer. |
| accountKind, otherAccountModules | Whether the account is a recognised Safe, and whether anything else keeps access to it. |
| verified, endpointsLive, registrationValid, domainVerified | Agent verification status and the latest registration and endpoint probe. |
| issuedAt, validUntil | When the reading was signed, and the time it remains valid until. |
Scope: the caps count what this signer moves out of the account, in the displayed tokens and in native ETH.