mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-02 20:48:30 +00:00
29 lines
917 B
Python
29 lines
917 B
Python
|
|
from micropython import const
|
|
|
|
NEM_NETWORK_MAINNET = const(0x68)
|
|
NEM_NETWORK_TESTNET = const(0x98)
|
|
NEM_NETWORK_MIJIN = const(0x60)
|
|
NEM_CURVE = 'ed25519-keccak'
|
|
|
|
NEM_TRANSACTION_TYPE_TRANSFER = const(0x0101)
|
|
NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER = const(0x0801)
|
|
NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION = const(0x1001)
|
|
NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE = const(0x1002)
|
|
NEM_TRANSACTION_TYPE_MULTISIG = const(0x1004)
|
|
NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE = const(0x2001)
|
|
NEM_TRANSACTION_TYPE_MOSAIC_CREATION = const(0x4001)
|
|
NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE = const(0x4002)
|
|
|
|
NEM_SALT_SIZE = const(32)
|
|
AES_BLOCK_SIZE = const(16)
|
|
NEM_HASH_ALG = 'keccak'
|
|
|
|
|
|
def nem_validate_network(network):
|
|
if network in (NEM_NETWORK_MAINNET, NEM_NETWORK_TESTNET, NEM_NETWORK_MIJIN):
|
|
return network
|
|
if network is None:
|
|
return NEM_NETWORK_MAINNET
|
|
raise ValueError('Invalid NEM network')
|