from bech32 addr to
(cls, s)
| 26 | Includes a witver and checksum. |
| 27 | """ |
| 28 | def __new__(cls, s): |
| 29 | """from bech32 addr to """ |
| 30 | witver, data = decode(bitcoin.params.BECH32_HRP, s) |
| 31 | if witver is None and data is None: |
| 32 | raise Bech32Error('Bech32 decoding error') |
| 33 | |
| 34 | return cls.from_bytes(witver, data) |
| 35 | |
| 36 | def __init__(self, s): |
| 37 | """Initialize from bech32-encoded string |
no test coverage detected