Identifies Bittensor addresses (prefix 42).
Current Value
42The Big Picture
Substrate chains use SS58 address encoding with a prefix that identifies the chain. Bittensor uses prefix 42, which is why Bittensor addresses start with '5' when encoded. This prefix ensures addresses from different chains are visually distinct.
Why This Matters
When encoding or decoding addresses, you need the correct SS58 prefix. Using the wrong prefix gives you a valid-looking but wrong address. Always use 42 for Bittensor.
Example
A raw public key 0xd43593... encodes to 5GrwvaEF5... on Bittensor (prefix 42). The same key would encode differently on Polkadot (prefix 0) as 15oF4uVJw...
Common Questions
- Can I use a Polkadot address on Bittensor?
- The underlying key works, but you need to re-encode with prefix 42 to get the Bittensor address format. Tools like subkey can convert.
From Chain Metadata
The designated SS58 prefix of this chain. This replaces the "ss58Format" property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain.
Use Cases
- Address encoding/decoding
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query SS58Prefix constant
const value = api.consts[stringCamelCase("System")][stringCamelCase("SS58Prefix")];
console.log("SS58Prefix:", value.toHuman());Type Information
- Type
- u16
- Byte Size
- 2 bytes
- Encoding
- fixed
- Raw Hex
- 0x2a00
Runtime Info
- Pallet
- System
- First Version
- v101
- Latest Version
- v101
- Current Runtime
- v393