Address¶
- class blsct.Address¶
Encode and decode address strings from DoublePublicKey objects.
This class provides static methods to convert between DoublePublicKey objects and their string representations using a specified encoding.
>>> from blsct import DoublePublicKey, Address, AddressEncoding >>> dpk = DoublePublicKey() >>> addr = Address.encode(dpk, AddressEncoding.Bech32M) >>> addr 'nv15glx4094hlz7ltmjqp5cqa...' >>> dec_dpk = Address.decode(addr) >>> dpk.serialize() == dec_dpk.serialize() True
- static decode(addr: str)¶
Decode an address string to a DoublePublicKey
- static encode(dpk: DoublePublicKey, encoding: AddressEncoding)¶
Encode a DoublePublicKey to an address string using the specified encoding