pub struct Source { /* private fields */ }Expand description
Where a stored receipt’s value was taken from (8.1, spec-0.6.0): the optional source
member, present only on a receipt with no inputs. The signer relays the value of another
party; the signature covers source, and verification does not fetch url (the trust
value relayed, 5.5). Built with Source::new and the with_* methods; a receipt holding
one is checked by Receipt::from_json or by ReceiptBuilder::sign (feature sign).
Implementations§
Source§impl Source
impl Source
Sourcepub fn new(name: &str, url: &str, retrieved: &str) -> Source
pub fn new(name: &str, url: &str, retrieved: &str) -> Source
A source with its required members: name (the source’s DNS name, 2.1), url (where the
value was taken from) and retrieved (an instant, when it was fetched). Not checked here:
the receipt check (10.1 step 3) and sign report what is wrong with it.
Sourcepub fn with_sha256(self, sha256: &str) -> Source
pub fn with_sha256(self, sha256: &str) -> Source
With sha256: 64 lowercase hex digits, the SHA-256 of the bytes fetched from url.
Sourcepub fn with_takeover(self, takeover: &str) -> Source
pub fn with_takeover(self, takeover: &str) -> Source
With takeover: an https:// URL where the source can take over publishing these cells.