pub trait CapsuleSource: Send + Sync {
// Required method
fn fetch_capsule<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Untrusted source of capsule bytes for a did:at9p:<cid> identifier.
The mainline locator (#890 / C2) is the production implementation; for D1
the trait abstracts how the bytes are fetched so the resolver only depends
on the GATE decision over them. The locator derives zero authority: the
verify_did_at9p gate is what makes the bytes trustworthy, not the source.
Required Methods§
Sourcefn fetch_capsule<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_capsule<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the raw (canonical DAG-CBOR) capsule bytes advertised for did.
The bytes are attacker-controlled until GATE verifies them.