-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callbacks spec update #222
Conversation
If `replyTo` is present, a PFI will send any/all new messages for a given exchange to the supplied URI. This makes the URI scoped to each exchange, allowing the caller to specify a different URI per exchange if they so wish. | ||
|
||
If `replyTo` is _not_ present, the caller will have to poll the PFI for the exchange in question to receive new messages. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a general q about replyTo - does the URI change depending on whether Alice is talking tbdex via a self-custodial vs custodial wallet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URI can actually be different per exchange. In general, no difference in terms of how the callback is used if coming from a self-custodied vs custodial wallet though.
|
||
### Endpoint | ||
`POST /exchanges/:exchange_id/rfq` | ||
`POST /exchanges/:exchange_id` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could take it a step further. exchange_id
is already in the RFQ. It's superfluous in the URL.
`POST /exchanges/:exchange_id` | |
`POST /exchanges` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to this - could this actually be applied to all our POST /exchanges/xyz endpoints, since all tbdex message metadata contain exchangeId?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a fan of removing it, @mistermoe any opposition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to open a separate issue for this because it'll require refactoring httpclient/httpserver in JS/KT outside the context of implementing callbacks
Co-authored-by: Jiyoon Koo <jiyoon@tbd.email>
closes #167