forked from ordinals/ord
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
884 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,48 @@ | ||
Settings | ||
======== | ||
|
||
`ord` can be configured with command line options, environment variables, a | ||
`ord` can be configured with the command line, environment variables, a | ||
configuration file, and default values. | ||
|
||
When multiple sources configure the same thing, precedence is in order of | ||
command line options, then environment variables, then the configuration file, | ||
and finally default values. | ||
The command line takes precedence over environment variables, which take | ||
precedence over the configuration file, which takes precedence over defaults. | ||
|
||
The path to the configuration can be given with `--config <CONFIG_PATH>`. `ord` | ||
will error if `<CONFIG_PATH>` doesn't exist. The path to a configuration | ||
The path to the configuration file can be given with `--config <CONFIG_PATH>`. | ||
`ord` will error if `<CONFIG_PATH>` doesn't exist. The path to a configuration | ||
directory can be given with `--config-dir <CONFIG_DIR_PATH>`, in which case the | ||
config path is `<CONFIG_DIR_PATH>/ord.yaml`. It is not an error if | ||
`<CONFIG_DIR_PATH>/ord.yaml` does not exist, and `ord` will use a configuration | ||
with default values. | ||
`<CONFIG_DIR_PATH>/ord.yaml` does not exist. | ||
|
||
All settings can be configured with command line options, but not all settings | ||
can yet be configured with environmnet variables or a configuration file. | ||
For a setting named `--setting-name` on the command line, the environment | ||
variable will be named `ORD_SETTING_NAME`, and the config file field will be | ||
named `setting_name`. For example, the data directory can be configured with | ||
`--data-dir` on the command line, the `ORD_DATA_DIR` environment variable, or | ||
`data_dir` in the config file. | ||
|
||
`ord`'s configuration can be viewd as JSON with `ord settings`. | ||
See `ord --help` for documentation of all the settings. | ||
|
||
| setting | CLI | environment variable | default value | | ||
| --- | --- | --- | --- | | ||
| bitcoin RPC password | `--bitcoin-rpc-pass <PASSWORD>` | `ORD_BITCOIN_RPC_PASS` | none | | ||
| bitcoin RPC username | `--bitcoin-rpc-user <USERNAME>` | `ORD_BITCOIN_RPC_USER` | none | | ||
| chain | `--chain <CHAIN>` | `ORD_CHAIN` | mainnet | | ||
`ord`'s current configuration can be viewed as JSON with the `ord settings` | ||
command. | ||
|
||
Hiding Inscription Content | ||
-------------------------- | ||
|
||
Inscription content can be selectively prevented from being served by `ord | ||
server`. | ||
|
||
Unlike other settings, this can only be configured with the configuration file | ||
or environment variables. | ||
|
||
To hide inscriptions with an environment variable: | ||
|
||
``` | ||
export ORD_HIDDEN='6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0' | ||
``` | ||
|
||
Or with the configuration file: | ||
|
||
```yaml | ||
hidden: | ||
- 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 | ||
- 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
# Example Config | ||
# example config | ||
|
||
chain: mainnet | ||
|
||
# use username `bar` and password `foo` for bitcoind RPC calls | ||
bitcoin_rpc_user: bar | ||
bitcoin_rpc_pass: foo | ||
# see `ord --help` for setting documentation | ||
|
||
# prevent `ord server` from serving the content of the inscriptions below | ||
bitcoin_data_dir: /var/lib/bitcoin | ||
bitcoin_rpc_password: bar | ||
bitcoin_rpc_url: https://localhost:8000 | ||
bitcoin_rpc_username: foo | ||
chain: mainnet | ||
commit_interval: 10000 | ||
cookie_file: /var/lib/bitcoin/.cookie | ||
data_dir: /var/lib/ord | ||
first_inscription_height: 100 | ||
height_limit: 1000 | ||
hidden: | ||
- 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 | ||
- 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0 | ||
index: /var/lib/ord/index.redb | ||
index_cache_size: 1000000000 | ||
index_runes: true | ||
index_sats: true | ||
index_spent_sats: true | ||
index_transactions: true | ||
integration_test: true | ||
no_index_inscriptions: true | ||
server_password: bar | ||
server_username: foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.