https://github.com/peterhellberg/nostr-json
Generate a nostr.json used for verification of a Nostr user
https://github.com/peterhellberg/nostr-json
Last synced: about 1 year ago
JSON representation
Generate a nostr.json used for verification of a Nostr user
- Host: GitHub
- URL: https://github.com/peterhellberg/nostr-json
- Owner: peterhellberg
- License: mit
- Created: 2023-02-02T15:19:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T15:24:41.000Z (about 3 years ago)
- Last Synced: 2025-01-14T07:11:25.706Z (about 1 year ago)
- Language: Go
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `nostr-json`
Generate a `nostr.json` used for verification of a Nostr user
> **Note**: Should be placed at `/.well-known/nostr.json` on the server you are verifying the name for.
Based on code found in the [nip19](https://github.com/nbd-wtf/go-nostr/tree/master/nip19) package in [github.com/nbd-wtf/go-nostr](https://github.com/nbd-wtf/go-nostr).
## Installation
```sh
go install github.com/peterhellberg/nostr-json@latest
```
## Usage
Call `nostr-json` with the **name** and **npub** you want to generate a JSON document for.
```sh
nostr-json -name peter -npub npub1lzkvkjqs8amrd9m0dmhf4l3wdf7tjawyslrcm96zgttrxzfx9kcsn0dz7s
```
```json
{
"names": {
"peter": "f8accb48103f7636976f6eee9afe2e6a7cb975c487c78d974242d63309262db1"
}
}
```
> **Note**: You can also run the tool without first installing it:
> `go run github.com/peterhellberg/nostr-json@v1.0.0 -name peter -npub npub1lzkvkjqs8amrd9m0dmhf4l3wdf7tjawyslrcm96zgttrxzfx9kcsn0dz7s`
## Links
- [NIP-19](https://github.com/nostr-protocol/nips/blob/master/19.md)
## License (MIT)
Copyright (c) 2023 [Peter Hellberg](https://c7.se)
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.