Docs

account_nextIndex - Bittensor RPC Method

Get the next valid transaction nonce for an account on Bittensor. Alias for system_accountNextIndex.

Returns the next valid transaction index (nonce) for a given account. This is an alias for system_accountNextIndex and considers both finalized state and pending transactions in the transaction pool. Using the correct nonce is essential when constructing signed extrinsics -- an incorrect nonce leads to BadProof, Future, or Stale transaction errors.

Parameters

ParameterTypeRequiredDescription
accountIdstringYesThe SS58-encoded address or hex-encoded AccountId (32 bytes) of the account to query.

Response

FieldTypeDescription
resultnumberThe next valid nonce for the account. This accounts for pending transactions in the pool.

Code Examples

Use Cases

  • Transaction construction -- Get the correct nonce before signing and submitting extrinsics to Bittensor (transfers, staking, subnet operations).
  • Batch transaction submission -- When sending multiple transactions in sequence, increment the nonce manually starting from this value.
  • Pool-aware nonce -- Unlike reading the nonce directly from storage, this method accounts for pending (not yet included) transactions in the pool.

Notes

  • This method is an alias for system_accountNextIndex. Both return identical results.
  • The returned nonce includes pending transactions in the pool. If those transactions are dropped, the nonce may shift.
  • For rapid transaction submission, consider manually incrementing nonces rather than querying between each submission.