Skip to content

Commit b1aed98

Browse files
committed
Introduce BIP388Policy dataclass
1 parent 4e342db commit b1aed98

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

hwilib/common.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
****************************
44
"""
55

6+
from dataclasses import dataclass
7+
68
import hashlib
79

810
from enum import Enum
911

10-
from typing import Union
11-
12+
from typing import (
13+
List,
14+
Optional,
15+
Union,
16+
)
1217

1318
class Chain(Enum):
1419
"""
@@ -56,6 +61,15 @@ def argparse(s: str) -> Union['AddressType', str]:
5661
except KeyError:
5762
return s
5863

64+
@dataclass
65+
class BIP388Policy:
66+
"""
67+
Serialization agnostic BIP388 policy.
68+
"""
69+
name: str
70+
descriptor_template: str
71+
keys_info: List[str]
72+
hmac: Optional[str] = None
5973

6074
def sha256(s: bytes) -> bytes:
6175
"""

0 commit comments

Comments
 (0)