Skip to content

Ord/rune etching endpoints#42

Open
Neurvinch wants to merge 5 commits intoOWASP-BLT:mainfrom
Neurvinch:ord/rune-etching-endpoints
Open

Ord/rune etching endpoints#42
Neurvinch wants to merge 5 commits intoOWASP-BLT:mainfrom
Neurvinch:ord/rune-etching-endpoints

Conversation

@Neurvinch
Copy link
Copy Markdown
Contributor

@Neurvinch Neurvinch commented Mar 17, 2026

Summary

Add /mainnet/etch-rune and /regtest/etch-rune POST endpoints for creating new Runes on Bitcoin.

Supported parameters

Field Type Required Description
rune_name string yes Rune name, e.g. "BLT•BACON•TOKENS"
symbol string (1 char) yes Ticker symbol
fee_rate number yes sat/vbyte (1–10000)
divisibility int (0–38) no Default 0
premine int no* Tokens minted to etching wallet
mint_cap int no* Max number of open mints
mint_amount int no* Tokens per open mint
mint_height_start/end int no Block-height mint window
mint_offset_start/end int no Block-offset mint window
turbo bool no Enable TURBO flag
dry_run bool no Default true
password string if live Required when dry_run=false

*At least one of premine or mint_cap/mint_amount must be provided.

Changes

  • ord-server/ord-api.py_etch_rune() shared handler + 2 route endpoints

Test plan

  • Dry-run etch with valid params → success response
  • Missing rune_name → 400
  • Missing both premine and mint terms → 400
  • Non-dry-run without password → 401

Neurvinch and others added 5 commits March 17, 2026 12:39
…roxy

Replace placeholder worker with a real Cloudflare Worker that:
- Routes /mainnet/* and /regtest/* as API calls, everything else as static site
- Validates X-Signature-256 HMAC-SHA256 signature before forwarding
- Proxies authenticated API requests to the private ord backend (ORD_BACKEND_URL)
- Returns JSON errors for missing config or invalid signatures
- Add ORD_BACKEND_URL to wrangler.toml [vars]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…helpers

- run_ord_command: exponential-backoff retry on transient errors
  (connection refused, timeout, etc.)
- sanitize_error: strip RPC passwords from stderr before returning
- write_temp_yaml: UUID-suffixed temp files to avoid race conditions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- make_base_command: build ord CLI prefix for mainnet/regtest
- make_wallet_args: build wallet sub-command args per network
- validate_fee_rate: range check (1-10000 sat/vbyte)
- Fix mainnet RPC URL default port (8332, not 18443)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- validate_live_auth: constant-time password check via hmac.compare_digest
  (prevents timing side-channel attacks on the wallet password)
- Refactor all 3 endpoints to use make_base_command, make_wallet_args,
  run_ord_command, sanitize_error, write_temp_yaml, validate_fee_rate
- Temp YAML files are cleaned up after each request
- Add requests to requirements.txt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add /mainnet/etch-rune and /regtest/etch-rune POST endpoints for
creating new Runes on Bitcoin. Supports rune name, symbol, divisibility,
premine, open-mint terms (cap, amount, height/offset windows), turbo
flag, and dry-run mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@owasp-blt
Copy link
Copy Markdown

owasp-blt bot commented Mar 17, 2026

📊 Monthly Leaderboard

Hi @Neurvinch! Here's how you rank for March 2026:

Rank User Open PRs PRs (merged) PRs (closed) Reviews Comments Total
30 ramansh18 @ramansh18 0 3 0 0 7 44
31 Neurvinch @Neurvinch 12 2 0 0 2 36
32 snk-git-hub @snk-git-hub 3 1 0 1 9 36

Scoring this month (across OWASP-BLT org): Open PRs (+1 each), Merged PRs (+10), Closed (not merged) (−2), Reviews (+5; first two per PR in-month), Comments (+2, excludes CodeRabbit). Run /leaderboard on any issue or PR to see your rank!

@owasp-blt
Copy link
Copy Markdown

owasp-blt bot commented Mar 17, 2026

👋 Hi @Neurvinch!

This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:

  • The PR author
  • coderabbitai
  • copilot

Once a valid peer review is submitted, this check will pass automatically. Thank you!

⚠️ Peer review enforcement is active.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Warning

Rate limit exceeded

@Neurvinch has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 9 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: OWASP-BLT/coderabbit/.coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: d3d40389-6514-4ca6-8222-3c2415348a2f

📥 Commits

Reviewing files that changed from the base of the PR and between 9a1b356 and de99974.

📒 Files selected for processing (5)
  • ord-server/.env.example
  • ord-server/ord-api.py
  • ord-server/requirements.txt
  • src/index.py
  • wrangler.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant