2021-02-19 19:19:58 +01:00
|
|
|
import enum
|
2022-02-11 21:56:28 +01:00
|
|
|
from typing import NamedTuple, Optional
|
2021-02-19 19:19:58 +01:00
|
|
|
|
|
|
|
|
2021-06-02 17:00:27 +02:00
|
|
|
@enum.unique
|
2021-02-19 19:19:58 +01:00
|
|
|
class DB_PREFIXES(enum.Enum):
|
|
|
|
claim_to_support = b'K'
|
|
|
|
support_to_claim = b'L'
|
|
|
|
|
|
|
|
claim_to_txo = b'E'
|
|
|
|
txo_to_claim = b'G'
|
|
|
|
|
|
|
|
claim_to_channel = b'I'
|
|
|
|
channel_to_claim = b'J'
|
|
|
|
|
|
|
|
claim_short_id_prefix = b'F'
|
2021-07-03 17:48:22 +02:00
|
|
|
effective_amount = b'D'
|
2021-02-21 23:26:13 +01:00
|
|
|
claim_expiration = b'O'
|
2021-02-19 19:19:58 +01:00
|
|
|
|
2021-05-05 22:17:32 +02:00
|
|
|
claim_takeover = b'P'
|
|
|
|
pending_activation = b'Q'
|
2021-05-20 19:31:40 +02:00
|
|
|
activated_claim_and_support = b'R'
|
|
|
|
active_amount = b'S'
|
2021-05-05 22:17:32 +02:00
|
|
|
|
2021-06-02 17:00:27 +02:00
|
|
|
repost = b'V'
|
|
|
|
reposted_claim = b'W'
|
|
|
|
|
2021-07-14 19:39:06 +02:00
|
|
|
undo = b'M'
|
2022-01-06 18:28:15 +01:00
|
|
|
touched_or_deleted = b'Y'
|
2021-07-14 19:39:06 +02:00
|
|
|
|
|
|
|
tx = b'B'
|
|
|
|
block_hash = b'C'
|
|
|
|
header = b'H'
|
|
|
|
tx_num = b'N'
|
|
|
|
tx_count = b'T'
|
|
|
|
tx_hash = b'X'
|
|
|
|
utxo = b'u'
|
|
|
|
hashx_utxo = b'h'
|
|
|
|
hashx_history = b'x'
|
2021-02-24 21:20:44 +01:00
|
|
|
db_state = b's'
|
2021-10-04 22:38:28 +02:00
|
|
|
channel_count = b'Z'
|
|
|
|
support_amount = b'a'
|
2022-01-15 19:45:41 +01:00
|
|
|
block_tx = b'b'
|
2021-12-01 22:47:29 +01:00
|
|
|
trending_notifications = b'c'
|
|
|
|
mempool_tx = b'd'
|
|
|
|
touched_hashX = b'e'
|
2022-02-11 21:56:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
COLUMN_SETTINGS = {} # this is updated by the PrefixRow metaclass
|