bittensor.utils.wallet_utils#
Functions#
|
Returns the ss58 format of the given ss58 address. |
|
Checks if the given address is a valid ss58 address. |
|
Checks if the given public_key is a valid ed25519 key. |
Checks if the given address is a valid destination address. |
|
|
Creates a dictionary with structure for identity extrinsic. Must fit within 64 bits. |
|
Module Contents#
- bittensor.utils.wallet_utils.get_ss58_format(ss58_address)[source]#
Returns the ss58 format of the given ss58 address.
- bittensor.utils.wallet_utils.is_valid_ss58_address(address)[source]#
Checks if the given address is a valid ss58 address.
- bittensor.utils.wallet_utils.is_valid_ed25519_pubkey(public_key)[source]#
Checks if the given public_key is a valid ed25519 key.
- bittensor.utils.wallet_utils.is_valid_bittensor_address_or_public_key(address)[source]#
Checks if the given address is a valid destination address.
- bittensor.utils.wallet_utils.create_identity_dict(display='', legal='', web='', riot='', email='', pgp_fingerprint=None, image='', info='', twitter='')[source]#
Creates a dictionary with structure for identity extrinsic. Must fit within 64 bits.
- Parameters:
display (str) – String to be converted and stored under ‘display’.
legal (str) – String to be converted and stored under ‘legal’.
web (str) – String to be converted and stored under ‘web’.
riot (str) – String to be converted and stored under ‘riot’.
email (str) – String to be converted and stored under ‘email’.
pgp_fingerprint (str) – String to be converted and stored under ‘pgp_fingerprint’.
image (str) – String to be converted and stored under ‘image’.
info (str) – String to be converted and stored under ‘info’.
twitter (str) – String to be converted and stored under ‘twitter’.
- Returns:
A dictionary with the specified structure and byte string conversions.
- Return type:
Raises: ValueError: If pgp_fingerprint is not exactly 20 bytes long when encoded.