Conversion
- class ape_starknet.conversion.StarknetAccountConverter
A converter that converts accounts to address integers.
- convert(value: BaseStarknetAccount) int
Convert the given value to the type specified as the generic for this class. Implementations of this API must throw a
ConversionError
when the item fails to convert properly.
- is_convertible(value: Any) bool
Returns
True
if string value provided byvalue
is convertible usingape.api.convert.ConverterAPI.convert()
.- Parameters:
value (str) – The value to check.
- Returns:
True
when the given value can be converted.- Return type:
bool
- class ape_starknet.conversion.StarknetAddressConverter
A converter that converts
str
toAddressType
.- convert(value: str) ChecksumAddress
Convert the given value to a
AddressType
.- Parameters:
value (str) – The address
str
to convert.- Returns:
AddressType
- is_convertible(value: Any) bool
Returns
True
if string value provided byvalue
is convertible usingape.api.convert.ConverterAPI.convert()
.- Parameters:
value (str) – The value to check.
- Returns:
True
when the given value can be converted.- Return type:
bool