Skip to content

0rkz/ppb-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ppb-cli -- legacy v0 protocol operator CLI

Scope note. This is a legacy v0 protocol operator tool. It is NOT part of the BYTE Library v1.

BYTE is the verified, provenance-first data layer for AI agents. BYTE Library v1 ships 3 contracts, has no token (settlement is in USDC), and is testnet-live on Arbitrum with mainnet audit-gated. The relay/validator registries and the token operations described below were part of an earlier v0 protocol design and are not deployed as part of BYTE Library v1. They are documented here for historical/operator reference only. Do not treat the token or the registries below as current BYTE capabilities.

Command-line tool from the earlier v0 protocol design, for operators interacting with the legacy relay/validator/token contracts on Arbitrum.

Features (legacy v0)

These commands target the earlier v0 contracts and are not part of BYTE Library v1.

  • Relay management -- register, deregister, query status, send heartbeats
  • Validator management -- register, deregister, query status
  • Indexer monitoring -- check indexer health and sync status
  • Token operations -- check balance, manage approvals (legacy v0 token; BYTE has no token and settles in USDC)

Installation

cargo build --release

The binary will be at target/release/ppb-cli.

Configuration

Variable CLI Flag Description Default
PRIVATE_KEY --key Operator wallet private key (hex) --
RPC_URL --rpc Arbitrum RPC endpoint Arbitrum Sepolia public RPC
PPB_TOKEN -- Legacy v0 token contract address (not used by BYTE Library v1) Sepolia deployment
RELAY_REGISTRY -- Legacy v0 RelayRegistry contract address Sepolia deployment
VALIDATOR_REGISTRY -- Legacy v0 ValidatorRegistry contract address Sepolia deployment
INDEXER_URL -- Indexer REST API URL http://localhost:8080

You can set these in a .env file in the working directory, or export them in your shell.

export PRIVATE_KEY=0xYOUR_HEX_PRIVATE_KEY
export RPC_URL=https://sepolia-rollup.arbitrum.io/rpc

Security: Never commit your private key. Use .env files (excluded by .gitignore) or a secrets manager.

Usage

Relay Operations

# Register a relay node (legacy v0; stakes 100 in the v0 token unit)
ppb-cli relay register --stake 100 --endpoint /ip4/1.2.3.4/tcp/4001 --region us-east-1

# Check relay status
ppb-cli relay status --address 0xYourOperatorAddress

# Send a heartbeat (report 42 messages relayed)
ppb-cli relay heartbeat --messages 42

# Deregister and withdraw stake
ppb-cli relay deregister

Validator Operations

# Register a validator node (legacy v0; stakes 200 in the v0 token unit)
ppb-cli validator register --stake 200 --endpoint https://validator.example.com:8545 --region eu-west-1

# Check validator status
ppb-cli validator status --address 0xYourOperatorAddress

# Deregister and withdraw stake
ppb-cli validator deregister

Indexer Operations

# Check local indexer health
ppb-cli indexer status

# Check a specific indexer
ppb-cli indexer status --url https://indexer.example.com

Token Operations (legacy v0 -- not BYTE)

BYTE has no token and settles in USDC. These commands operate on the legacy v0 token only.

# Check legacy v0 token balance (uses --key address)
ppb-cli token balance

# Check balance for a specific address
ppb-cli token balance --address 0xSomeAddress

# Approve a contract to spend legacy v0 tokens
ppb-cli token approve --spender 0xContractAddress --amount 500

Global Flags

# Pass private key directly (overrides env)
ppb-cli --key 0xYOUR_KEY relay status

# Use a custom RPC endpoint
ppb-cli --rpc https://custom-rpc.example.com relay status

Contract Addresses (legacy v0 -- NOT BYTE Library v1)

These are legacy v0 protocol contracts. They are not part of BYTE Library v1, which has no token and does not deploy relay/validator registries. Do not treat these as current BYTE contracts.

Contract (legacy v0) Address
v0 token 0x37a86eD3ee87109ff8cF96B3fe45c70a2ebB69f3
RelayRegistry 0xFADfB804F76A4FBcB44ACf72519A403A9ff02618
ValidatorRegistry Not deployed

License

MIT

About

CLI for Byte Protocol node operators — relay registration, validator management, token operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages