Welcome to Wallet Bot, your trusty service for apps that pay coins! 🚀 This daemon process is your go-to solution for managing private keys within your data center, ensuring your software operations can securely send payments across any peer-to-peer payments network via API. 💸
Users of wallet bot make calls to the Anypay API to create new payments, and their wallet bot daemon fulfills those payments in the background. In this way Wallet Bot users both operate the walletbot server and make calls with walletbot clients.
This project is organized into the following directories and files:
├── src/
│ ├── simple-wallet/
│ ├── server/
│ ├── websockets/
│ └── wallet_bot.ts
│ └── index.ts
│ └── main.ts
├── __tests__/
│ └── *_test.ts
├── package.json
└── app.json
src/simple-wallet/
: Contains typescript framework for a wallet with many asset-specific implementations under src/simple-wallet/src/assetssrc/server/
: Contains optional HTTP API server for direct communication with wallet bot daemon from your apps. Also optionally configures prometheus for metrics and loki for logging.src/websockets/
: Manages websockets connection session to real-time Anypay backend services.__tests__
: Tests are written with mocha and typescriptapp.json
: Configures "Deploy to Heroku" button for running walletbot and the Heroku app platform
Note: Currently only published for x86_64 architecture, not ARM.
docker pull anypay/walletbot:latest
docker run anypay/walletbot
🔗 Here is a full list of available docker image tags
brew tap anypay/walletbot
brew install walletbot
walletbot
To upgrade when a new version is released, run the following command:
brew reinstall walletbot
Using npm:
npm install --global @anypay/walletbot
walletbot
Or with yarn:
yarn global add @anypay/walletbot
walletbot
Ensure to pick the installation method that best fits your workflow. Enjoy using Walletbot! 🎉
To run the test cases run the following command:
npm test
This application connects to the Anypay back end services. An instance of Wallet Bot is also deployed in production and staging environments as an live example.
- Anypay Websockets Production:
wss://wss.anypayx.com
- Anypay API Production:
https://api.anypayx.com
There are several options for debugging and troubleshooting, including reading the log which are written to stdout in json format, configuring the logger to push logs directly to a loki logging server host, scrape metrics using prometheus, or directly modify the code to log in more detail.
Certainly! Here's an elaboration of the "Code Style and Standards" section for your README:
This project follows a consistent code style enforced by Prettier. Prettier is a code formatter that ensures your codebase maintains a uniform style, making it easier to read and maintain.
Before committing any changes to the repository, it's essential to run Prettier to format your code according to the project's standards. You can do this by executing the following command in your terminal:
npm run prettier
This command runs Prettier across your entire codebase, formatting all files according to the rules specified in the project's configuration. It's a good practice to run this command before each commit to ensure that your changes adhere to the established code style guidelines.
The Prettier configuration for this project is defined in the .prettierrc
file located in the root directory. This file specifies various formatting options, such as indentation, line length, and quotation style, to maintain consistency throughout the codebase. If you need to customize the formatting rules, you can modify this configuration file accordingly.
To streamline the development process, you can integrate Prettier with your code editor. Many popular editors, such as Visual Studio Code, Sublime Text, and Atom, offer extensions or plugins that automatically format your code using Prettier as you type. This helps you maintain a consistent code style in real-time, reducing the need for manual formatting.
- Prettier Documentation: Learn more about Prettier and its configuration options.
- Editor Integrations: Find instructions for integrating Prettier with your preferred code editor.
Sure, here's the modified list of commands using Git and GitHub CLI (gh
) with github.com/anypay/walletbot#main
as the base (upstream) repository and branch:
-
Fork the Repository:
gh repo fork anypay/walletbot
-
Clone the Forked Repository:
git clone <your-fork-url>
Replace
<your-fork-url>
with the URL of your forked repository. -
Navigate to the Cloned Repository:
cd <cloned-repo-directory>
Replace
<cloned-repo-directory>
with the directory where the repository was cloned. -
Checkout a New Branch:
git checkout -b <branch-name>
Replace
<branch-name>
with a descriptive name for your new branch. -
Make Changes to the Code:
Modify the files in your local repository as needed.
-
Stage and Commit Changes:
git add . git commit -m "Your commit message"
Replace
"Your commit message"
with a meaningful description of the changes you made. -
Push Changes to Your Fork:
git push origin <branch-name>
Replace
<branch-name>
with the name of the branch you created. -
Create a Pull Request:
gh pr create --base main --head <your-branch>
Replace
<your-branch>
with the name of your branch. -
Follow the Prompt to Create the Pull Request:
The
gh pr create
command will open a text editor where you can provide additional details for your pull request. Follow the instructions provided and save your changes to submit the pull request.
That's it! You've now modified and submitted contributions to the upstream repository using Git and the GitHub CLI (gh
).