okex_addr
Module for OKEx address encoding/decoding.
- class OkexAddrDecoder
Bases:
IAddrDecoder
OKEx Chain address decoder class. It allows the OKEx Chain address decoding.
- static DecodeAddr(addr: str, **kwargs: Any) bytes
Decode a OKEx Chain address to bytes.
- Parameters:
addr (str) – Address string
**kwargs – Not used
- Returns:
Public key hash bytes
- Return type:
bytes
- Raises:
ValueError – If the address encoding is not valid
- class OkexAddrEncoder
Bases:
IAddrEncoder
OKEx Chain address encoder class. It allows the OKEx Chain address encoding.
- static EncodeKey(pub_key: Union[bytes, IPublicKey], **kwargs: Any) str
Encode a public key to OKEx Chain address.
- Parameters:
pub_key (bytes or IPublicKey) – Public key bytes or object
**kwargs – Not used
- Returns:
Address string
- Return type:
str
- Raises:
ValueError – If the public key is not valid
TypeError – If the public key is not secp256k1
- OkexAddr
alias of
OkexAddrEncoder