Last updated
Was this helpful?
Last updated
Was this helpful?
This guide will help you to know the most important configuration options for SPV Wallet.
Environment variables - the environment variables are prefixed with SPVWALLET_
and are in uppercase. They have the highest priority when resolving the configuration.
Configuration file - the configuration file is resolved next. The default configuration file is config.yaml
in the working directory. You can also specify custom configuration file path using C flag in the command line.
If you don't specify the configuration file and environment variables, the default configuration will be used - it's resolved in defaults.go
file in the config
package. Default configuration from defaults.go
is the same as the configuration from config.example.yaml
.
We store the configuration in a file called config.example.yaml
in the root of the project. You can copy this file to config.yaml
and modify it to your needs.
The most important configuration options are:
Going throught highlighted options:
The auth
section contains the admin_key
which is used for admin api authentication. This key is used to authenticate the admin api calls.
The cache
section contains the engine
option which can be set to freecache
or redis
. The freecache
is the default option.
The db
section contains the datastore
section which contains the engine
option which can be set to sqlite
or postgresql
. The sqlite
is the default option. You can also define details about your database in this section.
The arc
section contains:
the url
and token
which are used for getting and broadcasting transactions.
the callback
section which is used to receive notifications about broadcasted transactions from ARC.
the deployment_id
option is used to define the deployment id used annotating api calls in XDeployment-ID header. This value will be randomly generated if not set.
The custom_fee_unit
option is used for transaction fee calculation. The fee_unit
option is used as the fee value if custom_fee_unit
is configured.
The block_headers_service
section contains the auth_token
and url
options used to communicate with Block Headers Service to make SPV.
Callback is an Arc feature that allows the wallet to receive notifications about broadcasted transactions. It is useful because it limits the need for polling the node for transaction status.
The paymail
section contains the domains
option which is used to define the list of domains.
The beef
section with the use_beef
option is used to enable or disable beef paymail capability support.
The metrics
section allows to enable or disable Prometheus metrics.
You can also set the configuration options using environment variables. The environment variables are prefixed with SPVWALLET_
and are in uppercase. For example, the auth.admin_key
can be set using the SPVWALLET_AUTH_ADMIN_KEY
environment variable.
You can read more about the SPV and BEEF in the section.