Sign inSign up

bsvb/spv-wallet-web-backend

By bsvb

•Updated over 1 year ago

Referential web wallet backend with storage for custodial wallet's xpriv keys, utilizing a non-custo

Image
0

7.3K

bsvb/spv-wallet-web-backend repository overview

⁠SPV WALLET WEB BACKEND

The spv-wallet-web-backend is an HTTP server that serves as the referential backend server for a custodial web wallet for Bitcoin SV (BSV). It integrates and utilizes the spv-wallet component to handle various BSV-related operations, including the creation of transactions and listing incoming and outgoing transactions.

⁠Running as a Docker Image

To run the spv-wallet-web-backend as a Docker image with custom configuration, you can set the required environment variables using the -e flag. The environment variables will be used by the application to configure various aspects of the backend.

Here's the updated command with environment variables for the Docker container:

docker run -p 8180:8180 -e SPVWALLET_PAYMAIL_DOMAIN=example.com bsvb/spv-wallet-web-backend:latest
⁠Configuration

The spv-wallet-web-backend can be configured using environment variables. Here is a list of available environment variables and their purpose:

Environment VariableDescriptionDefault Value
DB_HOSTDatabase host address.localhost
DB_PORTDatabase port number.5432
DB_USERDatabase username.postgres
DB_PASSWORDDatabase password.postgres
DB_NAMEDatabase name.postgres
DB_SSL_MODEDatabase SSL mode.disable
HTTP_SERVER_READ_TIMEOUTHTTP server read timeout (in seconds).40
HTTP_SERVER_WRITE_TIMEOUTHTTP server write timeout (in seconds).40
HTTP_SERVER_PORTHTTP server port.8180
HTTP_SERVER_COOKIE_DOMAINHTTP server cookie domain parameter.localhost
HTTP_SERVER_COOKIE_SECUREHTTP server cookie secure parameter.false
HTTP_SERVER_CORS_ALLOWED_DOMAINSHTTP server CORS origin allowed domains.[]
SPVWALLET_ADMIN_XPRIVspv-wallet admin xpriv.xprv9s21ZrQH143K3CbJXirfrtpLvhT3Vgusdo8coBritQ3rcS7Jy7sxWhatuxG5h2y1Cqj8FKmPp69536gmjYRpfga2MJdsGyBsnB12E19CESK
SPVWALLET_SERVER_URLspv-wallet server URL.http://localhost:3003/v1
SPVWALLET_WITH_DEBUGEnable debugging for spv-wallet connection.true
SPVWALLET_SIGN_REQUESTEnable signing of all requests for spv-wallet connection.true
SPVWALLET_PAYMAIL_DOMAINspv-wallet paymail domain.example.com
SPVWALLET_PAYMAIL_AVATARspv-wallet paymail avatar URL.http://localhost:3003/static/paymail/avatar.jpg
HASH_SALTHash salt for the application.bux
LOGGING_LEVELLogging level for the running application.Debug
ENDPOINTS_EXCHANGE_RATEExchange rate endpoint URL used in the app.https://api.whatsonchain.com/v1/bsv/main/exchangerate

Tag summary

Content type

Image

Digest

sha256:977f25216…

Size

14.5 MB

Last updated

over 1 year ago

docker pull bsvb/spv-wallet-web-backend