7
docs/config/README.md
Normal file
7
docs/config/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Manage Configuration
|
||||
|
||||
Configuration allows you to set default values for various command parameters,
|
||||
such as fallback relays, Proof of Work (PoW) difficulty, a default bunker URL,
|
||||
and your Nostr private key (keyring). This avoids the need to enter your private key,
|
||||
bunker URL, relays, or PoW difficulty for every command, making `n34` more
|
||||
convenient to use.
|
||||
27
docs/config/bunker.md
Normal file
27
docs/config/bunker.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# NIP-46 Bunker
|
||||
|
||||
> `n34 config bunker` command
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
Sets a URL of NIP-46 bunker server used for signing events
|
||||
|
||||
Usage: n34 config bunker [BUNKER_URL]
|
||||
|
||||
Arguments:
|
||||
[BUNKER_URL] Nostr Connect URL for the bunker. Omit this to remove the current bunker URL
|
||||
```
|
||||
|
||||
This command configures `n34` to use a remote signer ([NIP-46]), known as a
|
||||
bunker, for all cryptographic operations.
|
||||
|
||||
When `n34` communicates with the bunker, it uses a persistent, locally-generated
|
||||
keypair. You should add this keypair's public key to your bunker's list of
|
||||
authorized applications. This allows `n34` to operate securely without needing
|
||||
direct access to your main private key.
|
||||
|
||||
Once configured, actions such as fetching your public key or signing events are
|
||||
delegated to the bunker. To remove the bunker configuration, run the command
|
||||
again without providing a URL.
|
||||
|
||||
[NIP-46]: https://github.com/nostr-protocol/nips/blob/master/46.md
|
||||
27
docs/config/keyring.md
Normal file
27
docs/config/keyring.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Secret Key Keyring
|
||||
|
||||
> `n34 config keyring` command
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
Manages the secret key keyring, including enabling, disabling, or resetting it.
|
||||
|
||||
Usage: n34 config keyring <--enable|--disable|--reset>
|
||||
|
||||
Options:
|
||||
--enable Enables the secret key keyring. You will be prompted for your key one last time to store it.
|
||||
--disable Disables the secret key keyring. This removes the stored key and prevents new ones from being saved.
|
||||
--reset Resets the keyring. This deletes the current key, allowing a new one to be stored on the next use.
|
||||
```
|
||||
|
||||
To avoid entering your private key for every command, you can enable the keyring
|
||||
to store it securely. First, run `n34 config keyring --enable`. The next time
|
||||
you run an `n34` command that requires your private key, it will be saved
|
||||
to your system's keyring. You will not need to enter it again for subsequent
|
||||
commands.
|
||||
|
||||
To replace the stored key with a new one, use the `--reset` flag. To stop using
|
||||
the keyring and remove the stored key, use the `--disable` flag.
|
||||
|
||||
`n34` uses your operating system's native secret management system. For example,
|
||||
it uses `keyutils` on Linux and `Keychain` on macOS.
|
||||
20
docs/config/pow.md
Normal file
20
docs/config/pow.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Default PoW Difficulty
|
||||
|
||||
> `n34 config pow`
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
Sets the default PoW difficulty (0 if not specified)
|
||||
|
||||
Usage: n34 config pow <DIFFICULTY>
|
||||
|
||||
Arguments:
|
||||
<DIFFICULTY> The new default PoW difficulty
|
||||
```
|
||||
|
||||
This command configures the default Proof of Work (PoW) difficulty for newly
|
||||
created events. This setting is applied to most generated events, but it
|
||||
intentionally skips patch events. Because patches can be numerous, calculating
|
||||
PoW for each one would significantly slow down operations.
|
||||
|
||||
If you want to disable the PoW just make it 0.
|
||||
21
docs/config/relays.md
Normal file
21
docs/config/relays.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Fallback Relays
|
||||
|
||||
> `n34 config relays` command
|
||||
|
||||
**Usage:**
|
||||
```
|
||||
Sets the default fallback relays if none provided. Use this relays for read and write
|
||||
|
||||
Usage: n34 config relays [OPTIONS] [RELAYS]...
|
||||
|
||||
Arguments:
|
||||
[RELAYS]... List of relay URLs to append to fallback relays. If empty, removes all fallback relays
|
||||
|
||||
Options:
|
||||
--override Replace existing fallback relays instead of appending new ones
|
||||
```
|
||||
|
||||
This command configures the default fallback relays, which `n34` uses to read
|
||||
from and write to. To add relays, provide their URLs as arguments to append
|
||||
them to the current list. Use the `--override` flag to replace the existing list
|
||||
entirely. To clear all fallback relays, run the command without any arguments.
|
||||
Reference in New Issue
Block a user