Build new crate to handle I/O
Default ureq I/O could allow for a higher-level payjoin abstraction that handles http requests. For example this could include
- Sending v1 requests and parsing the response internally
- Hosting a v1 receiver server with hyper
- Polling for v2 payjoin requests and handling errors
- Fetching OHTTP Key Configuration with various bootstrap mechanisms
- Default persistent storage for V2 session state and previously-seen-input checks
This would allow a us to use a common implementation in payjoin-cli and integration tests as well which would be clean.
Such a crate could even do default BDK / bitcoin core integration for proposal processing.
I would like to start this please. Probably will have time at the beginning of next week after the conf
Sounds awesome. Fetching OHTTP Keys via CONNECT method in a crate shared between payjoin-cli and tests might be the simplest start that can be closed in a single PR
Do you wanna keep this open or open new issue for each new functionality added to payjoin-defaults ?
yes. keep it open until such a solution is actually shipped. That crate is still unreleased.
This is done (as a feature) pending merge of #272
Closed by #271 🎉
https://docs.rs/payjoin/latest/payjoin/io/index.html