How To Run
Running SPV Wallet
To run SPV Wallet locally the easiest way is to use provided start.sh
script.
This script will start SPV Wallet with default configuration letting you to provide your own xPub and xPriv. When launching it will ask you several questions about services you want to use - so step by step this is how it looks like:
Note: You can read more about SPV Wallet Admin here
Note: If you want to read about Block Headers Service role in SPV -> go here
Required subdomains (if you are exposing the services on subdomains)
SPV Wallet -> wallet.$paymail_domain
SPV Wallet Web Backend -> api.$paymail_domain
Block Headers Service -> headers.$paymail_domain
SPV Wallet Admin -> admin.$paymail_domain
Few notes to highlight: $paymail_domain is a domain you registered for paymails.
It is taken from the script.sh ->
After you finish your configuration, you can access your SPV Wallet by calling:
wallet.example.com
when example.com is your paymail domain.
Paymail domain
Paymail domain mentioned in the script is a domain you registered for paymails. When you transfer your funds the transaction begins with checking paymail capabilities for provided domain.
To work with paymail locally, you can use services like ngrok or localtunnel.
Paymail itself is described in this document.
Example of running SPV Wallet
Launch Verification
SPV Wallet by default is running on port 3003
and you can access it by http://localhost:3003
(if you run it locally). After calling this address you should see this:
Databases
SPV Wallet needs to have database connection where SPV Wallet engine can store data. Currently, it supports:
SQLite,
PostgreSQL,
MySQL (experimental),
MongoDB (experimental).
Database connection, like everything in SPV Wallet, is defined in config files.
You can find extended description of SPV Wallet Engine database here
Paymail
Before starting SPV Wallet you need to have a paymail domain properly configured. At first it is necessary to add SRV record to domain which you want to use as paymail domain. This record will be used for service discovery by Paymail clients - pointing them to your host.
Example of SRV record:
More information about setting up SRV record here\
After setting up SRV record you need to activate DNSSEC for your domain. DNSSEC, short for Domain Name System Security Extensions, is a set of security measures designed to add cryptographic integrity to the Domain Name System (DNS). DNSSEC aims to provide authentication and data integrity to DNS responses, protecting against various types of attacks such as DNS spoofing and cache poisoning.
Note: it is possible to use subdomains as paymail domains e.g.
paymail1.spvwallet.com
paymail2.spvwallet.com
...
Paymails follow the same format as email addresses {handle}@{domain.tld} e.g. example@spvwallet.com
. This is used to address a particular user within a particular domain.
Clients
To use SPV Wallet you can choose between provided clients.
Three options are available:
spv-wallet-go-client - Golang
spv-wallet-js-client - JavaScript
spv-wallet-admin-keygen - SPV Wallet Admin Keygen
Last updated