Coverage for silkaj/constants.py: 100%
23 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-20 12:29 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-20 12:29 +0000
1# Copyright 2016-2025 Maël Azimi <m.a@moul.re>
2#
3# Silkaj is free software: you can redistribute it and/or modify
4# it under the terms of the GNU Affero General Public License as published by
5# the Free Software Foundation, either version 3 of the License, or
6# (at your option) any later version.
7#
8# Silkaj is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Affero General Public License for more details.
12#
13# You should have received a copy of the GNU Affero General Public License
14# along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
16SILKAJ_VERSION = "0.11.0"
17G1_SYMBOL = "Ğ1"
18GTEST_SYMBOL = "ĞTest"
20G1_DEFAULT_ENDPOINT = "BMAS g1.duniter.org 443"
21G1_TEST_DEFAULT_ENDPOINT = "BMAS g1-test.duniter.org 443"
23G1_CSP_USER_ENDPOINT = "ES_USER_API g1.data.e-is.pro 443"
24GTEST_CSP_USER_ENDPOINT = "ES_USER_API g1-test.data.e-is.pro 443"
26ONE_HOUR = 3600
28SUCCESS_EXIT_STATUS = 0
29FAILURE_EXIT_STATUS = 1
31BMA_MAX_BLOCKS_CHUNK_SIZE = 5000
32BMA_SLEEP = 0.1
33PUBKEY_MIN_LENGTH = 43
34PUBKEY_MAX_LENGTH = 44
35PUBKEY_PATTERN = f"[1-9A-HJ-NP-Za-km-z]{ {PUBKEY_MIN_LENGTH},{PUBKEY_MAX_LENGTH}} "
37MINIMAL_ABSOLUTE_TX_AMOUNT = 0.01
38MINIMAL_RELATIVE_TX_AMOUNT = 1e-6
39CENT_MULT_TO_UNIT = 100
40SHORT_PUBKEY_SIZE = 8
42# Arrow date time formats
43# https://arrow.readthedocs.io/en/latest/guide.html#supported-tokens
44DATE = "MMMM D, YYYY"
45ALL = "MMMM D, YYYY hh:mm A ZZZ"
46# Not ISO 8601 compliant but common
47ALL_DIGITAL = "YYYY-MM-DD HH:mm:ss"
48FULL_HUMAN_FORMAT = "dddd D MMMM YYYY HH:mm ZZZ"