pyswitcheo.datatypes package¶
Submodules¶
pyswitcheo.datatypes.fixed8 module¶
Implementation for custom datatypes to interact with the blockchain.
-
class
pyswitcheo.datatypes.fixed8.Fixed8(value)[source]¶ Bases:
objectFixed point representation of a given input number.
-
static
num_to_fixed_8(number, size=8)[source]¶ Convert a given number to Fixed8 representation.
Parameters: number (float/int) – Input which needs to be converted to a Fixed8 representation. Returns: Given number in Fixed8 representation. Raises: TypeError in case size param is not an integer
-
value¶ Return the underlying value of fixed 8.
-
static
pyswitcheo.datatypes.transaction_types module¶
Implementation for custom datatypes to interact with the blockchain.
-
class
pyswitcheo.datatypes.transaction_types.TransactionAttribute(usage, data)¶ Bases:
tuple-
data¶ Alias for field number 1
-
usage¶ Alias for field number 0
-
-
class
pyswitcheo.datatypes.transaction_types.TransactionInput(prevHash, prevIndex)¶ Bases:
tuple-
prevHash¶ Alias for field number 0
-
prevIndex¶ Alias for field number 1
-