-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
Milestone
Description
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
impl RequestBuilder {
fn create_pj_request(psbt: Psbt, pj_url: Uri<PayJoin>) -> Result<(Request, Context)>;
}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.
Originally posted by @DanGould in #18 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done