Sigil documentation
ReferenceRust referencearise-identity

arise-identity · consumer

Source declarations, signatures and documentation for consumer.

Source: sigil/node/../arise-bridge/arise-identity/src/consumer.rs. SHA-256: 0a3a72bdbdeb1430fc7436c55993f2bb277f57e0fd8cb32a0bd09068a4e447d6.

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.

consumer::ConsumerIdentity

A compute consumer's OAS identity.

Consumers request compute resources from ARISE providers. Their identity is derived from an OAS DID with lineage back to a human root.

Optionally, a consumer may act on behalf of an organization (org_did) and may have a spending budget limit in micro-MINT.

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConsumerIdentity {
/// The consumer's OAS DID.

pub did: String,
/// The human root DID establishing lineage provenance.

pub human_root_did: String,
/// The generation number in the OAS lineage chain.

pub generation: u32,
/// Optional organization DID if acting on behalf of an AO.

pub org_did: Option<String>,
/// Optional maximum spend in micro-MINT.

pub budget_limit: Option<u64>
}

Source line: 19.

consumer::ConsumerIdentity::new

Creates a new consumer identity.

Arguments

  • did - The consumer's OAS DID string.
  • human_root_did - The human root DID for lineage provenance.
  • generation - The generation number in the lineage chain.

Errors

Returns [IdentityError::InvalidDid] if either DID is not a valid did:oas identifier. Returns [IdentityError::MissingHumanRoot] if human_root_did is empty.

pub fn new(did: &str, human_root_did: &str, generation: u32) -> Result<Self, IdentityError>;

Source line: 45.

consumer::ConsumerIdentity::with_org

Sets the organization DID that this consumer is acting on behalf of.

Arguments

  • org_did - An OAS DID for the organization (typically did:oas:<ns>:ao:<id>).

Errors

Returns [IdentityError::InvalidDid] if the org DID is not a valid did:oas identifier.

pub fn with_org(mut self, org_did: &str) -> Result<Self, IdentityError>;

Source line: 76.

consumer::ConsumerIdentity::with_budget

Sets the maximum spend budget in micro-MINT.

Arguments

  • limit - Maximum spend in micro-MINT (1 MINT = 1,000,000 micro-MINT).
pub fn with_budget(mut self, limit: u64) -> Self;

Source line: 89.

On this page