-
Couldn't load subscription status.
- Fork 706
NWC PR: incorporate feedback #437
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
NWC PR: incorporate feedback #437
Conversation
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 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
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.
LGTM except a few small changes
Co-authored-by: Semisol <[email protected]>
Co-authored-by: Semisol <[email protected]>
|
Let's make sure we code this before merging. |
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 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. |
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.
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.