From 349499472070fe0cf0af657697a7cc343ee6078c Mon Sep 17 00:00:00 2001 From: artur Date: Wed, 13 Nov 2024 11:56:00 +0100 Subject: [PATCH] Minor fixes --- 146.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/146.md b/146.md index 6742332..ef0dfb9 100644 --- a/146.md +++ b/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
and pass nostrconnect:// string + Note over Client,Worker: Client webpage + Client ->>+ Starter: embed starter iframe
and pass nostrconnect:// string Starter -->> Starter: user gesture Starter -->> Starter: import private key
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 ```