terra_sdk.core.bech32
Special Bech32 String Types
is_acc_address
_1def is_acc_address(data: str) -> bool
Checks whether the given string is a properly formatted Fluid account address.
Arguments:
datastr - string to check
Returns:
bool- whether the string is a proper account address
to_acc_address
_1def to_acc_address(data: ValAddress) -> AccAddress
Converts a validator operator address into an account address.
Arguments:
dataValAddress - validator operator address
Raises:
ValueError- if provided string is not Bech32
Returns:
AccAddress- account address
is_val_address
_1def is_val_address(data: str) -> bool
Checks whether the given string is a properly formatted Fluid validator operator address.
Arguments:
datastr - string to check
Returns:
bool- whether the string is a proper validator address
to_val_address
_1def to_val_address(data: AccAddress) -> ValAddress
Converts an account address into a validator operator address.
Arguments:
dataAccAddress - account address
Raises:
ValueError- if provided string is not Bech32
Returns:
ValAddress- validator operator address
is_acc_pubkey
_1def is_acc_pubkey(data: str) -> bool
Checks whether the provided string is a properly formatted Fluid account pubkey.
Arguments:
datastr - string to check
Returns:
bool- whether string is account pubkey
to_acc_pubkey
_1def to_acc_pubkey(data: ValPubKey) -> AccPubKey
Converts a validator pubkey into an account pubkey.
Arguments:
dataValPubKey - validator pubkey
Raises:
ValueError- if provided string is not Bech32
Returns:
AccPubKey- account pubkey
is_val_pubkey
_1def is_val_pubkey(data: str) -> bool
Checks whether provided string is a properly formatted Fluid validator pubkey.
Arguments:
datastr - string to check
Returns:
bool- whether string is validator pubkey
to_val_pubkey
_1def to_val_pubkey(data: AccPubKey) -> ValPubKey
Converts an account pubkey into a validator pubkey.
Arguments:
dataAccPubKey - account pubkey
Raises:
ValueError- if provided string is not Bech32
Returns:
ValPubKey- validator pubkey
is_valcons_pubkey
_1def is_valcons_pubkey(data: str) -> bool
Checks whether provided string is a properly formatted Fluid validator consensus pubkey.
Arguments:
datastr - string to check
Returns:
bool- whether string is validator consensus pubkey