Skip to main content

encode_invite

Function encode_invite 

Source
pub fn encode_invite(
    address: &Address,
    public_key: &[u8],
    petname: Option<&str>,
    signature: Option<&[u8]>,
) -> Result<String>
Expand description

Encodes an invite blob, optionally signed.

signature must be a signature by the key public_key names, over invite_signing_payload. Pass None for the unsigned form.

ยงErrors

Returns MlsError::InvalidPublicKey if public_key is not 32 bytes, MlsError::Serialization if the petname is over-long or carries a control or format character, or if the signature is the wrong length.