sui_addr
Module for Solana address encoding/decoding.
- class SuiAddrConst
Bases:
object
Class container for Sui address constants.
- KEY_TYPE: bytes = b'\x00'
- class SuiAddrDecoder
Bases:
IAddrDecoder
Sui address decoder class. It allows the Sui address decoding.
- static DecodeAddr(addr: str, **kwargs: Any) bytes
Decode a Sui 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 SuiAddrEncoder
Bases:
IAddrEncoder
Sui address encoder class. It allows the Sui address encoding.
- static EncodeKey(pub_key: Union[bytes, IPublicKey], **kwargs: Any) str
Encode a public key to Sui 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
- SuiAddr
alias of
SuiAddrEncoder