PTNCLI is a command-line tool that extends the bittensor-cli tool for Proprietary Trading Network (PTN) operations. It provides enhanced registration functionality with collateral management and extends standard Bittensor wallet, subnet, and stake operations.
PTNCLI is in beta and is still under active development. Please report any issues or feedback on the PTNCLI GitHub repository.
PTNCLI sits on top of the bittensor-cli tool and extends it by customizing and hooking into commands. As a subnet on the Bittensor network, PTN operates on subnet 8 (netuid: 8) on the mainnet/finney network and subnet 116 (netuid: 116) on the testnet. PTN requires additional collateral setup during registration, which this tool automates alongside the standard subnet registration process.
From a high level, here is what happens to register with collateral on PTN.
- Register your hotkey with PTN:
ptncli subnets register
- Stake TAO into theta using your own hotkey:
ptncli stake add
- Collateral add, which under the hood signs an extensic and sends the command off to the super validator. The super validator will then transfer the amount specified into our smart contract:
ptncli collateral add
- (Optional) View collateral amount tracked in the contract:
ptncli collateral list
- Mainnet/Finney: Targets subnet 8 (netuid: 8)
- Testnet: Targets subnet 116 (netuid: 116)
- Commands automatically select the correct subnet based on the network parameter
git clone <repository-url>
cd ptncli
pip install .
Coming soon
Coming soon
All commands are prefixed with ptncli
. For example: ptncli wallet list
ptncli wallet list [OPTIONS]
Lists all available wallets with registration information.
Options:
--wallet-path, --path
- Path to wallets directory (default:~/.bittensor/wallets
)
ptncli wallet overview [OPTIONS]
Shows detailed wallet information including balance and registration status.
Options:
--wallet-name, --name
- Name of the wallet--wallet.hotkey, --hotkey
- Name of the hotkey to use--wallet-path, --path
- Path to wallets directory (default:~/.bittensor/wallets
)--network
- Network to connect to (default:finney
)--json
- Output result as JSON
ptncli wallet new_coldkey [OPTIONS]
Creates a new coldkey for the wallet.
ptncli wallet new_hotkey [OPTIONS]
Creates a new hotkey for the wallet.
ptncli subnets register [OPTIONS]
Registers a neuron to the Proprietary Trading Network with automatic collateral setup. Automatically targets:
- Subnet 8 (netuid: 8) on mainnet/finney
- Subnet 116 (netuid: 116) on testnet
Options:
--wallet-name, --name
- Name of the wallet to use for registration--wallet.hotkey, --hotkey
- Name of the hotkey to use--wallet-path
- Path to wallet directory (default:~/.bittensor/wallets
)--network
- Network to connect to (default:test
)--era
- Era to register for--json
- Output result as JSON--prompt/--no-prompt
- Whether to prompt for confirmation
ptncli stake add [OPTIONS]
Add stake to hotkeys on the Proprietary Trading Network. Automatically targets:
- Subnet 8 (netuid: 8) on mainnet/finney
- Subnet 116 (netuid: 116) on testnet
Options:
--wallet-name, --name
- Name of the wallet to use (required)--wallet.hotkey, --hotkey
- Hotkey name to use for staking--wallet-path, --path
- Path to wallets directory (default:~/.bittensor/wallets
)--network
- Network to connect to (default:finney
)--amount
- Amount of TAO to stake
ptncli stake list [OPTIONS]
Lists stakes for a wallet with detailed information.
Options:
--wallet-name, --name
- Name of the wallet to list stakes for--wallet-path
- Path to wallet directory (default:~/.bittensor/wallets
)--network
- Network to connect to (default:test
)--coldkey_ss58
- Coldkey SS58 address to list stakes for--live
- Enable live monitoring of stakes--verbose
- Enable verbose output--json
- Output result as JSON--prompt/--no-prompt
- Whether to prompt for confirmation
ptncli collateral add [OPTIONS]
Add collateral to the Proprietary Trading Network.
Options:
--wallet-name, --name
- Name of the wallet to use for collateral (required)--wallet-path
- Path to the wallet directory (default:~/.bittensor/wallets
)--network
- Network to connect to (default:test
)--amount
- Amount of TAO to use for collateral (default: 1)
ptncli collateral list [OPTIONS]
Check collateral balance for a miner address.
Options:
--miner-address, --miner_address
- Miner SS58 address to check collateral balance for (required)--wallet-name, --name
- Name of the wallet (for display purposes)--wallet.hotkey, --hotkey
- Name of the hotkey to use--json
- Output result as JSON
ptncli collateral withdraw [OPTIONS]
Withdraw collateral from the Proprietary Trading Network.
Options:
--amount
- Amount to withdraw from collateral (required)--miner-address, --miner_address
- Miner SS58 address to withdraw collateral for (required)--wallet-name, --name
- Name of the wallet (for display purposes)--wallet.hotkey, --hotkey
- Name of the hotkey to use--wallet-path
- Path to wallet directory (default:~/.bittensor/wallets
)--prompt/--no-prompt
- Whether to prompt for confirmation
# Register on testnet (targets subnet 116)
ptncli subnets register --wallet-name my_wallet --hotkey my_hotkey --network test
# Register on mainnet (targets subnet 8)
ptncli subnets register --wallet-name my_wallet --hotkey my_hotkey --network finney
# List stakes on mainnet
ptncli stake list --wallet-name my_wallet --live --network finney
# List stakes on testnet
ptncli stake list --wallet-name my_wallet --live --network test
# Add stake on mainnet (subnet 8)
ptncli stake add --wallet-name my_wallet --all-hotkeys --amount 10.0 --network finney
# Add stake on testnet (subnet 116)
ptncli stake add --wallet-name my_wallet --all-hotkeys --amount 10.0 --network test
ptncli wallet overview --wallet-name my_wallet --network finney
# Add collateral on testnet
ptncli collateral add --wallet-name my_wallet --amount 1.0 --network test
# Add collateral on mainnet
ptncli collateral add --wallet-name my_wallet --amount 1.0 --network finney
ptncli collateral list --miner-address 5HE... --wallet-name my_wallet
ptncli collateral withdraw --amount 5.0 --miner-address 5HE... --wallet-name my_wallet
- Python >= 3.13, < 3.14
- bittensor-cli >= 9.7.1
- Access to Bittensor network
MIT License