For the Web and Node.js
Prerequisites
- Node.js installed -
v22.0.0 is highly recommended.
- Basic knowledge of JavaScript and async functions
- An internet connection to access the Bitaps API
Introduction
This tutorial covers the following areas:
1. Wallet
Wallet
- Creating a wallet - Seedphrases
- Importing a wallet from Seedphrase (account 0 - account 9)
- Importing a wallet from WIF private key
2. Transactions
Transactions
- Transaction fees
- Creating Transaction Objects
- Signing a Transaction with a Private Key
- Encoding Transaction objects into Hex format
- Decoding Transaction objects to JSON format
- Broadcasting signed Transactions to the Bitgesell Mainnet
3. UTXOs
UTXOs
- Fetching address UTXOs
- Adding UTXOs to a Transaction object
4. Balances
Balances
- Fetching address balances
- Handling BGL units with bgl-units/satoshi-bitcoin library
5. Explorer
Explorer
- Fetching Transaction History using axios/fetch
- Displaying Transaction list
6. RPC
Bitgesell
RPC
- RPC Nodes for Bitgesell
- A basic example interacting with RPC
Examples
All examples are under the src/ directory, with each tutorial provided in its respective
subdirectory.
How to Run Each Example
Ensure the following are installed:
- Node.js
- NPM (comes bundled with Node.js)
Running an Example
Navigate to the tutorial directory and run:
cd src/wallet
node index.js
Feel free to modify and play around with the functions to observe the console outputs.