Module utils

Module utils 

Source
Expand description

§Bittensor Utilities

Helper functions for common Bittensor operations including:

  • Weight normalization and payload creation
  • Cryptographic signature operations
  • Unit conversions (TAO/RAO)

Structs§

NormalizedWeight
Represents a normalized weight for a neuron

Functions§

create_signature
Create a signature using a subxt signer
normalize_weights
Normalize weights to sum to u16::MAX
set_weights_payload
Create a set_weights payload for submission to the chain
sign_message_hex
Sign a message and return hex-encoded signature
sign_with_keypair
Sign a message with a keypair
verify_bittensor_signature
Verify a Bittensor signature

Type Aliases§

BittensorSignature
Signature type used by Bittensor (sr25519)