Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bittensor-sdk

БесплатноБез исполняемых скриптовНе проверен

Complete Bittensor SDK reference — Subtensor, AsyncSubtensor, Metagraph, Axon, Dendrite, Synapse, chain_data models, extrinsics (sync + async), extras…

jiayaoqijiaот 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 TAO
  • add_stake_burn(wallet, netuid, hotkey_ss58, amount, limit_price=None, ...) — Subnet buyback
  • add_stake_multiple(wallet, netuids, hotkey_ss58s, amounts, ...) — Bulk stake
  • add_liquidity(wallet, netuid, liquidity, price_low, price_high, hotkey_ss58=None, ...) — Add liquidity
  • remove_liquidity(wallet, netuid, position_id, hotkey_ss58=None, ...) — Remove liquidity
  • modify_liquidity(wallet, netuid, position_id, liquidity_delta, hotkey_ss58=None, ...) — Modify position
  • move_stake(wallet, origin_netuid, origin_hotkey, dest_netuid, dest_hotkey, amount, ...) — Move stake between subnets
  • swap_stake(wallet, origin_netuid, dest_netuid, hotkey_ss58, amount, limit_price=None, ...) — Swap Alpha between subnets
  • transfer_stake(wallet, origin_netuid, dest_netuid, dest_coldkey, hotkey_ss58, amount, ...) — Transfer stake to new owner
  • unstake(wallet, netuid, hotkey_ss58, amount, ...) — Unstake partial
  • unstake_all(wallet, hotkey_ss58, ...) — Unstake all
  • unstake_multiple(wallet, netuids, hotkey_ss58s, amounts, ...) — Bulk unstake

Registration:

  • register(wallet, netuid, ...) — POW registration
  • burned_register(wallet, netuid, ...) — Burn registration (recycle TAO)
  • register_limit(wallet, netuid, limit_price, ...) — Registration with price cap
  • root_register(wallet, ...) — Root network registration

Weights:

  • set_weights(wallet, netuid, uids, weights, version_key=..., ...) — Direct weight setting
  • commit_weights(wallet, netuid, salt, uids, weights, mechid=0, ...) — Commit-reveal step 1
  • reveal_weights(wallet, netuid, uids, weights, salt, ...) — Commit-reveal step 2
  • commit_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,
Полный SKILL.md на GitHub

Установить bittensor-sdk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SOURCE.mdTRUST.auto.yaml_meta.jsonreferences/API_REFERENCE.mdreferences/autoapi/core/async_subtensor/index.mdreferences/autoapi/core/axon/index.mdreferences/autoapi/core/chain_data/axon_info/index.mdreferences/autoapi/core/chain_data/chain_identity/index.mdreferences/autoapi/core/chain_data/coldkey_swap/index.mdreferences/autoapi/core/chain_data/crowdloan_info/index.mdreferences/autoapi/core/chain_data/delegate_info/index.mdreferences/autoapi/core/chain_data/delegate_info_lite/index.mdreferences/autoapi/core/chain_data/dynamic_info/index.mdreferences/autoapi/core/chain_data/index.mdreferences/autoapi/core/chain_data/info_base/index.mdreferences/autoapi/core/chain_data/ip_info/index.mdreferences/autoapi/core/chain_data/metagraph_info/index.mdreferences/autoapi/core/chain_data/neuron_info/index.mdreferences/autoapi/core/chain_data/neuron_info_lite/index.mdreferences/autoapi/core/chain_data/prometheus_info/index.mdreferences/autoapi/core/chain_data/proposal_vote_data/index.mdreferences/autoapi/core/chain_data/proxy/index.mdreferences/autoapi/core/chain_data/root_claim/index.mdreferences/autoapi/core/chain_data/scheduled_coldkey_swap_info/index.mdreferences/autoapi/core/chain_data/sim_swap/index.mdreferences/autoapi/core/chain_data/stake_info/index.mdreferences/autoapi/core/chain_data/subnet_hyperparameters/index.mdreferences/autoapi/core/chain_data/subnet_identity/index.mdreferences/autoapi/core/chain_data/subnet_info/index.mdreferences/autoapi/core/chain_data/subnet_state/index.mdreferences/autoapi/core/chain_data/utils/index.mdreferences/autoapi/core/chain_data/weight_commit_info/index.mdreferences/autoapi/core/config/index.mdreferences/autoapi/core/dendrite/index.mdreferences/autoapi/core/errors/index.mdreferences/autoapi/core/extrinsics/asyncex/children/index.mdreferences/autoapi/core/extrinsics/asyncex/coldkey_swap/index.mdreferences/autoapi/core/extrinsics/asyncex/crowdloan/index.mdreferences/autoapi/core/extrinsics/asyncex/index.mdreferences/autoapi/core/extrinsics/asyncex/liquidity/index.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить bittensor-sdk с