AccountId32
Composite 0 v393sp_core::crypto::AccountId32
About This Type
32-byte public key identifying a Subtensor account.
The primary account identifier on Subtensor. Every coldkey and hotkey is an AccountId32. Displayed as SS58 addresses (starting with "5") for human readability.
Encoding: Always exactly 32 bytes, no length prefix. SS58 is a display format, not an encoding.
Hex → SS58: encodeAddress(hex, 42) where 42 is the Bittensor network prefix.
Common Uses
- • Identify stakers, validators, miners, and subnet owners
- • Look up balances and stake for an account
- • Specify targets for staking, transfers, and delegation
Fields (1)
| # | Name | Type |
|---|---|---|
| 0 | (unnamed) | [u8; 32] |
SCALE Encoding
- Rule
- Fixed 32 bytes — raw public key, no length prefix.
- Size
- 32 bytes
Examples
Alice (well-known test account) = 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27dd43593c7...56da27d 32 bytes of Ed25519/Sr25519 public keyCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode AccountId32
const value = registry.createType("AccountId32", {
field: 0
});
console.log("Hex:", value.toHex());Type Information
- Type ID
- 0
- Kind
- Composite
- Path
- sp_core::crypto::AccountId32
- Runtime
- v393