egld_addr
Module for Elrond address encoding/decoding.
- class EgldAddrDecoder
Bases:
IAddrDecoder
Elrond address decoder class. It allows the Elrond address decoding.
- static DecodeAddr(addr: str, **kwargs: Any) bytes
Decode an Elrond address to bytes.
- Parameters:
addr (str) – Address string
**kwargs – Not used
- Returns:
Public key bytes
- Return type:
bytes
- Raises:
ValueError – If the address encoding is not valid
- class EgldAddrEncoder
Bases:
IAddrEncoder
Elrond address encoder class. It allows the Elrond address encoding.
- static EncodeKey(pub_key: Union[bytes, IPublicKey], **kwargs: Any) str
Encode a public key to Elrond 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 ed25519
- EgldAddr
alias of
EgldAddrEncoder