Update README.md

This commit is contained in:
Michael Bumann 2023-05-16 17:20:04 +03:00 committed by GitHub
parent a615d8a521
commit 012dbff78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,39 @@
# nostr-wallet-connect
# Nostr Wallet Connect
This service allows you to control your Lightning node or wallet over Nostr.
This application allows you to control your Lightning node or wallet over Nostr.
Connect applications like [Damus](https://damus.io/) or [Amethyst](https://linktr.ee/amethyst.social) to your node.
[Draft NIP](https://github.com/getAlby/nips/blob/master/47.md)
**Specification**: [NIP-47](https://github.com/nostr-protocol/nips/blob/master/47.md)
## Supported Backends
* [Alby](https://getalby.com)
* LND
* [Alby](https://getalby.com) (see: alby.go)
* LND (see: lnd.go)
* want more? please open an issue.
## Installation
### Requirements
The application has no runtime dependencies. (simple Go executable).
As data storage SQLite or PostgreSQL (recommended) can be used.
$ cp .env.example .env
# edit the config for your needs
vim .env
To get a new random Nostr key use `openssl rand -hex 32` or similar.
## Development
`go run .`
To build the CSS run:
`npx tailwindcss -i ./views/application.css -o ./public/css/application.css --watch`
## Configuration parameters
@ -25,31 +51,16 @@ This service allows you to control your Lightning node or wallet over Nostr.
- `DATABASE_URI`: a postgres connection string or sqlite filename. Default: nostr-wallet-connect.db (sqlite)
- `PORT`: the port on which the app should listen on (default: 8080)
## Installation
## Application deeplink options
$ cp .env.example .env
# edit the config for your needs
vim .env
To get a new random Nostr key use `openssl rand -hex 32` or similar.
## Development
`go run .`
To build the CSS run:
`npx tailwindcss -i ./views/application.css -o ./public/css/application.css --watch`
## `/apps/new` deeplink options
### `/apps/new` deeplink options
Clients can use a deeplink to allow the user to add a new connection. Depending on the client this URL has different query options:
### NWC created secret
#### NWC created secret
The default option is that the NWC app creates a secret and the user uses the nostr wallet connect URL string to enable the client application.
#### Query parameter options
##### Query parameter options
- `c`: the name of the client app
@ -57,10 +68,10 @@ Example:
`/apps/new?c=myapp`
### Client created secret
#### Client created secret
If the client creates the secret the client only needs to share the public key of that secret for authorization. The user authorized that pubkey and no sensitivate data needs to be shared.
#### Query parameter options
##### Query parameter options
- `c`: the name of the client app
- `pubkey`: the public key of the client's secret for the user to authorize
- `return_to`: (optional) if a `return_to` URL is provided the user will be redirected to that URL after authorization
@ -69,7 +80,7 @@ Example:
`/apps/new?c=myapp&pubkey=47c5a21...&return_to=https://example.com`
### Web-flow: client created secret
#### Web-flow: client created secret
Web clients can open a new prompt popup to load the authorization page.
Once the user has authorized the app connection a `nwc:success` message is sent to the opening page (using `postMessage`) to indicate that the connection is authorized. See the `initNWC()` function in the [alby-js-sdk](https://github.com/getAlby/alby-js-sdk#nostr-wallet-connect-documentation)