nostril.1 (2927B)
1 .\" Generated by scdoc 1.11.2 2 .\" Complete documentation for this program is not available as a GNU info page 3 .ie \n(.g .ds Aq \(aq 4 .el .ds Aq ' 5 .nh 6 .ad l 7 .\" Begin generated content: 8 .TH "nostril" "1" "1980-01-01" 9 .P 10 .SH NAME 11 .P 12 nostril - generate nostr events 13 .P 14 .SH SYNPOSIS 15 .P 16 \fBnostril\fR [OPTIONS.\&.\&.\&] 17 .P 18 .SH DESCRIPTION 19 .P 20 \fBnostril\fR is a tool that creates and signs nostr events.\& 21 .P 22 .SH OPTIONS 23 .P 24 \fB--content\fR 25 .RS 4 26 The text contents of the note 27 .P 28 .RE 29 \fB--dm\fR <hex pubkey> 30 .RS 4 31 Create a direct message.\& This will create a kind-4 note with the 32 contents encrypted> 33 .P 34 .RE 35 \fB--envelope\fR 36 .RS 4 37 Wrap the event with `["EVENT", .\&.\&.\& ]` for easy relaying 38 .P 39 .RE 40 \fB--kind\fR <number> 41 .RS 4 42 Set the kind of the note 43 .P 44 .RE 45 \fB--created-at\fR <unix timestamp> 46 .RS 4 47 Set the created at.\& Optional, this is set automatically.\& 48 .P 49 .RE 50 \fB--mine-pubkey\fR 51 .RS 4 52 Mine a pubkey.\& This may or may not be cryptographically dubious.\& 53 .P 54 .RE 55 \fB--pow\fR <difficulty> 56 .RS 4 57 Number of leading 0 bits of the id the mine for proof-of-work.\& 58 .P 59 .RE 60 \fB--tag\fR <key> <value> 61 .RS 4 62 Add a tag with a single value 63 .P 64 .RE 65 \fB-t\fR 66 .RS 4 67 Shorthand for --tag t <hashtag> 68 .P 69 .RE 70 \fB-p\fR 71 .RS 4 72 Shorthand for --tag p <hex pubkey> 73 .P 74 .RE 75 \fB-e\fR 76 .RS 4 77 Shorthand for --tag e <note id> 78 .P 79 .P 80 .RE 81 .SH Examples 82 .P 83 \fBGenerate an event\fR 84 .P 85 .nf 86 .RS 4 87 $ \&./nostril --sec <key> --content "this is a message" 88 { 89 "id": "da9c36bb8206e748cf136af2a43613a5ee113cb5906a09a8d3df5386039d53ab", 90 "pubkey": "4f6fa8547cf2888415522918175ea0bc0eb473287c5bd7cc459ca440bdf87d97", 91 "created_at": 1660750302, 92 "kind": 1, 93 "tags": [], 94 "content": "this is a message", 95 "sig": "3e4d7d93522e54f201a22944d4d37eb4505ef1cf91c278a3f7d312b772a6c6509d1e11f146d5a003265ae10411a20057bade2365501872d2f2f24219730eed87" 96 } 97 .fi 98 .RE 99 .P 100 \fBWrap event to send to a relay\fR 101 .P 102 .nf 103 .RS 4 104 $ \&./nostril --envelope --sec <key> --content "hello" 105 [ "EVENT", 106 { 107 "id": "ed378d3fdda785c091e9311c6e6eeb075db349a163c5e38de95946f6013a8001", 108 "pubkey": "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f", 109 "created_at": 1649948103, 110 "kind": 1, 111 "tags": [], 112 "content": "hello", 113 "sig": "9d9a49bbc66d4782030b24c71416965e790214d02a54ab132d960c2b02def0371c3d93e5a60a285c55e99721599d1332450731e2c6bb1114b96b591c6967f872" 114 } ] 115 .fi 116 .RE 117 .P 118 \fBSend to a relay\fR 119 .P 120 .nf 121 .RS 4 122 nostril --envelope --sec <key> --content "this is a message" | websocat wss://relay\&.damus\&.io 123 .fi 124 .RE 125 .P 126 \fBSend a nip04 DM\fR 127 .P 128 .nf 129 .RS 4 130 nostril --envelope --dm <pubkey> --sec <key> --content "this is a secret" | websocat wss://relay\&.damus\&.io 131 .fi 132 .RE 133 .P 134 \fBMine a pubkey\fR 135 .P 136 .nf 137 .RS 4 138 nostril --mine-pubkey --pow <difficulty> 139 .fi 140 .RE 141 .P 142 \fBReply to an event.\& nip10 compliant, includes the `thread_id`\fR 143 .P 144 .nf 145 .RS 4 146 \&./nostril --envelope --sec <key> --content "this is reply message" --tag e <thread_id> --tag e <note_id> | websocat wss://relay\&.damus\&.io 147 .fi 148 .RE