mirror of
https://github.com/jb55/nostril.git
synced 2024-11-14 22:39:07 -05:00
f6be187748
Signed-off-by: William Casarin <jb55@jb55.com>
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
|
|
# nostril
|
|
|
|
A cli util for creating nostr events
|
|
|
|
TODO: support for tags, encrypted messages
|
|
|
|
## Dependenices
|
|
|
|
`libsecp256k1` is the only dependency
|
|
|
|
## Examples
|
|
|
|
Generate an event:
|
|
|
|
$ ./nostril --sec <key> "this is a message"
|
|
{
|
|
"id": "b5c18a4aa21231a77b09748a5e623d9c2f853aed09653934b80a10b66a7225fa",
|
|
"pubkey": "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f",
|
|
"created_at": 1649948031,
|
|
"kind": 1,
|
|
"tags": [],
|
|
"content": "testing something again",
|
|
"sig": "5122b2fc0d9a1f1ca134e4ab6fc1c9e5795e2d558cf24e3c7d8c4a35f889130eebcbd604602092a89c8a48469e88753e08dabb472610ac628ec9db3aa6c24672"
|
|
}
|
|
|
|
Wrap event to send to a relay:
|
|
|
|
$ ./nostril --envelope --sec <key> "hello"
|
|
[
|
|
"EVENT",
|
|
{
|
|
"id": "ed378d3fdda785c091e9311c6e6eeb075db349a163c5e38de95946f6013a8001",
|
|
"pubkey": "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f",
|
|
"created_at": 1649948103,
|
|
"kind": 1,
|
|
"tags": [],
|
|
"content": "hello",
|
|
"sig": "9d9a49bbc66d4782030b24c71416965e790214d02a54ab132d960c2b02def0371c3d93e5a60a285c55e99721599d1332450731e2c6bb1114b96b591c6967f872"
|
|
}
|
|
]
|
|
|
|
Send to a relay:
|
|
|
|
$ ./nostril --envelope --sec <key> "this is a message" | websocat wss://nostr-pub.wellorder.net
|
|
|
|
|