Skip to content

fix(cdk-common): make jsonwebtoken optional behind http feature - #2927

Open
thesimplekid wants to merge 1 commit into
cashubtc:mainfrom
thesimplekid:json_option
Open

thesimplekid wants to merge 1 commit into
cashubtc:mainfrom
thesimplekid:json_option

Conversation

@thesimplekid

Copy link
Copy Markdown
Collaborator

jsonwebtoken is only used by auth::oidc, which is compiled only with the http feature, yet it was always a dependency. Builds without http pulled it in along with its p256/p384 crypto dependencies, and wasm32 checks warned about an unused dependency.

Make it optional and enable it from the http feature.

The getrandom 0.2 js workaround stays unconditional on wasm32: bitcoin's rand-std feature also pulls getrandom 0.2 through secp256k1 and rand 0.8, so it is needed even without http. Update its comment accordingly.

Refs #2923

Description


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)

@github-project-automation github-project-automation Bot moved this to Backlog in CDK Nov 18, 2026
jsonwebtoken is only used by auth::oidc, which is compiled only with the
http feature, yet it was always a dependency. Builds without http pulled
it in along with its p256/p384 crypto dependencies, and wasm32 checks
warned about an unused dependency.

Make it optional and enable it from the http feature.

The getrandom 0.2 js workaround stays unconditional on wasm32: bitcoin's
rand-std feature also pulls getrandom 0.2 through secp256k1 and rand 0.8,
so it is needed even without http. Update its comment accordingly.

Refs cashubtc#2923
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.

1 participant