Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@anypay/walletbot

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anypay/walletbot

Your Money-Sending Robot Friend

npmnpm
Version
0.9.1
Version published
Weekly downloads
12
-72.09%
Maintainers
2
Weekly downloads
 
Created
Source

Wallet Bot

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.

Installation and Setup

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.

Running in Nodejs (Typescript)

import { WalletBot } from '@anypay/walletbot'

export async function start() {

  const walletBot = new WalletBot({
    seed_phrase: process.env.WALLET_BOT_BACKUP_SEED_PHRASE,
    anypay_token: process.env.ANYPAY_ACCESS_TOKEN
  })

  walletBot.start()

}

if (require.main === module) {

  start()

}

Running with Docker

docker pull anypay/wallet-bot

Setting Up Wallet Keys

Rather than managing your own private key generation and backup, allow wallet bot to generate keys offline and automatically output a wallet-bot.json config file for you. Simply save a copy of this file to your organizations' vaults to restore funds in case of a machine failure.

docker run anypay/wallet-bot new_wallet > wallet-bot.json

You may view with cat wallet-bot.json that one private key has been created for each of the supported coins.

Alternatively you may provide your own wallet keys using the Wallet Import Format (WIF) inside wallet-bot.json.

Running the Service

To run with wallet-bot.json config file:

docker run \
  -v /path/to/wallet-bot.json:/etc/wallet-bot/wallet-bot.json \
  anypay/wallet-bot start

To run with environment variables:

docker run --env-file=/path/to/.env anypay/wallet-bot start

You may also combine some variables from one method with others from the other method.

Configuration

Wallets and system settings may be configured by a combination of json config files, environment variables, and command line flags. All variables may be provided by either of the config variations.

Environment Variables

*required

Variable nameDescription
ANYPAY_API_TOKEN *https://anypayx.com/dashboard/developer/wallet-bot
SLACK_WEBHOOK_URLWill receive Slack-formatted messages on certain events
WEBHOOK_URLWill receive messages on certain events
LOG_LEVEL[error, debug, info, warn] defaults to info
BSV_PRIVATE_KEYPrivate signing key to BSV wallet
BTC_PRIVATE_KEYPrivate signing key to BTC wallet
BCH_PRIVATE_KEYPrivate signing key to BCH wallet
DASH_PRIVATE_KEYPrivate signing key to DASH wallet
DOGE_PRIVATE_KEYPrivate signing key to DOGE wallet
LTC_PRIVATE_KEYPrivate signing key to LTC wallet
ZEC_PRIVATE_KEYPrivate signing key to ZEC wallet

Configuration should be provided by a file mounted at /etc/wallet-bot/wallet-bot.json

Testing

To run tests run npm run test

Development

To commit new code run npm run commit

FAQs

Package last updated on 29 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts