Function bamboo_rs_core::entry::publish::publish [−][src]
pub fn publish(
out: &mut [u8],
key_pair: &Keypair,
log_id: u64,
payload: &[u8],
is_end_of_feed: bool,
previous_seq_num: Option<u64>,
lipmaa_entry_bytes: Option<&[u8]>,
backlink_bytes: Option<&[u8]>
) -> Result<usize, Error>
Expand description
Publish a new entry into the out buffer.
out: A buffer to encode the entry into. Must be >= MAX_ENTRY_SIZE.key_pair: The ed25519 cryptographic key pair used to sign the entry.log_id: The integer that distinguishes different logs by the same author.payload: The payload of the entry. Note that only the hash of the payload becomes part of the entry. It’s up to the caller to store the actual payload somewhere.is_end_of_feed: Is this entry the final entry for thislog_id?previous_seq_num: The seq num of the previous entry.Noneif this is the first entry.lipmaa_entry_bytes: The encoded lipmaa_entry.Noneif this is the first entry.backlink_bytes: The encoded backlkink.Noneif this is the first entry.
Returns a Result of the size of the entry encoded into out.