Coverage for silkaj/constants.py: 100%

23 statements  

« prev     ^ index     » next       coverage.py v7.6.3, created at 2024-10-18 04:28 +0000

1# Copyright 2016-2024 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/>. 

15 

16SILKAJ_VERSION = "0.11.0" 

17G1_SYMBOL = "Ğ1" 

18GTEST_SYMBOL = "ĞTest" 

19 

20G1_DEFAULT_ENDPOINT = "BMAS g1.duniter.org 443" 

21G1_TEST_DEFAULT_ENDPOINT = "BMAS g1-test.duniter.org 443" 

22 

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" 

25 

26ONE_HOUR = 3600 

27 

28SUCCESS_EXIT_STATUS = 0 

29FAILURE_EXIT_STATUS = 1 

30 

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}} " 

36 

37MINIMAL_ABSOLUTE_TX_AMOUNT = 0.01 

38MINIMAL_RELATIVE_TX_AMOUNT = 1e-6 

39CENT_MULT_TO_UNIT = 100 

40SHORT_PUBKEY_SIZE = 8 

41 

42# pendulum constants 

43# see https://pendulum.eustace.io/docs/#localized-formats 

44DATE = "LL" 

45HOUR = "LTS" 

46ALL = "LLL" 

47# Not ISO 8601 compliant but common 

48ALL_DIGITAL = "YYYY-MM-DD HH:mm:ss"