tba-bases-security-event 0.4.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tba-bases-security-event
|
|
3
|
+
Version: 0.4.0.dev2
|
|
4
|
+
Summary: Protocol-neutral security event bases.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.10,<3.15
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Requires-Dist: tba-contracts-security-event (==0.4.0.dev2)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tba-bases-security-event"
|
|
3
|
+
version = "0.4.0.dev2"
|
|
4
|
+
description = "Protocol-neutral security event bases."
|
|
5
|
+
requires-python = ">=3.10,<3.15"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
dependencies = ["tba-contracts-security-event==0.4.0.dev2"]
|
|
8
|
+
|
|
9
|
+
[build-system]
|
|
10
|
+
requires = ["poetry-core>=1.0.0"]
|
|
11
|
+
build-backend = "poetry.core.masonry.api"
|
|
12
|
+
|
|
13
|
+
[tool.poetry]
|
|
14
|
+
packages = [{ include = "tba_bases_security_event", from = "src" }]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
|
|
3
|
+
from tba_contracts_security_event import (
|
|
4
|
+
SecurityEvent,
|
|
5
|
+
SecurityEventReceiverPort,
|
|
6
|
+
SecurityEventTransmitterPort,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SecurityEventTransmitterBase(SecurityEventTransmitterPort, ABC):
|
|
11
|
+
def transmit(self, event: SecurityEvent, subscriber: str, /) -> str:
|
|
12
|
+
raise NotImplementedError
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SecurityEventReceiverBase(SecurityEventReceiverPort, ABC):
|
|
16
|
+
def receive(self, encoded_event: str | bytes, /) -> SecurityEvent:
|
|
17
|
+
raise NotImplementedError
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class SecurityEventDeliveryBase(ABC):
|
|
21
|
+
def deliver(self, encoded_event: str | bytes, subscriber: str, /) -> bool:
|
|
22
|
+
raise NotImplementedError
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SecurityEventReplayBase(ABC):
|
|
26
|
+
def consume_once(self, issuer: str, token_id: str, /) -> bool:
|
|
27
|
+
raise NotImplementedError
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"SecurityEventDeliveryBase",
|
|
32
|
+
"SecurityEventReceiverBase",
|
|
33
|
+
"SecurityEventReplayBase",
|
|
34
|
+
"SecurityEventTransmitterBase",
|
|
35
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|