Skip to content

feat: add OHTTP (NUT-26) support#2021

Draft
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:ohttp_mono
Draft

feat: add OHTTP (NUT-26) support#2021
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:ohttp_mono

Conversation

@crodas

@crodas crodas commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Add Oblivious HTTP support for enhanced privacy between wallets and mints.

  • Add ohttp-gateway crate: OHTTP gateway server that can be embedded in cdk-mintd or run standalone, handling BHTTP encapsulation/decapsulation and key management
  • Add ohttp-client crate: client library for OHTTP key discovery and request encapsulation
  • Add OHTTP transport layer in cdk wallet for routing requests through an OHTTP relay
  • Add OhttpSettings (NUT-26) to MintInfo for advertising OHTTP support
  • Add MintBuilder::with_ohttp() for configuring OHTTP on the mint side
  • Add ohttp_gateway config section to cdk-mintd
  • Add --ohttp-relay CLI flag to cdk-cli
  • Wire OHTTP gateway router into cdk-mintd when enabled

This is a follow up of #1067


Notes to the reviewers


Suggested CHANGELOG Updates

CHANGED

ADDED

REMOVED

FIXED


Checklist

  • I followed the code style guidelines
  • I ran just quick-check before committing
  • If the Wallet API was modified (added/removed/changed), I have reflected those changes in the FFI bindings (crates/cdk-ffi)

@crodas crodas self-assigned this Jun 1, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in CDK Jun 1, 2026
@crodas crodas force-pushed the ohttp_mono branch 2 times, most recently from 23bdf17 to e1d77bf Compare June 2, 2026 01:02
Add Oblivious HTTP support for enhanced privacy between wallets and mints.

- Add ohttp-gateway crate: OHTTP gateway server that can be embedded in
  cdk-mintd or run standalone, handling BHTTP encapsulation/decapsulation
  and key management
- Add ohttp-client crate: client library for OHTTP key discovery and
  request encapsulation
- Add OHTTP transport layer in cdk wallet for routing requests through
  an OHTTP relay
- Add OhttpSettings (NUT-26) to MintInfo for advertising OHTTP support
- Add MintBuilder::with_ohttp() for configuring OHTTP on the mint side
- Add ohttp_gateway config section to cdk-mintd
- Add --ohttp-relay CLI flag to cdk-cli
- Wire OHTTP gateway router into cdk-mintd when enabled
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.24922% with 512 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.58%. Comparing base (014d68c) to head (7707b31).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/ohttp-gateway/src/gateway.rs 0.00% 200 Missing ⚠️
crates/ohttp-client/src/client.rs 42.18% 159 Missing ⚠️
crates/ohttp-gateway/src/key_config.rs 0.00% 42 Missing ⚠️
crates/cashu/src/nuts/nut06.rs 0.00% 22 Missing ⚠️
crates/ohttp-gateway/src/cli.rs 0.00% 22 Missing ⚠️
crates/cdk-mintd/src/lib.rs 0.00% 20 Missing ⚠️
crates/ohttp-gateway/src/router.rs 0.00% 19 Missing ⚠️
crates/cdk/src/mint/builder.rs 0.00% 13 Missing ⚠️
crates/cdk-ffi/src/types/mint.rs 40.00% 9 Missing ⚠️
crates/cdk-integration-tests/src/shared.rs 0.00% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2021      +/-   ##
==========================================
- Coverage   69.03%   68.58%   -0.45%     
==========================================
  Files         352      358       +6     
  Lines       69470    70112     +642     
==========================================
+ Hits        47956    48088     +132     
- Misses      21514    22024     +510     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants