Runtime Calls
Runtime Calls
This page includes runtime API calls exposed by the Subtensor runtime. Accessible via api.call.<RuntimeApi>.<method_name>.
info
Generated from Subtensor runtime spec version 470. Connected to: wss://entrypoint-finney.opentensor.ai:443
- AccountNonceApi
- AuraApi
- BabeApi
- BetaBasketRuntimeApi
- BlockBuilder
- ContractsApi
- ConvertTransactionRuntimeApi
- Core
- DelegateInfoRuntimeApi
- EthereumRuntimeRPCApi
- GenesisBuilder
- GrandpaApi
- Metadata
- NeuronInfoRuntimeApi
- OffchainWorkerApi
- ProxyFilterRuntimeApi
- SessionKeys
- ShieldApi
- StakeInfoRuntimeApi
- SubnetInfoRuntimeApi
- SubnetRegistrationRuntimeApi
- SwapRuntimeApi
- TaggedTransactionQueue
- TransactionPaymentApi
- TransactionPaymentCallApi
AccountNonceApi
accountNonce(account: AccountId32): u32
- interface:
api.call.accountNonceApi.accountNonce - summary: Get current account nonce of given
AccountId.
AuraApi
authorities(): Vec<Public>
- interface:
api.call.auraApi.authorities - summary: Return the current set of authorities.
slotDuration(): SlotDuration
-
interface:
api.call.auraApi.slotDuration -
summary: Returns the slot duration for Aura.
Currently, only the value provided by this type at genesis will be used.
BabeApi
configuration(): BabeConfiguration
- interface:
api.call.babeApi.configuration - summary: Return the configuration for BABE.
currentEpoch(): Epoch
- interface:
api.call.babeApi.currentEpoch - summary: Returns information regarding the current epoch.
currentEpochStart(): Slot
- interface:
api.call.babeApi.currentEpochStart - summary: Returns the slot that started the current epoch.
generateKeyOwnershipProof(slot: Slot, authority_id: Public): Option<OpaqueKeyOwnershipProof>
- interface:
api.call.babeApi.generateKeyOwnershipProof - summary: Generates a proof of key ownership for the given authority in the current epoch. An example usage of this module is coupled with the session historical module to prove that a given authority key is tied to a given staking identity during a specific session. Proofs of key ownership are necessary for submitting equivocation reports. NOTE: even though the API takes a
slotas parameter the current implementations ignores this parameter and instead relies on this method being called at the correct block height, i.e. any point at which the epoch for the given slot is live on-chain. Future implementations will instead use indexed data through an offchain worker, not requiring older states to be available.
nextEpoch(): Epoch
- interface:
api.call.babeApi.nextEpoch - summary: Returns information regarding the next epoch (which was already previously announced).
submitReportEquivocationUnsignedExtrinsic(equivocation_proof: EquivocationProof, key_owner_proof: OpaqueKeyOwnershipProof): Option<Null>
- interface:
api.call.babeApi.submitReportEquivocationUnsignedExtrinsic - summary: Submits an unsigned extrinsic to report an equivocation. The caller must provide the equivocation proof and a key ownership proof (should be obtained using
generate_key_ownership_proof). The extrinsic will be unsigned and should only be accepted for local authorship (not to be broadcast to the network). This method returnsNonewhen creation of the extrinsic fails, e.g. if equivocation reporting is disabled for the given runtime (i.e. this method is hardcoded to returnNone). Only useful in an offchain context.
BetaBasketRuntimeApi
getAllBetaPricing(start_after: Option<AccountId32>, limit: u32): BetaPricingPage
- interface:
api.call.betaBasketRuntimeApi.getAllBetaPricing - summary: One bounded page of pricing snapshots for funds with outstanding shares, all marked against the same published index snapshot.
limitis clamped to a hard per-call cap (0 = full page); the returnednextcursor resumes the enumeration (Nonewhen complete), so the full leaderboard is a short loop of bounded calls instead of one unbounded scan.
getAllValidatorBaskets(): Vec<BasketSummary>
- interface:
api.call.betaBasketRuntimeApi.getAllValidatorBaskets - summary: Summaries for every validator with an active basket (network-wide leaderboard).
getBasketClaimPreview(hotkey: AccountId32, coldkey: AccountId32): Option<BasketClaimPreview>
- interface:
api.call.betaBasketRuntimeApi.getBasketClaimPreview - summary: What
claim_root_with_hotkeywould do now for this staker with the dust rules applied: full entitlement, the part a claim pays, rows sold vs skipped.Nonewhen the staker has no owed shares on the validator.
getBasketPayout(hotkey: AccountId32, coldkey: AccountId32): TaoBalance
- interface:
api.call.betaBasketRuntimeApi.getBasketPayout - summary: TAO a coldkey would realize by redeeming its owed shares on one validator (marked).
getBasketPosition(hotkey: AccountId32, coldkey: AccountId32): Option<BasketPosition>
- interface:
api.call.betaBasketRuntimeApi.getBasketPosition - summary: One staker's share-denominated position on one validator: owed shares, outstanding supply, fund NAV, and the position's realizable and spot TAO values.
Nonewhen the staker has no owed shares there.
getBasketTradingStatus(hotkey: AccountId32): BasketTradingStatus
- interface:
api.call.betaBasketRuntimeApi.getBasketTradingStatus - summary: One fund's
swap_baskettrading status: the network-wide and per-hotkey gates plus the turnover window a trade at the current block would be charged to.
getBetaIndex(): (FixedU128, FixedU128)
- interface:
api.call.betaBasketRuntimeApi.getBetaIndex - summary: The published
(bag index, stake index)levels: the chained NAV-weighted display-price index (mix performance, flow-neutral) and the chained total-return stake index (what τ1 staked in the average fund became), maintained by the background sweep at realizable marks.
getBetaPortfolio(coldkey: AccountId32): Vec<BetaPosition>
- interface:
api.call.betaBasketRuntimeApi.getBetaPortfolio - summary: A coldkey's full display-denominated β portfolio, one position per validator with owed β, all marked against the same published index snapshot.
getBetaPosition(hotkey: AccountId32, coldkey: AccountId32): Option<BetaPosition>
- interface:
api.call.betaBasketRuntimeApi.getBetaPosition - summary: One staker's display-denominated β position on one validator (
display_beta * display_price= spot value;value_tao= what a claim pays), orNonewhen the staker has no owed β there.
getBetaPricing(hotkey: AccountId32): Option<BetaPricing>
- interface:
api.call.betaBasketRuntimeApi.getBetaPricing - summary: One fund's standardized pricing snapshot (index-spliced display price, total-return stake price, staker yield, published index levels), or
Nonewhen the hotkey has no outstanding shares. The single source of truth every consumer should display. Reads the published index snapshot inO(1)and scans only this fund's holdings.
getRootBasketClaimPreviews(coldkey: AccountId32): Vec<BasketClaimPreview>
- interface:
api.call.betaBasketRuntimeApi.getRootBasketClaimPreviews - summary: The same for every validator a coldkey-wide
claim_rootwould touch.
getRootBasketOwed(coldkey: AccountId32): TaoBalance
- interface:
api.call.betaBasketRuntimeApi.getRootBasketOwed - summary: Total TAO a coldkey would realize by redeeming all its root beta baskets (marked).
getRootBasketPortfolio(coldkey: AccountId32): Vec<BasketPosition>
- interface:
api.call.betaBasketRuntimeApi.getRootBasketPortfolio - summary: A coldkey's full basket portfolio: one share-denominated position per validator on which it has owed shares.
getRootBasketPositions(coldkey: AccountId32): Vec<(AccountId32, u64, TaoBalance)>
- interface:
api.call.betaBasketRuntimeApi.getRootBasketPositions - summary: A staker's positions across all its validators: (hotkey, owed shares, payout TAO).
getRootBasketTotalNav(): TaoBalance
- interface:
api.call.betaBasketRuntimeApi.getRootBasketTotalNav - summary: Network-wide total beta basket NAV across all validators, in TAO (marked).