{"id":50734125,"url":"https://github.com/taikoxyz/pico","last_synced_at":"2026-06-10T12:01:09.095Z","repository":{"id":355959814,"uuid":"1222215687","full_name":"taikoxyz/pico","owner":"taikoxyz","description":"State channel on Taiko for Agent payments","archived":false,"fork":false,"pushed_at":"2026-05-20T14:23:35.000Z","size":2171,"stargazers_count":0,"open_issues_count":25,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T17:54:07.025Z","etag":null,"topics":["agent","payment","state-channel","taiko","usdc"],"latest_commit_sha":null,"homepage":"https://pico.inferenceroom.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taikoxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T06:40:52.000Z","updated_at":"2026-05-20T14:21:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/taikoxyz/pico","commit_stats":null,"previous_names":["taikoxyz/pico"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/taikoxyz/pico","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taikoxyz%2Fpico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taikoxyz%2Fpico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taikoxyz%2Fpico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taikoxyz%2Fpico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taikoxyz","download_url":"https://codeload.github.com/taikoxyz/pico/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taikoxyz%2Fpico/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34151276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","payment","state-channel","taiko","usdc"],"created_at":"2026-06-10T12:01:07.959Z","updated_at":"2026-06-10T12:01:09.090Z","avatar_url":"https://github.com/taikoxyz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pico\n\n\u003e Trustless **1-hop state channel network for micro-payments on Taiko L2**.\n\u003e v1 is an **AI-agent payments system**: the agent surface is the\n\u003e [`pico` CLI](./apps/cli/), not a browser wallet.\n\nInspired by Lightning's LSP model. Stablecoin (USDC) is the default v1 asset;\nthe on-chain contracts also accept any owner-allowlisted ERC-20 and native ETH\n(`token == address(0)`). **No native token.\nNo governance. No bridges. No MCP / x402 association.**\n\n\u003e **New here?** Open [`docs/learning/index.html`](./docs/learning/index.html) for a tour of every\n\u003e component before diving into source code. Start with `00-big-picture.html` if you\n\u003e want intuition first.\n\n## Why 1-hop\n\nLightning's full multi-hop topology is overkill for the workloads pico targets:\n\n- AI agents paying agents\n- Clients paying DVMs\n- Streaming dust-sized payments to APIs\n\nMulti-hop adds liquidity-routing complexity, locked HTLCs, and onion-routing overhead\nwithout buying the marginal user anything when \"1 hop through a hub\" is plenty. pico\ncollapses the graph: every channel terminates at a hub, every payment is `client → hub →\nrecipient`. Hubs compete on liquidity, fees, and uptime — exactly like LSPs.\n\n## Repository layout\n\n```\napps/\n  cli/          pico \u003ccmd\u003e CLI — the v1 agent runtime (pay, listen, channel ops)\n  hub/          Long-running hub service (Fastify + ws + sqlite/postgres)\n  watchtower/   Standalone fraud monitor that posts penalty txs\npackages/\n  contracts/    Solidity 0.8.26 PaymentChannel + Adjudicator + HTLC (Foundry)\n  protocol/     Shared TS types, EIP-712 schemas, constants, Nostr event kinds\n  state-machine/ Pure-function channel state transitions (browser-safe)\n  sdk/          Client SDK with Signer interface (browser + Node, depends on viem)\n  dvm-adapter/  Nostr DVM payment helpers (Phase 2)\n  test-utils/   Anvil/forge fixtures, mock hubs, deterministic keys\ne2e/            Cross-package end-to-end tests\ndocs/           Protocol spec, threat model, and per-phase plans\ndocs/learning/  Per-component HTML tutorials — start at docs/learning/index.html\n```\n\n## Quick start\n\n```bash\npnpm install\npnpm build\npnpm typecheck\npnpm test\npnpm pico hello              # smoke check; prints all package versions\nforge build --root packages/contracts\n```\n\n## Quick start for an AI agent (v1 target)\n\n```bash\npnpm install\npnpm pico keys init                                   # encrypted hot key\npnpm pico channel open --hub https://hub.example --amount 25\npnpm pico pay --to 0xRecipient --amount 0.05 --json   # one-shot payment\npnpm pico listen --hub https://hub.example \u0026          # receive payments\n```\n\nAny-language agents shell out to the CLI; non-TS callers parse the `--json` output.\n\n## Direct peer channels (hub as relay)\n\nThe on-chain contract is a generic two-party channel, so two users can open a\nchannel **directly between themselves** with the hub acting only as an untrusted\nmessage relay (not a party, no liquidity, no fee, no co-signing). Run a\nrelay-enabled hub (`HUB_ENABLE_RELAY=true`); then, sharing that relay URL:\n\n```bash\n# recipient: co-sign inbound peer payments\npnpm pico listen --peer --via ws://relay.example/ws \u0026\n# opener: open a direct channel, pay, and cooperatively close\npnpm pico channel open --peer 0xPeer --amount 25 --via ws://relay.example/ws\npnpm pico pay --invoice \u003cpeer-invoice\u003e --peer --via ws://relay.example/ws\npnpm pico channel close \u003cchannelId\u003e --peer --via ws://relay.example/ws\n```\n\nSee [`ARCHITECTURE.md`](./ARCHITECTURE.md) and\n[`docs/learning/09-peer-channels.html`](./docs/learning/09-peer-channels.html)\nfor the data flow and trade-offs (each peer watches the chain itself; no\nhub-side watchtower).\n\n## Toolchain\n\n| Concern             | Tool                              |\n|---------------------|-----------------------------------|\n| Package manager     | pnpm 9.x with workspaces          |\n| Monorepo runner     | Turborepo 2.x                     |\n| TypeScript          | 5.5+ (strict, ES2022, bundler)    |\n| Solidity            | Foundry, solc 0.8.26              |\n| EVM client          | viem 2.x                          |\n| Tests (TS)          | Vitest                            |\n| Tests (Solidity)    | forge test                        |\n| Lint + format       | Biome 1.x                         |\n| Versioning          | Changesets                        |\n| Git hooks           | lefthook                          |\n| CI                  | GitHub Actions                    |\n\n## Hard constraints\n\n- No native token. No governance. No staking.\n- No bridges. No wrapped assets.\n- viem only — never ethers.\n- pnpm only — never yarn or npm.\n- Local Prometheus + structured logs only — no observability vendors.\n\n## Status\n\nPre-GA staging. AI-audited (DeepSeek + multi-agent), with critical and high\ncode findings addressed or tracked. The main remaining launch gates are\noperator-controlled: verify current owner-key custody, revoke/cold-store the\ndeployer key, publish the real PGP key, run restore/paging/security drills,\nand complete the real-USDC mainnet smoke channel. Mainnet config gates\nfail-fast on dev keys and unsigned envelopes\n(`apps/{hub,watchtower}/src/config-validate.ts`); state-acceptance gates\n(`packages/state-machine/src/admit.ts`) verify hub-supplied states before\nthe SDK persists them.\n\nProduction-readiness is summarized in\n[`final_readiness_report.html`](./final_readiness_report.html) — the single\nsource of truth for design, implementation, test, and documentation\nreadiness. Live operational work is tracked on\n[issue #21](https://github.com/taikoxyz/pico/issues/21).\n\n## Documentation\n\n- [`final_readiness_report.html`](./final_readiness_report.html) — **the\n  single source of truth** for production readiness (design, implementation,\n  tests, documentation). Re-generated per release-candidate tag.\n- [Issue #21](https://github.com/taikoxyz/pico/issues/21) — master\n  production-readiness tracker. Sub-issues are categorized\n  (`code` / `test` / `gke` / `taiko-contract` / `docs` / `audit` / `ci`)\n  and prioritized (`high` / `medium` / `low`).\n- [`docs/learning/index.html`](./docs/learning/index.html) — per-component\n  HTML tutorials, offline-readable.\n- [`ARCHITECTURE.md`](./ARCHITECTURE.md) — components, trust assumptions,\n  why 1-hop.\n- [`docs/protocol-spec.md`](./docs/protocol-spec.md) — formal protocol spec.\n- [`docs/threat-model.md`](./docs/threat-model.md) — adversaries and failure\n  modes.\n- [`CONTRIBUTING.md`](./CONTRIBUTING.md) — coding standards \u0026 PR process.\n- [`SECURITY.md`](./SECURITY.md) — disclosure policy.\n\n## License\n\nMIT — see [`LICENSE`](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaikoxyz%2Fpico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaikoxyz%2Fpico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaikoxyz%2Fpico/lists"}