mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
Introduces the flat ErrorMessage envelope builder with BAPI_SEND_REPORT / BAPI_SEND_TRACE gating (report/trace off by default), plus the design spec and implementation plan for the consistent-error-responses work. Fixes #148 Fixes #123 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
161 lines
5.6 KiB
Text
161 lines
5.6 KiB
Text
BAPI_JWT_SECRET=please_please_update_me_please
|
|
BAPI_JWT_ALGORITHM=HS256
|
|
# token lifetime in seconds (3600 = 1 hour)
|
|
BAPI_JWT_EXPIRY_TIME=3600
|
|
|
|
# Set the ASGI root_path for applications submounted below a given URL path.
|
|
BAPI_ROOT_PATH = "/"
|
|
|
|
# the log level
|
|
# values [TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL]
|
|
# default: INFO
|
|
BAPI_LOG_LEVEL=INFO
|
|
|
|
# the log file, comment or set empty to turn of file logging
|
|
# default: blitz_api.log
|
|
# BAPI_LOG_FILE=blitz_api.log
|
|
|
|
# Enable this if you want to run blitz_gui locally.
|
|
# This will create a file called ~/blitz_api/.cookie with a
|
|
# JWT token.
|
|
# BAPI_ENABLE_LOCAL_COOKIE_AUTH = false
|
|
|
|
# Platform tells the backend on what kind of system it is running on.
|
|
# Different platforms might use different data sources and might yield
|
|
# different kinds of data. E.g.: If set to "raspiblitz",then hardware
|
|
# information will be fetched from Redis instead of the native python implementation.
|
|
# In case of native_python set other optional config vars np_* further below.
|
|
# supported values: [raspiblitz, native_python]
|
|
# BAPI_PLATFORM=raspiblitz
|
|
|
|
# Amount of seconds the app will wait until it'll
|
|
# send another hardware update
|
|
# only applies when platform=native_python
|
|
BAPI_GATHER_HW_INFO_INTERVAL = 2
|
|
|
|
# Amount of seconds the app will gather CPU usage data for each update
|
|
# The resulting CPU usage is averaged over this period of time.
|
|
# To get realistic results at least 0.1 seconds is recommended
|
|
# must be less than and not equal to BAPI_GATHER_HW_INFO_INTERVAL
|
|
# only applies when platform=native_python
|
|
BAPI_CPU_USAGE_AVERAGING_PERIOD = 0.5
|
|
|
|
# Poll interval in seconds to gather lightning information and push it via SSE
|
|
# only applies when platform=native_python
|
|
BAPI_GATHER_LN_INFO_INTERVAL = 5.0
|
|
|
|
# The API can push successful forwards to SSE client. On big nodes
|
|
# this can cause lots of traffic. Turn this on if updates are required.
|
|
# default: false
|
|
# BAPI_SSE_NOTIFY_FORWARD_SUCCESSES=false
|
|
|
|
# If set to 0 all forward event will be sent instantly, otherwise they'll
|
|
# be gathered and sent as an array of notifications.
|
|
# This also affects how often the wallet balance is updated (even if SSE_NOTIFY_FORWARD_SUCCESSES is false)
|
|
# default: 2.0 seconds
|
|
# minimum: 0.3 seconds
|
|
# BAPI_FORWARDS_GATHER_INTERVAL=2
|
|
|
|
# Redis - uncomment if Redis runs with non standard values (i.e. in Docker etc)
|
|
# BAPI_REDIS_URL=redis://127.0.0.1:6379/0
|
|
|
|
|
|
# mainnet, testnet or regtest
|
|
BAPI_NETWORK=testnet
|
|
BAPI_BITCOIND_ADDRESS=192.168.1.18
|
|
# Defaults:
|
|
# MAINNET=8332 (default)
|
|
# TESTNET=18332
|
|
# REGTEST=28332
|
|
BAPI_BITCOIND_PORT_RPC=8332
|
|
|
|
# The API can either hashblock OR rawblock to be notified of new blocks.
|
|
# Hashblock is a bit faster, so it should be used if possible.
|
|
BAPI_BITCOIND_ZMQ_BLOCK_RPC="hashblock"
|
|
BAPI_BITCOIND_ZMQ_BLOCK_PORT=28332
|
|
BAPI_BITCOIND_USER=raspibolt
|
|
BAPI_BITCOIND_RPC_PW=please_please_update_me_please
|
|
|
|
# lnd_grpc, cln_jrpc, cln_grpc, none
|
|
# Please refer to the documentation for the install procedure
|
|
# for each implementation.
|
|
BAPI_LN_NODE=lnd_grpc
|
|
|
|
# Get hex string via command line: xxd -p -c2000 file.macaroon
|
|
# LND macaroon in HEX format, or a path to the .macaroon file
|
|
BAPI_LND_MACAROON="0201036...2211 or /path/to/admin.macaroon"
|
|
BAPI_LND_CERT="2d2d2d2d2d...d2d2d2d0a or /path/to/tls.cert"
|
|
BAPI_LND_GRPC_IP=192.168.1.18
|
|
BAPI_LND_GRPC_PORT=10009
|
|
|
|
# cln json rpc - path to the socket file
|
|
BAPI_CLN_JRPC_PATH="/mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc"
|
|
|
|
# CLN grpc connection data, cert files are in .lightning data folder
|
|
# file contents in HEX format, or a path to the file
|
|
BAPI_CLN_GRPC_CERT="2d2d2d2d2d...d2d2d2d0a or /path/to/client.pem"
|
|
BAPI_CLN_GRPC_KEY="2d2d2d2d2d...d2d2d2d0a or /path/to/client-key.pem"
|
|
BAPI_CLN_GRPC_CA="2d2d2d2d2d...d2d2d2d0a or /path/to/ca.pem"
|
|
BAPI_CLN_GRPC_IP=127.0.0.1
|
|
BAPI_CLN_GRPC_PORT=9537
|
|
|
|
########################
|
|
# RaspiBlitz env varables
|
|
########################
|
|
|
|
# Path to the shell script root folder
|
|
BAPI_RB_SHELL_SCRIPT_PATH="/home/admin"
|
|
|
|
########################
|
|
# native python env varables
|
|
########################
|
|
|
|
# login password for the native_python system implementation
|
|
# ATTN: https://github.com/fusion44/blitz_api/issues/255
|
|
# BAPI_NATIVE_LOGIN_PASSWORD=12345678
|
|
|
|
# Tor url of api endpoint. Ignored on platform Raspiblitz
|
|
# Defaults to empty string
|
|
# BAPI_NP_TOR_ADDRESS_API_ENDPOINT="address.onion/api"
|
|
|
|
# Tor url of the api docs. Ignored on platform Raspiblitz
|
|
# Defaults to empty string
|
|
# BAPI_NP_TOR_ADDRESS_API_DOCS="address.onion/latest/docs"
|
|
|
|
# Local LAN url of api endpoint. Ignored on platform Raspiblitz
|
|
# Defaults to empty string
|
|
# BAPI_NP_LOCAL_ADDRESS_API_DOCS="address.onion/api"
|
|
|
|
# Local LAN of the api docs. Ignored on platform Raspiblitz
|
|
# Defaults to empty string
|
|
# BAPI_NP_LOCAL_ADDRESS_API_DOCS="address.onion/latest/docs"
|
|
|
|
# SSH login address. Ignored on platform Raspiblitz
|
|
# Defaults to empty string
|
|
# BAPI_NP_SSH_ADDRESS="username@192.168.1.50"
|
|
|
|
# Version of the platform. Ignored on platform Raspiblitz
|
|
# BAPI_NP_VERSION ="v0.5.1beta"
|
|
|
|
# Enable remote debugging for the server.
|
|
#
|
|
# !!! Only enable this on development machines. !!!
|
|
#
|
|
# Note the package debugpy must be installed manually, if set to True
|
|
# More info: https://github.com/fusion44/blitz_api/issues/206
|
|
# Defaults to false
|
|
# BAPI_REMOTE_DEBUGGING=false
|
|
|
|
# Defaults to 5678
|
|
# BAPI_REMOTE_DEBUGGING_PORT=5678
|
|
|
|
|
|
# Define how often the cache should be considered stale
|
|
BAPI_APP_STATUS_UPDATE_INTERVAL_MIN = 30
|
|
BAPI_CACHE_TTL_SECONDS = 2100
|
|
BAPI_LOCK_TTL_SECONDS = 300
|
|
|
|
# Include the verbose "report" and/or "trace" fields in error responses.
|
|
# These may contain file paths and stack traces - keep off in production.
|
|
# BAPI_SEND_REPORT=false
|
|
# BAPI_SEND_TRACE=false
|