Skip to content

refactor: implement stealth api as rust crate #17

Open
satsfy wants to merge 2 commits intostealth-bitcoin:mainfrom
satsfy:add-api
Open

refactor: implement stealth api as rust crate #17
satsfy wants to merge 2 commits intostealth-bitcoin:mainfrom
satsfy:add-api

Conversation

@satsfy
Copy link
Copy Markdown
Collaborator

@satsfy satsfy commented Mar 26, 2026

Depends on #16 (it will be in draft mode until its merged)

Solves #10. This PR is a combination of rust refactors from @brenorb in #15 and me.

Implements an HTTP API for stealth as rust create stealth-api with POST /api/wallet/scan, request validation, structured error responses, RPC autodetection, and regtest end-to-end tests.

Replaces instructions on README on how to use stealth api.

Reviewer Notes

Open the branch locally, run cargo build to verify it compiles and run cargo test. Inspect the e2e test in api/tests/.

Run the api with cargo run --bin stealth-api and test that call:

curl 'http://localhost:20899/api/wallet/scan' \
  -H 'content-type: application/json' \
  -d '{"descriptor":"wpkh(xpub.../0/*)"}' | jq

@satsfy satsfy changed the title Add api refactor: implement stealth api as rust crate Mar 26, 2026
@satsfy satsfy marked this pull request as ready for review April 5, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant