Self-custody, headless wallet service that runs as a daemon process within your data center. It manages your software operation's private keys so that your apps can securely send payments on any peer to peer payments network.
The application runs as a long-running process which should be managed by k8s, docker, or your system service manager such as systemd or similar. It may be run in a node.js environment or as an isolated docker container. The single process requires no additional services such as database servers to be run.
> brew tap anypay/walletbot
> brew install walletbot
> npm install -g @anypay/walletbot
Usage: walletbot [options] [command]
Options:
-V, --version output the version number
-s --seed-phrase <seed_phrase> 12-work seed phrase for wallet bot
-t --auth-token <auth_token> anypay api auth token for wallet bot
-a --api-base <api_base> anypay walletbot backend api base url
-p --prometheus-enabled <prometheus_enabled> enable prometheus metrics
-w --websocket-url <websocket_url> url for websockets connection to server
-e --websocket-enabled <websocket_enabled> true or false, connect to websocket server
-h, --help display help for command
Commands:
start
seed-phrase
list-balances
help [command] display help for command
> walletbot seed-phrase
> walletbot start \
--seed-phrase="replace this with your twelve word seed phrase to start sending payments" \
--auth-token=replacewith-your-anypay-apiauthtoken
In the same terminal shell tab or shell script first export the required environment variables, then you can run walletbot without providing the equivalent command line arguments.
export WALLETBOT_SEED_PHRASE="replace this with your twelve word seed phrase to start sending payments"
export WALLETBOT_AUTH_TOKEN=replacewith-your-anypay-apiauthtoken
walletbot start
Usage: walletbot new-payment [options] [template]
Options:
-v --value <value> value amount to pay in the quote currency (default to satoshis)
-q --quote <currency> quote currency for determining the amount
-a --address <address> address to send payment to
-c --currency <currency> bitcoin currency to pay in
-b --blockchain <blockchain> blockchain to pay on
-w --webhook-url <webhook_url> url of server to send payment notification
-h, --help display help for command
> walletbot new-payment \
--address=12syqu1XwFzGVqTTK5U6EkJaqq2FPeLmRH \
--quote=USD \
--value=1.99 \
--currency=BSV
result:
{
id: 166150,
app_id: 160,
template: [ { currency: 'BSV', to: [Array] } ],
status: 'unpaid',
updatedAt: '2024-04-04T12:28:11.273Z',
createdAt: '2024-04-04T12:28:11.251Z',
invoice_uid: 'F28WujS5X',
webpage_url: 'https://anypayx.com/i/F28WujS5X',
uri: 'pay:?r=https://anypayx.com/r/F28WujS5X',
uid: 'F28WujS5X'
}
import { WalletBot } from '@anypay/walletbot'
const walletBot = new WalletBot({
seed_phrase: "replace this with your twelve word seed phrase to start sending payments",
auth_token: "replacewith-your-anypay-apiauthtoken"
})
walletBot.start()
docker run anypay/walletbot
To run tests run npm run test
To commit new code run npm run commit