A stateless Cloudflare Worker and Snippet-compatible proxy that selects a healthy Steem RPC node before forwarding each JSON-RPC request. A public instance is available at api2.steemyy.com.
- Sequential node health checks with minimum-version validation
- Efficient failover that minimizes Cloudflare Snippet subrequests
- Five-second deadlines and abort-signal support for upstream requests
- CORS support for
GET,POST, and preflight requests - Upstream status preservation with origin and version metadata
- No application database, cookies, or client-side storage
The Snippet deployment requires a Cloudflare Pro plan or higher because it needs at least two subrequests: one node version check and one forwarded request. Worker deployments use the limits of their configured Workers plan.
Node.js 22 and npm are required.
nvm use
npm ci
npm run devWrangler prints the local URL. Send a Steem JSON-RPC request to that endpoint:
curl --request POST http://localhost:8787 \
--header "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"condenser_api.get_dynamic_global_properties","params":[],"id":1}'See the API reference for response metadata and error behavior.
| Command | Purpose |
|---|---|
npm run dev |
Start the local Wrangler development server. |
npm run test |
Run the Vitest suite once. |
npm run test:watch |
Run tests in watch mode. |
npm run coverage |
Run tests and enforce all 80% coverage thresholds. |
npm run lint |
Check JavaScript with ESLint. |
npm run lint:fix |
Apply safe ESLint fixes. |
npm run format |
Check repository formatting with Prettier. |
npm run format:fix |
Format supported repository files. |
npm run build |
Create a Wrangler dry-run bundle in dist/. |
npm run check |
Run formatting, linting, coverage, and build checks. |
npm run deploy |
Deploy the Worker using Wrangler. |
npm run coverage produces the JSON and HTML reports used by CI. Pull requests receive a coverage
summary comment, including file coverage, from the Vitest Coverage Report Action.
Runtime settings live in CONFIG:
| Setting | Default |
|---|---|
| Minimum RPC version | 0.23.0 |
| Candidate nodes | api.justyy.com, api.steemit.com |
| Upstream timeout | 5 seconds |
| Proxy version | Date string exposed as X-Serverless-Version |
Test configuration changes locally before deploying them. Adding an upstream gives that operator access to forwarded RPC payloads.
Authenticate Wrangler, review wrangler.toml, and deploy:
npx wrangler login
npm run build
npm run deployThis repository does not publish a static site or deploy GitHub Pages.
The source is also compatible with a Cloudflare Snippet. Copy src/index.js into a
Snippet, create a proxied DNS record for the target host, and configure a matching rule such as
(http.host eq "api2.steemyy.com"). The public deployment points its placeholder DNS record to the
reserved address 192.0.2.1.
Depending on the zone configuration, WAF rules can reject API payloads before the Snippet runs. See Bypassing WAF for API/RPC Node: api2.steemyy.com for the public instance configuration.
- API reference
- Changelog
- Contributing guide
- Security policy
- Privacy notice
- Support guide
- Code of Conduct
Project support is optional. You can:
