1"use strict";(self.webpackChunkbittensor_docs=self.webpackChunkbittensor_docs||[]).push([[3378],{481:(e,n,s)=>{s.d(n,{b9:()=>r});var i=s(5277),t=s(4073);const r=()=>(0,i.jsx)(t.A,{type:"info",title:"SDK Version",children:(0,i.jsxs)("p",{children:["This documentation is built against ",(0,i.jsx)("strong",{children:"Bittensor Python SDK v10"}),". For documentation built against SDK 9.12, see ",(0,i.jsx)("a",{href:"https://archive-sdk-9-12.developer-docs-6uq.pages.dev/sdk/bt-api-ref",target:"_blank",rel:"noopener noreferrer",children:"SDK 9.12 Archive"}),"."]})})},771:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>o});var i=s(8521);const t={},r=i.createContext(t);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(r.Provider,{value:n},e.children)}},1361:(e,n,s)=>{s.d(n,{A:()=>t});s(8521);var i=s(5277);function t(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,i.jsx)("path",{d:"M8.27,3L3,8.27V15.73L8.27,21H15.73L21,15.73V8.27L15.73,3M8.27,5H15.73L19,8.27V15.73L15.73,19H8.27L5,15.73V8.27M11,15H13V17H11V15M11,7H13V13H11V7"})})}},2165:(e,n,s)=>{s.d(n,{A:()=>t});s(8521);var i=s(5277);function t(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,i.jsx)("path",{d:"M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,10.82 8.03,12.42 9.54,13.31L10,13.58V16H14V13.58L14.46,13.31C15.97,12.42 17,10.82 17,9A5,5 0 0,0 12,4Z"})})}},3334:(e,n,s)=>{s.d(n,{A:()=>t});s(8521);var i=s(5277);function t(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,i.jsx)("path",{d:"M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z"})})}},3949:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"sdk/migration-guide","title":"Bittensor SDK v10 Migration Guide","description":"This page documents breaking changes and new features for the Bittensor Python SDK v10. This is a major release with significant refactoring, standardization, and new functionality.","source":"@site/docs/sdk/migration-guide.md","sourceDirName":"sdk","slug":"/sdk/migration-guide","permalink":"/sdk/migration-guide","draft":false,"unlisted":false,"editUrl":"https://github.com/latent-to/developer-docs/blob/main/docs/sdk/migration-guide.md","tags":[],"version":"current","lastUpdatedAt":1785767577000,"frontMatter":{"title":"Bittensor SDK v10 Migration Guide"},"sidebar":"bittensorSidebar","previous":{"title":"Working with Blockchain Calls","permalink":"/sdk/call"},"next":{"title":"Working with Concurrency","permalink":"/subnets/asyncio"}}');var t=s(5277),r=s(771),a=s(481);const o={title:"Bittensor SDK v10 Migration Guide"},l=void 0,c={},d=[{value:"Executive Summary",id:"executive-summary",level:2},{value:"Python Version Support",id:"python-version-support",level:2},{value:"New Features",id:"new-features",level:2},{value:"Structured Extrinsic Responses (ExtrinsicResponse)",id:"structured-extrinsic-responses-extrinsicresponse",level:3},{value:"Multiple Incentive Mechanisms Support",id:"multiple-incentive-mechanisms-support",level:3},{value:"Setting Mechanism Weights:",id:"setting-mechanism-weights",level:4},{value:"Querying Mechanism-Specific Data on the Metagraph:",id:"querying-mechanism-specific-data-on-the-metagraph",level:4},{value:"Proxy Support",id:"proxy-support",level:3},{value:"Simulate Token Swaps",id:"simulate-token-swaps",level:3},{value:"Build Extrinsic Calls",id:"build-extrinsic-calls",level:3},{value:"SimSwap Fee Calculation Methods",id:"simswap-fee-calculation-methods",level:3},{value:"Verbose Logging Control",id:"verbose-logging-control",level:3},{value:"BlockInfo Class",id:"blockinfo-class",level:3}
1,{value:"Hex / SS58 Conversion",id:"hex--ss58-conversion",level:3},{value:"Development Test Framework",id:"development-test-framework",level:3},{value:"Estimate Transaction Fees",id:"estimate-transaction-fees",level:3},{value:"Parameter Validation",id:"parameter-validation",level:3},{value:"Query Commitment Data",id:"query-commitment-data",level:3},{value:"Query Bonds Reset",id:"query-bonds-reset",level:3},{value:"Historical Block Data Query",id:"historical-block-data-query",level:3},{value:"Breaking Changes: Method Renames",id:"breaking-changes-method-renames",level:2},{value:"Subnet Methods",id:"subnet-methods",level:3},{value:"Stake Methods",id:"stake-methods",level:3},{value:"Commitment Methods",id:"commitment-methods",level:3},{value:"Serving Methods",id:"serving-methods",level:3},{value:"Timelocked Weight Commits",id:"timelocked-weight-commits",level:3},{value:"Breaking Changes: Parameter Changes",id:"parameter-changes",level:2},{value:"Consistent Parameter Ordering",id:"consistent-parameter-ordering",level:3},{value:"Block Parameter Standardization",id:"block-parameter-standardization",level:3},{value:"Get Metagraph Info Fields Parameter",id:"get-metagraph-info-fields-parameter",level:3},{value:"Mock Parameter",id:"mock-parameter",level:3},{value:"Async Methods Parity",id:"async-methods-parity",level:3},{value:"Removed <code>reuse_block</code> from Sync Methods",id:"removed-reuse_block-from-sync-methods",level:3},{value:"Transfer Fee Parameter Rename",id:"transfer-fee-parameter-rename",level:3},{value:"Weight Setting Methods Parameter Rename",id:"weight-setting-methods-parameter-rename",level:4},{value:"Breaking Changes Methods",id:"removed-methods",level:2},{value:"Duplicate References",id:"duplicate-references",level:3},{value:"DefaultConfig Class Removed",id:"defaultconfig-class-removed",level:3},{value:"DelegateInfo Attribute Removed",id:"delegateinfo-attribute-removed",level:3},{value:"Extrinsic Calling Changes",id:"extrinsic-calling-changes",level:2},{value:"Standardized Parameters",id:"standardized-parameters",level:3},{value:"Keyword-Only Arguments",id:"keyword-only-arguments",level:3},{value:"Example: Keyword-Only Arguments",id:"example-keyword-only-arguments",level:4},{value:"ExtrinsicResponse Return Type",id:"extrinsicresponse-return-type",level:3},{value:"Parameter Renames",id:"parameter-renames",level:3},{value:"Hotkey and Coldkey Parameters",id:"hotkey-and-coldkey-parameters",level:4},{value:"Transfer Extrinsic",id:"transfer-extrinsic",level:4},{value:"Staking Parameters",id:"staking-parameters",level:4},{value:"Required Parameters",id:"required-parameters",level:4},{value:"Removed Functions",id:"removed-functions",level:3},{value:"<code>unstake_all</code> parameter removed from <code>unstake_extrinsic</code>",id:"unstake_all-parameter-removed-from-unstake_extrinsic",level:4},{value:"Internal <code>_do*</code> methods removed",id:"internal-_do-methods-removed",level:4},{value:"Deprecated root weights method removed",id:"deprecated-root-weights-method-removed",level:4},{value:"Commit-Reveal v3 (CRv3) removed",id:"commit-reveal-v3-crv3-removed",level:4},{value:"Merged Functions",id:"merged-functions",level:3},{value:"<code>increase_take</code> and <code>decrease_take</code> merged into <code>set_delegate_take</code>
1",id:"increase_take-and-decrease_take-merged-into-set_delegate_take",level:4},{value:"Mechanism-specific weight functions consolidated",id:"mechanism-specific-weight-functions-consolidated",level:4},{value:"Balance Handling",id:"balance-handling",level:2},{value:"Stricter Type Checking",id:"stricter-type-checking",level:3},{value:"1) Invalid balance type (<code>BalanceTypeError</code>)",id:"1-invalid-balance-type-balancetypeerror",level:4},{value:"2) Mismatched balance units (<code>BalanceUnitMismatchError</code>)",id:"2-mismatched-balance-units-balanceunitmismatcherror",level:4},{value:"Function Renames",id:"function-renames",level:3},{value:"All Amount Parameters Require Balance Objects",id:"all-amount-parameters-require-balance-objects",level:3},{value:"Import Changes",id:"import-changes",level:2},{value:"Removed Backwards Compatibility Aliases",id:"removed-backwards-compatibility-aliases",level:3},{value:"Removed Direct Subpackage Links",id:"removed-direct-subpackage-links",level:3},{value:"New Import Convenience",id:"new-import-convenience",level:3},{value:"Module Reorganization",id:"module-reorganization",level:3},{value:"Extrinsic Parameters Package",id:"extrinsic-parameters-package",level:3},{value:"Environment Variables",id:"environment-variables",level:2},{value:"Renamed Variables",id:"renamed-variables",level:3},{value:"Enabling CLI Argument Parsing",id:"enabling-cli-argument-parsing",level:3},{value:"Metagraph Changes",id:"metagraph-changes",level:2},{value:"Mechid Parameter Ordering",id:"mechid-parameter-ordering",level:3},{value:"MetagraphInfo Changes",id:"metagraphinfo-changes",level:3},{value:"Async Metagraph Initialization",id:"async-metagraph-initialization",level:3},{value:"Migration Checklist",id:"migration-checklist",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["This page documents breaking changes and new features for the Bittensor Python SDK ",(0,t.jsx)(n.code,{children:"v10"}),". This is a major release with significant refactoring, standardization, and new functionality."]}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"https://docs.learnbittensor.org/sdk/bt-api-ref",children:"Bittensor Python SDK Reference Docs"})]}),"\n",(0,t.jsx)(n.h2,{id:"executive-summary",children:"Executive Summary"}),"\n",(0,t.jsxs)(n.p,{children:["Bittensor SDK v10 is a ",(0,t.jsx)(n.strong,{children:"major breaking release"})," with significant improvements to consistency, type safety, and functionality. Key changes include:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Breaking Changes:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Python 3.10+ required"})," - Python 3.9 no longer supported (",(0,t.jsx)(n.a,{href:"#python-version-support",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"ExtrinsicResponse return type"})," - All blockchain transaction functions now return structured ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," objects instead of ",(0,t.jsx)(n.code,{children:"bool"})," or tuples (",(0,t.jsx)(n.a,{href:"#extrinsicresponse-return-type",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Strict Balance type checking"})," - All amount parameters require ",(0,t.jsx)(n.code,{children:"Balance"})," objects. (",(0,t.jsx)(n.a,{href:"#balance-handling",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Parameter renames"})," - Consistent ",(0,t.jsx)(n.code,{children:"_ss58"})," suffix for all address parameters (e.g., ",(0,t.jsx)(n.code,{children:"hotkey"})," \u2192 ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),") (",(0,t.jsx)(n.a,{href:"#parameter-renames",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Method renames and removals"})," - Several methods renamed or removed for consistency (",(0,t.jsx)(n.a,{href:"#breaking-changes-method-renames",children:"details"}),")"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"New Features:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Multiple Incentive Mechanisms"})," - Full SDK support for running multiple evaluation mechanisms per subnet with independent weight matrices and emissions (",(0,t.jsx)(n.a,{href:"#multiple-incentive-mechanisms-support",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Root claim implementation"}),": Adds support for setting and managing root claims directly through the SDK"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Proxy implementation"}),": Complete SDK support for creating, managing, and executing calls through proxy accounts (",(0,t.jsx)(n.a,{href:"#proxy-support",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Crowdloan implementation"}),": Adds support for creating, managing, and interacting with crowdloans directly through the SDK"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"MEV Shield protection"}),": Encrypt transactions to protect against front-running and MEV attacks (",(0,t.jsx)(n.a,{href:"/sdk/mev-protection",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"GenericCall and CallBuilder"})," - Create, compose, and submit blockchain calls with enhanced validation (",(0,t.jsx)(n.a,{href:"/sdk/call",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Transaction simulation"})," - ",(0,t.jsx)(n.code,{children:"sim_swap()"})," calculates exact token yields without executing transactions (",(0,t.jsx)(n.a,{href:"#simulate-token-swaps",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Fee estimation"})," - ",(0,t.jsx)(n.code,{children:"get_extrinsic_fee()"})," estimates blockchain transaction costs before submission (",(0,t.jsx)(n.a,{href:"#estimate-transaction-fees",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"BlockInfo class"})," - Rich blockchain block information objects (",(0,t.jsx)(n.a,{href:"#blockinfo-class",children:"details"}),")"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Major Improvements:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Standardized parameter ordering across all functions (",(0,t.jsx)(n.a,{href:"#standardized-parameters",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["Centralized extrinsic parameters in ",(0,t.jsx)(n.code,{children:"bittensor.core.extrinsics.params"})," (",(0,t.jsx)(n.a,{href:"#extrinsic-parameters-package",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["Enhanced metagraph support for mechanism-specific queries (",(0,t.jsx)(n.a,{href:"#metagraph-changes",children:"details"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:["Environment variable updates for clarity (",(0,t.jsx)(n.a,{href:"#environment-variables",children:"details"}),")"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Migration Required:"}),"\nSee the ",(0,t.jsx)(n.a,{href:"#migration-checklist",children:"Migration Checklist"})," for step-by-step upgrade instructions."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"python-version-support",children:"Python Version Support"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Python 3.9 is no longer supported."})," The SDK now requires ",(0,t.jsx)(n.strong,{children:"Python 3.10 or higher"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"new-features",children:"New Features"}),"\n",(0,t.jsx)(n.h3,{id:"structured-extrinsic-responses-extrinsicresponse",children:"Structured Extrinsic Responses (ExtrinsicResponse)"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," provides rich, structured data for both outgoing requests and incoming on-chain results. While it is a breaking change in return types, it primarily unlocks better development, testing, and debugging workflows by standardizing success flags, messages, fees, receipts, and operation-specific data in one object."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Purpose"}),": Enables more accurate, predictable code paths and easier assertions in tests"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"What you get"}),": Success flag, human-readable message, network fee, application-level swap fee(s), inclusion/finalization receipts, and operation-specific data"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Where it applies"}),": Returned by all functions that submit extrinsics"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["See details: ",(0,t.jsx)(n.a,{href:"#extrinsicresponse-return-type",children:"ExtrinsicResponse Return Type"})]}),"\n",(0,t.jsx)(n.h3,{id:"multiple-incentive-mechanisms-support",children:"Multiple Incentive Mechanisms Support"}),"\n",(0,t.jsxs)(n.p,{children:["Full SDK support for ",(0,t.jsx)(n.strong,{children:"multiple incentive mechanisms within subnets"})," is now implemented, a major new Subtensor blockchain feature."]}),"\n",(0,t.jsxs)(n.p,{children:['Previously referred to as "sub-subnets" during development, this feature allows subnet creators to run multiple independent evaluation mechanisms within a single subnet, each with separate weight matrices, bond pools, and emission distributions. This is a significant architectural change that enables more sophisticated subnet designs. See ',(0,t.jsx)(n.a,{href:"../subnets/understanding-multiple-mech-subnets",children:"Multiple Incentive Mechanisms Within Subnets"})," for a complete overview."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Key Concepts:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.code,{children:"mechid"})," (Mechanism ID)"]}),": An integer identifying which mechanism within a subnet (0 for the first mechanism, 1 for the second, etc.)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Default behavior"}),": All methods default to ",(0,t.jsx)(n.code,{children:"mechid=0"}),", so existing single-mechanism subnets work unchanged"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Backward compatible"}),": Subnets with only one mechanism (the default) don't need code changes"]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"setting-mechanism-weights",children:"Setting Mechanism Weights:"}),"\n",(0,t.jsx)(a.b9,{}),"\n",(0,t.jsx)(n.p,{children:"Validators must set weights independently for each mechanism in a subnet:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Set weights for a specific mechanism (mechid)\nresponse = subtensor.set_weights(\n wallet,\n netuid=1,\n uids=[0, 1, 2],\n weights=[0.5, 0.3, 0.2],\n mechid=0 # Mechanism ID (default: 0)\n)\n\n# For subnets with multiple mechanisms, set weights for each:\nmechanism1_response = subtensor.set_weights(wallet, netuid=1, uids, weights1, mechid=0)\nmechanism2_response = subtensor.set_weights(wallet, netuid=1, uids, weights2, mechid=1)\n"})}),"\n",(0,t.jsx)(n.h4,{id:"querying-mechanism-specific-data-on-the-metagraph",children:"Querying Mechanism-Specific Data on the Metagraph:"}),"\n",(0,t.jsx)(n.h3,{id:"proxy-support",children:"Proxy Support"}),"\n",(0,t.jsxs)(n.p,{children:["Full SDK support for ",(0,t.jsx)(n.strong,{children:"proxy accounts"})," is now implemented. Proxies allow one wallet to perform Bittensor operations on behalf of another, enabling enhanced
1security by keeping your main coldkey in cold storage while a proxy handles day-to-day operations."]}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"/keys/proxies/",children:"Proxies: Overview"})," and ",(0,t.jsx)(n.a,{href:"/keys/proxies/working-with-proxies",children:"Working with Proxies"})," for complete documentation."]}),"\n",(0,t.jsxs)(n.p,{children:["All metagraph queries now accept a ",(0,t.jsx)(n.code,{children:"mechid"})," parameter:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Get metagraph for specific mechanism\nmetagraph = subtensor.metagraph(netuid=1, mechid=0)\n\n# Get weights for specific mechanism\nweights = subtensor.weights(netuid=1, mechid=0)\n\n# Get bonds for specific mechanism\nbonds = subtensor.bonds(netuid=1, mechid=0)\n\n# Get timelocked weight commits for a mechanism\ncommits = subtensor.get_timelocked_weight_commits(netuid=1, mechid=0)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"simulate-token-swaps",children:"Simulate Token Swaps"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"sim_swap()"})," calculates the ",(0,t.jsx)(n.strong,{children:"exact token yields"})," for stake or unstake operations at a given block, without actually executing the transaction."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Simulate adding stake (TAO \u2192 Alpha) to see exact Alpha received\nresult = subtensor.sim_swap(\n origin_netuid=0, # 0 = TAO (root)\n destination_netuid=1, # Target subnet\n amount=tao(100.0),\n)\n\nprint(f"TAO amount: {result.tao_amount}")\nprint(f"Alpha received: {result.alpha_amount}")\nprint(f"TAO fee: {result.tao_fee}")\nprint(f"Alpha fee: {result.alpha_fee}")\n\n# Simulate unstaking (Alpha \u2192 TAO)\nresult = subtensor.sim_swap(\n origin_netuid=1, # Source subnet\n destination_netuid=0, # 0 = TAO (root)\n amount=tao(100.0),\n)\n'})}),"\n",(0,t.jsx)(n.h3,{id:"build-extrinsic-calls",children:"Build Extrinsic Calls"}),"\n",(0,t.jsxs)(n.p,{children:["Compose an extrinsic call without submitting it to the blockchain with ",(0,t.jsx)(n.code,{children:"compose_call"})," or ",(0,t.jsx)(n.code,{children:"CallBuilder"}),". Useful for fee estimation, transaction preparation, proxies, crowdloans, and MEV protection."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Compose a call for later submission or fee estimation\ncall = subtensor.compose_call(\n call_module="SubtensorModule",\n call_function="add_stake",\n call_params={\n "netuid": 1,\n "hotkey": hotkey_ss58,\n "amount_staked": amount.rao\n }\n)\n\n# Use the composed call to estimate fees (requires keypair)\nfee = subtensor.get_extrinsic_fee(call, wallet.coldkeypub)\n'})}),"\n",(0,t.jsxs)(n.p,{children:["For detailed documentation on ",(0,t.jsx)(n.code,{children:"GenericCall"}),", ",(0,t.jsx)(n.code,{children:"CallBuilder"}),", and practical examples including proxy calls and MEV protection, see ",(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/sdk/call",children:"Working with Blockchain Calls"})}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"simswap-fee-calculation-methods",children:"SimSwap Fee Calculation Methods"}),"\n",(0,t.jsxs)(n.p,{children:["The SDK now provides dedicated methods for calculating swap-based fees for staking operations. These methods use the new ",(0,t.jsx)(n.code,{children:"sim_swap()"})," functionality to query the Subtensor blockchain and return precise fee calculations:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Get fee for adding stake (staking operation)\nfee = subtensor.get_stake_add_fee(amount, netuid)\n\n# Get fee for moving stake between subnets\nfee = subtensor.get_stake_movement_fee(origin_netuid, destination_netuid, amount)\n\n# Get fee for removing stake (unstaking operation)\nfee = subtensor.get_unstake_fee(netuid, amount)\n\n# All methods return Balance objects representing the fee in TAO or Alpha\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"}
1)," These are ",(0,t.jsx)(n.strong,{children:"application-level swap fees"})," (0.05% of transacted liquidity), separate from ",(0,t.jsx)(n.strong,{children:"blockchain transaction fees"})," (weight-based). See ",(0,t.jsx)(n.a,{href:"../learn/fees",children:"Transaction Fees in Bittensor"})," for details on both fee types."]}),"\n",(0,t.jsx)(n.h3,{id:"verbose-logging-control",children:"Verbose Logging Control"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"Subtensor"})," class now supports verbose logging to help debug interactions with the Subtensor blockchain:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Set verbose mode for trace-level logging\nsubtensor = Subtensor(network="test", log_verbose=True)\n# Automatically sets btlogging to TRACE level for detailed blockchain interaction logs\n'})}),"\n",(0,t.jsx)(n.h3,{id:"blockinfo-class",children:"BlockInfo Class"}),"\n",(0,t.jsxs)(n.p,{children:["New ",(0,t.jsx)(n.a,{href:"https://docs.learnbittensor.org/python-api/html/autoapi/bittensor/core/types/index.html",children:(0,t.jsx)(n.code,{children:"BlockInfo"})})," class provides rich information about blockchain blocks, including metadata and links to block explorers."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'from bittensor.core.types import BlockInfo\n\n# Get block information by block number\nblock = subtensor.get_block_info(block=12345)\n\n# Or get block information by block hash\nblock = subtensor.get_block_info(block_hash="0x1234...")\n\n# Access block data\nprint(f"Block number: {block.number}")\nprint(f"Block hash: {block.hash}")\nprint(f"Timestamp: {block.timestamp}")\nprint(f"Number of extrinsics: {len(block.extrinsics)}")\nprint(f"View on explorer: {block.explorer}")\n\n# Access raw header data\nprint(f"Parent hash: {block.header[\'parentHash\']}")\n\n# Iterate through extrinsics\nfor extrinsic in block.extrinsics:\n print(f"Extrinsic: {extrinsic}")\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"BlockInfo attributes:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"number"})})," (int): The block number"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"hash"})})," (str): The block hash"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"timestamp"})})," (Optional[int]): Unix timestamp when the block was created (from ",(0,t.jsx)(n.code,{children:"Timestamp.Now"})," extrinsic)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"header"})})," (dict): Raw block header data from the node RPC, including parent hash, state root, and other metadata"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"extrinsics"})})," (list): List of all extrinsics (transactions) included in the block"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"explorer"})})," (str): Direct link to view the block on ",(0,t.jsx)(n.a,{href:"https://tao.app",children:"tao.app/"})," block explorer"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Use cases:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Inspect transaction history and block contents"}),"\n",(0,t.jsx)(n.li,{children:"Debug blockchain interactions"}),"\n",(0,t.jsx)(n.li,{children:"Verify transaction inclusion in specific blocks"}),"\n",(0,t.jsx)(n.li,{children:"Access detailed block metadata for analysis"}),"\n",(0,t.jsx)(n.li,{children:"Link users to block explorer for visual inspection"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"hex--ss58-conversion",children:"Hex / SS58 Conversion"}),"\n",(0,t.jsx)(n.p,{children:"New utility function for converting hex addresses to SS58 format:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"from bittensor.utils import hex_to_ss58\n\nss58_address = hex_to_ss58(hex_string)\n\nfrom bittensor.utils import ss58_to_hex\n\nhex_string = ss58_to_hex(ss58_address)\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," ",(0,t.jsx)(n.code,{children:"hex_to_ss58"})," is an alias for ",(0,t.jsx)(n.code,{children:"ss58_encode"})," from scalecodec. Similarly, ",(0,t.jsx)(n.code,{children:"ss58_to_hex"})," is an alias for ",(0,t.jsx)(n.code,{children:"ss58_decode"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"development-test-framework",children:"Development Test Framework"}),"\n",(0,t.jsxs)(n.p,{children:["New developer testing utilities provide helpers and fixtures for rapid local testing of SDK integrations and extrinsic flows. Use cases: Simulate common workflows, stub chain interactions, and write predictable tests around ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," without a full node."]}),"\n",(0,t.jsxs)(n.p,{children:["Learn more: ",(0,t.jsx)(n.a,{href:"https://github.com/RaoFoundation/bittensor/tree/SDKv10/bittensor/extras/dev_framework",children:(0,t.jsx)(n.code,{children:"bittensor/extras/dev_framework"})})]}),"\n",(0,t.jsx)(n.h3,{id:"estimate-transaction-fees",children:"Estimate Transaction Fees"}),"\n",(0,t.jsxs)(n.p,{children:["Query the estimated fee for submitting an extrinsic to the Subtensor blockchain before actually sending it, with ",(0,t.jsx)(n.code,{children:"get_extrinsic_fee()"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Compose a call first\ncall = subtensor.compose_call(\n call_module="Balances",\n call_function="transfer_keep_alive",\n call_params={"dest": destination_address, "value": amount.rao}\n)\n\n# Estimate fee without submitting\nfee = subtensor.get_extrinsic_fee(call, wallet.coldkeypub)\nprint(f"Estimated fee: {fee}") # Returns Balance object\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Use cases:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Check if wallet has sufficient balance before submitting transactions"}),"\n",(0,t.jsx)(n.li,{children:"Display estimated costs to users"}),"\n",(0,t.jsx)(n.li,{children:"Optimize transaction batching based on fee estimates"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"See also:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/sdk/call",children:"Working with Blockchain Calls"})," for more examples of composing and submitting calls"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"../learn/fees",children:"Transaction Fees in Bittensor"})," for complete fee information"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"parameter-validation",children:"Parameter Validation"}),"\n",(0,t.jsxs)(n.p,{children:["Validate extrinsic parameters before submission to catch errors early, with ",(0,t.jsx)(n.code,{children:"val
1idate_extrinsic_params"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Validate parameters match the extrinsic schema\nparams = {\n "netuid": 1,\n "hotkey": hotkey_ss58,\n "amount_staked": amount.rao\n}\n\ntry:\n # Returns validated/corrected params or raises an exception\n validated_params = subtensor.validate_extrinsic_params(\n call_module="SubtensorModule",\n call_function="add_stake",\n call_params=params\n )\n print(f"Parameters validated: {validated_params}")\nexcept Exception as e:\n print(f"Invalid parameters: {e}")\n'})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," This method returns the validated parameters (potentially with corrections) or raises an exception if validation fails. It does not return a boolean."]}),"\n",(0,t.jsx)(n.h3,{id:"query-commitment-data",children:"Query Commitment Data"}),"\n",(0,t.jsxs)(n.p,{children:["Get commitment metadata for a hotkey on a subnet with ",(0,t.jsx)(n.code,{children:"get_commitment_metadata"}),". Previously in ",(0,t.jsx)(n.code,{children:"bittensor.core.extrinsic.serving"}),", now a ",(0,t.jsx)(n.code,{children:"Subtensor"})," method."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Query commitment metadata\nmetadata = subtensor.get_commitment_metadata(netuid=1, hotkey_ss58="5D...")\n'})}),"\n",(0,t.jsx)(n.h3,{id:"query-bonds-reset",children:"Query Bonds Reset"}),"\n",(0,t.jsxs)(n.p,{children:["Get the last bonds reset block for a subnet with ",(0,t.jsx)(n.code,{children:"get_last_bonds_reset"}),". Previously in ",(0,t.jsx)(n.code,{children:"bittensor.core.extrinsic.serving"}),", now a ",(0,t.jsx)(n.code,{children:"Subtensor"})," method."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Query when bonds were last reset (requires both netuid and hotkey_ss58)\nlast_reset_block = subtensor.get_last_bonds_reset(netuid=1, hotkey_ss58="5D...")\n'})}),"\n",(0,t.jsx)(n.h3,{id:"historical-block-data-query",children:"Historical Block Data Query"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"blocks_since_last_update"})," method has been improved and can now be used to query historical data from archive nodes."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Query blocks since last update with archive node support\nblocks = subtensor.blocks_since_last_update(netuid=1, uid=0)\n"})}),"\n",(0,t.jsx)(n.h2,{id:"breaking-changes-method-renames",children:"Breaking Changes: Method Renames"}),"\n",(0,t.jsx)(n.h3,{id:"subnet-methods",children:"Subnet Methods"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nnetuids = subtensor.get_subnets()\n\n# \u2705 New:\nnetuids = subtensor.get_all_subnets_netuid()\n"})}),"\n",(0,t.jsx)(n.h3,{id:"stake-methods",children:"Stake Methods"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old (removed - duplicate functionality):\nstake_info = subtensor.get_stake_for_coldkey(coldkey)\n\n# \u2705 Use instead:\nstake_info = subtensor.get_stake_info_for_coldkey(coldkey_ss58)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"commitment-methods",children:"Commitment Methods"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.commit(wallet, netuid, data)\n\n# \u2705 New:\nsubtensor.set_commitment(wallet, netuid, data)\n\n"})}),"\n",(0,t.jsx)(n.h3,{id:"serving-methods",children:"Serving Methods"}),"\n",(0,t.jsxs)(n.p,{children:["Functions moved from ",(0,t.jsx)(n.code,{children:"bittensor.core.extrinsic.serving"})," to ",(0,t.jsx)(n.code,{children:"Subtensor"})," methods:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nfrom bittensor.core.extrinsic.serving import get_metadata, get_last_bonds_reset\nmetadata = get_metadata(subtensor, netuid, hotkey)\nlast_reset = get_last_bonds_reset(subtensor, netuid)\n\n# \u2705 New:\nmetadata = subtensor.get_commitment_metadata(netuid, hotkey_ss58)\nlast_reset = subtensor.get_last_bonds_reset(netuid, hotkey_ss58)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"timelocked-weight-commits",children:"Timelocked Weight Commits"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old (deprecated):\ncommits = subtensor.get_current_weight_commit_info(netuid, mechid)\ncommits_v2 = subtensor.get_current_weight_commit_info_v2(netuid, mechid)\n\n# \u2705 Use:\ncommits = subtensor.get_timelocked_weight_commits(netuid, mechid)\n"})}),"\n",(0,t.jsx)(n.h2,{id:"parameter-changes",children:"Breaking Changes: Parameter Changes"}),"\n",(0,t.jsx)(n.h3,{id:"consistent-parameter-ordering",children:"Consistent Parameter Ordering"}),"\n",(0,t.jsxs)(n.p,{children:["Many methods now follow the standard order: ",(0,t.jsx)(n.code,{children:"subtensor"}),", ",(0,t.jsx)(n.code,{children:"netuid"}),", ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),", ..."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.set_children(wallet, netuid, hotkey, children, proportions)\nsubtensor.move_stake(wallet, origin_hotkey, dest_hotkey, amount)\n\n# \u2705 New:\nsubtensor.set_children(wallet, netuid, hotkey_ss58, children)\nsubtensor.move_stake(wallet, origin_netuid, origin_hotkey_ss58, destination_netuid, destination_hotkey_ss58, amount)\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Methods with reordered parameters:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"add_stake_multiple"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"set_children"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"move_stake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"query_subtensor"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"query_module"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"query_map_subtensor"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"query_map"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"root_set_pending_childkey_cooldown"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"block-parameter-standardization",children:"Block Parameter Standardization"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubnets = subtensor.all_subnets(block_number=12345)\n\n# \u2705 New:\nsubnets = subtensor.all_subnets(block=12345)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["All ",(0,t.jsx)(n.code,{children:"block_number"})," and ",(0,t.jsx)(n.code,{children:"block_id"})," parameters are now consistently named ",(0,t.jsx)(n.code,{children:"block"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"get-metagraph-info-fields-parameter",children:"Get Metagraph Info Fields Parameter"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\ninfo = subtensor.get_metagraph_info(netuid, field_indices=[0, 1, 2])\n\n# \u2705 New:\ninfo = subtensor.get_metagraph_info(netuid, selected_indices=[0, 1, 2])\n"})}),"\n",(0,t.jsx)(n.h3,{id:"mock-parameter",children:"Mock Parameter"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# \u274c Old:\nsubtensor = Subtensor(network="local", _mock=True)\n\n# \u2705 New:\nsubtensor = Subtensor(network="local", mock=True)\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"_mock"})," parameter is now public as ",(0,t.jsx)(n.code,{children:"mock"})," and moved to the last position in the parameter list."]}),"\n",(0,t.jsx)(n.h3,{id:"async-methods-parity",children:"Async Methods Parity"}),"\n",(0,t.jsx)(n.p,{children:"All async methods now have the same parameters as sync methods:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# New parameters added to async versions:\nasync_subtensor.get_subnet_validator_permits(netuid, block_hash=None, reuse_block=None)\nasync_subtensor.get_subnet_owner_hotkey(netuid, block_hash=None, reuse_block=None)\n"})}),"\n",(0,t.jsxs)(n.h3,{id:"removed-reuse_block-from-sync-methods",children:["Removed ",(0,t.jsx)(n.code,{children:"reuse_block"})," from Sync Methods"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nhotkeys = subtensor.get_owned_hotkeys(coldkey, reuse_block=True)\n\n# \u2705 New:\nhotkeys = subtensor.get_owned_hotkeys(coldkey_ss58)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"reuse_block"})," parameter has been removed from sync methods for consistency. It's still available in async methods where appropriate."]}),"\n",(0,t.jsx)(n.h3,{id:"transfer-fee-parameter-rename",children:"Transfer Fee Parameter Rename"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nfee = subtensor.get_transfer_fee(wallet, destination, value)\n\n# \u2705 New:\nfee = subtensor.get_transfer_fee(wallet, destination, amount)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"value"})," parameter has been renamed to ",(0,t.jsx)(n.code,{children:"amount"})," for consistency with other amount parameters across the SDK."]}),"\n",(0,t.jsx)(n.h4,{id:"weight-setting-methods-parameter-rename",children:"Weight Setting Methods Parameter Rename"}),"\n",(0,t.jsxs)(n.p,{children:["The following weight-setting methods have renamed ",(0,t.jsx)(n.code,{children:"max_retries"})," to ",(0,t.jsx)(n.code,{children:"max_attempts"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.commit_weights(wallet, netuid, uids, weights, max_retries=5)\nsubtensor.reveal_weights(wallet, netuid, uids, weights, salt, max_retries=5)\nsubtensor.set_weights(wallet, netuid, uids, weights, max_retries=5)\n\n# \u2705 New:\nsubtensor.commit_weights(wallet, netuid, uids, weights, max_attempts=5)\nsubtensor.reveal_weights(wallet, netuid, uids, weights, salt, max_attempts=5)\nsubtensor.set_weights(wallet, netuid, uids, weights, max_attempts=5)\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"New Validation:"})," The ",(0,t.jsx)(n.code,{children:"max_attempts"})," parameter now includes validation. If ",(0,t.jsx)(n.code,{children:"max_attempts=0"})," or negative, the method will return an ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," with ",(0,t.jsx)(n.code,{children:"success=False"})," and an appropriate error message instead of attempting the operation."]}),"\n",(0,t.jsxs)(n.h2,{id:"removed-methods",children:["Breaking Changes",":Removed"," Methods"]}),"\n",(0,t.jsx)(n.h3,{id:"duplicate-references",children:"Duplicate References"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Removed (was just a reference):\nsubtensor.get_stake_info_for_coldkey = subtensor.get_stake_for_coldkey\n\n# \u2705 Use the canonical name:\nsubtensor.get_stake_info_for_coldkey(coldkey_ss58)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"defaultconfig-class-removed",children:"DefaultConfig Class Removed"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Removed:\nfrom bittensor.core.config import DefaultConfig\n\n# \u2705 Use Config directly:\nfrom bittensor.core.config import Config\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"DefaultConfig"})," class has been removed as it was unused in the codebase."]}),"\n",(0,t.jsx)(n.h3,{id:"delegateinfo-attribute-removed",children:"DelegateInfo Attribute Removed"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Removed:\ndelegate_info.total_daily_return # No longer calculated or provided\n\n# This attribute has been removed from both DelegateInfo and DelegateInfoLite classes\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"total_daily_return"})," attribute has been removed as it was not providing accurate information and should not be relied upon."]}),"\n",(0,t.jsx)(n.h2,{id:"extrinsic-calling-changes",children:"Extrinsic Calling Changes"}),"\n",(0,t.jsxs)(n.p,{children:["All functions that submit extrinsics to the Subtensor blockchain (both standalone functions and ",(0,t.jsx)(n.code,{children:"Subtensor"})," class methods) have been standardized for consistency."]}),"\n",(0,t.jsx)(n.h3,{id:"standardized-parameters",children:"Standardized Parameters"}),"\n",(0,t.jsxs)(n.p,{children:["All functions that submit extrinsics now follow a ",(0,t.jsx)(n.strong,{children:"consistent parameter ordering"})," and include standard flags:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Standard parameter order:\nextrinsic_function(\n subtensor,\n # ... extrinsic-specific parameters (wallet, netuid, hotkey_ss58, amount, etc.) ...\n period: Optional[int]
1= None,\n raise_error: bool = False,\n wait_for_inclusion: bool = True,\n wait_for_finalization: bool = True,\n)\n"})}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Extrinsic-specific arguments come first"})," (e.g., ",(0,t.jsx)(n.code,{children:"wallet"}),", ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),", ",(0,t.jsx)(n.code,{children:"netuid"}),", ",(0,t.jsx)(n.code,{children:"amount"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Optional general flags come last"})," (e.g., ",(0,t.jsx)(n.code,{children:"period"}),", ",(0,t.jsx)(n.code,{children:"raise_error"}),", ",(0,t.jsx)(n.code,{children:"wait_for_inclusion"}),", ",(0,t.jsx)(n.code,{children:"wait_for_finalization"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Default behavior changed"}),": ",(0,t.jsx)(n.code,{children:"wait_for_inclusion"})," and ",(0,t.jsx)(n.code,{children:"wait_for_finalization"})," now default to ",(0,t.jsx)(n.code,{children:"True"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"This ensures the SDK function response correctly reflects the blockchain transaction outcome."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["When ",(0,t.jsx)(n.code,{children:"raise_error=False"}),", extrinsic functions do not raise exceptions; all error information is captured inside the returned ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," object. Set ",(0,t.jsx)(n.code,{children:"raise_error=True"})," if you prefer exceptions to be raised directly for error cases."]})}),"\n",(0,t.jsx)(n.h3,{id:"keyword-only-arguments",children:"Keyword-Only Arguments"}),"\n",(0,t.jsxs)(n.p,{children:["All extrinsics and related ",(0,t.jsx)(n.code,{children:"Subtensor"})," methods now use ",(0,t.jsx)(n.strong,{children:"keyword-only arguments"})," (indicated by ",(0,t.jsx)(n.code,{children:"*,"})," in the function signature). This means that certain parameters must be passed by name rather than position, improving code clarity and preventing accidental argument misplacement."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"*"})," symbol in Python function signatures creates a boundary: all parameters after ",(0,t.jsx)(n.code,{children:"*"})," must be passed as keyword arguments. This helps prevent bugs from positional argument confusion, especially when functions have many parameters."]}),"\n",(0,t.jsx)(n.h4,{id:"example-keyword-only-arguments",children:"Example: Keyword-Only Arguments"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# Before (positional arguments could cause confusion):\nsubtensor.add_stake(\n wallet,\n 1,\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n amount,\n False,\n False,\n 0.005,\n False,\n None,\n False,\n True,\n True\n)\n# Which parameter is which? Hard to tell!\n\n# After (keyword-only arguments enforce clarity):\nsubtensor.add_stake(\n wallet,\n 1,\n "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",\n amount,\n False,\n False,\n 0.005,\n mev_protection=True, # Must be passed by name if provided\n period=None, # Must be passed by name if provided\n raise_error=False, # Must be passed by name if provided\n wait_for_inclusion=True, # Must be passed by name if provided\n wait_for_finalization=True # Must be passed by name if provided\n)\n'})}),"\n",(0,t.jsx)(n.h3,{id:"extrinsicresponse-return-type",children:"ExtrinsicResponse Return Type"}),"\n",(0,t.jsxs)(n.p,{children:["All SDK functions that submit extrinsics to the blockchain now return an ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," object instead of ",(0,t.jsx)(n.code,{children:"bool"})," or tuples."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"success"})}),": Primary indicator - ",(0,t.jsx)(n.code,{children:"True"})," if transaction succeeded, ",(0,t.jsx)(n.code,{children:"False"})," otherwise"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"message"})}),': User-friendly status (e.g., "Success", "Insufficient balance")']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"extrinsic_fee"})}),": Network fee paid to validators (similar to gas fees) - see ",(0,t.jsx)(n.a,{href:"../learn/fees",children:"Transaction Fees"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"transaction_tao_fee"})}),": Application-level fee charged in TAO for swap-based staking operations (0.05% of transacted liquidity when applicable)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"transaction_alpha_fee"})}),": Application-level fee charged in Alpha (subnet token) for swap-based staking operations (0.05% of transacted liquidity when applicable)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"extrinsic_receipt"})}),": Contains block number, hash, events, and execution details when ",(0,t.jsx)(n.code,{children:"wait_for_inclusion=True"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"data"})}),": Operation-specific results:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Registration: ",(0,t.jsx)(n.code,{children:'{"uid": int}'})," - assigned neuron UID"]}),"\n",(0,t.jsxs)(n.li,{children:["Commit weights: ",(0,t.jsx)(n.code,{children:'{"reveal_round": int}'})," - round for revealing"]}),"\n",(0,t.jsxs)(n.li,{children:["Metadata: ",(0,t.jsx)(n.code,{children:'{"encrypted": bytes, "reveal_round": int}'})]}),"\n",(0,t.jsx)(n.li,{children:"Stake operations: balance information"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"error"})}),": Python exception for programmatic error handling when ",(0,t.jsx)(n.code,{children:"raise_error=False"})]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"https://github.com/RaoFoundation/bittensor/blob/main/bittensor/core/types.py#L290-L484",children:"source code"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"parameter-renames",children:"Parameter Renames"}),"\n",(0,t.jsx)(n.p,{children:"Many parameters in functions that submit blockchain transactions have been renamed for consistency across the SDK:"}),"\n",(0,t.jsx)(n.h4,{id:"hotkey-and-coldkey-parameters",children:"Hotkey and Coldkey Parameters"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["All SS58 address parameters now use the ",(0,t.jsx)(n.code,{children:"_ss58"})," suffix:"]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.move_stake(wallet, origin_hotkey, destination_hotkey, amount)\n\n# \u2705 New:\nsubtensor.move_stake(wallet, origin_netuid, origin_hotkey_ss58, destination_netuid, destination_hotkey_ss58, amount)\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Affected methods:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"hotkey"})," \u2192 ",(0,t.jsx)(n.code,{children:"hotkey_ss58"})," (all methods)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"hotkey_ss58_address"})," \u2192 ",(0,t.jsx)(n.code,{children:"hotkey_ss58"})," (all methods)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"coldkey"})," \u2192 ",(0,t.jsx)(n.code,{children:"coldkey_ss58"})," (all methods)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"coldkey_ss58_address"})," \u2192 ",(0,t.jsx)(n.code,{children:"coldkey_ss58"})," (all methods)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"hotkeypub"})," \u2192 ",(0,t.jsx)(n.code,{children:"hotkeypub_ss58"})," (where applicable)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"coldkeypub"})," \u2192 ",(0,t.jsx)(n.code,{children:"coldkeypub_ss58"})," (where applicable)"]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"transfer-extrinsic",children:"Transfer Extrinsic"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.transfer(wallet, dest, amount)\n\n# \u2705 New:\nsubtensor.transfer(wallet, destination_ss58, amount)\n"})}),"\n",(0,t.jsx)(n.h4,{id:"staking-parameters",children:"Staking Parameters"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# \u274c Old:\nsubtensor.unstake(wallet, hotkey, amount, safe_staking=True)\nsubtensor.swap_stake(wallet, from_hotkey, to_hotkey, amount, safe_staking=True)\n\n# \u2705 New:\nsubtensor.unstake(wallet, netuid, hotkey_ss58, amount, safe_unstaking=True)\n\n# For swapping stake between subnets (same hotkey, different subnets):\nsubtensor.swap_stake(\n wallet,\n hotkey_ss58="5D...",\n origin_netuid=1,\n destination_netuid=2,\n amount=amount,\n safe_swapping=True\n)\n\n# For moving stake between hotkeys (use move_stake instead):\nsubtensor.move_stake(\n wallet,\n origin_netuid=1,\n origin_hotkey_ss58="5D...1",\n destination_netuid=1,\n destination_hotkey_ss58="5D...2",\n amount=amount\n)\n'})}),"\n",(0,t.jsx)(n.h4,{id:"required-parameters",children:"Required Parameters"}),"\n",(0,t.jsxs)(n.p,{children:["Several previously optional parameters are now ",(0,t.jsx)(n.strong,{children:"required"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.add_stake(wallet, hotkey_ss58=None, amount=None)\n\n# \u2705 New:\nsubtensor.add_stake(\n wallet,\n netuid: int, # Now required\n hotkey_ss58: str, # Now required\n amount: Balance # Now required\n)\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Affected functions:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"add_stake_extrinsic"}),": ",(0,t.jsx)(n.code,{children:"netuid"}),", ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),", ",(0,t.jsx)(n.code,{children:"amount"})," now required"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"add_stake_multiple_extrinsic"}),": ",(0,t.jsx)(n.code,{children:"amounts"})," now required"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"unstake_extrinsic"}),": ",(0,t.jsx)(n.code,{children:"netuid"}),", ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),", ",(0,t.jsx)(n.code,{children:"amount"})," now required"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"unstake_multiple_extrinsic"}),": ",(0,t.jsx)(n.code,{children:"amounts"})," now required"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"removed-functions",children:"Removed Functions"}),"\n",(0,t.jsxs)(n.h4,{id:"unstake_all-parameter-removed-from-unstake_extrinsic",children:[(0,t.jsx)(n.code,{children:"unstake_all"})," parameter removed from ",(0,t.jsx)(n.code,{children:"unstake_extrinsic"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.unstake(wallet, hotkey, amount=None, unstake_all=True)\n\n# \u2705 New: Use dedicated method\nsubtensor.unstake_all(wallet, netuid, hotkey_ss58)\n"})}),"\n",(0,t.jsxs)(n.h4,{id:"internal-_do-methods-removed",children:["Internal ",(0,t.jsx)(n.code,{children:"_do*"})," methods removed"]}),"\n",(0,t.jsx)(n.p,{children:"All internal helper methods have been consolidated into the main functions that submit extrinsics:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_commit_reveal_v3"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"commit_timelocked_weights_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_commit_weights"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"commit_weights_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_reveal_weights"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"reveal_weights_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_set_weights"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"set_weights_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_burned_register"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"burned_register_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_pow_register"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"register_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_set_root_weights"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"set_root_weights_extrinsic"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_do_transfer"})," \u2192 merged into ",(0,t.jsx)(n.code,{children:"transfer_extrinsic"})]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"deprecated-root-weights-method-removed",children:"Deprecated root weights method removed"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Removed:\nsubtensor.set_root_weights_extrinsic(...)\n\n# This was obsolete and has been removed entirely\n"})}),"\n",(0,t.jsx)(n.h4,{id:"commit-reveal-v3-crv3-removed",children:"Commit-Reveal v3 (CRv3) removed"}
1),"\n",(0,t.jsx)(n.p,{children:"All CRv3-related logic and extrinsics have been removed as CRv3 is no longer supported on the chain."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Removed:\ncommit_reveal_extrinsic(...) # Old non-mechanism version\n\n# \u2705 Use:\ncommit_timelocked_weights_extrinsic(..., commit_reveal_version=4)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"merged-functions",children:"Merged Functions"}),"\n",(0,t.jsxs)(n.h4,{id:"increase_take-and-decrease_take-merged-into-set_delegate_take",children:[(0,t.jsx)(n.code,{children:"increase_take"})," and ",(0,t.jsx)(n.code,{children:"decrease_take"})," merged into ",(0,t.jsx)(n.code,{children:"set_delegate_take"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# \u274c Old:\nsubtensor.increase_take(wallet, hotkey_ss58, take)\nsubtensor.decrease_take(wallet, hotkey_ss58, take)\n\n# \u2705 New:\n# Automatically determines whether to increase or decrease based on current vs new take\nsubtensor.set_delegate_take(\n wallet,\n hotkey_ss58="5D...",\n take=0.18 # 18% as a float between 0 and 1\n)\n\n# \u2705 New (low-level extrinsic with explicit action):\n# The extrinsic requires an explicit action parameter with a strict type:\n# action: Literal["increase_take", "decrease_take"]\nfrom bittensor.core.extrinsics.take import set_take_extrinsic\n\n# Example: increase take\nresponse_inc = set_take_extrinsic(\n subtensor,\n wallet=wallet,\n hotkey_ss58="5D...",\n take=0.20,\n action="increase_take",\n)\n\n# Example: decrease take\nresponse_dec = set_take_extrinsic(\n subtensor,\n wallet=wallet,\n hotkey_ss58="5D...",\n take=0.15,\n action="decrease_take",\n)\n'})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," The method automatically calls ",(0,t.jsx)(n.code,{children:"increase_take"})," or ",(0,t.jsx)(n.code,{children:"decrease_take"})," internally based on whether the new take is higher or lower than the current take."]}),"\n",(0,t.jsx)(n.h4,{id:"mechanism-specific-weight-functions-consolidated",children:"Mechanism-specific weight functions consolidated"}),"\n",(0,t.jsx)(n.p,{children:"Non-mechanism versions removed, mechanism versions renamed and moved:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Old paths (removed):\nfrom bittensor.core.extrinsics.mechanism import (\n commit_timelocked_mechanism_weights_extrinsic,\n commit_mechanism_weights_extrinsic,\n reveal_mechanism_weights_extrinsic,\n)\n\n# \u2705 New paths:\nfrom bittensor.core.extrinsics.weights import (\n commit_timelocked_weights_extrinsic,\n commit_weights_extrinsic,\n reveal_weights_extrinsic,\n set_weights_extrinsic,\n)\n"})}),"\n",(0,t.jsx)(n.h2,{id:"balance-handling",children:"Balance Handling"}),"\n",(0,t.jsx)(n.h3,{id:"stricter-type-checking",children:"Stricter Type Checking"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Balance operations now raise errors instead of warnings"})," for type mismatches."]}),"\n",(0,t.jsxs)(n.h4,{id:"1-invalid-balance-type-balancetypeerror",children:["1) Invalid balance type (",(0,t.jsx)(n.code,{children:"BalanceTypeError"}),")"]}),"\n",(0,t.jsxs)(n.p,{children:["Raised when a method expecting a ",(0,t.jsx)(n.code,{children:"Balance"})," receives a non-",(0,t.jsx)(n.code,{children:"Balance"})," value."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"from bittensor.utils.balance import Balance, tao, rao\nfrom bittensor.core.errors import BalanceTypeError\n\n# \u274c Old (pre-10.0): would warn but continue\namount = 1.0 # float\n# subtensor.transfer(wallet, dest, amount)\n\n# \u2705 New: must pass a Balance object (choose your preferred constructor)\nsubtensor.transfer(wallet, dest, tao(1.0))\nsubtensor.transfer(wallet, dest, rao(1_000_000_000))\nsubtensor.transfer(wallet, dest, Balance.from_tao(1.0))\nsubtensor.transfer(wallet, dest, Balance.from_rao(1_000_000_000))\n"})}),"\n",(0,t.jsxs)(n.h4,{id:"2-mismatched-balance-units-balanceunitmismatcherror",children:["2) Mismatched balance units (",(0,t.jsx)(n.code,{children:"BalanceUnitMismatchError"}),")"]}),"\n",(0,t.jsxs)(n.p,{children:["Raised when performing operations on two ",(0,t.jsx)(n.code,{children:"Balance"})," objects that represent different units (e.g., TAO vs Alpha from a subnet)."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"from bittensor.utils.balance import Balance\nfrom bittensor.core.errors import BalanceUnitMismatchError\n\nbalance_tao = Balance.from_tao(1.0)\nbalance_alpha = Balance.from_rao(1_000_000_000) # 1 tao = 1x10^9 rao\n\n# \u274c Will raise BalanceUnitMismatchError: mixing units in arithmetic\n_ = balance_tao + balance_alpha\n\n# \u274c Will raise BalanceUnitMismatchError: comparing mismatched units\n_ = balance_tao > balance_alpha\n\n# \u2705 Ensure units match before operations\n_ = balance_tao + Balance.from_tao(0.5)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"function-renames",children:"Function Re
1names"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nfrom bittensor.utils.balance import check_balance, check_and_convert_to_balance\n\namount = check_and_convert_to_balance(value)\n\n# \u2705 New:\nfrom bittensor.utils.balance import check_balance_amount\n\namount = check_balance_amount(value)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"all-amount-parameters-require-balance-objects",children:"All Amount Parameters Require Balance Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nsubtensor.transfer(wallet, destination, 1.0) # float accepted\nsubtensor.add_stake(wallet, hotkey, 5) # int accepted\n\n# \u2705 New:\nfrom bittensor.utils.balance import tao, rao\n\nsubtensor.transfer(wallet, destination, tao(1.0)) # convenience helper\nsubtensor.add_stake(wallet, netuid, hotkey_ss58, tao(5.0))\n# or\nsubtensor.transfer(wallet, destination, rao(1000000000))\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Affected methods:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"transfer"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"add_stake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"add_stake_multiple"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"unstake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"unstake_multiple"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"move_stake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"swap_stake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"transfer_stake"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_transfer_fee"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_stake_add_fee"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_stake_movement_fee"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_unstake_fee"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"import-changes",children:"Import Changes"}),"\n",(0,t.jsx)(n.h3,{id:"removed-backwards-compatibility-aliases",children:"Removed Backwards Compatibility Aliases"}),"\n",(0,t.jsxs)(n.p,{children:["The following lowercase aliases have been ",(0,t.jsx)(n.strong,{children:"removed"})," from ",(0,t.jsx)(n.code,{children:"bittensor"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old (removed):\nfrom bittensor import subtensor, wallet, config, axon, dendrite\nfrom bittensor import keyfile, metagraph, synapse, async_subtensor\n\n# \u2705 New (use PascalCase):\nfrom bittensor import Subtensor, Wallet, Config, Axon, Dendrite\nfrom bittensor import Keyfile, Metagraph, Synapse, AsyncSubtensor\n"})}),"\n",(0,t.jsx)(n.h3,{id:"removed-direct-subpackage-links",children:"Removed Direct Subpackage Links"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old (removed):\nfrom bittensor.mock import MockSubtensor\nfrom bittensor.extrinsics import transfer_extrinsic\n\n# \u2705 New (use top-level convenience imports or full paths):\nfrom bittensor import mock, extrinsics\nmock_sub = mock.MockSubtensor()\nresponse = extrinsics.transfer.transfer_extrinsic(...)\n\n# Or use full paths:\nfrom bittensor.utils.mock import MockSubtensor\nfrom bittensor.core.extrinsics import transfer_extrinsic\n"})}),"\n",(0,t.jsx)(n.h3,{id:"new-import-convenience",children:"New Import Convenience"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'# \u2705 New convenience imports:\nfrom bittensor import extrinsics\nfrom bittensor import mock\nfrom bittensor import get_async_subtensor\n\n# Use them:\nresponse = extrinsics.transfer.transfer_extrinsic(...)\nmock_sub = mock.MockSubtensor()\nasync_sub = get_async_subtensor(network="test")\n'})}),"\n",(0,t.jsx)(n.h3,{id:"module-reorganization",children:"Module Reorganization"}),"\n",(0,t.jsx)(n.p,{children:"Several modules have been moved to new subpackages:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nfrom bittensor.core.subtensor_api import SubtensorAPI\nfrom bittensor.core.timelock import TimelockManager\n\n# \u2705 New:\nfrom bittensor.extras.subtensor_api import SubtensorAPI\nfrom bittensor.extras import timelock\n\n# Or use top-level convenience import:\nfrom bittensor import SubtensorApi, timelock\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"bittensor.extras"})," package now hosts optional extensions like ",(0,t.jsx)(n.code,{children:"SubtensorApi"}),", ",(0,t.jsx)(n.code,{children:"timelock"})," and ",(0,t.jsx)(n.code,{children:"dev_framework"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"extrinsic-parameters-package",children:"Extrinsic Parameters Package"}),"\n",(0,t.jsxs)(n.p,{children:["Parameters for functions that submit extrinsics are now centralized in a dedicated package, ",(0,t.jsx)(n.code,{children:"bittensor.core.extrinsics.params"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"This makes it easier to discover available parameters and ensures consistency across sync/async implementations of blockchain transaction functions."}),"\n",(0,t.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,t.jsx)(n.h3,{id:"renamed-variables",children:"Renamed Variables"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# \u274c Old:\nBT_CHAIN_ENDPOINT=ws://127.0.0.1:9945\nBT_NETWORK=local\n\n# \u2705 New:\nBT_SUBTENSOR_CHAIN_ENDPOINT=ws://127.0.0.1:9945\nBT_SUBTENSOR_NETWORK=local\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"All renamed environment variables:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BT_CHAIN_ENDPOINT"})," \u2192 ",(0,t.jsx)(n.code,{children:"BT_SUBTENSOR_CHAIN_ENDPOINT"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"BT_NETWORK"})," \u2192 ",(0,t.jsx)(n.code,{children:"BT_SUBTENSOR_NETWORK"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"enabling-cli-argument-parsing",children:"Enabling CLI Argument Parsing"}),"\n",(0,t.jsxs)(n.p,{children:["CLI argument passing is disabled by default. Therefore, if your script uses the SDK and receives unwanted ",(0,t.jsx)(n.code,{children:"--config"})," or other CLI parameters, you must explicitly enable this by using the ",(0,t.jsx)(n.code,{children:"BT_NO_PARSE_CLI_ARGS"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Set environment variable to ",(0,t.jsx)(n.code,{children:"0"}),", ",(0,t.jsx)(n.code,{children:"false"}),", ",(0,t.jsx)(n.code,{children:"no"}),", or ",(0,t.jsx)(n.code,{children:"off"})," to enable parsing as shown:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"BT_NO_PARSE_CLI_ARGS=0 python y
1our_script.py --logging.debug\n"})}),"\n",(0,t.jsx)(n.p,{children:"Or in code:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-py",children:"import os\nos.environ['BT_NO_PARSE_CLI_ARGS'] = '0'\n\nfrom bittensor import Subtensor\n# CLI arguments will now be processed by the SDK\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["CLI parsing is disabled by default (",(0,t.jsx)(n.code,{children:"BT_NO_PARSE_CLI_ARGS=1"}),"). This means that the SDK skips CLI parsing entirely and falls back to default configuration values defined in ",(0,t.jsx)(n.code,{children:"bittensor.core.settings.DEFAULTS"})," for all configuration options across the SDK. This is useful when embedding the SDK in applications that manage their own configuration."]})}),"\n",(0,t.jsx)(n.h2,{id:"metagraph-changes",children:"Metagraph Changes"}),"\n",(0,t.jsxs)(n.p,{children:["This section covers changes to metagraph-related functionality in both the ",(0,t.jsx)(n.code,{children:"Subtensor"})," and ",(0,t.jsx)(n.code,{children:"Metagraph"})," classes, particularly around the new multiple incentive mechanisms feature."]}),"\n",(0,t.jsx)(n.h3,{id:"mechid-parameter-ordering",children:"Mechid Parameter Ordering"}),"\n",(0,t.jsxs)(n.p,{children:["With the introduction of multiple incentive mechanisms per subnet, many methods now accept a ",(0,t.jsx)(n.code,{children:"mechid"})," (mechanism ID) parameter to specify which mechanism to query:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# Query methods with mechid support (parameter order: netuid, mechid=0, block=None)\nbonds = subtensor.bonds(netuid=1, mechid=0)\nweights = subtensor.weights(netuid=1, mechid=0)\nmetagraph = subtensor.metagraph(netuid=1, mechid=0)\ncommits = subtensor.get_timelocked_weight_commits(netuid=1, mechid=0)\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Methods with mechid parameter:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"bonds(netuid, mechid=0, block=None)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"weights(netuid, mechid=0, block=None)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"metagraph(netuid, mechid=0, lite=True, block=None)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_metagraph_info(netuid, mechid=0, ...)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"get_timelocked_weight_commits(netuid, mechid=0, block=None)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"commit_weights(wallet, netuid, uids, weights, mechid=0, ...)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"reveal_weights(wallet, netuid, uids, weights, mechid=0, ...)"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.code,{children:"set_weights(wallet, netuid, uids, weights, mechid=0, ...)"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"metagraphinfo-changes",children:"MetagraphInfo Changes"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"MetagraphInfo"})," class now requires a ",(0,t.jsx)(n.code,{children:"mechid"})," parameter to support multiple incentive mechanisms:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"# mechid is now required in MetagraphInfo\nfrom bittensor.core.chain_data.metagraph_info import MetagraphInfo\n\ninfo = MetagraphInfo(\n netuid=1,\n mechid=0, # Now required (mechanism ID)\n # ... other fields\n)\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"})," ",(0,t.jsx)(n.code,{children:"mechid=0"})," refers to the first (or only) incentive mechanism in a subnet. Subnets can have multiple mechanisms (currently limited to 2), each with their own independent weight matrices and emissions. See ",(0,t.jsx)(n.a,{href:"../subnets/understanding-multiple-mech-subnets",children:"Multiple Incentive Mechanisms"})," for details."]}),"\n",(0,t.jsx)(n.h3,{id:"async-metagraph-initialization",children:"Async Metagraph Initialization"}),"\n",(0,t.jsxs)(n.p,{children:["The async ",(0,t.jsx)(n.code,{children:"AsyncMetagraph.sync"})," method no longer terminates the subtensor instance after use, improving resource management and allowing for reuse of connections in async contexts."]}),"\n",(0,t.jsx)(n.h2,{id:"migration-checklist",children:"Migration Checklist"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update Python ver
1sion"})," to 3.10 or higher"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update bittensor package"}),": ",(0,t.jsx)(n.code,{children:"pip install bittensor>=10.0.0"})," (until the public release, you should install the latest available release candidate)."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update all imports"})," to use PascalCase class names (",(0,t.jsx)(n.code,{children:"Subtensor"}),", ",(0,t.jsx)(n.code,{children:"Wallet"}),", etc.), also known as the CapWords convention."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Replace all amount parameters"})," with ",(0,t.jsx)(n.code,{children:"Balance"})," objects.`"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update all functions that submit extrinsics"})," to handle ",(0,t.jsx)(n.code,{children:"ExtrinsicResponse"})," return type instead of ",(0,t.jsx)(n.code,{children:"bool"})," or tuples[bool, str]"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Rename parameters"})," according to the standardization (",(0,t.jsx)(n.code,{children:"hotkey"})," \u2192 ",(0,t.jsx)(n.code,{children:"hotkey_ss58"}),", ",(0,t.jsx)(n.code,{children:"dest"})," \u2192 ",(0,t.jsx)(n.code,{children:"destination"}),", etc.)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update environment variables"})," (",(0,t.jsx)(n.code,{children:"BT_CHAIN_ENDPOINT"})," \u2192 ",(0,t.jsx)(n.code,{children:"BT_SUBTENSOR_CHAIN_ENDPOINT"}),", ",(0,t.jsx)(n.code,{children:"BT_NETWORK"})," \u2192 ",(0,t.jsx)(n.code,{children:"BT_SUBTENSOR_NETWORK"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Review removed methods"})," and replace with alternatives (see ",(0,t.jsx)(n.a,{href:"#removed-methods",children:"Removed Methods"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Update parameter order"})," for affected methods (see ",(0,t.jsx)(n.a,{href:"#parameter-changes",children:"Parameter Changes"}),")"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:["Add ",(0,t.jsx)(n.code,{children:"mechid"})," parameter"]})," to weight-setting code if working with multiple mechanisms"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Test thoroughly"})," with your specific use case, especially blockchain transactions and balance handling"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},4073:(e,n,s)=>{s.d(n,{A:()=>y});var i=s(8521),t=s(5277);function r(e){const{mdxAdmonitionTitle:n,rest:s}=function(e){const n=i.Children.toArray(e),s=n.find((e=>i.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),r=n.filter((e=>e!==s)),a=s?.props.children;return{mdxAdmonitionTitle:a,rest:r.length>0?(0,t.jsx)(t.Fragment,{children:r}):null}}(e.children),r=e.title??n;return{...e,...r&&{title:r},children:s}}var a=s(613),o=s(5127),l=s(4855),c=s(3334);const d={icon:(0,t.jsx)(c.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function h(e){return(0,t.jsx)(l.A,{...d,...e,className:(0,a.A)("alert alert--secondary",e.className),children:e.children})}var m=s(2165);const u={icon:(0,t.jsx)(m.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function x(e){return(0,t.jsx)(l.A,{...u,...e,className:(0,a.A)("alert alert--success",e.className),children:e.children})}var p=s(6518);const g={icon:(0,t.jsx)(p.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function j(e){return(0,t.jsx)(l.A,{...g,...e,className:(0,a.A)("alert alert--info",e.className),children:e.children})}var f=s(6396);const b={icon:(0,t.jsx)(f.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};var _=s(1361);const v={icon:(0,t.jsx)(_.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const k={icon:(0,t.jsx)(f.A,{}),title:(0,t.jsx)(o.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const w={...{note:h,tip:x,info:j,warning:function(e){return(0,t.jsx)(l.A,{...b,...e,className:(0,a.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,t.jsx)(l.A,{...v,...e,className:(0,a.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,t.jsx)(h,{title:"secondary",...e}),important:e=>(0,t.jsx)(j,{title:"important",...e}),success:e=>(0,t.jsx)(x,{title:"success",...e}),caution:function(e){return(0,t.jsx)(l.A,{...k,...e,className:(0,a.A)("alert alert--warning",e.className),children:e.children})}}};function y(e){const n=r(e),s=(i=n.type,w[i]||(console.warn(`No admonition component found for admonition type "${i}". Using Info as fallback.`),w.info));var i;return(0,t.jsx)(s,{...n})}},4855:(e,n,s)=>{s.d(n,{A:()=>d});s(8521);var i=s(9257),t=s(1904);const r={admonition:"admonition_Gfwi",admonitionHeading:"admonitionHeading_f1Ed",admonitionIcon:"admonitionIcon_kpSf",admonitionContent:"admonitionContent_UjKb"};var a=s(5277);function o({type:e,className:n,children:s}){return(0,a.jsx)("div",{className:(0,i.A)(t.G.common.admonition,t.G.common.admonitionType(e),r.admonition,n),children:s})}function l({icon:e,title:n,hasChildren:s}){return(0,a.jsxs)("div",{className:r.admonitionHeading,children:[(0,a.jsx)("span",{className:r.admonitionIcon,children:e}),(0,a.jsx)("span",{className:(0,i.A)({admonition__heading:s}),children:n})]})}function c({children:e}){return e?(0,a.jsx)("div",{className:r.admonitionContent,children:e}):null}function d(e){const{type:n,icon:s,title:i,children:t,className:r}=e;return(0,a.jsxs)(o,{type:n,className:r,children:[(0,a.jsx)(l,{title:i,icon:s,hasChildren:!!t}),(0,a.jsx)(c,{children:t})]})}},6396:(e,n,s)=>{s.d(n,{A:()=>t});s(8521);var i=s(5277);
1function t(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,i.jsx)("path",{d:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16"})})}},6518:(e,n,s)=>{s.d(n,{A:()=>t});s(8521);var i=s(5277);function t(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:(0,i.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.