
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
custodial-wallet
Advanced tools
This Node.js application tracks native cryptocurrency balances (such as ETH, BNB, MATIC, TRX) and specific token balances (ERC-20, BEP-20, TRC-20) for given wallet addresses on Ethereum, Binance Smart Chain (BSC), Polygon, and Tron networks.
This Node.js application tracks native cryptocurrency balances (such as ETH, BNB, MATIC, TRX) and specific token balances (ERC-20, BEP-20, TRC-20) for given wallet addresses on Ethereum, Binance Smart Chain (BSC), Polygon, and Tron networks.
Clone the repository:
git clone https://github.com/yourusername/blockchain-balance-tracker.git
cd blockchain-balance-tracker
Install dependencies:
npm install
Start the server:
node index.js
The server will start running on http://localhost:3000
.
/create-wallet
GET
Example Response:
{
"bsc": {
"address": "0xYourBscOrPolygonAddress",
"privateKey": "YourPrivateKey"
},
"polygon": {
"address": "0xYourPolygonAddress",
"privateKey": "YourPrivateKey"
},
"tron": {
"address": "TYourTronAddress",
"privateKey": "YourPrivateKey"
}
}
Start Tracking
URL: /start-tracking
Method: GET
Query Parameters: address: The Ethereum/BSC/Polygon wallet address. tronAddress: The Tron wallet address. tokenAddress: The smart contract address of the token you want to track. tokenType: The type of token (ERC20, BEP20, TRC20).
Description: Starts tracking native and token balances for the specified wallet addresses.
Example Request:
sql
GET /start-tracking?address=0xYourBscOrPolygonAddress&tronAddress=YourTronAddress&tokenAddress=0xYourTokenAddress&tokenType=ERC20
Example Response:
json
{ "message": "Started tracking payments and token balance for address 0xYourBscOrPolygonAddress", "balances": { "bsc": "0.1234", "polygon": "0.5678", "tron": "9.8765", "token": "1000.00" } }
Check All Balances
URL: /check-all-balances
Method: GET
Query Parameters: address: The Ethereum/BSC/Polygon wallet address. tronAddress: The Tron wallet address. tokenAddress: The smart contract address of the token you want to track. tokenType: The type of token (ERC20, BEP20, TRC20).
Description: Manually checks and returns the current balances for native currencies and specified tokens.
Example Request:
sql
GET /check-all-balances?address=0xYourBscOrPolygonAddress&tronAddress=YourTronAddress&tokenAddress=0xYourTokenAddress&tokenType=ERC20
Example Response:
json
{ "message": "Balances for address 0xYourBscOrPolygonAddress", "balances": { "bsc": "0.1234", "polygon": "0.5678", "tron": "9.8765", "token": "1000.00" } }
The server will automatically track and log new payments and token balance changes every minute.
Polling Interval: Every 60 seconds.
How It Works
Create Wallets: You can generate new wallet addresses for BSC, Polygon, and Tron using the /create-wallet endpoint.
Start Tracking: Start tracking a wallet's native and token balances using the /start-tracking endpoint.
Check Balances: Manually check all balances using the /check-all-balances endpoint.
Automatic Tracking: The server checks for new payments and token balance changes every minute and logs any changes.
Limitations
The application currently tracks only one token at a time per request.
For tracking multiple tokens automatically, integration with an external service like Etherscan or BscScan would be required to fetch all tokens associated with a wallet.
Future Enhancements
Automatic tracking of all tokens held by a wallet address.
Integration with external APIs to fetch and display all tokens associated with a wallet.
Enhanced error handling and logging.
Contributing
Contributions are welcome! Please open an issue or submit a pull request to contribute to this project. License
This project is licensed under the MIT License.
css
This README.md
file provides a clear and concise overview of how your application works, how to use it, and what features it provides. You can customize it further based on your specific requirements and add any additional sections that are relevant to your project.
FAQs
This Node.js application tracks native cryptocurrency balances (such as ETH, BNB, MATIC, TRX) and specific token balances (ERC-20, BEP-20, TRC-20) for given wallet addresses on Ethereum, Binance Smart Chain (BSC), Polygon, and Tron networks.
The npm package custodial-wallet receives a total of 6 weekly downloads. As such, custodial-wallet popularity was classified as not popular.
We found that custodial-wallet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.