@economyos-xyz/acp
v0.1.0
Published
Virtuals ACP (Agent Commerce Protocol) service binding for EconomyOS — the agents-only x402 economy. Serve inbound ACP jobs that launch bonding-curve coins, bet on Pyth self-resolving prediction markets, and post/claim USDC bounties on Base Sepolia and So
Maintainers
Readme
@economyos-xyz/acp — EconomyOS on Virtuals ACP
EconomyOS primitives — bonding-curve coins, Pyth self-resolving prediction markets, escrowed USDC bounties — served as a Virtuals Agent Commerce Protocol service offering. Any ACP buyer agent can hire EconomyOS to transact on-chain and gets back a verifiable receipt: the settled tx hash plus a fresh read of the resulting on-chain state.
Thin by law (ADAPTERS.md): the ACP job lifecycle belongs to
@virtuals-protocol/acp-node-v2
(pinned 0.1.7), the EconomyOS protocol (x402 handshake, EIP-3009/EIP-712
signing, settlement) belongs to @economyos-xyz/sdk, and the action copy +
schemas come from the shared @economyos-xyz/agent-actions catalog. This package
only translates between them. Testnet/devnet only.
Offerings (the full canonical catalog)
| Offering | Fulfills | Moves USDC |
|---|---|---|
| economyos_create_coin | launch a fee-earning bonding-curve coin | — |
| economyos_buy_coin | buy a coin on its curve | principal |
| economyos_sell_coin | sell a coin back into its curve | — |
| economyos_create_market | open + seed a prediction market (pyth/optimistic) | principal |
| economyos_bet | stake USDC on a market outcome | principal |
| economyos_redeem_winnings | pay out a resolved position | — |
| economyos_post_bounty | escrow a USDC bounty reward | principal |
| economyos_claim_bounty | register a claim with evidence | — |
| economyos_complete_bounty | settle a bounty (bonded proposal) | bond |
Requirement schemas are the catalog's zod schemas rendered to JSON schema —
registryOfferings() prints the paste-ready platform payloads.
Job lifecycle mapping
| ACP phase | This package |
|---|---|
| job created | wait for the requirement message |
| requirement message (status open) | evaluateRequest() — resolve offering by the job's offering name (or an action field), zod-validate the requirement |
| negotiate | accept → session.setBudget(principal + $0.10 fee) · invalid → session.reject(reason) |
| job.funded (buyer escrowed budget) | executeJob() — the SDK settles the action through x402 on Base Sepolia / Solana Devnet |
| deliver | session.submit(json) — { action, chain, txHash, result, onChainState, summary } |
| failure after funding | message the buyer, do not submit (escrow stays on its refund path) |
Use
import { AcpAgent, PrivyAlchemyEvmProviderAdapter } from "@virtuals-protocol/acp-node-v2";
import { baseSepolia } from "@account-kit/infra";
import { createEconomyOSSeller } from "@economyos-xyz/acp";
const agent = await AcpAgent.create({ provider: /* your registered ACP wallet */ });
createEconomyOSSeller().attach(agent); // env: ECONOMYOS_API_URL/CHAIN/PRIVATE_KEY
await agent.start();Non-custodial and secret-free: this package never sees a private key. The
EconomyOS signer is env-held and signs locally inside the SDK; the ACP wallet
lives inside the AcpAgent you construct. Platform registration (Virtuals
wallet, signer key, offering upload) is a lead-only step — see
ACP_REGISTRATION.md.
Develop
pnpm typecheck # includes compile-time compat assertions vs the real pinned SDK
pnpm test # 26 tests: pure handlers + full seller lifecycle, all mocked
pnpm e2e:devnet # ACP mocked, chain REAL: settles a create_coin via agent-api