sigil-core · dao
Source declarations, signatures and documentation for dao.
Source: sigil/node/sigil-core/src/dao.rs. SHA-256: b61d5595bdc2e343ba62e6033c0e7014713f0cf303786f533ee420fb038874f9.
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.
dao::TreasuryRef
Reference to a treasury DID controlled by a DAO.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct TreasuryRef {
/// The treasury DID, e.g. `did:oas:sigil:treasury:<id>`.
pub treasury_did: String,
/// Optional human-readable label for explorer surfaces.
pub label: Option<String>
}Source line: 17.
dao::HiringPolicy
Who is allowed to post jobs and issue mandates on behalf of a DAO.
Open is intentionally permissive only when paired with a downstream
approval policy. Most DAOs should use RestrictedToControllers or
Delegated.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", content = "data", rename_all = "snake_case")]
pub enum HiringPolicy {
/// Only the DAO controller (root or root group) may post jobs / issue
/// mandates.
RestrictedToControllers,
/// A specific list of DIDs may post jobs / issue mandates on behalf of
/// the DAO.
Delegated { allowed_dids: Vec<String> },
/// Any DID with the supplied permission attestation may act. This is
/// fail-closed until a verifier supplies attestations to the DAO runtime.
AttestationGated { required_attestation: String },
}Source line: 31.
dao::GovernancePolicy
DAO governance policy. Phase 1 stores the policy verbatim and treats it as opaque metadata for the chain; richer voting semantics arrive after the governance category is extended.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "kind", content = "data", rename_all = "snake_case")]
pub enum GovernancePolicy {
/// All actions execute via the controller policy directly. No proposals.
DirectControl,
/// Proposals routed through the existing Sigil governance category with
/// a quorum and a timelock window expressed in blocks.
Proposal {
quorum_basis_points: u16,
timelock_blocks: u64,
},
}Source line: 48.
dao::DaoIdentity
On-chain DAO / Autonomous Organization identity record.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DaoIdentity {
/// The DAO DID (`did:oas:sigil:dao:<id>`).
pub dao_did: String,
/// Authority required to update DAO policy or rotate controllers.
pub controller_policy: ControlPolicy,
/// Governance configuration.
pub governance_policy: GovernancePolicy,
/// Treasuries owned by this DAO.
pub treasuries: Vec<TreasuryRef>,
/// Optional default token class (e.g., membership / voting / profit
/// share).
pub default_token_id: Option<String>,
/// Hiring policy: who may post jobs and issue mandates.
pub hiring_policy: HiringPolicy,
/// Commitment hash of off-chain DAO metadata (charter, mission, etc.).
pub metadata_commitment: Option<String>,
/// Active / paused / revoked.
pub status: AuthorityStatus
}Source line: 61.
dao::DaoIdentity::actor_may_initiate_hiring
Return whether the supplied actor DID is permitted to post jobs or issue mandates on behalf of this DAO under the configured hiring policy.
This is a necessary check, not a sufficient one — a downstream signature/threshold check is still required.
pub fn actor_may_initiate_hiring(&self, actor_did: &str) -> bool;Source line: 88.
dao::DaoIdentity::is_active
Returns true when the DAO is currently usable (active).
pub fn is_active(&self) -> bool;Source line: 110.