You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this configuration is going to hold this data then yes, I think it makes sense to be part of this. The idea of a builder to expose this interface in an accessible way rather than expose `optional_parameters::Params` as pub makes sense to me.
I'm starting to think of this Configuration struct more as a sender::RequestBuilder that can turn into a (Request, Context) when you call from_psbt_and_uri. Maybe the signature for that method should be
instead of on the manually-validated Uri<PayJoinParams> how it is now: pj_url.create_pj_request(psbt, pj_params: Configuration) -> Result<(Request, Context)>.
Then create_pj_request could validate the endpoint check_pj_supported() during that call instead of requiring it be done by hand before the call, too.
Right now this crate re-exports bip21 types. I think these could be hidden by using a builder, accepting only a string and reporting an error for bip21 without payjoin support.
This work would also simplify the api for v2 in #101. I'd like to return impl send::Context to support both versions' contexts but can't within yet another trait impl for PjUri, but I could if this were an impl that behaved like RequestBuilder::build() -> (Request, impl send::Context)
I'm starting to think of this
Configuration
struct more as asender::RequestBuilder
that can turn into a(Request, Context)
when you callfrom_psbt_and_uri
. Maybe the signature for that method should beinstead of on the manually-validated
Uri<PayJoinParams>
how it is now:pj_url.create_pj_request(psbt, pj_params: Configuration) -> Result<(Request, Context)>
.Then create_pj_request could validate the endpoint
check_pj_supported()
during that call instead of requiring it be done by hand before the call, too.Originally posted by @DanGould in #18 (comment)
The text was updated successfully, but these errors were encountered: