Skip to main content

exchange

Function exchange 

Source
pub fn exchange(
    route: &str,
    sender: &str,
    payload: Sadder,
    modifiers: Sadder,
    embeds: &[(&str, &[u8])],
    recipient: Option<&str>,
    date: Option<&str>,
    dig: Option<&str>,
) -> Result<(SerderKERI, Vec<u8>), KERIError>
Expand description

Build an exn message (keripy: peer/exchanging.py exchange).

  • route: the r field, e.g. /fwd.
  • sender: the i field, the sender’s AID.
  • payload: the a block; recipient, when given, goes first in it as i.
  • modifiers: the q block.
  • embeds: named KERI messages (with attachments) embedded in e. Each message’s body goes in e[label]; its attachments are returned in the second value as a pathed material group pointing at /e/label.
  • date: the dt field; None is now.
  • dig: the p field, the SAID of a prior exn.

Returns the exn and the pathed attachments to send after its own signatures.