Sigil documentation
ReferenceRust referencesigil-sdk

sigil-sdk · resolver

Source declarations, signatures and documentation for resolver.

Source: sigil/node/sigil-sdk/src/resolver.rs. SHA-256: f3a30069d95b88207ca5be01ef3c275812ae589d968c7b00e94339e7b9cc5825.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

resolver::SigilResolver

Resolves OAS documents from Sigil chain state.

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SigilResolver {
/// RPC endpoint URL of the Sigil node.

pub rpc_url: String,
/// The chain ID to target.

pub chain_id: String
}

Source line: 12.

resolver::SigilResolver::new

Create a new resolver targeting the given node.

pub fn new(rpc_url: &str, chain_id: &str) -> Self;

Source line: 21.

resolver::SigilResolver::resolve_did

Resolve an OAS document by DID.

pub fn resolve_did(&self, did: &str) -> Result<ResolvedDocument, SdkError>;

Source line: 29.

resolver::ResolvedDocument

A resolved OAS document with on-chain anchoring metadata.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResolvedDocument {
/// The DID of the resolved identity.

pub did: String,
/// The full OAS document as JSON.

pub document_json: serde_json::Value,
/// Block height at which this document was last anchored.

pub block_height: u64,
/// Whether the document is anchored on the Sigil chain.

pub anchored: bool
}

Source line: 127.

On this page