forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransactions.py
46 lines (36 loc) · 1.17 KB
/
transactions.py
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
from plenum.common.transactions import Transactions, PlenumTransactions
class IndyTransactions(Transactions):
# These numeric constants CANNOT be changed once they have been used,
# because that would break backwards compatibility with the ledger
# Also the numeric constants CANNOT collide with transactions in plenum
NODE = PlenumTransactions.NODE.value
NYM = PlenumTransactions.NYM.value
ATTRIB = "100"
SCHEMA = "101"
CLAIM_DEF = "102"
DISCLO = "103"
GET_ATTR = "104"
GET_NYM = "105"
GET_TXNS = PlenumTransactions.GET_TXN.value
GET_SCHEMA = "107"
GET_CLAIM_DEF = "108"
POOL_UPGRADE = "109"
NODE_UPGRADE = "110"
POOL_CONFIG = "111"
CHANGE_KEY = "112"
REVOC_REG_DEF = "113"
REVOC_REG_ENTRY = "114"
GET_REVOC_REG_DEF = "115"
GET_REVOC_REG = "116"
GET_REVOC_REG_DELTA = "117"
POOL_RESTART = "118"
VALIDATOR_INFO = "119"
AUTH_RULE = "120"
GET_AUTH_RULE = "121"
AUTH_RULES = "122"
@staticmethod
def get_name_from_code(code: str):
try:
return IndyTransactions(code).name
except ValueError:
return "Unknown_transaction_type"