NWC PR: incorporate feedback#437
Conversation
Semisol
left a comment
There was a problem hiding this comment.
I strongly believe that using numeric error codes is going to cause conflicts when a new type needs to be created. We should use text error codes instead. Don't change it if it is not broken.
Also, multiple relays should be supported.
9ea86eb to
ecc16b5
Compare
ecc16b5 to
a0a44b6
Compare
Semisol
left a comment
There was a problem hiding this comment.
LGTM except a few small changes
Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com>
Co-authored-by: Semisol <45574030+Semisol@users.noreply.github.com>
|
Let's make sure we code this before merging. |
There was a problem hiding this comment.
Just please apply this. Then merging is fine with me.
Encoding the type is redundant since the client will already have an in memory object for the request with whatever to pass the response to, a timeout, etc. so the client can also look up this field themselves.
The argument "the structure of the object has to be known beforehand" is redundant since most JSON libraries allow you to decode arbitrarily structured JSON and get things by their keys.
|
After doing some more experimentation on how the UX to connect could look like I think we should leave it up to the client and the wallet services to decide how the connection details are shared. The important part is that client and wallet service need to exchange some connection information (wallet pubkey, relay and connection secret/pubkey). For maximum interoperability we should standardize the format for this in the nostr+walletconnect URI scheme. In a mobile case this could be through a deep-link from the wallet service back to the client or the user scanning a QR code This should stay flexible and up to the developers. I've tried to propose this in this PR: getAlby#1 edit: I was asked: why are secrets in URLs bad? because the URLs are cached on various levels starting with the browser history. |
|
LGTM. Will try to code this up soon. |
|
Happy to report the just released Amethyst 0.35.0 migrated from the original design to this one with JSON payloads back and forth. |
|
@Semisol your call. |
Semisol
left a comment
There was a problem hiding this comment.
Oops. Missed it. Merging now.
Adding an error code for failed payments after merging
I think I have included all the feedback from the discussion, while ensuring that the scope of the NIP stays manageable.
pay_invoicecommand.etag to indicate what they are responding to.