more changes to separate kinds and add recommended relay instead of notes to the tags

This commit is contained in:
Max Gravitt 2023-02-19 09:05:57 -05:00
parent ecf3be105a
commit 44f2ae66e9
No known key found for this signature in database
GPG Key ID: 8DBCBA4E862BB442

14
70.md
View File

@ -6,9 +6,9 @@ Signature Request Event
`draft` `rfc` `optional` `author:3yekn`
> I need to do a bit more research to determine whether the event kind should be ephemeral or not. I originally thought 'yes', but now leaning no, so I've changed the kind to `9999`.
> I need to do a bit more research to determine whether the event kind should be ephemeral or not.
An event type with kind `9999` representing a peer-to-peer request for signature of a specific payload.
This proposal introduces an event type with kind `9991` representing a peer-to-peer request for signature of a specific payload and event kind `9992` as the signature response.
The initial purpose of this event type is for requesting approval of [partially signed bitcoin transactions](https://river.com/learn/terms/p/partially-signed-bitcoin-transaction-psbt/) (PSBT), but the event type may also be used in more general purpose approval-style workflows.
@ -25,15 +25,15 @@ This feature set could replace common legal document approval/signature applicat
### Notes & RFC
- The content may or may not be encrypted (?).
- It will likely be common for this to be used on private or permissioned relays.
- The `p` tag is for tagging a specific account, such as `@Bob` or `@Charlie`. It supports an text string for each account being tagged. See example below.
- Bitcoin signature request URIs have been proposed over the years but it is unclear how many wallets support them. The content in a `20010` event may contain a URI encoded PSBT or a non-URI encoded PSBT.
- The `p` tag is for tagging a specific account, such as `@Bob` or `@Charlie`. See example below.
- Bitcoin signature request URIs have been proposed over the years but it is unclear how many wallets support them. The content in a `9991` event may contain a URI encoded PSBT or a non-URI encoded PSBT.
#### Example Client Implementation
Clients may show the event under DMs or in a specific signature-request zone.
![image](https://user-images.githubusercontent.com/32852271/219762673-3ff42c16-15b6-415b-80a5-05f9502e3184.png | width=200)
<img src="https://user-images.githubusercontent.com/32852271/219762673-3ff42c16-15b6-415b-80a5-05f9502e3184.png" width="200")
Clients may add `Approve` or `Reject` or `...` (more) buttons directly in the client, or provide a URI to open the signature request within a bitcoin wallet (similar to the zap functionality).
![image](https://user-images.githubusercontent.com/32852271/219763472-0f390678-2545-457a-92e6-12bbd2275996.png = width=200)
<img src="https://user-images.githubusercontent.com/32852271/219763472-0f390678-2545-457a-92e6-12bbd2275996.png" width="200"/>
### Example
This example event tags Bob, Charlie, David, and Erika with an optional note for each. The PSBT is in the content. For PSBTs, once signed, the resulting PSBT can be the same event type as the signature is already embedded in the PSBT specification. For non-PSBT use cases, only the signature may be returned or appended to the content and returned.
@ -75,7 +75,7 @@ Alice approves of having cheesecake tonight.
"wss://r1.hashed.systems"
],
],
"content": "7d08c5d295ad7d5b29ba0c47e4a56323894e9b7a124a20ca59917428001b5b485d1aab20f58353b7a7e64be562d3ac5f458cc07dfe297d1850d4a5f4c18d6308",
"content": "signature:7d08c5d295ad7d5b29ba0c47e4a56323894e9b7a124a20ca59917428001b5b485d1aab20f58353b7a7e64be562d3ac5f458cc07dfe297d1850d4a5f4c18d6308&notes=sure thing",
<other fields>
}
```