Skip to content

Commit

Permalink
NIP-123 Epheremal bitcoin transaction broadcasting
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Apr 27, 2023
1 parent badabd5 commit 290f722
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
41 changes: 41 additions & 0 deletions 123.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
NIP-123
======

Bitcoin Transaction Broadcasting Events
-------------------------

`draft` `optional` `author:benthecarman`

A special event with kind `28333`, that contains an encoded bitcoin transaction.
The bitcoin transaction is encoded as a base64 string, and is contained in the `content` field.

This is an ephemeral event, and is not stored on the server. So relays or other custom clients could receive these
events, and broadcast them to the bitcoin network.

For example:

```json
{
"kind": 28333,
"content": "AgAAAAABAtkXo8t2LfqIwQ+BPQg/LZdqAtAb61bY0zIjFvvxMTtGAAAAAAD9////j8wvOaFL5Dz+0CTKXNKxxv1GrusMps3aodsXQGp95xgAAAAAAP3///8CLAPTBQAAAAAiUSBIKoy1/JK1GdfWhii8KLfBooZg3qT7ImuwwwC6t2eT6oiKAQAAAAAAIlEgZtFI4Bx2rDqBe4X9+lzEhh7Kxca3tNE9l/QfH/ZghQECRzBEAiBV2O5+jskV8/H+UuzgRuku2gCAwlmErieXrS5scbongAIgLWD6uN8BGpyE7gNtX4jxnkNShY8yjhdcjhsHR4RAWJEBIQLlCnhSR+K9YoAngUWj94mptHhcVYJGi+rT3lwApIekkQJHMEQCIDwrK0YHftZ2BQsBjHdJb89Tlpzvc3z8E1wGgbqIVRBQAiB6J0UXuPjib+geVmaZeoq4vYD+fDz835o5OJRg9ITFDAEhA1oq2Zj0d4XbATjc3OUSXSJDvvIosDeAsHyegwk4fkcTNAslAA==",
...other fields
}
```

## Uses

This offers a way for users to broadcast bitcoin transactions in a private way without having to connect to the bitcoin
network directly.

Today, users have to connect to the bitcoin network directly or use an api like mempool.space to broadcast transactions.
This is not private, as you can leak your ip address to the service or a bitcoin node.

Nostr provides a better opportunity for users to broadcast transactions in a private way. Nostr relays are at most
bitcoin adjacent and have a much lower risk of being run by a chain analysis company, thus providing a possibly better
way to broadcast transactions.

## Recommendations

Clients should generate an ephemeral keypair for each transaction they want to broadcast. This keypair should only ever
be used for broadcasting that transaction. This is to best preserve the privacy of the user and to not link any extra
metadata to the transaction.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/fia
## Event Kinds

| kind | description | NIP |
| ------- | -------------------------- | ----------- |
|---------| -------------------------- | ----------- |
| `0` | Metadata | [1](01.md) |
| `1` | Short Text Note | [1](01.md) |
| `2` | Recommend Relay | [1](01.md) |
Expand All @@ -88,6 +88,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/fia
| `10002` | Relay List Metadata | [65](65.md) |
| `22242` | Client Authentication | [42](42.md) |
| `24133` | Nostr Connect | [46](46.md) |
| `28333` | Bitcoin Transaction | [123](123.md)|
| `30000` | Categorized People List | [51](51.md) |
| `30001` | Categorized Bookmark List | [51](51.md) |
| `30008` | Profile Badges | [58](58.md) |
Expand Down

0 comments on commit 290f722

Please sign in to comment.