Constants¶
This module collects the constants that programs outside this package use most: the default broker ports, the largest chunk size for asset transfers, and the hash limits and supported hash functions from Hash. Import them from here instead of from the modules that define them, so your code keeps working when a definition moves.
API reference¶
- momotor.rpc.const.CHUNK_SIZE = 8388608¶
Maximum supported chunk size for asset file transfers
- momotor.rpc.const.DEFAULT_PORT = 50051¶
The default port for non-SSL connections
- momotor.rpc.const.DEFAULT_SSL_PORT = 50052¶
The default port for SSL connections
- momotor.rpc.const.MAX_HASH_LEN = 1024¶
Maximum length of a base58 encoded hash supported by this version of the library
- momotor.rpc.const.MAX_IDENTITY_LENGTH = 747¶
Maximum length of data that can be encoded in a hash of
MAX_HASH_LENusing identity encoding. base58’s efficiency is 0.732, the overhead is the size of the varint encoded length + 1 for the code byte
- momotor.rpc.const.SUPPORTED_HASH_FUNCS = [20, 21, 19, 22, 23, 18, 17]¶
List of supported hashing function codes, ordered from most to least preferred