{"id":49301128,"url":"https://github.com/andreogle/airnode-v2","last_synced_at":"2026-04-26T07:01:46.604Z","repository":{"id":344701016,"uuid":"1182769037","full_name":"andreogle/airnode-v2","owner":"andreogle","description":"A ground-up rewrite of Airnode","archived":false,"fork":false,"pushed_at":"2026-04-16T19:57:11.000Z","size":11066,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T21:34:38.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://andreogle.github.io/airnode-v2/","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreogle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-03-15T23:53:31.000Z","updated_at":"2026-04-16T19:57:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andreogle/airnode-v2","commit_stats":null,"previous_names":["andreogle/airnode-v2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreogle/airnode-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreogle%2Fairnode-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreogle%2Fairnode-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreogle%2Fairnode-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreogle%2Fairnode-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreogle","download_url":"https://codeload.github.com/andreogle/airnode-v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreogle%2Fairnode-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32288653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T06:26:00.361Z","status":"ssl_error","status_checked_at":"2026-04-26T06:25:58.791Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-26T07:01:46.060Z","updated_at":"2026-04-26T07:01:46.595Z","avatar_url":"https://github.com/andreogle.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airnode v2\n\n\u003e **This project is under active development. The code has not been audited. Signature formats, APIs, and contracts are\n\u003e subject to breaking changes. Do not use for production workloads or mainnet deployments.**\n\nSign API responses with your private key and serve them over HTTP. Clients verify signatures off-chain or submit them to\non-chain contracts. No chain scanning, no database, no coordinator — a stateless HTTP service that sits in front of your\nexisting API.\n\n## How it works\n\n```\nClient ──POST──▶ Airnode ──HTTP──▶ Upstream API\n                    │                    │\n                    │◀───JSON response───┘\n                    │\n                    ├─ Extract value (JSONPath)\n                    ├─ ABI-encode (int256, uint256, ...)\n                    ├─ Sign (EIP-191)\n                    │\n                    ▼\n              Signed response ──▶ verify off-chain or submit on-chain\n```\n\n## Quick start\n\n```bash\nbun install\nbun airnode generate-mnemonic           # prints mnemonic phrase + address\ncp examples/configs/minimal/config.yaml config.yaml\ncp examples/configs/minimal/.env.example .env\n# paste your private key into .env\nbun run dev\n```\n\nMake a request (replace `{endpointId}` with the ID printed at startup):\n\n```bash\ncurl -X POST http://localhost:3000/endpoints/{endpointId} \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"parameters\":{\"ids\":\"ethereum\",\"vs_currencies\":\"usd\"}}'\n```\n\n```json\n{\n  \"airnode\": \"0x...\",\n  \"endpointId\": \"0x...\",\n  \"timestamp\": 1711234567,\n  \"data\": \"0x0000000000000000000000000000000000000000000000a2a15d09519be00000\",\n  \"signature\": \"0x...\"\n}\n```\n\n## What you can do\n\n- **Sign any API response** with your key — turn untrusted data into a verifiable attestation\n- **Serve data to smart contracts** — ABI-encoded responses ready for on-chain submission\n- **Monetize access** — API keys or pay-per-request via x402\n- **Control encoding at request time** — clients pass `_type`, `_path`, `_times` to choose what to extract\n- **Extend with plugins** — hooks at every pipeline stage for custom logic\n\n## Routes\n\n| Method | Path                      | Description                      |\n| ------ | ------------------------- | -------------------------------- |\n| `POST` | `/endpoints/{endpointId}` | Call an endpoint with parameters |\n| `GET`  | `/requests/{requestId}`   | Poll an async request for status |\n| `GET`  | `/health`                 | Version and airnode address      |\n\n## Configuration\n\nYAML config with `${ENV_VAR}` interpolation. Bun loads `.env` automatically.\n\n```yaml\nversion: '1.0'\n\nserver:\n  port: 3000\n\nsettings:\n  proof: none\n\napis:\n  - name: CoinGecko\n    url: https://api.coingecko.com/api/v3\n    headers:\n      x-cg-pro-api-key: ${COINGECKO_API_KEY}\n    auth:\n      type: apiKey\n      keys:\n        - ${CLIENT_API_KEY}\n    endpoints:\n      - name: price\n        path: /simple/price\n        parameters:\n          - name: ids\n            in: query\n            required: true\n        encoding:\n          type: int256\n          path: $.bitcoin.usd\n          times: '1e18'\n```\n\nSee [`examples/configs/complete/config.yaml`](examples/configs/complete/config.yaml) for auth methods, caching,\nmulti-value encoding, and all available fields. See [`examples/configs/reclaim-proof/`](examples/configs/reclaim-proof/)\nfor TLS proof configuration.\n\n## Contracts\n\nOne Solidity contract (EVM target: `prague`):\n\n| Contract              | Purpose                                               |\n| --------------------- | ----------------------------------------------------- |\n| `AirnodeVerifier.sol` | Verify signature, prevent replay, forward to callback |\n\nVerifies `keccak256(encodePacked(endpointId, timestamp, data))` with EIP-191 personal sign. See\n[`contracts/README.md`](contracts/README.md) for integration examples.\n\n## Development\n\n### Prerequisites\n\n| Tool                                  | Install                                                     |\n| ------------------------------------- | ----------------------------------------------------------- |\n| [Bun](https://bun.sh)                 | `curl -fsSL https://bun.sh/install \\| bash`                 |\n| [Foundry](https://book.getfoundry.sh) | `curl -L https://foundry.paradigm.xyz \\| bash \u0026\u0026 foundryup` |\n\n### Scripts\n\n| Script                     | Description                              |\n| -------------------------- | ---------------------------------------- |\n| `bun run dev`              | Start the server with `--watch`          |\n| `bun test`                 | Run unit tests (src/)                    |\n| `bun run test:integration` | Run integration tests (sequential)       |\n| `bun run test:contracts`   | Run contract tests (Foundry)             |\n| `bun run fmt`              | Format (Prettier) and lint-fix (ESLint)  |\n| `bun run lint`             | Check formatting and linting             |\n| `bun run lint:slither`     | Run Slither static analysis on contracts |\n\n### Build\n\nCompile to a standalone binary:\n\n```bash\nbun run build:osx        # macOS ARM64\nbun run build:linux-x64  # Linux x86_64\n\n./dist/airnode start -c config.yaml\n```\n\n### Project structure\n\n```\nsrc/\n  cli/            CLI commands (start, generate-mnemonic, etc.)\n  config/         Zod schema, YAML parser, env interpolation\n  api/            Upstream API calls and response processing\n  server.ts       Bun.serve HTTP server\n  pipeline.ts     Request pipeline (auth → validate → cache → API → encode → sign → proof)\n  auth.ts         Authentication (free, apiKey, x402)\n  sign.ts         EIP-191 signing\n  endpoint.ts     Specification-bound endpoint ID derivation\n  plugins.ts      Plugin hooks and budget tracking\ncontracts/        Solidity contracts and Foundry tests\nexamples/\n  configs/        Reference configs (complete, minimal, reclaim-proof)\n  plugins/        Example plugins (heartbeat, logger, slack-alerts)\nbook/             Documentation site (Docusaurus)\n```\n\n## Documentation\n\nFull docs at the [documentation site](book/). Run locally:\n\n```bash\nbun run book:start\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreogle%2Fairnode-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreogle%2Fairnode-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreogle%2Fairnode-v2/lists"}