bittensor-sdk
БесплатноБез исполняемых скриптовНе проверенComplete Bittensor SDK reference — Subtensor, AsyncSubtensor, Metagraph, Axon, Dendrite, Synapse, chain_data models, extrinsics (sync + async), extras…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Bittensor SDK — Complete API Reference
Comprehensive reference for the Bittensor Python SDK. Based on the full autoapi documentation.
Package Structure
bittensor/
├── core/
│ ├── subtensor — Synchronous blockchain interface (main class)
│ ├── async_subtensor — Asynchronous blockchain interface
│ ├── metagraph — Subnet state representation (sync/async/torch/nontorch)
│ ├── axon — Server-side neuron endpoint (FastAPI)
│ ├── dendrite — Client-side network request sender
│ ├── synapse — Communication schema between neurons (Pydantic)
│ ├── stream — Streaming response model
│ ├── tensor — Tensor serialization utilities
│ ├── threadpool — Priority thread pool for Axon
│ ├── config — Configuration management
│ ├── settings — Default settings
│ ├── types — Shared type aliases and mixins
│ ├── errors — Exception hierarchy
│ ├── chain_data/ — 26 data models for chain state
│ └── extrinsics/ — Sync + async extrinsic operations + pallet definitions
├── extras/
│ ├── subtensor_api/ — High-level SubtensorApi wrapper with 14 sub-APIs
│ ├── dev_framework/ — Test framework with ~184 namedtuple call blueprints
│ └── timelock/ — Drand-based time-lock encryption
└── utils/
├── balance — Balance type (TAO/Rao conversion)
├── btlogging/ — Custom logging subsystem (6 modules)
├── weight_utils — Weight normalization/conversion (12 functions)
├── registration/ — Registration utilities + torch compat
├── liquidity — Uniswap V3-style liquidity math
├── networking — IP/port utilities
├── formatting — Human-readable number formatting
├── subnets — Community SubnetsAPI base class
├── version — PyPI version checker
├── axon_utils — Nonce window calculations
└── easy_imports — Centralized import hub
Quick Start
import bittensor as bt
# Connect to network
subtensor = bt.Subtensor(network="finney")
# or async:
# subtensor = bt.AsyncSubtensor(network="finney")
# Wallet
wallet = bt.Wallet(name="my_wallet", hotkey="my_hotkey")
# Metagraph
metagraph = subtensor.metagraph(netuid=1)
# Stake
from bittensor import Balance
subtensor.add_stake(wallet, netuid=1, hotkey_ss58=wallet.hotkey.ss58_address,
amount=Balance.from_tao(10.0))
# Set weights
import numpy as np
subtensor.set_weights(wallet, netuid=1, uids=np.array([0,1,2]),
weights=np.array([0.3, 0.4, 0.3]))
Core Modules
bittensor.core.subtensor — Subtensor (Synchronous)
Subtensor(network=None, config=None, log_verbose=False, fallback_endpoints=None,
retry_forever=False, archive_endpoints=None, mock=False)
Staking & Liquidity:
add_stake(wallet, netuid, hotkey_ss58, amount, safe_staking=False, allow_partial_stake=False, rate_tolerance=0.005, ...)— Stake TAOadd_stake_burn(wallet, netuid, hotkey_ss58, amount, limit_price=None, ...)— Subnet buybackadd_stake_multiple(wallet, netuids, hotkey_ss58s, amounts, ...)— Bulk stakeadd_liquidity(wallet, netuid, liquidity, price_low, price_high, hotkey_ss58=None, ...)— Add liquidityremove_liquidity(wallet, netuid, position_id, hotkey_ss58=None, ...)— Remove liquiditymodify_liquidity(wallet, netuid, position_id, liquidity_delta, hotkey_ss58=None, ...)— Modify positionmove_stake(wallet, origin_netuid, origin_hotkey, dest_netuid, dest_hotkey, amount, ...)— Move stake between subnetsswap_stake(wallet, origin_netuid, dest_netuid, hotkey_ss58, amount, limit_price=None, ...)— Swap Alpha between subnetstransfer_stake(wallet, origin_netuid, dest_netuid, dest_coldkey, hotkey_ss58, amount, ...)— Transfer stake to new ownerunstake(wallet, netuid, hotkey_ss58, amount, ...)— Unstake partialunstake_all(wallet, hotkey_ss58, ...)— Unstake allunstake_multiple(wallet, netuids, hotkey_ss58s, amounts, ...)— Bulk unstake
Registration:
register(wallet, netuid, ...)— POW registrationburned_register(wallet, netuid, ...)— Burn registration (recycle TAO)register_limit(wallet, netuid, limit_price, ...)— Registration with price caproot_register(wallet, ...)— Root network registration
Weights:
set_weights(wallet, netuid, uids, weights, version_key=..., ...)— Direct weight settingcommit_weights(wallet, netuid, salt, uids, weights, mechid=0, ...)— Commit-reveal step 1reveal_weights(wallet, netuid, uids, weights, salt, ...)— Commit-reveal step 2commit_reveal_enabled(netuid, block=None)— Check if commit-reveal is active
Serving:
serve_axon(wallet, netuid, ip, port, protocol, version, ...)— Register axon endpoint- `serve_axon_tls(wallet, netuid, ip, port, protocol, version, certificate,
Установить bittensor-sdk в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bittensor-sdk?
Complete Bittensor SDK reference — Subtensor, AsyncSubtensor, Metagraph, Axon, Dendrite, Synapse, chain_data models, extrinsics (sync + async), extras (subtensor_api, dev_framework, timelock), and utils (balance, btlogging, weight_utils, registration, liquidity, networking, version). Use for any bittensor operation: wallet management, staking, subnet ops, neuron registration, metagraph queries, emissions tracking, liquidity management, MEV protection, proxy delegation, coldkey swaps, crowdloans, weight setting, and more.
Как установить скилл bittensor-sdk?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bittensor-sdk запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic