| Crates.io | spherenet-admin |
| lib.rs | spherenet-admin |
| version | 0.1.0 |
| created_at | 2025-11-21 19:04:25.906836+00 |
| updated_at | 2025-11-21 19:04:25.906836+00 |
| description | Command-line tool for SphereNet governance and network administration |
| homepage | |
| repository | https://github.com/Sphere-Foundation/spherenet-admin |
| max_upload_size | |
| id | 1944014 |
| size | 276,027 |
Command-line interface for administering SphereNet validator and program whitelists.
SphereNet administration tool for governance and network management:
Whitelist Management:
Program Operations:
Authority Abstraction:
spherenet-authority crate with Squads V4 integrationConnects to SphereNet testnet by default. Override with --url <RPC_URL> flag.
spherenet-admin --url http://localhost:8899 vw list # Local validator
spherenet-admin vw list # Testnet (default)
All commands support both single-sig (immediate execution) and multi-sig (proposal creation) modes.
vw)Manage which validators can participate in consensus.
Example: Add Validator
# Single-sig (executes immediately)
spherenet-admin vw add <VOTE_ACCOUNT> \
--start-epoch 100 \
--end-epoch 200 \
--authority ./authority.json
# Multi-sig (creates proposal for approval)
spherenet-admin vw add <VOTE_ACCOUNT> \
--start-epoch 100 \
--end-epoch 200 \
--multisig <MULTISIG_PDA> \
--multisig-authority ./member.json
Other Commands:
vw list - Show all whitelisted validatorsvw remove <VOTE_ACCOUNT> - Remove validator from whitelistvw update-start-epoch <VOTE_ACCOUNT> --epoch <N> - Update when validator can startvw update-end-epoch <VOTE_ACCOUNT> --epoch <N> - Update when validator term endsvw auth - View current whitelist authorityvw propose-authority <NEW_AUTHORITY> - Initiate authority transfervw accept-authority - Accept pending authority transfervw cancel-authority - Cancel pending authority transferpw)Manage which authorities can deploy/upgrade programs. Controls WHO can deploy, not WHICH programs can execute.
Example: Add Deployer Authority
# Single-sig
spherenet-admin pw add <DEPLOYER_PUBKEY> --authority ./authority.json
# Multi-sig
spherenet-admin pw add <DEPLOYER_PUBKEY> \
--multisig <MULTISIG_PDA> \
--multisig-authority ./member.json
Other Commands:
pw list - Show all whitelisted deployer authoritiespw remove <DEPLOYER> - Remove deployer authoritypw auth - View current whitelist authoritypw propose-authority <NEW_AUTHORITY> - Initiate authority transferpw accept-authority - Accept pending authority transferpw cancel-authority - Cancel pending authority transferprogram)Deploy and upgrade programs with whitelist enforcement. Upgrade authority must be whitelisted before deployment.
Example: Deploy Program
spherenet-admin program deploy \
--program-so ./target/deploy/my_program.so \
--program-keypair ./target/deploy/my_program-keypair.json \
--upgrade-authority ./authority.json \
--payer ~/.config/solana/id.json \
--max-data-len 100000 # Optional, recommended for future growth
Example: Upgrade Program (Multi-sig)
# Create upgrade proposal
spherenet-admin program upgrade \
--program-id <PROGRAM_ID> \
--program-so ./target/deploy/my_program.so \
--multisig <MULTISIG_PDA> \
--multisig-authority ./member.json \
--payer ./member.json
# Then: approve with threshold members, execute by any member
Other Commands:
program extend --program-id <ID> --bytes <N> - Extend program capacity (works with multisig!)Multisig Upgrade Authority Lifecycle:
solana program set-upgrade-authority <PROGRAM> --new-upgrade-authority <VAULT_PDA> --upgrade-authority ./authority.json --skip-new-upgrade-authority-signer-checkExtendProgramChecked)Note: Authority transfer FROM multisig back to single-sig is not currently supported due to CPI coordination constraints. Once transferred to multisig, programs remain under governance control.
multisig)Create and manage Squads V4 multisig vaults. Provides spherenet-authority crate integration.
Example: Create Multisig
spherenet-admin multisig create \
--members <PUBKEY>,<PUBKEY>,<PUBKEY> \
--threshold 2 \
--create-key ./multisig-create-key.json \
--payer ~/.config/solana/id.json \
--memo "Treasury multisig 2-of-3"
Proposal Workflow:
# Approve (requires threshold members)
spherenet-admin multisig approve \
--multisig <MULTISIG_PDA> \
--transaction-index <INDEX> \
--member ./member.json
# Execute (any member can execute once threshold met)
spherenet-admin multisig execute \
--multisig <MULTISIG_PDA> \
--transaction-index <INDEX> \
--member ./member.json
Other Commands:
multisig program-config-init - One-time Squads program setupmultisig show --multisig <PDA> - View multisig info (members, threshold, balance)Transfer SOL:
# Single-sig
spherenet-admin transfer --destination <PUBKEY> --amount 1.5 --from ./keypair.json
# Multi-sig (creates proposal)
spherenet-admin transfer --destination <PUBKEY> --amount 0.5 --multisig <MULTISIG_PDA> --multisig-authority ./member.json
Airdrop (testnet only):
spherenet-admin airdrop --pubkey <PUBKEY> --amount 5.0
The CLI uses:
spherenet-validator-whitelist-client - Generated instruction builders for validator whitelist operationsspherenet-program-whitelist-client - Generated instruction builders for program whitelist operationsspherenet-authority - Authority abstraction and Squads v4 multisig integrationAll instruction builders are generated from their respective interface definitions using Codama/Kinobi.
Testnet:
https://api.testnet.sphere.netwLpnFMEvuP6hPE84AGrsmNr2Bo2uk69MC4kKWtrWHBNPwLzPtX2e5PwNFQTrEY5DkkmRQ1t1x5vWcGzTnMgibRSQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf