@velocity-bpa/n8n-nodes-bittensor
v1.0.0
Published
n8n community node for Bittensor API integration
Downloads
137
Readme
n8n-nodes-bittensor
[Velocity BPA Licensing Notice]
This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
For licensing information, visit https://velobpa.com/licensing or contact [email protected].
An n8n community node for integrating with the Bittensor decentralized AI network. This node provides access to 5 core resources including subnet management, validator operations, staking mechanisms, delegation processes, and network monitoring capabilities for building automated workflows with the Bittensor ecosystem.
Features
- Subnet Management - Create, monitor, and manage Bittensor subnets with automated workflows
- Validator Operations - Register, query, and manage validator nodes across the network
- Staking Integration - Automate staking operations and monitor staking rewards
- Delegation Control - Manage stake delegation to validators with automated rebalancing
- Network Monitoring - Track network metrics, subnet performance, and validator statistics
- Real-time Data - Access live network data for informed decision making
- Batch Operations - Perform bulk operations across multiple subnets and validators
- Error Recovery - Built-in retry mechanisms and error handling for network operations
Installation
Community Nodes (Recommended)
- Open n8n
- Go to Settings → Community Nodes
- Click Install a community node
- Enter
n8n-nodes-bittensor - Click Install
Manual Installation
cd ~/.n8n
npm install n8n-nodes-bittensorDevelopment Installation
git clone https://github.com/Velocity-BPA/n8n-nodes-bittensor.git
cd n8n-nodes-bittensor
npm install
npm run build
mkdir -p ~/.n8n/custom
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-bittensor
n8n startCredentials Setup
| Field | Description | Required | |-------|-------------|----------| | API Key | Your Bittensor network API key for authentication | Yes | | Network | Target network (mainnet/testnet) | Yes | | Endpoint | Custom endpoint URL (optional) | No |
Resources & Operations
1. Subnet
| Operation | Description | |-----------|-------------| | Create | Create a new subnet on the Bittensor network | | Get | Retrieve subnet information and metadata | | List | Get all subnets with filtering options | | Update | Modify subnet parameters and configuration | | Delete | Remove a subnet from the network | | Get Metrics | Retrieve subnet performance metrics |
2. Validator
| Operation | Description | |-----------|-------------| | Register | Register a new validator node | | Get | Get validator details and status | | List | List validators with filtering by subnet | | Update | Update validator configuration | | Deregister | Remove validator from network | | Get Performance | Retrieve validator performance data | | Set Weights | Update validator weights |
3. Staking
| Operation | Description | |-----------|-------------| | Stake | Stake TAO tokens to validators | | Unstake | Remove staked tokens | | Get Balance | Check staking balance | | Get Rewards | Retrieve staking rewards history | | Get History | Get complete staking transaction history | | Claim Rewards | Claim pending staking rewards |
4. Delegation
| Operation | Description | |-----------|-------------| | Delegate | Delegate stake to a validator | | Undelegate | Remove delegation from validator | | Get Delegations | List all active delegations | | Transfer | Transfer delegation between validators | | Get Returns | Calculate delegation returns | | Rebalance | Automatically rebalance delegations |
5. Network
| Operation | Description | |-----------|-------------| | Get Status | Get overall network status | | Get Metrics | Retrieve network-wide metrics | | Get Blocks | Get recent block information | | Get Transactions | List recent transactions | | Get Difficulty | Get current mining difficulty | | Get Supply | Get total TAO supply information |
Usage Examples
// Create a new subnet
{
"name": "AI Training Subnet",
"netuid": 42,
"tempo": 100,
"immunity_period": 7200
}// Stake TAO to a validator
{
"validator_hotkey": "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY",
"amount": 1000,
"subnet_id": 1
}// Query network metrics
{
"metrics": ["total_stake", "active_validators", "subnet_count"],
"timeframe": "24h"
}// Delegate stake with auto-rebalancing
{
"validators": [
{"hotkey": "5GNJq...", "percentage": 60},
{"hotkey": "5HKLp...", "percentage": 40}
],
"total_amount": 5000,
"auto_rebalance": true
}Error Handling
| Error | Description | Solution | |-------|-------------|----------| | Invalid API Key | Authentication failed | Verify API key in credentials | | Network Timeout | Request timed out | Check network connectivity and retry | | Insufficient Balance | Not enough TAO for operation | Check wallet balance before staking | | Validator Not Found | Validator hotkey invalid | Verify validator exists and is active | | Subnet Full | No available slots in subnet | Wait for slot availability or try another subnet | | Rate Limit Exceeded | Too many requests | Implement delays between requests |
Development
npm install
npm run build
npm test
npm run lint
npm run devAuthor
Velocity BPA
- Website: velobpa.com
- GitHub: Velocity-BPA
Licensing
This n8n community node is licensed under the Business Source License 1.1.
Free Use
Permitted for personal, educational, research, and internal business use.
Commercial Use
Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
For licensing inquiries: [email protected]
See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.
Contributing
Contributions are welcome! Please ensure:
- Code follows existing style conventions
- All tests pass (
npm test) - Linting passes (
npm run lint) - Documentation is updated for new features
- Commit messages are descriptive
Support
- Issues: GitHub Issues
- Bittensor Docs: Bittensor Documentation
- Community: Bittensor Discord
