Queries
miner-collateral
A `(hotkey, coldkey)` stake position's standing collateral, or None.
Collateral is keyed by hotkey + coldkey so nominators on the same hotkey are
never charged for the owner's bond. When coldkey_ss58 is omitted, the
hotkey owner is used.
locked_alpha is non-withdrawable stake released through earned incentive
at drain_ratio alpha per alpha earned; min_locked_alpha is the
miner-set floor the lock self-maintains around (the drain stops at it and
incentive fills any shortfall); earned_alpha is lifetime incentive since
the collateral entry existed. Derived: headroom_alpha (draining portion
above the floor), shortfall_alpha (capture in progress below the floor),
and releasable_work_alpha (incentive still needed to release the
headroom). The lock survives deregistration and is credited on
re-registration.
Category: Mining & collateral
Parameters
| Parameter | Type | Description |
|---|---|---|
netuid | integer | Subnet to query. |
hotkey_ss58 | string | Miner hotkey of the bonded stake position. |
coldkey_ss58 | string | Coldkey of the bonded stake position. Defaults to the hotkey owner. |
CLI
btcli query miner-collateral --netuid <integer> --hotkey <ss58|name> --coldkey <ss58|name> --jsonPython
Namespace method (autocomplete, signature help):
import bittensor as bt
sub = bt.Subtensor()
result = sub.collateral.miner_collateral(netuid=1, hotkey_ss58="5F...", coldkey_ss58="5F...")Or dispatch by name, as an agent would:
result = sub.read("miner_collateral", netuid=1, hotkey_ss58="5F...", coldkey_ss58="5F...")Async is the same surface awaited: async with bt.Subtensor() as client:.
On-chain implementation
- Storage
SubtensorModule.Owner
Every file is browsable under /code exactly as built into the runtime.