@tai-network/node
v0.1.1
Published
Tai Node Operator - Run relay infrastructure for decentralized video and earn rewards
Maintainers
Readme
Tai Node Package
CLI tool for running Tai Network relay/caching nodes. Part of the Tai Network ecosystem.
Overview
Node operators provide bandwidth and caching for the Tai Network, earning rewards based on uptime and performance. Nodes serve as the decentralized CDN layer for video delivery.
How It Works
- Stake SUI to register as a node operator
- Run the node to cache and serve video content
- Earn rewards proportional to bandwidth served
Project Structure
Tai-Node-Package/
├── src/ # TypeScript CLI source
├── contract/ # Node operator Move contract
├── scripts/ # Utility scripts
└── dist/ # Compiled outputSmart Contract
Located in /contract/sources/node_operator.move:
- Node registration with staking
- Uptime tracking
- Reward distribution
- Slashing for poor performance
Installation
# From npm (when published)
npm install -g @tai-network/node
# From source
git clone <repo>
cd Tai-Node-Package
npm install
npm run build
npm linkUsage
Start Signaling + TURN
tai-node start --port 8080 --turn-port 3478 --realm tai.ioStart Relay
tai-node relay --port 8081 --walrusRegister Node Operator
tai-node register \
--endpoint wss://relay.example.com:8081 \
--region us-east \
--network testnetCheck Status
tai-node status --network testnetJoin as Agent
tai-node agent \
--config ./agent.config.json \
--room room-123 \
--mode meeting \
--signaling-url ws://localhost:8080Development
# Install dependencies
npm install
# Build CLI
npm run build
# Run locally
npm start
# Run tests
npm testRequirements
- Node.js >= 18
- Sui CLI (for wallet management)
- Minimum 100 SUI stake
- Reliable internet connection
- Sufficient disk space for caching
Configuration
Create .env:
SUI_PRIVATE_KEY=suiprivkey1...
NODE_OPERATOR_PACKAGE_ID=0x...
NODE_OPERATOR_REGISTRY_ID=0x...
# Required for agent mode
AGENT_ID=0x...
SIGNER_KEY=suiprivkey1...
SAI_PACKAGE_ID=0x...
SAI_REGISTRY_ID=0x...
# Optional infra endpoints
WALRUS_AGGREGATOR_URL=https://aggregator.walrus-testnet.walrus.space
WALRUS_PUBLISHER_URL=https://publisher.walrus-testnet.walrus.spaceRelated
- Tai-Live — Streaming platform
- Tai-Meet — Video conferencing
- Tai-SDK — Developer SDK
- Tai-Docs — Documentation
- VISION.md — Node operator vision
License
MIT
