mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
Minor fixes
This commit is contained in:
parent
609a4f260f
commit
3494994720
11
146.md
11
146.md
|
@ -31,11 +31,11 @@ Signer MAY signal support for this NIP by adding `nip46.iframe_url` field in the
|
|||
|
||||
To initiate a connection, `client` shows the `starter iframe`. After a [`user gesture`](https://developer.mozilla.org/en-US/docs/Web/API/UserActivation), `starter iframe` interacts with `top-level signer`, acquires user confirmation and imports the private key to `iframe signer` storage.
|
||||
|
||||
When connection is established and private key is imported to `iframe signer` storage, `client` embeds invisible `worker iframe` and exchanges nip46 messages with it using a `MessageChannel`.
|
||||
After that `client` embeds invisible `worker iframe` and exchanges nip46 messages with it using a `MessageChannel`.
|
||||
|
||||
If `worker iframe` receives a request but has no target keys due to _ephemeral_ partitioned storage ([Brave](https://brave.com/privacy-updates/7-ephemeral-storage/), Webkit), it pauses the call and sends an error code to the `client`, which then shows the `rebinder iframe`. After a `user gesture`, `rebinder iframe` interacts with `top-level signer` and if `client` is already approved - imports the private key to `iframe signer` storage. At this point `worker iframe` can retry the paused call and send the reply back to `client`.
|
||||
|
||||
If `client` request must be confirmed by the user, `worker iframe` sends `auth_url` nip46 response, which is presented to the user as a visible `checker iframe`, instead of a popup as in nip46. This way `checker iframe` can access the request info stored by the `worker iframe`. After user confirms, `worker iframe` sends reply to `client`.
|
||||
If request must be confirmed by the user, `worker iframe` sends `auth_url` nip46 response, which is presented by `client` to the user as a visible `checker iframe`, instead of a popup as in nip46. After user confirms, `worker iframe` sends reply to `client`.
|
||||
|
||||
This NIP covers interactions between `client` and `iframe signers`. Interactions of `signer` frames (top-level/iframes) are up to implementations (see Appendix for recommendations).
|
||||
|
||||
|
@ -90,11 +90,11 @@ sequenceDiagram
|
|||
participant Starter as Starter iframe
|
||||
participant Worker as Worker iframe
|
||||
|
||||
Note over Client,Starter: Client webpage
|
||||
Client ->> Starter: embed starter iframe<br/>and pass nostrconnect:// string
|
||||
Note over Client,Worker: Client webpage
|
||||
Client ->>+ Starter: embed starter iframe<br/>and pass nostrconnect:// string
|
||||
Starter -->> Starter: user gesture
|
||||
Starter -->> Starter: import private key<br/>from top-level signer
|
||||
Starter ->> Client: nip46 connect reply
|
||||
Starter ->>- Client: nip46 connect reply
|
||||
Client -->> Client: can remove starter iframe
|
||||
Note over Starter,Worker: Key in iframe signer storage
|
||||
Client -->> Worker: can make nip46 requests
|
||||
|
@ -236,6 +236,7 @@ sequenceDiagram
|
|||
Note over Worker,Checker: Request in iframe signer storage
|
||||
Checker -->> Checker: user confirms
|
||||
Note over Worker,Checker: Reply in iframe signer storage
|
||||
Checker -->>- Worker: reply detected
|
||||
Worker ->>- Client: nip46 reply
|
||||
Client -->> Client: can remove checker iframe
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user