Skip to main content

put

Function put 

Source
pub async fn put(
    session: &mut Session,
    data: &[u8],
    name: impl Into<String>,
    identity: &KeyPair,
) -> Result<Mcid, PutError>
Expand description

Store data, returning the MCID it’s now addressable by.

name is attached to the manifest when data is large enough to be chunked; a single block (data.len() <= manifest::DEFAULT_CHUNK_SIZE) is addressed purely by content hash and carries no name at all, matching macula_content_transfer:put_single_block/3 — name is silently unused on that path, not an oversight.