-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransaction.py
More file actions
58 lines (44 loc) · 1.13 KB
/
transaction.py
File metadata and controls
58 lines (44 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from dataclasses import dataclass
from dataclasses_json import dataclass_json
from typing import List, Optional
@dataclass_json
@dataclass(frozen=True)
class TransactionStatus(object):
ledger_state_version: int
status: str
confirmed_time: str
@dataclass_json
@dataclass(frozen=True)
class TransactionIdentifier(object):
hash: str
@dataclass_json
@dataclass(frozen=True)
class Token(object):
rri: str
@dataclass_json
@dataclass(frozen=True)
class Amount(object):
value: str
token_identifier: Token
@dataclass_json
@dataclass(frozen=True)
class Action(object):
type: str
amount: Amount
from_account: Optional[str] = None
from_validator: Optional[str] = None
to_account: Optional[str] = None
to_validator: Optional[str] = None
@dataclass_json
@dataclass(frozen=True)
class Metadata(object):
message_text: Optional[str] = None
message: Optional[str] = None
@dataclass_json
@dataclass(frozen=True)
class Transaction(object):
transaction_status: TransactionStatus
transaction_identifier: TransactionIdentifier
actions: List[Action]
fee_paid: Amount
metadata: Metadata